@bastani/atomic 0.10.9 → 0.10.10-alpha.2
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 +83 -0
- package/README.md +226 -163
- 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} +150 -62
- 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 +87 -116
- 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 +61 -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 +74 -141
- 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 +61 -88
- 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 +238 -243
- package/docs/build.md +21 -15
- package/docs/changelog.mdx +1 -1
- package/docs/codemode.md +68 -51
- package/docs/compaction/reference.md +65 -26
- package/docs/compaction.md +118 -66
- package/docs/computer-use.md +179 -146
- package/docs/containerization.md +87 -33
- package/docs/custom-provider/api-reference.md +152 -13
- package/docs/custom-provider/oauth.md +45 -28
- package/docs/custom-provider/override.md +14 -7
- package/docs/custom-provider/registration.md +77 -67
- package/docs/custom-provider/streaming.md +42 -19
- package/docs/custom-provider.md +26 -62
- package/docs/development.md +81 -42
- package/docs/docs.json +54 -38
- package/docs/environment-variables.md +92 -64
- package/docs/extensions/api-reference.md +326 -735
- 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 +189 -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 +62 -20
- package/docs/guides/intercom.md +20 -12
- package/docs/guides/non-interactive.md +31 -16
- package/docs/guides/orchestration.md +17 -9
- package/docs/guides/resume-on-any-machine.md +63 -52
- package/docs/guides/subagents.md +26 -14
- package/docs/guides/team-setup.md +49 -27
- package/docs/guides.md +30 -23
- package/docs/herdr.md +22 -17
- package/docs/index.md +24 -17
- package/docs/intercom/operations.md +90 -66
- package/docs/intercom/reference.md +219 -192
- package/docs/intercom.md +111 -92
- package/docs/json.md +73 -71
- package/docs/keybindings.md +74 -48
- package/docs/libraries/agent-core.md +52 -9
- package/docs/libraries/ai.md +90 -63
- package/docs/libraries/codemode.md +31 -8
- package/docs/libraries/schema.md +12 -9
- package/docs/libraries/storage-libsql.md +92 -0
- package/docs/libraries/storage-postgres.md +119 -0
- package/docs/libraries/telemetry.md +42 -9
- package/docs/libraries/tui.md +74 -94
- package/docs/libraries.md +25 -8
- package/docs/llama-cpp.md +38 -33
- package/docs/mcp-servers.md +140 -88
- package/docs/models/reference.md +53 -36
- package/docs/models-configuration.md +19 -13
- package/docs/models.md +102 -87
- package/docs/orchestration/migrating-workflows.md +22 -20
- package/docs/orchestration/patterns.md +36 -21
- package/docs/orchestration.md +24 -21
- package/docs/packages/authoring.md +29 -18
- package/docs/packages/reference.md +77 -16
- package/docs/packages.md +34 -34
- package/docs/programmatic.md +28 -21
- package/docs/prompt-templates.md +65 -41
- package/docs/providers/reference.md +36 -20
- package/docs/providers.md +78 -76
- package/docs/quickstart.md +42 -54
- package/docs/reference/cli.md +256 -254
- package/docs/reference.md +30 -23
- package/docs/rpc/examples.md +121 -17
- package/docs/rpc/extension-ui.md +86 -63
- package/docs/rpc/protocol.md +817 -358
- package/docs/rpc.md +78 -152
- package/docs/sdk/reference.md +309 -73
- package/docs/sdk/storage.md +614 -0
- package/docs/sdk/structured-decisions.md +168 -65
- package/docs/sdk/web-server.md +80 -46
- package/docs/sdk.md +168 -215
- package/docs/security.md +117 -44
- package/docs/session-format.md +127 -76
- package/docs/sessions.md +155 -113
- package/docs/settings.md +293 -205
- 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 +148 -97
- package/docs/storage.md +172 -260
- package/docs/subagents/authoring.md +148 -15
- package/docs/subagents/reference.md +105 -29
- package/docs/subagents.md +247 -250
- package/docs/terminal-setup.md +97 -69
- package/docs/termux.md +51 -85
- package/docs/themes/reference.md +51 -37
- package/docs/themes.md +52 -55
- package/docs/tmux.md +38 -21
- package/docs/tools.md +209 -147
- package/docs/tui/reference.md +64 -32
- package/docs/tui.md +38 -66
- package/docs/usage.md +94 -86
- package/docs/verification.md +25 -25
- package/docs/web-access.md +106 -54
- package/docs/windows.md +55 -57
- package/docs/worktree-snapshots.md +82 -74
- package/examples/sdk/11-sessions.ts +4 -4
- package/package.json +8 -8
- package/schemas/models.schema.json +58 -7
- 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
|
@@ -1,18 +1,35 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Configure Atomic
|
|
3
|
-
|
|
2
|
+
title: "Configure Atomic"
|
|
3
|
+
sidebarTitle: "Configuration"
|
|
4
|
+
description: "Choose the right configuration file, set global preferences in settings.json, and override settings per project."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
# Configure Atomic
|
|
7
|
-
|
|
8
7
|
After your [first session](/getting-started/first-session), save global preferences in `~/.atomic/agent/settings.json`. Use `.atomic/settings.json` for overrides that apply only to the current project.
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
You can edit either file directly or run `/settings` inside an interactive session to change common options. Both files use strict JSON (no `//` comments or trailing commas).
|
|
10
|
+
|
|
11
|
+
## Where to configure what
|
|
12
|
+
|
|
13
|
+
Atomic splits configuration by scope and purpose:
|
|
14
|
+
|
|
15
|
+
| What you want to configure | Where to put it | Guide |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| Subscriptions, API keys, and cloud credentials | `/login`, `~/.atomic/agent/auth.json`, or provider env vars | [Model providers](/providers) |
|
|
18
|
+
| Custom models, local servers, proxies, overrides, and remote compactors | `~/.atomic/agent/models.json` | [Configure custom models](/models) |
|
|
19
|
+
| Custom provider APIs, OAuth flows, dynamic catalogs, and account aliases | Extension calling `atomic.registerProvider()` | [Build custom providers](/custom-provider) |
|
|
20
|
+
| Persistent defaults, `enabledModels`, `fallbackModels`, `decisionModel`, `compactionModel`, tools, and storage | `~/.atomic/agent/settings.json` and `.atomic/settings.json` | [Settings reference](/settings) |
|
|
21
|
+
| Local SQLite, JSONL, PostgreSQL, or libSQL/Turso session and Intercom backends | `storage` / `sessions.storage`, `atomic storage join`, or SDK storage options | [Storage](/storage) and [SDK storage](/sdk/storage) |
|
|
22
|
+
| One-run overrides for a single command | CLI flags (`--model`, `--models`, `--tools`, `--storage`) | [CLI reference](/reference/cli) |
|
|
23
|
+
| Process, CI, terminal, and diagnostic overrides | `ATOMIC_*` environment variables | [Environment variables](/environment-variables) |
|
|
24
|
+
| Programmatic session setup in TypeScript | `createAgentSession()` and `SettingsManager` options | [SDK](/sdk) |
|
|
25
|
+
|
|
26
|
+
## Create a global settings file {#example}
|
|
11
27
|
|
|
12
|
-
|
|
28
|
+
Add `"$schema"` for editor autocomplete and validation, then set the provider, model, and preferences you want:
|
|
13
29
|
|
|
14
30
|
```json
|
|
15
31
|
{
|
|
32
|
+
"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/settings.schema.json",
|
|
16
33
|
"defaultProvider": "anthropic",
|
|
17
34
|
"defaultModel": "claude-sonnet-4-6",
|
|
18
35
|
"defaultThinkingLevel": "medium",
|
|
@@ -34,36 +51,61 @@ Choose the provider and model you have configured, then add the settings you nee
|
|
|
34
51
|
}
|
|
35
52
|
```
|
|
36
53
|
|
|
54
|
+
In this example, `enabledModels` restricts startup fallback, `Ctrl+P` cycling, `/model`, and child subagents to authenticated models matching `"claude-*"` or `"gpt-5*"`. Omit it or set `[]` to leave all authenticated models active. See [Model scope (`enabledModels`)](/settings#enabledmodels).
|
|
55
|
+
|
|
37
56
|
## Project overrides
|
|
38
57
|
|
|
39
|
-
Project settings in `.atomic/settings.json`
|
|
58
|
+
Project settings in `.atomic/settings.json` (and legacy `.pi/settings.json`) load only when the project is trusted. Interactive sessions prompt once before trusting a project; non-interactive runs skip untrusted project settings unless you pass `--approve` or set global `defaultProjectTrust` to `"always"`. See [Project trust](/security#project-trust).
|
|
59
|
+
|
|
60
|
+
When a project is trusted, `.atomic/settings.json` merges over `~/.atomic/agent/settings.json` using these rules:
|
|
61
|
+
|
|
62
|
+
- **Nested objects merge recursively.** You can override one field inside an object (such as `compaction.reserveTokens`) without repeating its siblings.
|
|
63
|
+
- **`storage` and `sessions.storage` replace as whole objects.** Setting either in a project file replaces the global object instead of merging individual fields.
|
|
64
|
+
- **Resource arrays combine across scopes.** `packages`, `extensions`, `skills`, `prompts`, and `themes` combine entries from global and project settings. When both scopes name the same package, the project entry wins. Use `!pattern` or `-exact` exclusions to suppress a resource. Setting `"packages": []` in `.atomic/settings.json` clears only a legacy `.pi/settings.json` in the same project, not global `~/.atomic/agent/settings.json`.
|
|
65
|
+
- **Other arrays and scalars replace global values.** Settings such as `enabledModels`, `fallbackModels`, `npmCommand`, `resume.cache`, and scalar values replace the global value. Setting `"enabledModels": []` in a project file clears a global model scope for that project.
|
|
66
|
+
- **`defaultTools` supports additive modifiers.** A project `defaultTools` array containing only `+tool` or `-tool` entries layers on top of global `defaultTools`. Any plain tool name or `[]` replaces the global list.
|
|
67
|
+
- **Global-only settings are ignored in project files.** Atomic ignores project values for `defaultProjectTrust`, `debug`, `httpProxy`, `cacheWarming`, `selfUpdateCommand`, `deviceId`, and the deprecated `resume.setupCommand`. Project `storage` applies to sessions, not Intercom multi-node routing, and `atomic update` reads `npmCommand` only from global settings.
|
|
40
68
|
|
|
41
|
-
|
|
42
|
-
- `storage` and `sessions.storage` replace as whole objects rather than merging field by field.
|
|
43
|
-
- Arrays and scalar values replace the global value. An exception is `defaultTools`: a project array containing only `+tool` or `-tool` modifiers applies on top of the global tool list.
|
|
44
|
-
- Global-only settings are ignored in project settings: `defaultProjectTrust`, `debug`, `httpProxy`, `cacheWarming`, `selfUpdateCommand`, `deviceId`, and the deprecated `resume.setupCommand`.
|
|
69
|
+
This example overrides only `compaction.reserveTokens` for one project while keeping the rest of the global config.
|
|
45
70
|
|
|
46
|
-
|
|
71
|
+
Global `~/.atomic/agent/settings.json`:
|
|
47
72
|
|
|
48
73
|
```json
|
|
49
|
-
// ~/.atomic/agent/settings.json (global)
|
|
50
74
|
{
|
|
51
75
|
"theme": "dark",
|
|
52
|
-
"compaction": {
|
|
76
|
+
"compaction": {
|
|
77
|
+
"enabled": true,
|
|
78
|
+
"reserveTokens": 16384
|
|
79
|
+
}
|
|
53
80
|
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Project `.atomic/settings.json`:
|
|
54
84
|
|
|
55
|
-
|
|
85
|
+
```json
|
|
56
86
|
{
|
|
57
|
-
"compaction": {
|
|
87
|
+
"compaction": {
|
|
88
|
+
"reserveTokens": 8192
|
|
89
|
+
}
|
|
58
90
|
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Effective settings for the project:
|
|
59
94
|
|
|
60
|
-
|
|
95
|
+
```json
|
|
61
96
|
{
|
|
62
97
|
"theme": "dark",
|
|
63
|
-
"compaction": {
|
|
98
|
+
"compaction": {
|
|
99
|
+
"enabled": true,
|
|
100
|
+
"reserveTokens": 8192
|
|
101
|
+
}
|
|
64
102
|
}
|
|
65
103
|
```
|
|
66
104
|
|
|
67
|
-
## Next
|
|
105
|
+
## Next steps
|
|
68
106
|
|
|
69
|
-
|
|
107
|
+
- Review every supported key and default in the [Settings reference](/settings).
|
|
108
|
+
- Connect subscription logins or API keys in [Model providers](/providers).
|
|
109
|
+
- Add local servers, proxies, overrides, or remote compactors in [Configure custom models](/models), or register custom APIs and OAuth in [Build custom providers](/custom-provider).
|
|
110
|
+
- Choose local or shared databases in [Storage](/storage) and [SDK storage](/sdk/storage).
|
|
111
|
+
- Override settings for one run with [CLI reference](/reference/cli) flags or [Environment variables](/environment-variables), or configure hosts programmatically with the [SDK](/sdk).
|
package/docs/guides/intercom.md
CHANGED
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Intercom"
|
|
3
|
-
|
|
2
|
+
title: "Intercom overview"
|
|
3
|
+
sidebarTitle: "Intercom overview"
|
|
4
|
+
description: "Coordinate multiple Atomic sessions on one machine or across a shared database."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
#
|
|
7
|
+
Intercom is a message channel between Atomic sessions running on the same machine, or across several machines that share a storage database ([Running Intercom across machines](/intercom/operations#running-intercom-across-machines)). Sessions in the same group send messages, ask questions, and coordinate directly without routing everything through you.
|
|
7
8
|
|
|
8
|
-
Intercom
|
|
9
|
+
This page introduces Intercom at a high level. For quick-start commands, patterns, and `contact_supervisor`, see [Coordinate sessions with Intercom](/intercom). For multi-machine setup, broker upgrades, and troubleshooting, see [Operate Intercom](/intercom/operations). For the tool schema, `config.json`, and error classes, see [Intercom reference](/intercom/reference). For team databases or embedded apps, see [Set up teams and CI](/guides/team-setup) and [Intercom group and reach in the SDK](/sdk#intercom-group-and-reach).
|
|
9
10
|
|
|
10
11
|
## When to use Intercom
|
|
11
12
|
|
|
12
|
-
Use Intercom when two or more sessions work on related tasks and share context: a planner handing work to a worker, a long-running session reporting a finding, or an orchestrator steering a subagent while it runs. You do not need Intercom for a single session working alone.
|
|
13
|
+
Use Intercom when two or more sessions work on related tasks and need to share context: a planner handing work to a worker, a long-running session reporting a finding, or an orchestrator steering a subagent while it runs. You do not need Intercom for a single session working alone.
|
|
13
14
|
|
|
14
|
-
##
|
|
15
|
+
## Key capabilities
|
|
15
16
|
|
|
16
|
-
- Direct sends, non-blocking
|
|
17
|
-
- Named groups
|
|
18
|
-
-
|
|
17
|
+
- **Direct sends, asks, and broadcasts.** Send fire-and-forget updates, ask non-blocking questions whose replies arrive as messages, or broadcast to matching sessions in your group.
|
|
18
|
+
- **Named groups.** Isolate unrelated sessions by group so work in one repository or team does not interrupt another.
|
|
19
|
+
- **Subagent delivery.** Message subagents while they start, run, wait on tools, or after they finish. Messaging a completed or failed subagent resumes it automatically to handle your request, while messages to paused or quit subagents wait in a queue until the launching session continues them.
|
|
20
|
+
|
|
21
|
+
## Getting started
|
|
22
|
+
|
|
23
|
+
Interactive sessions connect to Intercom automatically 3 seconds after startup. Name each session with `/name` so it is easy to target (for example `/name planner` and `/name worker`), then press `Alt+M` or run `/intercom` to pick a session and send a message.
|
|
19
24
|
|
|
20
25
|
## Next steps
|
|
21
26
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
27
|
+
- [Coordinate sessions with Intercom](/intercom) covers the quick start, coordination patterns, and supervisor escalation.
|
|
28
|
+
- [Operate Intercom](/intercom/operations) covers connection lifecycles, multi-machine routing, upgrades, and recovery.
|
|
29
|
+
- [Intercom reference](/intercom/reference) documents every `intercom` tool action, targeting rule, error class, and setting.
|
|
30
|
+
- [Sharing storage across hosts](/storage#sharing-storage-across-hosts) and [Set up teams and CI](/guides/team-setup) explain how to share a database across machines or CI fleets.
|
|
31
|
+
- [Intercom group and reach in the SDK](/sdk#intercom-group-and-reach) shows how to configure groups and reach policies from `@bastani/atomic`.
|
|
32
|
+
- [Subagents overview](/guides/subagents) explains when delegation fits better than session-to-session coordination.
|
|
@@ -1,39 +1,54 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Non-interactive
|
|
3
|
-
|
|
2
|
+
title: "Non-interactive mode"
|
|
3
|
+
sidebarTitle: "Non-interactive mode"
|
|
4
|
+
description: "Run Atomic without the terminal UI using print mode (-p), JSON event streams, or RPC."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Atomic's session engine supports three non-interactive entry points. Use the table below to choose one, or embed the engine with the SDK.
|
|
7
|
+
You can run Atomic without the terminal UI in three ways, or embed it directly in TypeScript with the SDK.
|
|
9
8
|
|
|
10
9
|
| You want | Use | Read |
|
|
11
10
|
| --- | --- | --- |
|
|
12
|
-
| One prompt, one answer, then exit | Print mode (`-p`, `--print`) | [CLI
|
|
13
|
-
| A machine-readable stream of everything the session does | JSON event stream | [JSON event stream](/json) |
|
|
14
|
-
| A long-lived session another program drives | RPC | [RPC](/rpc) |
|
|
15
|
-
|
|
|
11
|
+
| One prompt, one answer, then exit | Print mode (`-p`, `--print`) | [CLI modes](/reference/cli#modes) |
|
|
12
|
+
| A machine-readable stream of everything the session does | JSON event stream (`--mode json`) | [JSON event stream](/json) |
|
|
13
|
+
| A long-lived session another program drives | RPC (`--mode rpc`) | [RPC](/rpc) |
|
|
14
|
+
| Embed Atomic in your own TypeScript program | SDK | [SDK](/sdk) |
|
|
16
15
|
|
|
17
16
|
## Print mode
|
|
18
17
|
|
|
19
|
-
`atomic --print "..."` (or `-p`) runs
|
|
18
|
+
`atomic --print "..."` (or `-p`) runs prompts without launching the terminal UI and exits when done.
|
|
19
|
+
|
|
20
|
+
- **Automatic print mode on pipes and redirects:** If standard input or standard output is not a TTY (for example piping text into `atomic` or redirecting `atomic > out.txt`), Atomic enters print mode automatically even without `-p`.
|
|
21
|
+
- **Piped stdin and prompt merging:** Atomic reads piped stdin and separates it from CLI prompt text with a newline, so it composes cleanly with shell pipelines. When a prompt argument or `@file` is present, Atomic waits up to 2 seconds for the first piped byte before continuing without stdin (override with [`ATOMIC_STDIN_TIMEOUT_MS`](/environment-variables#diagnostics-and-performance), or set `0` to always wait for EOF).
|
|
22
|
+
- **Multiple prompts:** Passing multiple positional prompts (such as `atomic -p "step 1" "step 2"`) runs them sequentially in the same session. Plain-text print mode prints only the final prompt's answer to stdout, while `--mode json` emits events for every turn.
|
|
23
|
+
- **Disabled interactive tools and project trust:** Both print mode and `--mode json` automatically disable `ask_user_question` because no interactive terminal UI is available. Non-interactive runs never show project trust prompts; untrusted projects ignore project settings, extensions, and context files unless you pass `--approve` (`-a`) or set global `defaultProjectTrust` to `"always"`. See [Project trust](/settings#project-trust).
|
|
24
|
+
- **Pre-flight checks and structured output:** Before starting an automated run, verify provider credentials with `atomic auth check` ([Verify readiness before a session](/providers#verify-readiness-before-a-session)). For typed classification or terminating structured-output payloads in scripts and SDK hosts, see [Structured decisions](/sdk/structured-decisions).
|
|
25
|
+
- **Truncated responses:** If a text response hits the model's output token limit, print mode keeps the partial text on stdout, writes a truncation warning to stderr, and exits with code `1`. Check the exit code before treating redirected output as complete.
|
|
26
|
+
- **Extension commands as prompts:** Running `atomic --session <id> -p "/curator off"` prints the command's reply. If the command sends a message or starts a turn, print mode waits for that response and prints it before running the next prompt or exiting.
|
|
20
27
|
|
|
21
|
-
|
|
28
|
+
### Exit codes and signals
|
|
22
29
|
|
|
23
|
-
|
|
30
|
+
| Exit code | Meaning |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| `0` | Completed normally |
|
|
33
|
+
| `1` | Model error, aborted or truncated response, session write conflict, or CLI error |
|
|
34
|
+
| `75` | Target `--session` is already open in another live Atomic process |
|
|
35
|
+
| `129` | Stopped by `SIGHUP` on Linux or macOS after graceful shutdown |
|
|
36
|
+
| `130` | Stopped by `SIGINT` (`Ctrl+C`) after graceful shutdown |
|
|
37
|
+
| `143` | Stopped by `SIGTERM` on Linux or macOS after graceful shutdown |
|
|
24
38
|
|
|
25
|
-
|
|
39
|
+
Sending a second termination signal during graceful shutdown forces immediate exit. On Linux and macOS, the standalone binary preserves an ignored `SIGHUP` (as under `nohup atomic -p ...`) and keeps running after its terminal closes. An npm installation runs on Node.js, which resets an ignored `SIGHUP`; start it with `setsid` to keep it running after disconnect.
|
|
26
40
|
|
|
27
41
|
## JSON events
|
|
28
42
|
|
|
29
|
-
Use
|
|
43
|
+
Use `--mode json` when another program needs to observe a run rather than read plain text. Atomic emits one JSON record per message, tool call, and result for logging, CI annotations, or downstream scripts. See [JSON event stream](/json) for the event shapes.
|
|
30
44
|
|
|
31
45
|
## RPC
|
|
32
46
|
|
|
33
|
-
|
|
47
|
+
Use `--mode rpc` to keep a session alive so another process can send prompts, answer UI requests, and receive events over stdin and stdout. Use it for editors, bots, and long-running services that need multi-turn control. Start at [RPC](/rpc) and the [RPC protocol](/rpc/protocol).
|
|
34
48
|
|
|
35
49
|
## Next steps
|
|
36
50
|
|
|
37
|
-
- [CLI reference](/reference/cli) for every flag and exit code.
|
|
51
|
+
- [CLI reference](/reference/cli) for every flag, model-matching rule, and exit code.
|
|
52
|
+
- [Environment variables](/environment-variables) for `ATOMIC_STDIN_TIMEOUT_MS`, `ATOMIC_STORAGE`, `ATOMIC_PROFILE=ci`, and CI overrides.
|
|
38
53
|
- [Programmatic use](/programmatic) to choose between the SDK, RPC, and the JSON event stream.
|
|
39
54
|
- [Background tasks](/background-tasks) when work should continue while you keep chatting interactively.
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Plan
|
|
3
|
-
|
|
2
|
+
title: "Plan multi-step work"
|
|
3
|
+
sidebarTitle: "Plan multi-step work"
|
|
4
|
+
description: "Delegate multi-step work in plain language, monitor background subagents, and resume after interruptions."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Give Atomic a goal, a way to verify completion, and any limits on edits, cost, or time. You do not need to write JavaScript to split work across agents.
|
|
7
8
|
|
|
8
|
-
This page
|
|
9
|
+
This page covers plain-language delegation. For codemode JavaScript orchestration and interruption recovery APIs, see [Orchestrate with codemode and subagents](/orchestration).
|
|
9
10
|
|
|
10
11
|
> Review the installation guide for Linux and Windows. Give each platform to a separate read-only agent. Check disputed commands against the CLI, then report discrepancies by platform. Do not edit files.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
Your main session launches the subagents in the background and continues as each subagent reports back. To check which subagents are queued, running, or finished, run `/tasks` or focus the agent panel below the prompt (press `↓` on an empty prompt, or click a row in fullscreen mode; see [Manage background tasks](/background-tasks)). Select any subagent to read its live transcript or send it a message on the same screen without interrupting the others.
|
|
14
|
+
|
|
15
|
+
If you close Atomic while subagents are running, reopen the same main session to restore them and collect their results:
|
|
16
|
+
|
|
17
|
+
- Running subagents relaunch automatically when you reopen the session.
|
|
18
|
+
- Paused and quit subagents stay awaiting manual resume unless you set `resumeInFlight` to `"ask"` or `"auto"` in `~/.atomic/agent/extensions/subagent/config.json` ([Subagent config.json reference](/subagents/reference#subagent-config-json-reference)).
|
|
19
|
+
- Forking a session (`/fork` or `--fork`) never restores the original session's subagents.
|
|
20
|
+
- Sessions started with `--no-session` are not saved, so their subagents cannot be restored after Atomic closes.
|
|
13
21
|
|
|
14
22
|
## Next steps
|
|
15
23
|
|
|
16
|
-
- [
|
|
24
|
+
- [Orchestrate with codemode and subagents](/orchestration) explains how your main session coordinates multi-step work using small JavaScript scripts in codemode alongside subagents.
|
|
17
25
|
- [Orchestration patterns](/orchestration/patterns) shows seven reusable ways to split and verify work.
|
|
18
|
-
- [
|
|
19
|
-
- [
|
|
20
|
-
- [Skills as workflows](/skills#skills-as-workflows) explains how to save a repeatable procedure as a skill. If you have a workflow file from an earlier release, follow [
|
|
26
|
+
- [Run subagents](/subagents) covers bundled specialists, context modes, worktrees, and run control.
|
|
27
|
+
- [Manage background tasks](/background-tasks) explains the agent panel, `/tasks`, heartbeats, and background shells.
|
|
28
|
+
- [Skills as workflows](/skills#skills-as-workflows) explains how to save a repeatable procedure as a skill. If you have a workflow file from an earlier release, follow [Migrate an earlier workflow to a skill](/orchestration/migrating-workflows).
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Resume on any machine
|
|
3
|
-
|
|
2
|
+
title: "Resume sessions on any machine"
|
|
3
|
+
sidebarTitle: "Resume anywhere"
|
|
4
|
+
description: "Continue sessions on another machine using shared storage, worktree snapshots, and environment blueprints."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
When several machines share one storage database, you can start a session on one machine and continue it on any other. Atomic reads the session from shared storage, rebuilds the repository state it was working against, and continues the conversation where it stopped.
|
|
7
|
+
When several machines share one storage database, you can start a session on one machine and continue it on any other. Atomic reads the session from shared storage, rebuilds the repository files it was working against, runs optional environment blueprints, and continues the conversation where it stopped.
|
|
9
8
|
|
|
10
9
|
## Join each machine
|
|
11
10
|
|
|
12
|
-
Every machine must use the same shared database, either PostgreSQL or
|
|
11
|
+
Every machine must use the same shared database, either PostgreSQL or Turso / libSQL. Do not embed passwords or auth tokens in the database URL; pass credentials through `--password-file`, `--token-file`, or `--auth` (`credential-in-url`).
|
|
12
|
+
|
|
13
|
+
**PostgreSQL (PostgreSQL 16 or newer for sessions):**
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
In two-role deployments, run `atomic storage migrate --db 'postgresql://atomic_owner@db.example.com:5432/atomic' --password-file ~/atomic-owner-password` once as the owner role (and after Atomic upgrades), then grant the runtime role its privileges before joining machines as `atomic_runtime`. See [Set up the database](/storage#set-up-the-database).
|
|
15
16
|
|
|
16
17
|
```bash
|
|
17
18
|
atomic install npm:@bastani/atomic-storage-postgres
|
|
18
19
|
atomic storage join 'postgresql://atomic_runtime@db.example.com:5432/atomic' --password-file ~/atomic-db-password
|
|
20
|
+
atomic intercom restart
|
|
21
|
+
atomic storage status
|
|
19
22
|
```
|
|
20
23
|
|
|
21
24
|
See [PostgreSQL](/storage#postgresql) for database roles, TLS, and cloud identities.
|
|
@@ -25,15 +28,19 @@ See [PostgreSQL](/storage#postgresql) for database roles, TLS, and cloud identit
|
|
|
25
28
|
```bash
|
|
26
29
|
atomic install npm:@bastani/atomic-storage-libsql
|
|
27
30
|
atomic storage join libsql://<db>.turso.io --token-file ~/turso-token
|
|
31
|
+
atomic intercom restart
|
|
32
|
+
atomic storage status
|
|
28
33
|
```
|
|
29
34
|
|
|
30
|
-
`atomic storage join` stores sessions in the shared database so they resume on any joined machine. By contrast, `atomic team join` shares Intercom while keeping sessions local. To share sessions on a machine joined with `atomic team join`, run `atomic team leave` and then `atomic storage join`. See [Sharing storage across hosts](/storage#sharing-storage-across-hosts) for prefixes, tokens, and `atomic storage status`.
|
|
35
|
+
`atomic storage join` stores sessions in the shared database so they resume on any joined machine. By contrast, `atomic team join` ([Set up teams and CI](/guides/team-setup)) shares Intercom while keeping personal sessions local. To share sessions on a machine joined with `atomic team join`, run `atomic team leave` and then `atomic storage join`. See [Sharing storage across hosts](/storage#sharing-storage-across-hosts) for prefixes, tokens, and `atomic storage status`.
|
|
36
|
+
|
|
37
|
+
Keep worktree snapshots enabled (`snapshots.enabled`, on by default). At the end of each turn that modifies files, Atomic saves uncommitted edits, untracked files, and unpushed commits in the shared database. If `snapshots.enabled` is set to `false`, no snapshots are captured, cross-machine resume cannot restore repository files, and `atomic blueprint prebuild` fails with `snapshots are disabled`.
|
|
31
38
|
|
|
32
|
-
|
|
39
|
+
Work inside submodules and untracked nested repositories is not recorded, and resume warns with `nested-repository`, `submodule-changes`, or `unpushed-submodule-commit` so you can commit and push those changes first. See [What is left out](/worktree-snapshots#what-is-left-out).
|
|
33
40
|
|
|
34
41
|
## Resume a session
|
|
35
42
|
|
|
36
|
-
Resume as usual with `atomic --session <id>`, `atomic --resume`, or `/resume
|
|
43
|
+
Resume as usual with `atomic --session <id>`, `atomic --resume`, or `/resume` (see [Resuming and deleting sessions](/sessions#resuming-and-deleting-sessions)).
|
|
37
44
|
|
|
38
45
|
- **Matching local checkout.** If you start Atomic inside a checkout of the same repository whose files match the snapshot (or where the recorded edits were committed), the session continues there directly.
|
|
39
46
|
- **Restored worktree.** Otherwise, Atomic restores the recorded state into a worktree under `~/.atomic/agent/worktree-snapshots` without modifying your local checkouts, and prints the restored path. Atomic reuses a clean idle worktree of the same repository when available so existing dependencies and build output stay intact. See [Restored worktrees](/worktree-snapshots#restored-worktrees).
|
|
@@ -44,7 +51,7 @@ Resume as usual with `atomic --session <id>`, `atomic --resume`, or `/resume`.
|
|
|
44
51
|
|
|
45
52
|
Absolute paths from the earlier machine keep working in built-in file tools because Atomic maps paths under the old checkout to the restored worktree. Shell commands run as written, so commands containing old absolute paths need the new worktree path.
|
|
46
53
|
|
|
47
|
-
Passing `--session <id>` for a session whose recorded directory does not exist on this machine opens directly instead of offering to fork the session. SDK callers using `createAgentSession({ sessionManager })` get the same restore behavior unless they pass `cwd` or `workspace`, even when the recorded path exists on this machine with different files (such as runners built from the same container image).
|
|
54
|
+
Passing `--session <id>` for a session whose recorded directory does not exist on this machine opens directly instead of offering to fork the session. SDK callers using `createAgentSession({ sessionManager })` get the same restore behavior unless they pass `cwd` or `workspace`, even when the recorded path exists on this machine with different files (such as runners built from the same container image). See [Worktree snapshots in the SDK](/sdk#worktree-snapshots) and [SDK session storage](/sdk/storage).
|
|
48
55
|
|
|
49
56
|
If shared storage does not answer, `atomic --session`, `--resume`, `--continue`, and `/resume` stop after 15 seconds with a retryable `ResumeCatalogTimeoutError`. Nothing is modified; resume again once `atomic storage status` connects.
|
|
50
57
|
|
|
@@ -58,17 +65,17 @@ Error: Session <id> is already open in process <pid> on <host>. Nothing was chan
|
|
|
58
65
|
|
|
59
66
|
Interactive mode prints the same message before starting. If several resumes start simultaneously, one succeeds and the others exit with code `75`.
|
|
60
67
|
|
|
61
|
-
Claims live under `~/.atomic/agent/session-claims` and apply to processes sharing that agent directory. A claim left by a dead process (such as after `SIGKILL`) is taken over automatically. Atomic matches holders by PID and, on Linux and Windows, by process start time so a later process reusing the same PID does not block resume.
|
|
68
|
+
Claims live under `~/.atomic/agent/session-claims` and apply to processes sharing that agent directory. A claim left by a dead process (such as after `SIGKILL`) is taken over automatically. Atomic matches holders by PID and, on Linux and Windows, by process start time so a later process reusing the same PID does not block resume. A claim from another host refreshes every 15 seconds and expires after 60 seconds without a refresh.
|
|
62
69
|
|
|
63
70
|
If a process using a different agent directory writes to the same session in shared storage at the same time, the conflicting write stops with `Another process wrote to session <id> ...` and exit code `1`. Resume the session again to continue from saved state.
|
|
64
71
|
|
|
65
|
-
##
|
|
72
|
+
## Resuming subagents on another machine
|
|
66
73
|
|
|
67
|
-
Both fresh and forked (`context: "fork"`) subagents store their sessions in the launching parent's shared database and can
|
|
74
|
+
Both fresh and forked (`context: "fork"`) subagents store their sessions in the launching parent's shared database and can resume and export on another machine.
|
|
68
75
|
|
|
69
|
-
When a
|
|
76
|
+
When a background subagent resumes on another machine, Atomic maps its recorded directory through the parent session's restored checkouts, then prepares the subagent's own checkouts from its snapshots and builds their blueprints. Its file tools resolve old absolute paths into the restored worktrees.
|
|
70
77
|
|
|
71
|
-
Only subagents launched with an explicit `sessionDir`, subagents whose parent uses JSONL session files, or file-backed subagents
|
|
78
|
+
Only subagents launched with an explicit `sessionDir`, subagents whose parent uses JSONL session files, or legacy file-backed subagents stay tied to the machine that launched them and report as unrestorable elsewhere.
|
|
72
79
|
|
|
73
80
|
## Set the environment up with a blueprint
|
|
74
81
|
|
|
@@ -81,6 +88,7 @@ A restored worktree contains repository files, not installed dependencies, runti
|
|
|
81
88
|
| Workspace | `<dir>/.atomic/blueprint.yaml`, listed in `includes` of the repository blueprint | Workspace directory |
|
|
82
89
|
|
|
83
90
|
```yaml
|
|
91
|
+
runs-on: [linux, macos, windows]
|
|
84
92
|
includes:
|
|
85
93
|
- services/api
|
|
86
94
|
initialize:
|
|
@@ -99,6 +107,8 @@ knowledge:
|
|
|
99
107
|
Run the tests with `pnpm test`.
|
|
100
108
|
```
|
|
101
109
|
|
|
110
|
+
**Always set `runs-on` for macOS or Windows.** If a blueprint omits `runs-on`, Atomic defaults to `["linux"]` only, which silently does nothing on macOS and Windows. Add `runs-on: [macos]`, `runs-on: [windows]`, or `runs-on: [linux, macos, windows]`, or define separate `---`-separated YAML documents per operating system.
|
|
111
|
+
|
|
102
112
|
| Section | Purpose | When it runs |
|
|
103
113
|
| --- | --- | --- |
|
|
104
114
|
| `initialize` | Install tools, runtimes, and system packages | During a build |
|
|
@@ -106,24 +116,26 @@ knowledge:
|
|
|
106
116
|
| `knowledge` | List of `{ name, contents }` items (by convention `lint`, `test`, and `build`) | Never executed. Provided to the agent as context |
|
|
107
117
|
| `post-build` | Verify the assembled environment (global blueprint only) | During a build, after all repositories |
|
|
108
118
|
|
|
109
|
-
Each section accepts a single string (one `run` step) or a list of steps. A step is a bare string, `{ name?, run, env? }`, or `{ name?, uses, with?, env? }`, never both `run` and `uses`. `with` applies only to `uses
|
|
119
|
+
Each section accepts a single string (one `run` step) or a list of steps. A step is a bare string, `{ name?, run, env? }`, or `{ name?, uses, with?, env? }`, never both `run` and `uses`. `with` applies only to `uses`; YAML scalar values (including numbers and booleans) are converted to strings, and `null` becomes `""`.
|
|
110
120
|
|
|
111
|
-
`uses` accepts `github.com/<owner>/<repo>[/<subpath>]@<ref>` in `initialize` and `post-build` (never in `maintenance`, where Atomic rejects it with `'uses' steps are not supported in maintenance sections`). Node.js and composite GitHub Actions are supported; Docker actions and composite actions using `hashFiles`, `secrets`, or `matrix` expressions fail the step. Actions cache under `~/.atomic/agent/blueprint-actions`. Set `ATOMIC_BLUEPRINT_GITHUB_BASE_URL` to fetch actions from a host other than `https://github.com`.
|
|
121
|
+
`uses` accepts `github.com/<owner>/<repo>[/<subpath>]@<ref>` in `initialize` and `post-build` (never in `maintenance`, where Atomic rejects it with `'uses' steps are not supported in maintenance sections`). Owner must start with an alphanumeric character and use `[A-Za-z0-9-]`, repo uses `[A-Za-z0-9._-]`, and ref cannot contain whitespace, control characters, or `~^:?*[\`. Node.js and composite GitHub Actions are supported; Docker actions and composite actions using `hashFiles`, `secrets`, or `matrix` expressions fail the step. Anything an action writes to `GITHUB_ENV` or `GITHUB_PATH` is automatically appended to `$ENVRC` for later steps and the session. Actions cache under `~/.atomic/agent/blueprint-actions`. Set `ATOMIC_BLUEPRINT_GITHUB_BASE_URL` to fetch actions from a host other than `https://github.com`.
|
|
112
122
|
|
|
113
123
|
Key blueprint rules:
|
|
114
124
|
|
|
115
|
-
- **
|
|
116
|
-
- **
|
|
125
|
+
- **Platforms and validation.** `runs-on` accepts a string or list matched case-insensitively (`default` and `linux` are aliases; `macos` and `windows` are explicit; omitting `runs-on` defaults to `["linux"]` only). A file can contain multiple `---`-separated YAML documents as long as no two documents target the same platform. A machine runs only the document matching its OS, but Atomic validates **every** document in the file, so a syntax or schema error in a `windows` document fails the blueprint on Linux too.
|
|
126
|
+
- **Shell.** `shell` accepts `"default"`, `"bash"`, or `"powershell"` (case-insensitive). `run` steps execute in bash (Git Bash on Windows) with `set -e` so they stop at the first failing command. Setting `shell: powershell` runs PowerShell on Windows with `$ErrorActionPreference = 'Stop'` (on Linux and macOS, `run` steps always execute in bash). Commands must be non-interactive.
|
|
127
|
+
- **Environment.** Step `env:` applies to that step only and overrides `$ENVRC`. In bash, Atomic sources `$ENVRC` with `set -a`, so plain `KEY=VALUE` lines appended to `$ENVRC` (for example `echo "API_URL=http://localhost:3000" >> "$ENVRC"`) are exported automatically to later steps and the resumed session's bash tool without needing `export`. On Windows, `$ENVRC` is evaluated by Git Bash with `PATH` converted back automatically; from PowerShell steps, write UTF-8 bash assignments with LF line endings and no BOM to `$env:ENVRC`. `$ENVRC` starts empty on every build, so `maintenance` should not depend on values `initialize` wrote during an earlier build.
|
|
117
128
|
- **Timeout.** Any step running longer than 3 hours is stopped and marked failed.
|
|
118
|
-
- **Platforms.** `runs-on` accepts a string or list (`default` and `linux` are aliases; `macos` and `windows` are explicit). A file can contain multiple `---`-separated YAML documents, as long as no two documents target the same platform. A machine runs only the document matching its OS.
|
|
119
129
|
- **Includes.** The repository blueprint can list workspace directories (or `<dir>/.atomic/blueprint.yaml` paths) in `includes`, without `..` or duplicates. Workspace blueprints cannot declare `includes`, global blueprints ignore `includes`, and only global blueprints allow `post-build`.
|
|
120
130
|
- **Ignored keys.** `clone` is ignored with a warning because resume restores the recorded tree. `cache` triggers a warning pointing to `resume.cache`. Other unknown keys are ignored silently.
|
|
121
131
|
|
|
122
|
-
|
|
132
|
+
Note: Legacy `.atomic/setup` is no longer read. `resume.setupCommand` is deprecated, acts temporarily as a single global maintenance step with a deprecation warning, and should be moved into the `maintenance` section of `.atomic/blueprint.yaml`.
|
|
133
|
+
|
|
134
|
+
### How blueprint builds run
|
|
123
135
|
|
|
124
136
|
When resume restores a worktree, Atomic builds in order: global `initialize` and `maintenance`, then each repository's `initialize` and `maintenance` (followed by its included workspaces), then global `post-build`. Existing local checkouts that resume directly are never built.
|
|
125
137
|
|
|
126
|
-
|
|
138
|
+
**Project trust required.** A restored worktree is a new directory, so project trust starts unset just like a fresh clone. Because builds run project code, repository blueprints execute only for trusted projects (saved trust, `--approve`, or `"defaultProjectTrust": "always"`). Untrusted worktrees skip project instructions, resources, and blueprint builds silently (though the agent still receives `maintenance` and `knowledge` marked as not yet run), and the global blueprint runs only when at least one restored worktree is trusted.
|
|
127
139
|
|
|
128
140
|
Builds are differential. Atomic compares each workspace blueprint against the last successful build on this machine:
|
|
129
141
|
|
|
@@ -139,7 +151,7 @@ A step fails if its command exits non-zero, raises a PowerShell error, times out
|
|
|
139
151
|
| Global blueprint or `post-build` failed | Failed. Repository blueprints do not run. | Prominent warning. The session still resumes |
|
|
140
152
|
| No blueprint, untrusted worktree, or no matching platform | Nothing ran | Nothing |
|
|
141
153
|
|
|
142
|
-
On Windows, if a stopped step could not be
|
|
154
|
+
On Windows, if a stopped step could not be tracked as a process group after its root command exited, Atomic warns that child processes may still be running. Check for leftover processes before retrying.
|
|
143
155
|
|
|
144
156
|
Every step writes a log under `~/.atomic/agent/worktree-snapshots/blueprint-logs` containing command, timestamps, duration, exit status, and output. To recover from a failed build, read the log, fix the environment or blueprint, and resume again.
|
|
145
157
|
|
|
@@ -166,7 +178,7 @@ To override the mode default, set `resume.waitForBlueprint` in settings:
|
|
|
166
178
|
{ "resume": { "waitForBlueprint": "prompt" } }
|
|
167
179
|
```
|
|
168
180
|
|
|
169
|
-
When
|
|
181
|
+
When an installed extension can decline saved project trust ([Project trust](/security#project-trust)), resume always defers the blueprint build like `"tools"` until trust is decided, and untrusted worktrees stay unbuilt.
|
|
170
182
|
|
|
171
183
|
### What the agent sees
|
|
172
184
|
|
|
@@ -176,7 +188,7 @@ The first turn of a resumed session includes each applicable blueprint's `mainte
|
|
|
176
188
|
|
|
177
189
|
Ephemeral runners start with an empty home directory on every job. Run `atomic blueprint cache-key` to generate cache keys, restore prefixes, and paths for CI cache actions such as `actions/cache`. Atomic does not upload or download caches itself.
|
|
178
190
|
|
|
179
|
-
```
|
|
191
|
+
```bash
|
|
180
192
|
atomic blueprint cache-key [dir] [--format text|json|github-output]
|
|
181
193
|
```
|
|
182
194
|
|
|
@@ -196,7 +208,7 @@ Atomic detects package stores automatically from lockfiles at the repository roo
|
|
|
196
208
|
| `build.gradle(.kts)`, `settings.gradle(.kts)`, `gradle.lockfile`, Gradle wrapper | `~/.gradle/caches`, `~/.gradle/wrapper` (`GRADLE_USER_HOME`) |
|
|
197
209
|
| `pom.xml` | `~/.m2/repository` |
|
|
198
210
|
|
|
199
|
-
Environment variables in parentheses move each store, and `XDG_CACHE_HOME` moves Linux `~/.cache` paths. macOS uses `~/Library/Caches
|
|
211
|
+
Environment variables in parentheses move each store, and `XDG_CACHE_HOME` moves Linux `~/.cache` paths. On macOS, Yarn v1 uses `~/Library/Caches/Yarn`, pip uses `~/Library/Caches/pip`, Poetry uses `~/Library/Caches/pypoetry`, Go build cache uses `~/Library/Caches/go-build`, and pnpm uses `~/Library/pnpm/store` (npm, uv, Bun, Cargo, Go modules, Gradle, and Maven match Linux). Windows uses `%LOCALAPPDATA%` (such as `npm-cache`, `pnpm\store`, `Yarn\Cache`, `uv\cache`, `pip\Cache`, and `pypoetry\Cache`). Subdirectory lockfiles in monorepos are not auto-detected.
|
|
200
212
|
|
|
201
213
|
Declare additional stores or build outputs under `resume.cache` in `.atomic/settings.json` (a project list replaces the global list). Blueprints themselves do not declare caches:
|
|
202
214
|
|
|
@@ -214,8 +226,8 @@ Declare additional stores or build outputs under `resume.cache` in `.atomic/sett
|
|
|
214
226
|
Each entry takes `paths`, an optional `kind`, and optional `keyFiles`:
|
|
215
227
|
|
|
216
228
|
- `"kind": "store"` (default) paths must be absolute or start with `~/` outside the worktree and join the `stores` entry.
|
|
217
|
-
- `"kind": "build"` paths must be repository-relative and name build outputs parked by `atomic blueprint prebuild --park` under `~/.atomic/agent/worktree-snapshots/seeds/`.
|
|
218
|
-
- `keyFiles` lists root-relative files hashed into the key (defaulting to detected lockfiles and toolchain files).
|
|
229
|
+
- `"kind": "build"` paths must be repository-relative and name build outputs parked by `atomic blueprint prebuild --park` under `~/.atomic/agent/worktree-snapshots/seeds/`. Build paths cannot name `.npmrc`, `.pypirc`, `.yarnrc.yml`, or snapshot-denied paths. If a `"build"` path contains Git-tracked files, `cache-key` warns and `prebuild --park` parks only untracked and ignored files under it while leaving tracked files untouched.
|
|
230
|
+
- `keyFiles` lists root-relative files hashed into the key (defaulting to detected lockfiles and toolchain files). `keyFiles` cannot be empty (`[]` causes the entry to be ignored with a warning) and cannot contain `..` or absolute/drive paths.
|
|
219
231
|
- Paths must be literal paths without glob characters (`*`, `?`, `[`, `]`, `{`, `}`) or a leading `!`. Invalid entries are skipped with a warning.
|
|
220
232
|
|
|
221
233
|
| Entry | Paths | Key changes when |
|
|
@@ -223,11 +235,11 @@ Each entry takes `paths`, an optional `kind`, and optional `keyFiles`:
|
|
|
223
235
|
| `stores` | Detected package stores plus `"store"` paths in `resume.cache` | Lockfiles, `keyFiles`, `resume.cache`, repository blueprint, OS, or architecture change |
|
|
224
236
|
| `build` | Parked `"build"` paths and seed manifest | Same inputs as `stores` |
|
|
225
237
|
| `git` | Atomic's Git object store for the repository | Checkout `HEAD` changes (restore newest via restore prefix) |
|
|
226
|
-
| `atomic` | Atomic's extension
|
|
238
|
+
| `atomic` | Atomic's compiled extension cache | Atomic version, OS, or architecture change |
|
|
227
239
|
|
|
228
240
|
Entries with no paths are omitted. The `git` and `build` entries require a Git remote. Atomic normalizes HTTPS remotes and `git@` SSH remotes by host and repository path so HTTPS runner checkouts reuse caches built from SSH checkouts (other SSH usernames stay distinct).
|
|
229
241
|
|
|
230
|
-
To protect secrets, `cache-key` omits store paths inside the worktree
|
|
242
|
+
To protect secrets, `cache-key` omits store paths inside the worktree, snapshot-denied paths ([What is left out](/worktree-snapshots#what-is-left-out)), and these home credential paths (along with any parent directory containing one, so `~/.cargo` is omitted because it holds `~/.cargo/credentials`, while `~/.cargo/registry` is allowed): `.aws`, `.azure`, `.cargo/credentials`, `.cargo/credentials.toml`, `.config/gcloud`, `.config/gh`, `.docker/config.json`, `.gem/credentials`, `.git-credentials`, `.gnupg`, `.gradle/gradle.properties`, `.kube`, `.m2/settings.xml`, `.netrc`, `.npmrc`, `.pypirc`, `.ssh`, `.terraform.d/credentials.tfrc.json`, and `.yarnrc.yml`. Checks run case-insensitively and across symlinks, with a warning on stderr.
|
|
231
243
|
|
|
232
244
|
Use `--format github-output` to emit `<name>-key`, `<name>-restore-prefix`, and `<name>-paths` lines for `$GITHUB_OUTPUT`. See [Caching between runs](/guides/team-setup#caching-between-runs) for a full GitHub Actions workflow.
|
|
233
245
|
|
|
@@ -235,21 +247,24 @@ Use `--format github-output` to emit `<name>-key`, `<name>-restore-prefix`, and
|
|
|
235
247
|
|
|
236
248
|
`atomic blueprint prebuild` prepares a repository ahead of time so a later resume starts with dependencies and build artifacts already built:
|
|
237
249
|
|
|
238
|
-
```
|
|
250
|
+
```bash
|
|
239
251
|
atomic blueprint prebuild [dir] [--park] [--approve]
|
|
240
252
|
```
|
|
241
253
|
|
|
242
254
|
Prebuild restores the committed `HEAD` at `dir` (defaulting to the current directory) into a new worktree, runs `initialize` and `maintenance`, and leaves the worktree idle for the next resume to claim. Only committed files are restored, so untracked or ignored files such as `.env` never enter the worktree.
|
|
243
255
|
|
|
244
|
-
|
|
256
|
+
Prebuild requires:
|
|
245
257
|
|
|
246
|
-
|
|
258
|
+
- `snapshots.enabled` set to `true` (otherwise it exits with `snapshots are disabled`).
|
|
259
|
+
- A Git remote on the checkout.
|
|
260
|
+
- No uncommitted edits to tracked files, and no unpushed commits touching denied secret files (`unpushed-history-denied`).
|
|
261
|
+
- A trusted project (saved trust, `"defaultProjectTrust": "always"`, or `--approve`), because prebuild runs project code.
|
|
247
262
|
|
|
248
|
-
If
|
|
263
|
+
If a blueprint step fails, prebuild exits `1`, deletes the new worktree, and preserves earlier worktrees and seeds. Timings print to stderr.
|
|
249
264
|
|
|
250
|
-
|
|
265
|
+
With `--park`, Atomic moves untracked build output declared with `"kind": "build"` in [`resume.cache`](#caches-for-runners) into `~/.atomic/agent/worktree-snapshots/seeds/` along with a manifest naming the built commit. When another machine restores that cache and has no idle worktree, resume creates a worktree at the same path used during prebuild, moves the parked output into place (without overwriting tracked or existing files), and checks out the session snapshot. `/session snapshot` labels such restores `(seeded)` with a `seed` timing line.
|
|
251
266
|
|
|
252
|
-
|
|
267
|
+
If parking cannot acquire the seed lock, prebuild reports the error, leaves existing seeds intact, and keeps the completed build in its idle worktree for local reuse.
|
|
253
268
|
|
|
254
269
|
## What can stop a resume
|
|
255
270
|
|
|
@@ -257,18 +272,18 @@ Atomic checks required setup in one pass before restoring anything: the storage
|
|
|
257
272
|
|
|
258
273
|
For session resumes, missing Git never blocks opening the session. Instead, the session opens in its recorded or current directory with a notice for each unrestored checkout. A session resume fails only when the session cannot be read, a snapshot fails security checks (`invalid-snapshot`), or a target directory contains unexpected files (`unsafe-target`). Blueprint failures never stop a resume.
|
|
259
274
|
|
|
260
|
-
|
|
|
261
|
-
| --- | --- | --- |
|
|
262
|
-
|
|
|
263
|
-
|
|
|
264
|
-
|
|
|
265
|
-
|
|
|
266
|
-
|
|
|
267
|
-
|
|
|
268
|
-
|
|
|
269
|
-
|
|
|
275
|
+
| Symptom | Fix | SDK error and code |
|
|
276
|
+
| --- | --- | --- |
|
|
277
|
+
| Session ID not found on this machine | If this machine uses local storage only (`local-storage-not-joined`), join shared storage with `atomic storage join` (run `atomic team leave` first if joined with `atomic team join`). If already joined (`shared-miss`), check the session ID, database URL, and prefix. | `ResumeNotFoundError` (`not-found`) |
|
|
278
|
+
| Missing storage adapter, missing or unreadable credentials, or unavailable Git | Follow each fix listed in the error, such as running `atomic install`, creating the token or password file, or unsetting offline mode. | `ResumePreconditionError` (`preconditions-unmet`) |
|
|
279
|
+
| Git cannot be started or downloaded | Follow the hint (install Git on `PATH` or unset `ATOMIC_OFFLINE`). Session resumes still open without restoring checkouts. | `GitUnavailableError` (`not-installed`, `unsupported-platform`, `offline`, `checksum-mismatch`, `download-failed`, `install-failed`) |
|
|
280
|
+
| Shared database unreachable during lookup | Check connectivity with `atomic storage status` and resume again. | `ResumeCatalogUnavailableError` (`catalog-unavailable`) |
|
|
281
|
+
| Shared database lookup timed out after 15 seconds | Check connectivity with `atomic storage status` and resume again. | `ResumeCatalogTimeoutError` (`catalog-timeout`) |
|
|
282
|
+
| Checkout cannot be rebuilt exactly (denied unpushed commits, missing blob, or full disk) | Follow the notice (for unpushed commits, push from the original machine and resume again). Session resumes still open with the closest state. | `WorkspaceDriftError` (`tree-drift`) |
|
|
283
|
+
| Windows worktree path exceeds Git for Windows limits | Set `ATOMIC_CODING_AGENT_DIR` to a shorter path ([Long paths on Windows](#long-paths-on-windows)). Nothing is written. | `WorkspaceRestoreError` (`path-too-long`) |
|
|
284
|
+
| Snapshot fails security validation (credentials in remote URL, `ext::` remote helper, or malformed hashes) | Resume only sessions from trusted storage, or re-export from the source machine. Nothing is fetched or run. | `WorkspaceRestoreError` (`invalid-snapshot`) |
|
|
270
285
|
|
|
271
|
-
Secret values never appear in error messages; errors name only the file or environment variable.
|
|
286
|
+
Secret values never appear in error messages; errors name only the file or environment variable. SDK error classes, codes, and `isResume*Error` guards are exported from `@bastani/atomic`; see [Resuming on another machine](/sdk/reference#resuming-on-another-machine).
|
|
272
287
|
|
|
273
288
|
## Windows
|
|
274
289
|
|
|
@@ -289,7 +304,3 @@ If a longer agent directory would exceed those limits, restore fails before writ
|
|
|
289
304
|
```powershell
|
|
290
305
|
$env:ATOMIC_CODING_AGENT_DIR = "C:\atomic\agent"
|
|
291
306
|
```
|
|
292
|
-
|
|
293
|
-
## Trust
|
|
294
|
-
|
|
295
|
-
A restored worktree is a new directory, so project trust starts unset just like a fresh clone. Until you trust it, project instructions and resources do not load and project blueprints do not run, though the agent still receives `maintenance` and `knowledge` marked as not yet run.
|