@bastani/atomic 0.10.11-alpha.2 → 0.10.11-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +99 -0
- package/README.md +5 -8
- 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 +6 -6
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +5 -5
- package/dist/_shared/mode-shared-2QJSCUM6.js +6 -6
- package/dist/_shared/p0-cli-BB45ZQY6.js +46 -67
- package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +7 -8
- package/dist/_shared/p1a-prewarm-XIU57JHF.js.map +1 -1
- package/dist/_shared/{p1b-elig-ENCUPKKJ.js → p1b-elig-TVB5CBLL.js} +14 -2
- package/dist/_shared/{p1b-elig-ENCUPKKJ.js.map → p1b-elig-TVB5CBLL.js.map} +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +3 -3
- package/dist/_shared/{sdk-IQMULKFU.js → sdk-B5LEWGGI.js} +340 -163
- package/dist/_shared/sdk-B5LEWGGI.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/{startup-0-0-3IXNMFM2.js → startup-0-0-EZUKEP4Q.js} +48 -40
- package/dist/_shared/startup-0-0-EZUKEP4Q.js.map +1 -0
- package/dist/_shared/{startup-0-1-7T2IAE7J.js → startup-0-1-RTOHJFDJ.js} +195 -42
- package/dist/_shared/startup-0-1-RTOHJFDJ.js.map +1 -0
- package/dist/_shared/startup-0-2-5QHPCEON.js +33 -43
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +1 -1
- package/dist/_shared/startup-0-3-4ZYBYQNM.js +5 -5
- package/dist/_shared/startup-0-4-ZMJV547D.js +12 -7
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -1
- package/dist/_shared/startup-0-5-YDW47QX6.js +7 -7
- package/dist/_shared/startup-0-5-YDW47QX6.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +6 -6
- package/dist/_shared/startup-12-0-55AAXBJZ.js +2 -2
- package/dist/_shared/startup-14-0-MLX36RBG.js +4 -5
- package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
- package/dist/_shared/startup-15-1-4S7FLMNG.js +19 -27
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +39 -23
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/{startup-8-1-X32CYSXB.js → startup-8-1-LZFXSD3Z.js} +90 -1176
- package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +186 -35
- package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
- package/dist/_shared/storage-status-K7PX2RXA.js +557 -0
- package/dist/_shared/storage-status-K7PX2RXA.js.map +1 -0
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/team-DOQKICG2.js +376 -0
- package/dist/_shared/team-DOQKICG2.js.map +1 -0
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +23 -0
- package/dist/builtin/intercom/README.md +2 -2
- package/dist/builtin/intercom/broker/broker.bundle.mjs +913 -289
- package/dist/builtin/intercom/broker/database-wake-up-bus.ts +243 -64
- package/dist/builtin/intercom/broker/multinode-router.ts +154 -22
- package/dist/builtin/intercom/broker/multinode-state-store.ts +30 -3
- package/dist/builtin/intercom/broker/open-broker-state.ts +14 -0
- package/dist/builtin/intercom/broker/sql-add-column.ts +29 -5
- package/dist/builtin/intercom/broker/sql-ended-child-queue-store.ts +3 -2
- package/dist/builtin/intercom/broker/sql-held-send-store.ts +2 -2
- package/dist/builtin/intercom/broker/sql-known-session-store.ts +43 -19
- package/dist/builtin/intercom/broker/sql-lease-store.ts +170 -74
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +298 -47
- package/dist/builtin/intercom/broker/sql-pending-ask-store.ts +8 -5
- package/dist/builtin/intercom/broker/sql-released-ask-store.ts +12 -5
- package/dist/builtin/intercom/broker/sql-restoring-reservation-store.ts +24 -7
- package/dist/builtin/intercom/broker/sql-retention.ts +141 -0
- package/dist/builtin/intercom/broker/sql-schema.ts +136 -19
- package/dist/builtin/intercom/broker/sql-sent-message-authority.ts +74 -19
- package/dist/builtin/intercom/broker/wake-up-bus.ts +6 -0
- package/dist/builtin/intercom/index.bundle.mjs +2 -3
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/index.bundle.mjs +2 -10
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/bun/bundled-sqlite.js +41 -0
- package/dist/bun/bundled-sqlite.js.map +1 -0
- 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 +3 -3
- 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.code.js.map +1 -1
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.code.js +2 -2
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- 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 +3 -3
- 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 +19 -113
- package/dist/cli/team-command.code.js.map +1 -1
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +5 -18
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-rehydrate-errors.d.ts +4 -9
- package/dist/core/compaction/compactor.d.ts +3 -3
- package/dist/core/debug.code.js +1 -1
- 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.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- 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/runner-context.js +2 -2
- package/dist/core/intercom-broker-control-host.code.js +2 -2
- 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/package-manager-storage-adapters.code.js +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/process-start-token.d.ts +8 -0
- package/dist/core/process-tree-containment.d.ts +16 -0
- package/dist/core/sdk-types.d.ts +1 -2
- package/dist/core/sdk-types.js.map +1 -1
- 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.code.js +1 -1
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/settings-schema.d.ts +0 -3
- package/dist/core/storage/added-exports-0-10-11.js +19 -0
- package/dist/core/storage/added-exports-0-10-11.js.map +1 -0
- package/dist/core/storage/creation-time.js +105 -0
- package/dist/core/storage/creation-time.js.map +1 -0
- package/dist/core/storage/database.d.ts +19 -5
- package/dist/core/storage/database.js.map +1 -1
- package/dist/core/storage/dialect.d.ts +1 -1
- package/dist/core/storage/dialect.js +1 -1
- package/dist/core/storage/dialect.js.map +1 -1
- package/dist/core/storage/errors.d.ts +13 -13
- package/dist/core/storage/errors.js +10 -16
- package/dist/core/storage/errors.js.map +1 -1
- package/dist/core/storage/fenced-paths.d.ts +11 -0
- package/dist/core/storage/fenced-paths.js +11 -0
- package/dist/core/storage/fenced-paths.js.map +1 -1
- package/dist/core/storage/file-identity.d.ts +2 -0
- package/dist/core/storage/file-identity.js +24 -8
- package/dist/core/storage/file-identity.js.map +1 -1
- package/dist/core/storage/index.d.ts +3 -2
- package/dist/core/storage/index.js +5 -3
- package/dist/core/storage/index.js.map +1 -1
- package/dist/core/storage/libsql-removed.d.ts +71 -0
- package/dist/core/storage/libsql-removed.js +123 -0
- package/dist/core/storage/libsql-removed.js.map +1 -0
- package/dist/core/storage/migrations.d.ts +78 -14
- package/dist/core/storage/migrations.js +375 -49
- package/dist/core/storage/migrations.js.map +1 -1
- package/dist/core/storage/node-sqlite-file-gate.js +0 -15
- package/dist/core/storage/node-sqlite-file-gate.js.map +1 -1
- package/dist/core/storage/node-sqlite-thread.js +8 -13
- package/dist/core/storage/node-sqlite-thread.js.map +1 -1
- package/dist/core/storage/node-sqlite.js +51 -3
- package/dist/core/storage/node-sqlite.js.map +1 -1
- 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/prefix.d.ts +1 -1
- package/dist/core/storage/prefix.js +9 -2
- package/dist/core/storage/prefix.js.map +1 -1
- package/dist/core/storage/process-selection.d.ts +5 -5
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/schema-catalog.d.ts +7 -8
- package/dist/core/storage/schema-catalog.js +8 -8
- package/dist/core/storage/schema-catalog.js.map +1 -1
- package/dist/core/storage/selection.d.ts +7 -82
- package/dist/core/storage/selection.js +20 -235
- package/dist/core/storage/selection.js.map +1 -1
- 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 +4 -7
- package/dist/core/storage/session/fork-staging.code.js.map +1 -1
- 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.d.ts +5 -1
- 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/session-search-index.d.ts +43 -4
- 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.d.ts +48 -11
- 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/sqlite-facade.d.ts +6 -1
- package/dist/core/storage/sqlite-facade.js +1 -0
- package/dist/core/storage/sqlite-facade.js.map +1 -1
- package/dist/core/storage/storage-status.code.js +1 -1
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.code.js +1 -1
- package/dist/core/storage/team.d.ts +26 -115
- 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.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.code.js +1 -1
- 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/history-tasks.d.ts +3 -2
- package/dist/core/tools/read-url.code.js +4 -4
- 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.d.ts +40 -3
- package/dist/core/worktree-snapshot/blob-store.js +414 -21
- package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
- package/dist/core/worktree-snapshot/errors.code.js +2 -2
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/fork-blob-guard.js +81 -0
- package/dist/core/worktree-snapshot/fork-blob-guard.js.map +1 -0
- package/dist/core/worktree-snapshot/fork-snapshot-index.js +79 -38
- package/dist/core/worktree-snapshot/fork-snapshot-index.js.map +1 -1
- package/dist/core/worktree-snapshot/session-index-reset.code.js +4 -0
- package/dist/core/worktree-snapshot/session-index-reset.code.js.map +1 -1
- 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 +3 -3
- 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.d.ts +3 -1
- package/dist/index.js +5 -5
- package/dist/main-first-time-setup.code.js +1 -1
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/main.js +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/startup-shell-eligibility.js +1 -1
- package/dist/modes/interactive-engine/engine-prewarm.d.ts +1 -1
- package/dist/modes/print-mode.js +1 -1
- package/dist/package-manager-cli.code.js +6 -6
- 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/10.js +1 -1
- package/dist/startup-stages/11.js +1 -1
- package/dist/startup-stages/12.js +1 -1
- package/dist/startup-stages/2.js +2 -4
- package/dist/startup-stages/3.js +1 -3
- package/dist/startup-stages/4.js +1 -2
- package/dist/startup-stages/5.js +1 -1
- package/dist/startup-stages/6.js +5 -7
- package/dist/startup-stages/7.js +3 -10
- package/dist/startup-stages/8.js +7 -2
- package/dist/startup-stages/9.js +1 -7
- package/dist/startup-stages/stages.json +1 -1
- package/dist/utils/compile-cache-deferral.js +8 -13
- package/dist/utils/compile-cache-deferral.js.map +1 -1
- package/dist/utils/compile-cache-warmup-host.js +3 -4
- package/dist/utils/compile-cache-warmup-host.js.map +1 -1
- package/dist/utils/compile-cache.js +12 -100
- package/dist/utils/compile-cache.js.map +1 -1
- package/dist/utils/startup-database-spare.code.js +2 -2
- 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/dist/utils/worker-threads.js +2 -15
- package/dist/utils/worker-threads.js.map +1 -1
- package/docs/build.md +3 -3
- package/docs/changelog.mdx +1421 -69
- package/docs/compaction/reference.md +5 -5
- package/docs/compaction.md +7 -9
- package/docs/containerization.md +2 -2
- package/docs/custom-provider/api-reference.md +1 -1
- package/docs/docs.json +37 -10
- package/docs/environment-variables.md +0 -2
- package/docs/extensions/api-reference.md +4 -4
- package/docs/getting-started/installation.md +3 -0
- package/docs/guides/configuration.md +1 -1
- package/docs/guides/non-interactive.md +1 -1
- package/docs/guides/resume-on-any-machine.md +14 -22
- package/docs/guides/team-setup.md +56 -83
- package/docs/guides.md +2 -4
- package/docs/herdr.md +1 -1
- package/docs/index.md +1 -1
- package/docs/intercom/operations.md +26 -21
- package/docs/intercom/reference.md +2 -2
- package/docs/intercom.md +1 -1
- package/docs/libraries/storage-postgres.md +9 -9
- package/docs/libraries.md +2 -3
- package/docs/models-configuration.md +2 -2
- package/docs/models.md +2 -3
- package/docs/packages/authoring.md +7 -7
- package/docs/packages.md +1 -1
- package/docs/programmatic.md +2 -2
- package/docs/quickstart.md +1 -1
- package/docs/reference/cli.md +6 -11
- package/docs/reference.md +2 -2
- package/docs/rpc/extension-ui.md +2 -2
- package/docs/sdk/reference.md +5 -4
- package/docs/sdk/storage.md +8 -92
- package/docs/sdk/structured-decisions.md +1 -1
- package/docs/sdk/web-server.md +3 -3
- package/docs/sdk.md +14 -4
- package/docs/security.md +1 -1
- package/docs/session-format.md +5 -5
- package/docs/sessions.md +29 -49
- package/docs/settings.md +7 -8
- package/docs/storage/custom-adapters.md +255 -0
- package/docs/storage/jsonl.md +117 -0
- package/docs/{guides/postgres-pgbouncer.md → storage/postgres/pgbouncer.md} +66 -68
- package/docs/storage/postgres/tuning.md +337 -0
- package/docs/storage/postgres.md +556 -0
- package/docs/storage/sqlite.md +99 -0
- package/docs/storage.md +326 -990
- package/docs/subagents/authoring.md +1 -1
- package/docs/subagents.md +2 -2
- package/docs/tools.md +1 -1
- package/docs/worktree-snapshots.md +2 -2
- package/package.json +9 -9
- package/schemas/models.schema.json +2 -2
- package/schemas/settings.schema.json +0 -14
- package/dist/_shared/sdk-IQMULKFU.js.map +0 -1
- package/dist/_shared/startup-0-0-3IXNMFM2.js.map +0 -1
- package/dist/_shared/startup-0-1-7T2IAE7J.js.map +0 -1
- package/dist/_shared/startup-8-1-X32CYSXB.js.map +0 -1
- package/dist/core/intercom-broker-control.d.ts +0 -129
- package/dist/startup-stages/13.js +0 -1
- package/docs/guides/postgres-tuning.md +0 -311
- package/docs/libraries/storage-libsql.md +0 -97
|
@@ -16,12 +16,12 @@ Instructions passed to `/compact`, `session.compact({ query })`, `ctx.compact({
|
|
|
16
16
|
|
|
17
17
|
`compression_ratio` and `preserve_recent` are not top-level `session.compact()` or `settings.json` compaction options and are ignored if supplied there, keeping default context-clearing compaction free of endpoint knobs. Configure API-specific parameters directly on each compactor model in [`models.json`](/models#remote-compaction-models) (`compactionParams`, `endpointPath`, `timeoutMs`, `maxTokens`, `headers`) or via [`atomic.registerProvider()`](/custom-provider/api-reference) (`ProviderCompactorModelConfig`). When `compactionParams` is omitted, Atomic does not inject provider-specific body fields so the remote API applies its own defaults.
|
|
18
18
|
|
|
19
|
-
Safety bounds
|
|
19
|
+
Safety bounds are exported from `@bastani/atomic`. A compactor model's output has no built-in size limit: only a `maxTokens` you set on the compactor model limits it, and it has no default.
|
|
20
20
|
|
|
21
21
|
| Default | Export | Model override field | Meaning |
|
|
22
22
|
| --- | --- | --- | --- |
|
|
23
23
|
| `120000` | `COMPACTOR_REQUEST_TIMEOUT_MS` | `timeoutMs` | Wall-clock limit on one compactor request, in milliseconds |
|
|
24
|
-
| `32000` | `COMPACTED_OUTPUT_MAX_TOKENS` |
|
|
24
|
+
| `32000` | `COMPACTED_OUTPUT_MAX_TOKENS` | None | Largest compacted text an extension's `session_before_compact` hook may return, in estimated tokens (also capped at `COMPACTED_OUTPUT_MAX_TRIGGER_SHARE` = 50% of the automatic trigger budget). Does not apply to compactor models |
|
|
25
25
|
| `2000` | `COMPACTOR_LINE_WIDTH` | None | Character width at which long lines wrap before framing |
|
|
26
26
|
|
|
27
27
|
### Compactor request contract
|
|
@@ -77,7 +77,7 @@ A successful compaction appends a `type: "compaction"` entry (see [`CompactionEn
|
|
|
77
77
|
| `details.history` | Boundary location in `history://sessions/<sessionId>`: `rangeUnit: "entries"`, `entriesBefore`, `boundaryEntry`, and `totalEntries` |
|
|
78
78
|
| `details.historyAccess` | `"read-search"` or `"session-history-tool"`. Resumed sessions receive `session_history` whenever `read` or `search` is absent from resumed tools |
|
|
79
79
|
| `details.stats` | Heuristic estimates: `tokensAfter` counts the system prompt and boundary message, `linesBefore` counts replaced context lines, `linesKept` counts compacted lines (`0` on a clear), and `rangeCount` is `0` |
|
|
80
|
-
| `details.backupPath` | Path to the pre-compaction backup (`<sessionFile>.<timestamp>.<label>.bak`, never auto-deleted). Populated only for JSONL stores, never SQLite,
|
|
80
|
+
| `details.backupPath` | Path to the pre-compaction backup (`<sessionFile>.<timestamp>.<label>.bak`, never auto-deleted). Populated only for JSONL stores, never SQLite, PostgreSQL, or memory stores (see [Storage](/storage)). |
|
|
81
81
|
|
|
82
82
|
Only `compaction` entries with `details.strategy: "verbatim-lines"` affect active context. Resuming uses the saved boundary text directly without another model request, and messages appended after the boundary stay ordinary messages. Inactive legacy formats do not reapply historical omissions, so content they previously hid may reappear on resume.
|
|
83
83
|
|
|
@@ -104,7 +104,7 @@ atomic.on("session_before_compact", async (event) => {
|
|
|
104
104
|
|
|
105
105
|
Return `{ cancel: true }` to cancel compaction. Return `{ compactedText }` to write a `Context compacted` boundary offline without provider credentials; the model sees your text in a `<compacted-context>` block followed by recovery instructions.
|
|
106
106
|
|
|
107
|
-
Empty or whitespace-only text counts as no replacement, so the configured compaction form runs normally. If `compactedText` exceeds the
|
|
107
|
+
Empty or whitespace-only text counts as no replacement, so the configured compaction form runs normally. If `compactedText` exceeds `COMPACTED_OUTPUT_MAX_TOKENS` (32,000 estimated tokens, or half of the automatic trigger on a small context window) or makes `systemPrompt + boundary >= trigger`, Atomic rejects it, falls back to clearing the context with `fallbackReason` starting with `extension failed: output too long`, and emits `session_compact` with `fromExtension: false`. These limits apply only to an extension's text; a compactor model's output has none.
|
|
108
108
|
|
|
109
109
|
### `session_compact`
|
|
110
110
|
|
|
@@ -173,7 +173,7 @@ Every `CompactionError` carries `code`, `hint`, `retryable`, and `fields()`. Use
|
|
|
173
173
|
| `requestCompactorOutput(request)` | Send one `CompactorRequest` to a compactor endpoint; resolves `{ text, usage? }` or throws `CompactorFailure` / `CompactionCancelledError` |
|
|
174
174
|
| `resolveCompactionModel(configured, models)` | Resolve `compactionModel` to a `CompactionModelSelection` (`auto` with any fallback reason, or a compactor) |
|
|
175
175
|
| `classifyCompactionModel(configured, models)` | Classify a `compactionModel` string as `"auto"`, `"compactor"`, `"chat"`, `"classifier"`, or `"unknown"` |
|
|
176
|
-
| `compactedOutputTokenCap(triggerTokens, maxOutputTokens?)` | Compute the
|
|
176
|
+
| `compactedOutputTokenCap(triggerTokens, maxOutputTokens?)` | Compute the largest compacted text an extension hook may return, in estimated tokens |
|
|
177
177
|
| `SESSION_HISTORY_TOOL_NAME` | `"session_history"`, the read-only history tool granted after clearing when `read` or `search` is absent |
|
|
178
178
|
|
|
179
179
|
The types `CompactorModel`, `CompactorApi`, `ProviderCompactorModelConfig`, `CompactionForm`, `CompactionBackend`, `CompactionHistoryLocation`, `CompactionModelKind`, `CompactionModelSelection`, `CompactorMessage`, `CompactorRequest`, `CompactionErrorCode`, `SerializedCompactionError`, and `BranchSummaryEntry` are exported alongside them.
|
package/docs/compaction.md
CHANGED
|
@@ -35,7 +35,7 @@ A compaction boundary never lands mid-stream or between a tool call and its resu
|
|
|
35
35
|
|
|
36
36
|
When nothing new has entered context since the last boundary, compaction does nothing and `/compact` reports `Nothing to compact`. Automatic compaction also skips when the system prompt and boundary message together would reach or exceed the automatic trigger (`systemPrompt + boundary >= trigger`), letting [`fallbackModels`](/settings#fallbackmodels) handle any provider overflow.
|
|
37
37
|
|
|
38
|
-
**Pre-compaction backups (JSONL stores only).** Before writing a boundary in a JSONL session store, Atomic saves a best-effort backup alongside the session file at `<sessionFile>.<timestamp>.<label>.bak`. These backup files are not deleted automatically. If a backup cannot be written (for example on a full disk), Atomic still writes the boundary without `backupPath`. SQLite,
|
|
38
|
+
**Pre-compaction backups (JSONL stores only).** Before writing a boundary in a JSONL session store, Atomic saves a best-effort backup alongside the session file at `<sessionFile>.<timestamp>.<label>.bak`. These backup files are not deleted automatically. If a backup cannot be written (for example on a full disk), Atomic still writes the boundary without `backupPath`. SQLite, PostgreSQL, and in-memory stores do not write separate backup files (see [Storage](/storage)).
|
|
39
39
|
|
|
40
40
|
**Cancellation and queuing.** Pressing `Escape` cancels compaction before the boundary commits and leaves the session unchanged. If a compactor request is already running, `Escape` stops that request and clears the context instead. Queued user messages wait in arrival order and resume automatically once compaction ends.
|
|
41
41
|
|
|
@@ -92,11 +92,11 @@ When `compactionModel` names a registered compactor model (built-in `morph/morph
|
|
|
92
92
|
|
|
93
93
|
Images are replaced with an omission marker, thinking blocks are omitted, long lines wrap at 2,000 characters, and role headers are wrapped in `<keepContext>` tags automatically. Messages excluded from model context, such as `!!` shell commands and extension messages with `excludeFromContext`, are not sent.
|
|
94
94
|
|
|
95
|
-
The request uses your `/compact` instructions as its query, or your latest user request if none were given. Atomic sends `{ messages, query, model }` plus any optional `compactionParams` configured on that compactor model, letting the remote API apply its own server defaults when `compactionParams` is omitted. You can customize endpoint parameters (`compactionParams`), request path (`endpointPath`), timeout (`timeoutMs`, default 120 seconds), headers (`headers`), and output
|
|
95
|
+
The request uses your `/compact` instructions as its query, or your latest user request if none were given. Atomic sends `{ messages, query, model }` plus any optional `compactionParams` configured on that compactor model, letting the remote API apply its own server defaults when `compactionParams` is omitted. You can customize endpoint parameters (`compactionParams`), request path (`endpointPath`), timeout (`timeoutMs`, default 120 seconds), headers (`headers`), and an output limit (`maxTokens`, no default) per compactor model in `models.json` or an extension.
|
|
96
96
|
|
|
97
97
|
The compactor's output replaces the context inside a `<compacted-context>` block, followed by the same recovery instructions used by context clearing so the agent can retrieve omitted details from history.
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
A compactor's output has no built-in size limit: whatever the endpoint returns is used, however long it is. Only limits you configure apply. To ask the endpoint for shorter output, set its own size option in `compactionParams` (for Morph, `compression_ratio`). To reject long output, set `maxTokens` on the compactor model: output longer than that many estimated tokens (4 ASCII characters or 1 non-ASCII character per token) clears the context instead. `maxTokens` has no default. If the compacted context is still above the automatic trigger, nothing is rejected, and it is not compacted again before each tool call of the same turn. The next user turn compacts it again before its first request. If the provider reports the context is too long, Atomic compacts and retries once, as for any context; if the retry is still too long, the provider's error is shown. Compacted text returned by an extension's `session_before_compact` hook keeps its limits: text longer than 32,000 estimated tokens (or half of the automatic trigger on a small context window), or a result that would not fit below the trigger, clears the context instead. If an endpoint echoes your API key or sensitive auth header, Atomic replaces it with `[redacted]` before storing or displaying the output.
|
|
100
100
|
|
|
101
101
|
### When the compactor fails
|
|
102
102
|
|
|
@@ -110,9 +110,9 @@ Compaction starts
|
|
|
110
110
|
├─ compactionModel is "" / "auto" -> Automatic (Context cleared)
|
|
111
111
|
├─ compactionModel is unknown / chat / classifier -> Automatic fallback (Context cleared)
|
|
112
112
|
└─ compactionModel is a registered compactor
|
|
113
|
-
├─ success
|
|
113
|
+
├─ success (within maxTokens, if you set one) -> Context compacted (compactor)
|
|
114
114
|
└─ missing auth / HTTP or network error / timeout / Esc /
|
|
115
|
-
malformed or empty output /
|
|
115
|
+
malformed or empty output / longer than a maxTokens you set -> Automatic fallback (Context cleared)
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
Atomic prints a one-line notice (`Compaction model not used (<reason>); context cleared instead`) without exposing your API key or sensitive headers. Pressing `Escape` or calling `abortCompaction()` during a compactor request also clears the context with reason `request aborted`. A takeover by `/compact`, closing the session, or an extension returning `{ cancel: true }` cancels compaction completely.
|
|
@@ -163,8 +163,7 @@ Keep default compaction clean in `settings.json` and configure endpoint-specific
|
|
|
163
163
|
"compression_ratio": 0.35,
|
|
164
164
|
"preserve_recent": 2
|
|
165
165
|
},
|
|
166
|
-
"timeoutMs": 180000
|
|
167
|
-
"maxTokens": 48000
|
|
166
|
+
"timeoutMs": 180000
|
|
168
167
|
}
|
|
169
168
|
}
|
|
170
169
|
}
|
|
@@ -194,8 +193,7 @@ Keep default compaction clean in `settings.json` and configure endpoint-specific
|
|
|
194
193
|
"target_ratio": 0.4,
|
|
195
194
|
"preserve_recent": 2
|
|
196
195
|
},
|
|
197
|
-
"timeoutMs": 180000
|
|
198
|
-
"maxTokens": 48000
|
|
196
|
+
"timeoutMs": 180000
|
|
199
197
|
}
|
|
200
198
|
]
|
|
201
199
|
}
|
package/docs/containerization.md
CHANGED
|
@@ -128,8 +128,8 @@ Do not bind-mount your host `~/.atomic` or `~/.atomic/agent` into a running cont
|
|
|
128
128
|
### Container runtime, network, and CI options
|
|
129
129
|
|
|
130
130
|
- **Memory and cgroup controls.** For npm and Node.js installs, Atomic sizes the Node.js heap automatically to half of the container's cgroup memory limit when that exceeds Node's default; override with `ATOMIC_HEAP_MB` (`0` keeps Node's default). On Linux with a user-owned cgroup v2 hierarchy, Atomic also uses cgroups to contain background shell process trees; set `ATOMIC_TASK_CGROUP=0` if container cgroup policies block it ([Background tasks](/background-tasks#lifetime-retention-and-cleanup), [Environment variables](/environment-variables#diagnostics-and-performance)).
|
|
131
|
-
- **Restricted networks, proxies, and private CAs.** Pass `--offline` or set `ATOMIC_OFFLINE=1` in restricted-egress containers to disable automatic update checks, telemetry, and binary downloads. Configure `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` (or `httpProxy` in [Network proxy settings](/settings#network-proxy)), point `NODE_EXTRA_CA_CERTS` at private CA bundles ([Environment variables](/environment-variables#tls-certificates)), and set `ATOMIC_ALLOW_PRIVATE_URL_READS=1` only if `read` needs to reach container-local services. For PostgreSQL over an HTTP `CONNECT` proxy, see [Through an HTTP proxy](/storage#through-an-http-proxy).
|
|
132
|
-
- **Unattended and CI containers.** For headless runs without `-it`, use print mode (`-p`), `--mode json`, or `--mode rpc`, and combine `--no-session` (or shared storage) with explicit `--approve` or `--no-approve` trust flags ([Non-interactive usage](/guides/non-interactive)). In CI or multi-container runs, set `
|
|
131
|
+
- **Restricted networks, proxies, and private CAs.** Pass `--offline` or set `ATOMIC_OFFLINE=1` in restricted-egress containers to disable automatic update checks, telemetry, and binary downloads. Configure `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` (or `httpProxy` in [Network proxy settings](/settings#network-proxy)), point `NODE_EXTRA_CA_CERTS` at private CA bundles ([Environment variables](/environment-variables#tls-certificates)), and set `ATOMIC_ALLOW_PRIVATE_URL_READS=1` only if `read` needs to reach container-local services. For PostgreSQL over an HTTP `CONNECT` proxy, see [Through an HTTP proxy](/storage/postgres#through-an-http-proxy).
|
|
132
|
+
- **Unattended and CI containers.** For headless runs without `-it`, use print mode (`-p`), `--mode json`, or `--mode rpc`, and combine `--no-session` (or shared storage) with explicit `--approve` or `--no-approve` trust flags ([Non-interactive usage](/guides/non-interactive)). In CI or multi-container runs, set `ATOMIC_STORAGE` to the team database ([Team and CI setup](/guides/team-setup#ci-and-swarms)), and use `.atomic/blueprint.yaml` with `atomic blueprint prebuild` to pre-install project dependencies and warm caches ([Resume on any machine](/guides/resume-on-any-machine#set-the-environment-up-with-a-blueprint)).
|
|
133
133
|
|
|
134
134
|
## NVIDIA OpenShell
|
|
135
135
|
|
|
@@ -168,7 +168,7 @@ interface ProviderCompactorModelConfig extends ProviderModelConfigBase {
|
|
|
168
168
|
compactionParams?: Record<string, unknown>;
|
|
169
169
|
/** Wall-clock request timeout in milliseconds (default `120000`). */
|
|
170
170
|
timeoutMs?: number;
|
|
171
|
-
/**
|
|
171
|
+
/** Optional upper bound on compacted output in estimated tokens; longer output clears the context instead. No default: omitted means no size limit. */
|
|
172
172
|
maxTokens?: number;
|
|
173
173
|
}
|
|
174
174
|
|
package/docs/docs.json
CHANGED
|
@@ -46,8 +46,6 @@
|
|
|
46
46
|
"background-tasks",
|
|
47
47
|
"guides/intercom",
|
|
48
48
|
"guides/team-setup",
|
|
49
|
-
"guides/postgres-pgbouncer",
|
|
50
|
-
"guides/postgres-tuning",
|
|
51
49
|
"computer-use",
|
|
52
50
|
"verification"
|
|
53
51
|
]
|
|
@@ -169,8 +167,7 @@
|
|
|
169
167
|
"libraries/codemode",
|
|
170
168
|
"libraries/schema",
|
|
171
169
|
"libraries/telemetry",
|
|
172
|
-
"libraries/storage-postgres"
|
|
173
|
-
"libraries/storage-libsql"
|
|
170
|
+
"libraries/storage-postgres"
|
|
174
171
|
]
|
|
175
172
|
}
|
|
176
173
|
]
|
|
@@ -202,7 +199,33 @@
|
|
|
202
199
|
"models-configuration",
|
|
203
200
|
"session-format",
|
|
204
201
|
"compaction/reference",
|
|
205
|
-
|
|
202
|
+
{
|
|
203
|
+
"group": "Storage",
|
|
204
|
+
"pages": [
|
|
205
|
+
"storage",
|
|
206
|
+
{
|
|
207
|
+
"group": "SQLite",
|
|
208
|
+
"pages": [
|
|
209
|
+
"storage/sqlite"
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"group": "JSONL",
|
|
214
|
+
"pages": [
|
|
215
|
+
"storage/jsonl"
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"group": "PostgreSQL",
|
|
220
|
+
"pages": [
|
|
221
|
+
"storage/postgres",
|
|
222
|
+
"storage/postgres/pgbouncer",
|
|
223
|
+
"storage/postgres/tuning"
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"storage/custom-adapters"
|
|
227
|
+
]
|
|
228
|
+
}
|
|
206
229
|
]
|
|
207
230
|
},
|
|
208
231
|
{
|
|
@@ -275,7 +298,9 @@
|
|
|
275
298
|
{ "source": "/workflows/operations", "destination": "/orchestration/migrating-workflows" },
|
|
276
299
|
{ "source": "/workflows/api-reference", "destination": "/orchestration/migrating-workflows" },
|
|
277
300
|
{ "source": "/guides/worker-hosts", "destination": "/orchestration" },
|
|
278
|
-
{ "source": "/guides/worker-fleets-postgres", "destination": "/storage
|
|
301
|
+
{ "source": "/guides/worker-fleets-postgres", "destination": "/storage/postgres" },
|
|
302
|
+
{ "source": "/guides/postgres-pgbouncer", "destination": "/storage/postgres/pgbouncer" },
|
|
303
|
+
{ "source": "/guides/postgres-tuning", "destination": "/storage/postgres/tuning" },
|
|
279
304
|
{
|
|
280
305
|
"source": "/session",
|
|
281
306
|
"destination": "/session-format"
|
|
@@ -312,10 +337,12 @@
|
|
|
312
337
|
"source": "/models/model-selection",
|
|
313
338
|
"destination": "/models"
|
|
314
339
|
},
|
|
315
|
-
{ "source": "/postgres", "destination": "/storage
|
|
316
|
-
{ "source": "/postgresql", "destination": "/storage
|
|
317
|
-
{ "source": "/libsql", "destination": "/storage#
|
|
318
|
-
{ "source": "/
|
|
340
|
+
{ "source": "/postgres", "destination": "/storage/postgres" },
|
|
341
|
+
{ "source": "/postgresql", "destination": "/storage/postgres" },
|
|
342
|
+
{ "source": "/storage/libsql", "destination": "/storage#moving-off-libsql" },
|
|
343
|
+
{ "source": "/libsql", "destination": "/storage#moving-off-libsql" },
|
|
344
|
+
{ "source": "/turso", "destination": "/storage#moving-off-libsql" },
|
|
345
|
+
{ "source": "/libraries/storage-libsql", "destination": "/storage#moving-off-libsql" },
|
|
319
346
|
{ "source": "/decisions", "destination": "/sdk/structured-decisions" },
|
|
320
347
|
{ "source": "/structured-decisions", "destination": "/sdk/structured-decisions" },
|
|
321
348
|
{ "source": "/compactors", "destination": "/compaction#customize-morph-or-add-a-remote-compactor" },
|
|
@@ -44,8 +44,6 @@ Variables use different parsing rules depending on their category:
|
|
|
44
44
|
| `ATOMIC_CODING_AGENT_SESSION_DIR` | None | Non-empty path selects a JSONL session directory (`--session-dir` and `--no-session` take precedence; see [CLI session options](/reference/cli#session-options)). Relative paths resolve from the working directory; empty values leave [session settings](/settings#sessions) in effect. Combining a non-empty value with `--storage`, `--storage-file`, or `ATOMIC_SESSIONS_STORAGE` fails startup with `StorageConfigError` (`conflicting-overrides`) |
|
|
45
45
|
| `ATOMIC_STORAGE` | None | Shared storage selection JSON for sessions without their own selection and for Intercom (`{ "dir": "..." }` is forbidden here). Overrides [settings](/settings#sessions) but not `--storage`, session flags, or session-specific env vars. See [Selecting storage per process](/storage#selecting-storage-per-process) and [SDK storage](/sdk/storage) |
|
|
46
46
|
| `ATOMIC_SESSIONS_STORAGE` | None | Session-only storage selection JSON in the same form as [`sessions.storage`](/settings#sessions) (accepts `{ "dir": "..." }`). Conflicts with a non-empty `ATOMIC_CODING_AGENT_SESSION_DIR` |
|
|
47
|
-
| `ATOMIC_PROFILE` | None | `ci` selects the team database for sessions and Intercom from `ATOMIC_TEAM_*` without writing settings. See [Team and CI setup](/guides/team-setup#ci-and-swarms) |
|
|
48
|
-
| `ATOMIC_TEAM_URL`, `ATOMIC_TEAM_TOKEN`, `ATOMIC_TEAM_TOKEN_FILE`, `ATOMIC_TEAM_PREFIX` | None | Team database settings for `ATOMIC_PROFILE=ci`. Setting any without `ATOMIC_PROFILE=ci` fails startup. `ATOMIC_TEAM_TOKEN_FILE` must be an absolute path, and `ATOMIC_TEAM_TOKEN` cannot be combined with `ATOMIC_TEAM_TOKEN_FILE` |
|
|
49
47
|
| `ATOMIC_INTERCOM_GROUP` | `PI_INTERCOM_GROUP` | Static home Intercom group for this session. See [Intercom reference](/intercom/reference#configuration) |
|
|
50
48
|
| `ATOMIC_INTERCOM_JOIN_AT_STARTUP` | `PI_INTERCOM_JOIN_AT_STARTUP` | `1`/`true` or `0`/`false` (case-insensitive, trimmed) overrides whether interactive sessions join Intercom at startup regardless of Intercom config |
|
|
51
49
|
|
|
@@ -534,7 +534,7 @@ Returns all slash commands invocable via prompts (`extension`, `prompt`, and `sk
|
|
|
534
534
|
|
|
535
535
|
Register a TUI renderer for custom messages with `customType`. Options include `expanded`, `outputPad`, `keyHint()`, and `keyText()` in both interactive and embedded rendering. Returning a `Component` renders it, returning `null` suppresses the message completely (zero rows, no box), and returning `undefined` falls back to the default boxed rendering. Clicking the message in fullscreen mode toggles `expanded` unless a custom mouse handler consumes the click. See [Message rendering](/extensions/ui#message-rendering).
|
|
536
536
|
|
|
537
|
-
### atomic.registerToolRenderer(resolver)
|
|
537
|
+
### atomic.registerToolRenderer(resolver) {#atomic-registertoolrenderer-resolver}
|
|
538
538
|
|
|
539
539
|
Register a resolver `(toolName, next) => renderers` supplying `renderCall`, `renderResult`, and optional `renderShell` for any tool (including MCP tools in resumed sessions before their server connects). Resolvers run in extension load order; `next()` returns the remaining resolvers' choice and then the tool's own renderers. See [Custom rendering](/extensions/authoring#custom-rendering).
|
|
540
540
|
|
|
@@ -597,7 +597,7 @@ Flag rules:
|
|
|
597
597
|
|
|
598
598
|
<div id="pi-registeragentpanelsource-source" />
|
|
599
599
|
|
|
600
|
-
### atomic.registerAgentPanelSource(source)
|
|
600
|
+
### atomic.registerAgentPanelSource(source) {#atomic-registeragentpanelsource-source}
|
|
601
601
|
|
|
602
602
|
Add rows to the [agent panel](/background-tasks#the-agent-panel) below the prompt and to `/tasks`. Registrations are removed automatically when the extension reloads or the session closes.
|
|
603
603
|
|
|
@@ -650,7 +650,7 @@ Optional actions (`open`, `stop`, `answer`) return `{ ok: true }` or `{ ok: fals
|
|
|
650
650
|
|
|
651
651
|
Exported types and standalone helpers: `AgentPanelSource`, `AgentPanelItem`, `AgentPanelState`, `AgentPanelActionResult`, `AgentPanelOpenOptions`, `AgentPanelAnswerOptions`, `AgentPanelSourceRegistration`, `AgentPanelSession`, `agentPanelItems(session)`, `subscribeAgentPanel(session, listener)`, `openAgentPanelItem`, `stopAgentPanelItem`, `answerAgentPanelItem`, `dismissedAgentPanelItems(session)`, and `agentPanelTaskId(id)`.
|
|
652
652
|
|
|
653
|
-
### atomic.exec(command, args, options?)
|
|
653
|
+
### atomic.exec(command, args, options?) {#atomic-exec-command-args-options}
|
|
654
654
|
|
|
655
655
|
Execute a command directly without a shell:
|
|
656
656
|
|
|
@@ -662,7 +662,7 @@ const result = await atomic.exec("git", ["status"], { signal, timeout: 5000 });
|
|
|
662
662
|
- On Windows, bare command names (like `git`) resolve only from absolute directories on `PATH`, never from `cwd` or Atomic's own directory.
|
|
663
663
|
- Options: `signal`, `timeout`, `cwd`, `maxBuffer` (default 256 MiB combined stdout/stderr). Exceeding `maxBuffer` kills the process and sets `truncated: true`, `killed: true`, and nonzero `code`. Signal terminations report `128 + signal`.
|
|
664
664
|
- On timeout, abort, or `maxBuffer`: terminates the process tree (`SIGTERM`, then `SIGKILL` after 5 s on Unix; immediate descendant termination on Windows).
|
|
665
|
-
- On interactive quit: kills running commands after 1 s (`SIGTERM` then `SIGKILL` on Unix; immediate on Windows) before `session_shutdown` runs; commands started inside `session_shutdown` are not killed this way.
|
|
665
|
+
- On interactive quit: kills running commands after 1 s (`SIGTERM` then `SIGKILL` on Unix; immediate on Windows) before `session_shutdown` runs; commands started inside `session_shutdown` are not killed this way. When Atomic is killed (`SIGKILL`), running commands and the processes they started in their process group receive `SIGKILL` on Linux and macOS, also in a session that runs in Atomic's own process; a program a command started detached keeps running.
|
|
666
666
|
|
|
667
667
|
### atomic.getActiveTools() / atomic.getAllTools() / atomic.setActiveTools(names)
|
|
668
668
|
|
|
@@ -28,6 +28,7 @@ Package-manager installs need Node.js 24 LTS, version 24.20.0 or newer. The [rel
|
|
|
28
28
|
|
|
29
29
|
- **Why 24.20.0:** Node.js releases before 24.15.0 bundle a SQLite version with a bug that can corrupt Atomic's session database ([SQLite WAL-reset bug](https://www.sqlite.org/wal.html#walresetbug)). Node.js 24.17.0 through 24.19.0 reject valid certificates for IPv6 addresses such as an `https://[::1]` proxy ([nodejs/node#64145](https://github.com/nodejs/node/pull/64145)); 24.20.0 fixes both.
|
|
30
30
|
- **Check your version:** Run `node --version`. It must print `v24.20.0` or a later `v24` release, or a newer major version.
|
|
31
|
+
- **On an older Node.js,** `atomic` stops at startup with `Atomic needs Node.js 24.20.0 or newer, but this is Node.js <version>.` and a link to this section.
|
|
31
32
|
- **Upgrade:** Install the current Node.js 24 LTS release from [nodejs.org](https://nodejs.org/en/download), or with a version manager: `nvm install 24`, `fnm install 24`, or `mise use -g node@24`. Then reinstall Atomic with `npm install -g @bastani/atomic` so it runs on the new Node.js.
|
|
32
33
|
|
|
33
34
|
### Package manager troubleshooting
|
|
@@ -121,6 +122,8 @@ You should see a single version line (for example `0.10.5`). If your shell repor
|
|
|
121
122
|
|
|
122
123
|
Package-manager installs run on Node.js (`#!/usr/bin/env node`), including global installs created with `bun add -g` unless you explicitly run with Bun (`--bun`). Standalone release archives run on Bun. Installing Bun separately does not switch an npm install to Bun. [Codemode scripts](/codemode) always run inside a sandboxed JavaScript VM with no direct Node or Bun APIs.
|
|
123
124
|
|
|
125
|
+
Both runtimes use the same SQLite version for local storage. Node.js includes its own copy of SQLite. On macOS, Bun would otherwise use the SQLite that comes with macOS, whose version depends on your macOS release, so the macOS release archives include their own copy, in `lib/libsqlite3.dylib`. You don't need to do anything. `atomic storage status` shows the version in use on its `library:` line. If that copy can't be loaded, Atomic prints one warning and uses the system's SQLite instead.
|
|
126
|
+
|
|
124
127
|
## Git
|
|
125
128
|
|
|
126
129
|
Atomic requires Git 2.30.0 or newer for worktrees, git packages, and the footer branch display. It uses the first `git` found in an absolute `PATH` directory (never the working directory) if that binary reports 2.30.0 or newer. Otherwise, Atomic downloads a verified portable Git (pinned to Git 2.56.0 from [desktop/dugite-native](https://github.com/desktop/dugite-native)), just as it does for `fd` and `rg`.
|
|
@@ -18,7 +18,7 @@ Atomic splits configuration by scope and purpose:
|
|
|
18
18
|
| Custom models, local servers, proxies, overrides, and remote compactors | `~/.atomic/agent/models.json` | [Configure custom models](/models) |
|
|
19
19
|
| Custom provider APIs, OAuth flows, dynamic catalogs, and account aliases | Extension calling `atomic.registerProvider()` | [Build custom providers](/custom-provider) |
|
|
20
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,
|
|
21
|
+
| Local SQLite, JSONL, or PostgreSQL session and Intercom backends | `storage` / `sessions.storage`, `atomic storage join`, or SDK storage options | [Storage](/storage) and [SDK storage](/sdk/storage) |
|
|
22
22
|
| One-run overrides for a single command | CLI flags (`--model`, `--models`, `--tools`, `--storage`) | [CLI reference](/reference/cli) |
|
|
23
23
|
| Process, CI, terminal, and diagnostic overrides | `ATOMIC_*` environment variables | [Environment variables](/environment-variables) |
|
|
24
24
|
| Programmatic session setup in TypeScript | `createAgentSession()` and `SettingsManager` options | [SDK](/sdk) |
|
|
@@ -49,6 +49,6 @@ Use `--mode rpc` to keep a session alive so another process can send prompts, an
|
|
|
49
49
|
## Next steps
|
|
50
50
|
|
|
51
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`,
|
|
52
|
+
- [Environment variables](/environment-variables) for `ATOMIC_STDIN_TIMEOUT_MS`, `ATOMIC_STORAGE`, and CI overrides.
|
|
53
53
|
- [Programmatic use](/programmatic) to choose between the SDK, RPC, and the JSON event stream.
|
|
54
54
|
- [Background tasks](/background-tasks) when work should continue while you keep chatting interactively.
|
|
@@ -8,31 +8,23 @@ When several machines share one storage database, you can start a session on one
|
|
|
8
8
|
|
|
9
9
|
## Join each machine
|
|
10
10
|
|
|
11
|
-
Every machine must use the same shared
|
|
11
|
+
Every machine must use the same shared [PostgreSQL](/storage/postgres) database, PostgreSQL 16 or newer.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
1. Set up the database once. Create the roles, then run `atomic storage migrate` as the owner role, and again after each Atomic upgrade. See [Set up the database](/storage/postgres#set-up-the-database).
|
|
14
|
+
2. On every machine, install the adapter, save the runtime role's password in a file, join the database as the runtime role, and restart Intercom:
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
```bash
|
|
17
|
+
atomic install npm:@bastani/atomic-storage-postgres
|
|
18
|
+
(umask 077; printf 'Runtime password: '; read -rs password; printf '\n'; printf '%s' "$password" > ~/atomic-db-password)
|
|
19
|
+
atomic storage join 'postgresql://atomic_runtime@db.example.com:5432/atomic' --password-file ~/atomic-db-password
|
|
20
|
+
rm ~/atomic-db-password # atomic storage join keeps its own copy
|
|
21
|
+
atomic intercom restart
|
|
22
|
+
atomic storage status
|
|
23
|
+
```
|
|
16
24
|
|
|
17
|
-
|
|
18
|
-
atomic install npm:@bastani/atomic-storage-postgres
|
|
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
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
See [PostgreSQL](/storage#postgresql) for database roles, TLS, and cloud identities.
|
|
25
|
-
|
|
26
|
-
**libSQL / Turso:**
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
atomic install npm:@bastani/atomic-storage-libsql
|
|
30
|
-
atomic storage join libsql://<db>.turso.io --token-file ~/turso-token
|
|
31
|
-
atomic intercom restart
|
|
32
|
-
atomic storage status
|
|
33
|
-
```
|
|
25
|
+
Never put a password in the database URL. Pass it with `--password-file`, `--token-file`, or `--auth`, as [Join a machine](/storage/postgres#join-a-machine) explains. A URL with a password fails with `credential-in-url`.
|
|
34
26
|
|
|
35
|
-
`atomic storage join`
|
|
27
|
+
`atomic storage join` keeps sessions in the shared database, so they resume on any machine that joined it. If a machine shares only Intercom and keeps its sessions local, with `sessions.storage` set to `{}`, remove that setting so its sessions go to the shared database too. See [Sharing storage across hosts](/storage#sharing-storage-across-hosts) for prefixes and `atomic storage status`.
|
|
36
28
|
|
|
37
29
|
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`.
|
|
38
30
|
|
|
@@ -274,7 +266,7 @@ For session resumes, missing Git never blocks opening the session. Instead, the
|
|
|
274
266
|
|
|
275
267
|
| Symptom | Fix | SDK error and code |
|
|
276
268
|
| --- | --- | --- |
|
|
277
|
-
| Session ID not found on this machine | If this machine
|
|
269
|
+
| Session ID not found on this machine | If this machine keeps its sessions locally (`local-storage-not-joined`), join the shared database with `atomic storage join`, and remove any `sessions.storage` setting that keeps sessions local. If already joined (`shared-miss`), check the session ID, database URL, and prefix. | `ResumeNotFoundError` (`not-found`) |
|
|
278
270
|
| 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
271
|
| 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
272
|
| Shared database unreachable during lookup | Check connectivity with `atomic storage status` and resume again. | `ResumeCatalogUnavailableError` (`catalog-unavailable`) |
|