@draht/coding-agent 2026.9.5-1 → 2026.10.4-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +458 -0
- package/dist/bun/cli.d.ts +1 -1
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js +6 -3
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/sandbox-env-setup.d.ts +2 -0
- package/dist/bun/sandbox-env-setup.d.ts.map +1 -0
- package/dist/bun/sandbox-env-setup.js +4 -0
- package/dist/bun/sandbox-env-setup.js.map +1 -0
- package/dist/bundle/chunks/anthropic-messages-E2P6C3P7.js +6 -0
- package/dist/bundle/chunks/anthropic.js +75 -0
- package/dist/bundle/chunks/azure-openai-responses-JZMSTDIM.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +79 -0
- package/dist/bundle/chunks/chunk-2E5VODES.js +2 -0
- package/dist/bundle/chunks/chunk-2FBJKY7F.js +2 -0
- package/dist/bundle/chunks/chunk-2JZLKNZ4.js +3 -0
- package/dist/bundle/chunks/chunk-2N4I6WXC.js +2 -0
- package/dist/bundle/chunks/chunk-3HF756LN.js +1472 -0
- package/dist/bundle/chunks/chunk-5QJFWTKA.js +4 -0
- package/dist/bundle/chunks/chunk-63BK6WK2.js +2 -0
- package/dist/bundle/chunks/chunk-A4OX5CPR.js +146 -0
- package/dist/bundle/chunks/chunk-AFL4IDSI.js +82 -0
- package/dist/bundle/chunks/chunk-D3HO453P.js +42 -0
- package/dist/bundle/chunks/chunk-EBVYI75P.js +2 -0
- package/dist/bundle/chunks/chunk-FBU742QF.js +2 -0
- package/dist/bundle/chunks/chunk-FHX2S5IG.js +31 -0
- package/dist/bundle/chunks/chunk-GBFVS2SF.js +12 -0
- package/dist/bundle/chunks/chunk-GVXA72ZA.js +2 -0
- package/dist/bundle/chunks/chunk-HJ72RANT.js +2 -0
- package/dist/bundle/chunks/chunk-HTJ3L72O.js +2 -0
- package/dist/bundle/chunks/chunk-HZ2UHMBT.js +2 -0
- package/dist/bundle/chunks/chunk-I5OKY6RH.js +11 -0
- package/dist/bundle/chunks/chunk-JTLUBTZT.js +2 -0
- package/dist/bundle/chunks/chunk-KPO5375S.js +2 -0
- package/dist/bundle/chunks/chunk-KY2BG6BC.js +11 -0
- package/dist/bundle/chunks/chunk-LO6CVU2L.js +6 -0
- package/dist/bundle/chunks/chunk-QMN7OD6G.js +2 -0
- package/dist/bundle/chunks/chunk-SDRCE6OP.js +2 -0
- package/dist/bundle/chunks/chunk-SPZUYYP5.js +170 -0
- package/dist/bundle/chunks/chunk-UTRX2VHB.js +44 -0
- package/dist/bundle/chunks/chunk-V5HG6S2T.js +4 -0
- package/dist/bundle/chunks/chunk-VPYAVQLP.js +137 -0
- package/dist/bundle/chunks/chunk-VXUJMEMO.js +2 -0
- package/dist/bundle/chunks/chunk-XBUEMKIY.js +2 -0
- package/dist/bundle/chunks/chunk-XHCO4PPH.js +8 -0
- package/dist/bundle/chunks/chunk-XO3IECI5.js +18 -0
- package/dist/bundle/chunks/chunk-XOGEYN4Q.js +2 -0
- package/dist/bundle/chunks/cli-L74YA5GF.js +51 -0
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-MJKOAE5S.js +2 -0
- package/dist/bundle/chunks/codemode-worker.js +315 -0
- package/dist/bundle/chunks/execute-EMOVNTD6.js +328 -0
- package/dist/bundle/chunks/github-copilot.js +2 -0
- package/dist/bundle/chunks/google-antigravity.js +75 -0
- package/dist/bundle/chunks/google-gemini-cli.js +75 -0
- package/dist/bundle/chunks/google-generative-ai-HPNDIAZD.js +2 -0
- package/dist/bundle/chunks/google-vertex-KPAWJ4SP.js +2 -0
- package/dist/bundle/chunks/https-proxy-agent-WQIRL24U.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +2 -0
- package/dist/bundle/chunks/jiti-loader-RKXLMQV2.js +2 -0
- package/dist/bundle/chunks/kimi-coding.js +2 -0
- package/dist/bundle/chunks/lib-ULKZYRGD.js +9 -0
- package/dist/bundle/chunks/llama-cpp-classify-EJ5XMSQL.js +22 -0
- package/dist/bundle/chunks/meta.js +2 -0
- package/dist/bundle/chunks/mistral-conversations-FMSPWQ7A.js +5 -0
- package/dist/bundle/chunks/multipart-parser-HMCXZ4BD.js +3 -0
- package/dist/bundle/chunks/node-4JNG6XQO.js +16 -0
- package/dist/bundle/chunks/node-6IIDYB3K.js +2 -0
- package/dist/bundle/chunks/openai-chatgpt.js +75 -0
- package/dist/bundle/chunks/openai-codex-responses-TU7NGPXE.js +10 -0
- package/dist/bundle/chunks/openai-codex.js +75 -0
- package/dist/bundle/chunks/openai-completions-GANCQQO5.js +7 -0
- package/dist/bundle/chunks/openai-responses-ASDPAX3E.js +3 -0
- package/dist/bundle/chunks/opencode-go.js +2 -0
- package/dist/bundle/chunks/openrouter-images-NROSQXMZ.js +2 -0
- package/dist/bundle/chunks/openrouter.js +75 -0
- package/dist/bundle/chunks/pi-messages-2QEJYOAO.js +8 -0
- package/dist/bundle/chunks/radius.js +75 -0
- package/dist/bundle/chunks/runtime-RYUR6LRB.js +2 -0
- package/dist/bundle/chunks/settings-manager-CHEMMAGQ.js +2 -0
- package/dist/bundle/chunks/src-KDGO7EGF.js +4 -0
- package/dist/bundle/chunks/typesafe-system-one-YBEEY5XU.js +2 -0
- package/dist/bundle/chunks/virtual-modules-OC56AAJ7.js +2 -0
- package/dist/bundle/chunks/xai.js +75 -0
- package/dist/bundle/cli-runtime.js +3 -0
- package/dist/bundle/cli.js +5 -0
- package/dist/bundle/index.js +2 -0
- package/dist/bundle/rpc-entry.js +3 -0
- package/dist/cli/args.d.ts +4 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +72 -21
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-check.d.ts +19 -0
- package/dist/cli/auth-check.d.ts.map +1 -0
- package/dist/cli/auth-check.js +50 -0
- package/dist/cli/auth-check.js.map +1 -0
- package/dist/cli/auth-command.d.ts +24 -0
- package/dist/cli/auth-command.d.ts.map +1 -0
- package/dist/cli/auth-command.js +103 -0
- package/dist/cli/auth-command.js.map +1 -0
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +3 -2
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/credential-print.d.ts +5 -3
- package/dist/cli/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js +42 -30
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/cli/file-processor.d.ts +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js +2 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/list-models.d.ts +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +2 -2
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.d.ts +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/setup.d.ts +2 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +12 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/startup-ui.d.ts +2 -2
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +42 -33
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.js +3 -12
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +20 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +42 -6
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +12 -3
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +1 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +14 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +237 -39
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +1386 -565
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +20 -8
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +199 -56
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bug-report-upload.d.ts +11 -0
- package/dist/core/bug-report-upload.d.ts.map +1 -0
- package/dist/core/bug-report-upload.js +20 -0
- package/dist/core/bug-report-upload.js.map +1 -0
- package/dist/core/bug-report.d.ts +176 -0
- package/dist/core/bug-report.d.ts.map +1 -0
- package/dist/core/bug-report.js +292 -0
- package/dist/core/bug-report.js.map +1 -0
- package/dist/core/builtins/duet.js +2 -2
- package/dist/core/builtins/duet.js.map +1 -1
- package/dist/core/cache-stats.d.ts.map +1 -1
- package/dist/core/cache-stats.js +12 -1
- package/dist/core/cache-stats.js.map +1 -1
- package/dist/core/cache-warmer.d.ts +103 -0
- package/dist/core/cache-warmer.d.ts.map +1 -0
- package/dist/core/cache-warmer.js +356 -0
- package/dist/core/cache-warmer.js.map +1 -0
- package/dist/core/checkpoints/checkpoint-manager.d.ts +8 -4
- package/dist/core/checkpoints/checkpoint-manager.d.ts.map +1 -1
- package/dist/core/checkpoints/checkpoint-manager.js +46 -10
- package/dist/core/checkpoints/checkpoint-manager.js.map +1 -1
- package/dist/core/checkpoints/rewind.d.ts +4 -2
- package/dist/core/checkpoints/rewind.d.ts.map +1 -1
- package/dist/core/checkpoints/rewind.js +4 -3
- package/dist/core/checkpoints/rewind.js.map +1 -1
- package/dist/core/compaction/branch-summarization.js +2 -2
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +9 -6
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +196 -118
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +2 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +25 -18
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/context-windows.d.ts.map +1 -1
- package/dist/core/context-windows.js +13 -3
- package/dist/core/context-windows.js.map +1 -1
- package/dist/core/crash-log.d.ts +27 -0
- package/dist/core/crash-log.d.ts.map +1 -0
- package/dist/core/crash-log.js +140 -0
- package/dist/core/crash-log.js.map +1 -0
- package/dist/core/defaults.d.ts +1 -0
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/defaults.js +9 -0
- package/dist/core/defaults.js.map +1 -1
- package/dist/core/experimental.js +1 -1
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/export-html/template.css +10 -0
- package/dist/core/export-html/template.js +72 -18
- package/dist/core/extensions/index.d.ts +2 -2
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/jiti-loader.d.ts +2 -0
- package/dist/core/extensions/jiti-loader.d.ts.map +1 -0
- package/dist/core/extensions/jiti-loader.js +5 -0
- package/dist/core/extensions/jiti-loader.js.map +1 -0
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +228 -89
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +47 -8
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +376 -104
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +521 -88
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js +3 -0
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts +3 -0
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -0
- package/dist/core/extensions/virtual-modules.js +37 -0
- package/dist/core/extensions/virtual-modules.js.map +1 -0
- package/dist/core/extensions/wrapper.d.ts +2 -2
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js +3 -22
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +1 -1
- package/dist/core/footer-data-provider.js +19 -18
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/keybindings.d.ts +83 -13
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +33 -7
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +119 -0
- package/dist/core/mcp-servers.d.ts.map +1 -0
- package/dist/core/mcp-servers.js +191 -0
- package/dist/core/mcp-servers.js.map +1 -0
- package/dist/core/messages.d.ts +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +1 -0
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-config.d.ts +202 -20
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +53 -18
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-registry.d.ts +19 -2
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +39 -2
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +7 -5
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +29 -17
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +79 -20
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +460 -134
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/models-store.d.ts +12 -7
- package/dist/core/models-store.d.ts.map +1 -1
- package/dist/core/models-store.js +87 -18
- package/dist/core/models-store.js.map +1 -1
- package/dist/core/multi-agent/fsm.js +8 -3
- package/dist/core/multi-agent/fsm.js.map +1 -1
- package/dist/core/multi-agent/mailbox.js +1 -3
- package/dist/core/multi-agent/mailbox.js.map +1 -1
- package/dist/core/multi-agent/permission-gate.d.ts +5 -2
- package/dist/core/multi-agent/permission-gate.d.ts.map +1 -1
- package/dist/core/multi-agent/permission-gate.js +597 -34
- package/dist/core/multi-agent/permission-gate.js.map +1 -1
- package/dist/core/multi-agent/task-board.js +2 -4
- package/dist/core/multi-agent/task-board.js.map +1 -1
- package/dist/core/multi-agent/worktree.js +1 -3
- package/dist/core/multi-agent/worktree.js.map +1 -1
- package/dist/core/nested-tool-calls.d.ts +102 -0
- package/dist/core/nested-tool-calls.d.ts.map +1 -0
- package/dist/core/nested-tool-calls.js +178 -0
- package/dist/core/nested-tool-calls.js.map +1 -0
- package/dist/core/package-manager.d.ts +10 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +149 -33
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-manifest.d.ts.map +1 -1
- package/dist/core/pi-manifest.js +13 -12
- package/dist/core/pi-manifest.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +6 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +63 -37
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-attribution.js +5 -5
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/provider-composer.d.ts +44 -20
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +151 -51
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/radius.d.ts +13 -0
- package/dist/core/radius.d.ts.map +1 -1
- package/dist/core/radius.js +19 -0
- package/dist/core/radius.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +10 -3
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +105 -81
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts +7 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +219 -42
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts +5 -5
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/runtime-credentials.js +13 -9
- package/dist/core/runtime-credentials.js.map +1 -1
- package/dist/core/sandbox/executor.js +1 -0
- package/dist/core/sandbox/executor.js.map +1 -1
- package/dist/core/sdk.d.ts +7 -5
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +100 -52
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-cwd.js +1 -0
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/session-export.d.ts +8 -0
- package/dist/core/session-export.d.ts.map +1 -0
- package/dist/core/session-export.js +33 -0
- package/dist/core/session-export.js.map +1 -0
- package/dist/core/session-manager.d.ts +75 -15
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +314 -144
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-diagnostics.d.ts +9 -0
- package/dist/core/settings-diagnostics.d.ts.map +1 -0
- package/dist/core/settings-diagnostics.js +21 -0
- package/dist/core/settings-diagnostics.js.map +1 -0
- package/dist/core/settings-manager.d.ts +84 -4
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +239 -25
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +51 -33
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +3 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/soak/soak-log.js +6 -0
- package/dist/core/soak/soak-log.js.map +1 -1
- package/dist/core/socket-server/socket-server.js +11 -0
- package/dist/core/socket-server/socket-server.js.map +1 -1
- package/dist/core/socket-server/types.d.ts +2 -1
- package/dist/core/socket-server/types.d.ts.map +1 -1
- package/dist/core/socket-server/types.js.map +1 -1
- package/dist/core/source-info.d.ts +8 -0
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js +16 -0
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts +49 -6
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +126 -89
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +32 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +82 -143
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts +0 -5
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +2 -5
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts +5 -12
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +19 -171
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +4 -0
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +11 -58
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +4 -0
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +10 -62
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +4 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +18 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts +4 -0
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +9 -50
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +11 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +54 -12
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/powershell.d.ts +16 -0
- package/dist/core/tools/powershell.d.ts.map +1 -0
- package/dist/core/tools/powershell.js +39 -0
- package/dist/core/tools/powershell.js.map +1 -0
- package/dist/core/tools/read.d.ts +8 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +16 -123
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +6 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +26 -0
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts +12 -0
- package/dist/core/tools/renderers/bash.d.ts.map +1 -0
- package/dist/core/tools/renderers/bash.js +117 -0
- package/dist/core/tools/renderers/bash.js.map +1 -0
- package/dist/core/tools/renderers/edit.d.ts +23 -0
- package/dist/core/tools/renderers/edit.d.ts.map +1 -0
- package/dist/core/tools/renderers/edit.js +167 -0
- package/dist/core/tools/renderers/edit.js.map +1 -0
- package/dist/core/tools/renderers/find.d.ts +10 -0
- package/dist/core/tools/renderers/find.d.ts.map +1 -0
- package/dist/core/tools/renderers/find.js +64 -0
- package/dist/core/tools/renderers/find.js.map +1 -0
- package/dist/core/tools/renderers/grep.d.ts +10 -0
- package/dist/core/tools/renderers/grep.d.ts.map +1 -0
- package/dist/core/tools/renderers/grep.js +69 -0
- package/dist/core/tools/renderers/grep.js.map +1 -0
- package/dist/core/tools/renderers/index.d.ts +28 -0
- package/dist/core/tools/renderers/index.d.ts.map +1 -0
- package/dist/core/tools/renderers/index.js +47 -0
- package/dist/core/tools/renderers/index.js.map +1 -0
- package/dist/core/tools/renderers/ls.d.ts +10 -0
- package/dist/core/tools/renderers/ls.d.ts.map +1 -0
- package/dist/core/tools/renderers/ls.js +58 -0
- package/dist/core/tools/renderers/ls.js.map +1 -0
- package/dist/core/tools/renderers/read.d.ts +11 -0
- package/dist/core/tools/renderers/read.d.ts.map +1 -0
- package/dist/core/tools/renderers/read.js +130 -0
- package/dist/core/tools/renderers/read.js.map +1 -0
- package/dist/core/tools/renderers/write.d.ts +10 -0
- package/dist/core/tools/renderers/write.d.ts.map +1 -0
- package/dist/core/tools/renderers/write.js +153 -0
- package/dist/core/tools/renderers/write.js.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts +5 -3
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js +3 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts +14 -0
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +29 -0
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write.d.ts +4 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +12 -147
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +4 -1
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/usage-totals.d.ts +3 -1
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +28 -1
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/core/virtual-models.d.ts +117 -0
- package/dist/core/virtual-models.d.ts.map +1 -0
- package/dist/core/virtual-models.js +124 -0
- package/dist/core/virtual-models.js.map +1 -0
- package/dist/experimental/micro/api.d.ts +81 -0
- package/dist/experimental/micro/api.d.ts.map +1 -0
- package/dist/experimental/micro/api.js +2 -0
- package/dist/experimental/micro/api.js.map +1 -0
- package/dist/experimental/micro/main.d.ts +3 -0
- package/dist/experimental/micro/main.d.ts.map +1 -0
- package/dist/experimental/micro/main.js +21 -0
- package/dist/experimental/micro/main.js.map +1 -0
- package/dist/experimental/micro/models.d.ts +11 -0
- package/dist/experimental/micro/models.d.ts.map +1 -0
- package/dist/experimental/micro/models.js +95 -0
- package/dist/experimental/micro/models.js.map +1 -0
- package/dist/experimental/micro/runtime.d.ts +12 -0
- package/dist/experimental/micro/runtime.d.ts.map +1 -0
- package/dist/experimental/micro/runtime.js +465 -0
- package/dist/experimental/micro/runtime.js.map +1 -0
- package/dist/experimental/micro/sessions.d.ts +10 -0
- package/dist/experimental/micro/sessions.d.ts.map +1 -0
- package/dist/experimental/micro/sessions.js +41 -0
- package/dist/experimental/micro/sessions.js.map +1 -0
- package/dist/experimental/micro/tools.d.ts +10 -0
- package/dist/experimental/micro/tools.d.ts.map +1 -0
- package/dist/experimental/micro/tools.js +96 -0
- package/dist/experimental/micro/tools.js.map +1 -0
- package/dist/experimental/micro/tui.d.ts +3 -0
- package/dist/experimental/micro/tui.d.ts.map +1 -0
- package/dist/experimental/micro/tui.js +510 -0
- package/dist/experimental/micro/tui.js.map +1 -0
- package/dist/experimental/mini/main.d.ts +7 -0
- package/dist/experimental/mini/main.d.ts.map +1 -0
- package/dist/experimental/mini/main.js +21 -0
- package/dist/experimental/mini/main.js.map +1 -0
- package/dist/experimental/mini/server/entry.d.ts +3 -0
- package/dist/experimental/mini/server/entry.d.ts.map +1 -0
- package/dist/experimental/mini/server/entry.js +11 -0
- package/dist/experimental/mini/server/entry.js.map +1 -0
- package/dist/experimental/mini/server/run.d.ts +13 -0
- package/dist/experimental/mini/server/run.d.ts.map +1 -0
- package/dist/experimental/mini/server/run.js +150 -0
- package/dist/experimental/mini/server/run.js.map +1 -0
- package/dist/experimental/mini/shared/protocol.d.ts +127 -0
- package/dist/experimental/mini/shared/protocol.d.ts.map +1 -0
- package/dist/experimental/mini/shared/protocol.js +13 -0
- package/dist/experimental/mini/shared/protocol.js.map +1 -0
- package/dist/experimental/mini/shared/rpc.d.ts +49 -0
- package/dist/experimental/mini/shared/rpc.d.ts.map +1 -0
- package/dist/experimental/mini/shared/rpc.js +171 -0
- package/dist/experimental/mini/shared/rpc.js.map +1 -0
- package/dist/experimental/mini/shared/transport.d.ts +35 -0
- package/dist/experimental/mini/shared/transport.d.ts.map +1 -0
- package/dist/experimental/mini/shared/transport.js +94 -0
- package/dist/experimental/mini/shared/transport.js.map +1 -0
- package/dist/experimental/mini/tui/run.d.ts +9 -0
- package/dist/experimental/mini/tui/run.d.ts.map +1 -0
- package/dist/experimental/mini/tui/run.js +62 -0
- package/dist/experimental/mini/tui/run.js.map +1 -0
- package/dist/experimental/mini/tui/session.d.ts +26 -0
- package/dist/experimental/mini/tui/session.d.ts.map +1 -0
- package/dist/experimental/mini/tui/session.js +94 -0
- package/dist/experimental/mini/tui/session.js.map +1 -0
- package/dist/experimental/mini/tui/view.d.ts +10 -0
- package/dist/experimental/mini/tui/view.d.ts.map +1 -0
- package/dist/experimental/mini/tui/view.js +461 -0
- package/dist/experimental/mini/tui/view.js.map +1 -0
- package/dist/experimental/mini/worker/entry.d.ts +3 -0
- package/dist/experimental/mini/worker/entry.d.ts.map +1 -0
- package/dist/experimental/mini/worker/entry.js +10 -0
- package/dist/experimental/mini/worker/entry.js.map +1 -0
- package/dist/experimental/mini/worker/lane-service.d.ts +44 -0
- package/dist/experimental/mini/worker/lane-service.d.ts.map +1 -0
- package/dist/experimental/mini/worker/lane-service.js +97 -0
- package/dist/experimental/mini/worker/lane-service.js.map +1 -0
- package/dist/experimental/mini/worker/models-service.d.ts +19 -0
- package/dist/experimental/mini/worker/models-service.d.ts.map +1 -0
- package/dist/experimental/mini/worker/models-service.js +136 -0
- package/dist/experimental/mini/worker/models-service.js.map +1 -0
- package/dist/experimental/mini/worker/run.d.ts +14 -0
- package/dist/experimental/mini/worker/run.d.ts.map +1 -0
- package/dist/experimental/mini/worker/run.js +88 -0
- package/dist/experimental/mini/worker/run.js.map +1 -0
- package/dist/extensions/codemode/execute.d.ts +16 -0
- package/dist/extensions/codemode/execute.d.ts.map +1 -0
- package/dist/extensions/codemode/execute.js +429 -0
- package/dist/extensions/codemode/execute.js.map +1 -0
- package/dist/extensions/codemode/execute.lazy.d.ts +3 -0
- package/dist/extensions/codemode/execute.lazy.d.ts.map +1 -0
- package/dist/extensions/codemode/execute.lazy.js +3 -0
- package/dist/extensions/codemode/execute.lazy.js.map +1 -0
- package/dist/extensions/codemode/index.d.ts +21 -0
- package/dist/extensions/codemode/index.d.ts.map +1 -0
- package/dist/extensions/codemode/index.js +31 -0
- package/dist/extensions/codemode/index.js.map +1 -0
- package/dist/extensions/codemode/renderer.d.ts +12 -0
- package/dist/extensions/codemode/renderer.d.ts.map +1 -0
- package/dist/extensions/codemode/renderer.js +137 -0
- package/dist/extensions/codemode/renderer.js.map +1 -0
- package/dist/extensions/codemode/tool.d.ts +123 -0
- package/dist/extensions/codemode/tool.d.ts.map +1 -0
- package/dist/extensions/codemode/tool.js +315 -0
- package/dist/extensions/codemode/tool.js.map +1 -0
- package/dist/extensions/codemode/worker.d.ts +7 -0
- package/dist/extensions/codemode/worker.d.ts.map +1 -0
- package/dist/extensions/codemode/worker.js +7 -0
- package/dist/extensions/codemode/worker.js.map +1 -0
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +9 -1
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/llama/client.d.ts +8 -0
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +13 -0
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/llama/huggingface.js +2 -0
- package/dist/extensions/llama/huggingface.js.map +1 -1
- package/dist/extensions/llama/index.d.ts.map +1 -1
- package/dist/extensions/llama/index.js +13 -2
- package/dist/extensions/llama/index.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts +4 -2
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +119 -17
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/llama/ui.js +28 -12
- package/dist/extensions/llama/ui.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts +21 -0
- package/dist/extensions/mcp/cli.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.js +500 -0
- package/dist/extensions/mcp/cli.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.d.ts +3 -0
- package/dist/extensions/mcp/cli.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.lazy.js +3 -0
- package/dist/extensions/mcp/cli.lazy.js.map +1 -0
- package/dist/extensions/mcp/config.d.ts +72 -0
- package/dist/extensions/mcp/config.d.ts.map +1 -0
- package/dist/extensions/mcp/config.js +158 -0
- package/dist/extensions/mcp/config.js.map +1 -0
- package/dist/extensions/mcp/index.d.ts +76 -0
- package/dist/extensions/mcp/index.d.ts.map +1 -0
- package/dist/extensions/mcp/index.js +1055 -0
- package/dist/extensions/mcp/index.js.map +1 -0
- package/dist/extensions/mcp/log.d.ts +16 -0
- package/dist/extensions/mcp/log.d.ts.map +1 -0
- package/dist/extensions/mcp/log.js +66 -0
- package/dist/extensions/mcp/log.js.map +1 -0
- package/dist/extensions/mcp/oauth.d.ts +96 -0
- package/dist/extensions/mcp/oauth.d.ts.map +1 -0
- package/dist/extensions/mcp/oauth.js +333 -0
- package/dist/extensions/mcp/oauth.js.map +1 -0
- package/dist/extensions/mcp/resources.d.ts +43 -0
- package/dist/extensions/mcp/resources.d.ts.map +1 -0
- package/dist/extensions/mcp/resources.js +262 -0
- package/dist/extensions/mcp/resources.js.map +1 -0
- package/dist/extensions/mcp/runtime.d.ts +98 -0
- package/dist/extensions/mcp/runtime.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.js +394 -0
- package/dist/extensions/mcp/runtime.js.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts +3 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.js +3 -0
- package/dist/extensions/mcp/runtime.lazy.js.map +1 -0
- package/dist/extensions/mcp/tools.d.ts +84 -0
- package/dist/extensions/mcp/tools.d.ts.map +1 -0
- package/dist/extensions/mcp/tools.js +251 -0
- package/dist/extensions/mcp/tools.js.map +1 -0
- package/dist/extensions/mcp/ui.d.ts +60 -0
- package/dist/extensions/mcp/ui.d.ts.map +1 -0
- package/dist/extensions/mcp/ui.js +174 -0
- package/dist/extensions/mcp/ui.js.map +1 -0
- package/dist/extensions/stub-provider/provider.d.ts +2 -2
- package/dist/extensions/stub-provider/provider.d.ts.map +1 -1
- package/dist/extensions/stub-provider/provider.js +2 -1
- package/dist/extensions/stub-provider/provider.js.map +1 -1
- package/dist/extensions/tool-search/index.d.ts +12 -0
- package/dist/extensions/tool-search/index.d.ts.map +1 -0
- package/dist/extensions/tool-search/index.js +15 -0
- package/dist/extensions/tool-search/index.js.map +1 -0
- package/dist/extensions/tool-search/tool.d.ts +73 -0
- package/dist/extensions/tool-search/tool.d.ts.map +1 -0
- package/dist/extensions/tool-search/tool.js +189 -0
- package/dist/extensions/tool-search/tool.js.map +1 -0
- package/dist/index.d.ts +20 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +4 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +123 -51
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts +1 -1
- package/dist/migrations.js +7 -6
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts +1 -0
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/bug-report.d.ts +19 -0
- package/dist/modes/interactive/bug-report.d.ts.map +1 -0
- package/dist/modes/interactive/bug-report.js +211 -0
- package/dist/modes/interactive/bug-report.js.map +1 -0
- package/dist/modes/interactive/chat-viewport.d.ts +20 -0
- package/dist/modes/interactive/chat-viewport.d.ts.map +1 -0
- package/dist/modes/interactive/chat-viewport.js +28 -0
- package/dist/modes/interactive/chat-viewport.js.map +1 -0
- package/dist/modes/interactive/components/armin.js +10 -6
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +6 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +38 -15
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +9 -4
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +3 -0
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +15 -6
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +15 -6
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +35 -8
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js +5 -0
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +10 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +54 -2
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +4 -1
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +7 -1
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js +8 -6
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +1 -0
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +4 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +14 -3
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts +2 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +14 -2
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +1 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +16 -1
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +4 -4
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js +12 -4
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +7 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +51 -6
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +9 -3
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.js +19 -0
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
- package/dist/modes/interactive/components/mermaid.d.ts +11 -0
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
- package/dist/modes/interactive/components/mermaid.js +75 -0
- package/dist/modes/interactive/components/mermaid.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +10 -4
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +101 -40
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +11 -3
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +4 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +60 -32
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +5 -5
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +128 -78
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +23 -4
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +230 -67
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.js +165 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.js +1 -0
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +14 -5
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +3 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +12 -3
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +2 -0
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts +17 -0
- package/dist/modes/interactive/components/themed-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/themed-text.js +29 -0
- package/dist/modes/interactive/components/themed-text.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +15 -3
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +76 -18
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +21 -4
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +78 -52
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +44 -18
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +8 -2
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +6 -3
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +3 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +12 -2
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +27 -3
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js +39 -6
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +2 -1
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +69 -5
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1314 -593
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.js +34 -0
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/modes/interactive/session-share.d.ts +23 -0
- package/dist/modes/interactive/session-share.d.ts.map +1 -0
- package/dist/modes/interactive/session-share.js +130 -0
- package/dist/modes/interactive/session-share.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +54 -63
- package/dist/modes/interactive/theme/light.json +52 -60
- package/dist/modes/interactive/theme/system-theme.d.ts +54 -0
- package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/system-theme.js +535 -0
- package/dist/modes/interactive/theme/system-theme.js.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +59 -7
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +164 -51
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-json.d.ts +85 -0
- package/dist/modes/interactive/theme/theme-json.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-json.js +132 -0
- package/dist/modes/interactive/theme/theme-json.js.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.json +24 -3
- package/dist/modes/interactive/theme/theme.d.ts +80 -42
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +274 -417
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/tui-renderer.d.ts +22 -0
- package/dist/modes/interactive/tui-renderer.d.ts.map +1 -0
- package/dist/modes/interactive/tui-renderer.js +67 -0
- package/dist/modes/interactive/tui-renderer.js.map +1 -0
- package/dist/modes/json-event.d.ts +34 -0
- package/dist/modes/json-event.d.ts.map +1 -0
- package/dist/modes/json-event.js +29 -0
- package/dist/modes/json-event.js.map +1 -0
- package/dist/modes/print-mode.d.ts +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +12 -2
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +17 -9
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +27 -15
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +14 -12
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +22 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts +1 -0
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +217 -63
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/prompts/commands/plan-phase.md +1 -0
- package/dist/prompts/commands/review.md +2 -0
- package/dist/prompts/commands/verify-work.md +1 -0
- package/dist/prompts/commands/why.md +4 -0
- package/dist/rpc-entry.js +1 -0
- package/dist/rpc-entry.js.map +1 -1
- package/dist/skills/blast-radius/SKILL.md +1 -0
- package/dist/skills/explainers/SKILL.md +65 -0
- package/dist/skills/unslop/SKILL.md +19 -1
- package/dist/utils/abort.d.ts +5 -0
- package/dist/utils/abort.d.ts.map +1 -0
- package/dist/utils/abort.js +48 -0
- package/dist/utils/abort.js.map +1 -0
- package/dist/utils/changelog.js +1 -1
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/child-process.d.ts +1 -1
- package/dist/utils/child-process.js +1 -1
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-command.d.ts +7 -0
- package/dist/utils/clipboard-command.d.ts.map +1 -0
- package/dist/utils/clipboard-command.js +45 -0
- package/dist/utils/clipboard-command.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +60 -91
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +116 -121
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/draht-user-agent.d.ts +2 -0
- package/dist/utils/draht-user-agent.d.ts.map +1 -0
- package/dist/utils/draht-user-agent.js +5 -0
- package/dist/utils/draht-user-agent.js.map +1 -0
- package/dist/utils/exif-orientation.d.ts +2 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +2 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/management-http.d.ts +25 -0
- package/dist/utils/management-http.d.ts.map +1 -0
- package/dist/utils/management-http.js +54 -0
- package/dist/utils/management-http.js.map +1 -0
- package/dist/utils/mime.js +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/paths.d.ts +4 -3
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +15 -4
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.d.ts +2 -1
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/shell.d.ts +4 -3
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +20 -35
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +1 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +62 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/text.d.ts +8 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +9 -0
- package/dist/utils/text.js.map +1 -0
- package/dist/utils/tool-result-images.d.ts +21 -0
- package/dist/utils/tool-result-images.d.ts.map +1 -0
- package/dist/utils/tool-result-images.js +48 -0
- package/dist/utils/tool-result-images.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +11 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +53 -36
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts +4 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +30 -9
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/wsl.d.ts +3 -0
- package/dist/utils/wsl.d.ts.map +1 -0
- package/dist/utils/wsl.js +15 -0
- package/dist/utils/wsl.js.map +1 -0
- package/dist/utils/zip.d.ts +7 -0
- package/dist/utils/zip.d.ts.map +1 -0
- package/dist/utils/zip.js +60 -0
- package/dist/utils/zip.js.map +1 -0
- package/docs/cli-integration.md +106 -0
- package/docs/cli.md +374 -0
- package/docs/compaction.md +91 -29
- package/docs/configuration.md +47 -0
- package/docs/containerization.md +100 -66
- package/docs/custom-provider.md +109 -707
- package/docs/docs.json +155 -99
- package/docs/environment-variables.md +30 -17
- package/docs/extensions.md +169 -2811
- package/docs/how-pi-works.md +53 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/index.md +25 -69
- package/docs/json.md +197 -56
- package/docs/keybindings.md +89 -93
- package/docs/llama-cpp.md +18 -3
- package/docs/mcp.md +231 -0
- package/docs/message-types.md +261 -0
- package/docs/models.md +94 -478
- package/docs/packages.md +67 -163
- package/docs/prompt-templates.md +31 -68
- package/docs/providers.md +118 -215
- package/docs/quickstart.md +55 -108
- package/docs/rpc-commands.md +860 -0
- package/docs/rpc-extension-ui.md +200 -0
- package/docs/rpc.md +139 -1518
- package/docs/sdk.md +79 -1127
- package/docs/security.md +76 -32
- package/docs/session-format.md +73 -219
- package/docs/sessions.md +36 -116
- package/docs/settings.md +124 -257
- package/docs/shell-aliases.md +85 -5
- package/docs/skills.md +52 -189
- package/docs/slash-commands.md +61 -0
- package/docs/terminal-setup.md +132 -61
- package/docs/termux.md +74 -84
- package/docs/themes.md +91 -252
- package/docs/tmux.md +31 -39
- package/docs/tui.md +74 -891
- package/docs/usage.md +54 -255
- package/docs/virtual-models.md +114 -0
- package/docs/windows.md +57 -7
- package/examples/extensions/antigravity-image-gen.ts +9 -9
- package/examples/extensions/bash-spawn-hook.ts +1 -1
- package/examples/extensions/border-status-editor.ts +1 -1
- package/examples/extensions/built-in-tool-renderer.ts +16 -40
- package/examples/extensions/custom-compaction.ts +1 -16
- package/examples/extensions/custom-provider-anthropic/index.ts +20 -13
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +4 -3
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +5 -5
- package/examples/extensions/debug-provider.ts +90 -0
- package/examples/extensions/doom-overlay/wad-finder.ts +7 -3
- package/examples/extensions/dynamic-resources/dynamic.json +3 -1
- package/examples/extensions/git-checkpoint.ts +2 -2
- package/examples/extensions/handoff.ts +2 -11
- package/examples/extensions/jev-router.ts +113 -0
- package/examples/extensions/minimal-mode.ts +24 -96
- package/examples/extensions/notify.ts +3 -1
- package/examples/extensions/prompt-customizer.ts +19 -67
- package/examples/extensions/qna.ts +3 -7
- package/examples/extensions/subagent/agents.ts +40 -9
- package/examples/extensions/subagent/index.ts +27 -4
- package/examples/extensions/summarize.ts +7 -18
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/rpc-client.ts +35 -0
- package/examples/rpc-extension-ui.ts +38 -9
- package/examples/sdk/02-custom-model.ts +1 -2
- package/examples/sdk/06-extensions.ts +1 -1
- package/examples/sdk/09-api-keys-and-oauth.ts +1 -1
- package/examples/sdk/12-full-control.ts +1 -1
- package/examples/sdk/14-codemode-mcp.ts +61 -0
- package/package.json +25 -30
- package/prompts/commands/plan-phase.md +1 -0
- package/prompts/commands/review.md +2 -0
- package/prompts/commands/verify-work.md +1 -0
- package/prompts/commands/why.md +4 -0
- package/skills/blast-radius/SKILL.md +1 -0
- package/skills/explainers/SKILL.md +65 -0
- package/skills/unslop/SKILL.md +19 -1
- package/dist/utils/clipboard-native.d.ts +0 -11
- package/dist/utils/clipboard-native.d.ts.map +0 -1
- package/dist/utils/clipboard-native.js +0 -20
- package/dist/utils/clipboard-native.js.map +0 -1
- package/dist/utils/pi-user-agent.d.ts +0 -2
- package/dist/utils/pi-user-agent.d.ts.map +0 -1
- package/dist/utils/pi-user-agent.js +0 -5
- package/dist/utils/pi-user-agent.js.map +0 -1
- package/docs/development.md +0 -71
- package/docs/tree.md +0 -231
- package/examples/extensions/kimi-deferred-tools.ts +0 -61
package/docs/rpc.md
CHANGED
|
@@ -1,1330 +1,141 @@
|
|
|
1
1
|
# RPC Mode
|
|
2
2
|
|
|
3
|
-
RPC mode
|
|
3
|
+
RPC mode runs draht as a long-lived subprocess controlled through JSON records on stdin and stdout. Use it for language-independent integrations, process isolation, IDEs, and custom user interfaces.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
For an in-process Node.js or Bun integration, prefer the [SDK](sdk.md). For a subprocess-based TypeScript integration, prefer the exported `RpcClient`, which starts draht, correlates responses, exposes typed command methods, and delivers events to listeners.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
| Interface | Process boundary | Control model | Best fit |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| [SDK](sdk.md) | In process | Direct TypeScript methods and events | Node.js or Bun hosts that want complete API access |
|
|
10
|
+
| RPC | Child process | JSONL commands, responses, and events | Other languages, isolated processes, IDEs, or custom clients |
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
draht --mode rpc [options]
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Common options:
|
|
14
|
-
- `--provider <name>`: Set the LLM provider (anthropic, openai, google, etc.)
|
|
15
|
-
- `--model <pattern>`: Model pattern or ID (supports `provider/id` and optional `:<thinking>`)
|
|
16
|
-
- `--name <name>` / `-n <name>`: Set the session display name at startup
|
|
17
|
-
- `--no-session`: Disable session persistence
|
|
18
|
-
- `--session-dir <path>`: Custom session storage directory
|
|
19
|
-
|
|
20
|
-
## Protocol Overview
|
|
21
|
-
|
|
22
|
-
- **Commands**: JSON objects sent to stdin, one per line
|
|
23
|
-
- **Responses**: JSON objects with `type: "response"` indicating command success/failure
|
|
24
|
-
- **Events**: Agent events streamed to stdout as JSON lines
|
|
25
|
-
|
|
26
|
-
All commands support an optional `id` field for request/response correlation. If provided, the corresponding response will include the same `id`. `bash_execution_update` events also include the `id` of their originating `bash` command.
|
|
27
|
-
|
|
28
|
-
### Framing
|
|
29
|
-
|
|
30
|
-
RPC mode uses strict JSONL semantics with LF (`\n`) as the only record delimiter.
|
|
31
|
-
|
|
32
|
-
This matters for clients:
|
|
33
|
-
- Split records on `\n` only
|
|
34
|
-
- Accept optional `\r\n` input by stripping a trailing `\r`
|
|
35
|
-
- Do not use generic line readers that treat Unicode separators as newlines
|
|
36
|
-
|
|
37
|
-
In particular, Node `readline` is not protocol-compliant for RPC mode because it also splits on `U+2028` and `U+2029`, which are valid inside JSON strings.
|
|
38
|
-
|
|
39
|
-
## Commands
|
|
40
|
-
|
|
41
|
-
### Prompting
|
|
42
|
-
|
|
43
|
-
#### prompt
|
|
44
|
-
|
|
45
|
-
Send a user prompt to the agent. The command response is emitted after the prompt is accepted, queued, or handled. Events continue streaming asynchronously after acceptance.
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{"id": "req-1", "type": "prompt", "message": "Hello, world!"}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
With images:
|
|
52
|
-
```json
|
|
53
|
-
{"type": "prompt", "message": "What's in this image?", "images": [{"type": "image", "data": "base64-encoded-data", "mimeType": "image/png"}]}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**During streaming**: If the agent is already streaming, you must specify `streamingBehavior` to queue the message:
|
|
57
|
-
|
|
58
|
-
```json
|
|
59
|
-
{"type": "prompt", "message": "New instruction", "streamingBehavior": "steer"}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
- `"steer"`: Queue the message while the agent is running. It is delivered after the current assistant turn finishes executing its tool calls, before the next LLM call.
|
|
63
|
-
- `"followUp"`: Wait until the agent finishes. Message is delivered only when agent stops.
|
|
64
|
-
|
|
65
|
-
If the agent is streaming and no `streamingBehavior` is specified, the command returns an error.
|
|
66
|
-
|
|
67
|
-
**Extension commands**: If the message is an extension command (e.g., `/mycommand`), it executes immediately even during streaming. Extension commands manage their own LLM interaction via `pi.sendMessage()`.
|
|
68
|
-
|
|
69
|
-
**Input expansion**: Skill commands (`/skill:name`) and prompt templates (`/template`) are expanded before sending/queueing.
|
|
70
|
-
|
|
71
|
-
Response:
|
|
72
|
-
```json
|
|
73
|
-
{"id": "req-1", "type": "response", "command": "prompt", "success": true}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
`success: true` means the prompt was accepted, queued, or handled immediately. `success: false` means the prompt was rejected before acceptance. Failures after acceptance are reported through the normal event and message stream, not as a second `response` for the same request id.
|
|
77
|
-
|
|
78
|
-
The `images` field is optional. Each image uses `ImageContent` format: `{"type": "image", "data": "base64-encoded-data", "mimeType": "image/png"}`.
|
|
79
|
-
|
|
80
|
-
#### steer
|
|
81
|
-
|
|
82
|
-
Queue a steering message while the agent is running. It is delivered after the current assistant turn finishes executing its tool calls, before the next LLM call. Skill commands and prompt templates are expanded. Extension commands are not allowed (use `prompt` instead).
|
|
83
|
-
|
|
84
|
-
```json
|
|
85
|
-
{"type": "steer", "message": "Stop and do this instead"}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
With images:
|
|
89
|
-
```json
|
|
90
|
-
{"type": "steer", "message": "Look at this instead", "images": [{"type": "image", "data": "base64-encoded-data", "mimeType": "image/png"}]}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
The `images` field is optional. Each image uses `ImageContent` format (same as `prompt`).
|
|
94
|
-
|
|
95
|
-
Response:
|
|
96
|
-
```json
|
|
97
|
-
{"type": "response", "command": "steer", "success": true}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
See [set_steering_mode](#set_steering_mode) for controlling how steering messages are processed.
|
|
101
|
-
|
|
102
|
-
#### follow_up
|
|
103
|
-
|
|
104
|
-
Queue a follow-up message to be processed after the agent finishes. Delivered only when agent has no more tool calls or steering messages. Skill commands and prompt templates are expanded. Extension commands are not allowed (use `prompt` instead).
|
|
105
|
-
|
|
106
|
-
```json
|
|
107
|
-
{"type": "follow_up", "message": "After you're done, also do this"}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
With images:
|
|
111
|
-
```json
|
|
112
|
-
{"type": "follow_up", "message": "Also check this image", "images": [{"type": "image", "data": "base64-encoded-data", "mimeType": "image/png"}]}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
The `images` field is optional. Each image uses `ImageContent` format (same as `prompt`).
|
|
116
|
-
|
|
117
|
-
Response:
|
|
118
|
-
```json
|
|
119
|
-
{"type": "response", "command": "follow_up", "success": true}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
See [set_follow_up_mode](#set_follow_up_mode) for controlling how follow-up messages are processed.
|
|
123
|
-
|
|
124
|
-
#### abort
|
|
125
|
-
|
|
126
|
-
Abort the current agent operation.
|
|
127
|
-
|
|
128
|
-
```json
|
|
129
|
-
{"type": "abort"}
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Response:
|
|
133
|
-
```json
|
|
134
|
-
{"type": "response", "command": "abort", "success": true}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
#### new_session
|
|
138
|
-
|
|
139
|
-
Start a fresh session. Can be cancelled by a `session_before_switch` extension event handler.
|
|
140
|
-
|
|
141
|
-
```json
|
|
142
|
-
{"type": "new_session"}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
With optional parent session tracking:
|
|
146
|
-
```json
|
|
147
|
-
{"type": "new_session", "parentSession": "/path/to/parent-session.jsonl"}
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Response:
|
|
151
|
-
```json
|
|
152
|
-
{"type": "response", "command": "new_session", "success": true, "data": {"cancelled": false}}
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
If an extension cancelled:
|
|
156
|
-
```json
|
|
157
|
-
{"type": "response", "command": "new_session", "success": true, "data": {"cancelled": true}}
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### State
|
|
161
|
-
|
|
162
|
-
#### get_state
|
|
163
|
-
|
|
164
|
-
Get current session state.
|
|
165
|
-
|
|
166
|
-
```json
|
|
167
|
-
{"type": "get_state"}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
Response:
|
|
171
|
-
```json
|
|
172
|
-
{
|
|
173
|
-
"type": "response",
|
|
174
|
-
"command": "get_state",
|
|
175
|
-
"success": true,
|
|
176
|
-
"data": {
|
|
177
|
-
"model": {...},
|
|
178
|
-
"thinkingLevel": "medium",
|
|
179
|
-
"isStreaming": false,
|
|
180
|
-
"isCompacting": false,
|
|
181
|
-
"steeringMode": "all",
|
|
182
|
-
"followUpMode": "one-at-a-time",
|
|
183
|
-
"sessionFile": "/path/to/session.jsonl",
|
|
184
|
-
"sessionId": "abc123",
|
|
185
|
-
"sessionName": "my-feature-work",
|
|
186
|
-
"autoCompactionEnabled": true,
|
|
187
|
-
"messageCount": 5,
|
|
188
|
-
"pendingMessageCount": 0
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
The `model` field is a full [Model](#model) object or `null`. The `sessionName` field is the display name set via `set_session_name`, or omitted if not set.
|
|
194
|
-
|
|
195
|
-
#### get_messages
|
|
196
|
-
|
|
197
|
-
Get all messages in the conversation.
|
|
198
|
-
|
|
199
|
-
```json
|
|
200
|
-
{"type": "get_messages"}
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
Response:
|
|
204
|
-
```json
|
|
205
|
-
{
|
|
206
|
-
"type": "response",
|
|
207
|
-
"command": "get_messages",
|
|
208
|
-
"success": true,
|
|
209
|
-
"data": {"messages": [...]}
|
|
210
|
-
}
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
Messages are `AgentMessage` objects (see [Message Types](#message-types)).
|
|
214
|
-
|
|
215
|
-
### Model
|
|
216
|
-
|
|
217
|
-
#### set_model
|
|
218
|
-
|
|
219
|
-
Switch to a specific model.
|
|
220
|
-
|
|
221
|
-
```json
|
|
222
|
-
{"type": "set_model", "provider": "anthropic", "modelId": "claude-sonnet-4-20250514"}
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
Response contains the full [Model](#model) object:
|
|
226
|
-
```json
|
|
227
|
-
{
|
|
228
|
-
"type": "response",
|
|
229
|
-
"command": "set_model",
|
|
230
|
-
"success": true,
|
|
231
|
-
"data": {...}
|
|
232
|
-
}
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
#### cycle_model
|
|
236
|
-
|
|
237
|
-
Cycle to the next available model. Returns `null` data if only one model available.
|
|
238
|
-
|
|
239
|
-
```json
|
|
240
|
-
{"type": "cycle_model"}
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
Response:
|
|
244
|
-
```json
|
|
245
|
-
{
|
|
246
|
-
"type": "response",
|
|
247
|
-
"command": "cycle_model",
|
|
248
|
-
"success": true,
|
|
249
|
-
"data": {
|
|
250
|
-
"model": {...},
|
|
251
|
-
"thinkingLevel": "medium",
|
|
252
|
-
"isScoped": false
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
The `model` field is a full [Model](#model) object.
|
|
258
|
-
|
|
259
|
-
#### get_available_models
|
|
260
|
-
|
|
261
|
-
List all configured models.
|
|
262
|
-
|
|
263
|
-
```json
|
|
264
|
-
{"type": "get_available_models"}
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
Response contains an array of full [Model](#model) objects:
|
|
268
|
-
```json
|
|
269
|
-
{
|
|
270
|
-
"type": "response",
|
|
271
|
-
"command": "get_available_models",
|
|
272
|
-
"success": true,
|
|
273
|
-
"data": {
|
|
274
|
-
"models": [...]
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
### Thinking
|
|
280
|
-
|
|
281
|
-
#### set_thinking_level
|
|
282
|
-
|
|
283
|
-
Set the reasoning/thinking level for models that support it.
|
|
284
|
-
|
|
285
|
-
```json
|
|
286
|
-
{"type": "set_thinking_level", "level": "high"}
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
Levels: `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"`
|
|
290
|
-
|
|
291
|
-
`"xhigh"` and `"max"` are exposed only when supported by the selected model. Some models, including GPT-5.6, expose both.
|
|
292
|
-
|
|
293
|
-
Response:
|
|
294
|
-
```json
|
|
295
|
-
{"type": "response", "command": "set_thinking_level", "success": true}
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
#### cycle_thinking_level
|
|
299
|
-
|
|
300
|
-
Cycle through available thinking levels. Returns `null` data if model doesn't support thinking.
|
|
301
|
-
|
|
302
|
-
```json
|
|
303
|
-
{"type": "cycle_thinking_level"}
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
Response:
|
|
307
|
-
```json
|
|
308
|
-
{
|
|
309
|
-
"type": "response",
|
|
310
|
-
"command": "cycle_thinking_level",
|
|
311
|
-
"success": true,
|
|
312
|
-
"data": {"level": "high"}
|
|
313
|
-
}
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
#### get_available_thinking_levels
|
|
317
|
-
|
|
318
|
-
List the thinking levels supported by the current model. Returns `["off"]` for a model without reasoning support.
|
|
319
|
-
|
|
320
|
-
```json
|
|
321
|
-
{"type": "get_available_thinking_levels"}
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
Response:
|
|
325
|
-
```json
|
|
326
|
-
{
|
|
327
|
-
"type": "response",
|
|
328
|
-
"command": "get_available_thinking_levels",
|
|
329
|
-
"success": true,
|
|
330
|
-
"data": {
|
|
331
|
-
"levels": ["off", "minimal", "low", "medium", "high"]
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
### Queue Modes
|
|
337
|
-
|
|
338
|
-
#### set_steering_mode
|
|
339
|
-
|
|
340
|
-
Control how steering messages (from `steer`) are delivered.
|
|
341
|
-
|
|
342
|
-
```json
|
|
343
|
-
{"type": "set_steering_mode", "mode": "one-at-a-time"}
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
Modes:
|
|
347
|
-
- `"all"`: Deliver all steering messages after the current assistant turn finishes executing its tool calls
|
|
348
|
-
- `"one-at-a-time"`: Deliver one steering message per completed assistant turn (default)
|
|
349
|
-
|
|
350
|
-
Response:
|
|
351
|
-
```json
|
|
352
|
-
{"type": "response", "command": "set_steering_mode", "success": true}
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
#### set_follow_up_mode
|
|
356
|
-
|
|
357
|
-
Control how follow-up messages (from `follow_up`) are delivered.
|
|
358
|
-
|
|
359
|
-
```json
|
|
360
|
-
{"type": "set_follow_up_mode", "mode": "one-at-a-time"}
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
Modes:
|
|
364
|
-
- `"all"`: Deliver all follow-up messages when agent finishes
|
|
365
|
-
- `"one-at-a-time"`: Deliver one follow-up message per agent completion (default)
|
|
366
|
-
|
|
367
|
-
Response:
|
|
368
|
-
```json
|
|
369
|
-
{"type": "response", "command": "set_follow_up_mode", "success": true}
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
### Compaction
|
|
373
|
-
|
|
374
|
-
#### compact
|
|
375
|
-
|
|
376
|
-
Manually compact conversation context to reduce token usage.
|
|
377
|
-
|
|
378
|
-
```json
|
|
379
|
-
{"type": "compact"}
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
With custom instructions:
|
|
383
|
-
```json
|
|
384
|
-
{"type": "compact", "customInstructions": "Focus on code changes"}
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
Response:
|
|
388
|
-
```json
|
|
389
|
-
{
|
|
390
|
-
"type": "response",
|
|
391
|
-
"command": "compact",
|
|
392
|
-
"success": true,
|
|
393
|
-
"data": {
|
|
394
|
-
"summary": "Summary of conversation...",
|
|
395
|
-
"firstKeptEntryId": "abc123",
|
|
396
|
-
"tokensBefore": 150000,
|
|
397
|
-
"estimatedTokensAfter": 32000,
|
|
398
|
-
"usage": {
|
|
399
|
-
"input": 32000,
|
|
400
|
-
"output": 1200,
|
|
401
|
-
"cacheRead": 0,
|
|
402
|
-
"cacheWrite": 0,
|
|
403
|
-
"totalTokens": 33200,
|
|
404
|
-
"cost": {"input": 0.01, "output": 0.02, "cacheRead": 0, "cacheWrite": 0, "total": 0.03}
|
|
405
|
-
},
|
|
406
|
-
"details": {}
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
```
|
|
410
|
-
|
|
411
|
-
`estimatedTokensAfter` is a heuristic estimate over the rebuilt message context immediately after compaction, not a provider-exact token count. `usage` reports the LLM call or calls that generated the summary and may be omitted by custom compaction handlers.
|
|
412
|
-
|
|
413
|
-
#### set_auto_compaction
|
|
414
|
-
|
|
415
|
-
Enable or disable automatic compaction when context is nearly full.
|
|
416
|
-
|
|
417
|
-
```json
|
|
418
|
-
{"type": "set_auto_compaction", "enabled": true}
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
Response:
|
|
422
|
-
```json
|
|
423
|
-
{"type": "response", "command": "set_auto_compaction", "success": true}
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
### Retry
|
|
427
|
-
|
|
428
|
-
#### set_auto_retry
|
|
429
|
-
|
|
430
|
-
Enable or disable automatic retry on transient errors (overloaded, rate limit, 5xx).
|
|
431
|
-
|
|
432
|
-
```json
|
|
433
|
-
{"type": "set_auto_retry", "enabled": true}
|
|
434
|
-
```
|
|
435
|
-
|
|
436
|
-
Response:
|
|
437
|
-
```json
|
|
438
|
-
{"type": "response", "command": "set_auto_retry", "success": true}
|
|
439
|
-
```
|
|
440
|
-
|
|
441
|
-
#### abort_retry
|
|
442
|
-
|
|
443
|
-
Abort an in-progress retry (cancel the delay and stop retrying).
|
|
444
|
-
|
|
445
|
-
```json
|
|
446
|
-
{"type": "abort_retry"}
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
Response:
|
|
450
|
-
```json
|
|
451
|
-
{"type": "response", "command": "abort_retry", "success": true}
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
### Bash
|
|
455
|
-
|
|
456
|
-
#### bash
|
|
457
|
-
|
|
458
|
-
Execute a shell command and add output to conversation context. Output streams as `bash_execution_update` events while the command runs; the response contains the final result.
|
|
459
|
-
|
|
460
|
-
```json
|
|
461
|
-
{"id": "req-1", "type": "bash", "command": "ls -la"}
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
Include an `id` to associate streamed `bash_execution_update` events with this command.
|
|
465
|
-
|
|
466
|
-
Response:
|
|
467
|
-
```json
|
|
468
|
-
{
|
|
469
|
-
"id": "req-1",
|
|
470
|
-
"type": "response",
|
|
471
|
-
"command": "bash",
|
|
472
|
-
"success": true,
|
|
473
|
-
"data": {
|
|
474
|
-
"output": "total 48\ndrwxr-xr-x ...",
|
|
475
|
-
"exitCode": 0,
|
|
476
|
-
"cancelled": false,
|
|
477
|
-
"truncated": false
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
```
|
|
481
|
-
|
|
482
|
-
If output was truncated, includes `fullOutputPath`:
|
|
483
|
-
```json
|
|
484
|
-
{
|
|
485
|
-
"type": "response",
|
|
486
|
-
"command": "bash",
|
|
487
|
-
"success": true,
|
|
488
|
-
"data": {
|
|
489
|
-
"output": "truncated output...",
|
|
490
|
-
"exitCode": 0,
|
|
491
|
-
"cancelled": false,
|
|
492
|
-
"truncated": true,
|
|
493
|
-
"fullOutputPath": "/tmp/pi-bash-abc123.log"
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
```
|
|
497
|
-
|
|
498
|
-
**How bash results reach the LLM:**
|
|
499
|
-
|
|
500
|
-
The `bash` command executes immediately and returns a `BashResult`. Internally, a `BashExecutionMessage` is created and stored in the agent's message state.
|
|
501
|
-
|
|
502
|
-
When the next `prompt` command is sent, all messages (including `BashExecutionMessage`) are transformed before being sent to the LLM. The `BashExecutionMessage` is converted to a `UserMessage` with this format:
|
|
503
|
-
|
|
504
|
-
````
|
|
505
|
-
Ran `ls -la`
|
|
506
|
-
```
|
|
507
|
-
total 48
|
|
508
|
-
drwxr-xr-x ...
|
|
509
|
-
```
|
|
510
|
-
````
|
|
511
|
-
|
|
512
|
-
This means:
|
|
513
|
-
1. Bash output is included in the LLM context on the **next prompt**, not immediately
|
|
514
|
-
2. Multiple bash commands can be executed before a prompt; all outputs will be included
|
|
515
|
-
|
|
516
|
-
#### abort_bash
|
|
517
|
-
|
|
518
|
-
Abort a running bash command.
|
|
519
|
-
|
|
520
|
-
```json
|
|
521
|
-
{"type": "abort_bash"}
|
|
522
|
-
```
|
|
523
|
-
|
|
524
|
-
Response:
|
|
525
|
-
```json
|
|
526
|
-
{"type": "response", "command": "abort_bash", "success": true}
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
### Session
|
|
530
|
-
|
|
531
|
-
#### get_session_stats
|
|
532
|
-
|
|
533
|
-
Get token usage, cost statistics, and current context window usage.
|
|
534
|
-
|
|
535
|
-
```json
|
|
536
|
-
{"type": "get_session_stats"}
|
|
537
|
-
```
|
|
538
|
-
|
|
539
|
-
Response:
|
|
540
|
-
```json
|
|
541
|
-
{
|
|
542
|
-
"type": "response",
|
|
543
|
-
"command": "get_session_stats",
|
|
544
|
-
"success": true,
|
|
545
|
-
"data": {
|
|
546
|
-
"sessionFile": "/path/to/session.jsonl",
|
|
547
|
-
"sessionId": "abc123",
|
|
548
|
-
"userMessages": 5,
|
|
549
|
-
"assistantMessages": 5,
|
|
550
|
-
"toolCalls": 12,
|
|
551
|
-
"toolResults": 12,
|
|
552
|
-
"totalMessages": 22,
|
|
553
|
-
"tokens": {
|
|
554
|
-
"input": 50000,
|
|
555
|
-
"output": 10000,
|
|
556
|
-
"cacheRead": 40000,
|
|
557
|
-
"cacheWrite": 5000,
|
|
558
|
-
"total": 105000
|
|
559
|
-
},
|
|
560
|
-
"cost": 0.45,
|
|
561
|
-
"contextUsage": {
|
|
562
|
-
"tokens": 60000,
|
|
563
|
-
"contextWindow": 200000,
|
|
564
|
-
"percent": 30
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
```
|
|
569
|
-
|
|
570
|
-
`tokens` and `cost` include assistant messages, usage reported by tools, and compaction/branch-summary generation across the full session. `contextUsage` contains the actual current context-window estimate used for compaction and footer display.
|
|
571
|
-
|
|
572
|
-
`contextUsage` is omitted when no model or context window is available. `contextUsage.tokens` and `contextUsage.percent` are `null` immediately after compaction until a fresh post-compaction assistant response provides valid usage data.
|
|
573
|
-
|
|
574
|
-
#### export_html
|
|
575
|
-
|
|
576
|
-
Export session to an HTML file.
|
|
577
|
-
|
|
578
|
-
```json
|
|
579
|
-
{"type": "export_html"}
|
|
580
|
-
```
|
|
581
|
-
|
|
582
|
-
With custom path:
|
|
583
|
-
```json
|
|
584
|
-
{"type": "export_html", "outputPath": "/tmp/session.html"}
|
|
585
|
-
```
|
|
586
|
-
|
|
587
|
-
Response:
|
|
588
|
-
```json
|
|
589
|
-
{
|
|
590
|
-
"type": "response",
|
|
591
|
-
"command": "export_html",
|
|
592
|
-
"success": true,
|
|
593
|
-
"data": {"path": "/tmp/session.html"}
|
|
594
|
-
}
|
|
595
|
-
```
|
|
596
|
-
|
|
597
|
-
#### switch_session
|
|
598
|
-
|
|
599
|
-
Load a different session file. Can be cancelled by a `session_before_switch` extension event handler.
|
|
600
|
-
|
|
601
|
-
```json
|
|
602
|
-
{"type": "switch_session", "sessionPath": "/path/to/session.jsonl"}
|
|
603
|
-
```
|
|
604
|
-
|
|
605
|
-
Response:
|
|
606
|
-
```json
|
|
607
|
-
{"type": "response", "command": "switch_session", "success": true, "data": {"cancelled": false}}
|
|
608
|
-
```
|
|
609
|
-
|
|
610
|
-
If an extension cancelled the switch:
|
|
611
|
-
```json
|
|
612
|
-
{"type": "response", "command": "switch_session", "success": true, "data": {"cancelled": true}}
|
|
613
|
-
```
|
|
614
|
-
|
|
615
|
-
#### fork
|
|
616
|
-
|
|
617
|
-
Create a new fork from a previous user message on the active branch. Can be cancelled by a `session_before_fork` extension event handler. Returns the text of the message being forked from.
|
|
618
|
-
|
|
619
|
-
```json
|
|
620
|
-
{"type": "fork", "entryId": "abc123"}
|
|
621
|
-
```
|
|
622
|
-
|
|
623
|
-
Response:
|
|
624
|
-
```json
|
|
625
|
-
{
|
|
626
|
-
"type": "response",
|
|
627
|
-
"command": "fork",
|
|
628
|
-
"success": true,
|
|
629
|
-
"data": {"text": "The original prompt text...", "cancelled": false}
|
|
630
|
-
}
|
|
631
|
-
```
|
|
632
|
-
|
|
633
|
-
If an extension cancelled the fork:
|
|
634
|
-
```json
|
|
635
|
-
{
|
|
636
|
-
"type": "response",
|
|
637
|
-
"command": "fork",
|
|
638
|
-
"success": true,
|
|
639
|
-
"data": {"text": "The original prompt text...", "cancelled": true}
|
|
640
|
-
}
|
|
641
|
-
```
|
|
642
|
-
|
|
643
|
-
#### clone
|
|
644
|
-
|
|
645
|
-
Duplicate the current active branch into a new session at the current position. Can be cancelled by a `session_before_fork` extension event handler.
|
|
646
|
-
|
|
647
|
-
```json
|
|
648
|
-
{"type": "clone"}
|
|
649
|
-
```
|
|
650
|
-
|
|
651
|
-
Response:
|
|
652
|
-
```json
|
|
653
|
-
{
|
|
654
|
-
"type": "response",
|
|
655
|
-
"command": "clone",
|
|
656
|
-
"success": true,
|
|
657
|
-
"data": {"cancelled": false}
|
|
658
|
-
}
|
|
659
|
-
```
|
|
660
|
-
|
|
661
|
-
If an extension cancelled the clone:
|
|
662
|
-
```json
|
|
663
|
-
{
|
|
664
|
-
"type": "response",
|
|
665
|
-
"command": "clone",
|
|
666
|
-
"success": true,
|
|
667
|
-
"data": {"cancelled": true}
|
|
668
|
-
}
|
|
669
|
-
```
|
|
670
|
-
|
|
671
|
-
#### get_fork_messages
|
|
672
|
-
|
|
673
|
-
Get user messages available for forking.
|
|
674
|
-
|
|
675
|
-
```json
|
|
676
|
-
{"type": "get_fork_messages"}
|
|
677
|
-
```
|
|
678
|
-
|
|
679
|
-
Response:
|
|
680
|
-
```json
|
|
681
|
-
{
|
|
682
|
-
"type": "response",
|
|
683
|
-
"command": "get_fork_messages",
|
|
684
|
-
"success": true,
|
|
685
|
-
"data": {
|
|
686
|
-
"messages": [
|
|
687
|
-
{"entryId": "abc123", "text": "First prompt..."},
|
|
688
|
-
{"entryId": "def456", "text": "Second prompt..."}
|
|
689
|
-
]
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
```
|
|
693
|
-
|
|
694
|
-
#### get_entries
|
|
695
|
-
|
|
696
|
-
Get all session entries in append order (excluding the session header). The session is an append-only tree of entries with stable ids, so an entry id works as a durable cursor: pass the last entry id you have seen as `since` to get only entries strictly after it, even across client restarts. Unlike `get_messages`, this includes pre-compaction history and abandoned branches.
|
|
697
|
-
|
|
698
|
-
```json
|
|
699
|
-
{"type": "get_entries"}
|
|
700
|
-
```
|
|
701
|
-
|
|
702
|
-
With a cursor:
|
|
703
|
-
```json
|
|
704
|
-
{"type": "get_entries", "since": "abc123"}
|
|
705
|
-
```
|
|
706
|
-
|
|
707
|
-
Response:
|
|
708
|
-
```json
|
|
709
|
-
{
|
|
710
|
-
"type": "response",
|
|
711
|
-
"command": "get_entries",
|
|
712
|
-
"success": true,
|
|
713
|
-
"data": {
|
|
714
|
-
"entries": [
|
|
715
|
-
{"type": "message", "id": "def456", "parentId": "abc123", "timestamp": "...", "message": {"role": "user", "...": "..."}}
|
|
716
|
-
],
|
|
717
|
-
"leafId": "def456"
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
```
|
|
721
|
-
|
|
722
|
-
`leafId` is the id of the current leaf entry (`null` for an empty session), so a client can tell in one round trip whether the active branch moved. If `since` does not match any entry id, the response is `success: false`.
|
|
723
|
-
|
|
724
|
-
#### get_tree
|
|
725
|
-
|
|
726
|
-
Get the session as a tree of entries. Each node is `{entry, children, label?, labelTimestamp?}`. A well-formed session has a single root; orphaned entries (broken parent chain) also appear as roots.
|
|
727
|
-
|
|
728
|
-
```json
|
|
729
|
-
{"type": "get_tree"}
|
|
730
|
-
```
|
|
731
|
-
|
|
732
|
-
Response:
|
|
733
|
-
```json
|
|
734
|
-
{
|
|
735
|
-
"type": "response",
|
|
736
|
-
"command": "get_tree",
|
|
737
|
-
"success": true,
|
|
738
|
-
"data": {
|
|
739
|
-
"tree": [
|
|
740
|
-
{
|
|
741
|
-
"entry": {"type": "message", "id": "abc123", "parentId": null, "...": "..."},
|
|
742
|
-
"children": [
|
|
743
|
-
{"entry": {"type": "message", "id": "def456", "parentId": "abc123", "...": "..."}, "children": []}
|
|
744
|
-
]
|
|
745
|
-
}
|
|
746
|
-
],
|
|
747
|
-
"leafId": "def456"
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
```
|
|
751
|
-
|
|
752
|
-
#### get_last_assistant_text
|
|
753
|
-
|
|
754
|
-
Get the text content of the last assistant message.
|
|
755
|
-
|
|
756
|
-
```json
|
|
757
|
-
{"type": "get_last_assistant_text"}
|
|
758
|
-
```
|
|
759
|
-
|
|
760
|
-
Response:
|
|
761
|
-
```json
|
|
762
|
-
{
|
|
763
|
-
"type": "response",
|
|
764
|
-
"command": "get_last_assistant_text",
|
|
765
|
-
"success": true,
|
|
766
|
-
"data": {"text": "The assistant's response..."}
|
|
767
|
-
}
|
|
768
|
-
```
|
|
769
|
-
|
|
770
|
-
Returns `{"text": null}` if no assistant messages exist.
|
|
771
|
-
|
|
772
|
-
#### set_session_name
|
|
773
|
-
|
|
774
|
-
Set a display name for the current session. The name appears in session listings and helps identify sessions.
|
|
775
|
-
|
|
776
|
-
```json
|
|
777
|
-
{"type": "set_session_name", "name": "my-feature-work"}
|
|
778
|
-
```
|
|
779
|
-
|
|
780
|
-
Response:
|
|
781
|
-
```json
|
|
782
|
-
{
|
|
783
|
-
"type": "response",
|
|
784
|
-
"command": "set_session_name",
|
|
785
|
-
"success": true
|
|
786
|
-
}
|
|
787
|
-
```
|
|
788
|
-
|
|
789
|
-
The current session name is available via `get_state` in the `sessionName` field. To set the initial name when starting RPC mode, pass `--name <name>` or `-n <name>` to the `draht --mode rpc` process.
|
|
790
|
-
|
|
791
|
-
### Commands
|
|
792
|
-
|
|
793
|
-
#### get_commands
|
|
794
|
-
|
|
795
|
-
Get available commands (extension commands, prompt templates, and skills). These can be invoked via the `prompt` command by prefixing with `/`.
|
|
796
|
-
|
|
797
|
-
```json
|
|
798
|
-
{"type": "get_commands"}
|
|
799
|
-
```
|
|
800
|
-
|
|
801
|
-
Response:
|
|
802
|
-
```json
|
|
803
|
-
{
|
|
804
|
-
"type": "response",
|
|
805
|
-
"command": "get_commands",
|
|
806
|
-
"success": true,
|
|
807
|
-
"data": {
|
|
808
|
-
"commands": [
|
|
809
|
-
{"name": "session-name", "description": "Set or clear session name", "source": "extension", "path": "/home/user/.draht/agent/extensions/session.ts"},
|
|
810
|
-
{"name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "location": "project", "path": "/home/user/myproject/.draht/agent/prompts/fix-tests.md"},
|
|
811
|
-
{"name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "location": "user", "path": "/home/user/.draht/agent/skills/brave-search/SKILL.md"}
|
|
812
|
-
]
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
```
|
|
816
|
-
|
|
817
|
-
Each command has:
|
|
818
|
-
- `name`: Command name (invoke with `/name`)
|
|
819
|
-
- `description`: Human-readable description (optional for extension commands)
|
|
820
|
-
- `source`: What kind of command:
|
|
821
|
-
- `"extension"`: Registered via `pi.registerCommand()` in an extension
|
|
822
|
-
- `"prompt"`: Loaded from a prompt template `.md` file
|
|
823
|
-
- `"skill"`: Loaded from a skill directory (name is prefixed with `skill:`)
|
|
824
|
-
- `location`: Where it was loaded from (optional, not present for extensions):
|
|
825
|
-
- `"user"`: User-level (`~/.draht/agent/`)
|
|
826
|
-
- `"project"`: Project-level (`./.draht/agent/`)
|
|
827
|
-
- `"path"`: Explicit path via CLI or settings
|
|
828
|
-
- `path`: Absolute file path to the command source (optional)
|
|
829
|
-
|
|
830
|
-
**Note**: Built-in TUI commands (`/settings`, `/hotkeys`, etc.) are not included. They are handled only in interactive mode and would not execute if sent via `prompt`.
|
|
831
|
-
|
|
832
|
-
## Events
|
|
833
|
-
|
|
834
|
-
Events are streamed to stdout as JSON lines during agent operation. Events do not generally include an `id` field; `bash_execution_update` includes the `id` of its originating `bash` command when one was provided.
|
|
835
|
-
|
|
836
|
-
### Event Types
|
|
837
|
-
|
|
838
|
-
| Event | Description |
|
|
839
|
-
|-------|-------------|
|
|
840
|
-
| `agent_start` | Agent begins processing |
|
|
841
|
-
| `agent_end` | One low-level agent run completes (may still be followed by retry, compaction, or queued continuations) |
|
|
842
|
-
| `agent_settled` | Agent run is fully settled; no automatic retry, compaction retry, or queued continuation remains |
|
|
843
|
-
| `turn_start` | New turn begins |
|
|
844
|
-
| `turn_end` | Turn completes (includes assistant message and tool results) |
|
|
845
|
-
| `message_start` | Message begins |
|
|
846
|
-
| `message_update` | Streaming update (text/thinking/toolcall deltas) |
|
|
847
|
-
| `message_end` | Message completes |
|
|
848
|
-
| `bash_execution_update` | Direct RPC bash command output chunk |
|
|
849
|
-
| `tool_execution_start` | Tool begins execution |
|
|
850
|
-
| `tool_execution_update` | Tool execution progress (streaming output) |
|
|
851
|
-
| `tool_execution_end` | Tool completes |
|
|
852
|
-
| `queue_update` | Pending steering/follow-up queue changed |
|
|
853
|
-
| `compaction_start` | Compaction begins |
|
|
854
|
-
| `compaction_end` | Compaction completes |
|
|
855
|
-
| `auto_retry_start` | Auto-retry begins (after transient error) |
|
|
856
|
-
| `auto_retry_end` | Auto-retry completes (success or final failure) |
|
|
857
|
-
| `summarization_retry_scheduled` | Retry scheduled for a transient compaction or branch-summary summarization error |
|
|
858
|
-
| `summarization_retry_attempt_start` | Retried summarization request starts |
|
|
859
|
-
| `summarization_retry_finished` | Summarization retry loop completes |
|
|
860
|
-
| `extension_error` | Extension threw an error |
|
|
861
|
-
|
|
862
|
-
### agent_start
|
|
863
|
-
|
|
864
|
-
Emitted when the agent begins processing a prompt.
|
|
865
|
-
|
|
866
|
-
```json
|
|
867
|
-
{"type": "agent_start"}
|
|
868
|
-
```
|
|
869
|
-
|
|
870
|
-
### agent_end
|
|
871
|
-
|
|
872
|
-
Emitted when one low-level agent run completes. Contains all messages generated during this run. If `willRetry` is true, an automatic retry will follow.
|
|
873
|
-
|
|
874
|
-
```json
|
|
875
|
-
{
|
|
876
|
-
"type": "agent_end",
|
|
877
|
-
"messages": [...],
|
|
878
|
-
"willRetry": false
|
|
879
|
-
}
|
|
880
|
-
```
|
|
881
|
-
|
|
882
|
-
### agent_settled
|
|
883
|
-
|
|
884
|
-
Emitted after the full session-level run settles. At this point draht will not continue automatically through retry, compaction retry, or queued follow-up messages.
|
|
885
|
-
|
|
886
|
-
```json
|
|
887
|
-
{"type": "agent_settled"}
|
|
888
|
-
```
|
|
889
|
-
|
|
890
|
-
### turn_start / turn_end
|
|
891
|
-
|
|
892
|
-
A turn consists of one assistant response plus any resulting tool calls and results.
|
|
893
|
-
|
|
894
|
-
```json
|
|
895
|
-
{"type": "turn_start"}
|
|
896
|
-
```
|
|
897
|
-
|
|
898
|
-
```json
|
|
899
|
-
{
|
|
900
|
-
"type": "turn_end",
|
|
901
|
-
"message": {...},
|
|
902
|
-
"toolResults": [...]
|
|
903
|
-
}
|
|
904
|
-
```
|
|
905
|
-
|
|
906
|
-
### message_start / message_end
|
|
907
|
-
|
|
908
|
-
Emitted when a message begins and completes. The `message` field contains an `AgentMessage`.
|
|
909
|
-
|
|
910
|
-
```json
|
|
911
|
-
{"type": "message_start", "message": {...}}
|
|
912
|
-
{"type": "message_end", "message": {...}}
|
|
913
|
-
```
|
|
914
|
-
|
|
915
|
-
### message_update (Streaming)
|
|
916
|
-
|
|
917
|
-
Emitted during streaming of assistant messages. Contains both the partial message and a streaming delta event.
|
|
918
|
-
|
|
919
|
-
```json
|
|
920
|
-
{
|
|
921
|
-
"type": "message_update",
|
|
922
|
-
"message": {...},
|
|
923
|
-
"assistantMessageEvent": {
|
|
924
|
-
"type": "text_delta",
|
|
925
|
-
"contentIndex": 0,
|
|
926
|
-
"delta": "Hello ",
|
|
927
|
-
"partial": {...}
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
```
|
|
931
|
-
|
|
932
|
-
The `assistantMessageEvent` field contains one of these delta types:
|
|
933
|
-
|
|
934
|
-
| Type | Description |
|
|
935
|
-
|------|-------------|
|
|
936
|
-
| `start` | Message generation started |
|
|
937
|
-
| `text_start` | Text content block started |
|
|
938
|
-
| `text_delta` | Text content chunk |
|
|
939
|
-
| `text_end` | Text content block ended |
|
|
940
|
-
| `thinking_start` | Thinking block started |
|
|
941
|
-
| `thinking_delta` | Thinking content chunk |
|
|
942
|
-
| `thinking_end` | Thinking block ended |
|
|
943
|
-
| `toolcall_start` | Tool call started |
|
|
944
|
-
| `toolcall_delta` | Tool call arguments chunk |
|
|
945
|
-
| `toolcall_end` | Tool call ended (includes full `toolCall` object) |
|
|
946
|
-
| `done` | Message complete (reason: `"stop"`, `"length"`, `"toolUse"`) |
|
|
947
|
-
| `error` | Error occurred (reason: `"aborted"`, `"error"`) |
|
|
948
|
-
|
|
949
|
-
Example streaming a text response:
|
|
950
|
-
```json
|
|
951
|
-
{"type":"message_update","message":{...},"assistantMessageEvent":{"type":"text_start","contentIndex":0,"partial":{...}}}
|
|
952
|
-
{"type":"message_update","message":{...},"assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":"Hello","partial":{...}}}
|
|
953
|
-
{"type":"message_update","message":{...},"assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":" world","partial":{...}}}
|
|
954
|
-
{"type":"message_update","message":{...},"assistantMessageEvent":{"type":"text_end","contentIndex":0,"content":"Hello world","partial":{...}}}
|
|
955
|
-
```
|
|
956
|
-
|
|
957
|
-
### bash_execution_update
|
|
958
|
-
|
|
959
|
-
Emitted once for each output chunk from a direct `bash` command. `id` matches the command's `id`, allowing clients to associate output with the correct command.
|
|
960
|
-
|
|
961
|
-
Events stream all output while the command runs, even if the final `bash` response's `output` is truncated.
|
|
962
|
-
|
|
963
|
-
```json
|
|
964
|
-
{
|
|
965
|
-
"type": "bash_execution_update",
|
|
966
|
-
"id": "req-1",
|
|
967
|
-
"delta": "total 48\n"
|
|
968
|
-
}
|
|
969
|
-
```
|
|
970
|
-
|
|
971
|
-
### tool_execution_start / tool_execution_update / tool_execution_end
|
|
972
|
-
|
|
973
|
-
Emitted when a tool begins, streams progress, and completes execution.
|
|
974
|
-
|
|
975
|
-
```json
|
|
976
|
-
{
|
|
977
|
-
"type": "tool_execution_start",
|
|
978
|
-
"toolCallId": "call_abc123",
|
|
979
|
-
"toolName": "bash",
|
|
980
|
-
"args": {"command": "ls -la"}
|
|
981
|
-
}
|
|
982
|
-
```
|
|
983
|
-
|
|
984
|
-
During execution, `tool_execution_update` events stream partial results (e.g., bash output as it arrives):
|
|
985
|
-
|
|
986
|
-
```json
|
|
987
|
-
{
|
|
988
|
-
"type": "tool_execution_update",
|
|
989
|
-
"toolCallId": "call_abc123",
|
|
990
|
-
"toolName": "bash",
|
|
991
|
-
"args": {"command": "ls -la"},
|
|
992
|
-
"partialResult": {
|
|
993
|
-
"content": [{"type": "text", "text": "partial output so far..."}],
|
|
994
|
-
"details": {"truncation": null, "fullOutputPath": null}
|
|
995
|
-
}
|
|
996
|
-
}
|
|
997
|
-
```
|
|
998
|
-
|
|
999
|
-
When complete:
|
|
1000
|
-
|
|
1001
|
-
```json
|
|
1002
|
-
{
|
|
1003
|
-
"type": "tool_execution_end",
|
|
1004
|
-
"toolCallId": "call_abc123",
|
|
1005
|
-
"toolName": "bash",
|
|
1006
|
-
"result": {
|
|
1007
|
-
"content": [{"type": "text", "text": "total 48\n..."}],
|
|
1008
|
-
"details": {...}
|
|
1009
|
-
},
|
|
1010
|
-
"isError": false
|
|
1011
|
-
}
|
|
1012
|
-
```
|
|
1013
|
-
|
|
1014
|
-
Use `toolCallId` to correlate events. The `partialResult` in `tool_execution_update` contains the accumulated output so far (not just the delta), allowing clients to simply replace their display on each update.
|
|
1015
|
-
|
|
1016
|
-
### queue_update
|
|
1017
|
-
|
|
1018
|
-
Emitted whenever the pending steering or follow-up queue changes.
|
|
1019
|
-
|
|
1020
|
-
```json
|
|
1021
|
-
{
|
|
1022
|
-
"type": "queue_update",
|
|
1023
|
-
"steering": ["Focus on error handling"],
|
|
1024
|
-
"followUp": ["After that, summarize the result"]
|
|
1025
|
-
}
|
|
1026
|
-
```
|
|
1027
|
-
|
|
1028
|
-
### compaction_start / compaction_end
|
|
1029
|
-
|
|
1030
|
-
Emitted when compaction runs, whether manual or automatic.
|
|
1031
|
-
|
|
1032
|
-
```json
|
|
1033
|
-
{"type": "compaction_start", "reason": "threshold"}
|
|
1034
|
-
```
|
|
1035
|
-
|
|
1036
|
-
The `reason` field is `"manual"`, `"threshold"`, or `"overflow"`.
|
|
1037
|
-
|
|
1038
|
-
```json
|
|
1039
|
-
{
|
|
1040
|
-
"type": "compaction_end",
|
|
1041
|
-
"reason": "threshold",
|
|
1042
|
-
"result": {
|
|
1043
|
-
"summary": "Summary of conversation...",
|
|
1044
|
-
"firstKeptEntryId": "abc123",
|
|
1045
|
-
"tokensBefore": 150000,
|
|
1046
|
-
"estimatedTokensAfter": 32000,
|
|
1047
|
-
"usage": {
|
|
1048
|
-
"input": 32000,
|
|
1049
|
-
"output": 1200,
|
|
1050
|
-
"cacheRead": 0,
|
|
1051
|
-
"cacheWrite": 0,
|
|
1052
|
-
"totalTokens": 33200,
|
|
1053
|
-
"cost": {"input": 0.01, "output": 0.02, "cacheRead": 0, "cacheWrite": 0, "total": 0.03}
|
|
1054
|
-
},
|
|
1055
|
-
"details": {}
|
|
1056
|
-
},
|
|
1057
|
-
"aborted": false,
|
|
1058
|
-
"willRetry": false
|
|
1059
|
-
}
|
|
1060
|
-
```
|
|
1061
|
-
|
|
1062
|
-
If `reason` was `"overflow"` and compaction succeeds, `willRetry` is `true` and the agent will automatically retry the prompt.
|
|
1063
|
-
|
|
1064
|
-
If compaction was aborted, `result` is `null` and `aborted` is `true`.
|
|
1065
|
-
|
|
1066
|
-
If compaction failed (e.g., API quota exceeded), `result` is `null`, `aborted` is `false`, and `errorMessage` contains the error description.
|
|
1067
|
-
|
|
1068
|
-
### auto_retry_start / auto_retry_end
|
|
12
|
+
## Start RPC mode
|
|
1069
13
|
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
```json
|
|
1073
|
-
{
|
|
1074
|
-
"type": "auto_retry_start",
|
|
1075
|
-
"attempt": 1,
|
|
1076
|
-
"maxAttempts": 3,
|
|
1077
|
-
"delayMs": 2000,
|
|
1078
|
-
"errorMessage": "529 {\"type\":\"error\",\"error\":{\"type\":\"overloaded_error\",\"message\":\"Overloaded\"}}"
|
|
1079
|
-
}
|
|
1080
|
-
```
|
|
1081
|
-
|
|
1082
|
-
```json
|
|
1083
|
-
{
|
|
1084
|
-
"type": "auto_retry_end",
|
|
1085
|
-
"success": true,
|
|
1086
|
-
"attempt": 2
|
|
1087
|
-
}
|
|
1088
|
-
```
|
|
1089
|
-
|
|
1090
|
-
On final failure (max retries exceeded):
|
|
1091
|
-
```json
|
|
1092
|
-
{
|
|
1093
|
-
"type": "auto_retry_end",
|
|
1094
|
-
"success": false,
|
|
1095
|
-
"attempt": 3,
|
|
1096
|
-
"finalError": "529 overloaded_error: Overloaded"
|
|
1097
|
-
}
|
|
14
|
+
```bash
|
|
15
|
+
draht --mode rpc --no-session
|
|
1098
16
|
```
|
|
1099
17
|
|
|
1100
|
-
|
|
18
|
+
Normal CLI options still select the working folder, model, tools, resources, and session behavior. Common choices include `--provider`, `--model`, `--name`, `--no-session`, and `--session-dir`. See [Command Line](cli.md) for the complete, version-specific interface; `draht --help` is authoritative for the installed version.
|
|
1101
19
|
|
|
1102
|
-
|
|
20
|
+
RPC mode rejects `@file` prompt arguments. Send prompts through the [`prompt`](rpc-commands.md#prompt) command instead.
|
|
1103
21
|
|
|
1104
|
-
|
|
1105
|
-
{
|
|
1106
|
-
"type": "summarization_retry_scheduled",
|
|
1107
|
-
"attempt": 1,
|
|
1108
|
-
"maxAttempts": 3,
|
|
1109
|
-
"delayMs": 2000,
|
|
1110
|
-
"errorMessage": "terminated"
|
|
1111
|
-
}
|
|
1112
|
-
```
|
|
22
|
+
## Protocol records
|
|
1113
23
|
|
|
1114
|
-
|
|
1115
|
-
{
|
|
1116
|
-
"type": "summarization_retry_attempt_start",
|
|
1117
|
-
"source": "compaction",
|
|
1118
|
-
"reason": "threshold"
|
|
1119
|
-
}
|
|
1120
|
-
```
|
|
24
|
+
The protocol has four record families:
|
|
1121
25
|
|
|
1122
|
-
|
|
26
|
+
| Direction | Record | Purpose |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| stdin | Command | Ask draht to prompt, inspect state, change configuration, or manage the session |
|
|
29
|
+
| stdout | `response` | Report whether one command succeeded and return any command data |
|
|
30
|
+
| stdout | Session event | Stream run, message, tool, queue, compaction, and retry activity |
|
|
31
|
+
| Both | Extension UI record | Forward supported extension interactions between draht and the client |
|
|
1123
32
|
|
|
1124
|
-
|
|
1125
|
-
{
|
|
1126
|
-
"type": "summarization_retry_finished"
|
|
1127
|
-
}
|
|
1128
|
-
```
|
|
33
|
+
See [RPC Commands](rpc-commands.md), [JSON Event Stream](json.md), and [RPC Extension UI](rpc-extension-ui.md) for the canonical record definitions.
|
|
1129
34
|
|
|
1130
|
-
###
|
|
35
|
+
### Correlate commands and responses
|
|
1131
36
|
|
|
1132
|
-
|
|
37
|
+
Every command accepts an optional string `id`. A matching response repeats it:
|
|
1133
38
|
|
|
1134
39
|
```json
|
|
1135
|
-
{
|
|
1136
|
-
|
|
1137
|
-
"extensionPath": "/path/to/extension.ts",
|
|
1138
|
-
"event": "tool_call",
|
|
1139
|
-
"error": "Error message..."
|
|
1140
|
-
}
|
|
40
|
+
{"id":"req-1","type":"get_state"}
|
|
41
|
+
{"id":"req-1","type":"response","command":"get_state","success":true,"data":{"...":"..."}}
|
|
1141
42
|
```
|
|
1142
43
|
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
Extensions can request user interaction via `ctx.ui.select()`, `ctx.ui.confirm()`, etc. In RPC mode, these are translated into a request/response sub-protocol on top of the base command/event flow.
|
|
1146
|
-
|
|
1147
|
-
There are two categories of extension UI methods:
|
|
44
|
+
Use unique IDs whenever more than one command can be outstanding. Command handling is asynchronous, so clients should correlate by ID rather than response order.
|
|
1148
45
|
|
|
1149
|
-
|
|
1150
|
-
- **Fire-and-forget methods** (`notify`, `setStatus`, `setWidget`, `setTitle`, `set_editor_text`): emit an `extension_ui_request` on stdout but do not expect a response. The client can display the information or ignore it.
|
|
46
|
+
Session events generally have no command ID because they describe session activity. `bash_execution_update` is the exception: when the originating [`bash`](rpc-commands.md#bash) command has an ID, its output events repeat that ID.
|
|
1151
47
|
|
|
1152
|
-
|
|
48
|
+
An `extension_ui_response` uses the ID supplied by its `extension_ui_request`. It does not produce a normal command response.
|
|
1153
49
|
|
|
1154
|
-
|
|
1155
|
-
- `custom()` returns `undefined`
|
|
1156
|
-
- `setWorkingMessage()`, `setWorkingIndicator()`, `setFooter()`, `setHeader()`, `setEditorComponent()`, `setToolsExpanded()` are no-ops
|
|
1157
|
-
- `getEditorText()` returns `""`
|
|
1158
|
-
- `getToolsExpanded()` returns `false`
|
|
1159
|
-
- `pasteToEditor()` delegates to `setEditorText()` (no paste/collapse handling)
|
|
1160
|
-
- `getAllThemes()` returns `[]`
|
|
1161
|
-
- `getTheme()` returns `undefined`
|
|
1162
|
-
- `setTheme()` returns `{ success: false, error: "..." }`
|
|
50
|
+
## Framing
|
|
1163
51
|
|
|
1164
|
-
|
|
52
|
+
RPC uses strict JSONL framing. Write one complete JSON object per record and terminate it with LF (`\n`). Read stdout as a byte or UTF-8 stream and split records only on LF. Strip an optional preceding carriage return to accept CRLF input.
|
|
1165
53
|
|
|
1166
|
-
|
|
54
|
+
Do not use a generic line reader that treats Unicode line or paragraph separators as record boundaries. In particular, Node.js `readline` also splits on `U+2028` and `U+2029`, which are valid inside JSON strings.
|
|
1167
55
|
|
|
1168
|
-
|
|
56
|
+
Read stdout continuously. draht honors stdout backpressure, but a client that stops reading can stall the process. Honor stdin backpressure when writing commands. Stdout is reserved for protocol records; diagnostics and application logging go to stderr.
|
|
1169
57
|
|
|
1170
|
-
|
|
58
|
+
## Run lifecycle
|
|
1171
59
|
|
|
1172
|
-
|
|
60
|
+
A successful `prompt` response means the prompt was accepted, queued, or handled. It does not mean model work completed:
|
|
1173
61
|
|
|
1174
62
|
```json
|
|
1175
|
-
{
|
|
1176
|
-
|
|
1177
|
-
"id": "uuid-1",
|
|
1178
|
-
"method": "select",
|
|
1179
|
-
"title": "Allow dangerous command?",
|
|
1180
|
-
"options": ["Allow", "Block"],
|
|
1181
|
-
"timeout": 10000
|
|
1182
|
-
}
|
|
1183
|
-
```
|
|
1184
|
-
|
|
1185
|
-
Expected response: `extension_ui_response` with `value` (the selected option string) or `cancelled: true`.
|
|
1186
|
-
|
|
1187
|
-
#### confirm
|
|
1188
|
-
|
|
1189
|
-
Prompt the user for yes/no confirmation.
|
|
1190
|
-
|
|
1191
|
-
```json
|
|
1192
|
-
{
|
|
1193
|
-
"type": "extension_ui_request",
|
|
1194
|
-
"id": "uuid-2",
|
|
1195
|
-
"method": "confirm",
|
|
1196
|
-
"title": "Clear session?",
|
|
1197
|
-
"message": "All messages will be lost.",
|
|
1198
|
-
"timeout": 5000
|
|
1199
|
-
}
|
|
63
|
+
{"id":"req-2","type":"prompt","message":"Review this repository"}
|
|
64
|
+
{"id":"req-2","type":"response","command":"prompt","success":true,"data":{"disposition":"started"}}
|
|
1200
65
|
```
|
|
1201
66
|
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
#### input
|
|
1205
|
-
|
|
1206
|
-
Prompt the user for free-form text.
|
|
67
|
+
`data.disposition` reports what happened to the prompt. If it is `"handled"`, no run started for this prompt, so don't wait for `agent_settled`. See [RPC Commands](rpc-commands.md#prompt) for all values.
|
|
1207
68
|
|
|
1208
|
-
|
|
1209
|
-
{
|
|
1210
|
-
"type": "extension_ui_request",
|
|
1211
|
-
"id": "uuid-3",
|
|
1212
|
-
"method": "input",
|
|
1213
|
-
"title": "Enter a value",
|
|
1214
|
-
"placeholder": "type something..."
|
|
1215
|
-
}
|
|
1216
|
-
```
|
|
69
|
+
Continue consuming [events](json.md) after that response. `agent_end` marks the end of one low-level agent run, but retries, overflow recovery, compaction, steering, or follow-up work can still follow. Wait for `agent_settled` when the client needs to know draht will not continue automatically.
|
|
1217
70
|
|
|
1218
|
-
|
|
71
|
+
Subscribe before sending a prompt to avoid missing a fast completion. `RpcClient.promptAndWait()` does this internally. If using separate `RpcClient` calls, install the event listener before `prompt()` and call `waitForIdle()` only while a run is active.
|
|
1219
72
|
|
|
1220
|
-
|
|
73
|
+
## Errors
|
|
1221
74
|
|
|
1222
|
-
|
|
75
|
+
A failed command returns one response with `success: false`:
|
|
1223
76
|
|
|
1224
77
|
```json
|
|
1225
|
-
{
|
|
1226
|
-
"type": "extension_ui_request",
|
|
1227
|
-
"id": "uuid-4",
|
|
1228
|
-
"method": "editor",
|
|
1229
|
-
"title": "Edit some text",
|
|
1230
|
-
"prefill": "Line 1\nLine 2\nLine 3"
|
|
1231
|
-
}
|
|
78
|
+
{"id":"req-3","type":"response","command":"set_model","success":false,"error":"Model not found: invalid/model"}
|
|
1232
79
|
```
|
|
1233
80
|
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
#### notify
|
|
1237
|
-
|
|
1238
|
-
Display a notification. Fire-and-forget, no response expected.
|
|
81
|
+
Malformed JSON produces a parse response without a request ID:
|
|
1239
82
|
|
|
1240
83
|
```json
|
|
1241
|
-
{
|
|
1242
|
-
"type": "extension_ui_request",
|
|
1243
|
-
"id": "uuid-5",
|
|
1244
|
-
"method": "notify",
|
|
1245
|
-
"message": "Command blocked by user",
|
|
1246
|
-
"notifyType": "warning"
|
|
1247
|
-
}
|
|
84
|
+
{"type":"response","command":"parse","success":false,"error":"Failed to parse command: Unexpected token..."}
|
|
1248
85
|
```
|
|
1249
86
|
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
#### setStatus
|
|
87
|
+
A success response only covers command handling. Provider failures and aborts after a prompt is accepted appear in the message and event stream.
|
|
1253
88
|
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
```json
|
|
1257
|
-
{
|
|
1258
|
-
"type": "extension_ui_request",
|
|
1259
|
-
"id": "uuid-6",
|
|
1260
|
-
"method": "setStatus",
|
|
1261
|
-
"statusKey": "my-ext",
|
|
1262
|
-
"statusText": "Turn 3 running..."
|
|
1263
|
-
}
|
|
1264
|
-
```
|
|
89
|
+
Clients must also handle child-process startup failures, unexpected exits, stderr diagnostics, cancellation, and their own deadlines. Do not parse stderr as protocol data.
|
|
1265
90
|
|
|
1266
|
-
|
|
91
|
+
## Shutdown
|
|
1267
92
|
|
|
1268
|
-
|
|
93
|
+
Close the child's stdin to request an orderly shutdown. draht disposes the active runtime before exiting. Clients should still handle process signals and unexpected exits.
|
|
1269
94
|
|
|
1270
|
-
|
|
95
|
+
An extension can also request shutdown through its extension context. draht completes shutdown after the current command or after the active run emits `agent_settled`.
|
|
1271
96
|
|
|
1272
|
-
|
|
1273
|
-
{
|
|
1274
|
-
"type": "extension_ui_request",
|
|
1275
|
-
"id": "uuid-7",
|
|
1276
|
-
"method": "setWidget",
|
|
1277
|
-
"widgetKey": "my-ext",
|
|
1278
|
-
"widgetLines": ["--- My Widget ---", "Line 1", "Line 2"],
|
|
1279
|
-
"widgetPlacement": "aboveEditor"
|
|
1280
|
-
}
|
|
1281
|
-
```
|
|
97
|
+
## Minimal client
|
|
1282
98
|
|
|
1283
|
-
|
|
99
|
+
This Python example uses a binary pipe reader, which splits on LF without treating Unicode separators as protocol boundaries:
|
|
1284
100
|
|
|
1285
|
-
|
|
101
|
+
```python
|
|
102
|
+
import json
|
|
103
|
+
import subprocess
|
|
1286
104
|
|
|
1287
|
-
|
|
105
|
+
process = subprocess.Popen(
|
|
106
|
+
["draht", "--mode", "rpc", "--no-session"],
|
|
107
|
+
stdin=subprocess.PIPE,
|
|
108
|
+
stdout=subprocess.PIPE,
|
|
109
|
+
)
|
|
1288
110
|
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
"type": "extension_ui_request",
|
|
1292
|
-
"id": "uuid-8",
|
|
1293
|
-
"method": "setTitle",
|
|
1294
|
-
"title": "draht - my project"
|
|
1295
|
-
}
|
|
1296
|
-
```
|
|
111
|
+
assert process.stdin is not None
|
|
112
|
+
assert process.stdout is not None
|
|
1297
113
|
|
|
1298
|
-
|
|
114
|
+
command = {"id": "prompt-1", "type": "prompt", "message": "Hello"}
|
|
115
|
+
process.stdin.write(json.dumps(command).encode("utf-8") + b"\n")
|
|
116
|
+
process.stdin.flush()
|
|
1299
117
|
|
|
1300
|
-
|
|
118
|
+
while line := process.stdout.readline():
|
|
119
|
+
record = json.loads(line)
|
|
120
|
+
if record.get("type") == "message_update":
|
|
121
|
+
update = record["assistantMessageEvent"]
|
|
122
|
+
if update["type"] == "text_delta":
|
|
123
|
+
print(update["delta"], end="", flush=True)
|
|
124
|
+
elif record.get("type") == "agent_settled":
|
|
125
|
+
print()
|
|
126
|
+
break
|
|
1301
127
|
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
"type": "extension_ui_request",
|
|
1305
|
-
"id": "uuid-9",
|
|
1306
|
-
"method": "set_editor_text",
|
|
1307
|
-
"text": "prefilled text for the user"
|
|
1308
|
-
}
|
|
128
|
+
process.stdin.close()
|
|
129
|
+
process.wait()
|
|
1309
130
|
```
|
|
1310
131
|
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
Responses are sent for dialog methods only (`select`, `confirm`, `input`, `editor`). The `id` must match the request. An answer whose `id` matches no open dialog is silently dropped.
|
|
1314
|
-
|
|
1315
|
-
#### Value response (select, input, editor)
|
|
1316
|
-
|
|
1317
|
-
```json
|
|
1318
|
-
{"type": "extension_ui_response", "id": "uuid-1", "value": "Allow"}
|
|
1319
|
-
```
|
|
132
|
+
For maintained TypeScript clients, use the checked [RPC client example](../examples/rpc-client.ts). It requires a built draht CLI because the repository example points to `dist/cli.js`.
|
|
1320
133
|
|
|
1321
|
-
|
|
134
|
+
## Extension UI option ids
|
|
1322
135
|
|
|
1323
|
-
|
|
1324
|
-
{"type": "extension_ui_response", "id": "uuid-2", "confirmed": true}
|
|
1325
|
-
```
|
|
136
|
+
[RPC Extension UI](rpc-extension-ui.md) defines the dialog requests and their `confirmed` / `value` / `cancelled` responses. draht extends dialog answers with an optional `optionId`, and an answer whose `id` matches no open dialog is silently dropped.
|
|
1326
137
|
|
|
1327
|
-
|
|
138
|
+
### Naming the option that was chosen (`optionId`)
|
|
1328
139
|
|
|
1329
140
|
A request may carry a `detail` object describing what is being decided. When it does, `detail.options`
|
|
1330
141
|
is the immutable set of options that request offered, each stating its own meaning:
|
|
@@ -1374,7 +185,7 @@ Rules, all enforced by the agent:
|
|
|
1374
185
|
so `optionId` is ignored and the answer decides on `confirmed` / `value` as usual. A client may
|
|
1375
186
|
therefore attach `optionId` unconditionally without risk of stranding those dialogs.
|
|
1376
187
|
|
|
1377
|
-
|
|
188
|
+
### Refused response (`command: "extension_ui_response"`)
|
|
1378
189
|
|
|
1379
190
|
A rejected `optionId` is reported on stdout as an ordinary failed-command response — note that
|
|
1380
191
|
`command` here is `"extension_ui_response"`, a value **no client ever sends as a command**. Clients
|
|
@@ -1395,253 +206,63 @@ request: the dialog is still open and still answerable, and a subsequent valid a
|
|
|
1395
206
|
`optionId`, or with none at all — decides it. A client that receives this line should correct its
|
|
1396
207
|
answer and send it again; ignoring it leaves the agent waiting.
|
|
1397
208
|
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
```
|
|
1459
|
-
|
|
1460
|
-
### UserMessage
|
|
1461
|
-
|
|
1462
|
-
```json
|
|
1463
|
-
{
|
|
1464
|
-
"role": "user",
|
|
1465
|
-
"content": "Hello!",
|
|
1466
|
-
"timestamp": 1733234567890,
|
|
1467
|
-
"attachments": []
|
|
1468
|
-
}
|
|
1469
|
-
```
|
|
1470
|
-
|
|
1471
|
-
The `content` field can be a string or an array of `TextContent`/`ImageContent` blocks.
|
|
1472
|
-
|
|
1473
|
-
### AssistantMessage
|
|
1474
|
-
|
|
1475
|
-
```json
|
|
1476
|
-
{
|
|
1477
|
-
"role": "assistant",
|
|
1478
|
-
"content": [
|
|
1479
|
-
{"type": "text", "text": "Hello! How can I help?"},
|
|
1480
|
-
{"type": "thinking", "thinking": "User is greeting me..."},
|
|
1481
|
-
{"type": "toolCall", "id": "call_123", "name": "bash", "arguments": {"command": "ls"}}
|
|
1482
|
-
],
|
|
1483
|
-
"api": "anthropic-messages",
|
|
1484
|
-
"provider": "anthropic",
|
|
1485
|
-
"model": "claude-sonnet-4-20250514",
|
|
1486
|
-
"usage": {
|
|
1487
|
-
"input": 100,
|
|
1488
|
-
"output": 50,
|
|
1489
|
-
"cacheRead": 0,
|
|
1490
|
-
"cacheWrite": 0,
|
|
1491
|
-
"cost": {"input": 0.0003, "output": 0.00075, "cacheRead": 0, "cacheWrite": 0, "total": 0.00105}
|
|
1492
|
-
},
|
|
1493
|
-
"stopReason": "stop",
|
|
1494
|
-
"timestamp": 1733234567890
|
|
1495
|
-
}
|
|
1496
|
-
```
|
|
1497
|
-
|
|
1498
|
-
Stop reasons: `"stop"`, `"length"`, `"toolUse"`, `"error"`, `"aborted"`
|
|
1499
|
-
|
|
1500
|
-
### ToolResultMessage
|
|
1501
|
-
|
|
1502
|
-
```json
|
|
1503
|
-
{
|
|
1504
|
-
"role": "toolResult",
|
|
1505
|
-
"toolCallId": "call_123",
|
|
1506
|
-
"toolName": "bash",
|
|
1507
|
-
"content": [{"type": "text", "text": "total 48\ndrwxr-xr-x ..."}],
|
|
1508
|
-
"usage": {
|
|
1509
|
-
"input": 100,
|
|
1510
|
-
"output": 50,
|
|
1511
|
-
"cacheRead": 0,
|
|
1512
|
-
"cacheWrite": 0,
|
|
1513
|
-
"totalTokens": 150,
|
|
1514
|
-
"cost": {"input": 0.0003, "output": 0.00075, "cacheRead": 0, "cacheWrite": 0, "total": 0.00105}
|
|
1515
|
-
},
|
|
1516
|
-
"isError": false,
|
|
1517
|
-
"timestamp": 1733234567890
|
|
1518
|
-
}
|
|
1519
|
-
```
|
|
1520
|
-
|
|
1521
|
-
`usage` is optional and reports nested LLM work performed by the tool. When present, it contributes to session token and cost totals.
|
|
1522
|
-
|
|
1523
|
-
### BashExecutionMessage
|
|
1524
|
-
|
|
1525
|
-
Created by the `bash` RPC command (not by LLM tool calls):
|
|
1526
|
-
|
|
1527
|
-
```json
|
|
1528
|
-
{
|
|
1529
|
-
"role": "bashExecution",
|
|
1530
|
-
"command": "ls -la",
|
|
1531
|
-
"output": "total 48\ndrwxr-xr-x ...",
|
|
1532
|
-
"exitCode": 0,
|
|
1533
|
-
"cancelled": false,
|
|
1534
|
-
"truncated": false,
|
|
1535
|
-
"fullOutputPath": null,
|
|
1536
|
-
"timestamp": 1733234567890
|
|
1537
|
-
}
|
|
1538
|
-
```
|
|
1539
|
-
|
|
1540
|
-
### Attachment
|
|
1541
|
-
|
|
1542
|
-
```json
|
|
1543
|
-
{
|
|
1544
|
-
"id": "img1",
|
|
1545
|
-
"type": "image",
|
|
1546
|
-
"fileName": "photo.jpg",
|
|
1547
|
-
"mimeType": "image/jpeg",
|
|
1548
|
-
"size": 102400,
|
|
1549
|
-
"content": "base64-encoded-data...",
|
|
1550
|
-
"extractedText": null,
|
|
1551
|
-
"preview": null
|
|
1552
|
-
}
|
|
1553
|
-
```
|
|
1554
|
-
|
|
1555
|
-
## Example: Basic Client (Python)
|
|
1556
|
-
|
|
1557
|
-
```python
|
|
1558
|
-
import subprocess
|
|
1559
|
-
import json
|
|
1560
|
-
|
|
1561
|
-
proc = subprocess.Popen(
|
|
1562
|
-
["draht", "--mode", "rpc", "--no-session"],
|
|
1563
|
-
stdin=subprocess.PIPE,
|
|
1564
|
-
stdout=subprocess.PIPE,
|
|
1565
|
-
text=True
|
|
1566
|
-
)
|
|
1567
|
-
|
|
1568
|
-
def send(cmd):
|
|
1569
|
-
proc.stdin.write(json.dumps(cmd) + "\n")
|
|
1570
|
-
proc.stdin.flush()
|
|
1571
|
-
|
|
1572
|
-
def read_events():
|
|
1573
|
-
for line in proc.stdout:
|
|
1574
|
-
yield json.loads(line)
|
|
1575
|
-
|
|
1576
|
-
# Send prompt
|
|
1577
|
-
send({"type": "prompt", "message": "Hello!"})
|
|
1578
|
-
|
|
1579
|
-
# Process events
|
|
1580
|
-
for event in read_events():
|
|
1581
|
-
if event.get("type") == "message_update":
|
|
1582
|
-
delta = event.get("assistantMessageEvent", {})
|
|
1583
|
-
if delta.get("type") == "text_delta":
|
|
1584
|
-
print(delta["delta"], end="", flush=True)
|
|
1585
|
-
|
|
1586
|
-
if event.get("type") == "agent_end":
|
|
1587
|
-
print()
|
|
1588
|
-
break
|
|
1589
|
-
```
|
|
1590
|
-
|
|
1591
|
-
## Example: Interactive Client (Node.js)
|
|
1592
|
-
|
|
1593
|
-
See [`test/rpc-example.ts`](../test/rpc-example.ts) for a complete interactive example, or [`src/modes/rpc/rpc-client.ts`](../src/modes/rpc/rpc-client.ts) for a typed client implementation.
|
|
1594
|
-
|
|
1595
|
-
For a complete example of handling the extension UI protocol, see [`examples/rpc-extension-ui.ts`](../examples/rpc-extension-ui.ts) which pairs with the [`examples/extensions/rpc-demo.ts`](../examples/extensions/rpc-demo.ts) extension.
|
|
1596
|
-
|
|
1597
|
-
```javascript
|
|
1598
|
-
const { spawn } = require("child_process");
|
|
1599
|
-
const { StringDecoder } = require("string_decoder");
|
|
1600
|
-
|
|
1601
|
-
const agent = spawn("draht", ["--mode", "rpc", "--no-session"]);
|
|
1602
|
-
|
|
1603
|
-
function attachJsonlReader(stream, onLine) {
|
|
1604
|
-
const decoder = new StringDecoder("utf8");
|
|
1605
|
-
let buffer = "";
|
|
1606
|
-
|
|
1607
|
-
stream.on("data", (chunk) => {
|
|
1608
|
-
buffer += typeof chunk === "string" ? chunk : decoder.write(chunk);
|
|
1609
|
-
|
|
1610
|
-
while (true) {
|
|
1611
|
-
const newlineIndex = buffer.indexOf("\n");
|
|
1612
|
-
if (newlineIndex === -1) break;
|
|
1613
|
-
|
|
1614
|
-
let line = buffer.slice(0, newlineIndex);
|
|
1615
|
-
buffer = buffer.slice(newlineIndex + 1);
|
|
1616
|
-
if (line.endsWith("\r")) line = line.slice(0, -1);
|
|
1617
|
-
onLine(line);
|
|
1618
|
-
}
|
|
1619
|
-
});
|
|
1620
|
-
|
|
1621
|
-
stream.on("end", () => {
|
|
1622
|
-
buffer += decoder.end();
|
|
1623
|
-
if (buffer.length > 0) {
|
|
1624
|
-
onLine(buffer.endsWith("\r") ? buffer.slice(0, -1) : buffer);
|
|
1625
|
-
}
|
|
1626
|
-
});
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
attachJsonlReader(agent.stdout, (line) => {
|
|
1630
|
-
const event = JSON.parse(line);
|
|
1631
|
-
|
|
1632
|
-
if (event.type === "message_update") {
|
|
1633
|
-
const { assistantMessageEvent } = event;
|
|
1634
|
-
if (assistantMessageEvent.type === "text_delta") {
|
|
1635
|
-
process.stdout.write(assistantMessageEvent.delta);
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
});
|
|
1639
|
-
|
|
1640
|
-
// Send prompt
|
|
1641
|
-
agent.stdin.write(JSON.stringify({ type: "prompt", message: "Hello" }) + "\n");
|
|
1642
|
-
|
|
1643
|
-
// Abort on Ctrl+C
|
|
1644
|
-
process.on("SIGINT", () => {
|
|
1645
|
-
agent.stdin.write(JSON.stringify({ type: "abort" }) + "\n");
|
|
1646
|
-
});
|
|
1647
|
-
```
|
|
209
|
+
## Reference
|
|
210
|
+
|
|
211
|
+
- [RPC Commands](rpc-commands.md): every stdin command and response
|
|
212
|
+
- [JSON Event Stream](json.md): shared stdout session events and streaming reconstruction
|
|
213
|
+
- [RPC Extension UI](rpc-extension-ui.md): dialogs, notifications, responses, and limitations
|
|
214
|
+
- [Message Types](message-types.md): messages and content blocks used by responses and events
|
|
215
|
+
- [Session File Format](session-format.md): entries returned by session commands
|
|
216
|
+
- [`rpc-types.ts`](https://github.com/draht-dev/draht/blob/main/packages/coding-agent/src/modes/rpc/rpc-types.ts): exported TypeScript protocol definitions
|
|
217
|
+
- [`RpcClient`](https://github.com/draht-dev/draht/blob/main/packages/coding-agent/src/modes/rpc/rpc-client.ts): subprocess client implementation
|
|
218
|
+
|
|
219
|
+
## Moved reference anchors
|
|
220
|
+
|
|
221
|
+
The detailed references formerly on this page now have dedicated pages. These anchors preserve existing links.
|
|
222
|
+
|
|
223
|
+
<a id="prompt"></a>
|
|
224
|
+
<a id="steer"></a>
|
|
225
|
+
<a id="follow_up"></a>
|
|
226
|
+
<a id="abort"></a>
|
|
227
|
+
<a id="clear_queue"></a>
|
|
228
|
+
<a id="new_session"></a>
|
|
229
|
+
<a id="get_state"></a>
|
|
230
|
+
<a id="get_messages"></a>
|
|
231
|
+
<a id="set_model"></a>
|
|
232
|
+
<a id="cycle_model"></a>
|
|
233
|
+
<a id="get_available_models"></a>
|
|
234
|
+
<a id="set_thinking_level"></a>
|
|
235
|
+
<a id="cycle_thinking_level"></a>
|
|
236
|
+
<a id="get_available_thinking_levels"></a>
|
|
237
|
+
<a id="set_steering_mode"></a>
|
|
238
|
+
<a id="set_follow_up_mode"></a>
|
|
239
|
+
<a id="compact"></a>
|
|
240
|
+
<a id="set_auto_compaction"></a>
|
|
241
|
+
<a id="set_auto_retry"></a>
|
|
242
|
+
<a id="abort_retry"></a>
|
|
243
|
+
<a id="bash"></a>
|
|
244
|
+
<a id="abort_bash"></a>
|
|
245
|
+
<a id="get_session_stats"></a>
|
|
246
|
+
<a id="export_html"></a>
|
|
247
|
+
<a id="switch_session"></a>
|
|
248
|
+
<a id="fork"></a>
|
|
249
|
+
<a id="clone"></a>
|
|
250
|
+
<a id="get_fork_messages"></a>
|
|
251
|
+
<a id="get_entries"></a>
|
|
252
|
+
<a id="get_tree"></a>
|
|
253
|
+
<a id="get_last_assistant_text"></a>
|
|
254
|
+
<a id="set_session_name"></a>
|
|
255
|
+
<a id="get_commands"></a>
|
|
256
|
+
|
|
257
|
+
Command details moved to [RPC Commands](rpc-commands.md).
|
|
258
|
+
|
|
259
|
+
<a id="message_update-streaming"></a>
|
|
260
|
+
<a id="bash_execution_update"></a>
|
|
261
|
+
<a id="compaction_start--compaction_end"></a>
|
|
262
|
+
<a id="summarization_retry_scheduled--summarization_retry_attempt_start--summarization_retry_finished"></a>
|
|
263
|
+
|
|
264
|
+
Event details moved to [JSON Event Stream](json.md).
|
|
265
|
+
|
|
266
|
+
<a id="extension-ui-protocol"></a>
|
|
267
|
+
|
|
268
|
+
Extension interaction details moved to [RPC Extension UI](rpc-extension-ui.md).
|