Commit graph

7333 commits

Author SHA1 Message Date
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
Mario Zechner
35fb116a6a docs(agent): restore subtle harness contracts 2026-08-27 10:54:40 +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
f0bfae2a96 docs(agent): clarify harness alignment corrections 2026-08-27 00:30:54 +02:00
Mario Zechner
2d675d069a docs(agent): condense harness specification 2026-08-27 00:22:46 +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
d09576def8 fix(agent): finalize durable lane replication 2026-08-26 21:51:37 +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
Mario Zechner
3625e5b146 docs(agent): resolve M7 cancellation decisions 2026-08-26 18:06:27 +02:00
Armin Ronacher
e86823096c feat(tui): add terminal capability overrides closes #8665 2026-08-26 17:40:36 +02:00
Mario Zechner
0f0ca0f6b7 feat(agent): make run boundaries atomic 2026-08-26 17:34:56 +02:00
Mario Zechner
c5a35eabbf feat(agent): fuse structural boundary routing 2026-08-26 16:46:39 +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
Cristina Poncela Cubeiro
938109e725 chore: changelog entries
Forgot to add the changelog entries :P
2026-08-26 14:43:57 +02:00
Cristina Poncela Cubeiro
1ac6128e66
fix(tui): make alt screen not segment on - and / (#8676)
* fix(tui): make alt screen not segment on - and /

* cleanup
2026-08-26 14:33:47 +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
Mario Zechner
3a68f018c0 docs(agent): redesign WP05 around lane inbox, result records, and neutral leaves
Withdraw the standalone-compaction promotion design. Add redesign
milestones R1 (lane-owned tagged inbox with mode-respecting drains and
one-commit boundaries), R2 (neutral OperationOutcome plus immutable
pi.result records, drive(id) total for settled ids), and R3 (22 to 14
family-neutral leaves with a closed ResultBoundary datum). Update M7/M8
for drain-and-return abort and continuation as a second ordinary run via
the public empty-prompt accept, add M9 documentation reconciliation, and
gate M10 before final guard removal. Incorporates the independent review
consensus (B1-B7, O1-O8).
2026-08-26 14:09:35 +02:00
Vegard Stikbakke
6c4f360264 fix(tui): chunk large main-screen renders closes #8028 2026-08-26 13:08:48 +02:00
Cristina Poncela Cubeiro
7aab6c26e5
fix(ai): serialize thinking signature once (#8671) 2026-08-26 12:51:09 +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
Cristina Poncela Cubeiro
b37ebb7f22
fix(tui): autocomplete orders nested results (#8669) 2026-08-26 12:03:41 +02:00
Mario Zechner
9b23c65834 feat(agent): add structural drive foundation 2026-08-26 12:00:25 +02:00
Mario Zechner
2470ea4404 fix(tui): let drag select text over the editor
The editor consumed left mouse presses to position the cursor, which made
the alternate screen route the whole gesture to it and never start its
screen-level text selection. Handle the synthesized click event instead so
press/drag/release stay available for selection and copy.
2026-08-26 11:59:50 +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
0e77e57d96 feat(agent): simplify durable runtime procedures 2026-08-26 02:07:57 +02:00
Mario Zechner
417905647c feat(agent): clarify operation continuation semantics 2026-08-26 00:50:09 +02:00
Mario Zechner
df2a3409e8 feat(agent): simplify durable drive runtime 2026-08-26 00:15:08 +02:00
Mario Zechner
eb1185d93e feat(agent): add durable tool execution 2026-08-25 20:13:16 +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
1de96af75f fix(client): update unix transport test to renamed pi.session-directory service id 2026-08-25 16:52:29 +02:00
Mario Zechner
7ddbac2823 fix(ai): keep cloudflare ai gateway workers-ai models when models.dev drops them
models.dev's cloudflare-ai-gateway catalog no longer lists workers-ai/*
entries, which removed every openai-completions model from the generated
gateway catalog and narrowed the inferred provider api union. Derive the
gateway's workers-ai models from the cloudflare-workers-ai catalog and pin
the provider's api generic. Also move the zai glm-5.3 cost assertion, now
that models.dev prices it in the zai API catalog.
2026-08-25 16:52:29 +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
Mario Zechner
e99a01b946 Remove outdated docs 2026-08-25 15:42:07 +02:00
Vegard Stikbakke
a79b373342 feat(coding-agent): expose RPC queue clearing
closes #8432
2026-08-25 15:19:49 +02:00