58 Commits
Author SHA1 Message Date
Mario Zechner 7fd478a2e8 feat(agent): remove the experimental harness from pi-agent-core
pi-agent-core now contains only Agent, the agent loop, the proxy stream, and
their types. Removed the harness, sessions and session storage, pico3, harness
tools, compaction, skills, prompt templates, telemetry schemas, search types,
and the uuidv7 and pi-telemetry re-exports, plus the ./node, ./harness/* and
./experimental/pico3 subpath exports. Durable sessions live in
@earendil-works/pi-durable.

Also removed packages/session-backends and the experimental mini and micro
coding-agent frontends, with their scripts and build configuration.
2026-10-01 14:45:01 +02:00
Armin Ronacher 005af57d88 Release v0.99.2 2026-09-30 21:12:28 +02:00
Armin Ronacher d86654abb8 Release v0.99.1 2026-09-29 20:06:55 +02:00
Armin Ronacher 4b060d3a98 Release v0.99.0 2026-09-29 19:04:28 +02:00
Armin Ronacher 8562bcf66a feat(coding-agent): codemode and MCP
This adds codemode and MCP support to pi. Codemode (packages/codemode) runs
model-written JavaScript in a QuickJS wasm VM inside a worker. From there the
script calls pi's tools as async functions, uses a per-session store, and can
read the model catalog and run classifiers. The codemode tool in coding-agent
is compatible with Codex's exec tool, and codemode.mode works like Codex's
tool modes (on or only). Large results are written to a JSON temp file. MCP
(packages/mcp) is a standalone client for stdio and streamable HTTP servers,
with OAuth.

The core only gets general mechanisms; codemode, tool_search and MCP are
built-in extensions that use them. Other extensions can replace these
built-ins. Tools declare an exposure: direct, model-only, codemode, deferred
or hidden. prepareLoadout() lets an orchestrating tool change which tool
declarations the model sees. ctx.executeTool() runs nested calls through
validation and the tool_call/tool_result hooks. Those calls emit events with
parentToolCallId and are recorded as bounded nestedCalls on the parent
result, which compaction and HTML export use. Tools can also return
structuredContent with an outputSchema, and can report errors with isError
instead of throwing. MCP servers come from mcp.json (global, or per project
after the project is trusted) or from pi.registerMcpServer(). They are
managed with /mcp and pi mcp list|login|logout, and their runtimes load on
first use.

Closes #10040
2026-09-29 09:12:50 +02:00
David Brailovsky ab30693d64 fix(ai): upgrade openai SDK to 7.19.0 (#10044)
* fix(ai): upgrade openai SDK to 7.19.0

Adds the "fast" service tier to the SDK types, needed to price
GPT-6 Fast mode requests correctly. Drops the local
prompt_cache_options type, which the SDK now defines.

* fix(coding-agent): check Cloudflare compat request via fetch instead of SDK mock

pi-ai now resolves its own nested openai 7.x while evals keeps 6.x at the
root, so vi.mock("openai") in coding-agent no longer reached pi-ai's client.
Capture the outgoing request with a fake fetch and assert the URL and headers.

* fix(ai): drop any casts for stream_options and max_tokens in openai-completions

stream_options is typed by the SDK, so assign it directly. max_tokens is
deprecated by OpenAI but still needed for OpenAI-compatible providers
that reject max_completion_tokens; use a narrow cast instead of any to
avoid the deprecation warning.
2026-09-25 17:27:12 +02:00
Armin Ronacher f07218c4d4 Release v0.87.1 2026-09-22 21:28:02 +02:00
Armin Ronacher 16787ad5b2 Release v0.87.0 2026-09-21 18:31:52 +02:00
Armin Ronacher 13cbf77df2 Release v0.86.1 2026-09-20 13:04:11 +02:00
Armin Ronacher ecac0a9c4e Release v0.86.0 2026-09-20 01:00:41 +02:00
Armin Ronacher 4a6ed01945 fix(coding-agent): update runtime dependencies (#9341) 2026-09-08 16:04:35 +02:00
Armin Ronacher caf6dfe731 feat(tui): Simplify clipboard handling (#9163)
Replace the external clipboard dependency with small macOS, Windows,
and X11 helpers and integrate them into coding-agent.

Run native clipboard operations on worker threads and make command
fallbacks asynchronous. Preserve incremental X11 transfers, legacy text
encodings, native image formats, and existing Wayland and platform tools.

Include native prebuilds with ARM64 page alignment, packaging updates,
and regression coverage.
2026-09-05 23:52:32 +02:00
Armin Ronacher d981de1229 Release v0.85.1 2026-09-05 13:54:46 +02:00
Armin Ronacher 1382777ed8 fix(coding-agent): keep remote harness dependencies development-only
Separate stable and development entrypoints, exclude remote harness code from distributions, and verify isolated consumer installs before release. Fixes #9132.
2026-09-05 12:45:04 +02:00
Armin Ronacher 107d79f110 Release v0.85.0 2026-09-04 11:57:38 +02:00
Armin Ronacher bf157122af fix(ai): remove unnecessary Chord dependency 2026-09-03 10:21:43 +02:00
David Brailovsky 8c08d0645a Merge remote-tracking branch 'origin/main' into dev 2026-09-03 07:58:51 +00: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
Armin Ronacher 1a7bc80e7c feat: move service wire semantics into Chord
Keep protocol payloads transport-opaque and validate service calls, state snapshots, updates, and errors at Chord boundaries. Ensure successful OpenAI Responses messages remain strict JSON so terminal Transcript updates reach clients.
2026-09-01 00:53:40 +02:00
Armin Ronacher 0252dff886 feat: add bundled facet distribution and reload
Bundle content-addressed Chord facet entries, distribute server-selected presentation artifacts during the handshake, and reload Session and TUI generations through /reload.
2026-08-30 12:52:58 +02:00
Armin Ronacher 34dc9d055a feat: move facet services into Chord
Move service, replicated-state, facet host, and loader ownership into the standalone Chord package. Migrate consumers and leave runtime JSON enforcement to serializers.
2026-08-29 14:55:51 +02:00
Armin Ronacher 28b49a6b3b feat: add Chord runtime foundation 2026-08-29 14:54:19 +02:00
Armin Ronacher b79e4cc834 Release v0.84.4 2026-08-28 23:56:03 +02:00
Armin Ronacher 4e58f324fa Release v0.84.3 2026-08-24 12:50:48 +02:00
Armin Ronacher f8f03460a0 fix: reduce workspace dependency tree 2026-08-23 09:28:19 +02:00
Armin Ronacher 7d4c0e05dd feat(coding-agent): bundle Node runtime (#8474) 2026-08-22 21:19:38 +02:00
Armin Ronacher 209bc7b9a8 fix(ai): remove unused opentelemetry dependency 2026-08-17 23:45:51 +02:00
David Brailovsky 914cf1472e Release v0.84.2 2026-08-14 12:00:00 +02:00
Mario Zechner 9dd90a4971 fix(ai): replace Mistral SDK with native transport 2026-08-08 09:32:49 +02:00
Armin Ronacher e47b8e37a6 feat(ai): use additional_tools for deferred tools
closes #7709
2026-08-07 23:05:23 +02:00
Armin Ronacher 53fa77ccd8 Release v0.84.1 2026-08-07 07:48:13 +02:00
Armin Ronacher a5f43bf8af Release v0.84.0 2026-08-06 12:32:57 +02:00
Mario Zechner 6b461b75b3 feat: extract telemetry package 2026-08-05 23:23:12 +02:00
Alexey Zaytsev 66534fbdc7 feat(coding-agent): render Mermaid diagrams (#7624) 2026-08-05 09:43:24 +02:00
Mario Zechner 221a842c13 fix(coding-agent): update undici to 8.9.0 and brace-expansion to 5.0.9 for npm audit advisories
Resolves GHSA-8xcm-r25x-g524, GHSA-4cwx-7wf7-3272, GHSA-m8rv-5g2x-5cg5,
GHSA-jr45-8vmc-qm54, GHSA-v3r7-h72x-cjcm, and GHSA-rgw5-rvv9-x895.
undici 8.10.0 is blocked by the npm min-release-age gate; 8.9.0 is the
first fixed 8.x release. Reviewed undici 8.6.0-8.9.0 release notes
against http-dispatcher usage; no breaking changes. Adds an AGENTS.md
rule requiring changelog review for future undici updates.
2026-08-04 10:50:54 +02:00
Christian Klotz a3ec51d2a1 feat: add remote session client coordination 2026-08-01 02:05:49 +03:00
Mario Zechner 9786716d4d fix(coding-agent): update vulnerable brace-expansion
closes #7316
2026-07-31 10:36:02 +02:00
Armin Ronacher 845d6ff1f6 Release v0.83.0 2026-07-30 00:24:19 +02:00
Petr Houška f9476a61e5 fix(ai): update TypeBox nullable array validation (#7243)
Bump TypeBox to 1.3.7 so compiled validators guard array-specific keywords when null is accepted, and cover tool-argument validation with a regression test.

Breaking for extensions: TypeBox 1.3 removes deprecated APIs including Type.Base, Type.Awaited, Type.Promise, Type.AsyncIterator, Type.Iterator, Type.Options, and Value.Mutate. Extensions using these through Pi's bundled TypeBox aliases must migrate to supported TypeBox APIs.

Fixes #7003
2026-07-29 10:31:07 +02:00
Armin Ronacher b4f293684b Release v0.82.1 2026-07-25 14:37:11 +02:00
Armin Ronacher 083e616212 Release v0.82.0 2026-07-24 08:00:31 +02:00
Armin Ronacher ec1a87e856 fix(coding-agent): require protobufjs 7.6.5, closes #7005 2026-07-23 23:16:07 +02:00
Mario Zechner 2d0b2294cd feat(agent): merge main into agent-harness-tools 2026-07-22 11:56:35 +02:00
Mario Zechner 20be4b18d4 Release v0.81.1 2026-07-21 18:40:08 +02:00
Mario Zechner 37eb243d26 feat(agent): add AgentHarness execution tools 2026-07-21 17:03:28 +02:00
Mario Zechner 9c480b6ad2 Release v0.81.0 2026-07-21 15:28:05 +02:00
Cristina Poncela Cubeiro 9e7582aa03 feat: sqlite session storage (#6594)
This PR:

- Adds retainedTail to compaction entries in the new agent harness so we don't have to walk up the tree for the 2000 tokens before compaction,
- Changes getPathToRoot to getPathToRootOrCompaction to only load until last compaction, as unnecessary to access all nodes where it is called,
- Adds a SQLite storage backend, in a separate packages/session-backend-sqlite, with a migration system and schemas as per on-site discussions: sessions to match session header messages (except for metadata, which I couldn't understand what it's used for or where it gets written, so I omitted it), session_entries for shared entry types as columns plus payload as a json for what remains, session_sequences to represent the append-only, serialized nature of the jsonl files, branch_entries to attribute nodes to branches (relationship one-to-many), and session_materialized with the session info (see /session in TUI) to act as a "cache" or quick-access for costs, message count, token info, labels, session name, and model-thinking-level config (e.g. for fast resume).
- This is compatible with the new agent harness Session abstraction.
2026-07-21 11:36:31 +02:00
David Brailovsky 31dc078bf8 update brace-expansion version 2026-07-21 06:07:44 +00:00
David Brailovsky 84fb69c958 update npm shrinkwrap 2026-07-20 10:21:58 +00:00
Armin Ronacher 8dc78834cd Release v0.80.10 2026-07-16 23:59:41 +02:00