pi-mono/scripts
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
..
biome feat(ai,coding-agent): unify image and classifier model infrastructure (#9948) 2026-09-23 17:41:19 +02:00
agent-treeshake-smoke-entry.ts fix(agent): restore streamFn extension compatibility 2026-07-21 18:37:07 +02:00
auto-pi.sh fix(coding-agent): support bundled experimental processes 2026-08-24 14:17:17 +02:00
browser-smoke-entry.ts feat(agent): remove pi prefixes from client and server APIs 2026-08-20 10:51:04 +02:00
build-binaries.sh feat(coding-agent): codemode and MCP 2026-09-29 09:12:50 +02:00
build-coding-agent-bundle.mjs feat(coding-agent): codemode and MCP 2026-09-29 09:12:50 +02:00
check-browser-smoke.mjs feat: add durable JSONL storage backend 2026-09-23 01:33:31 +02:00
check-entry-graphs.mjs feat(coding-agent): codemode and MCP 2026-09-29 09:12:50 +02:00
check-lockfile-commit.mjs Release v0.75.5 2026-05-23 11:58:31 +02:00
check-pinned-deps.mjs feat: add Chord runtime foundation 2026-08-29 14:54:19 +02:00
check-runtime-deps.mjs feat: build with TypeScript 7 and run sources with plain node 2026-09-25 13:14:33 +02:00
check-runtime-deps.test.mjs fix(coding-agent): keep remote harness dependencies development-only 2026-09-05 12:45:04 +02:00
check-ts-relative-imports.mjs feat: build with TypeScript 7 and run sources with plain node 2026-09-25 13:14:33 +02:00
coding-agent-consumer.mjs fix(coding-agent): keep remote harness dependencies development-only 2026-09-05 12:45:04 +02:00
coding-agent-consumer.test.mjs fix(coding-agent): keep remote harness dependencies development-only 2026-09-05 12:45:04 +02:00
cost.ts chore: pin dependencies and use native TypeScript 2026-05-20 12:46:17 +02:00
create-source-archive.sh feat(ai,coding-agent): unify image and classifier model infrastructure (#9948) 2026-09-23 17:41:19 +02:00
diff-model-catalog.mjs generate-models: use reasoning options from models.dev (#6928) 2026-07-22 08:33:34 +02:00
durable-browser-smoke-entry.ts feat: add durable JSONL storage backend 2026-09-23 01:33:31 +02:00
edit-tool-stats.mjs fix(coding-agent): built-in tools work like extension tools 2026-03-22 04:20:38 +01:00
generate-coding-agent-install-lock.mjs fix(coding-agent): update runtime dependencies (#9341) 2026-09-08 16:04:35 +02:00
generate-coding-agent-shrinkwrap.mjs fix(coding-agent): update runtime dependencies (#9341) 2026-09-08 16:04:35 +02:00
generate-thinking-capabilities.mjs generate-models: use reasoning options from models.dev (#6928) 2026-07-22 08:33:34 +02:00
local-release.mjs feat(durable): move Pico into dedicated package 2026-09-18 13:39:09 +02:00
model-catalog-protocol.test.ts feat: share model catalog protocol with pi.dev (#9763) 2026-09-23 20:08:05 +02:00
model-catalog-protocol.ts feat: share model catalog protocol with pi.dev (#9763) 2026-09-23 20:08:05 +02:00
package-workspaces.mjs feat(agent): prepare SQLite storage package for publishing 2026-07-21 14:13:14 +02:00
profile-coding-agent-node.mjs feat(coding-agent): bundle Node runtime (#8474) 2026-08-22 21:19:38 +02:00
publish-model-catalog.mjs feat: share model catalog protocol with pi.dev (#9763) 2026-09-23 20:08:05 +02:00
publish-model-catalog.test.mjs feat(ai,coding-agent): unify image and classifier model infrastructure (#9948) 2026-09-23 17:41:19 +02:00
publish-release-announcement.mjs feat(coding-agent): update managed installations in place 2026-08-24 09:34:34 +02:00
publish-release-announcement.test.mjs fix(coding-agent): announce only verified npm releases 2026-08-06 22:39:09 +02:00
publish.mjs fix(coding-agent): announce only verified npm releases 2026-08-06 22:39:09 +02:00
read-tool-stats.mjs feat(scripts): add session context stats 2026-05-07 22:18:19 +02:00
release-notes.mjs fix(coding-agent): fix changelog links 2026-06-08 20:31:20 +02:00
release-packages.mjs fix(coding-agent): announce only verified npm releases 2026-08-06 22:39:09 +02:00
release.mjs fix(coding-agent): keep remote harness dependencies development-only 2026-09-05 12:45:04 +02:00
repro-5893-wsl-bash.mjs fix(coding-agent): run legacy WSL bash commands via stdin 2026-06-19 15:08:25 +02:00
session-context-stats.mjs feat(scripts): add session context stats 2026-05-07 22:18:19 +02:00
session-transcripts.ts chore: pin dependencies and use native TypeScript 2026-05-20 12:46:17 +02:00
stats.ts chore: pin dependencies and use native TypeScript 2026-05-20 12:46:17 +02:00
sync-versions.js fix: drop harness-pi-ai and its legacy registry aliases from evals 2026-07-25 14:36:32 +02:00
sync-versions.test.mjs fix: drop harness-pi-ai and its legacy registry aliases from evals 2026-07-25 14:36:32 +02:00
tool-stats.ts fix(oauth): harden browser launch handling 2026-06-02 23:15:46 +02:00
update-source-imports-to-ts.sh chore(ts): use source import extensions 2026-05-20 00:04:03 +02:00