Commit graph

603 commits

Author SHA1 Message Date
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
ca7460d16b feat: build with TypeScript 7 and run sources with plain node
Replace the tsgo native preview with typescript@7.0.2 and port the check scripts to the TS 7 API. Target ES2024, drop useDefineForClassFields: false and unused decorator options, and enable verbatimModuleSyntax. Replace tsx with node plus the source resolver hook, passed to --import as a file URL.

closes #9965
2026-09-25 13:14:33 +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
Mario Zechner
0801601621 feat(durable): move Pico into dedicated package 2026-09-18 13:39:09 +02:00
Christian Klotz
42cd371ba4
feat(coding-agent): add TUI context footer eval (#9705) 2026-09-17 13:21:31 +01:00
Christian Klotz
d7296c063b
feat(coding-agent): isolate documentation lift evals (#9635) 2026-09-15 17:54:18 +01:00
Christian Klotz
f3564a1d41
docs: validate documentation navigation and reachability (#9380)
* feat: use docs manifest for documentation evals

* feat: support nested documentation navigation

* docs(coding-agent): validate documentation reachability

* docs(coding-agent): remove catalog schema version
2026-09-09 17:34:42 +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
David Brailovsky
58ea6c0ba5 Merge remote-tracking branch 'origin/main' into dev 2026-08-29 08:21:44 +00:00
Armin Ronacher
b79e4cc834 Release v0.84.4 2026-08-28 23:56:03 +02:00
Armin Ronacher
c399e34658 feat: merge main into dev 2026-08-24 13:13:03 +02:00
Armin Ronacher
4e58f324fa Release v0.84.3 2026-08-24 12:50:48 +02:00
David Brailovsky
8798b7996d Merge remote-tracking branch 'origin/main' into dev 2026-08-24 07:50:17 +00:00
Armin Ronacher
f8f03460a0 fix: reduce workspace dependency tree 2026-08-23 09:28:19 +02:00
Armin Ronacher
a1f955e9f4 fix(coding-agent): remove redundant development dependencies 2026-08-23 00:24:15 +02:00
Armin Ronacher
7d4c0e05dd
feat(coding-agent): bundle Node runtime (#8474) 2026-08-22 21:19:38 +02:00
Armin Ronacher
8065eeb486 Merge branch 'main' into dev 2026-08-17 23:46:11 +02:00
Armin Ronacher
209bc7b9a8 fix(ai): remove unused opentelemetry dependency 2026-08-17 23:45:51 +02:00
Christian Klotz
497faecc6d
feat(protocol): add Harness wire DTOs 2026-08-16 12:48:59 +03:00
David Brailovsky
09fb0d157e Merge remote-tracking branch 'origin/main' into dev 2026-08-14 10:25:49 +00:00
David Brailovsky
914cf1472e Release v0.84.2 2026-08-14 12:00:00 +02:00
Mario Zechner
6633618350 fix(coding-agent): update vulnerable nanoid dependency 2026-08-14 10:09:35 +02:00
Christian Klotz
e2888c4a93
feat(coding-agent): add local list and attach demo 2026-08-14 00:36:33 +03:00
Christian Klotz
e52de91d08
feat(protocol): add service-addressed session RPC 2026-08-13 18:24:27 +03:00
Mario Zechner
5ac9133655 fix: refresh nanoid to 3.3.17 in root lockfile 2026-08-08 12:10:21 +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
Cristina Poncela Cubeiro
a80008b96c chore: rename storage package to session-backends 2026-08-05 09:28:44 +02:00
Christian Klotz
79cc1ef00a
fix(agent): own SQLite backend tests in storage package (#7626)
* fix(agent): own SQLite backend tests in storage package

* fix(agent): use lexical disposal for SQLite tests
2026-08-04 22:54:15 +03:00
Christian Klotz
05bf9df651
feat: remove legacy server implementation (#7614) 2026-08-04 20:03:37 +03: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