@bastani/atomic 0.10.10 → 0.10.11-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 +139 -0
- package/README.md +1 -1
- 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 +11 -13
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +9 -9
- package/dist/_shared/mode-shared-2QJSCUM6.js +55 -18
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/runtime-O4KCSG4C.js +5 -5
- package/dist/_shared/{sdk-RRLVN7ER.js → sdk-IQMULKFU.js} +2962 -470
- package/dist/_shared/sdk-IQMULKFU.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +4 -4
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js +1 -1
- package/dist/_shared/{settings-startup-4QCVCI53.js → settings-startup-HXQLSUWM.js} +8 -2
- package/dist/_shared/settings-startup-HXQLSUWM.js.map +1 -0
- package/dist/_shared/{startup-0-0-4VG2G44V.js → startup-0-0-3IXNMFM2.js} +482 -53
- package/dist/_shared/startup-0-0-3IXNMFM2.js.map +1 -0
- package/dist/_shared/{startup-0-1-XTIL65D4.js → startup-0-1-7T2IAE7J.js} +121 -251
- package/dist/_shared/startup-0-1-7T2IAE7J.js.map +1 -0
- package/dist/_shared/{startup-0-2-27OWFHV6.js → startup-0-2-5QHPCEON.js} +293 -10
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +1 -0
- package/dist/_shared/{startup-0-3-T4DVFYWX.js → startup-0-3-4ZYBYQNM.js} +273 -14
- package/dist/_shared/startup-0-3-4ZYBYQNM.js.map +1 -0
- package/dist/_shared/startup-0-4-ZMJV547D.js +6 -6
- package/dist/_shared/{startup-0-5-FD2P735I.js → startup-0-5-YDW47QX6.js} +29 -71
- package/dist/_shared/startup-0-5-YDW47QX6.js.map +1 -0
- package/dist/_shared/startup-10-0-TDQNBDDL.js +9 -9
- package/dist/_shared/startup-12-0-55AAXBJZ.js +4 -4
- package/dist/_shared/startup-14-0-MLX36RBG.js +6 -6
- package/dist/_shared/startup-15-0-YUKGAC63.js +34 -10
- package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +10 -9
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +421 -84
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/{startup-8-1-4KANEHRA.js → startup-8-1-X32CYSXB.js} +1291 -722
- package/dist/_shared/startup-8-1-X32CYSXB.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +17 -9
- package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
- package/dist/_shared/task-reference-stream-JWMUZSJX.js +1 -1
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +3 -3
- package/dist/builtin/intercom/CHANGELOG.md +29 -0
- package/dist/builtin/intercom/broker/broker.bundle.mjs +1138 -384
- package/dist/builtin/intercom/broker/database-wake-up-bus.ts +103 -24
- package/dist/builtin/intercom/broker/multinode-router.ts +42 -21
- package/dist/builtin/intercom/broker/multinode-state-store.ts +22 -1
- package/dist/builtin/intercom/broker/open-broker-state.ts +82 -31
- package/dist/builtin/intercom/broker/paths.ts +8 -4
- package/dist/builtin/intercom/broker/released-asker-remote-replies.ts +18 -6
- package/dist/builtin/intercom/broker/sql-add-column.ts +4 -1
- package/dist/builtin/intercom/broker/sql-ended-child-queue-store.ts +65 -44
- package/dist/builtin/intercom/broker/sql-held-send-store.ts +11 -3
- package/dist/builtin/intercom/broker/sql-known-session-store.ts +24 -12
- package/dist/builtin/intercom/broker/sql-lease-store.ts +386 -65
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +462 -130
- package/dist/builtin/intercom/broker/sql-pending-ask-store.ts +20 -9
- package/dist/builtin/intercom/broker/sql-released-ask-store.ts +14 -6
- package/dist/builtin/intercom/broker/sql-restoring-reservation-store.ts +27 -11
- package/dist/builtin/intercom/broker/sql-schema.ts +198 -5
- package/dist/builtin/intercom/broker/sql-sent-message-authority.ts +97 -34
- package/dist/builtin/intercom/index.bundle.mjs +11 -8
- 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/CHANGELOG.md +18 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/skills/skill-creator/SKILL.md +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +62 -23
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +6 -6
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +4 -4
- 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 +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 +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 +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 +3 -3
- 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 +3 -0
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session.d.ts +1 -0
- package/dist/core/compaction/compactor.d.ts +2 -0
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.code.js +1 -1
- 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.code.js +2 -2
- 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 +2 -2
- package/dist/core/extensions/runner-context.js +4 -4
- package/dist/core/extensions/runner-context.js.map +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-registry.js +1 -1
- package/dist/core/model-resolver-defaults.d.ts +3 -2
- 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/sdk.code.js +4 -5
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.d.ts +5 -2
- package/dist/core/session-manager-core.js +39 -23
- package/dist/core/session-manager-core.js.map +1 -1
- 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 +3 -3
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-open-markers.js +3 -0
- package/dist/core/session-open-markers.js.map +1 -0
- 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/storage/added-exports.d.ts +6 -0
- package/dist/core/storage/added-exports.js +19 -0
- package/dist/core/storage/added-exports.js.map +1 -0
- package/dist/core/storage/database.d.ts +53 -0
- package/dist/core/storage/database.js.map +1 -1
- package/dist/core/storage/fenced-paths.d.ts +47 -0
- package/dist/core/storage/fenced-paths.js +53 -0
- package/dist/core/storage/fenced-paths.js.map +1 -1
- package/dist/core/storage/file-identity.js +31 -2
- package/dist/core/storage/file-identity.js.map +1 -1
- package/dist/core/storage/index.d.ts +4 -1
- package/dist/core/storage/index.js +5 -2
- package/dist/core/storage/index.js.map +1 -1
- package/dist/core/storage/migrations.d.ts +33 -2
- package/dist/core/storage/migrations.js +73 -5
- package/dist/core/storage/migrations.js.map +1 -1
- package/dist/core/storage/node-sqlite-thread.js +48 -6
- package/dist/core/storage/node-sqlite-thread.js.map +1 -1
- package/dist/core/storage/node-sqlite.js +137 -4
- 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 +3 -2
- package/dist/core/storage/prefix.js +23 -2
- package/dist/core/storage/prefix.js.map +1 -1
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/schema-catalog.d.ts +120 -0
- package/dist/core/storage/schema-catalog.js +351 -0
- package/dist/core/storage/schema-catalog.js.map +1 -0
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +47 -25
- package/dist/core/storage/session/branch-fork-source.code.js.map +1 -1
- 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 +4 -4
- 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.code.js +1 -1
- 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/errors.js +1 -1
- package/dist/core/storage/session/expanded-child-details.code.js +4 -4
- 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-detach.d.ts +118 -0
- 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-schema.js +53 -0
- package/dist/core/storage/session/fork-schema.js.map +1 -0
- package/dist/core/storage/session/fork-segments.d.ts +58 -0
- package/dist/core/storage/session/fork-staging.code.js +176 -36
- 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-sweep.js +61 -0
- package/dist/core/storage/session/fork-sweep.js.map +1 -0
- package/dist/core/storage/session/fork-window.code.js +4 -4
- 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 +37 -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.code.js +1 -1
- 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 +5 -0
- 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 +4 -4
- 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-chat-records.d.ts +15 -0
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.d.ts +445 -11
- package/dist/core/storage/session/sql-session-store.impl.js +4 -4
- package/dist/core/storage/session/sql-session-store.js +4 -4
- 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.code.js +1 -1
- 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/session/types.d.ts +36 -0
- package/dist/core/storage/sqlite-facade.d.ts +54 -6
- package/dist/core/storage/sqlite-facade.js +384 -18
- package/dist/core/storage/sqlite-facade.js.map +1 -1
- package/dist/core/storage/statement-sequence.d.ts +83 -0
- package/dist/core/storage/statement-sequence.js +21 -0
- package/dist/core/storage/statement-sequence.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.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.code.js +1 -1
- 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 +4 -4
- 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 +5 -5
- 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/bash.d.ts +8 -4
- package/dist/core/tools/history-session.d.ts +7 -0
- package/dist/core/tools/history-tasks.d.ts +123 -0
- package/dist/core/tools/kill.d.ts +5 -2
- package/dist/core/tools/powershell.d.ts +2 -2
- package/dist/core/tools/read-url.code.js +3 -3
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/tools/read.d.ts +12 -2
- package/dist/core/tools/resource-selectors.d.ts +2 -0
- package/dist/core/tools/search.d.ts +12 -2
- package/dist/core/worktree-snapshot/blob-store.d.ts +45 -2
- package/dist/core/worktree-snapshot/blob-store.js +228 -60
- package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
- 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/fork-snapshot-index.js +121 -0
- package/dist/core/worktree-snapshot/fork-snapshot-index.js.map +1 -0
- 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 +3 -3
- 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.js +8 -8
- 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/main.js +1 -1
- package/dist/modes/interactive/components/agent-panel.d.ts +1 -0
- package/dist/modes/interactive/components/stored-tree-view.code.js +3 -3
- 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/task-inspector.d.ts +2 -0
- package/dist/modes/interactive/components/user-message-selector-archive.code.js +1 -1
- 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/interactive-mode-helpers.d.ts +2 -2
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/rpc/agent-panel-bridge.d.ts +5 -0
- package/dist/package-manager-cli.code.js +7 -7
- 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/0.js +1 -1
- package/dist/startup-stages/1.js +1 -1
- package/dist/startup-stages/10.js +1 -1
- package/dist/startup-stages/12.js +1 -1
- package/dist/startup-stages/2.js +9 -1
- package/dist/startup-stages/3.js +1 -6
- package/dist/startup-stages/5.js +1 -1
- package/dist/startup-stages/7.js +1 -1
- package/dist/startup-stages/8.js +2 -2
- 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 +123 -23
- package/docs/compaction.md +18 -0
- package/docs/docs.json +2 -0
- package/docs/environment-variables.md +1 -1
- package/docs/getting-started/installation.md +9 -2
- package/docs/guides/postgres-pgbouncer.md +346 -0
- package/docs/guides/postgres-tuning.md +311 -0
- package/docs/guides/resume-on-any-machine.md +2 -2
- package/docs/guides.md +2 -0
- package/docs/index.md +1 -1
- package/docs/libraries/agent-core.md +1 -1
- package/docs/libraries/ai.md +2 -2
- package/docs/libraries/codemode.md +1 -1
- package/docs/libraries/storage-libsql.md +6 -1
- package/docs/libraries/storage-postgres.md +11 -6
- package/docs/libraries/tui.md +1 -1
- package/docs/libraries.md +2 -2
- package/docs/programmatic.md +1 -1
- package/docs/quickstart.md +1 -1
- package/docs/sdk/storage.md +1 -1
- package/docs/sdk/web-server.md +1 -3
- package/docs/sdk.md +1 -7
- package/docs/sessions.md +67 -2
- package/docs/settings.md +20 -1
- package/docs/skills/authoring.md +1 -1
- package/docs/skills.md +79 -6
- package/docs/storage.md +305 -14
- package/docs/subagents/reference.md +2 -2
- package/docs/subagents.md +4 -3
- package/docs/tools.md +44 -10
- package/docs/windows.md +1 -1
- package/package.json +9 -9
- package/dist/_shared/sdk-RRLVN7ER.js.map +0 -1
- package/dist/_shared/settings-startup-4QCVCI53.js.map +0 -1
- package/dist/_shared/startup-0-0-4VG2G44V.js.map +0 -1
- package/dist/_shared/startup-0-1-XTIL65D4.js.map +0 -1
- package/dist/_shared/startup-0-2-27OWFHV6.js.map +0 -1
- package/dist/_shared/startup-0-3-T4DVFYWX.js.map +0 -1
- package/dist/_shared/startup-0-5-FD2P735I.js.map +0 -1
- package/dist/_shared/startup-8-1-4KANEHRA.js.map +0 -1
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
dialectOf,
|
|
3
|
+
type SqliteExecutor,
|
|
4
|
+
type SqliteRow,
|
|
5
|
+
type SqliteStatement,
|
|
6
|
+
validateStoragePrefix,
|
|
7
|
+
} from "@bastani/atomic/storage";
|
|
2
8
|
import type {
|
|
3
9
|
IntercomBrokerStateOptions,
|
|
4
10
|
InvalidStateInput,
|
|
@@ -12,7 +18,8 @@ import type {
|
|
|
12
18
|
SentMessageState,
|
|
13
19
|
SentQuestionRoute,
|
|
14
20
|
} from "./multinode-state-store.js";
|
|
15
|
-
import {
|
|
21
|
+
import { rowTransaction } from "./sql-outbox-store.js";
|
|
22
|
+
import { ensureBrokerSchema, withBrokerSchemaCatalog } from "./sql-schema.js";
|
|
16
23
|
|
|
17
24
|
type SentRow = SqliteRow & {
|
|
18
25
|
digest: string;
|
|
@@ -34,18 +41,43 @@ export interface SqlSentMessageAuthority extends SentMessageAuthority {
|
|
|
34
41
|
reserveIn(executor: SqliteExecutor, reservation: SentMessageReservation): Promise<SentMessageReserveResult>;
|
|
35
42
|
lookupIn(executor: SqliteExecutor, key: SentMessageKey): Promise<SentMessageLookupResult>;
|
|
36
43
|
forgetIn(executor: SqliteExecutor, key: SentMessageKey): Promise<SentMessageForgetResult>;
|
|
44
|
+
/** The read `lookupIn` makes for `messageId`, for a transaction's `leading` statements (#6560). */
|
|
45
|
+
lookupStatement(messageId: string): SqliteStatement;
|
|
46
|
+
/**
|
|
47
|
+
* The one write `reserveIn` makes for `reservation`, for a caller that needs no answer from it; undefined for a
|
|
48
|
+
* reservation `reserveIn` refuses without writing (#6560).
|
|
49
|
+
*/
|
|
50
|
+
reserveStatement(reservation: SentMessageReservation): SqliteStatement | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* An SQL condition that holds while `key` is the message's reservation, in the transaction that evaluates it: a
|
|
53
|
+
* send's outbox row is inserted only under it, after the send's own `reserveStatement` (#6560).
|
|
54
|
+
*/
|
|
55
|
+
reservedCondition(key: SentMessageKey): SqliteStatement;
|
|
37
56
|
}
|
|
38
57
|
|
|
39
58
|
/**
|
|
40
59
|
* S3: `SentMessageAuthority` on the shared storage adapter's database, table `<prefix>intercom_sent_messages`.
|
|
41
60
|
* Digests are opaque strings computed by the caller.
|
|
42
61
|
*/
|
|
43
|
-
export
|
|
62
|
+
export function openSqlSentMessageAuthority(options: IntercomBrokerStateOptions): Promise<SqlSentMessageAuthority> {
|
|
63
|
+
// Its schema checks answer from one read of the catalog, shared with an open around it: a current schema costs
|
|
64
|
+
// no transaction and no lock, also when the store is opened on its own (#6560).
|
|
65
|
+
return withBrokerSchemaCatalog(options.database, options.prefix, () => openSentMessageAuthorityInCatalog(options));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async function openSentMessageAuthorityInCatalog({
|
|
44
69
|
database,
|
|
45
70
|
prefix,
|
|
46
71
|
}: IntercomBrokerStateOptions): Promise<SqlSentMessageAuthority> {
|
|
47
72
|
const table = `${validateStoragePrefix(prefix, dialectOf(database).name)}intercom_sent_messages`;
|
|
48
73
|
const { types, nowMs } = dialectOf(database);
|
|
74
|
+
/**
|
|
75
|
+
* Its own transactions write one row each, in one statement that decides on the row's lock and newest version, so
|
|
76
|
+
* they take no lock domain. A send's `reserveAndEnqueue` writes the message's row first, in its recipient's domain,
|
|
77
|
+
* and inserts its outbox row only under it (`reservedCondition`), so a rival reservation of the message either
|
|
78
|
+
* comes first and refuses the send, or waits for it and is refused (#6560).
|
|
79
|
+
*/
|
|
80
|
+
const fenced = rowTransaction();
|
|
49
81
|
await ensureBrokerSchema(database, prefix, "sent-messages", (tx) =>
|
|
50
82
|
tx.exec(`
|
|
51
83
|
CREATE TABLE IF NOT EXISTS ${table}(
|
|
@@ -59,18 +91,17 @@ export async function openSqlSentMessageAuthority({
|
|
|
59
91
|
CREATE INDEX IF NOT EXISTS ${table}_recorded ON ${table}(recorded_at);
|
|
60
92
|
`),
|
|
61
93
|
);
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
94
|
+
const lookupStatement = (messageId: string): SqliteStatement => ({
|
|
95
|
+
sql: `SELECT digest, target_identity, question_route_json, state FROM ${table} WHERE message_id = ?`,
|
|
96
|
+
params: [messageId],
|
|
97
|
+
});
|
|
98
|
+
const read = (executor: SqliteExecutor, messageId: string) => {
|
|
99
|
+
const { sql, params } = lookupStatement(messageId);
|
|
100
|
+
return executor.get<SentRow>(sql, ...params);
|
|
101
|
+
};
|
|
67
102
|
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
reservation: SentMessageReservation,
|
|
71
|
-
): Promise<SentMessageReserveResult> => {
|
|
72
|
-
if (reservation.messageId.length === 0) return emptyMessageId;
|
|
73
|
-
if (reservation.targetIdentity.length === 0) return { status: "invalid", reason: "empty-target-identity" };
|
|
103
|
+
const reserveStatement = (reservation: SentMessageReservation): SqliteStatement | undefined => {
|
|
104
|
+
if (reservation.messageId.length === 0 || reservation.targetIdentity.length === 0) return undefined;
|
|
74
105
|
const route =
|
|
75
106
|
reservation.questionRoute === undefined
|
|
76
107
|
? null
|
|
@@ -78,14 +109,21 @@ export async function openSqlSentMessageAuthority({
|
|
|
78
109
|
targetSessionId: reservation.questionRoute.targetSessionId,
|
|
79
110
|
senderGroupIdentity: reservation.questionRoute.senderGroupIdentity,
|
|
80
111
|
});
|
|
81
|
-
|
|
82
|
-
`INSERT INTO ${table}(message_id, digest, target_identity, question_route_json, state, recorded_at)
|
|
112
|
+
return {
|
|
113
|
+
sql: `INSERT INTO ${table}(message_id, digest, target_identity, question_route_json, state, recorded_at)
|
|
83
114
|
VALUES (?, ?, ?, ?, 'reserved', ${nowMs}) ON CONFLICT(message_id) DO NOTHING`,
|
|
84
|
-
reservation.messageId,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
115
|
+
params: [reservation.messageId, reservation.digest, reservation.targetIdentity, route],
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const reserveIn = async (
|
|
120
|
+
tx: SqliteExecutor,
|
|
121
|
+
reservation: SentMessageReservation,
|
|
122
|
+
): Promise<SentMessageReserveResult> => {
|
|
123
|
+
if (reservation.messageId.length === 0) return emptyMessageId;
|
|
124
|
+
if (reservation.targetIdentity.length === 0) return { status: "invalid", reason: "empty-target-identity" };
|
|
125
|
+
const { sql, params } = reserveStatement(reservation)!;
|
|
126
|
+
const { changes } = await tx.run(sql, ...params);
|
|
89
127
|
if (changes === 1) return { status: "reserved" };
|
|
90
128
|
const existing = await read(tx, reservation.messageId);
|
|
91
129
|
if (existing === undefined || existing.digest !== reservation.digest) return { status: "conflict" };
|
|
@@ -105,40 +143,65 @@ export async function openSqlSentMessageAuthority({
|
|
|
105
143
|
};
|
|
106
144
|
};
|
|
107
145
|
|
|
146
|
+
/** The message's row, deleted only while it holds `key`'s digest (#6560). */
|
|
147
|
+
const forgetStatement = (key: SentMessageKey): SqliteStatement => ({
|
|
148
|
+
sql: `DELETE FROM ${table} WHERE message_id = ? AND digest = ?`,
|
|
149
|
+
params: [key.messageId, key.digest],
|
|
150
|
+
});
|
|
151
|
+
const acceptStatement = (key: SentMessageKey): SqliteStatement => ({
|
|
152
|
+
sql: `UPDATE ${table} SET state = 'accepted' WHERE message_id = ? AND digest = ?`,
|
|
153
|
+
params: [key.messageId, key.digest],
|
|
154
|
+
});
|
|
155
|
+
/**
|
|
156
|
+
* Why a write guarded by `key`'s digest changed nothing: another digest holds the message, or none did when the write
|
|
157
|
+
* ran (one inserted since then came after it).
|
|
158
|
+
*/
|
|
159
|
+
const refusal = async (tx: SqliteExecutor, key: SentMessageKey) => {
|
|
160
|
+
const existing = await read(tx, key.messageId);
|
|
161
|
+
return existing !== undefined && existing.digest !== key.digest
|
|
162
|
+
? ({ status: "conflict" } as const)
|
|
163
|
+
: ({ status: "missing" } as const);
|
|
164
|
+
};
|
|
165
|
+
|
|
108
166
|
const forgetIn = async (tx: SqliteExecutor, key: SentMessageKey): Promise<SentMessageForgetResult> => {
|
|
109
167
|
if (key.messageId.length === 0) return emptyMessageId;
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
await tx.run(`DELETE FROM ${table} WHERE message_id = ?`, key.messageId);
|
|
114
|
-
return { status: "forgotten" };
|
|
168
|
+
const { sql, params } = forgetStatement(key);
|
|
169
|
+
const { changes } = await tx.run(sql, ...params);
|
|
170
|
+
return changes > 0 ? { status: "forgotten" } : refusal(tx, key);
|
|
115
171
|
};
|
|
116
172
|
|
|
173
|
+
/** A transaction whose first statement, sent with its start on a pipelined connection, is `first` (#6560). */
|
|
174
|
+
const leadingWith = (first: SqliteStatement) => ({ ...fenced, leading: [first] });
|
|
175
|
+
|
|
117
176
|
return {
|
|
118
177
|
reserveIn,
|
|
119
178
|
lookupIn,
|
|
120
179
|
forgetIn,
|
|
180
|
+
lookupStatement,
|
|
181
|
+
reserveStatement,
|
|
182
|
+
reservedCondition: (key) => ({
|
|
183
|
+
sql: `EXISTS (SELECT 1 FROM ${table} WHERE message_id = ? AND digest = ?)`,
|
|
184
|
+
params: [key.messageId, key.digest],
|
|
185
|
+
}),
|
|
121
186
|
async reserve(reservation): Promise<SentMessageReserveResult> {
|
|
122
187
|
if (reservation.messageId.length === 0) return emptyMessageId;
|
|
123
188
|
if (reservation.targetIdentity.length === 0) return { status: "invalid", reason: "empty-target-identity" };
|
|
124
|
-
return database.transaction((tx) => reserveIn(tx, reservation));
|
|
189
|
+
return database.transaction((tx) => reserveIn(tx, reservation), leadingWith(reserveStatement(reservation)!));
|
|
125
190
|
},
|
|
126
191
|
async accept(key: SentMessageKey): Promise<SentMessageAcceptResult> {
|
|
127
192
|
if (key.messageId.length === 0) return emptyMessageId;
|
|
193
|
+
const accepting = acceptStatement(key);
|
|
128
194
|
return database.transaction(async (tx) => {
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
await tx.run(`UPDATE ${table} SET state = 'accepted' WHERE message_id = ?`, key.messageId);
|
|
133
|
-
return { status: "accepted" };
|
|
134
|
-
});
|
|
195
|
+
const { changes } = await tx.run(accepting.sql, ...accepting.params);
|
|
196
|
+
return changes > 0 ? { status: "accepted" } : refusal(tx, key);
|
|
197
|
+
}, leadingWith(accepting));
|
|
135
198
|
},
|
|
136
199
|
lookup(key: SentMessageKey): Promise<SentMessageLookupResult> {
|
|
137
200
|
return lookupIn(database, key);
|
|
138
201
|
},
|
|
139
202
|
async forget(key: SentMessageKey): Promise<SentMessageForgetResult> {
|
|
140
203
|
if (key.messageId.length === 0) return emptyMessageId;
|
|
141
|
-
return database.transaction((tx) => forgetIn(tx, key));
|
|
204
|
+
return database.transaction((tx) => forgetIn(tx, key), leadingWith(forgetStatement(key)));
|
|
142
205
|
},
|
|
143
206
|
async prune(olderThanMs: number): Promise<number> {
|
|
144
207
|
const { changes } = await database.run(
|
|
@@ -7,7 +7,7 @@ import * as __atomicHostImport1 from "@bastani/atomic-ai";
|
|
|
7
7
|
if (!(name in namespace)) missing.push(`The requested module '${specifier}' does not provide an export named '${name}'`);
|
|
8
8
|
if (missing.length > 0) {
|
|
9
9
|
const application = typeof __atomicHostImport0.APP_NAME === "string" ? __atomicHostImport0.APP_NAME : "atomic";
|
|
10
|
-
if (__atomicHostImport0.VERSION !== "0.10.
|
|
10
|
+
if (__atomicHostImport0.VERSION !== "0.10.11-alpha.2") missing.unshift(application + " was updated to 0.10.11-alpha.2 while this session was running; restart it to keep using the intercom extension.");
|
|
11
11
|
throw new Error(missing.join("\n"));
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -7395,7 +7395,7 @@ var init_broker_status = __esm(() => {
|
|
|
7395
7395
|
import { createHash } from "crypto";
|
|
7396
7396
|
import { lstat as lstat2, mkdir, readFile } from "node:fs/promises";
|
|
7397
7397
|
import { homedir as homedir2, tmpdir as tmpdir2 } from "os";
|
|
7398
|
-
import { basename, dirname, join as join2, resolve } from "path";
|
|
7398
|
+
import { basename, dirname, isAbsolute, join as join2, resolve } from "path";
|
|
7399
7399
|
function getHomeDir() {
|
|
7400
7400
|
if (process.platform === "win32") {
|
|
7401
7401
|
if (process.env.USERPROFILE)
|
|
@@ -7492,6 +7492,9 @@ async function privateSocketDirectoryAsync() {
|
|
|
7492
7492
|
function inDirectorySocketPath(agentDir) {
|
|
7493
7493
|
return join2(getIntercomDirPath(agentDir), "broker.sock");
|
|
7494
7494
|
}
|
|
7495
|
+
function absoluteSocketPath(socketPath) {
|
|
7496
|
+
return isAbsolute(socketPath) ? socketPath : resolve(socketPath);
|
|
7497
|
+
}
|
|
7495
7498
|
function fitsUnixSocketPath(socketPath, platform) {
|
|
7496
7499
|
return Buffer.byteLength(socketPath) <= maxUnixSocketPathBytes(platform);
|
|
7497
7500
|
}
|
|
@@ -7501,7 +7504,7 @@ function directBrokerSocketPath(platform = process.platform, agentDir = getAgent
|
|
|
7501
7504
|
return pipe.length <= MAX_PIPE_NAME_LENGTH ? pipe : `${WINDOWS_PIPE_PREFIX}${agentDirDigest(agentDir)}`;
|
|
7502
7505
|
}
|
|
7503
7506
|
const socketPath = inDirectorySocketPath(agentDir);
|
|
7504
|
-
return fitsUnixSocketPath(socketPath, platform) ? socketPath : undefined;
|
|
7507
|
+
return fitsUnixSocketPath(absoluteSocketPath(socketPath), platform) ? socketPath : undefined;
|
|
7505
7508
|
}
|
|
7506
7509
|
async function recordedSocketPathAsync(agentDir) {
|
|
7507
7510
|
let recorded;
|
|
@@ -7526,7 +7529,7 @@ async function chooseBrokerSocketPathAsync(platform = process.platform, agentDir
|
|
|
7526
7529
|
const direct = directBrokerSocketPath(platform, agentDir);
|
|
7527
7530
|
if (direct !== undefined)
|
|
7528
7531
|
return direct;
|
|
7529
|
-
const socketPath = inDirectorySocketPath(agentDir);
|
|
7532
|
+
const socketPath = absoluteSocketPath(inDirectorySocketPath(agentDir));
|
|
7530
7533
|
const shortPath = join2(await privateSocketDirectoryAsync(), `${agentDirDigest(agentDir)}.sock`);
|
|
7531
7534
|
if (!fitsUnixSocketPath(shortPath, platform)) {
|
|
7532
7535
|
throw new Error(`Intercom broker socket paths ${socketPath} and ${shortPath} are both longer than the ${maxUnixSocketPathBytes(platform)} bytes a Unix socket path allows`);
|
|
@@ -10729,7 +10732,7 @@ var init_path_exists = () => {};
|
|
|
10729
10732
|
// dist/builtin/intercom/broker/spawn.ts
|
|
10730
10733
|
import { spawn as spawn2 } from "child_process";
|
|
10731
10734
|
import { access as access4, appendFile, chmod, lstat as lstat4, mkdir as mkdir2, open as open2, readFile as readFile6, stat as stat7, unlink as unlink2, writeFile as writeFile2 } from "node:fs/promises";
|
|
10732
|
-
import { basename as basename3, dirname as dirname3, isAbsolute, join as join6, resolve as resolve2, win32 as win323 } from "path";
|
|
10735
|
+
import { basename as basename3, dirname as dirname3, isAbsolute as isAbsolute2, join as join6, resolve as resolve2, win32 as win323 } from "path";
|
|
10733
10736
|
import { fileURLToPath } from "url";
|
|
10734
10737
|
import { createRequire as createRequire4 } from "module";
|
|
10735
10738
|
import {
|
|
@@ -10885,7 +10888,7 @@ function resolveAgainstCallerCwd(rawPath) {
|
|
|
10885
10888
|
return rawPath;
|
|
10886
10889
|
}
|
|
10887
10890
|
}
|
|
10888
|
-
return
|
|
10891
|
+
return isAbsolute2(rawPath) ? rawPath : resolve2(rawPath);
|
|
10889
10892
|
}
|
|
10890
10893
|
function brokerSafeCwdOptions(extensionDir, commandPath) {
|
|
10891
10894
|
const resolvedExt = resolveAgainstCallerCwd(extensionDir);
|
|
@@ -10934,7 +10937,7 @@ function absolutizeAgentDirEnvInPlace(env) {
|
|
|
10934
10937
|
if (!value || value === "~" || value.startsWith("~/") || process.platform === "win32" && value.startsWith("~\\")) {
|
|
10935
10938
|
continue;
|
|
10936
10939
|
}
|
|
10937
|
-
const needsResolve = process.platform === "win32" ? !isAbsoluteWindowsPath(value) : !
|
|
10940
|
+
const needsResolve = process.platform === "win32" ? !isAbsoluteWindowsPath(value) : !isAbsolute2(value);
|
|
10938
10941
|
if (needsResolve) {
|
|
10939
10942
|
env[targetKey] = resolveAgainstCallerCwd(value);
|
|
10940
10943
|
}
|
|
@@ -11470,7 +11473,7 @@ async function spawnBrokerHoldingLock(lockOwner, brokerCommand, brokerArgs, read
|
|
|
11470
11473
|
const resolvedExtensionDir = resolveAgainstCallerCwd(extensionDir);
|
|
11471
11474
|
const brokerPath = await resolveBrokerEntrypointAsync(resolvedExtensionDir);
|
|
11472
11475
|
const isCustomPath = !usesDefaultBrokerCommand(brokerCommand, brokerArgs) && (/[\\/]/u.test(brokerCommand) || process.platform === "win32" && /^[A-Za-z]:/u.test(brokerCommand));
|
|
11473
|
-
const normalizedCustomCommand = isCustomPath && (process.platform === "win32" ? !isAbsoluteWindowsPath(brokerCommand) : !
|
|
11476
|
+
const normalizedCustomCommand = isCustomPath && (process.platform === "win32" ? !isAbsoluteWindowsPath(brokerCommand) : !isAbsolute2(brokerCommand)) ? resolveAgainstCallerCwd(brokerCommand) : brokerCommand;
|
|
11474
11477
|
const initialCommandPath = usesDefaultBrokerCommand(brokerCommand, brokerArgs) ? process.execPath : normalizedCustomCommand;
|
|
11475
11478
|
const baseSpawnOptions = await getBrokerSpawnOptionsAsync(resolvedExtensionDir, "ignore", undefined, initialCommandPath);
|
|
11476
11479
|
const effectiveCommand = process.platform === "win32" && !usesDefaultBrokerCommand(brokerCommand, brokerArgs) ? await resolveWindowsCustomCommandAsync(normalizedCustomCommand, baseSpawnOptions.env) : normalizedCustomCommand;
|
|
@@ -6,7 +6,7 @@ import * as __atomicHostImport0 from "@bastani/atomic";
|
|
|
6
6
|
if (!(name in namespace)) missing.push(`The requested module '${specifier}' does not provide an export named '${name}'`);
|
|
7
7
|
if (missing.length > 0) {
|
|
8
8
|
const application = typeof __atomicHostImport0.APP_NAME === "string" ? __atomicHostImport0.APP_NAME : "atomic";
|
|
9
|
-
if (__atomicHostImport0.VERSION !== "0.10.
|
|
9
|
+
if (__atomicHostImport0.VERSION !== "0.10.11-alpha.2") missing.unshift(application + " was updated to 0.10.11-alpha.2 while this session was running; restart it to keep using the mcp extension.");
|
|
10
10
|
throw new Error(missing.join("\n"));
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.10.11-alpha.2] - 2026-11-26
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- A subagent started with `context: "fork"` now shares its parent's history in the session store instead of copying it, so it starts about as fast from a long conversation as from a short one. It reads, resumes and exports as before. See [Shared-history forks](../coding-agent/docs/storage.md#shared-history-forks) in Atomic's storage guide ([#6608](https://github.com/bastani-inc/atomic/pull/6608), [#6560](https://github.com/bastani-inc/atomic/issues/6560)).
|
|
10
|
+
|
|
11
|
+
## [0.10.11-alpha.1] - 2026-11-25
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- A subagent's session is now always kept in the session store of the session that launched it, whatever that store is. A subagent of a session kept in JSONL files now has its session file in the same directory as its parent's, instead of a directory of its own. The launch's `sessionDir` and `defaultSessionDir` in `config.json` are ignored, with a one-time deprecation warning. A child's working directory, its worktree, the storage settings of the project it runs in, and a resume after a restart never choose another store. A subagent that was queued but never started relaunches in its parent's store after a restart, even when an earlier release recorded a directory for it. Sessions written as files by earlier releases stay readable and restorable ([#6594](https://github.com/bastani-inc/atomic/pull/6594)).
|
|
16
|
+
- A `context: "fork"` subagent's session is now internal, like a fresh subagent's. `/resume`, `atomic -r`, `-c` and the `history://sessions` list leave it out, and a fork differs from a fresh subagent only in starting from its parent's conversation ([#6594](https://github.com/bastani-inc/atomic/pull/6594)).
|
|
17
|
+
- A skill given to a subagent now arrives with its `skill://<name>` address and the note `References are relative to skill://<name>/.`, so the subagent can open the skill's other files and scripts ([#6589](https://github.com/bastani-inc/atomic/pull/6589)).
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- When a subagent cannot start on a model, the error now says whether the model does not exist (`no such model in the catalog`) or is left out by `enabledModels`. For a Fast or Ultrafast version whose base model is allowed, the error names the exact ID to add, such as `Add "openai-codex/gpt-6.2-sol-ultrafast" to enabledModels.` ([#6569](https://github.com/bastani-inc/atomic/pull/6569)).
|
|
22
|
+
|
|
5
23
|
## [0.10.10] - 2026-11-24
|
|
6
24
|
|
|
7
25
|
### Fixed
|
|
@@ -239,7 +239,7 @@ Put each with_skill version before its baseline counterpart.
|
|
|
239
239
|
|
|
240
240
|
3. **Do an analyst pass** — read the benchmark data and surface patterns the aggregate stats might hide. See `agents/analyzer.md` (the "Analyzing Benchmark Results" section) for what to look for — things like assertions that always pass regardless of skill (non-discriminating), high-variance evals (possibly flaky), and time/token tradeoffs.
|
|
241
241
|
|
|
242
|
-
4. **Launch the viewer** with both qualitative outputs and quantitative data. Start it as a background shell, `bash` with `wait: { kind: "background" }`, so it keeps serving after the call returns (a process started with `&` stops when the call that started it ends).
|
|
242
|
+
4. **Launch the viewer** with both qualitative outputs and quantitative data. Start it as a background shell, `bash` with `wait: { kind: "background" }`, so it keeps serving after the call returns (a process started with `&` stops when the call that started it ends). Pass no `timeout`: the viewer then serves until you stop it with `kill` or the session ends:
|
|
243
243
|
```bash
|
|
244
244
|
python <skill-creator-path>/eval-viewer/generate_review.py \
|
|
245
245
|
<workspace>/iteration-N \
|
|
@@ -10,7 +10,7 @@ import * as __atomicHostImport4 from "@bastani/atomic-ai";
|
|
|
10
10
|
if (!(name in namespace)) missing.push(`The requested module '${specifier}' does not provide an export named '${name}'`);
|
|
11
11
|
if (missing.length > 0) {
|
|
12
12
|
const application = typeof __atomicHostImport0.APP_NAME === "string" ? __atomicHostImport0.APP_NAME : "atomic";
|
|
13
|
-
if (__atomicHostImport0.VERSION !== "0.10.
|
|
13
|
+
if (__atomicHostImport0.VERSION !== "0.10.11-alpha.2") missing.unshift(application + " was updated to 0.10.11-alpha.2 while this session was running; restart it to keep using the subagents extension.");
|
|
14
14
|
throw new Error(missing.join("\n"));
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -13799,7 +13799,9 @@ var EMITTED_KEY = "__atomicDeprecationWarnings";
|
|
|
13799
13799
|
var SINK_KEY = "__atomicDeprecationSink";
|
|
13800
13800
|
var WARN_KEY = "__atomicWarnDeprecation";
|
|
13801
13801
|
function warnRemovedRoutingOption(option, saved) {
|
|
13802
|
-
|
|
13802
|
+
warnDeprecationOnce(`"${option}" is ignored: automatic model routing was removed, so "auto" runs your default model and provider or model restrictions no longer limit "auto" or any fallback model.`, saved);
|
|
13803
|
+
}
|
|
13804
|
+
function warnDeprecationOnce(message, saved) {
|
|
13803
13805
|
const registry = globalThis;
|
|
13804
13806
|
const warn = registry[WARN_KEY];
|
|
13805
13807
|
if (warn !== undefined) {
|
|
@@ -20585,12 +20587,21 @@ async function resolveSkillsFromCatalog(skillNames, catalog, cwd) {
|
|
|
20585
20587
|
}
|
|
20586
20588
|
return { resolved, missing };
|
|
20587
20589
|
}
|
|
20590
|
+
function skillUri(name) {
|
|
20591
|
+
const encoded = encodeURIComponent(name).replace(/%40/g, "@").replace(/[!'()*]/g, (char) => `%${char.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
20592
|
+
return `skill://${encoded}`;
|
|
20593
|
+
}
|
|
20588
20594
|
function buildSkillInjection(skills) {
|
|
20589
20595
|
if (skills.length === 0)
|
|
20590
20596
|
return "";
|
|
20591
|
-
return skills.map((s) =>
|
|
20597
|
+
return skills.map((s) => {
|
|
20598
|
+
const location = skillUri(s.name);
|
|
20599
|
+
return `<skill name="${s.name}" location="${location}">
|
|
20600
|
+
References are relative to ${location}/.
|
|
20601
|
+
|
|
20592
20602
|
${s.content}
|
|
20593
|
-
</skill
|
|
20603
|
+
</skill>`;
|
|
20604
|
+
}).join(`
|
|
20594
20605
|
|
|
20595
20606
|
`);
|
|
20596
20607
|
}
|
|
@@ -20883,8 +20894,10 @@ async function cleanupAllArtifactDirs(maxAgeDays, sessionsRoots) {
|
|
|
20883
20894
|
|
|
20884
20895
|
// dist/builtin/subagents/src/shared/child-session-store.ts
|
|
20885
20896
|
function childSessionStore(parent) {
|
|
20886
|
-
|
|
20887
|
-
|
|
20897
|
+
return typeof parent.getSessionStore === "function" ? parent.getSessionStore() : undefined;
|
|
20898
|
+
}
|
|
20899
|
+
function warnIgnoredSessionDir(option) {
|
|
20900
|
+
warnDeprecationOnce(`"${option}" is ignored: a subagent's session is always kept in the session store of the session that launched it.`);
|
|
20888
20901
|
}
|
|
20889
20902
|
function childSessionLocator(child) {
|
|
20890
20903
|
if (child.sessionFile)
|
|
@@ -21395,6 +21408,27 @@ function isModelCandidateAllowed(candidate, allowedFullIds) {
|
|
|
21395
21408
|
const unknown = splitUnknownThinkingSuffix(baseModel);
|
|
21396
21409
|
return unknown !== undefined && matchesAllowedSets(unknown.baseModel, allowedFullSet, allowedIdSet);
|
|
21397
21410
|
}
|
|
21411
|
+
function isModelCandidateInCatalog(candidate, catalog) {
|
|
21412
|
+
const { baseModel } = splitKnownThinkingSuffix(candidate);
|
|
21413
|
+
const matches = (id) => {
|
|
21414
|
+
const raw = id.toLowerCase();
|
|
21415
|
+
const qualified = normalizeProviderReference(id).toLowerCase();
|
|
21416
|
+
return catalog.some((model) => model.id.toLowerCase() === raw || modelKey(model.provider, model.id) === qualified);
|
|
21417
|
+
};
|
|
21418
|
+
if (matches(candidate) || baseModel !== candidate && matches(baseModel))
|
|
21419
|
+
return true;
|
|
21420
|
+
const unknown = splitUnknownThinkingSuffix(baseModel);
|
|
21421
|
+
return unknown !== undefined && matches(unknown.baseModel);
|
|
21422
|
+
}
|
|
21423
|
+
function modelOutsideScopeReason(model, isAllowed) {
|
|
21424
|
+
const reason = "model is outside the session's enabledModels scope";
|
|
21425
|
+
if (!model?.fastRoute)
|
|
21426
|
+
return `${reason}.`;
|
|
21427
|
+
const baseFullId = `${model.provider}/${model.fastRoute.baseModelId}`;
|
|
21428
|
+
if (!isAllowed(baseFullId))
|
|
21429
|
+
return `${reason}.`;
|
|
21430
|
+
return `${reason}; its base model ${baseFullId} is in scope. Add ${JSON.stringify(`${model.provider}/${model.id}`)} to enabledModels.`;
|
|
21431
|
+
}
|
|
21398
21432
|
function resolveScopedModelCandidate(model, availableModels, scope, preferredProvider) {
|
|
21399
21433
|
if (!model)
|
|
21400
21434
|
return;
|
|
@@ -21476,7 +21510,7 @@ function createForkContextResolver(sessionManager, requestedContext) {
|
|
|
21476
21510
|
const leafId = settledForkLeaf(sessionManager.getBranch(), parentLeafId);
|
|
21477
21511
|
if (leafId === null)
|
|
21478
21512
|
throw new SubagentForkContextError(parentSessionId, "no_leaf");
|
|
21479
|
-
const openFork = sessionManager.captureFork(leafId);
|
|
21513
|
+
const openFork = sessionManager.captureFork(leafId, { internal: true });
|
|
21480
21514
|
const children = new Map;
|
|
21481
21515
|
const opening = new Map;
|
|
21482
21516
|
return {
|
|
@@ -22993,17 +23027,11 @@ function assertStartModelInScope(input) {
|
|
|
22993
23027
|
const { model, allowedModels, scopedModels } = input;
|
|
22994
23028
|
if (!model)
|
|
22995
23029
|
return;
|
|
23030
|
+
const isAllowed = allowedModels !== undefined ? (id) => isModelCandidateAllowed(id, allowedModels) : (id) => !scopedModels?.length || scopedModels.some((entry) => `${entry.model.provider}/${entry.model.id}` === id);
|
|
22996
23031
|
const fullId = `${model.provider}/${model.id}`;
|
|
22997
|
-
if (
|
|
22998
|
-
|
|
22999
|
-
|
|
23000
|
-
throw new Error(`Model ${fullId} is outside the session's enabledModels scope. No other model was used.`);
|
|
23001
|
-
}
|
|
23002
|
-
if (scopedModels && scopedModels.length > 0) {
|
|
23003
|
-
if (scopedModels.some((entry) => entry.model.provider === model.provider && entry.model.id === model.id))
|
|
23004
|
-
return;
|
|
23005
|
-
throw new Error(`Model ${fullId} is outside the session's enabledModels scope. No other model was used.`);
|
|
23006
|
-
}
|
|
23032
|
+
if (isAllowed(fullId))
|
|
23033
|
+
return;
|
|
23034
|
+
throw new Error(`${fullId}: ${modelOutsideScopeReason(model, isAllowed)} No other model was used.`);
|
|
23007
23035
|
}
|
|
23008
23036
|
async function cancelledEnvelope(session, spec, stats, ownTurns) {
|
|
23009
23037
|
const sessionFile = session?.sessionFile ?? spec.sessionManager?.getSessionFile();
|
|
@@ -27560,7 +27588,10 @@ function resolveCandidateModel(candidateId, lookup, preferredProvider) {
|
|
|
27560
27588
|
return base && base.thinkingLevel === undefined ? { model: base.model, unknownEffort: unknown.effort } : undefined;
|
|
27561
27589
|
}
|
|
27562
27590
|
function createCandidateModelResolver(lookup, preferredProvider) {
|
|
27563
|
-
|
|
27591
|
+
const resolve = (candidateId) => resolveCandidateModel(candidateId, lookup, preferredProvider);
|
|
27592
|
+
if (typeof lookup.getAll === "function")
|
|
27593
|
+
resolve.getCatalog = lookup.getAll.bind(lookup);
|
|
27594
|
+
return resolve;
|
|
27564
27595
|
}
|
|
27565
27596
|
|
|
27566
27597
|
// dist/builtin/subagents/src/runs/foreground/subagent-child-lost.ts
|
|
@@ -27632,7 +27663,10 @@ function filterSpawnableModelCandidates(params) {
|
|
|
27632
27663
|
const skippedModels = [];
|
|
27633
27664
|
for (const candidate of params.candidates) {
|
|
27634
27665
|
if (allowedModels !== undefined && !isModelCandidateAllowed(candidate, allowedModels)) {
|
|
27635
|
-
|
|
27666
|
+
const model = params.resolveCandidateModel?.(candidate)?.model;
|
|
27667
|
+
const catalog = model ? undefined : params.resolveCandidateModel?.getCatalog?.();
|
|
27668
|
+
const reason = catalog && !isModelCandidateInCatalog(candidate, catalog) ? "no such model in the catalog." : modelOutsideScopeReason(model, (id) => isModelCandidateAllowed(id, allowedModels));
|
|
27669
|
+
skippedAttempts.push(skippedModelAttempt(candidate, `Skipped ${candidate}: ${reason}`));
|
|
27636
27670
|
continue;
|
|
27637
27671
|
}
|
|
27638
27672
|
if (currentModel && candidate === currentModel) {
|
|
@@ -27979,7 +28013,8 @@ async function launchSingleInProcess(runtimeCwd, agent, task, options, turn) {
|
|
|
27979
28013
|
availableModels: options.availableModels,
|
|
27980
28014
|
knownModelProviders: options.knownModelProviders,
|
|
27981
28015
|
currentModel: options.currentModel,
|
|
27982
|
-
allowedModels: options.allowedModels
|
|
28016
|
+
allowedModels: options.allowedModels,
|
|
28017
|
+
resolveCandidateModel: options.resolveCandidateModel
|
|
27983
28018
|
});
|
|
27984
28019
|
const resolveCandidate = options.resolveCandidateModel;
|
|
27985
28020
|
if (namesModel && resolveCandidate) {
|
|
@@ -29499,7 +29534,7 @@ async function relaunchChild(deps, ctx, record, hold, release, onReopened, resum
|
|
|
29499
29534
|
}
|
|
29500
29535
|
}
|
|
29501
29536
|
const taskFallback = redispatch && wakeFallback;
|
|
29502
|
-
const sessionStore = fresh
|
|
29537
|
+
const sessionStore = fresh && !sessionManager ? childSessionStore(ctx.sessionManager) : undefined;
|
|
29503
29538
|
const modelScope = resolveSessionModelScope(ctx, deps.pi.getSettings?.());
|
|
29504
29539
|
const options = {
|
|
29505
29540
|
runningCapacity: deps.config.parallel?.runningCapacity,
|
|
@@ -32786,7 +32821,11 @@ ${effectiveParams.task ?? ""}` };
|
|
|
32786
32821
|
const baseSessionRoot = deps.config.defaultSessionDir ? path21.resolve(deps.expandTilde(deps.config.defaultSessionDir)) : deps.getSubagentSessionRoot(parentSessionFile, parentSessionId);
|
|
32787
32822
|
sessionRoot = path21.join(baseSessionRoot, runId);
|
|
32788
32823
|
}
|
|
32789
|
-
const sessionStore =
|
|
32824
|
+
const sessionStore = childSessionStore(ctx.sessionManager);
|
|
32825
|
+
if (effectiveParams.sessionDir)
|
|
32826
|
+
warnIgnoredSessionDir("sessionDir");
|
|
32827
|
+
if (deps.config.defaultSessionDir)
|
|
32828
|
+
warnIgnoredSessionDir("defaultSessionDir");
|
|
32790
32829
|
try {
|
|
32791
32830
|
if (sessionStore === undefined)
|
|
32792
32831
|
await mkdir10(sessionRoot, { recursive: true });
|
|
@@ -35910,7 +35949,7 @@ var SubagentParams = Type2.Object({
|
|
|
35910
35949
|
includeProgress: Type2.Optional(Type2.Boolean({ description: "Include full progress in result (default: false)" })),
|
|
35911
35950
|
share: Type2.Optional(Type2.Boolean({ description: "Has no effect: nothing is uploaded or shared (default: false)" })),
|
|
35912
35951
|
sessionDir: Type2.Optional(Type2.String({
|
|
35913
|
-
description: "
|
|
35952
|
+
description: "Deprecated and ignored: a subagent's session is always kept in the launching session's store"
|
|
35914
35953
|
})),
|
|
35915
35954
|
control: Type2.Optional(ControlOverrides),
|
|
35916
35955
|
output: Type2.Optional(Type2.Unsafe({
|
|
@@ -8,7 +8,7 @@ import * as __atomicHostImport2 from "@bastani/atomic-ai/compat";
|
|
|
8
8
|
if (!(name in namespace)) missing.push(`The requested module '${specifier}' does not provide an export named '${name}'`);
|
|
9
9
|
if (missing.length > 0) {
|
|
10
10
|
const application = typeof __atomicHostImport0.APP_NAME === "string" ? __atomicHostImport0.APP_NAME : "atomic";
|
|
11
|
-
if (__atomicHostImport0.VERSION !== "0.10.
|
|
11
|
+
if (__atomicHostImport0.VERSION !== "0.10.11-alpha.2") missing.unshift(application + " was updated to 0.10.11-alpha.2 while this session was running; restart it to keep using the web-access extension.");
|
|
12
12
|
throw new Error(missing.join("\n"));
|
|
13
13
|
}
|
|
14
14
|
}
|
package/dist/cli/args.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
import { isValidThinkingLevel } from "../_shared/startup-0-0-
|
|
3
|
-
import { insertForcedOptionsBeforeTerminator, parseArgs, printHelp } from "../_shared/startup-0-1-
|
|
2
|
+
import { isValidThinkingLevel } from "../_shared/startup-0-0-3IXNMFM2.js";
|
|
3
|
+
import { insertForcedOptionsBeforeTerminator, parseArgs, printHelp } from "../_shared/startup-0-1-7T2IAE7J.js";
|
|
4
4
|
export { insertForcedOptionsBeforeTerminator, isValidThinkingLevel, parseArgs, printHelp };
|
|
5
5
|
//# sourceMappingURL=args.js.map
|
|
@@ -2,13 +2,13 @@ import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
|
2
2
|
import chalk from "chalk";
|
|
3
3
|
import { APP_NAME, ENV_DEBUG, getAgentDir, getAuthPath, setEnvValue } from "../_shared/p0-cli-BB45ZQY6.js";
|
|
4
4
|
import { AuthStorage, ReadOnlyAuthStorage } from "../_shared/startup-0-4-ZMJV547D.js";
|
|
5
|
-
import { CredentialSynchronizationError, ModelRuntime, isOAuthLoginCancelled } from "../_shared/startup-0-5-
|
|
6
|
-
import { RawStdoutWriteError, flushRawStdout, restoreStdout, takeOverStdout, writeRawStdout, writeRawStdoutOnce } from "../_shared/startup-0-0-
|
|
7
|
-
import { findExactModelReferenceMatch, resolveModelReference } from "../_shared/startup-0-2-
|
|
8
|
-
import { SettingsManager } from "../_shared/startup-8-1-
|
|
9
|
-
import { parseArgs } from "../_shared/startup-0-1-
|
|
5
|
+
import { CredentialSynchronizationError, ModelRuntime, isOAuthLoginCancelled } from "../_shared/startup-0-5-YDW47QX6.js";
|
|
6
|
+
import { RawStdoutWriteError, flushRawStdout, restoreStdout, takeOverStdout, writeRawStdout, writeRawStdoutOnce } from "../_shared/startup-0-0-3IXNMFM2.js";
|
|
7
|
+
import { findExactModelReferenceMatch, resolveModelReference } from "../_shared/startup-0-2-5QHPCEON.js";
|
|
8
|
+
import { SettingsManager } from "../_shared/startup-8-1-X32CYSXB.js";
|
|
9
|
+
import { parseArgs } from "../_shared/startup-0-1-7T2IAE7J.js";
|
|
10
10
|
import { ModelsError } from "@bastani/atomic-ai";
|
|
11
|
-
import { InMemoryCodingAgentModelsStore, resolveCliModel } from "../_shared/startup-0-3-
|
|
11
|
+
import { InMemoryCodingAgentModelsStore, resolveCliModel } from "../_shared/startup-0-3-4ZYBYQNM.js";
|
|
12
12
|
import { extractBearerToken, redactCredentialShapes } from "../_shared/p1b-elig-ENCUPKKJ.js";
|
|
13
13
|
import { inspect } from "node:util";
|
|
14
14
|
import { replaceControlCharacters } from "@bastani/atomic-tui";
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.2`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.2") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.2 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
package/dist/cli/auth-cli.js
CHANGED
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.2`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.2") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.2 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|