@bastani/atomic 0.10.9-alpha.1 → 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 +69 -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.md
CHANGED
|
@@ -1,34 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "RPC"
|
|
3
|
-
|
|
2
|
+
title: "RPC mode"
|
|
3
|
+
sidebarTitle: "RPC mode"
|
|
4
|
+
description: "Drive a long-lived Atomic process over stdin and stdout using newline-delimited JSON commands and events."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
RPC mode runs Atomic headless over a JSON Lines protocol on stdin and stdout. Use it to integrate Atomic into non-Node languages, editors, IDEs, or custom UIs.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
If you are building a Node.js or TypeScript application, you can embed `AgentSession` directly with the [TypeScript SDK](/sdk) or use the typed `RpcClient` exported from `@bastani/atomic` (see [RPC client examples](/rpc/examples)). Compare all three programmatic modes on [Programmatic integration](/programmatic).
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
## Reference pages
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
A second signal exits immediately (`143` for `SIGTERM`, `129` for `SIGHUP`), and `SIGKILL` always ends the process immediately. Orderly shutdown exits with code `0`; if disposal fails, Atomic writes a [`shutdown_error`](/rpc/protocol#shutdown_error) event and exits with code `1` (or the signal's code when a signal started shutdown).
|
|
17
|
-
|
|
18
|
-
[`abort`](/rpc/protocol#abort) holds queued messages, like `Esc` in the TUI, so a client can abort and then close stdin: any queued completion notice is saved for the next session instead of failing disposal.
|
|
19
|
-
|
|
20
|
-
`get_entries`, `get_tree`, and `get_fork_messages` keep their existing response shapes (`entries`, `tree`, and `messages`). On a compacted or branched session, `get_entries` and `get_tree` cover the resident window, while `get_fork_messages` still includes prompts from older branches using short picker labels. Use [`get_history_page`](/rpc/protocol#get_history_page) (following `nextCursor`) and `get_history_chunk` to read older entries and oversized items.
|
|
21
|
-
|
|
22
|
-
## Where to go next
|
|
23
|
-
|
|
24
|
-
This page starts RPC mode and walks through a minimal Python client. Reference details live on dedicated pages:
|
|
25
|
-
|
|
26
|
-
- [RPC protocol](/rpc/protocol): every command, event, type, and error contract.
|
|
27
|
-
- [RPC extension UI protocol](/rpc/extension-ui): drive extension-rendered UI and OAuth prompts over RPC.
|
|
28
|
-
- [RPC client examples](/rpc/examples): Node.js and `RpcClient` client implementations.
|
|
29
|
-
- [Stored session summaries](/rpc/protocol#stored-session-summaries): read session summaries without starting a model turn.
|
|
30
|
-
|
|
31
|
-
Compare RPC mode with the SDK and JSON mode on [Programmatic use](/programmatic).
|
|
13
|
+
- [RPC protocol reference](/rpc/protocol): every command, streamed event, error code, and JSON type.
|
|
14
|
+
- [RPC extension UI protocol](/rpc/extension-ui): handle extension dialogs, widgets, questionnaires, and OAuth prompts.
|
|
15
|
+
- [RPC client examples](/rpc/examples): TypeScript `RpcClient` and standalone Node.js examples.
|
|
16
|
+
- [Stored session summaries](/rpc/protocol#stored-session-summaries): inspect saved sessions without starting a model turn.
|
|
32
17
|
|
|
33
18
|
## Starting RPC mode
|
|
34
19
|
|
|
@@ -36,163 +21,102 @@ Compare RPC mode with the SDK and JSON mode on [Programmatic use](/programmatic)
|
|
|
36
21
|
atomic --mode rpc [options]
|
|
37
22
|
```
|
|
38
23
|
|
|
39
|
-
Common options:
|
|
40
|
-
|
|
41
|
-
- `--
|
|
24
|
+
Common startup options:
|
|
25
|
+
|
|
26
|
+
- `--provider <name>`: select the model provider (`anthropic`, `openai`, `google`, and others).
|
|
27
|
+
- `--model <pattern>`: select a model by `provider/id` or pattern, with optional `:<thinking>` level.
|
|
28
|
+
- `--models <patterns>`: restrict scoped models (comma-separated patterns).
|
|
29
|
+
- `--thinking <level>`: set the initial thinking level.
|
|
30
|
+
- `--session <id>` / `--continue` (`-c`) / `--resume` (`-r`): open or resume a stored session.
|
|
42
31
|
- `--name <name>` / `-n <name>`: set the session display name at startup.
|
|
43
|
-
- `--no-session`: run without a resumable session (
|
|
32
|
+
- `--no-session`: run without a resumable session (released idle history may still page to disk; see [Sessions](/sessions)).
|
|
44
33
|
- `--session-dir <path>`: custom session storage directory.
|
|
45
34
|
- `--storage '<json>'` / `--storage-file <path>`: select storage for this process's sessions.
|
|
35
|
+
- `--tools <list>` / `--no-tools` / `--exclude-tools <list>`: control which tools are active.
|
|
46
36
|
|
|
47
|
-
To
|
|
37
|
+
To isolate an RPC subprocess's session store without changing user settings, start it with `ATOMIC_STORAGE` or `--storage` set to the same JSON object as the `storage` setting (for example, an adapter config reading secrets from `{ "env": "..." }`). `list_sessions` reports that store while other `atomic` processes keep their own settings. Invalid storage selections fail at startup with `StorageConfigError`. See [Selecting storage per process](/storage#selecting-storage-per-process).
|
|
48
38
|
|
|
49
39
|
## Protocol overview
|
|
50
40
|
|
|
51
|
-
- **Commands**: JSON objects
|
|
52
|
-
- **Responses**: JSON objects with `type: "response"`
|
|
41
|
+
- **Commands**: JSON objects written to stdin, one per line.
|
|
42
|
+
- **Responses**: JSON objects with `type: "response"` reporting command success or failure.
|
|
53
43
|
- **Events**: session events streamed to stdout as JSON lines.
|
|
54
44
|
|
|
55
|
-
Every command accepts an optional `id`
|
|
45
|
+
Every command accepts an optional `id` string for request correlation. When you send `id`, the matching response echoes the same `id`.
|
|
56
46
|
|
|
57
|
-
If a
|
|
47
|
+
If a saved default `provider/model` names a provider that remains unsupported after startup, the process stays alive and `prompt` returns a correlated error containing the configuration diagnostic before emitting any event. Non-prompt commands such as `get_available_models` keep working. Clear the error state with a successful explicit `set_model`, or a `cycle_model` that switches to a different available model (an unchanged or `null` cycle does not clear it). Supported providers with an unknown model or missing credentials fall back automatically as usual.
|
|
48
|
+
|
|
49
|
+
On compacted or branched sessions, `get_entries` and `get_tree` return the loaded context window, while `get_fork_messages` still includes prompts from older branches using short picker labels. Use [`get_history_page`](/rpc/protocol#get_history_page) (following `nextCursor`) and `get_history_chunk` to read older entries and oversized items.
|
|
58
50
|
|
|
59
51
|
### Framing
|
|
60
52
|
|
|
61
53
|
RPC mode uses strict JSONL framing with LF (`\n`) as the only record delimiter.
|
|
62
54
|
|
|
63
|
-
Atomic imposes no line-size
|
|
55
|
+
Atomic imposes no line-size cap on RPC JSONL records; commands, responses, and events serialize in full. Account for memory and latency on large tool outputs or images, and do not enforce smaller line limits unless you intend to reject valid output.
|
|
64
56
|
|
|
65
57
|
Client framing rules:
|
|
58
|
+
|
|
66
59
|
- Split records on `\n` only.
|
|
67
|
-
-
|
|
68
|
-
- Avoid generic line readers that split on Unicode line separators
|
|
60
|
+
- Strip an optional trailing `\r` from `\r\n` lines.
|
|
61
|
+
- Avoid generic line readers that split on Unicode line separators (`U+2028`, `U+2029`) or bare `\r`.
|
|
62
|
+
|
|
63
|
+
Node's `readline` module is not protocol-compliant because it splits on `U+2028` and `U+2029`, which are valid unescaped inside JSON strings. Similarly, Python's `text=True` universal newlines mode splits on bare `\r`; read raw bytes and split on `b"\n"`.
|
|
64
|
+
|
|
65
|
+
## Shutdown and signals
|
|
69
66
|
|
|
70
|
-
|
|
67
|
+
- Closing stdin, `SIGTERM`, and `SIGHUP` start an orderly shutdown that disposes the active session before exiting. Once shutdown begins, closing stdin or sending a single signal does not interrupt cleanup, so closing stdin and sending `SIGTERM` together still lets disposal finish.
|
|
68
|
+
- Standalone RPC mode does not register `SIGHUP` on Windows, and skips `SIGHUP` on Unix when the process inherits `SIG_IGN` (for example under `nohup`).
|
|
69
|
+
- A second signal exits immediately (`143` for `SIGTERM`, `129` for `SIGHUP`), and `SIGKILL` always terminates immediately. Orderly shutdown exits with code `0`; if disposal fails, Atomic emits a [`shutdown_error`](/rpc/protocol#shutdown_error) event and exits with code `1` (or the signal's exit code when a signal started shutdown).
|
|
70
|
+
- An extension can call `ctx.shutdown()` to end an idle RPC session without another client command. Shutdown waits for any active command response and running turn; a request sent during extension-started compaction outside a turn runs once compaction completes.
|
|
71
|
+
- [`abort`](/rpc/protocol#abort) holds queued messages (like pressing `Esc` in the TUI) so a client can abort and close stdin safely, preserving queued completion notices for the next session instead of failing disposal.
|
|
71
72
|
|
|
72
|
-
## Example
|
|
73
|
+
## Example Python client
|
|
74
|
+
|
|
75
|
+
This minimal client reads stdout as binary lines split strictly on `\n`, sends one prompt, prints streamed text deltas, and closes stdin for orderly shutdown:
|
|
73
76
|
|
|
74
77
|
```python
|
|
75
|
-
import subprocess
|
|
76
78
|
import json
|
|
79
|
+
import subprocess
|
|
77
80
|
|
|
78
81
|
proc = subprocess.Popen(
|
|
79
82
|
["atomic", "--mode", "rpc", "--no-session"],
|
|
80
83
|
stdin=subprocess.PIPE,
|
|
81
84
|
stdout=subprocess.PIPE,
|
|
82
|
-
text=True
|
|
83
85
|
)
|
|
84
86
|
|
|
85
|
-
def send(cmd):
|
|
86
|
-
proc.stdin
|
|
87
|
+
def send(cmd: dict) -> None:
|
|
88
|
+
assert proc.stdin is not None
|
|
89
|
+
proc.stdin.write((json.dumps(cmd) + "\n").encode("utf-8"))
|
|
87
90
|
proc.stdin.flush()
|
|
88
91
|
|
|
89
92
|
def read_events():
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
93
|
+
assert proc.stdout is not None
|
|
94
|
+
buf = b""
|
|
95
|
+
while True:
|
|
96
|
+
chunk = proc.stdout.read(4096)
|
|
97
|
+
if not chunk:
|
|
98
|
+
if buf:
|
|
99
|
+
yield json.loads(buf.rstrip(b"\r").decode("utf-8"))
|
|
100
|
+
break
|
|
101
|
+
buf += chunk
|
|
102
|
+
while b"\n" in buf:
|
|
103
|
+
raw_line, buf = buf.split(b"\n", 1)
|
|
104
|
+
line = raw_line.rstrip(b"\r")
|
|
105
|
+
if line:
|
|
106
|
+
yield json.loads(line.decode("utf-8"))
|
|
107
|
+
|
|
108
|
+
try:
|
|
109
|
+
send({"type": "prompt", "message": "Hello!"})
|
|
110
|
+
for event in read_events():
|
|
111
|
+
if event.get("type") == "message_update":
|
|
112
|
+
delta = event.get("assistantMessageEvent", {})
|
|
113
|
+
if delta.get("type") == "text_delta":
|
|
114
|
+
print(delta["delta"], end="", flush=True)
|
|
115
|
+
if event.get("type") == "agent_end":
|
|
116
|
+
print()
|
|
117
|
+
break
|
|
118
|
+
finally:
|
|
119
|
+
if proc.stdin:
|
|
120
|
+
proc.stdin.close()
|
|
121
|
+
proc.wait()
|
|
106
122
|
```
|
|
107
|
-
|
|
108
|
-
## Moved sections
|
|
109
|
-
|
|
110
|
-
<a id="commands" />
|
|
111
|
-
<a id="prompting" />
|
|
112
|
-
<a id="prompt" />
|
|
113
|
-
<a id="steer" />
|
|
114
|
-
<a id="follow_up" />
|
|
115
|
-
<a id="abort" />
|
|
116
|
-
<a id="clear_queue" />
|
|
117
|
-
<a id="new_session" />
|
|
118
|
-
<a id="state" />
|
|
119
|
-
<a id="get_state" />
|
|
120
|
-
<a id="get_messages" />
|
|
121
|
-
<a id="model" />
|
|
122
|
-
<a id="set_model" />
|
|
123
|
-
<a id="cycle_model" />
|
|
124
|
-
<a id="get_available_models" />
|
|
125
|
-
<a id="logout_provider" />
|
|
126
|
-
<a id="thinking" />
|
|
127
|
-
<a id="set_thinking_level" />
|
|
128
|
-
<a id="cycle_thinking_level" />
|
|
129
|
-
<a id="get_available_thinking_levels" />
|
|
130
|
-
<a id="queue-modes" />
|
|
131
|
-
<a id="set_steering_mode" />
|
|
132
|
-
<a id="set_follow_up_mode" />
|
|
133
|
-
<a id="compaction" />
|
|
134
|
-
<a id="compact" />
|
|
135
|
-
<a id="set_auto_compaction" />
|
|
136
|
-
<a id="retry" />
|
|
137
|
-
<a id="set_auto_retry" />
|
|
138
|
-
<a id="abort_retry" />
|
|
139
|
-
<a id="bash" />
|
|
140
|
-
<a id="bash-2" />
|
|
141
|
-
<a id="abort_bash" />
|
|
142
|
-
<a id="session" />
|
|
143
|
-
<a id="get_session_stats" />
|
|
144
|
-
<a id="export_html" />
|
|
145
|
-
<a id="switch_session" />
|
|
146
|
-
<a id="fork" />
|
|
147
|
-
<a id="clone" />
|
|
148
|
-
<a id="get_fork_messages" />
|
|
149
|
-
<a id="get_entries" />
|
|
150
|
-
<a id="get_tree" />
|
|
151
|
-
<a id="get_last_assistant_text" />
|
|
152
|
-
<a id="set_session_name" />
|
|
153
|
-
<a id="commands-2" />
|
|
154
|
-
<a id="get_commands" />
|
|
155
|
-
<a id="events" />
|
|
156
|
-
<a id="event-types" />
|
|
157
|
-
<a id="agent_start" />
|
|
158
|
-
<a id="agent_end" />
|
|
159
|
-
<a id="turn_start-/-turn_end" />
|
|
160
|
-
<a id="message_start-/-message_end" />
|
|
161
|
-
<a id="message_update-streaming" />
|
|
162
|
-
<a id="tool_execution_start-/-tool_execution_update-/-tool_execution_end" />
|
|
163
|
-
<a id="bash_execution_update" />
|
|
164
|
-
<a id="queue_update" />
|
|
165
|
-
<a id="compaction_start-/-compaction_end" />
|
|
166
|
-
<a id="auto_retry_start-/-auto_retry_end" />
|
|
167
|
-
<a id="summarization_retry_scheduled-/-summarization_retry_attempt_start-/-summarization_retry_finished" />
|
|
168
|
-
<a id="extension_error" />
|
|
169
|
-
<a id="error-handling" />
|
|
170
|
-
<a id="types" />
|
|
171
|
-
<a id="model-2" />
|
|
172
|
-
<a id="usermessage" />
|
|
173
|
-
<a id="assistantmessage" />
|
|
174
|
-
<a id="toolresultmessage" />
|
|
175
|
-
<a id="bashexecutionmessage" />
|
|
176
|
-
<a id="attachment" />
|
|
177
|
-
<a id="extension-ui-protocol" />
|
|
178
|
-
<a id="extension-ui-requests-stdout" />
|
|
179
|
-
<a id="select" />
|
|
180
|
-
<a id="confirm" />
|
|
181
|
-
<a id="input" />
|
|
182
|
-
<a id="editor" />
|
|
183
|
-
<a id="notify" />
|
|
184
|
-
<a id="setstatus" />
|
|
185
|
-
<a id="setwidget" />
|
|
186
|
-
<a id="settitle" />
|
|
187
|
-
<a id="set_editor_text" />
|
|
188
|
-
<a id="extension-ui-responses-stdin" />
|
|
189
|
-
<a id="value-response-select-input-editor" />
|
|
190
|
-
<a id="confirmation-response-confirm" />
|
|
191
|
-
<a id="cancellation-response-any-dialog" />
|
|
192
|
-
<a id="example-interactive-client-node-js" />
|
|
193
|
-
|
|
194
|
-
These reference sections moved to dedicated pages:
|
|
195
|
-
|
|
196
|
-
- Commands, events, error handling, and JSON types: [RPC protocol](/rpc/protocol)
|
|
197
|
-
- Extension UI requests, OAuth prompts, and responses: [RPC extension UI protocol](/rpc/extension-ui)
|
|
198
|
-
- Node.js interactive client and `RpcClient` examples: [RPC client examples](/rpc/examples)
|