Commit graph

4121 commits

Author SHA1 Message Date
David Brailovsky
e54d45d119
docs(coding-agent): remove issue-specific regression test placement rule (#8775) 2026-08-28 16:39:28 +02:00
David Brailovsky
56700d42ed
fix(coding-agent): compact before post-tool model requests (#8782)
Run next-turn preparation only when the agent loop continues, allowing threshold compaction before the next provider request. Restore interactive progress when the same run resumes.

Closes #6879

Important to notice:
this changes when prepareNextTurn & prepareNextTurnWithContext are invoked:
the now run only when a next turn actually happens, and after shouldStopAfterTurn.
2026-08-28 13:40:59 +02:00
Cristina Poncela Cubeiro
35741a456d fix(coding-agent): restore client compatibility entrypoint 2026-08-28 13:31:05 +02:00
Cristina Poncela Cubeiro
758a0ee9b7 Merge branch 'main' into dev
# Conflicts:
#	packages/agent/CHANGELOG.md
#	packages/ai/scripts/generate-models.ts
#	packages/ai/src/providers/cloudflare-ai-gateway.ts
#	packages/ai/test/zai-coding-plan-models.test.ts
#	packages/coding-agent/src/modes/interactive/interactive-mode.ts
#	packages/tui/src/tui-alt-screen.ts
2026-08-28 13:19:43 +02:00
Armin Ronacher
fcbb0b3405 feat(coding-agent): add facet-based slash commands 2026-08-28 10:35:21 +02:00
Armin Ronacher
d4ce5d5a22 feat(agent,coding-agent): unify process-local service lifecycle 2026-08-28 10:08:19 +02:00
Armin Ronacher
f55da4a9df fix(coding-agent): allow exit while Radius reconnects 2026-08-28 09:38:19 +02:00
Armin Ronacher
1d0d110ab4 feat(coding-agent): connect experimental sessions through Radius 2026-08-28 02:09:53 +02:00
Armin Ronacher
b6c8797459 feat(coding-agent): share fullscreen TUI with experimental client
Reuse the stable renderer, viewport layout, theme detection, and terminal appearance updates. Keep successful operation status derived from replicated lane state.
2026-08-27 19:09:26 +02:00
Cristina Poncela Cubeiro
4e49492999
feat(tui): allow disable copy on fullscreen, ctrl + x copies selection (#8731) 2026-08-27 18:07:54 +02:00
Armin Ronacher
ecd31642d7 fix(coding-agent): remove unnecessary local service tokens 2026-08-27 17:19:51 +02:00
Armin Ronacher
4bd9438e5d feat(coding-agent): run experimental client as direct chat
Replace raw Harness and Chat service exposure with AgentController and replicated lane state. Start directly in new or resumed sessions and persist model selection.
2026-08-27 17:19:51 +02:00
Ramiz Wachtler
1defa151e0
fix(coding-agent): expose https-proxy-agent named export (#8723)
- closes #8610
2026-08-27 15:51:29 +02:00
Cristina Poncela Cubeiro
ccfe79ed23
feat(extensions): ui prompt events (#8355)
* feat(extensions): ui prompt events

* fix: handlers should not delay the prompt
2026-08-27 11:28:05 +02:00
Armin Ronacher
6441fa68b5 fix(agent): align facet service contracts and errors 2026-08-27 10:20:33 +02:00
Armin Ronacher
8288bc3543 feat(coding-agent): wire Chat into experimental TUI 2026-08-27 10:20:09 +02:00
Armin Ronacher
a17ead3292 feat(agent): remove remote service events 2026-08-27 10:19:02 +02:00
Armin Ronacher
6f0ea81e8b feat(coding-agent): preserve handles across facet reloads 2026-08-27 10:19:02 +02:00
Armin Ronacher
75223072b8 feat(coding-agent): expose experimental TUI service
Keep attachment routing in the TUI host and simplify loaded facet generation ownership.
2026-08-27 10:19:02 +02:00
Armin Ronacher
e44ecea8fb feat(coding-agent): derive facet service routing 2026-08-27 10:19:02 +02:00
Armin Ronacher
97f7472f4e feat(coding-agent): replace facet attributes with services
Make facets non-generic and resolve host-local dependencies through service bindings. Rename local assembly to createFacetHost and consolidate TUI host mechanics behind one service.
2026-08-27 10:19:02 +02:00
Mario Zechner
eb3e9feed1 feat(coding-agent): split tool renderers and theme validation from their implementations
A presentation draws tool calls and colours; it executes nothing and validates
nothing. Both cost it typebox anyway, which is 17 MB of module graph: 682 ESM
modules whose narrowest entry re-exports ~300 of them, so there is no
cherry-picking and both doors had to close before any process stopped paying.

ToolExecutionComponent no longer looks up createAllToolDefinitions by tool name;
callers pass what to render, and its parameter type now says so. Each built-in
tool's presentation moves to core/tools/renderers/<tool>.ts, leaving the schema
and execute path behind; bash and powershell share createShellRenderers(prompt).
Tool definitions keep their exact public shape and spread the renderers in.
withBuiltInRenderers() preserves the old fallback, where an extension override
without renderers still draws like the built-in - that behaviour used to live
inside the component, and two tests caught its absence.

theme.ts keeps palettes; the typebox schema and its error formatting move to
theme-json.ts, installed through setThemeJsonValidator. Built-in themes were
never validated, so only processes that load user-authored themes need it. pi
installs it during startup, before the first theme loads, and the invalid-theme
message is unchanged.

Measured with mini, running built output: the presentation drops from 87 MB and
99 files to 72 MB and 88 files, with typebox absent from its graph, while still
rendering tool output through the real built-in renderers.

Also: packages/server's vitest aliases were prefix matches, so a subpath import
resolved onto index.ts/utils/uuid and failed five suites; they are exact now
with explicit subpath rules. And mini-test.sh spawns mini the way pi-test.sh
spawns pi, with --fresh/--stop for the detached session server.
2026-08-26 23:08:57 +02:00
Mario Zechner
5976a2f8b9 docs(agent): audit post-WP05 roadmap 2026-08-26 22:41:05 +02:00
Mario Zechner
5507d76ee8 feat(agent,ai): add narrow subpath exports so clients skip the barrel
A barrel forces Node to evaluate its whole graph: importing reduceLaneSnapshot
(1 file, 6 KB) through pi-agent-core's index evaluated 106 files, and mini's
server loaded 112 files to enumerate JSONL headers. Types are free, so this only
ever affected value imports.

pi-ai gains ./utils/* alongside the existing ./providers/* and ./api/*
wildcards. pi-agent-core gains ./harness/context, ./harness/env/nodejs,
./harness/runtime/reducer and ./harness/session, and ./session/testing becomes
./harness/session/testing so every export mirrors its source path. The barrel
and ./node keep their batteries-included semantics.

The session layer takes uuidv7 from @earendil-works/pi-ai/utils/uuid rather than
the pi-ai barrel, which is what let ./harness/session drop from 42 files to 19.
Two imports there were written `import { type Usage } from` - not a type-only
statement, so it emitted a runtime import of the barrel.

scripts/check-entry-graphs.mjs walks each declared entry's value-import graph and
enforces per-entry budgets and forbidden paths, so a stray `export *` cannot
silently undo this. It caught the two `import { type ... }` regressions above.

Measured with mini: server 112 files and 98 MB to 28 files and 69 MB, presentation
204 files and 125 MB to 99 files and 110 MB. The worker still loads the provider
graph, correctly.
2026-08-26 22:02:31 +02:00
Mario Zechner
89356540fb feat(agent): expose durable lane operations 2026-08-26 21:14:59 +02:00
Mario Zechner
e055b9fca9 feat(coding-agent): address mini lane events to one presentation
Each presentation opens its own harness watch, and the server broadcast every
worker event to every attached presentation, so with N presentations each event
crossed N^2 times and each client discarded the copies that were not its own.

The event frame now carries an optional destination. A presentation mints an id
and passes it to both sessions.attach and lane.watch, so the server learns it at
attach and the worker learns it at watch. The worker addresses that
subscription's events; the server routes them to exactly one presentation
without parsing a payload. Shared events, such as models state, still broadcast.

The client keeps its subscription id check: after a rebase the superseded
subscription is still open until unwatch lands, and its events carry the same
destination.
2026-08-26 20:41:13 +02:00
Mario Zechner
353c990f40 feat(coding-agent): add mini, a three-process coding agent on the durable harness
An experimental client for the new AgentHarness, built to find out what an
RPC-shaped presentation actually needs from it.

Three hosts: presentations (TUI) connect to a server over a unix socket, the
server spawns one worker process per session over stdio pipes and routes
between them. A peer provides named services and forwards names it does not
provide to its next hop, so a TUI reaches server-provided and worker-provided
services through one connection, and a worker reaches server services the same
way.

The worker owns every live object: storage, harness, lane, model runtime. A
presentation holds a replicated LaneSnapshot and nothing else. Each presentation
opens its own lane.watch() in the worker and applies events with the harness's
reduceLaneSnapshot, so no client re-implements snapshot/stream alignment.

The TUI reuses interactive-mode components and holds no live objects.
2026-08-26 20:26:06 +02:00
Mario Zechner
8b69107329 feat(agent): make durable drive total 2026-08-26 19:10:36 +02:00
Armin Ronacher
e86823096c feat(tui): add terminal capability overrides closes #8665 2026-08-26 17:40:36 +02:00
Cristina Poncela Cubeiro
42f7f29ad1 docs(settings): default model and thinking 2026-08-26 16:25:30 +02:00
Mario Zechner
c60dd63fdf feat(agent): simplify durable operation graph 2026-08-26 16:10:53 +02:00
Vegard Stikbakke
b07e17faa2 fix(coding-agent): preserve partial Bash output when toggling thinking
closes #8611
2026-08-26 14:27:21 +02:00
David Brailovsky
0b5ee5d8b3 fix(coding-agent): repair unterminated session files
Append a newline after loading a valid session so subsequent entries cannot fuse with an unterminated tail.\n\nFixes #8345
2026-08-26 12:07:30 +02:00
Vegard Stikbakke
6b36eb5927 fix(coding-agent): remove explicit tool choice from compaction calls
Fixes #8649\n\nFixes #8638
2026-08-26 11:20:44 +02:00
Vegard Stikbakke
7af2d27dce fix(coding-agent): prevent Windows taskkill spawn crashes
closes #6596
2026-08-26 10:33:45 +02:00
Mario Zechner
b37834b695 feat(agent): add durable retry and deferred polling 2026-08-25 18:35:45 +02:00
Cristina Poncela Cubeiro
8fa7eebd23 fix: persist default to scoped if non-empty 2026-08-25 17:49:28 +02:00
Mario Zechner
423e20cb78 feat(agent): separate sessions, branches, and lanes 2026-08-25 16:52:29 +02:00
Armin Ronacher
cbaec01048 feat(coding-agent): add setup-driven facet generations
Replace ad hoc service assembly with atomic local and remote facet generations. Gate service proxy access by lifecycle and move the experimental Session worker and TUI onto facets.
2026-08-25 15:58:25 +02:00
Vegard Stikbakke
a79b373342 feat(coding-agent): expose RPC queue clearing
closes #8432
2026-08-25 15:19:49 +02:00
Cristina Poncela Cubeiro
1bb61986cd docs(coding-agent): update provider links to api 2026-08-25 13:31:42 +02:00
Mario Zechner
240eb29c41 fix(coding-agent): append run-time custom messages after the turn's tool results
Extension messages sent with triggerTurn: false while the agent was
running were pushed into agent state and the session tree immediately,
landing between an assistant tool call and its result. Providers that
validate message order reject the replayed history. Queue them during
the run and append at turn_end, mirroring recordBashResult.

closes #8537
2026-08-25 12:14:10 +02:00
Alexey Zaytsev
de82e53673
feat(coding-agent): export image MIME detector (#8600) 2026-08-25 11:39:16 +02:00
Mario Zechner
5c6655e76e fix(agent): make durable assistant framing burst-safe
Rename the harness runtime2 directory to runtime.
2026-08-25 00:53:08 +02:00
Armin Ronacher
a2208678e9 fix(agent): make service hydration readiness explicit 2026-08-25 00:17:23 +02:00
Armin Ronacher
5cda0ad03f Merge branch 'main' into dev 2026-08-24 14:20:48 +02:00
Armin Ronacher
a789067a0d fix(coding-agent): support bundled experimental processes 2026-08-24 14:17:17 +02:00
Cristina Poncela Cubeiro
dcd461925d
feat: show llama presets if autoload enabled (#8558) 2026-08-24 13:29:51 +02:00
Armin Ronacher
c399e34658 feat: merge main into dev 2026-08-24 13:13:03 +02:00
Vegard Stikbakke
97fa14e39c fix(coding-agent): reject truncated compaction summaries closes #7048 2026-08-24 13:08:30 +02:00