Commit Graph
100 Commits
Author SHA1 Message Date
Mario Zechner eed5263cdd Merge remote-tracking branch 'origin/main' into HEAD 2026-09-18 12:33:14 +02:00
Mario Zechner cf8d5fac30 feat(agent): add Pico storage foundation 2026-09-18 12:32:00 +02:00
Mario Zechner 2c995acf44 feat(chord): replace delta tracker with operation log 2026-09-17 16:36:37 +02:00
Mario Zechner 7e19507681 feat(coding-agent): add experimental micro agent 2026-09-17 16:33:03 +02:00
Mario Zechner 0e19ac1161 Merge remote-tracking branch 'origin/main' into pico 2026-09-17 16:31:25 +02:00
Mario Zechner 729d5cb74d docs(agent): finalize Pico5 specification set 2026-09-17 14:57:03 +02:00
Mario Zechner 2b04ce27fb docs(agent): refine Pico5 plugin state API 2026-09-17 11:24:54 +02:00
Mario Zechner fde6d778f8 fix(coding-agent): toggle summary entries on click 2026-09-16 18:08:06 +02:00
Mario Zechner 01528e2094 Merge remote-tracking branch 'origin/main' into pico 2026-09-16 17:58:54 +02:00
Mario Zechner b02eef4186 docs(agent): specify Pico5 harness API 2026-09-15 19:27:23 +02:00
Mario Zechner c8e4a5a552 docs(agent): finalize Pico5 architecture and presentation 2026-09-15 17:36:13 +02:00
Mario Zechner ea7f84678c Merge remote-tracking branch 'origin/main' into pico 2026-09-15 17:17:35 +02:00
Mario Zechner 56cd5989ea docs(agent): replace obsolete Pico prototypes with Pico5 design 2026-09-15 11:27:53 +02:00
Mario Zechner 850f83794d Merge remote-tracking branch 'origin/main' into pico 2026-09-14 11:17:49 +02:00
Mario Zechner 46b66c59af feat(agent): add hardened pico3 kernel 2026-09-14 11:17:04 +02:00
Mario Zechner 9b2aff2c5b docs(agent): pico3: forbid AsyncLocalStorage; nested-line detection via Chord context key 2026-09-13 23:02:38 +02:00
Mario Zechner 09b031600d docs(agent): pico3 review decisions: revision, visibility, memos, waiting, reload
- Envelope carries a contiguous per-watch revision; storage Seq stays internal;
  Chord bridge publishes off the line through a bounded ordered adapter
- Namespaces reach the view only through a declared view projection; memos and
  slot working state are never in the view
- memoOnce uses property presence; memos are coordination/evidence, not
  exactly-once; idempotency key before the effect
- Hooks bound to their namespace token; BeforeToolApi.waiting(ctx) is async;
  memo keys are (task, namespace, name)
- Reload: quiescent hold/reload/release, otherwise suspend/reopen; no handler
  withdrawal machinery in v1; Namespace.unregister
- pi.* entry names reject except pi.notice; config reset is an operation;
  generation failures run the final boundary and start successors
2026-09-13 22:49:14 +02:00
Mario Zechner fd3b009d9f docs(agent): add pico3 view/events, plugins and hardening handoff
Canonical pico3 material under packages/agent/docs/pico/v3/:
- hardening-handoff.md: V3 hardening handoff with supersession table
- view-and-events.md: single view document, ops by path, named events,
  commit-by-commit mapping, Codex mapping, watchers and late joiners
- plugins.md: harness registration surface, durable primitives, extension
  points with examples, reload contract, Chord facet layer
