@bastani/atomic 0.10.9 → 0.10.10-alpha.1
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 +57 -0
- package/README.md +211 -155
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +27 -12
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
- package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
- package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +5 -5
- package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
- package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
- package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
- package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
- package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
- package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
- package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +145 -58
- package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
- package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
- package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
- package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
- package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
- package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
- package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
- package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
- package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
- package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
- package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
- package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
- package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
- package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/README.md +85 -114
- package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
- package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
- package/dist/builtin/intercom/group.ts +7 -3
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/README.md +37 -27
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +8 -0
- package/dist/builtin/subagents/README.md +71 -138
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
- package/dist/builtin/web-access/CHANGELOG.md +9 -0
- package/dist/builtin/web-access/README.md +60 -87
- package/dist/builtin/web-access/index.bundle.mjs +387 -351
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +4 -4
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +2 -2
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +3 -3
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.code.js +3 -3
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +2 -2
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +2 -2
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +2 -2
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.code.js +2 -2
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +2 -2
- package/dist/core/agent-session-methods.d.ts +4 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/compaction/compactor.d.ts +20 -14
- package/dist/core/compaction/errors.d.ts +120 -0
- package/dist/core/compaction/index.d.ts +1 -0
- package/dist/core/compaction/model-resolver.d.ts +2 -2
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.code.js +1 -1
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/api-types.d.ts +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.code.js +1 -1
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/extensions/loader-virtual-modules.js +1 -1
- package/dist/core/extensions/provider-types.d.ts +18 -6
- package/dist/core/extensions/provider-types.js.map +1 -1
- package/dist/core/extensions/runner-context.js +1 -1
- package/dist/core/intercom-broker-control-host.code.js +1 -1
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +3 -3
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/model-config.d.ts +40 -0
- package/dist/core/model-registry.js +1 -1
- package/dist/core/model-resolver-scope.d.ts +4 -4
- package/dist/core/model-runtime.d.ts +1 -1
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/provider-composer-internal.d.ts +11 -2
- package/dist/core/sdk.code.js +3 -3
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +5 -5
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.code.js +1 -1
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/settings-manager-basic-accessors.d.ts +6 -2
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +2 -2
- package/dist/core/storage/node-sqlite.js +2 -2
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +3 -3
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +2 -2
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +3 -3
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +3 -3
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +3 -3
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.code.js +1 -1
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +3 -3
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +4 -4
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.code.js +1 -1
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/read-url.code.js +2 -2
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.js +2 -2
- package/dist/core/worktree-snapshot/errors.code.js +3 -3
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.code.js +1 -1
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.code.js +2 -2
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +2 -2
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index-extensions.d.ts +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +7 -7
- package/dist/main-first-time-setup.code.js +2 -2
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -0
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/modes/interactive/theme/color-utils.d.ts +5 -5
- package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
- package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
- package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
- package/dist/modes/rpc/rpc-types.d.ts +29 -2
- package/dist/package-manager-cli.code.js +5 -5
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/rpc-entry.js +1 -1
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/5.js +1 -1
- package/dist/startup-stages/7.js +1 -1
- package/dist/startup-stages/8.js +1 -2
- package/dist/startup-stages/9.js +2 -1
- package/dist/utils/native-module.d.ts +44 -0
- package/dist/utils/startup-database-spare.code.js +3 -3
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.code.js +1 -1
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks.md +235 -243
- package/docs/build.md +12 -11
- package/docs/codemode.md +60 -51
- package/docs/compaction/reference.md +61 -24
- package/docs/compaction.md +117 -65
- package/docs/computer-use.md +179 -146
- package/docs/containerization.md +79 -33
- package/docs/custom-provider/api-reference.md +148 -11
- package/docs/custom-provider/oauth.md +44 -27
- package/docs/custom-provider/override.md +14 -7
- package/docs/custom-provider/registration.md +75 -65
- package/docs/custom-provider/streaming.md +42 -19
- package/docs/custom-provider.md +25 -61
- package/docs/development.md +47 -43
- package/docs/docs.json +33 -33
- package/docs/environment-variables.md +83 -57
- package/docs/extensions/api-reference.md +323 -734
- package/docs/extensions/authoring.md +186 -269
- package/docs/extensions/events.md +308 -375
- package/docs/extensions/examples.md +122 -74
- package/docs/extensions/ui.md +217 -197
- package/docs/extensions.md +152 -259
- package/docs/getting-started/authentication.md +27 -14
- package/docs/getting-started/first-session.md +25 -26
- package/docs/getting-started/installation.md +62 -84
- package/docs/getting-started/project-instructions.md +39 -14
- package/docs/guides/configuration.md +42 -20
- package/docs/guides/intercom.md +17 -13
- package/docs/guides/non-interactive.md +29 -16
- package/docs/guides/orchestration.md +16 -10
- package/docs/guides/resume-on-any-machine.md +54 -49
- package/docs/guides/subagents.md +22 -14
- package/docs/guides/team-setup.md +37 -26
- package/docs/guides.md +22 -21
- package/docs/herdr.md +21 -16
- package/docs/index.md +16 -17
- package/docs/intercom/operations.md +68 -66
- package/docs/intercom/reference.md +196 -191
- package/docs/intercom.md +103 -92
- package/docs/json.md +71 -71
- package/docs/keybindings.md +63 -50
- package/docs/libraries/agent-core.md +49 -8
- package/docs/libraries/ai.md +21 -12
- package/docs/libraries/codemode.md +28 -6
- package/docs/libraries/schema.md +7 -7
- package/docs/libraries/telemetry.md +7 -7
- package/docs/libraries/tui.md +74 -94
- package/docs/libraries.md +5 -5
- package/docs/llama-cpp.md +38 -33
- package/docs/mcp-servers.md +96 -90
- package/docs/models/reference.md +46 -33
- package/docs/models-configuration.md +12 -6
- package/docs/models.md +93 -88
- package/docs/orchestration/migrating-workflows.md +21 -19
- package/docs/orchestration/patterns.md +35 -20
- package/docs/orchestration.md +22 -21
- package/docs/packages/authoring.md +28 -19
- package/docs/packages/reference.md +75 -16
- package/docs/packages.md +31 -33
- package/docs/programmatic.md +22 -21
- package/docs/prompt-templates.md +63 -41
- package/docs/providers/reference.md +35 -19
- package/docs/providers.md +61 -71
- package/docs/quickstart.md +32 -46
- package/docs/reference/cli.md +249 -252
- package/docs/reference.md +23 -20
- package/docs/rpc/examples.md +74 -17
- package/docs/rpc/extension-ui.md +79 -62
- package/docs/rpc/protocol.md +816 -358
- package/docs/rpc.md +75 -151
- package/docs/sdk/reference.md +175 -45
- package/docs/sdk/structured-decisions.md +92 -62
- package/docs/sdk/web-server.md +79 -46
- package/docs/sdk.md +237 -195
- package/docs/security.md +106 -43
- package/docs/session-format.md +96 -59
- package/docs/sessions.md +149 -113
- package/docs/settings.md +289 -204
- package/docs/shell-aliases.md +15 -6
- package/docs/skills/authoring.md +17 -9
- package/docs/skills/reference.md +23 -21
- package/docs/skills.md +104 -97
- package/docs/storage.md +140 -242
- package/docs/subagents/authoring.md +147 -16
- package/docs/subagents/reference.md +100 -30
- package/docs/subagents.md +220 -252
- package/docs/terminal-setup.md +97 -69
- package/docs/termux.md +51 -85
- package/docs/themes/reference.md +51 -37
- package/docs/themes.md +49 -54
- package/docs/tmux.md +38 -21
- package/docs/tools.md +198 -147
- package/docs/tui/reference.md +64 -32
- package/docs/tui.md +38 -66
- package/docs/usage.md +76 -78
- package/docs/verification.md +25 -25
- package/docs/web-access.md +72 -55
- package/docs/windows.md +53 -58
- package/docs/worktree-snapshots.md +62 -65
- package/package.json +8 -8
- package/schemas/models.schema.json +51 -0
- package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
- package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
- package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
- package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
- package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
package/docs/rpc/protocol.md
CHANGED
|
@@ -1,145 +1,145 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: RPC protocol
|
|
3
|
-
|
|
2
|
+
title: "RPC protocol reference"
|
|
3
|
+
sidebarTitle: "RPC protocol"
|
|
4
|
+
description: "Reference for every Atomic RPC command, streamed event, structured error code, and JSON wire type."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
# RPC protocol
|
|
7
|
-
|
|
8
7
|
## Commands
|
|
9
8
|
|
|
10
9
|
### Stored session summaries
|
|
11
10
|
|
|
12
|
-
These read-only commands do not start a model turn. Stored summaries remain available when `sessionSummary.enabled` is false
|
|
11
|
+
These read-only commands do not start a model turn. Stored summaries remain available even when `sessionSummary.enabled` is `false`.
|
|
13
12
|
|
|
14
13
|
| Command | Response `data` | TypeScript `RpcClient` method |
|
|
15
14
|
| --- | --- | --- |
|
|
16
15
|
| `{"type":"get_session_summary"}` | `{ summary: SessionSummaryEntry \| null }`, including `summary` and `summarizedThroughId`; always `null` for an unsaved (`--no-session`) session | `getSessionSummary()` |
|
|
17
|
-
| `{"type":"list_sessions"}` | `{ sessions: RpcSessionInfo[] }` for the current project
|
|
16
|
+
| `{"type":"list_sessions"}` | `{ sessions: RpcSessionInfo[] }` for the current project or session directory, including `summary` and `summarizedThroughId`; `created` and `modified` are ISO strings | `listSessions()` |
|
|
18
17
|
|
|
19
18
|
### Prompting
|
|
20
19
|
|
|
21
20
|
#### prompt
|
|
22
21
|
|
|
23
|
-
Send a user prompt to the agent.
|
|
22
|
+
Send a user prompt to the agent. Atomic emits the command response once the prompt is accepted, queued, or handled. Session events then stream asynchronously.
|
|
24
23
|
|
|
25
24
|
```json
|
|
26
25
|
{"id": "req-1", "type": "prompt", "message": "Hello, world!"}
|
|
27
26
|
```
|
|
28
27
|
|
|
29
28
|
With images:
|
|
29
|
+
|
|
30
30
|
```json
|
|
31
31
|
{"type": "prompt", "message": "What's in this image?", "images": [{"type": "image", "data": "base64-encoded-data", "mimeType": "image/png"}]}
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
**During streaming
|
|
34
|
+
**During streaming:** If the agent is already streaming, pass `streamingBehavior` to queue the message:
|
|
35
35
|
|
|
36
36
|
```json
|
|
37
37
|
{"type": "prompt", "message": "New instruction", "streamingBehavior": "steer"}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
- `"steer"`:
|
|
41
|
-
- `"followUp"`:
|
|
40
|
+
- `"steer"`: queue the message for delivery after the current assistant turn finishes its tool calls, before the next model request.
|
|
41
|
+
- `"followUp"`: hold the message until the active run stops.
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Sending `prompt` during streaming without `streamingBehavior` returns an error response.
|
|
44
44
|
|
|
45
|
-
**Extension commands
|
|
45
|
+
**Extension commands:** If `message` invokes an extension command (such as `/mycommand`), it executes immediately even while streaming. Extension commands manage their own model interaction through `atomic.sendMessage()`.
|
|
46
46
|
|
|
47
|
-
**Input expansion
|
|
47
|
+
**Input expansion:** Skill commands (`/skill:name`) and prompt templates (`/template`) expand before sending or queueing.
|
|
48
48
|
|
|
49
49
|
Response:
|
|
50
|
+
|
|
50
51
|
```json
|
|
51
52
|
{"id": "req-1", "type": "response", "command": "prompt", "success": true, "data": {"disposition": "started"}}
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
`data.disposition` reports how Atomic accepted the prompt:
|
|
56
|
+
|
|
55
57
|
- `"handled"`: an extension command or input handler consumed it; no turn started, so do not wait for `agent_end` or `agent_settled`.
|
|
56
|
-
- `"queued"`: queued during
|
|
57
|
-
- `"started"`: Atomic started a run for this prompt
|
|
58
|
+
- `"queued"`: queued during an active run, held while the queue was paused, or held during compaction. A prompt held during compaction runs once compaction ends; if starting that turn fails (for example, missing credentials), the message stays queued and Atomic emits `agent_continue_error` with `source: "post_compaction"`.
|
|
59
|
+
- `"started"`: Atomic started a run for this prompt.
|
|
58
60
|
|
|
59
|
-
`success: true` means the prompt was accepted, queued, or handled
|
|
61
|
+
`success: true` means the prompt was accepted, queued, or handled. `success: false` means it was rejected before acceptance. Failures after acceptance appear on the event stream rather than as a second `response` for the same request ID.
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
Each optional entry in `images` uses `ImageContent` format: `{"type": "image", "data": "base64-encoded-data", "mimeType": "image/png"}`.
|
|
62
64
|
|
|
63
65
|
#### steer
|
|
64
66
|
|
|
65
|
-
Queue a steering message while the agent is running. Atomic delivers it after the current assistant turn finishes its tool calls, before the next
|
|
67
|
+
Queue a steering message while the agent is running. Atomic delivers it after the current assistant turn finishes its tool calls, before the next model call.
|
|
66
68
|
|
|
67
|
-
If no run is active and the session already has messages, Atomic starts a turn to deliver it (so a `prompt` sent during that turn
|
|
69
|
+
If no run is active and the session already has messages, Atomic starts a turn to deliver it (so a `prompt` sent during that turn requires `streamingBehavior`). On an empty session, or after `abort`, the message stays queued until the next `prompt`. Skill commands and prompt templates expand; extension commands are rejected (use `prompt` instead).
|
|
68
70
|
|
|
69
71
|
```json
|
|
70
72
|
{"type": "steer", "message": "Stop and do this instead"}
|
|
71
73
|
```
|
|
72
74
|
|
|
73
|
-
With images:
|
|
75
|
+
With optional images:
|
|
76
|
+
|
|
74
77
|
```json
|
|
75
78
|
{"type": "steer", "message": "Look at this instead", "images": [{"type": "image", "data": "base64-encoded-data", "mimeType": "image/png"}]}
|
|
76
79
|
```
|
|
77
80
|
|
|
78
|
-
The `images` field is optional. Each image uses `ImageContent` format (same as `prompt`).
|
|
79
|
-
|
|
80
81
|
Response:
|
|
82
|
+
|
|
81
83
|
```json
|
|
82
84
|
{"type": "response", "command": "steer", "success": true, "data": {"disposition": "queued"}}
|
|
83
85
|
```
|
|
84
86
|
|
|
85
|
-
`data.disposition` is `"handled"`
|
|
86
|
-
|
|
87
|
-
See [set_steering_mode](#set_steering_mode) for controlling how steering messages are processed.
|
|
87
|
+
`data.disposition` is `"handled"` when an input handler consumed the message, or `"queued"` when Atomic queued it. See [set_steering_mode](#set_steering_mode) for delivery behavior.
|
|
88
88
|
|
|
89
89
|
#### follow_up
|
|
90
90
|
|
|
91
91
|
Queue a follow-up message to run after the agent finishes, once no tool calls or steering messages remain.
|
|
92
92
|
|
|
93
|
-
If no run is active and the session already has messages, Atomic starts a turn to deliver it
|
|
93
|
+
If no run is active and the session already has messages, Atomic starts a turn to deliver it. On an empty session, or after `abort`, the message stays queued until the next `prompt`. Skill commands and prompt templates expand; extension commands are rejected.
|
|
94
94
|
|
|
95
95
|
```json
|
|
96
96
|
{"type": "follow_up", "message": "After you're done, also do this"}
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
With images:
|
|
99
|
+
With optional images:
|
|
100
|
+
|
|
100
101
|
```json
|
|
101
102
|
{"type": "follow_up", "message": "Also check this image", "images": [{"type": "image", "data": "base64-encoded-data", "mimeType": "image/png"}]}
|
|
102
103
|
```
|
|
103
104
|
|
|
104
|
-
The `images` field is optional. Each image uses `ImageContent` format (same as `prompt`).
|
|
105
|
-
|
|
106
105
|
Response:
|
|
106
|
+
|
|
107
107
|
```json
|
|
108
108
|
{"type": "response", "command": "follow_up", "success": true, "data": {"disposition": "queued"}}
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
`data.disposition`
|
|
112
|
-
|
|
113
|
-
See [set_follow_up_mode](#set_follow_up_mode) for controlling how follow-up messages are processed.
|
|
111
|
+
`data.disposition` is `"handled"` or `"queued"`. See [set_follow_up_mode](#set_follow_up_mode).
|
|
114
112
|
|
|
115
113
|
#### abort
|
|
116
114
|
|
|
117
115
|
Abort the current operation and wait for the session to become idle before responding.
|
|
118
116
|
|
|
119
|
-
Like `Esc` in the TUI, `abort`
|
|
117
|
+
Like `Esc` in the TUI, `abort` holds queued messages first: queued steering and follow-up messages, plus notices arriving afterward (such as background command completions), wait instead of starting a new turn.
|
|
120
118
|
|
|
121
|
-
The next `prompt` releases the hold and includes them in its turn. If the client paused the queue with `pause_queued_messages` before or after `abort`, the hold stays until `resume_queued_messages`. If the process shuts down while a notice is held, the notice
|
|
119
|
+
The next `prompt` releases the hold and includes them in its turn. If the client paused the queue with `pause_queued_messages` before or after `abort`, the hold stays active until `resume_queued_messages`. If the process shuts down while a notice is held, Atomic saves the notice and displays it once when the session reopens.
|
|
122
120
|
|
|
123
121
|
```json
|
|
124
122
|
{"type": "abort"}
|
|
125
123
|
```
|
|
126
124
|
|
|
127
125
|
Response:
|
|
126
|
+
|
|
128
127
|
```json
|
|
129
128
|
{"type": "response", "command": "abort", "success": true}
|
|
130
129
|
```
|
|
131
130
|
|
|
132
131
|
#### clear_queue
|
|
133
132
|
|
|
134
|
-
Remove queued steering and follow-up messages and return
|
|
133
|
+
Remove all queued steering and follow-up messages and return them.
|
|
135
134
|
|
|
136
|
-
The response lists
|
|
135
|
+
The response lists the exact messages removed by this call, including anything queued after the last `queue_update` event and excluding messages already taken into a turn. Restore an editor from this response rather than from cached `queue_update` state.
|
|
137
136
|
|
|
138
137
|
```json
|
|
139
138
|
{"type": "clear_queue"}
|
|
140
139
|
```
|
|
141
140
|
|
|
142
141
|
Response:
|
|
142
|
+
|
|
143
143
|
```json
|
|
144
144
|
{
|
|
145
145
|
"type": "response",
|
|
@@ -151,79 +151,118 @@ Response:
|
|
|
151
151
|
"typed": {
|
|
152
152
|
"steering": ["Change direction"],
|
|
153
153
|
"followUp": ["Summarize when finished"]
|
|
154
|
+
},
|
|
155
|
+
"images": {
|
|
156
|
+
"steering": [null],
|
|
157
|
+
"followUp": [null]
|
|
154
158
|
}
|
|
155
159
|
}
|
|
156
160
|
}
|
|
157
161
|
```
|
|
158
162
|
|
|
159
|
-
`steering` and `followUp`
|
|
163
|
+
`steering` and `followUp` contain each message after `input` hooks, skill expansion, and prompt templates ran. `typed` contains the original submitted text when any message was transformed; restore `typed` when returning text to a user editor so expansions do not run twice (`typed` is omitted when nothing was transformed). Optional `images` carries `{ steering: (ImageContent[] | undefined)[], followUp: (ImageContent[] | undefined)[] }` aligned with the cleared messages.
|
|
164
|
+
|
|
165
|
+
To mirror interactive `Esc`, send `clear_queue` before `abort` and restore the returned messages in your editor.
|
|
166
|
+
|
|
167
|
+
#### pause_queued_messages
|
|
168
|
+
|
|
169
|
+
Hold queued steering messages, follow-up messages, and arrival notices so they do not start a new turn until released by `resume_queued_messages`.
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{"type": "pause_queued_messages"}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Response:
|
|
176
|
+
|
|
177
|
+
```json
|
|
178
|
+
{"type": "response", "command": "pause_queued_messages", "success": true}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
#### resume_queued_messages
|
|
182
|
+
|
|
183
|
+
Release a queued-message hold placed by `pause_queued_messages` or `abort`.
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{"type": "resume_queued_messages"}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Response:
|
|
190
|
+
|
|
191
|
+
```json
|
|
192
|
+
{"type": "response", "command": "resume_queued_messages", "success": true, "data": {"released": true}}
|
|
193
|
+
```
|
|
160
194
|
|
|
161
|
-
|
|
195
|
+
`data.released` is `true` if held messages were released into processing, or `false` if nothing was waiting.
|
|
162
196
|
|
|
163
197
|
#### new_session
|
|
164
198
|
|
|
165
|
-
Start a fresh session.
|
|
199
|
+
Start a fresh session. A `session_before_switch` extension hook can cancel it.
|
|
166
200
|
|
|
167
201
|
```json
|
|
168
202
|
{"type": "new_session"}
|
|
169
203
|
```
|
|
170
204
|
|
|
171
205
|
With optional parent session tracking:
|
|
206
|
+
|
|
172
207
|
```json
|
|
173
208
|
{"type": "new_session", "parentSession": "parent-session-id"}
|
|
174
209
|
```
|
|
175
210
|
|
|
176
211
|
Response:
|
|
212
|
+
|
|
177
213
|
```json
|
|
178
214
|
{"type": "response", "command": "new_session", "success": true, "data": {"cancelled": false}}
|
|
179
215
|
```
|
|
180
216
|
|
|
181
217
|
If an extension cancelled:
|
|
218
|
+
|
|
182
219
|
```json
|
|
183
220
|
{"type": "response", "command": "new_session", "success": true, "data": {"cancelled": true}}
|
|
184
221
|
```
|
|
185
222
|
|
|
186
223
|
#### delete_session
|
|
187
224
|
|
|
188
|
-
Delete a stored session and its entries from the active session store (SQLite or JSONL). Use `list_sessions` to
|
|
225
|
+
Delete a stored session and its entries from the active session store (SQLite or JSONL). Use `list_sessions` to discover IDs.
|
|
189
226
|
|
|
190
227
|
```json
|
|
191
228
|
{"id": "req-2", "type": "delete_session", "sessionId": "019fdf86-cf98-7327-8a73-21365028f6ae"}
|
|
192
229
|
```
|
|
193
230
|
|
|
194
|
-
`sessionId`
|
|
231
|
+
`sessionId` selects the session to delete, while `id` is the request correlation ID echoed in the response. If `sessionId` is omitted, `id` is used as the session ID too; if both are present, `sessionId` wins. Omitting both returns an error (`delete_session requires sessionId`).
|
|
195
232
|
|
|
196
233
|
Response:
|
|
234
|
+
|
|
197
235
|
```json
|
|
198
236
|
{"id": "req-2", "type": "response", "command": "delete_session", "success": true}
|
|
199
237
|
```
|
|
200
238
|
|
|
201
|
-
|
|
239
|
+
You cannot delete the session currently open in this process; start or switch to another session first. Deleting an ID that does not exist succeeds without error.
|
|
202
240
|
|
|
203
241
|
```json
|
|
204
242
|
{"id": "req-2", "type": "response", "command": "delete_session", "success": false, "error": "Cannot delete the session that is currently open: 019fdf86-cf98-7327-8a73-21365028f6ae"}
|
|
205
243
|
```
|
|
206
244
|
|
|
207
|
-
TypeScript `RpcClient` method: `deleteSession(sessionId)
|
|
245
|
+
TypeScript `RpcClient` method: `deleteSession(sessionId)`.
|
|
208
246
|
|
|
209
247
|
### State
|
|
210
248
|
|
|
211
249
|
#### get_state
|
|
212
250
|
|
|
213
|
-
|
|
251
|
+
Return the current session state.
|
|
214
252
|
|
|
215
253
|
```json
|
|
216
254
|
{"type": "get_state"}
|
|
217
255
|
```
|
|
218
256
|
|
|
219
257
|
Response:
|
|
258
|
+
|
|
220
259
|
```json
|
|
221
260
|
{
|
|
222
261
|
"type": "response",
|
|
223
262
|
"command": "get_state",
|
|
224
263
|
"success": true,
|
|
225
264
|
"data": {
|
|
226
|
-
"model": {
|
|
265
|
+
"model": {},
|
|
227
266
|
"thinkingLevel": "medium",
|
|
228
267
|
"isStreaming": false,
|
|
229
268
|
"isCompacting": false,
|
|
@@ -235,130 +274,177 @@ Response:
|
|
|
235
274
|
"autoCompactionEnabled": true,
|
|
236
275
|
"messageCount": 5,
|
|
237
276
|
"pendingMessageCount": 0,
|
|
277
|
+
"queuedMessagesPaused": false,
|
|
278
|
+
"projectTrusted": true,
|
|
238
279
|
"resourceErrors": [{"path": "/path/to/extension.ts", "error": "Failed to load extension: ..."}],
|
|
239
280
|
"resourceWarnings": []
|
|
240
281
|
}
|
|
241
282
|
}
|
|
242
283
|
```
|
|
243
284
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
While the session waits to retry or switch models, `retryStatus` carries the `auto_retry_start` or `model_fallback_start` event, and for a retry `retryAt` gives the countdown deadline in Unix epoch milliseconds. Use `retryStatus` rather than `isStreaming` to display a wait, because a session can stay streaming across backoff; it clears once the next request starts or the wait ends.
|
|
247
|
-
|
|
248
|
-
`turnStartedAt` gives the Unix epoch timestamp in milliseconds of the current turn's first request, stays unchanged across retries and fallbacks, and is absent when idle.
|
|
285
|
+
Key fields on `data`:
|
|
249
286
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
287
|
+
- `model`: full [Model](#model-type) object when a model is selected, or **omitted** (not `null`) when no model is active. Its `contextWindow` is the model's token budget.
|
|
288
|
+
- `modelFallbackMessage` / `modelFallbackReason`: present when startup fell back from a requested or default model.
|
|
289
|
+
- `sessionName`: display name set via `set_session_name` or `--name`, omitted when unset.
|
|
290
|
+
- `queuedMessagesPaused`: `true` when queued message delivery is currently held.
|
|
291
|
+
- `retryStatus`: present while waiting to retry or switch fallback models; carries the `auto_retry_start` or `model_fallback_start` event (and `retryAt` in Unix epoch milliseconds for retries). Use `retryStatus` rather than `isStreaming` to render retry waits.
|
|
292
|
+
- `turnStartedAt`: Unix epoch timestamp in milliseconds of the active turn's first request; stays stable across retries and fallbacks and is omitted when idle.
|
|
293
|
+
- `compactionReason` / `compactionStartedAt`: present only while `isCompacting` is `true`, reporting why compaction started and its start timestamp in Unix epoch milliseconds.
|
|
294
|
+
- `projectTrusted` / `pendingProjectResourcesTrusted`: current project trust state while deciding or after trust resolution.
|
|
295
|
+
- `resourceErrors` / `resourceWarnings`: extension load failures and warnings from the last startup or reload.
|
|
296
|
+
- `resourceOverlaps` / `resourceExtensions`: overlapping resource diagnostics and loaded extension descriptors (`{ path, sourceInfo?, hidden }`).
|
|
253
297
|
|
|
254
298
|
#### get_messages
|
|
255
299
|
|
|
256
|
-
|
|
300
|
+
Return all messages in the active conversation branch.
|
|
257
301
|
|
|
258
302
|
```json
|
|
259
303
|
{"type": "get_messages"}
|
|
260
304
|
```
|
|
261
305
|
|
|
262
306
|
Response:
|
|
307
|
+
|
|
263
308
|
```json
|
|
264
309
|
{
|
|
265
310
|
"type": "response",
|
|
266
311
|
"command": "get_messages",
|
|
267
312
|
"success": true,
|
|
268
|
-
"data": {"messages": [
|
|
313
|
+
"data": {"messages": []}
|
|
269
314
|
}
|
|
270
315
|
```
|
|
271
316
|
|
|
272
317
|
Messages are `AgentMessage` objects (see [Types](#types)).
|
|
273
318
|
|
|
319
|
+
#### stop_all_background
|
|
320
|
+
|
|
321
|
+
Cancel every running or queued background subagent and background shell owned by this session (including shells started by its subagents).
|
|
322
|
+
|
|
323
|
+
```json
|
|
324
|
+
{"type": "stop_all_background"}
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
Response:
|
|
328
|
+
|
|
329
|
+
```json
|
|
330
|
+
{
|
|
331
|
+
"type": "response",
|
|
332
|
+
"command": "stop_all_background",
|
|
333
|
+
"success": true,
|
|
334
|
+
"data": {
|
|
335
|
+
"agents": 1,
|
|
336
|
+
"shells": 2,
|
|
337
|
+
"failures": []
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
`agents` and `shells` count the tasks cancelled; `failures` lists descriptive messages for any tasks that could not be stopped.
|
|
343
|
+
|
|
274
344
|
### Model
|
|
275
345
|
|
|
276
346
|
#### set_model
|
|
277
347
|
|
|
278
|
-
Switch to a specific model. Pass optional `thinkingLevel` (`"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, or `"max"`) to
|
|
348
|
+
Switch to a specific model. Pass optional `thinkingLevel` (`"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, or `"max"`) to set both model and reasoning level in one call. Unsupported levels for that model clamp to a supported level; unrecognized values return an error response without changing the model.
|
|
279
349
|
|
|
280
|
-
Omit `persist` (or
|
|
350
|
+
Omit `persist` (or pass `false`) to change only the active session. Pass `"persist": true` to also save `defaultProvider`, `defaultModel`, and the effective thinking level in global settings, matching interactive `/model`.
|
|
281
351
|
|
|
282
352
|
```json
|
|
283
353
|
{"type": "set_model", "provider": "anthropic", "modelId": "claude-sonnet-4-20250514"}
|
|
284
354
|
```
|
|
285
355
|
|
|
286
356
|
Persist as the startup default with an explicit reasoning level:
|
|
357
|
+
|
|
287
358
|
```json
|
|
288
359
|
{"type": "set_model", "provider": "anthropic", "modelId": "claude-sonnet-4-20250514", "thinkingLevel": "high", "persist": true}
|
|
289
360
|
```
|
|
290
361
|
|
|
291
|
-
Response contains the full [Model](
|
|
362
|
+
Response contains the full [Model](#model-type) object:
|
|
363
|
+
|
|
292
364
|
```json
|
|
293
365
|
{
|
|
294
366
|
"type": "response",
|
|
295
367
|
"command": "set_model",
|
|
296
368
|
"success": true,
|
|
297
|
-
"data": {
|
|
369
|
+
"data": {}
|
|
298
370
|
}
|
|
299
371
|
```
|
|
300
372
|
|
|
301
|
-
When `persist` is true
|
|
373
|
+
When `persist` is `true`, `data` also includes `persistedDefaults` (`{ provider, modelId, thinkingLevel, defaultThinkingLevel }`) reflecting the global settings file without project overrides. Use `get_state` to read the live session model and thinking level.
|
|
302
374
|
|
|
303
375
|
#### cycle_model
|
|
304
376
|
|
|
305
|
-
Cycle to the next available model.
|
|
377
|
+
Cycle to the next available model. Pass optional `direction` (`"forward"` or `"backward"`, default `"forward"`) and optional `persist: true` to save the cycled model as the startup default.
|
|
378
|
+
|
|
379
|
+
Returns `null` when fewer than two authenticated models are available in the active scope or catalog. When an unsupported saved default is blocking prompts, a cycle that selects a different model clears that block; a `null` or unchanged result does not.
|
|
306
380
|
|
|
307
381
|
```json
|
|
308
|
-
{"type": "cycle_model"}
|
|
382
|
+
{"type": "cycle_model", "direction": "forward"}
|
|
309
383
|
```
|
|
310
384
|
|
|
311
385
|
Response:
|
|
386
|
+
|
|
312
387
|
```json
|
|
313
388
|
{
|
|
314
389
|
"type": "response",
|
|
315
390
|
"command": "cycle_model",
|
|
316
391
|
"success": true,
|
|
317
392
|
"data": {
|
|
318
|
-
"model": {
|
|
393
|
+
"model": {},
|
|
319
394
|
"thinkingLevel": "medium",
|
|
320
395
|
"isScoped": false
|
|
321
396
|
}
|
|
322
397
|
}
|
|
323
398
|
```
|
|
324
399
|
|
|
325
|
-
|
|
400
|
+
`model` is a full [Model](#model-type) object. With `persist: true`, `data` includes `persistedDefaults` in the same format as [`set_model`](#set_model).
|
|
326
401
|
|
|
327
402
|
#### set_scoped_models
|
|
328
403
|
|
|
329
|
-
Replace the
|
|
404
|
+
Replace the active session's model-cycling scope. Model cycling and scoped searches apply the new list immediately. Pass `"models": []` to clear the cycling restriction.
|
|
330
405
|
|
|
331
406
|
```json
|
|
332
407
|
{"type": "set_scoped_models", "models": [{"provider": "openai", "modelId": "o3", "thinkingLevel": "high"}]}
|
|
333
408
|
```
|
|
334
409
|
|
|
335
|
-
|
|
410
|
+
- `models` must be an array of `{ provider, modelId, thinkingLevel? }` objects; non-array values or unrecognized `thinkingLevel` values return an error response without mutating state.
|
|
411
|
+
- Entries matching a model known to the model runtime are added to `scopedModels` (even if unauthenticated); unknown model references are ignored.
|
|
412
|
+
- Optional `enabledModels` updates global `enabledModels` patterns in `settings.json` (project settings stay unchanged). Omit it to leave saved settings alone, pass an array of pattern strings (same exact, glob, and fuzzy syntax as `--models`), or pass `null` to clear saved restrictions. Non-string array entries or invalid types return an error response without modifying settings.
|
|
336
413
|
|
|
337
|
-
|
|
414
|
+
Response has `command: "set_scoped_models"` and the same catalog `data` shape as [`get_available_models`](#get_available_models), including the updated `scopedModels`.
|
|
338
415
|
|
|
339
416
|
#### get_available_models
|
|
340
417
|
|
|
341
|
-
List all configured models.
|
|
418
|
+
List all configured models and auth metadata.
|
|
342
419
|
|
|
343
420
|
```json
|
|
344
421
|
{"type": "get_available_models"}
|
|
345
422
|
```
|
|
346
423
|
|
|
347
|
-
Response contains an array of full [Model](#model) objects:
|
|
424
|
+
Response contains an array of full [Model](#model-type) objects:
|
|
425
|
+
|
|
348
426
|
```json
|
|
349
427
|
{
|
|
350
428
|
"type": "response",
|
|
351
429
|
"command": "get_available_models",
|
|
352
430
|
"success": true,
|
|
353
431
|
"data": {
|
|
354
|
-
"models": [
|
|
432
|
+
"models": [],
|
|
433
|
+
"scopedModels": [],
|
|
434
|
+
"compactorModels": [],
|
|
435
|
+
"customAuthProviders": [],
|
|
436
|
+
"oauthProviders": [],
|
|
437
|
+
"providerAuthStatuses": []
|
|
355
438
|
}
|
|
356
439
|
}
|
|
357
440
|
```
|
|
358
441
|
|
|
359
|
-
|
|
442
|
+
- `compactorModels`: dedicated compactor models registered in the session (`morph/morph-compactor`, custom `models.json` compactors, and extension-registered compactors).
|
|
443
|
+
- `customAuthProviders`: extension-registered providers (`{ id, name }`) accepting API-key login through `login_provider`.
|
|
444
|
+
- `oauthProviders`: providers supporting interactive OAuth login through `login_provider`.
|
|
445
|
+
- `providerAuthStatuses`: auth status of extension-registered providers (`{ provider, status }`, where `status` is `{ configured, source?, label? }`) when credentials do not come from `auth.json` (for example, an environment variable).
|
|
360
446
|
|
|
361
|
-
The subprocess protocol returns full `Model` objects. The
|
|
447
|
+
The raw subprocess protocol returns full `Model` objects. The TypeScript `RpcClient.getAvailableModels()` helper returns the compact `ModelInfo` shape (`provider`, `id`, `contextWindow`, `reasoning`, plus optional `compat`). When present, `compat` exposes constrained-sampling flags (`supportsStrictTools`, `supportsStrictMode`, `supportsOpenAIGrammarTools`, and the synchronized `supportsGrammarTools` alias). Treat omitted flags as unsupported; do not infer support from provider names.
|
|
362
448
|
|
|
363
449
|
```typescript
|
|
364
450
|
const models = await client.getAvailableModels();
|
|
@@ -368,9 +454,73 @@ if (capabilities?.supportsStrictTools) {
|
|
|
368
454
|
}
|
|
369
455
|
```
|
|
370
456
|
|
|
457
|
+
#### login_provider
|
|
458
|
+
|
|
459
|
+
Start an API-key or interactive OAuth sign-in flow for a provider, save the resulting credential, and refresh the catalog.
|
|
460
|
+
|
|
461
|
+
```json
|
|
462
|
+
{"type": "login_provider", "provider": "anthropic", "authType": "oauth", "loginId": "login-1"}
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
- `authType`: `"oauth"` or `"api_key"` (defaults to `"api_key"` when omitted).
|
|
466
|
+
- `loginId`: optional correlation string echoed on `oauth_*` extension UI requests so you can cancel a specific login with `cancel_login_provider`.
|
|
467
|
+
- For `"oauth"`, Atomic emits `oauth_*` requests over the [RPC extension UI protocol](/rpc/extension-ui#oauth-login-methods) and waits for interactive prompt responses.
|
|
468
|
+
|
|
469
|
+
Response when sign-in succeeds (returns the refreshed `RpcModelCatalog` plus `provider` and `cancelled: false`, without echoing the raw secret):
|
|
470
|
+
|
|
471
|
+
```json
|
|
472
|
+
{
|
|
473
|
+
"type": "response",
|
|
474
|
+
"command": "login_provider",
|
|
475
|
+
"success": true,
|
|
476
|
+
"data": {
|
|
477
|
+
"provider": "anthropic",
|
|
478
|
+
"cancelled": false,
|
|
479
|
+
"models": [],
|
|
480
|
+
"scopedModels": [],
|
|
481
|
+
"customAuthProviders": []
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
If cancelled:
|
|
487
|
+
|
|
488
|
+
```json
|
|
489
|
+
{"type": "response", "command": "login_provider", "success": true, "data": {"provider": "anthropic", "cancelled": true}}
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
#### cancel_login_provider
|
|
493
|
+
|
|
494
|
+
Cancel an in-flight `login_provider` flow. Pass the same `provider` and optional `loginId`.
|
|
495
|
+
|
|
496
|
+
```json
|
|
497
|
+
{"type": "cancel_login_provider", "provider": "anthropic", "loginId": "login-1"}
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
Response:
|
|
501
|
+
|
|
502
|
+
```json
|
|
503
|
+
{"type": "response", "command": "cancel_login_provider", "success": true}
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
#### save_provider_credential
|
|
507
|
+
|
|
508
|
+
Persist a provider `Credential` object directly (without driving interactive prompts) and return the refreshed model catalog.
|
|
509
|
+
|
|
510
|
+
```json
|
|
511
|
+
{
|
|
512
|
+
"type": "save_provider_credential",
|
|
513
|
+
"provider": "openai",
|
|
514
|
+
"credential": {"type": "api_key", "key": "sk-..."},
|
|
515
|
+
"refreshCatalog": true
|
|
516
|
+
}
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
`refreshCatalog` defaults to `true` (fetches the remote catalog before publishing the credential). Response `data` has the same `RpcModelCatalog` shape as [`get_available_models`](#get_available_models).
|
|
520
|
+
|
|
371
521
|
#### logout_provider
|
|
372
522
|
|
|
373
|
-
Remove a provider's stored credential in the
|
|
523
|
+
Remove a provider's stored credential in the running Atomic process, refresh its available-model catalog, and return the remaining auth status and catalog. Environment variables and `models.json` auth are reported but never modified.
|
|
374
524
|
|
|
375
525
|
```json
|
|
376
526
|
{"type": "logout_provider", "provider": "github-copilot"}
|
|
@@ -392,48 +542,75 @@ Response:
|
|
|
392
542
|
}
|
|
393
543
|
```
|
|
394
544
|
|
|
395
|
-
|
|
545
|
+
If authentication still comes from an environment variable, `authStatus.source` is `"environment"` and `authStatus.label` names the variable.
|
|
546
|
+
|
|
547
|
+
#### refresh_models
|
|
548
|
+
|
|
549
|
+
Refresh provider model catalogs and return the updated catalog plus any per-provider refresh errors.
|
|
550
|
+
|
|
551
|
+
```json
|
|
552
|
+
{"type": "refresh_models", "timeoutMs": 15000, "force": true, "allowNetwork": true}
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
All options (`timeoutMs`, `force`, `allowNetwork`) are optional.
|
|
556
|
+
|
|
557
|
+
Response:
|
|
558
|
+
|
|
559
|
+
```json
|
|
560
|
+
{
|
|
561
|
+
"type": "response",
|
|
562
|
+
"command": "refresh_models",
|
|
563
|
+
"success": true,
|
|
564
|
+
"data": {
|
|
565
|
+
"models": [],
|
|
566
|
+
"scopedModels": [],
|
|
567
|
+
"customAuthProviders": [],
|
|
568
|
+
"oauthProviders": [],
|
|
569
|
+
"providerAuthStatuses": [],
|
|
570
|
+
"aborted": false,
|
|
571
|
+
"errors": []
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
```
|
|
396
575
|
|
|
397
576
|
### Thinking
|
|
398
577
|
|
|
399
578
|
#### set_thinking_level
|
|
400
579
|
|
|
401
|
-
Set the reasoning
|
|
580
|
+
Set the reasoning level for models that support it. Omit `persist` (or pass `false`) to change only the current session. Pass `"persist": true` to also save `defaultThinkingLevel` and, when a model is active, its per-model override.
|
|
402
581
|
|
|
403
582
|
```json
|
|
404
583
|
{"type": "set_thinking_level", "level": "high"}
|
|
405
584
|
```
|
|
406
585
|
|
|
407
586
|
Persist as the startup default:
|
|
587
|
+
|
|
408
588
|
```json
|
|
409
589
|
{"type": "set_thinking_level", "level": "high", "persist": true}
|
|
410
590
|
```
|
|
411
591
|
|
|
412
|
-
|
|
592
|
+
Valid levels: `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"`. Passing an unrecognized `level` returns an error response (`success: false`) without changing session state or settings.
|
|
413
593
|
|
|
414
|
-
`xhigh` and `max`
|
|
594
|
+
`xhigh` and `max` apply only when the active model supports them; valid levels unsupported by the current model clamp to a supported level.
|
|
415
595
|
|
|
416
|
-
|
|
417
|
-
```json
|
|
418
|
-
{"type": "response", "command": "set_thinking_level", "success": true}
|
|
419
|
-
```
|
|
596
|
+
Current Atomic versions include the effective level after capability clamping and, when a model is active, the provider and model persisted against:
|
|
420
597
|
|
|
421
|
-
Current engines include the effective level after capability clamping and, when a model is active, the provider/model the engine persisted against:
|
|
422
598
|
```json
|
|
423
599
|
{"type": "response", "command": "set_thinking_level", "success": true, "data": {"level": "high", "provider": "anthropic", "modelId": "claude-sonnet-4-20250514"}}
|
|
424
600
|
```
|
|
425
601
|
|
|
426
|
-
|
|
602
|
+
Older clients may also encounter a data-less success response (`{"type": "response", "command": "set_thinking_level", "success": true}`). Record persisted overrides against the acknowledgement's `provider` and `modelId`, and keep newer `thinking_level_changed` events if an older acknowledgement arrives later. `RpcClient.setThinkingLevel(level)` remains a one-argument `Promise<void>` method.
|
|
427
603
|
|
|
428
604
|
#### cycle_thinking_level
|
|
429
605
|
|
|
430
|
-
Cycle through
|
|
606
|
+
Cycle through thinking levels supported by the active model. Returns `data: null` if the model does not support thinking.
|
|
431
607
|
|
|
432
608
|
```json
|
|
433
609
|
{"type": "cycle_thinking_level"}
|
|
434
610
|
```
|
|
435
611
|
|
|
436
612
|
Response:
|
|
613
|
+
|
|
437
614
|
```json
|
|
438
615
|
{
|
|
439
616
|
"type": "response",
|
|
@@ -452,6 +629,7 @@ Return the thinking levels supported by the current model, in cycle order.
|
|
|
452
629
|
```
|
|
453
630
|
|
|
454
631
|
Response:
|
|
632
|
+
|
|
455
633
|
```json
|
|
456
634
|
{
|
|
457
635
|
"type": "response",
|
|
@@ -465,34 +643,38 @@ Response:
|
|
|
465
643
|
|
|
466
644
|
#### set_steering_mode
|
|
467
645
|
|
|
468
|
-
Control how steering messages
|
|
646
|
+
Control how steering messages queued by `steer` are delivered.
|
|
469
647
|
|
|
470
648
|
```json
|
|
471
649
|
{"type": "set_steering_mode", "mode": "one-at-a-time"}
|
|
472
650
|
```
|
|
473
651
|
|
|
474
652
|
Modes:
|
|
475
|
-
|
|
476
|
-
- `"
|
|
653
|
+
|
|
654
|
+
- `"all"`: deliver all queued steering messages after the current assistant turn finishes its tool calls.
|
|
655
|
+
- `"one-at-a-time"`: deliver one steering message per completed assistant turn (default).
|
|
477
656
|
|
|
478
657
|
Response:
|
|
658
|
+
|
|
479
659
|
```json
|
|
480
660
|
{"type": "response", "command": "set_steering_mode", "success": true}
|
|
481
661
|
```
|
|
482
662
|
|
|
483
663
|
#### set_follow_up_mode
|
|
484
664
|
|
|
485
|
-
Control how follow-up messages
|
|
665
|
+
Control how follow-up messages queued by `follow_up` are delivered.
|
|
486
666
|
|
|
487
667
|
```json
|
|
488
668
|
{"type": "set_follow_up_mode", "mode": "one-at-a-time"}
|
|
489
669
|
```
|
|
490
670
|
|
|
491
671
|
Modes:
|
|
492
|
-
|
|
493
|
-
- `"
|
|
672
|
+
|
|
673
|
+
- `"all"`: deliver all queued follow-up messages when the agent finishes.
|
|
674
|
+
- `"one-at-a-time"`: deliver one follow-up message per agent completion (default).
|
|
494
675
|
|
|
495
676
|
Response:
|
|
677
|
+
|
|
496
678
|
```json
|
|
497
679
|
{"type": "response", "command": "set_follow_up_mode", "success": true}
|
|
498
680
|
```
|
|
@@ -501,20 +683,21 @@ Response:
|
|
|
501
683
|
|
|
502
684
|
#### compact
|
|
503
685
|
|
|
504
|
-
|
|
686
|
+
Stop the active run and compact the session by clearing the context window or replacing it with the configured compactor model's output. Optional `instructions` is added to the boundary message and passed as the compactor query (like `/compact <instructions>`). Rejects with `Nothing to compact` if nothing has entered the context since the last boundary. See [Compaction](/compaction) for details.
|
|
505
687
|
|
|
506
688
|
```json
|
|
507
689
|
{"type": "compact", "instructions": "keep the migration plan"}
|
|
508
690
|
```
|
|
509
691
|
|
|
510
692
|
Response:
|
|
693
|
+
|
|
511
694
|
```json
|
|
512
695
|
{
|
|
513
696
|
"type": "response",
|
|
514
697
|
"command": "compact",
|
|
515
698
|
"success": true,
|
|
516
699
|
"data": {
|
|
517
|
-
"compactedText": "Context cleared. Your earlier conversation (150,000 tokens) is no longer in your context window.
|
|
700
|
+
"compactedText": "Context cleared. Your earlier conversation (150,000 tokens) is no longer in your context window. ...",
|
|
518
701
|
"firstKeptEntryId": null,
|
|
519
702
|
"tokensBefore": 150000,
|
|
520
703
|
"promptVersion": 7,
|
|
@@ -535,32 +718,90 @@ Response:
|
|
|
535
718
|
}
|
|
536
719
|
```
|
|
537
720
|
|
|
538
|
-
`compactedText` is the
|
|
721
|
+
`compactedText` is the full boundary message seen by the model. `firstKeptEntryId` is always `null`. `form` is `"cleared"` or `"compacted"`; compacted results also carry `backend` (`"compactor"` or `"extension"`) and, for a compactor, `model`. `fallbackReason` explains why a configured compactor was skipped. See [Persistence and resume](/compaction/reference#persistence-and-resume).
|
|
539
722
|
|
|
540
723
|
`RpcClient.compact(instructions?)` sends this command and resolves with `data`.
|
|
541
724
|
|
|
542
725
|
#### set_auto_compaction
|
|
543
726
|
|
|
544
|
-
Enable or disable automatic compaction when context
|
|
727
|
+
Enable or disable automatic compaction when context approaches the model limit.
|
|
545
728
|
|
|
546
729
|
```json
|
|
547
730
|
{"type": "set_auto_compaction", "enabled": true}
|
|
548
731
|
```
|
|
549
732
|
|
|
550
733
|
Response:
|
|
734
|
+
|
|
551
735
|
```json
|
|
552
736
|
{"type": "response", "command": "set_auto_compaction", "success": true}
|
|
553
737
|
```
|
|
554
738
|
|
|
739
|
+
#### set_compaction_model
|
|
740
|
+
|
|
741
|
+
Switch the active compaction model immediately without restarting or reloading, and persist it to global or project settings (pass `"persist": false` to update only in-memory session state). Pass `""` or `"auto"` for Automatic (clear and recover), or an exact compactor `provider/model` ID. Invalid values return `errorCode: "compaction_error"` with a serialized `CompactionConfigError` that `RpcClient` rehydrates automatically.
|
|
742
|
+
|
|
743
|
+
```json
|
|
744
|
+
{"type": "set_compaction_model", "model": "my-compactor/compact-v2", "scope": "global"}
|
|
745
|
+
```
|
|
746
|
+
|
|
747
|
+
Response:
|
|
748
|
+
|
|
749
|
+
```json
|
|
750
|
+
{"type": "response", "command": "set_compaction_model", "success": true}
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
#### set_decision_model
|
|
754
|
+
|
|
755
|
+
Switch the active decision model immediately without restarting or reloading, and persist it to global or project settings (pass `"persist": false` to update only in-memory session state). Pass `""` or `"auto"` for Automatic (current chat model), or an exact registered classifier or chat `provider/model` ID.
|
|
756
|
+
|
|
757
|
+
```json
|
|
758
|
+
{"type": "set_decision_model", "model": "typesafe/jev-latest", "scope": "global"}
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
Response:
|
|
762
|
+
|
|
763
|
+
```json
|
|
764
|
+
{"type": "response", "command": "set_decision_model", "success": true}
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
#### abort_compaction
|
|
768
|
+
|
|
769
|
+
Abort an in-progress compaction run.
|
|
770
|
+
|
|
771
|
+
```json
|
|
772
|
+
{"type": "abort_compaction"}
|
|
773
|
+
```
|
|
774
|
+
|
|
775
|
+
Response:
|
|
776
|
+
|
|
777
|
+
```json
|
|
778
|
+
{"type": "response", "command": "abort_compaction", "success": true}
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
#### abort_branch_summary
|
|
782
|
+
|
|
783
|
+
Abort an in-progress branch summary run (for example during `navigate_tree` with `summarize: true`).
|
|
784
|
+
|
|
785
|
+
```json
|
|
786
|
+
{"type": "abort_branch_summary"}
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
Response:
|
|
790
|
+
|
|
791
|
+
```json
|
|
792
|
+
{"type": "response", "command": "abort_branch_summary", "success": true}
|
|
793
|
+
```
|
|
794
|
+
|
|
555
795
|
#### set_background_compaction
|
|
556
796
|
|
|
557
|
-
Background compaction was removed. `set_background_compaction` and `set_background_compaction_threshold`
|
|
797
|
+
Background compaction was removed. `set_background_compaction` and `set_background_compaction_threshold` remain accepted as no-ops for backward compatibility.
|
|
558
798
|
|
|
559
799
|
```json
|
|
560
800
|
{"type": "set_background_compaction", "enabled": false}
|
|
561
801
|
```
|
|
562
802
|
|
|
563
803
|
Response:
|
|
804
|
+
|
|
564
805
|
```json
|
|
565
806
|
{"type": "response", "command": "set_background_compaction", "success": true}
|
|
566
807
|
```
|
|
@@ -569,82 +810,103 @@ Response:
|
|
|
569
810
|
|
|
570
811
|
#### set_extension_ui_capabilities
|
|
571
812
|
|
|
572
|
-
|
|
813
|
+
Declare which optional extension UI methods the client supports. With `questionnaire: true`, `ask_user_question` sends one [`questionnaire`](/rpc/extension-ui#questionnaire) request instead of failing for lack of a terminal. Off by default; omitted fields retain their current values.
|
|
573
814
|
|
|
574
815
|
```json
|
|
575
816
|
{"type": "set_extension_ui_capabilities", "questionnaire": true}
|
|
576
817
|
```
|
|
577
818
|
|
|
578
819
|
Response:
|
|
820
|
+
|
|
579
821
|
```json
|
|
580
822
|
{"type": "response", "command": "set_extension_ui_capabilities", "success": true}
|
|
581
823
|
```
|
|
582
824
|
|
|
583
|
-
|
|
825
|
+
Older Atomic versions that lack this command return an error response, so clients can send it at startup and fall back when unsupported.
|
|
584
826
|
|
|
585
827
|
### Debug
|
|
586
828
|
|
|
587
829
|
#### set_debug
|
|
588
830
|
|
|
589
|
-
|
|
831
|
+
Enable or disable [debug mode](/development#debugging) for this Atomic process and child processes it starts afterward. Does not modify the saved `debug` setting. Passing a non-boolean `enabled` returns an error response without changing state.
|
|
590
832
|
|
|
591
833
|
```json
|
|
592
834
|
{"type": "set_debug", "enabled": true}
|
|
593
835
|
```
|
|
594
836
|
|
|
595
837
|
Response:
|
|
838
|
+
|
|
596
839
|
```json
|
|
597
840
|
{"type": "response", "command": "set_debug", "success": true}
|
|
598
841
|
```
|
|
599
842
|
|
|
600
|
-
|
|
843
|
+
Error response for a non-boolean value (reports the received type, never the value):
|
|
844
|
+
|
|
601
845
|
```json
|
|
602
|
-
{
|
|
846
|
+
{
|
|
847
|
+
"type": "response",
|
|
848
|
+
"command": "set_debug",
|
|
849
|
+
"success": false,
|
|
850
|
+
"error": "Invalid debug setting: enabled is string, not a boolean (invalid-setting). Pass true or false.",
|
|
851
|
+
"errorCode": "debug_error",
|
|
852
|
+
"errorDetails": {
|
|
853
|
+
"name": "DebugConfigError",
|
|
854
|
+
"code": "invalid-setting",
|
|
855
|
+
"message": "Invalid debug setting: enabled is string, not a boolean (invalid-setting). Pass true or false.",
|
|
856
|
+
"hint": "Pass true or false.",
|
|
857
|
+
"retryable": false,
|
|
858
|
+
"fields": {"source": "rpc", "field": "enabled", "received": "string"}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
603
861
|
```
|
|
604
862
|
|
|
605
|
-
`errorDetails` is a serialized [debug error](/sdk/reference#debug-errors)
|
|
863
|
+
`errorDetails` is a serialized [debug error](/sdk/reference#debug-errors) that `RpcClient` rehydrates automatically.
|
|
606
864
|
|
|
607
865
|
### Retry
|
|
608
866
|
|
|
609
867
|
#### set_auto_retry
|
|
610
868
|
|
|
611
|
-
Enable or disable automatic retry on transient errors (overloaded, rate limit, 5xx).
|
|
869
|
+
Enable or disable automatic retry on transient provider errors (overloaded, rate limit, 5xx).
|
|
612
870
|
|
|
613
871
|
```json
|
|
614
872
|
{"type": "set_auto_retry", "enabled": true}
|
|
615
873
|
```
|
|
616
874
|
|
|
617
875
|
Response:
|
|
876
|
+
|
|
618
877
|
```json
|
|
619
878
|
{"type": "response", "command": "set_auto_retry", "success": true}
|
|
620
879
|
```
|
|
621
880
|
|
|
622
881
|
#### abort_retry
|
|
623
882
|
|
|
624
|
-
Cancel a retry or fallback already in progress. If the
|
|
883
|
+
Cancel a retry or fallback wait already in progress. If the initial request is still running and no retry has started, `abort_retry` does nothing; use `abort` to cancel the active request.
|
|
625
884
|
|
|
626
885
|
```json
|
|
627
886
|
{"type": "abort_retry"}
|
|
628
887
|
```
|
|
629
888
|
|
|
630
889
|
Response:
|
|
890
|
+
|
|
631
891
|
```json
|
|
632
892
|
{"type": "response", "command": "abort_retry", "success": true}
|
|
633
893
|
```
|
|
634
894
|
|
|
635
|
-
###
|
|
895
|
+
### Shell commands
|
|
636
896
|
|
|
637
897
|
#### bash
|
|
638
898
|
|
|
639
|
-
Execute a shell command and add output to conversation context.
|
|
899
|
+
Execute a shell command through Atomic's `user_bash` extension hooks and add its output to conversation context (unless `excludeFromContext: true`).
|
|
640
900
|
|
|
641
901
|
```json
|
|
642
|
-
{"type": "bash", "command": "ls -la"}
|
|
902
|
+
{"id": "req-1", "type": "bash", "command": "ls -la", "excludeFromContext": false}
|
|
643
903
|
```
|
|
644
904
|
|
|
645
905
|
Response:
|
|
906
|
+
|
|
646
907
|
```json
|
|
647
908
|
{
|
|
909
|
+
"id": "req-1",
|
|
648
910
|
"type": "response",
|
|
649
911
|
"command": "bash",
|
|
650
912
|
"success": true,
|
|
@@ -657,18 +919,17 @@ Response:
|
|
|
657
919
|
}
|
|
658
920
|
```
|
|
659
921
|
|
|
660
|
-
While
|
|
922
|
+
While running, Atomic emits ordered stdout/stderr deltas correlated by the command `id`:
|
|
661
923
|
|
|
662
924
|
```json
|
|
663
|
-
{"type":"bash_execution_update","id":"req-1","channel":"stdout","delta":"building...\n"}
|
|
664
|
-
{"type":"bash_execution_update","id":"req-1","channel":"stderr","delta":"warning\n"}
|
|
925
|
+
{"type": "bash_execution_update", "id": "req-1", "channel": "stdout", "delta": "building...\n"}
|
|
926
|
+
{"type": "bash_execution_update", "id": "req-1", "channel": "stderr", "delta": "warning\n"}
|
|
665
927
|
```
|
|
666
928
|
|
|
667
|
-
`channel` is
|
|
929
|
+
`channel` is `"stdout"` or `"stderr"`. Concurrent bash commands may interleave globally but keep distinct IDs. Request ownership survives `new_session`, `switch_session`, `import_session`, `fork`, and `clone`: deltas keep the original ID and results record only into the originating session. Exactly one `response` ends each request.
|
|
668
930
|
|
|
669
|
-
|
|
931
|
+
If output was truncated, `data.fullOutputPath` points to the full log inside the owner- and session-scoped temp directory (`<tmpdir>/atomic-<uid>/<session-id>/`; see [Persisted tool output](/tools#persisted-tool-output)). `fullOutputPath` is `null` if the log could not be written.
|
|
670
932
|
|
|
671
|
-
If output was truncated, the response includes `fullOutputPath`. Persisted bash output lives in the owner- and session-scoped temp tree (`<tmpdir>/atomic-<uid>/<session-id>/`), not at the temp root (see [Tools](/tools#persisted-tool-output) for layout, permissions, size cap, and retention):
|
|
672
933
|
```json
|
|
673
934
|
{
|
|
674
935
|
"type": "response",
|
|
@@ -684,51 +945,50 @@ If output was truncated, the response includes `fullOutputPath`. Persisted bash
|
|
|
684
945
|
}
|
|
685
946
|
```
|
|
686
947
|
|
|
687
|
-
`
|
|
688
|
-
|
|
689
|
-
**How bash results reach the LLM:**
|
|
690
|
-
|
|
691
|
-
The `bash` command returns a `BashResult` and saves output in the session where the request started, even if another session becomes active before completion. The saved `BashExecutionMessage` emits no event of its own.
|
|
948
|
+
**How shell output reaches the model:** When `excludeFromContext` is not `true`, Atomic saves a `BashExecutionMessage` in the originating session (emitting no event of its own) and includes all saved bash outputs on the next `prompt` formatted as:
|
|
692
949
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
````
|
|
950
|
+
````markdown
|
|
696
951
|
Ran `ls -la`
|
|
697
|
-
```
|
|
952
|
+
```text
|
|
698
953
|
total 48
|
|
699
954
|
drwxr-xr-x ...
|
|
700
955
|
```
|
|
701
956
|
````
|
|
702
957
|
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
958
|
+
#### user_bash
|
|
959
|
+
|
|
960
|
+
Alias for interactive user shell commands (`!` / `!!`). Accepts the exact same `{ command, excludeFromContext? }` fields, invokes `user_bash` extension hooks, streams `bash_execution_update` deltas correlated by `id`, and returns a `BashResult` with `"command": "user_bash"`.
|
|
961
|
+
|
|
962
|
+
```json
|
|
963
|
+
{"id": "req-2", "type": "user_bash", "command": "git status", "excludeFromContext": true}
|
|
964
|
+
```
|
|
707
965
|
|
|
708
966
|
#### abort_bash
|
|
709
967
|
|
|
710
|
-
Abort running bash
|
|
968
|
+
Abort running RPC shell commands (`bash` or `user_bash`). Pass `requestId` to cancel one specific command by its request `id`, or omit `requestId` to cancel every active RPC-owned shell command (including ones started before a session switch). Shutting down RPC cancels and drains remaining shell commands automatically.
|
|
711
969
|
|
|
712
970
|
```json
|
|
713
|
-
{"id":"cancel-1","type":"abort_bash","requestId":"req-1"}
|
|
971
|
+
{"id": "cancel-1", "type": "abort_bash", "requestId": "req-1"}
|
|
714
972
|
```
|
|
715
973
|
|
|
716
974
|
Response:
|
|
975
|
+
|
|
717
976
|
```json
|
|
718
|
-
{"id":"cancel-1","type":"response","command":"abort_bash","success":true}
|
|
977
|
+
{"id": "cancel-1", "type": "response", "command": "abort_bash", "success": true}
|
|
719
978
|
```
|
|
720
979
|
|
|
721
980
|
### Session
|
|
722
981
|
|
|
723
982
|
#### get_session_stats
|
|
724
983
|
|
|
725
|
-
|
|
984
|
+
Return token totals, cost statistics, and current context-window usage.
|
|
726
985
|
|
|
727
986
|
```json
|
|
728
987
|
{"type": "get_session_stats"}
|
|
729
988
|
```
|
|
730
989
|
|
|
731
990
|
Response:
|
|
991
|
+
|
|
732
992
|
```json
|
|
733
993
|
{
|
|
734
994
|
"type": "response",
|
|
@@ -767,21 +1027,18 @@ Response:
|
|
|
767
1027
|
}
|
|
768
1028
|
```
|
|
769
1029
|
|
|
770
|
-
`tokens`
|
|
771
|
-
|
|
772
|
-
`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.
|
|
773
|
-
|
|
774
|
-
`latestAssistantUsage` is the usage reported by the newest assistant message, including an aborted or failed one; the interactive footer reads its cache-hit rate from it. It is omitted until the session has an assistant message.
|
|
1030
|
+
`contextUsage` is omitted when no model or context window is active. Immediately after compaction, `contextUsage.tokens` and `contextUsage.percent` are `null` until the next assistant response reports usage. `latestAssistantUsage` reports usage from the newest assistant message (including aborted or failed turns) and is omitted until the session has at least one assistant message.
|
|
775
1031
|
|
|
776
1032
|
#### get_tools
|
|
777
1033
|
|
|
778
|
-
|
|
1034
|
+
Report active tools, inactive tools and why they are off, missing configured tool names, excluded tools, and Git status.
|
|
779
1035
|
|
|
780
1036
|
```json
|
|
781
1037
|
{"type": "get_tools"}
|
|
782
1038
|
```
|
|
783
1039
|
|
|
784
|
-
Response
|
|
1040
|
+
Response (abbreviated):
|
|
1041
|
+
|
|
785
1042
|
```json
|
|
786
1043
|
{
|
|
787
1044
|
"type": "response",
|
|
@@ -817,7 +1074,7 @@ Response, shortened to three tools, for `"defaultTools": ["+codemode", "+tool-se
|
|
|
817
1074
|
"exposure": "model-only",
|
|
818
1075
|
"source": "built-in extension \"tool-search\"",
|
|
819
1076
|
"sourcePath": "builtin:tool-search",
|
|
820
|
-
"summary": "Search deferred tool metadata with BM25 and load matching tools for the next model call.
|
|
1077
|
+
"summary": "Search deferred tool metadata with BM25 and load matching tools for the next model call.",
|
|
821
1078
|
"inactiveReason": "opt-in; add \"+tool_search\" to defaultTools or --tools to enable it"
|
|
822
1079
|
}
|
|
823
1080
|
],
|
|
@@ -832,22 +1089,20 @@ Response, shortened to three tools, for `"defaultTools": ["+codemode", "+tool-se
|
|
|
832
1089
|
}
|
|
833
1090
|
```
|
|
834
1091
|
|
|
835
|
-
`selection.source` is
|
|
1092
|
+
`selection.source` is `"default-tools-setting"`, `"built-in-defaults"`, `"tools-allowlist"`, `"explicit-selection"`, `"no-built-in-tools"`, or `"no-tools"`. `get_tools` waits until extensions finish loading so their tools are included. `RpcClient.getTools()` returns `data`.
|
|
836
1093
|
|
|
837
1094
|
#### export_html
|
|
838
1095
|
|
|
839
|
-
Export session to an HTML file.
|
|
1096
|
+
Export the active session to an HTML file.
|
|
840
1097
|
|
|
841
|
-
```json
|
|
842
|
-
{"type": "export_html"}
|
|
843
|
-
```
|
|
844
|
-
|
|
845
|
-
With custom path:
|
|
846
1098
|
```json
|
|
847
1099
|
{"type": "export_html", "outputPath": "/tmp/session.html"}
|
|
848
1100
|
```
|
|
849
1101
|
|
|
1102
|
+
`outputPath` is optional.
|
|
1103
|
+
|
|
850
1104
|
Response:
|
|
1105
|
+
|
|
851
1106
|
```json
|
|
852
1107
|
{
|
|
853
1108
|
"type": "response",
|
|
@@ -859,124 +1114,135 @@ Response:
|
|
|
859
1114
|
|
|
860
1115
|
#### switch_session
|
|
861
1116
|
|
|
862
|
-
Load a
|
|
1117
|
+
Load a stored session by its exact `sessionId`. A `session_before_switch` extension hook can cancel the switch. `sessionLocation` from `get_state` is display text, not a switch target.
|
|
863
1118
|
|
|
864
1119
|
```json
|
|
865
1120
|
{"type": "switch_session", "sessionId": "abc123"}
|
|
866
1121
|
```
|
|
867
1122
|
|
|
868
|
-
When
|
|
1123
|
+
When opening a session from another project's JSONL directory, pass `sessionDirectory` so lookup stays pinned to that store. Pass `cwdOverride` to change the resumed working directory without changing the store.
|
|
869
1124
|
|
|
870
1125
|
```json
|
|
871
|
-
{"type": "switch_session", "sessionId": "abc123", "sessionDirectory": "/path/to/project-sessions"}
|
|
1126
|
+
{"type": "switch_session", "sessionId": "abc123", "sessionDirectory": "/path/to/project-sessions", "cwdOverride": "/new/project"}
|
|
872
1127
|
```
|
|
873
1128
|
|
|
874
1129
|
Response:
|
|
1130
|
+
|
|
875
1131
|
```json
|
|
876
1132
|
{"type": "response", "command": "switch_session", "success": true, "data": {"cancelled": false, "notices": []}}
|
|
877
1133
|
```
|
|
878
1134
|
|
|
879
|
-
`notices`
|
|
1135
|
+
`notices` holds resume warnings (`{"type": "warning", "message": "..."}`), such as partial [blueprint](/guides/resume-on-any-machine) builds.
|
|
1136
|
+
|
|
1137
|
+
When restoring a worktree, `switch_session` responds once the worktree is ready while the blueprint build continues in the background behind the first turn. Tool calls and `bash` commands in that worktree wait for the build, and `blueprint_build_finished` delivers any warnings. Set `resume.waitForBlueprint` to `"prompt"` to wait before responding ([details](/guides/resume-on-any-machine#start-the-first-turn-while-the-build-runs)).
|
|
880
1138
|
|
|
881
|
-
|
|
1139
|
+
If the session's stored working directory does not exist on this machine, `switch_session` fails before opening anything with `errorCode: "missing_session_cwd"` and serialized `MissingSessionCwdError` fields (`sessionCwd`, `fallbackCwd`, and optional `sessionFile`) in `errorDetails`. Retry with `cwdOverride` to open in another directory:
|
|
882
1140
|
|
|
883
|
-
If an extension cancelled the switch:
|
|
884
1141
|
```json
|
|
885
|
-
{
|
|
1142
|
+
{
|
|
1143
|
+
"type": "response",
|
|
1144
|
+
"command": "switch_session",
|
|
1145
|
+
"success": false,
|
|
1146
|
+
"error": "Stored session working directory does not exist: /old/project\nCurrent working directory: /new/project",
|
|
1147
|
+
"errorCode": "missing_session_cwd",
|
|
1148
|
+
"errorDetails": {
|
|
1149
|
+
"name": "MissingSessionCwdError",
|
|
1150
|
+
"code": "session-cwd-missing",
|
|
1151
|
+
"message": "Stored session working directory does not exist: /old/project\nCurrent working directory: /new/project",
|
|
1152
|
+
"hint": "Open the session from its original working directory, or continue or fork it when asked.",
|
|
1153
|
+
"retryable": false,
|
|
1154
|
+
"fields": {"sessionCwd": "/old/project", "fallbackCwd": "/new/project"}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
886
1157
|
```
|
|
887
1158
|
|
|
888
|
-
|
|
1159
|
+
#### import_session
|
|
1160
|
+
|
|
1161
|
+
Import a JSONL session export file into the active session store and switch to it. Can be cancelled by `session_before_switch`.
|
|
1162
|
+
|
|
1163
|
+
```json
|
|
1164
|
+
{"type": "import_session", "inputPath": "/path/to/export.jsonl", "cwdOverride": "/new/project"}
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
Response:
|
|
889
1168
|
|
|
890
1169
|
```json
|
|
891
|
-
{"type": "response", "command": "
|
|
1170
|
+
{"type": "response", "command": "import_session", "success": true, "data": {"cancelled": false, "notices": []}}
|
|
892
1171
|
```
|
|
893
1172
|
|
|
894
|
-
|
|
1173
|
+
If the exported session's working directory does not exist and `cwdOverride` was omitted, `import_session` stores nothing and fails with `errorCode: "missing_session_cwd"` (same shape as [`switch_session`](#switch_session)). Repeat with `cwdOverride` to import into another directory.
|
|
895
1174
|
|
|
896
1175
|
#### start_pending_recovery
|
|
897
1176
|
|
|
898
|
-
Recover work
|
|
1177
|
+
Recover interrupted work left by a previous process in the current session. Send this after displaying the transcript at startup or after `switch_session`.
|
|
899
1178
|
|
|
900
|
-
|
|
1179
|
+
Opening a session never recovers interrupted work automatically. This command runs once per loaded session (repeating it returns the same report) and does not block prompts or `abort`.
|
|
901
1180
|
|
|
902
1181
|
```json
|
|
903
1182
|
{"type": "start_pending_recovery", "reason": "resume"}
|
|
904
1183
|
```
|
|
905
1184
|
|
|
906
|
-
|
|
1185
|
+
Optional `reason` is `"startup"` or `"resume"`. Extensions restore background work first, interrupted deliveries replay as normal turns, and undelivered notices append without starting a turn.
|
|
907
1186
|
|
|
908
|
-
|
|
1187
|
+
Response:
|
|
909
1188
|
|
|
910
|
-
The response arrives when recovery has finished:
|
|
911
1189
|
```json
|
|
912
|
-
{
|
|
1190
|
+
{
|
|
1191
|
+
"type": "response",
|
|
1192
|
+
"command": "start_pending_recovery",
|
|
1193
|
+
"success": true,
|
|
1194
|
+
"data": {"replayed": 1, "dropped": 1, "completions": 0, "notices": ["Worker reviewer is gone."]}
|
|
1195
|
+
}
|
|
913
1196
|
```
|
|
914
1197
|
|
|
915
1198
|
#### fork
|
|
916
1199
|
|
|
917
|
-
Create a new
|
|
1200
|
+
Create a new session forked from a previous user message on the active branch. Can be cancelled by `session_before_fork`.
|
|
918
1201
|
|
|
919
1202
|
```json
|
|
920
1203
|
{"type": "fork", "entryId": "abc123"}
|
|
921
1204
|
```
|
|
922
1205
|
|
|
923
1206
|
Response:
|
|
924
|
-
```json
|
|
925
|
-
{
|
|
926
|
-
"type": "response",
|
|
927
|
-
"command": "fork",
|
|
928
|
-
"success": true,
|
|
929
|
-
"data": {"text": "The original prompt text...", "cancelled": false}
|
|
930
|
-
}
|
|
931
|
-
```
|
|
932
1207
|
|
|
933
|
-
If an extension cancelled the fork:
|
|
934
1208
|
```json
|
|
935
1209
|
{
|
|
936
1210
|
"type": "response",
|
|
937
1211
|
"command": "fork",
|
|
938
1212
|
"success": true,
|
|
939
|
-
"data": {"text": "The original prompt text...", "cancelled":
|
|
1213
|
+
"data": {"text": "The original prompt text...", "cancelled": false}
|
|
940
1214
|
}
|
|
941
1215
|
```
|
|
942
1216
|
|
|
943
1217
|
#### clone
|
|
944
1218
|
|
|
945
|
-
Duplicate the
|
|
1219
|
+
Duplicate the active branch into a new session at the current leaf entry. Can be cancelled by `session_before_fork`. Fails with `"Cannot clone session: no current entry selected"` on an empty session (`leafId === null`).
|
|
946
1220
|
|
|
947
1221
|
```json
|
|
948
1222
|
{"type": "clone"}
|
|
949
1223
|
```
|
|
950
1224
|
|
|
951
1225
|
Response:
|
|
952
|
-
```json
|
|
953
|
-
{
|
|
954
|
-
"type": "response",
|
|
955
|
-
"command": "clone",
|
|
956
|
-
"success": true,
|
|
957
|
-
"data": {"cancelled": false}
|
|
958
|
-
}
|
|
959
|
-
```
|
|
960
1226
|
|
|
961
|
-
If an extension cancelled the clone:
|
|
962
1227
|
```json
|
|
963
1228
|
{
|
|
964
1229
|
"type": "response",
|
|
965
1230
|
"command": "clone",
|
|
966
1231
|
"success": true,
|
|
967
|
-
"data": {"cancelled":
|
|
1232
|
+
"data": {"cancelled": false}
|
|
968
1233
|
}
|
|
969
1234
|
```
|
|
970
1235
|
|
|
971
1236
|
#### get_fork_messages
|
|
972
1237
|
|
|
973
|
-
|
|
1238
|
+
List user prompts available for forking across every branch, including older prompts on compacted or branched sessions (long prompts use short picker labels). Pass any returned `entryId` to `fork`.
|
|
974
1239
|
|
|
975
1240
|
```json
|
|
976
1241
|
{"type": "get_fork_messages"}
|
|
977
1242
|
```
|
|
978
1243
|
|
|
979
1244
|
Response:
|
|
1245
|
+
|
|
980
1246
|
```json
|
|
981
1247
|
{
|
|
982
1248
|
"type": "response",
|
|
@@ -993,20 +1259,16 @@ Response:
|
|
|
993
1259
|
|
|
994
1260
|
#### get_entries
|
|
995
1261
|
|
|
996
|
-
|
|
1262
|
+
Return entries in the loaded context window in append order (excluding the session header). Use [`get_history_page`](#get_history_page) to read pre-compaction history and abandoned branches.
|
|
997
1263
|
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
```json
|
|
1001
|
-
{"type": "get_entries"}
|
|
1002
|
-
```
|
|
1264
|
+
Pass the last entry ID you received as `since` to fetch only strictly newer entries. If `since` points to an older archived entry outside the loaded context window, Atomic resolves its sequence in history and returns all loaded entries with a higher sequence. Only an unknown entry ID returns `success: false`.
|
|
1003
1265
|
|
|
1004
|
-
With a cursor:
|
|
1005
1266
|
```json
|
|
1006
1267
|
{"type": "get_entries", "since": "abc123"}
|
|
1007
1268
|
```
|
|
1008
1269
|
|
|
1009
1270
|
Response:
|
|
1271
|
+
|
|
1010
1272
|
```json
|
|
1011
1273
|
{
|
|
1012
1274
|
"type": "response",
|
|
@@ -1014,32 +1276,75 @@ Response:
|
|
|
1014
1276
|
"success": true,
|
|
1015
1277
|
"data": {
|
|
1016
1278
|
"entries": [
|
|
1017
|
-
{"type": "message", "id": "def456", "parentId": "abc123", "timestamp": "
|
|
1279
|
+
{"type": "message", "id": "def456", "parentId": "abc123", "timestamp": "2026-01-01T00:00:00.000Z", "message": {"role": "user", "content": "Hello"}}
|
|
1018
1280
|
],
|
|
1019
1281
|
"leafId": "def456"
|
|
1020
1282
|
}
|
|
1021
1283
|
}
|
|
1022
1284
|
```
|
|
1023
1285
|
|
|
1024
|
-
`leafId` is the
|
|
1286
|
+
`leafId` is the current leaf entry ID (`null` on an empty session).
|
|
1025
1287
|
|
|
1026
1288
|
#### get_history_page
|
|
1027
1289
|
|
|
1028
|
-
Read one page of the saved session in append order, including abandoned branches. Pass optional inclusive `fromSeq`
|
|
1290
|
+
Read one page of the full saved session in append order, including pre-compaction entries and abandoned branches. Pass optional inclusive `fromSeq` / `toSeq` and optional `pageEntries`, or pass `cursor: data.nextCursor` (without a range) to fetch the next page.
|
|
1291
|
+
|
|
1292
|
+
```json
|
|
1293
|
+
{"type": "get_history_page", "fromSeq": 1, "pageEntries": 64}
|
|
1294
|
+
```
|
|
1295
|
+
|
|
1296
|
+
Response:
|
|
1297
|
+
|
|
1298
|
+
```json
|
|
1299
|
+
{
|
|
1300
|
+
"type": "response",
|
|
1301
|
+
"command": "get_history_page",
|
|
1302
|
+
"success": true,
|
|
1303
|
+
"data": {
|
|
1304
|
+
"items": [
|
|
1305
|
+
{"seq": 1, "entry": {"type": "message", "id": "abc123", "parentId": null}}
|
|
1306
|
+
],
|
|
1307
|
+
"nextCursor": "eyJ..."
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
```
|
|
1311
|
+
|
|
1312
|
+
Each page contains up to 64 entries and 1 MiB of serialized JSON; an entry exceeding that limit is returned alone as an oversized reference item readable via `get_history_chunk`. Later appends do not shift the snapshot's end sequence.
|
|
1029
1313
|
|
|
1030
1314
|
#### get_history_chunk
|
|
1031
1315
|
|
|
1032
|
-
Read up to 64 KiB of the original UTF-8 bytes of one oversized item
|
|
1316
|
+
Read up to 64 KiB of the original UTF-8 bytes of one oversized item returned by `get_history_page`. Pass `reference` (the complete oversized item) and `offset` (`0` for the first chunk).
|
|
1317
|
+
|
|
1318
|
+
```json
|
|
1319
|
+
{"type": "get_history_chunk", "reference": {"oversized": true, "seq": 12, "id": "big123", "byteLength": 2097152}, "offset": 0}
|
|
1320
|
+
```
|
|
1321
|
+
|
|
1322
|
+
Response:
|
|
1323
|
+
|
|
1324
|
+
```json
|
|
1325
|
+
{
|
|
1326
|
+
"type": "response",
|
|
1327
|
+
"command": "get_history_chunk",
|
|
1328
|
+
"success": true,
|
|
1329
|
+
"data": {
|
|
1330
|
+
"data": "eyJ0eXBlIjoibWVzc2FnZSI...",
|
|
1331
|
+
"nextOffset": 65536
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
```
|
|
1335
|
+
|
|
1336
|
+
Decode `data.data` from base64 and continue requesting at `data.nextOffset` until `nextOffset` is omitted. Session replacement invalidates prior references.
|
|
1033
1337
|
|
|
1034
1338
|
#### get_tree
|
|
1035
1339
|
|
|
1036
|
-
|
|
1340
|
+
Return the loaded context window as a tree of entries. Each node is `{ entry, children, label?, labelTimestamp? }`. A well-formed session has one root; orphaned entries also appear as roots.
|
|
1037
1341
|
|
|
1038
1342
|
```json
|
|
1039
1343
|
{"type": "get_tree"}
|
|
1040
1344
|
```
|
|
1041
1345
|
|
|
1042
1346
|
Response:
|
|
1347
|
+
|
|
1043
1348
|
```json
|
|
1044
1349
|
{
|
|
1045
1350
|
"type": "response",
|
|
@@ -1048,9 +1353,9 @@ Response:
|
|
|
1048
1353
|
"data": {
|
|
1049
1354
|
"tree": [
|
|
1050
1355
|
{
|
|
1051
|
-
"entry": {"type": "message", "id": "abc123", "parentId": null
|
|
1356
|
+
"entry": {"type": "message", "id": "abc123", "parentId": null},
|
|
1052
1357
|
"children": [
|
|
1053
|
-
{"entry": {"type": "message", "id": "def456", "parentId": "abc123"
|
|
1358
|
+
{"entry": {"type": "message", "id": "def456", "parentId": "abc123"}, "children": []}
|
|
1054
1359
|
]
|
|
1055
1360
|
}
|
|
1056
1361
|
],
|
|
@@ -1059,15 +1364,63 @@ Response:
|
|
|
1059
1364
|
}
|
|
1060
1365
|
```
|
|
1061
1366
|
|
|
1367
|
+
#### navigate_tree
|
|
1368
|
+
|
|
1369
|
+
Move the active branch leaf to `targetId` in the session tree, optionally summarizing the abandoned branch.
|
|
1370
|
+
|
|
1371
|
+
```json
|
|
1372
|
+
{
|
|
1373
|
+
"type": "navigate_tree",
|
|
1374
|
+
"targetId": "abc123",
|
|
1375
|
+
"options": {
|
|
1376
|
+
"summarize": true,
|
|
1377
|
+
"customInstructions": "Preserve all test outcomes",
|
|
1378
|
+
"replaceInstructions": false,
|
|
1379
|
+
"label": "before-refactor"
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
```
|
|
1383
|
+
|
|
1384
|
+
Response:
|
|
1385
|
+
|
|
1386
|
+
```json
|
|
1387
|
+
{
|
|
1388
|
+
"type": "response",
|
|
1389
|
+
"command": "navigate_tree",
|
|
1390
|
+
"success": true,
|
|
1391
|
+
"data": {
|
|
1392
|
+
"cancelled": false,
|
|
1393
|
+
"editorText": "Optional prompt text to restore"
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
```
|
|
1397
|
+
|
|
1398
|
+
`data` may also contain `aborted: true` (if branch summarization was cancelled with `abort_branch_summary`) and `summaryEntry` (`BranchSummaryEntry`) when summarization ran.
|
|
1399
|
+
|
|
1400
|
+
#### set_label
|
|
1401
|
+
|
|
1402
|
+
Attach or clear a bookmark label on a session entry. Omit `label` (or pass `undefined`) to clear an existing label.
|
|
1403
|
+
|
|
1404
|
+
```json
|
|
1405
|
+
{"type": "set_label", "entryId": "abc123", "label": "baseline"}
|
|
1406
|
+
```
|
|
1407
|
+
|
|
1408
|
+
Response:
|
|
1409
|
+
|
|
1410
|
+
```json
|
|
1411
|
+
{"type": "response", "command": "set_label", "success": true, "data": {"entryId": "label-entry-id"}}
|
|
1412
|
+
```
|
|
1413
|
+
|
|
1062
1414
|
#### get_last_assistant_text
|
|
1063
1415
|
|
|
1064
|
-
|
|
1416
|
+
Return the text content of the most recent assistant message. Messages without text from aborted or failed turns, or tool-call-only messages, are skipped. Returns `{"text": null}` if none exist.
|
|
1065
1417
|
|
|
1066
1418
|
```json
|
|
1067
1419
|
{"type": "get_last_assistant_text"}
|
|
1068
1420
|
```
|
|
1069
1421
|
|
|
1070
1422
|
Response:
|
|
1423
|
+
|
|
1071
1424
|
```json
|
|
1072
1425
|
{
|
|
1073
1426
|
"type": "response",
|
|
@@ -1077,57 +1430,87 @@ Response:
|
|
|
1077
1430
|
}
|
|
1078
1431
|
```
|
|
1079
1432
|
|
|
1080
|
-
Returns `{"text": null}` if no assistant messages exist.
|
|
1081
|
-
|
|
1082
1433
|
#### set_session_name
|
|
1083
1434
|
|
|
1084
|
-
Set a display name for the current session.
|
|
1435
|
+
Set a display name for the current session. Empty or whitespace-only names fail with `"Session name cannot be empty"`.
|
|
1085
1436
|
|
|
1086
1437
|
```json
|
|
1087
1438
|
{"type": "set_session_name", "name": "my-feature-work"}
|
|
1088
1439
|
```
|
|
1089
1440
|
|
|
1090
1441
|
Response:
|
|
1442
|
+
|
|
1091
1443
|
```json
|
|
1092
|
-
{
|
|
1093
|
-
"type": "response",
|
|
1094
|
-
"command": "set_session_name",
|
|
1095
|
-
"success": true
|
|
1096
|
-
}
|
|
1444
|
+
{"type": "response", "command": "set_session_name", "success": true}
|
|
1097
1445
|
```
|
|
1098
1446
|
|
|
1099
|
-
|
|
1447
|
+
Read the active name from `get_state.data.sessionName`, or set it at startup with `--name <name>` (`-n <name>`).
|
|
1100
1448
|
|
|
1101
1449
|
#### reload
|
|
1102
1450
|
|
|
1103
|
-
Reload keybindings, extensions, skills,
|
|
1451
|
+
Reload keybindings, extensions, skills, prompt templates, and themes (equivalent to `/reload`).
|
|
1104
1452
|
|
|
1105
1453
|
```json
|
|
1106
1454
|
{"type": "reload"}
|
|
1107
1455
|
```
|
|
1108
1456
|
|
|
1109
1457
|
Response:
|
|
1458
|
+
|
|
1459
|
+
```json
|
|
1460
|
+
{"type": "response", "command": "reload", "success": true}
|
|
1461
|
+
```
|
|
1462
|
+
|
|
1463
|
+
Before responding, Atomic emits one [`extension_error`](#extension_error) event with `"event": "reload"` for each extension that failed to load.
|
|
1464
|
+
|
|
1465
|
+
#### get_shortcuts
|
|
1466
|
+
|
|
1467
|
+
List keyboard shortcuts registered by extensions in the active session.
|
|
1468
|
+
|
|
1469
|
+
```json
|
|
1470
|
+
{"type": "get_shortcuts"}
|
|
1471
|
+
```
|
|
1472
|
+
|
|
1473
|
+
Response:
|
|
1474
|
+
|
|
1110
1475
|
```json
|
|
1111
1476
|
{
|
|
1112
1477
|
"type": "response",
|
|
1113
|
-
"command": "
|
|
1114
|
-
"success": true
|
|
1478
|
+
"command": "get_shortcuts",
|
|
1479
|
+
"success": true,
|
|
1480
|
+
"data": {
|
|
1481
|
+
"shortcuts": [
|
|
1482
|
+
{"key": "ctrl+alt+p", "description": "Toggle preview"}
|
|
1483
|
+
]
|
|
1484
|
+
}
|
|
1115
1485
|
}
|
|
1116
1486
|
```
|
|
1117
1487
|
|
|
1118
|
-
|
|
1488
|
+
#### invoke_shortcut
|
|
1119
1489
|
|
|
1120
|
-
|
|
1490
|
+
Invoke an extension-registered keyboard shortcut by its `key` string (as returned by `get_shortcuts`).
|
|
1491
|
+
|
|
1492
|
+
```json
|
|
1493
|
+
{"type": "invoke_shortcut", "key": "ctrl+alt+p"}
|
|
1494
|
+
```
|
|
1495
|
+
|
|
1496
|
+
Response:
|
|
1497
|
+
|
|
1498
|
+
```json
|
|
1499
|
+
{"type": "response", "command": "invoke_shortcut", "success": true}
|
|
1500
|
+
```
|
|
1501
|
+
|
|
1502
|
+
### Slash commands
|
|
1121
1503
|
|
|
1122
1504
|
#### get_commands
|
|
1123
1505
|
|
|
1124
|
-
|
|
1506
|
+
List slash commands available through `prompt` (extension commands, prompt templates, and skills). Invoke any returned command by prefixing its `name` with `/`.
|
|
1125
1507
|
|
|
1126
1508
|
```json
|
|
1127
1509
|
{"type": "get_commands"}
|
|
1128
1510
|
```
|
|
1129
1511
|
|
|
1130
1512
|
Response:
|
|
1513
|
+
|
|
1131
1514
|
```json
|
|
1132
1515
|
{
|
|
1133
1516
|
"type": "response",
|
|
@@ -1135,117 +1518,192 @@ Response:
|
|
|
1135
1518
|
"success": true,
|
|
1136
1519
|
"data": {
|
|
1137
1520
|
"commands": [
|
|
1138
|
-
{
|
|
1139
|
-
|
|
1140
|
-
|
|
1521
|
+
{
|
|
1522
|
+
"name": "session-name",
|
|
1523
|
+
"description": "Set or clear session name",
|
|
1524
|
+
"hasArgumentCompletions": true,
|
|
1525
|
+
"source": "extension",
|
|
1526
|
+
"sourceInfo": {
|
|
1527
|
+
"path": "/home/user/.atomic/agent/extensions/session.ts",
|
|
1528
|
+
"source": "local",
|
|
1529
|
+
"scope": "user",
|
|
1530
|
+
"origin": "top-level",
|
|
1531
|
+
"baseDir": "/home/user/.atomic/agent/extensions"
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
"name": "fix-tests",
|
|
1536
|
+
"description": "Fix failing tests",
|
|
1537
|
+
"source": "prompt",
|
|
1538
|
+
"sourceInfo": {
|
|
1539
|
+
"path": "/home/user/myproject/.atomic/prompts/fix-tests.md",
|
|
1540
|
+
"source": "local",
|
|
1541
|
+
"scope": "project",
|
|
1542
|
+
"origin": "top-level",
|
|
1543
|
+
"baseDir": "/home/user/myproject/.atomic/prompts"
|
|
1544
|
+
}
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
"name": "skill:brave-search",
|
|
1548
|
+
"description": "Web search via Brave API",
|
|
1549
|
+
"source": "skill",
|
|
1550
|
+
"sourceInfo": {
|
|
1551
|
+
"path": "/home/user/.atomic/agent/skills/brave-search/SKILL.md",
|
|
1552
|
+
"source": "local",
|
|
1553
|
+
"scope": "user",
|
|
1554
|
+
"origin": "top-level",
|
|
1555
|
+
"baseDir": "/home/user/.atomic/agent/skills/brave-search"
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1141
1558
|
]
|
|
1142
1559
|
}
|
|
1143
1560
|
}
|
|
1144
1561
|
```
|
|
1145
1562
|
|
|
1146
|
-
Each
|
|
1147
|
-
|
|
1148
|
-
- `
|
|
1149
|
-
- `
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1563
|
+
Each item (`RpcSlashCommand`) contains:
|
|
1564
|
+
|
|
1565
|
+
- `name`: command name without the leading `/` (skills are prefixed with `skill:`).
|
|
1566
|
+
- `description`: optional human-readable description.
|
|
1567
|
+
- `source`: `"extension"`, `"prompt"`, or `"skill"`.
|
|
1568
|
+
- `sourceInfo`: `SourceInfo` object (`{ path, source, scope: "user" | "project" | "temporary", origin: "package" | "top-level", baseDir? }`). There are no top-level `location` or `path` fields.
|
|
1569
|
+
- `hasArgumentCompletions`: present and `true` only on extension commands that implement `getArgumentCompletions`.
|
|
1570
|
+
|
|
1571
|
+
Built-in interactive commands (`/settings`, `/hotkeys`, and similar TUI commands) are omitted because they do not run through RPC `prompt`.
|
|
1572
|
+
|
|
1573
|
+
#### get_command_completions
|
|
1574
|
+
|
|
1575
|
+
Evaluate live argument completions for an extension command that reported `hasArgumentCompletions: true`.
|
|
1576
|
+
|
|
1577
|
+
```json
|
|
1578
|
+
{"type": "get_command_completions", "commandName": "session-name", "argumentPrefix": "feat"}
|
|
1579
|
+
```
|
|
1158
1580
|
|
|
1159
|
-
|
|
1581
|
+
Response:
|
|
1582
|
+
|
|
1583
|
+
```json
|
|
1584
|
+
{
|
|
1585
|
+
"type": "response",
|
|
1586
|
+
"command": "get_command_completions",
|
|
1587
|
+
"success": true,
|
|
1588
|
+
"data": {
|
|
1589
|
+
"completions": [
|
|
1590
|
+
{"value": "feature-auth", "label": "feature-auth", "description": "Auth work"}
|
|
1591
|
+
]
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
```
|
|
1595
|
+
|
|
1596
|
+
Returns `{"completions": null}` when the command does not exist or does not provide argument completions.
|
|
1160
1597
|
|
|
1161
1598
|
## Events
|
|
1162
1599
|
|
|
1163
|
-
Events
|
|
1600
|
+
Events stream to stdout as JSON lines. Most events carry no `id`; `bash_execution_update` is the exception and carries the originating shell command's `id`.
|
|
1164
1601
|
|
|
1165
1602
|
### Event types
|
|
1166
1603
|
|
|
1167
1604
|
| Event | Description |
|
|
1168
|
-
|
|
1169
|
-
| `agent_start` | Agent begins
|
|
1170
|
-
| `agent_end` |
|
|
1171
|
-
| `
|
|
1172
|
-
| `
|
|
1605
|
+
| --- | --- |
|
|
1606
|
+
| `agent_start` | Agent attempt begins (carries optional `turnStartedAt`) |
|
|
1607
|
+
| `agent_end` | One low-level agent loop completed (includes generated `messages` and optional `retryPending: true`) |
|
|
1608
|
+
| `agent_settled` | No automatic session work remains (`{ aborted: boolean }`) |
|
|
1609
|
+
| `session_released` | Session was released to idle storage (`{ released: ReleasedAgentSession }`) |
|
|
1610
|
+
| `entry_appended` | A durable `SessionEntry` was appended (`{ entry: SessionEntry }`) |
|
|
1611
|
+
| `session_info_changed` | Session display name changed (`{ name: string \| undefined }`) |
|
|
1612
|
+
| `model_changed` | Active model changed (`{ model, previousModel, source: "set" \| "cycle" \| "restore" \| "fallback" }`) |
|
|
1613
|
+
| `thinking_level_changed` | Active thinking level changed (`{ level }`) |
|
|
1614
|
+
| `turn_start` | New assistant turn begins |
|
|
1615
|
+
| `turn_end` | Turn completes (includes assistant `message` and `toolResults`) |
|
|
1173
1616
|
| `message_start` | Message begins |
|
|
1174
|
-
| `message_update` | Streaming
|
|
1175
|
-
| `message_end` | Message completes |
|
|
1176
|
-
| `tool_execution_start` | Tool
|
|
1177
|
-
| `tool_execution_update` | Tool
|
|
1178
|
-
| `tool_execution_end` | Tool completes |
|
|
1179
|
-
| `bash_execution_update` | Correlated
|
|
1180
|
-
| `queue_update` | Pending steering
|
|
1617
|
+
| `message_update` | Streaming delta (text, thinking, or tool call) plus cumulative `usage` |
|
|
1618
|
+
| `message_end` | Message completes (carries `entryId` and `seq` when persisted) |
|
|
1619
|
+
| `tool_execution_start` | Tool starts running (`toolCallId`, `toolName`, `args`) |
|
|
1620
|
+
| `tool_execution_update` | Tool streams partial result (`partialResult`) |
|
|
1621
|
+
| `tool_execution_end` | Tool completes (`result`, `isError`, optional `durationMs`) |
|
|
1622
|
+
| `bash_execution_update` | Correlated `bash` / `user_bash` stdout or stderr delta |
|
|
1623
|
+
| `queue_update` | Pending steering and follow-up queues changed |
|
|
1181
1624
|
| `compaction_start` | Compaction begins |
|
|
1182
|
-
| `compaction_end` | Compaction
|
|
1183
|
-
| `compaction_usage` |
|
|
1184
|
-
| `child_session_usage` |
|
|
1185
|
-
| `
|
|
1186
|
-
| `
|
|
1187
|
-
| `
|
|
1188
|
-
| `
|
|
1189
|
-
| `
|
|
1190
|
-
| `
|
|
1191
|
-
| `
|
|
1192
|
-
| `
|
|
1193
|
-
| `
|
|
1625
|
+
| `compaction_end` | Compaction completed, failed, or aborted |
|
|
1626
|
+
| `compaction_usage` | Compactor model request returned token usage |
|
|
1627
|
+
| `child_session_usage` | Child session (such as a subagent) completed one model call |
|
|
1628
|
+
| `agent_continue_error` | Post-compaction continuation failed to start (`{ source: "post_compaction", errorMessage }`) |
|
|
1629
|
+
| `auto_retry_start` | Automatic retry scheduled after a transient provider error |
|
|
1630
|
+
| `auto_retry_end` | Automatic retry loop completed or exhausted |
|
|
1631
|
+
| `model_fallback_start` | Fallback switch scheduled (`from`, `to`, optional thinking levels, `reason`, `attempt`) |
|
|
1632
|
+
| `model_fallback_end` | Fallback loop succeeded or exhausted (`success`, optional `from`, `to`, `finalError`) |
|
|
1633
|
+
| `summarization_retry_scheduled` | Branch-summary retry scheduled |
|
|
1634
|
+
| `summarization_retry_attempt_start` | Retried branch-summary request starts |
|
|
1635
|
+
| `summarization_retry_finished` | Branch-summary retry loop completed |
|
|
1636
|
+
| `task_cleanup_quarantined` | Background task cleanup failed and was quarantined (`taskId`, `resources`) |
|
|
1637
|
+
| `worktree_snapshot_unavailable` | Worktree snapshot could not be captured (`reason`) |
|
|
1638
|
+
| `extension_error` | Extension threw an error or failed to load |
|
|
1639
|
+
| `shutdown_error` | Session disposal failed during shutdown (last line before exit) |
|
|
1640
|
+
| `blueprint_build_waiting` | Resume is waiting on another process's blueprint build of the same worktree (may arrive before the first response) |
|
|
1641
|
+
| `blueprint_build_finished` | Background blueprint build for a resumed worktree finished (`notices` lists warnings) |
|
|
1194
1642
|
|
|
1195
1643
|
### agent_start
|
|
1196
1644
|
|
|
1197
|
-
Emitted when the agent begins an attempt. `turnStartedAt`
|
|
1645
|
+
Emitted when the agent begins an attempt. `turnStartedAt` records when the turn's first request began and stays unchanged across retries.
|
|
1198
1646
|
|
|
1199
1647
|
```json
|
|
1200
1648
|
{"type": "agent_start", "turnStartedAt": 1760000000000}
|
|
1201
1649
|
```
|
|
1202
1650
|
|
|
1203
|
-
### agent_end
|
|
1651
|
+
### agent_end and agent_settled
|
|
1204
1652
|
|
|
1205
|
-
|
|
1653
|
+
`agent_end` fires when one agent loop finishes and carries all messages generated during that loop. If `retryPending` is `true`, a retry or fallback is pending and can be stopped with `abort_retry`.
|
|
1206
1654
|
|
|
1207
1655
|
```json
|
|
1208
|
-
{
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1656
|
+
{"type": "agent_end", "messages": []}
|
|
1657
|
+
```
|
|
1658
|
+
|
|
1659
|
+
`agent_settled` fires once no automatic retries, compaction continuations, or queued turns remain:
|
|
1660
|
+
|
|
1661
|
+
```json
|
|
1662
|
+
{"type": "agent_settled", "aborted": false}
|
|
1212
1663
|
```
|
|
1213
1664
|
|
|
1665
|
+
### Session metadata and fallback events
|
|
1666
|
+
|
|
1667
|
+
- `session_info_changed`: `{"type": "session_info_changed", "name": "my-feature-work"}` (`name` is omitted when cleared).
|
|
1668
|
+
- `model_changed`: `{"type": "model_changed", "model": {}, "previousModel": {}, "source": "set"}` (`source` is `"set"`, `"cycle"`, `"restore"`, or `"fallback"`).
|
|
1669
|
+
- `thinking_level_changed`: `{"type": "thinking_level_changed", "level": "high"}`.
|
|
1670
|
+
- `entry_appended`: `{"type": "entry_appended", "entry": {}}`.
|
|
1671
|
+
- `session_released`: `{"type": "session_released", "released": {}}`.
|
|
1672
|
+
- `agent_continue_error`: `{"type": "agent_continue_error", "source": "post_compaction", "errorMessage": "..."}`.
|
|
1673
|
+
- `model_fallback_start` / `model_fallback_end`: bracket automatic model fallback switches across configured `fallbackModels`.
|
|
1674
|
+
- `task_cleanup_quarantined`: reports background task resources that failed cleanup (`taskId`, `resources`).
|
|
1675
|
+
- `worktree_snapshot_unavailable`: reports why a worktree snapshot could not be recorded (`reason`).
|
|
1676
|
+
|
|
1214
1677
|
### turn_start / turn_end
|
|
1215
1678
|
|
|
1216
|
-
A turn
|
|
1679
|
+
A turn covers one assistant response and any tool calls and tool results it produces.
|
|
1217
1680
|
|
|
1218
1681
|
```json
|
|
1219
1682
|
{"type": "turn_start"}
|
|
1220
1683
|
```
|
|
1221
1684
|
|
|
1222
1685
|
```json
|
|
1223
|
-
{
|
|
1224
|
-
"type": "turn_end",
|
|
1225
|
-
"message": {...},
|
|
1226
|
-
"toolResults": [...]
|
|
1227
|
-
}
|
|
1686
|
+
{"type": "turn_end", "message": {}, "toolResults": []}
|
|
1228
1687
|
```
|
|
1229
1688
|
|
|
1230
1689
|
### message_start / message_end
|
|
1231
1690
|
|
|
1232
|
-
Emitted when a message begins and completes.
|
|
1691
|
+
Emitted when a message begins and completes. `message` is an `AgentMessage`.
|
|
1233
1692
|
|
|
1234
1693
|
```json
|
|
1235
|
-
{"type": "message_start", "message": {
|
|
1236
|
-
{"type": "message_end", "message": {
|
|
1694
|
+
{"type": "message_start", "message": {}}
|
|
1695
|
+
{"type": "message_end", "message": {}, "entryId": "a1b2c3d4", "seq": 42}
|
|
1237
1696
|
```
|
|
1238
1697
|
|
|
1239
|
-
When the session saved the message
|
|
1240
|
-
sequence `seq` in the session's history. Both are absent for a message the session did not save.
|
|
1698
|
+
When the session saved the message, `message_end` also includes `entryId` and its history sequence `seq`. Both are omitted for unsaved messages.
|
|
1241
1699
|
|
|
1242
1700
|
### message_update (streaming)
|
|
1243
1701
|
|
|
1244
|
-
Emitted during
|
|
1702
|
+
Emitted during assistant message streaming with the delta and cumulative usage.
|
|
1245
1703
|
|
|
1246
|
-
`message_update`
|
|
1704
|
+
On the wire, `message_update` omits the top-level `message` snapshot and strips `assistantMessageEvent.partial`. Build incremental state from `message_start` plus deltas, then replace with the authoritative message from `message_end`.
|
|
1247
1705
|
|
|
1248
|
-
|
|
1706
|
+
Top-level `usage` holds the latest cumulative provider-reported token counts (which may stay zero until completion for providers that report usage only at the end). Top-level `endTurn` is present only when the provider reported an explicit end-of-turn flag (`AssistantMessage.endTurn`, such as OpenAI Codex `end_turn`).
|
|
1249
1707
|
|
|
1250
1708
|
```json
|
|
1251
1709
|
{
|
|
@@ -1266,10 +1724,10 @@ The top-level `usage` field carries the latest cumulative provider-reported usag
|
|
|
1266
1724
|
}
|
|
1267
1725
|
```
|
|
1268
1726
|
|
|
1269
|
-
|
|
1727
|
+
`assistantMessageEvent` delta types:
|
|
1270
1728
|
|
|
1271
1729
|
| Type | Description |
|
|
1272
|
-
|
|
1730
|
+
| --- | --- |
|
|
1273
1731
|
| `start` | Message generation started |
|
|
1274
1732
|
| `text_start` | Text content block started |
|
|
1275
1733
|
| `text_delta` | Text content chunk |
|
|
@@ -1277,23 +1735,24 @@ The `assistantMessageEvent` field contains one of these delta types:
|
|
|
1277
1735
|
| `thinking_start` | Thinking block started |
|
|
1278
1736
|
| `thinking_delta` | Thinking content chunk |
|
|
1279
1737
|
| `thinking_end` | Thinking block ended |
|
|
1280
|
-
| `toolcall_start` | Tool call started |
|
|
1738
|
+
| `toolcall_start` | Tool call started (includes top-level `id` and `toolName` added on the wire) |
|
|
1281
1739
|
| `toolcall_delta` | Tool call arguments chunk |
|
|
1282
1740
|
| `toolcall_end` | Tool call ended (includes full `toolCall` object) |
|
|
1283
|
-
| `done` | Message complete (reason
|
|
1284
|
-
| `error` | Error occurred (reason
|
|
1741
|
+
| `done` | Message complete (`reason`: `"stop"`, `"length"`, `"toolUse"`) |
|
|
1742
|
+
| `error` | Error occurred (`reason`: `"aborted"`, `"error"`) |
|
|
1285
1743
|
|
|
1286
1744
|
Example streaming a text response:
|
|
1745
|
+
|
|
1287
1746
|
```json
|
|
1288
|
-
{"type":"message_update","usage":{
|
|
1289
|
-
{"type":"message_update","usage":{
|
|
1290
|
-
{"type":"message_update","usage":{
|
|
1291
|
-
{"type":"message_update","usage":{
|
|
1747
|
+
{"type":"message_update","usage":{},"assistantMessageEvent":{"type":"text_start","contentIndex":0}}
|
|
1748
|
+
{"type":"message_update","usage":{},"assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":"Hello"}}
|
|
1749
|
+
{"type":"message_update","usage":{},"assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":" world"}}
|
|
1750
|
+
{"type":"message_update","usage":{},"assistantMessageEvent":{"type":"text_end","contentIndex":0,"content":"Hello world"}}
|
|
1292
1751
|
```
|
|
1293
1752
|
|
|
1294
1753
|
### tool_execution_start / tool_execution_update / tool_execution_end
|
|
1295
1754
|
|
|
1296
|
-
Emitted when a tool begins, streams
|
|
1755
|
+
Emitted when a tool begins, streams accumulated partial output, and completes.
|
|
1297
1756
|
|
|
1298
1757
|
```json
|
|
1299
1758
|
{
|
|
@@ -1304,8 +1763,6 @@ Emitted when a tool begins, streams progress, and completes execution.
|
|
|
1304
1763
|
}
|
|
1305
1764
|
```
|
|
1306
1765
|
|
|
1307
|
-
During execution, `tool_execution_update` events stream partial results (e.g., bash output as it arrives):
|
|
1308
|
-
|
|
1309
1766
|
```json
|
|
1310
1767
|
{
|
|
1311
1768
|
"type": "tool_execution_update",
|
|
@@ -1319,8 +1776,6 @@ During execution, `tool_execution_update` events stream partial results (e.g., b
|
|
|
1319
1776
|
}
|
|
1320
1777
|
```
|
|
1321
1778
|
|
|
1322
|
-
When complete:
|
|
1323
|
-
|
|
1324
1779
|
```json
|
|
1325
1780
|
{
|
|
1326
1781
|
"type": "tool_execution_end",
|
|
@@ -1328,17 +1783,18 @@ When complete:
|
|
|
1328
1783
|
"toolName": "bash",
|
|
1329
1784
|
"result": {
|
|
1330
1785
|
"content": [{"type": "text", "text": "total 48\n..."}],
|
|
1331
|
-
"details": {
|
|
1786
|
+
"details": {}
|
|
1332
1787
|
},
|
|
1333
|
-
"isError": false
|
|
1788
|
+
"isError": false,
|
|
1789
|
+
"durationMs": 42
|
|
1334
1790
|
}
|
|
1335
1791
|
```
|
|
1336
1792
|
|
|
1337
|
-
|
|
1793
|
+
Correlate events with `toolCallId`. `partialResult` holds the accumulated output so far, so clients can replace their rendered output on each update. Optional `durationMs` on `tool_execution_end` records execution time in milliseconds using a monotonic clock and is omitted when the tool did not execute.
|
|
1338
1794
|
|
|
1339
1795
|
### bash_execution_update
|
|
1340
1796
|
|
|
1341
|
-
Emitted only for direct `bash` and non-intercepted `user_bash` RPC
|
|
1797
|
+
Emitted only for direct `bash` and non-intercepted `user_bash` RPC commands. Each event carries `{ type, id?, channel, delta }` where `channel` is `"stdout"` or `"stderr"`. Use `id` to separate concurrent commands. Tool-call bash uses `tool_execution_update` instead.
|
|
1342
1798
|
|
|
1343
1799
|
### queue_update
|
|
1344
1800
|
|
|
@@ -1354,20 +1810,18 @@ Emitted whenever the pending steering or follow-up queue changes.
|
|
|
1354
1810
|
|
|
1355
1811
|
### compaction_start / compaction_end
|
|
1356
1812
|
|
|
1357
|
-
Emitted when
|
|
1813
|
+
Emitted when manual or automatic compaction starts and finishes. `reason` is `"manual"`, `"threshold"`, or `"overflow"`.
|
|
1358
1814
|
|
|
1359
1815
|
```json
|
|
1360
1816
|
{"type": "compaction_start", "reason": "threshold"}
|
|
1361
1817
|
```
|
|
1362
1818
|
|
|
1363
|
-
The `reason` field is `"manual"`, `"threshold"`, or `"overflow"`.
|
|
1364
|
-
|
|
1365
1819
|
```json
|
|
1366
1820
|
{
|
|
1367
1821
|
"type": "compaction_end",
|
|
1368
1822
|
"reason": "threshold",
|
|
1369
1823
|
"result": {
|
|
1370
|
-
"compactedText": "Context compacted. Your earlier conversation (150,000 tokens) was replaced by the compacted text below, produced by morph/morph-compactor.
|
|
1824
|
+
"compactedText": "Context compacted. Your earlier conversation (150,000 tokens) was replaced by the compacted text below, produced by morph/morph-compactor. ...",
|
|
1371
1825
|
"firstKeptEntryId": null,
|
|
1372
1826
|
"tokensBefore": 150000,
|
|
1373
1827
|
"promptVersion": 7,
|
|
@@ -1391,23 +1845,11 @@ The `reason` field is `"manual"`, `"threshold"`, or `"overflow"`.
|
|
|
1391
1845
|
}
|
|
1392
1846
|
```
|
|
1393
1847
|
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
If `reason` was `"overflow"` and compaction succeeds, `willRetry` is `true` and the agent will automatically retry the prompt. Public prompt/RPC callers wait for that post-compaction continuation before the prompt is considered complete.
|
|
1397
|
-
|
|
1398
|
-
If compaction was aborted, `result` is `null` and `aborted` is `true`.
|
|
1399
|
-
|
|
1400
|
-
If compaction failed (for example, the boundary could not be saved), `result` is `null`, `aborted` is `false`, and `errorMessage` contains the error description.
|
|
1401
|
-
|
|
1402
|
-
`result` and `errorMessage` are independent. A mid-turn post-tool compaction can commit a boundary and *then* fail the provider hard-input-limit gate, so one `compaction_end` may carry both a non-null `result` and an `errorMessage`. Treat the result as a committed durable boundary in that case; the error describes the follow-up request that was not sent.
|
|
1403
|
-
|
|
1404
|
-
If overflow recovery exhausts its one compact-and-retry attempt, `compaction_end` includes `"unresolvedOverflow": true` and an `errorMessage`.
|
|
1405
|
-
|
|
1406
|
-
There is no `context_compact` command; Atomic reports it as an unknown command. Use `compact`.
|
|
1848
|
+
If a compactor model fails, Atomic clears the context instead (`result.form: "cleared"` with `result.fallbackReason`). If `reason` is `"overflow"` and compaction succeeds, `willRetry` is `true` and Atomic automatically retries the prompt. If aborted, `result` is `null` and `aborted` is `true`. Check `result` and `errorMessage` independently because a mid-turn compaction can commit a durable boundary before a follow-up request exceeds the provider's hard input limit. Exhausted overflow recovery sets `"unresolvedOverflow": true` alongside `errorMessage`.
|
|
1407
1849
|
|
|
1408
1850
|
### compaction_usage
|
|
1409
1851
|
|
|
1410
|
-
Emitted once when a
|
|
1852
|
+
Emitted once when a compactor model request returns usage, even if the run later fails or cancels. Clearing context emits no `compaction_usage`. For a successful run, `compaction_end.result.usage` reports the same usage; do not double-count both.
|
|
1411
1853
|
|
|
1412
1854
|
```json
|
|
1413
1855
|
{"type": "compaction_usage", "reason": "threshold", "usage": {"input": 5000, "output": 20, "cacheRead": 0, "cacheWrite": 0, "totalTokens": 5020, "cost": {"input": 0.5, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0.5}}}
|
|
@@ -1415,7 +1857,7 @@ Emitted once when a compaction run's compactor request returns usage, including
|
|
|
1415
1857
|
|
|
1416
1858
|
### child_session_usage
|
|
1417
1859
|
|
|
1418
|
-
Emitted
|
|
1860
|
+
Emitted once per model call executed by a child session (such as a subagent or nested subagent): assistant turns, compactor requests, and cache warming.
|
|
1419
1861
|
|
|
1420
1862
|
```json
|
|
1421
1863
|
{"type": "child_session_usage", "usage": {"input": 10, "output": 0, "cacheRead": 0, "cacheWrite": 0, "totalTokens": 10, "cost": {"input": 2, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 2}}}
|
|
@@ -1423,7 +1865,7 @@ Emitted on a session once for every model call of a child session it created, su
|
|
|
1423
1865
|
|
|
1424
1866
|
### auto_retry_start / auto_retry_end
|
|
1425
1867
|
|
|
1426
|
-
Emitted when automatic retry
|
|
1868
|
+
Emitted when automatic retry runs after a transient error (overloaded, rate limit, 5xx).
|
|
1427
1869
|
|
|
1428
1870
|
```json
|
|
1429
1871
|
{
|
|
@@ -1436,53 +1878,34 @@ Emitted when automatic retry is triggered after a transient error (overloaded, r
|
|
|
1436
1878
|
```
|
|
1437
1879
|
|
|
1438
1880
|
```json
|
|
1439
|
-
{
|
|
1440
|
-
"type": "auto_retry_end",
|
|
1441
|
-
"success": true,
|
|
1442
|
-
"attempt": 2
|
|
1443
|
-
}
|
|
1881
|
+
{"type": "auto_retry_end", "success": true, "attempt": 2}
|
|
1444
1882
|
```
|
|
1445
1883
|
|
|
1446
|
-
On
|
|
1884
|
+
On exhausted retries:
|
|
1885
|
+
|
|
1447
1886
|
```json
|
|
1448
|
-
{
|
|
1449
|
-
"type": "auto_retry_end",
|
|
1450
|
-
"success": false,
|
|
1451
|
-
"attempt": 3,
|
|
1452
|
-
"finalError": "529 overloaded_error: Overloaded"
|
|
1453
|
-
}
|
|
1887
|
+
{"type": "auto_retry_end", "success": false, "attempt": 3, "finalError": "529 overloaded_error: Overloaded"}
|
|
1454
1888
|
```
|
|
1455
1889
|
|
|
1456
1890
|
### summarization_retry_scheduled / summarization_retry_attempt_start / summarization_retry_finished
|
|
1457
1891
|
|
|
1458
|
-
Emitted when branch summarization retries after a transient provider error.
|
|
1892
|
+
Emitted when branch summarization retries after a transient provider error. Compaction never retries its compactor call and clears context instead.
|
|
1459
1893
|
|
|
1460
1894
|
```json
|
|
1461
|
-
{
|
|
1462
|
-
"type": "summarization_retry_scheduled",
|
|
1463
|
-
"attempt": 1,
|
|
1464
|
-
"maxAttempts": 3,
|
|
1465
|
-
"delayMs": 2000,
|
|
1466
|
-
"errorMessage": "terminated"
|
|
1467
|
-
}
|
|
1895
|
+
{"type": "summarization_retry_scheduled", "attempt": 1, "maxAttempts": 3, "delayMs": 2000, "errorMessage": "terminated"}
|
|
1468
1896
|
```
|
|
1469
1897
|
|
|
1470
1898
|
```json
|
|
1471
|
-
{
|
|
1472
|
-
"type": "summarization_retry_attempt_start",
|
|
1473
|
-
"source": "branchSummary"
|
|
1474
|
-
}
|
|
1899
|
+
{"type": "summarization_retry_attempt_start", "source": "branchSummary"}
|
|
1475
1900
|
```
|
|
1476
1901
|
|
|
1477
|
-
The loop then emits:
|
|
1478
|
-
|
|
1479
1902
|
```json
|
|
1480
1903
|
{"type": "summarization_retry_finished"}
|
|
1481
1904
|
```
|
|
1482
1905
|
|
|
1483
1906
|
### extension_error
|
|
1484
1907
|
|
|
1485
|
-
Emitted when an extension throws an error
|
|
1908
|
+
Emitted when an extension throws an error or fails to load (`"event": "startup"` on initial startup, `"event": "reload"` during [`reload`](#reload)).
|
|
1486
1909
|
|
|
1487
1910
|
```json
|
|
1488
1911
|
{
|
|
@@ -1495,7 +1918,7 @@ Emitted when an extension throws an error. An extension that fails to load is re
|
|
|
1495
1918
|
|
|
1496
1919
|
### shutdown_error
|
|
1497
1920
|
|
|
1498
|
-
The
|
|
1921
|
+
The final line written when disposing the session failed during shutdown. Atomic attempts every cleanup step first. `code` carries the failure code (such as `"ShutdownFailed"`), and `errors` lists failed cleanup steps when multiple steps failed. The process then exits with `exitCode` (`1` after stdin close or shutdown request, `143` for `SIGTERM`, `129` for `SIGHUP`).
|
|
1499
1922
|
|
|
1500
1923
|
```json
|
|
1501
1924
|
{
|
|
@@ -1509,7 +1932,7 @@ The last line an RPC process writes when disposing its session failed during shu
|
|
|
1509
1932
|
|
|
1510
1933
|
## Error handling
|
|
1511
1934
|
|
|
1512
|
-
Failed commands return a response with `success: false`:
|
|
1935
|
+
Failed commands return a `response` with `success: false`:
|
|
1513
1936
|
|
|
1514
1937
|
```json
|
|
1515
1938
|
{
|
|
@@ -1520,7 +1943,7 @@ Failed commands return a response with `success: false`:
|
|
|
1520
1943
|
}
|
|
1521
1944
|
```
|
|
1522
1945
|
|
|
1523
|
-
|
|
1946
|
+
Invalid JSON on stdin returns a parse error response:
|
|
1524
1947
|
|
|
1525
1948
|
```json
|
|
1526
1949
|
{
|
|
@@ -1531,14 +1954,25 @@ Parse errors:
|
|
|
1531
1954
|
}
|
|
1532
1955
|
```
|
|
1533
1956
|
|
|
1957
|
+
### Structured error codes (`errorCode` and `errorDetails`)
|
|
1958
|
+
|
|
1959
|
+
Some errors attach typed `errorCode` and `errorDetails` properties that `RpcClient` rehydrates into typed errors:
|
|
1960
|
+
|
|
1961
|
+
| `errorCode` | `errorDetails` shape | When returned |
|
|
1962
|
+
| --- | --- | --- |
|
|
1963
|
+
| `"debug_error"` | `SerializedDebugError` (`name`, `code`, `message`, `hint`, `retryable`, `fields`) | Invalid argument passed to `set_debug`. |
|
|
1964
|
+
| `"missing_session_cwd"` | `SerializedMissingSessionCwdError` (`sessionCwd`, `fallbackCwd`, optional `sessionFile`) | `switch_session` or `import_session` when the recorded `cwd` does not exist and `cwdOverride` was omitted. |
|
|
1965
|
+
| `"credential_synchronization"` | `{ providerId: string, operation: "save" \| "logout" \| "oauth" }` | Credential persistence could not synchronize with the active provider store. |
|
|
1966
|
+
|
|
1534
1967
|
## Types
|
|
1535
1968
|
|
|
1536
1969
|
Exported TypeScript definitions:
|
|
1537
|
-
|
|
1970
|
+
|
|
1971
|
+
- `@bastani/atomic-ai`: `Model`, `UserMessage`, `AssistantMessage`, `ToolResultMessage`, `ImageContent`.
|
|
1538
1972
|
- `@bastani/atomic-agent-core`: `AgentMessage`, `AgentEvent`.
|
|
1539
1973
|
- `@bastani/atomic`: augments `AgentMessage` with `BashExecutionMessage`, `CustomMessage`, and `BranchSummaryMessage`, and exports `RpcClient`, `RpcEvent`, and `ModelInfo`.
|
|
1540
1974
|
|
|
1541
|
-
### Model
|
|
1975
|
+
### Model object {#model-type}
|
|
1542
1976
|
|
|
1543
1977
|
```json
|
|
1544
1978
|
{
|
|
@@ -1560,7 +1994,7 @@ Exported TypeScript definitions:
|
|
|
1560
1994
|
}
|
|
1561
1995
|
```
|
|
1562
1996
|
|
|
1563
|
-
`contextWindow` is the model's token budget used
|
|
1997
|
+
`contextWindow` is the model's token budget used for local token estimates, stats, and compaction.
|
|
1564
1998
|
|
|
1565
1999
|
### UserMessage
|
|
1566
2000
|
|
|
@@ -1572,7 +2006,17 @@ Exported TypeScript definitions:
|
|
|
1572
2006
|
}
|
|
1573
2007
|
```
|
|
1574
2008
|
|
|
1575
|
-
|
|
2009
|
+
`content` is either a string or an array of `TextContent` and `ImageContent` blocks.
|
|
2010
|
+
|
|
2011
|
+
### ImageContent
|
|
2012
|
+
|
|
2013
|
+
```json
|
|
2014
|
+
{
|
|
2015
|
+
"type": "image",
|
|
2016
|
+
"data": "base64-encoded-data",
|
|
2017
|
+
"mimeType": "image/png"
|
|
2018
|
+
}
|
|
2019
|
+
```
|
|
1576
2020
|
|
|
1577
2021
|
### AssistantMessage
|
|
1578
2022
|
|
|
@@ -1592,6 +2036,7 @@ The `content` field can be a string or an array of `TextContent`/`ImageContent`
|
|
|
1592
2036
|
"output": 50,
|
|
1593
2037
|
"cacheRead": 0,
|
|
1594
2038
|
"cacheWrite": 0,
|
|
2039
|
+
"totalTokens": 150,
|
|
1595
2040
|
"cost": {"input": 0.0003, "output": 0.00075, "cacheRead": 0, "cacheWrite": 0, "total": 0.00105}
|
|
1596
2041
|
},
|
|
1597
2042
|
"stopReason": "stop",
|
|
@@ -1599,7 +2044,7 @@ The `content` field can be a string or an array of `TextContent`/`ImageContent`
|
|
|
1599
2044
|
}
|
|
1600
2045
|
```
|
|
1601
2046
|
|
|
1602
|
-
|
|
2047
|
+
Terminal stop reasons are `"stop"`, `"length"`, `"toolUse"`, `"error"`, and `"aborted"`. On `message_start`, an in-progress assistant message carries `stopReason: "pending"` until `message_end` replaces it with the terminal reason. When a provider sends an explicit end-of-turn flag (`AssistantMessage.endTurn`), `endTurn: true` appears on the message and is echoed at the top level of `message_update`.
|
|
1603
2048
|
|
|
1604
2049
|
### ToolResultMessage
|
|
1605
2050
|
|
|
@@ -1616,7 +2061,7 @@ Stop reasons: `"stop"`, `"length"`, `"toolUse"`, `"error"`, `"aborted"`. A strea
|
|
|
1616
2061
|
|
|
1617
2062
|
### BashExecutionMessage
|
|
1618
2063
|
|
|
1619
|
-
Created by the `bash` RPC
|
|
2064
|
+
Created by the direct `bash` and `user_bash` RPC commands (not by model tool calls):
|
|
1620
2065
|
|
|
1621
2066
|
```json
|
|
1622
2067
|
{
|
|
@@ -1631,17 +2076,30 @@ Created by the `bash` RPC command (not by LLM tool calls):
|
|
|
1631
2076
|
}
|
|
1632
2077
|
```
|
|
1633
2078
|
|
|
1634
|
-
###
|
|
2079
|
+
### CustomMessage
|
|
2080
|
+
|
|
2081
|
+
Injected by extensions via `atomic.sendMessage()`:
|
|
1635
2082
|
|
|
1636
2083
|
```json
|
|
1637
2084
|
{
|
|
1638
|
-
"
|
|
1639
|
-
"
|
|
1640
|
-
"
|
|
1641
|
-
"
|
|
1642
|
-
"
|
|
1643
|
-
"
|
|
1644
|
-
|
|
1645
|
-
|
|
2085
|
+
"role": "custom",
|
|
2086
|
+
"customType": "my-extension",
|
|
2087
|
+
"content": "Deployment check passed.",
|
|
2088
|
+
"display": true,
|
|
2089
|
+
"details": {"status": "ok"},
|
|
2090
|
+
"timestamp": 1733234567890
|
|
2091
|
+
}
|
|
2092
|
+
```
|
|
2093
|
+
|
|
2094
|
+
### BranchSummaryMessage
|
|
2095
|
+
|
|
2096
|
+
Inserted when switching branches with `navigate_tree` (`summarize: true`):
|
|
2097
|
+
|
|
2098
|
+
```json
|
|
2099
|
+
{
|
|
2100
|
+
"role": "branchSummary",
|
|
2101
|
+
"summary": "Explored caching approach before switching back to the main branch.",
|
|
2102
|
+
"fromId": "entry-abc123",
|
|
2103
|
+
"timestamp": 1733234567890
|
|
1646
2104
|
}
|
|
1647
2105
|
```
|