@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/reference.md
CHANGED
|
@@ -1,45 +1,48 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Reference
|
|
2
|
+
title: "Reference index"
|
|
3
3
|
sidebarTitle: "Reference index"
|
|
4
|
-
description: "
|
|
4
|
+
description: "Look up Atomic CLI flags, settings, environment variables, keybindings, tools, storage, customization schemas, and APIs."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Look up exact commands, settings, configuration schemas, tool behaviors, and API references here. For task walkthroughs, start with [Task guides](/guides) or [Build with Atomic](/build).
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Core reference
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- [
|
|
14
|
-
- [
|
|
15
|
-
- [Environment variables](/environment-variables) documents Atomic and legacy Pi variables, provider credentials, and shell session metadata.
|
|
16
|
-
- [Keybindings](/keybindings) lists default shortcuts and custom `keybindings.json` actions.
|
|
11
|
+
- [CLI reference](/reference/cli) covers commands, flags, model-matching rules, arguments, and exit codes.
|
|
12
|
+
- [Settings](/settings) lists every `settings.json` field with defaults, scopes, and constraints.
|
|
13
|
+
- [Environment variables](/environment-variables) documents Atomic variables, value parsing rules, legacy Pi aliases, color controls, and shell session metadata.
|
|
14
|
+
- [Keybindings](/keybindings) lists default shortcuts and custom `keybindings.json` configuration rules.
|
|
17
15
|
- [Built-in tools](/tools) covers default coding tools, path selectors, and [exact-text editing](/tools#edit).
|
|
18
16
|
- [Codemode](/codemode) documents sandbox globals, tool calls, stored values, classifiers, image generation, and limits.
|
|
19
|
-
- [MCP
|
|
17
|
+
- [MCP servers](/mcp-servers) covers server configuration, tool exposure, resources, and authentication.
|
|
20
18
|
- [Web access](/web-access) documents `web_search`, `fetch_content`, `get_search_content`, `code_search`, slash commands, shortcuts, and `web-search.json`.
|
|
21
|
-
- [Session format](/session-format) specifies the JSONL format, entry types, and `SessionManager` API.
|
|
22
19
|
|
|
23
|
-
##
|
|
20
|
+
## Models, sessions, and storage
|
|
24
21
|
|
|
25
22
|
- [Provider reference](/providers/reference) covers stop reasons and credential resolution order.
|
|
26
23
|
- [Model configuration reference](/models/reference) covers provider and model overrides, variants, and API compatibility.
|
|
27
24
|
- [Models configuration](/models-configuration) lists the generated `models.json` field reference.
|
|
25
|
+
- [Session format](/session-format) specifies the JSONL format, entry types, and `SessionManager` API.
|
|
28
26
|
- [Compaction reference](/compaction/reference) covers parameters, saved boundaries, hooks, exports, settings, and historical formats.
|
|
27
|
+
- [Storage](/storage) covers local SQLite, shared libSQL and PostgreSQL databases, adapters, and CLI commands.
|
|
28
|
+
|
|
29
|
+
## Customization reference
|
|
30
|
+
|
|
29
31
|
- [Skill reference](/skills/reference) specifies `SKILL.md` frontmatter and validation rules.
|
|
30
32
|
- [Subagent reference](/subagents/reference) covers discovery, automatic model selection, fallback models, and reasoning levels.
|
|
31
|
-
- [Intercom reference](/intercom/reference) specifies the `intercom` tool
|
|
33
|
+
- [Intercom reference](/intercom/reference) specifies the `intercom` tool, delivery rules, groups, and settings.
|
|
32
34
|
- [Package reference](/packages/reference) covers package filtering, scope, and deduplication.
|
|
33
35
|
- [Theme reference](/themes/reference) specifies the theme file format, color tokens, and color values.
|
|
36
|
+
|
|
37
|
+
## API and protocol reference
|
|
38
|
+
|
|
34
39
|
- [Extension API reference](/extensions/api-reference) documents `ExtensionContext`, `ExtensionCommandContext`, and `ExtensionAPI` methods.
|
|
35
40
|
- [Extension events](/extensions/events) lists every extension event and its payload.
|
|
36
|
-
- [Provider API reference](/custom-provider/api-reference) specifies custom provider configuration and model definition
|
|
41
|
+
- [Provider API reference](/custom-provider/api-reference) specifies custom provider configuration and model definition options.
|
|
37
42
|
- [SDK API reference](/sdk/reference) covers options, loaders, return values, run modes, and exports.
|
|
38
|
-
- [Storage](/storage) covers local SQLite, shared libSQL and PostgreSQL databases, adapters, and CLI commands.
|
|
39
43
|
- [Structured decisions](/sdk/structured-decisions) documents `decide()`, structured output tools, and provider limits.
|
|
40
44
|
- [RPC protocol](/rpc/protocol) documents RPC commands, events, types, and errors.
|
|
41
|
-
- [TUI API reference](/tui/reference) specifies component, focusable, input, and rendering
|
|
42
|
-
- [Orchestration](/orchestration) explains how to launch subagents from codemode and combine their results.
|
|
45
|
+
- [TUI API reference](/tui/reference) specifies component, focusable, input, and rendering interfaces.
|
|
43
46
|
|
|
44
47
|
## Platform setup
|
|
45
48
|
|
|
@@ -50,7 +53,7 @@ Look up exact commands, settings, types, and tool contracts here. For a walkthro
|
|
|
50
53
|
- [Herdr](/herdr)
|
|
51
54
|
- [Shell aliases](/shell-aliases)
|
|
52
55
|
|
|
53
|
-
##
|
|
56
|
+
## Diagnostics and changelog
|
|
54
57
|
|
|
55
|
-
- [
|
|
58
|
+
- [Diagnostics and debugging](/development) covers debug mode, `/debug` snapshots, UI stall profiling, and conversion diagnostics.
|
|
56
59
|
- [Changelog](/changelog) lists version history and release notes.
|
package/docs/rpc/examples.md
CHANGED
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: RPC client examples
|
|
3
|
-
|
|
2
|
+
title: "RPC client examples"
|
|
3
|
+
sidebarTitle: "RPC examples"
|
|
4
|
+
description: "Connect to Atomic RPC mode using the typed RpcClient in TypeScript or a standalone Node.js script."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
# RPC client examples
|
|
7
|
-
|
|
8
7
|
## Typed TypeScript client (`RpcClient`)
|
|
9
8
|
|
|
10
|
-
Install `@bastani/atomic` and use
|
|
9
|
+
Install `@bastani/atomic` and use `RpcClient` to spawn Atomic in a child process, send typed commands, stream events, answer extension UI requests, and wait for turns to settle.
|
|
10
|
+
|
|
11
|
+
By default `RpcClient` launches `bun dist/cli.js`. To launch the installed package under Node.js, pass `runtimeExecutable: process.execPath` and resolve `@bastani/atomic/rpc-entry`. To drive an `atomic` binary already on `PATH`, pass `runtimeExecutable: "atomic"` and `cliPath: ""`.
|
|
12
|
+
|
|
13
|
+
### `RpcClientOptions`
|
|
14
|
+
|
|
15
|
+
| Option | Default | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| `cliPath` | `"dist/cli.js"` | Path to the Atomic CLI entry script (pass `""` when `runtimeExecutable` is `"atomic"`). |
|
|
18
|
+
| `cwd` | `process.cwd()` | Working directory for the child process. |
|
|
19
|
+
| `env` | `undefined` | Extra environment variables merged into the child process environment. |
|
|
20
|
+
| `provider` | `undefined` | Passed as `--provider <provider>`. |
|
|
21
|
+
| `model` | `undefined` | Passed as `--model <model>`. |
|
|
22
|
+
| `args` | `[]` | Additional CLI flags forwarded to Atomic (for example `["--no-session"]`). |
|
|
23
|
+
| `runtimeExecutable` | `"bun"` | Executable used to spawn the child process. |
|
|
24
|
+
| `runtimeArgs` | `[]` | Arguments passed to `runtimeExecutable` before `cliPath`. |
|
|
25
|
+
| `requestTimeoutMs` | `30000` | Timeout in milliseconds for short metadata and control commands. |
|
|
26
|
+
|
|
27
|
+
**Request timeout exemptions:** `requestTimeoutMs` (default `30_000` ms) applies only to short metadata and control requests such as `get_state`, `get_available_models`, `set_model`, `get_entries`, and `list_sessions`. Long-lived or interaction-gated commands (`prompt`, `steer`, `follow_up`, `resume_queued_messages`, `bash`, `user_bash`, `compact`, `login_provider`, `fork`, `clone`, `switch_session`, `new_session`, `import_session`, `navigate_tree`, `invoke_shortcut`, `start_pending_recovery`, `start_pending_recovery_restore`) and cooperative cancellation commands (`abort`, `abort_bash`, `abort_compaction`, `abort_branch_summary`, `abort_retry`, `cancel_login_provider`) are exempt and never time out on the client timer. If the child exits or the transport breaks, pending requests reject immediately.
|
|
28
|
+
|
|
29
|
+
### Basic prompt and streaming
|
|
11
30
|
|
|
12
31
|
```typescript
|
|
13
32
|
import { fileURLToPath } from "node:url";
|
|
@@ -17,6 +36,7 @@ const client = new RpcClient({
|
|
|
17
36
|
runtimeExecutable: process.execPath,
|
|
18
37
|
cliPath: fileURLToPath(import.meta.resolve("@bastani/atomic/rpc-entry")),
|
|
19
38
|
args: ["--no-session"],
|
|
39
|
+
requestTimeoutMs: 30_000,
|
|
20
40
|
});
|
|
21
41
|
|
|
22
42
|
const unsubscribe = client.onEvent((event) => {
|
|
@@ -35,15 +55,52 @@ try {
|
|
|
35
55
|
}
|
|
36
56
|
```
|
|
37
57
|
|
|
58
|
+
### Handling extension UI and questionnaires
|
|
59
|
+
|
|
60
|
+
Subscribe with `onExtensionUIRequest()` and reply with `respondExtensionUI()`. Opt in to `ask_user_question` questionnaires by calling `setExtensionUiCapabilities({ questionnaire: true })` right after `start()`:
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
await client.start();
|
|
64
|
+
await client.setExtensionUiCapabilities({ questionnaire: true });
|
|
65
|
+
|
|
66
|
+
const unsubscribeUi = client.onExtensionUIRequest((request) => {
|
|
67
|
+
if (request.method === "confirm") {
|
|
68
|
+
void client.respondExtensionUI({
|
|
69
|
+
type: "extension_ui_response",
|
|
70
|
+
id: request.id,
|
|
71
|
+
confirmed: true,
|
|
72
|
+
});
|
|
73
|
+
} else if (request.method === "select") {
|
|
74
|
+
void client.respondExtensionUI({
|
|
75
|
+
type: "extension_ui_response",
|
|
76
|
+
id: request.id,
|
|
77
|
+
value: request.options[0],
|
|
78
|
+
});
|
|
79
|
+
} else if (request.method === "questionnaire") {
|
|
80
|
+
const answers = request.questions.map((q, questionIndex) => ({
|
|
81
|
+
questionIndex,
|
|
82
|
+
question: q.question,
|
|
83
|
+
kind: "option" as const,
|
|
84
|
+
answer: q.options[0].label,
|
|
85
|
+
}));
|
|
86
|
+
void client.respondExtensionUI({
|
|
87
|
+
type: "extension_ui_response",
|
|
88
|
+
id: request.id,
|
|
89
|
+
answers,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
```
|
|
94
|
+
|
|
38
95
|
More TypeScript examples live in the repository under [`examples/rpc-client.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/rpc-client.ts), [`examples/rpc-extension-ui.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/rpc-extension-ui.ts), and [`examples/extensions/rpc-demo.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/rpc-demo.ts).
|
|
39
96
|
|
|
40
|
-
##
|
|
97
|
+
## Standalone Node.js client
|
|
41
98
|
|
|
42
|
-
This
|
|
99
|
+
This ESM script spawns an installed `atomic --mode rpc` binary without importing `@bastani/atomic`, parses stdout with strict LF-only JSONL framing (avoiding Node's `readline`, which splits on `U+2028` and `U+2029`), aborts on `SIGINT`, and closes stdin cleanly when the turn finishes:
|
|
43
100
|
|
|
44
101
|
```javascript
|
|
45
|
-
|
|
46
|
-
|
|
102
|
+
import { spawn } from "node:child_process";
|
|
103
|
+
import { StringDecoder } from "node:string_decoder";
|
|
47
104
|
|
|
48
105
|
const agent = spawn("atomic", ["--mode", "rpc", "--no-session"]);
|
|
49
106
|
|
|
@@ -61,7 +118,7 @@ function attachJsonlReader(stream, onLine) {
|
|
|
61
118
|
let line = buffer.slice(0, newlineIndex);
|
|
62
119
|
buffer = buffer.slice(newlineIndex + 1);
|
|
63
120
|
if (line.endsWith("\r")) line = line.slice(0, -1);
|
|
64
|
-
onLine(line);
|
|
121
|
+
if (line.length > 0) onLine(line);
|
|
65
122
|
}
|
|
66
123
|
});
|
|
67
124
|
|
|
@@ -76,18 +133,18 @@ function attachJsonlReader(stream, onLine) {
|
|
|
76
133
|
attachJsonlReader(agent.stdout, (line) => {
|
|
77
134
|
const event = JSON.parse(line);
|
|
78
135
|
|
|
79
|
-
if (event.type === "message_update") {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
136
|
+
if (event.type === "message_update" && event.assistantMessageEvent.type === "text_delta") {
|
|
137
|
+
process.stdout.write(event.assistantMessageEvent.delta);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (event.type === "agent_end") {
|
|
141
|
+
process.stdout.write("\n");
|
|
142
|
+
agent.stdin.end();
|
|
84
143
|
}
|
|
85
144
|
});
|
|
86
145
|
|
|
87
|
-
// Send prompt
|
|
88
146
|
agent.stdin.write(JSON.stringify({ type: "prompt", message: "Hello" }) + "\n");
|
|
89
147
|
|
|
90
|
-
// Abort on CTRL+C
|
|
91
148
|
process.on("SIGINT", () => {
|
|
92
149
|
agent.stdin.write(JSON.stringify({ type: "abort" }) + "\n");
|
|
93
150
|
});
|
package/docs/rpc/extension-ui.md
CHANGED
|
@@ -1,39 +1,49 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: RPC extension UI protocol
|
|
3
|
-
|
|
2
|
+
title: "RPC extension UI protocol"
|
|
3
|
+
sidebarTitle: "RPC UI protocol"
|
|
4
|
+
description: "Handle extension dialogs, notifications, status bars, widgets, questionnaires, and OAuth prompts over the RPC transport."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Extension UI protocol
|
|
7
|
+
<div id="extension-ui-protocol" />
|
|
9
8
|
|
|
10
9
|
Extensions request user interaction through `ctx.ui.select()`, `ctx.ui.confirm()`, and related methods. Provider OAuth logins started with `login_provider` use the same `extension_ui_request` and `extension_ui_response` sub-protocol.
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
Extension UI requests fall into three categories:
|
|
13
12
|
|
|
14
13
|
- **Dialog methods** (`select`, `confirm`, `input`, `editor`, and `questionnaire` when the client [opted in](/rpc/protocol#set_extension_ui_capabilities)): emit an `extension_ui_request` on stdout and wait until the client sends an `extension_ui_response` on stdin with the matching `id`.
|
|
15
|
-
- **Fire-and-forget UI methods** (`cancel`, `notify`, `setStatus`, `setWidget`, `setTitle`, `set_editor_text`): emit an `extension_ui_request` on stdout and expect no response. Handle `cancel` by closing its matching dialog; other methods update
|
|
14
|
+
- **Fire-and-forget UI methods** (`cancel`, `notify`, `setStatus`, `setWidget`, `setTitle`, `set_editor_text`): emit an `extension_ui_request` on stdout and expect no response. Handle `cancel` by closing its matching dialog; other methods update your display.
|
|
16
15
|
- **OAuth login methods** (`oauth_auth`, `oauth_device_code`, `oauth_progress`, `oauth_info`, `oauth_prompt`, `oauth_select`, `oauth_manual_code`, `oauth_manual_code_cancel`): drive interactive OAuth sign-in during `login_provider`. `oauth_prompt`, `oauth_select`, and `oauth_manual_code` expect an `extension_ui_response` with `value` or `cancelled: true`; the other OAuth methods are fire-and-forget.
|
|
17
16
|
|
|
18
|
-
When a dialog request
|
|
17
|
+
When a dialog request carries a `timeout` (in milliseconds) or an `AbortSignal`, Atomic resolves it automatically with its default value (`undefined` for `select`/`input`/`editor`, `false` for `confirm`, `{ answers: [], cancelled: true }` for `questionnaire`) if the timeout expires or the signal aborts. Clients do not need to run their own timers. For `select`, `confirm`, `input`, `editor`, and `questionnaire`, Atomic sends a matching `cancel` notification when the request times out or aborts. Note that `editor` does not serialize `timeout` on the wire request, even though Atomic still enforces `opts.timeout` locally and emits `cancel` if it expires.
|
|
18
|
+
|
|
19
|
+
## Unsupported and degraded methods in plain RPC mode
|
|
20
|
+
|
|
21
|
+
In RPC mode, `ctx.mode` is `"rpc"` and `ctx.hasUI` is `true` because dialog and fire-and-forget methods work through this protocol. Guard terminal-only features such as `ctx.ui.custom()` with `ctx.mode === "tui"`.
|
|
22
|
+
|
|
23
|
+
The following `ExtensionUIContext` methods are unsupported or degraded in plain RPC mode:
|
|
19
24
|
|
|
20
|
-
|
|
21
|
-
- `custom()
|
|
22
|
-
- `
|
|
23
|
-
- `
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
26
|
-
- `
|
|
25
|
+
- `setWidget(key, factory)`: passing a component factory function throws `Error("Component-factory widgets are unavailable in this RPC host.")`. Only string arrays (or `undefined` to clear) work over plain RPC.
|
|
26
|
+
- `custom()`: resolves to `undefined`.
|
|
27
|
+
- `hostSessionPicker` and `hostInputForm`: omitted (`undefined`).
|
|
28
|
+
- `setWorkingMessage()`, `setWorkingVisible()`, `setWorkingIndicator()`, `setHiddenThinkingLabel()`, `setFooter()`, `setHeader()`, `setEditorComponent()`, `addAutocompleteProvider()`, and `requestRender()`: no-ops.
|
|
29
|
+
- `onTerminalInput()`, `onHostCustomUiStateChange()`, and `onWidgetRelease()`: return a no-op unsubscribe function.
|
|
30
|
+
- `getEditorText()`: returns `""`.
|
|
31
|
+
- `getEditorComponent()`: returns `undefined`.
|
|
32
|
+
- `pasteToEditor(text)`: delegates to `setEditorText(text)` without paste-collapse handling.
|
|
33
|
+
- `getFooterDataProvider()`: returns a stub where `getGitBranch()` returns `null`, `getExtensionStatuses()` returns an empty `Map`, `getAvailableProviderCount()` returns `1`, and `onBranchChange()` returns a no-op unsubscribe function.
|
|
34
|
+
- `getHostCustomUiState()`: returns `{ blockingInlineCustomUiDepth: 0, blockingInlineCustomUiActive: false }`; `focusHostInlineCustomUi()` returns `false`.
|
|
35
|
+
- `setToolsExpanded()` and `getToolsExpanded()`: store expansion state locally for the session, matching `getChatRenderSettings().toolOutputExpanded` (not sent over the wire). `getChatRenderSettings().hideThinkingBlock` is `false`.
|
|
36
|
+
- `getAllThemes()` returns `[]`, `getTheme()` returns `undefined`, and `setTheme()` returns `{ success: false, error: "Theme switching not supported in RPC mode" }`.
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
## Extension UI requests (stdout)
|
|
29
39
|
|
|
30
|
-
|
|
40
|
+
Every request includes `type: "extension_ui_request"`, a unique `id`, and a `method`. A later `cancel` request repeats the `id` of the dialog it cancels.
|
|
31
41
|
|
|
32
|
-
|
|
42
|
+
Requests can overlap. If your client shows one dialog at a time, queue incoming dialogs instead of replacing the active one. When a `cancel` arrives for a queued dialog, remove it without showing it or sending a response.
|
|
33
43
|
|
|
34
|
-
|
|
44
|
+
### select
|
|
35
45
|
|
|
36
|
-
Prompt the user to
|
|
46
|
+
Prompt the user to pick one option from a list. If `timeout` expires, Atomic resolves with `undefined` and sends `cancel`.
|
|
37
47
|
|
|
38
48
|
```json
|
|
39
49
|
{
|
|
@@ -48,7 +58,7 @@ Prompt the user to choose from a list. Dialog methods with a `timeout` field inc
|
|
|
48
58
|
|
|
49
59
|
Expected response: `extension_ui_response` with `value` (the selected option string) or `cancelled: true`.
|
|
50
60
|
|
|
51
|
-
|
|
61
|
+
### confirm
|
|
52
62
|
|
|
53
63
|
Prompt the user for yes/no confirmation.
|
|
54
64
|
|
|
@@ -63,11 +73,11 @@ Prompt the user for yes/no confirmation.
|
|
|
63
73
|
}
|
|
64
74
|
```
|
|
65
75
|
|
|
66
|
-
Expected response: `extension_ui_response` with `confirmed: true
|
|
76
|
+
Expected response: `extension_ui_response` with `confirmed: true` or `false`, or `cancelled: true`.
|
|
67
77
|
|
|
68
|
-
|
|
78
|
+
### input
|
|
69
79
|
|
|
70
|
-
Prompt the user for
|
|
80
|
+
Prompt the user for single-line text.
|
|
71
81
|
|
|
72
82
|
```json
|
|
73
83
|
{
|
|
@@ -79,11 +89,11 @@ Prompt the user for free-form text.
|
|
|
79
89
|
}
|
|
80
90
|
```
|
|
81
91
|
|
|
82
|
-
Expected response: `extension_ui_response` with `value` (the entered
|
|
92
|
+
Expected response: `extension_ui_response` with `value` (the entered string) or `cancelled: true`.
|
|
83
93
|
|
|
84
|
-
|
|
94
|
+
### editor
|
|
85
95
|
|
|
86
|
-
Open a multi-line text editor with optional prefilled
|
|
96
|
+
Open a multi-line text editor with optional prefilled text.
|
|
87
97
|
|
|
88
98
|
```json
|
|
89
99
|
{
|
|
@@ -95,11 +105,11 @@ Open a multi-line text editor with optional prefilled content.
|
|
|
95
105
|
}
|
|
96
106
|
```
|
|
97
107
|
|
|
98
|
-
Expected response: `extension_ui_response` with `value` (the edited
|
|
108
|
+
Expected response: `extension_ui_response` with `value` (the edited string) or `cancelled: true`.
|
|
99
109
|
|
|
100
|
-
|
|
110
|
+
### cancel
|
|
101
111
|
|
|
102
|
-
Close the dialog with the matching `id` and stop reading
|
|
112
|
+
Close the dialog (`select`, `confirm`, `input`, `editor`, or `questionnaire`) with the matching `id` and stop reading input for it. The request has already ended on the agent side, so do not send a response. Ignore a `cancel` for a dialog that is already closed.
|
|
103
113
|
|
|
104
114
|
```json
|
|
105
115
|
{
|
|
@@ -109,9 +119,9 @@ Close the dialog with the matching `id` and stop reading its input. The request
|
|
|
109
119
|
}
|
|
110
120
|
```
|
|
111
121
|
|
|
112
|
-
|
|
122
|
+
### questionnaire
|
|
113
123
|
|
|
114
|
-
|
|
124
|
+
Represents one `ask_user_question` tool call: one to four questions, each with a short `header`, `options` (`label`, `description`, optional markdown `preview`), and optional `multiSelect`. Sent only when the client enabled the `questionnaire` capability through [`set_extension_ui_capabilities`](/rpc/protocol#set_extension_ui_capabilities); otherwise `ask_user_question` fails in RPC mode because no terminal is attached.
|
|
115
125
|
|
|
116
126
|
```json
|
|
117
127
|
{
|
|
@@ -131,12 +141,12 @@ A whole `ask_user_question` call: one to four questions, each with a short `head
|
|
|
131
141
|
}
|
|
132
142
|
```
|
|
133
143
|
|
|
134
|
-
Expected response: `extension_ui_response` with `answers
|
|
144
|
+
Expected response: `extension_ui_response` with `answers` (one entry per answered question) or `cancelled: true`. Each answer specifies `questionIndex`, repeats `question`, and sets `kind`:
|
|
135
145
|
|
|
136
|
-
- `option`: one of the question's options; `answer` is its label
|
|
146
|
+
- `option`: one of the question's options; `answer` is its `label`.
|
|
137
147
|
- `multi`: for a `multiSelect` question; `answer` is `null` and `selected` lists the chosen labels.
|
|
138
148
|
- `custom`: free text typed instead of an option (single-select questions without previews); `answer` is the text.
|
|
139
|
-
- `chat`: the user
|
|
149
|
+
- `chat`: the user chose to discuss instead; `answer` is their text or `null`.
|
|
140
150
|
|
|
141
151
|
```json
|
|
142
152
|
{
|
|
@@ -146,48 +156,48 @@ Expected response: `extension_ui_response` with `answers`, one per answered ques
|
|
|
146
156
|
}
|
|
147
157
|
```
|
|
148
158
|
|
|
149
|
-
Answers that
|
|
159
|
+
Answers that do not match the questions (such as an unknown option label) are rejected and fail the `ask_user_question` tool call.
|
|
150
160
|
|
|
151
|
-
|
|
161
|
+
### notify
|
|
152
162
|
|
|
153
|
-
Display a notification. Fire-and-forget
|
|
163
|
+
Display a notification. Fire-and-forget; send no response.
|
|
154
164
|
|
|
155
165
|
```json
|
|
156
166
|
{
|
|
157
167
|
"type": "extension_ui_request",
|
|
158
|
-
"id": "uuid-
|
|
168
|
+
"id": "uuid-6",
|
|
159
169
|
"method": "notify",
|
|
160
170
|
"message": "Command blocked by user",
|
|
161
171
|
"notifyType": "warning"
|
|
162
172
|
}
|
|
163
173
|
```
|
|
164
174
|
|
|
165
|
-
|
|
175
|
+
`notifyType` is `"info"`, `"warning"`, or `"error"` (defaults to `"info"` when omitted).
|
|
166
176
|
|
|
167
|
-
|
|
177
|
+
### setStatus
|
|
168
178
|
|
|
169
|
-
Set or clear a status entry in the
|
|
179
|
+
Set or clear a status entry in the status bar. Fire-and-forget.
|
|
170
180
|
|
|
171
181
|
```json
|
|
172
182
|
{
|
|
173
183
|
"type": "extension_ui_request",
|
|
174
|
-
"id": "uuid-
|
|
184
|
+
"id": "uuid-7",
|
|
175
185
|
"method": "setStatus",
|
|
176
186
|
"statusKey": "my-ext",
|
|
177
187
|
"statusText": "Turn 3 running..."
|
|
178
188
|
}
|
|
179
189
|
```
|
|
180
190
|
|
|
181
|
-
|
|
191
|
+
Omit `statusText` (or pass `undefined`) to clear the entry for `statusKey`.
|
|
182
192
|
|
|
183
|
-
|
|
193
|
+
### setWidget
|
|
184
194
|
|
|
185
|
-
Set or clear a
|
|
195
|
+
Set or clear a text widget displayed above or below the editor. Fire-and-forget.
|
|
186
196
|
|
|
187
197
|
```json
|
|
188
198
|
{
|
|
189
199
|
"type": "extension_ui_request",
|
|
190
|
-
"id": "uuid-
|
|
200
|
+
"id": "uuid-8",
|
|
191
201
|
"method": "setWidget",
|
|
192
202
|
"widgetKey": "my-ext",
|
|
193
203
|
"widgetLines": ["--- My Widget ---", "Line 1", "Line 2"],
|
|
@@ -195,37 +205,37 @@ Set or clear a widget (block of text lines) displayed above or below the editor.
|
|
|
195
205
|
}
|
|
196
206
|
```
|
|
197
207
|
|
|
198
|
-
|
|
208
|
+
Omit `widgetLines` (or pass `undefined`) to clear the widget. `widgetPlacement` is `"aboveEditor"` (default) or `"belowEditor"`. Optional `widgetScroll` (`{ maxHeight: number, maxHeightFraction?: number }`) passes scroll bounds when requested. Plain RPC supports only string arrays; passing a component factory throws `Error("Component-factory widgets are unavailable in this RPC host.")`.
|
|
199
209
|
|
|
200
|
-
|
|
210
|
+
### setTitle
|
|
201
211
|
|
|
202
|
-
Set the
|
|
212
|
+
Set the window or tab title. Fire-and-forget.
|
|
203
213
|
|
|
204
214
|
```json
|
|
205
215
|
{
|
|
206
216
|
"type": "extension_ui_request",
|
|
207
|
-
"id": "uuid-
|
|
217
|
+
"id": "uuid-9",
|
|
208
218
|
"method": "setTitle",
|
|
209
219
|
"title": "atomic - my project"
|
|
210
220
|
}
|
|
211
221
|
```
|
|
212
222
|
|
|
213
|
-
|
|
223
|
+
### set_editor_text
|
|
214
224
|
|
|
215
|
-
|
|
225
|
+
Replace the text in the input editor. Fire-and-forget.
|
|
216
226
|
|
|
217
227
|
```json
|
|
218
228
|
{
|
|
219
229
|
"type": "extension_ui_request",
|
|
220
|
-
"id": "uuid-
|
|
230
|
+
"id": "uuid-10",
|
|
221
231
|
"method": "set_editor_text",
|
|
222
232
|
"text": "prefilled text for the user"
|
|
223
233
|
}
|
|
224
234
|
```
|
|
225
235
|
|
|
226
|
-
|
|
236
|
+
### OAuth login methods
|
|
227
237
|
|
|
228
|
-
During `login_provider`, Atomic emits OAuth UI requests
|
|
238
|
+
During `login_provider`, Atomic emits OAuth UI requests containing `type: "extension_ui_request"`, `id`, `provider`, `loginId`, and `method`:
|
|
229
239
|
|
|
230
240
|
| Method | Additional fields | Response expected |
|
|
231
241
|
| --- | --- | --- |
|
|
@@ -238,11 +248,18 @@ During `login_provider`, Atomic emits OAuth UI requests carrying `type: "extensi
|
|
|
238
248
|
| `oauth_manual_code` | None | `extension_ui_response` with `value` or `cancelled: true` |
|
|
239
249
|
| `oauth_manual_code_cancel` | None | None (close pending manual-code prompt) |
|
|
240
250
|
|
|
241
|
-
|
|
251
|
+
## Extension UI responses (stdin)
|
|
252
|
+
|
|
253
|
+
Send responses for dialog methods (`select`, `confirm`, `input`, `editor`, `questionnaire`) and interactive OAuth methods (`oauth_prompt`, `oauth_select`, `oauth_manual_code`). The `id` must match the request.
|
|
254
|
+
|
|
255
|
+
**Response handling rules:**
|
|
242
256
|
|
|
243
|
-
Responses
|
|
257
|
+
- Responses with an unknown or already-resolved `id` are silently ignored.
|
|
258
|
+
- For `select`, `input`, and `editor`, a non-cancelled response without `value` resolves to `undefined`. `select` does not validate `value` against the original `options` list, so clients should send one of the offered options.
|
|
259
|
+
- For `confirm`, a non-cancelled response without `confirmed` resolves to `false`.
|
|
260
|
+
- For `questionnaire`, see [questionnaire](#questionnaire) for answer validation.
|
|
244
261
|
|
|
245
|
-
|
|
262
|
+
### Value response (`select`, `input`, `editor`)
|
|
246
263
|
|
|
247
264
|
Also used for `oauth_prompt`, `oauth_select`, and `oauth_manual_code`:
|
|
248
265
|
|
|
@@ -250,15 +267,15 @@ Also used for `oauth_prompt`, `oauth_select`, and `oauth_manual_code`:
|
|
|
250
267
|
{"type": "extension_ui_response", "id": "uuid-1", "value": "Allow"}
|
|
251
268
|
```
|
|
252
269
|
|
|
253
|
-
|
|
270
|
+
### Confirmation response (`confirm`)
|
|
254
271
|
|
|
255
272
|
```json
|
|
256
273
|
{"type": "extension_ui_response", "id": "uuid-2", "confirmed": true}
|
|
257
274
|
```
|
|
258
275
|
|
|
259
|
-
|
|
276
|
+
### Cancellation response (any dialog)
|
|
260
277
|
|
|
261
|
-
Dismiss any dialog method. The extension receives `undefined` (for select
|
|
278
|
+
Dismiss any dialog method. The extension receives `undefined` (for `select`, `input`, `editor`), `false` (for `confirm`), or `{ answers: [], cancelled: true }` (for `questionnaire`).
|
|
262
279
|
|
|
263
280
|
```json
|
|
264
281
|
{"type": "extension_ui_response", "id": "uuid-3", "cancelled": true}
|