- harness-v3.zip: baseline sketch backup (sha256 1c69c5c5...fbe7)
2026-09-13 22:38:07 +02:00
Mario Zechner a9930d2857 docs(agent): correct pico v2 foundation contracts 2026-09-13 04:01:44 +02:00
Mario Zechner 51f3090790 feat(agent): align pico foundation with v2 contract 2026-09-13 04:00:27 +02:00
Mario Zechner 99a3948c4c docs(agent): define pico v2 kernel contract 2026-09-13 02:20:26 +02:00
Mario Zechner df484f2775 feat(agent): add pico memory storage foundation 2026-09-12 22:31:41 +02:00
Mario Zechner 1915b35a9b feat(agent): refine pico core task capabilities 2026-09-12 22:31:16 +02:00
Mario Zechner d11c4b7281 docs(agent): simplify pico scheduling and core task model 2026-09-12 22:31:03 +02:00
Mario Zechner 7a2647f32a docs(agent): define pico state tasks and tool boundaries 2026-09-12 01:20:49 +02:00
Mario Zechner f467cf7068 feat(agent): add pico compile-time foundation 2026-09-12 00:02:58 +02:00
Mario Zechner 4819cc877e docs(agent): add approved pico implementation handoff 2026-09-11 21:49:53 +02:00
Mario Zechner f3c672245d docs(agent): require typed status payloads for pico task writes 2026-09-11 12:57:47 +02:00
Mario Zechner 7b4cfd6eb0 docs(agent): define pico system sections and mutable registries 2026-09-11 11:49:58 +02:00
Mario Zechner e8413008cd fix(ai): update stale DeepSeek Flash test model IDs 2026-09-11 11:49:52 +02:00
Mario Zechner 08dc60bc52 docs(agent): settle pico driver and storage contracts 2026-09-10 16:31:15 +02:00
Mario Zechner 400d6905ce docs(agent): make pico input attribution explicit 2026-09-09 23:29:53 +02:00
Mario Zechner 05c6229813 docs(agent): settle pico task lifecycle 2026-09-09 21:55:37 +02:00
Mario Zechner ce5ec9ca35 docs(agent): persist pico entry projections 2026-09-09 20:40:04 +02:00
Mario Zechner 2188891bf3 docs(agent): resolve pico context and state ordering 2026-09-09 19:03:48 +02:00
Mario Zechner e045ed2f33 docs(agent): add pico design drafts 2026-09-09 19:03:48 +02:00
Mario Zechner 73f3257ddc docs(agent): preserve pico2 spike design for review 2026-09-09 19:03:47 +02:00
Mario Zechner b2602be77c fix(ai): optimize EventStream queue
closes #9055
2026-09-07 22:26:47 +02:00
Mario Zechner 4e69b0c280 feat(ai): preserve Anthropic per-turn thinking effort
Route eligible OpenRouter Claude models through the native Messages API and surface provider thinking-drop diagnostics.
2026-09-02 21:39:29 +02:00
Mario Zechner e26afb63a4 fix(agent): retain settled tools until placement 2026-09-02 17:53:25 +02:00
Mario Zechner 6e8b9c8ea6 Handoff for tool settlemenet 2026-09-02 12:22:26 +02:00
Mario Zechner 7123410467 Merge branch 'main' into dev 2026-09-02 12:21:58 +02:00
Mario Zechner d14d6b2232 fix(agent): finalize bounded shell output integration 2026-09-01 18:16:25 +02:00
Mario Zechner a84a161c75 Merge remote-tracking branch 'origin/dev' into dev 2026-09-01 18:13:48 +02:00
Mario Zechner fbb31a7015 docs(agent): add scoped storage implementation handoff 2026-09-01 18:13:16 +02:00
Mario Zechner 0095bce7db fix(agent): bound shell execution output 2026-09-01 18:12:06 +02:00
Mario Zechner ee398cb6d7 fix(coding-agent): recover mini operations and forward aborts 2026-09-01 18:09:35 +02:00
Mario Zechner c30cda1d43 Merge remote-tracking branch 'origin/dev' into HEAD 2026-09-01 17:32:56 +02:00
Mario Zechner 5009d0608c feat: add deslop prompt 2026-09-01 17:31:40 +02:00
Mario Zechner d24c99f44d feat(tui): add large transcript render benchmark 2026-09-01 02:17:43 +02:00
Mario Zechner 6c3fafbcb9 docs(agent): close delta append API decision 2026-09-01 01:56:23 +02:00
Mario Zechner c02552484c docs(agent): align assistant output handoff with Chord 2026-08-31 04:52:16 +02:00
Mario Zechner 2865393cec docs(chord): clarify delta ownership and array costs 2026-08-31 04:30:01 +02:00
Mario Zechner ef11444b6e fix(agent): align SQLite ownership with session workers 2026-08-31 04:19:32 +02:00
Mario Zechner f98c2850f5 docs(agent): add streaming fork work package 2026-08-31 04:09:40 +02:00
Mario Zechner 8a738e2b76 docs(chord): explain delta stream encoding 2026-08-31 04:00:18 +02:00
Mario Zechner 3de0030abc docs(chord): keep delta guide user-focused 2026-08-31 03:55:29 +02:00
Mario Zechner b99964b246 docs(chord): introduce delta operations upfront 2026-08-31 03:55:12 +02:00
Mario Zechner 9af45be821 feat(chord): generate deltas at flush 2026-08-31 03:53:50 +02:00
Mario Zechner f7079d5628 feat(chord): add JSON delta tracking 2026-08-31 02:04:46 +02:00
Mario Zechner 9e1aa8b445 docs(agent): add mobile design handoff 2026-08-31 02:04:46 +02:00
Mario Zechner 5cf1b95c87 docs(agent): align SQLite ownership with session workers 2026-08-31 00:19:51 +02:00
Mario Zechner 7731f1cfe2 fix(coding-agent): remove obsolete plugin app fixture 2026-08-30 23:36:39 +02:00
Mario Zechner 35fb116a6a docs(agent): restore subtle harness contracts 2026-08-27 10:54:40 +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
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
Mario Zechner c60dd63fdf feat(agent): simplify durable operation graph 2026-08-26 16:10:53 +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
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
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
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
Mario Zechner e99a01b946 Remove outdated docs 2026-08-25 15:42:07 +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
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
Mario Zechner 852142daa0 feat(agent): add explicit session mutations 2026-08-24 23:35:55 +02:00
Mario Zechner 9b034fc45e feat(agent): add durable generation procedures 2026-08-24 21:56:02 +02:00
Mario Zechner 9f666bfbbb feat(agent): add durable terminal mechanics 2026-08-24 20:46:18 +02:00
Mario Zechner 6bb8252099 docs(agent): restore direct tool batch procedure 2026-08-24 20:24:32 +02:00
Mario Zechner 7ccb2a0882 docs(agent): simplify durable drive ownership 2026-08-24 19:49:22 +02:00
Mario Zechner ab3a774c8f fix(agent): preserve legacy upgrade commit stats 2026-08-24 12:40:53 +02:00
Mario Zechner fa35550e95 feat(agent): simplify durable drive ownership 2026-08-24 12:37:48 +02:00
Mario Zechner 41c9795be7 feat(agent): add durable drive foundations 2026-08-24 12:37:48 +02:00