@bastani/atomic 0.10.4-alpha.2 → 0.10.5-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +238 -0
- package/dist/_shared/chunk-CDOYTDYM.js +4 -0
- package/dist/_shared/chunk-CDOYTDYM.js.map +1 -0
- package/dist/_shared/compile-cache-warmup-host-RU5L7I7A.js +1 -1
- package/dist/_shared/dist-KOELCESV.js +48 -3
- package/dist/_shared/fork-row-index-UAUAQRD5.js +47 -2
- package/dist/_shared/http-YFAPTIZD.js +16 -4
- package/dist/_shared/http-YFAPTIZD.js.map +1 -1
- package/dist/_shared/lib-4PES5P4V.js +59 -14
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +1706 -258
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +317 -64
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/{mode-shared-HP7GUA7J.js → mode-shared-2QJSCUM6.js} +432 -81
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -0
- package/dist/_shared/p0-cli-BB45ZQY6.js +3482 -0
- package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -0
- package/dist/_shared/p0-cli-GUFK7TPN.js +2 -2838
- package/dist/_shared/p0-cli-GUFK7TPN.js.map +1 -1
- package/dist/_shared/{p1a-prewarm-YK3KDTLN.js → p1a-prewarm-UQY3X2UK.js} +270 -73
- package/dist/_shared/p1a-prewarm-UQY3X2UK.js.map +1 -0
- package/dist/_shared/{p1b-elig-PXQA2FYP.js → p1b-elig-ENCUPKKJ.js} +190 -121
- package/dist/_shared/p1b-elig-ENCUPKKJ.js.map +1 -0
- package/dist/_shared/p2-common-YLSYXMDQ.js +1 -3
- package/dist/_shared/p2-common-YLSYXMDQ.js.map +1 -1
- package/dist/_shared/p2-shell-TJBYQMCJ.js +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js +500 -127
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +4 -4
- package/dist/_shared/sdk-WQIOHVKO.js +56 -11
- package/dist/_shared/session-data-AHTU7IS6.js +48 -3
- package/dist/_shared/session-manager-list-2BLEEZVG.js +2 -2
- package/dist/_shared/settings-startup-65YEWRV2.js.map +1 -1
- package/dist/_shared/sql-session-store-5FD3WBMZ.js +57 -12
- package/dist/_shared/{startup-0-0-X4NF3GKM.js → startup-0-0-TYUFUOJZ.js} +528 -321
- package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +1 -0
- package/dist/_shared/{startup-0-1-7QTG6VJZ.js → startup-0-1-D4LGGINF.js} +284 -81
- package/dist/_shared/startup-0-1-D4LGGINF.js.map +1 -0
- package/dist/_shared/{startup-0-2-KFDYPDJK.js → startup-0-2-SZGQIWHI.js} +483 -154
- package/dist/_shared/startup-0-2-SZGQIWHI.js.map +1 -0
- package/dist/_shared/startup-0-3-T4DVFYWX.js +340 -110
- package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
- package/dist/_shared/startup-0-4-HN5EB4K7.js +261 -59
- package/dist/_shared/startup-0-4-HN5EB4K7.js.map +1 -1
- package/dist/_shared/startup-0-5-OHJNE6JH.js +421 -148
- package/dist/_shared/startup-0-5-OHJNE6JH.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +62 -11
- package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
- package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +12 -11
- package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +53 -158
- package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +231 -46
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +115 -35
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/{startup-8-1-KQJBDKRU.js → startup-8-1-SJW2GMAM.js} +203 -62
- package/dist/_shared/startup-8-1-SJW2GMAM.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +55 -10
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +47 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +48 -3
- package/dist/builtin/intercom/CHANGELOG.md +59 -0
- package/dist/builtin/intercom/README.md +0 -1
- package/dist/builtin/intercom/broker/broker-instance.ts +13 -57
- package/dist/builtin/intercom/broker/broker-process.ts +30 -10
- package/dist/builtin/intercom/broker/broker-routing.ts +12 -2
- package/dist/builtin/intercom/broker/broker.bundle.mjs +2557 -498
- package/dist/builtin/intercom/broker/broker.ts +164 -55
- package/dist/builtin/intercom/broker/client.ts +36 -16
- package/dist/builtin/intercom/broker/control.ts +83 -20
- package/dist/builtin/intercom/broker/durable-ended-queue.ts +65 -19
- package/dist/builtin/intercom/broker/host-command-environment.ts +7 -2
- package/dist/builtin/intercom/broker/multinode-router.ts +1675 -387
- package/dist/builtin/intercom/broker/multinode-state-store.ts +10 -0
- package/dist/builtin/intercom/broker/paths.ts +68 -6
- package/dist/builtin/intercom/broker/pending-send-registry.ts +5 -0
- package/dist/builtin/intercom/broker/registration-bounds.ts +38 -0
- package/dist/builtin/intercom/broker/retiring-broker-check.ts +178 -0
- package/dist/builtin/intercom/broker/return-paths.ts +268 -7
- package/dist/builtin/intercom/broker/send-handler.ts +253 -28
- package/dist/builtin/intercom/broker/send-order-gate.ts +410 -0
- package/dist/builtin/intercom/broker/spawn.ts +950 -202
- package/dist/builtin/intercom/broker/sql-lease-store.ts +37 -0
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +7 -0
- package/dist/builtin/intercom/broker/windows-cwd.ts +546 -0
- package/dist/builtin/intercom/index.bundle.mjs +3506 -2328
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/intercom/retry-policy.ts +4 -0
- package/dist/builtin/intercom/types.ts +2 -0
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +46 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +336 -86
- package/dist/builtin/web-access/CHANGELOG.md +12 -0
- package/dist/builtin/web-access/index.bundle.mjs +23 -38
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/bun/cli.js +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/internal-intercom-broker.js +119 -4
- package/dist/bun/internal-intercom-broker.js.map +1 -1
- package/dist/bun/register-theme-validator.js +6 -0
- package/dist/bun/register-theme-validator.js.map +1 -0
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +1102 -0
- package/dist/cli/auth-cli.code.js.map +1 -0
- package/dist/cli/auth-cli.impl.js +36 -0
- package/dist/cli/auth-cli.impl.js.map +1 -0
- package/dist/cli/auth-cli.js +30 -1096
- package/dist/cli/auth-cli.js.map +1 -1
- package/dist/cli/blueprint-command.code.js +906 -0
- package/dist/cli/blueprint-command.code.js.map +1 -0
- package/dist/cli/blueprint-command.impl.js +36 -0
- package/dist/cli/blueprint-command.impl.js.map +1 -0
- package/dist/cli/blueprint-command.js +30 -900
- package/dist/cli/blueprint-command.js.map +1 -1
- package/dist/cli/intercom-command.code.js +153 -0
- package/dist/cli/intercom-command.code.js.map +1 -0
- package/dist/cli/intercom-command.impl.js +36 -0
- package/dist/cli/intercom-command.impl.js.map +1 -0
- package/dist/cli/intercom-command.js +33 -105
- package/dist/cli/intercom-command.js.map +1 -1
- package/dist/cli/list-models.code.js +60 -0
- package/dist/cli/list-models.code.js.map +1 -0
- package/dist/cli/list-models.impl.js +36 -0
- package/dist/cli/list-models.impl.js.map +1 -0
- package/dist/cli/list-models.js +33 -57
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.code.js +55 -0
- package/dist/cli/session-picker.code.js.map +1 -0
- package/dist/cli/session-picker.impl.js +36 -0
- package/dist/cli/session-picker.impl.js.map +1 -0
- package/dist/cli/session-picker.js +33 -52
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.code.js +5 -0
- package/dist/cli/startup-ui.code.js.map +1 -0
- package/dist/cli/startup-ui.impl.js +36 -0
- package/dist/cli/startup-ui.impl.js.map +1 -0
- package/dist/cli/startup-ui.js +35 -4
- package/dist/cli/storage-command.code.js +3 -0
- package/dist/cli/storage-command.code.js.map +1 -0
- package/dist/cli/storage-command.impl.js +36 -0
- package/dist/cli/storage-command.impl.js.map +1 -0
- package/dist/cli/storage-command.js +35 -2
- package/dist/cli/storage-search-session.code.js +189 -0
- package/dist/cli/storage-search-session.code.js.map +1 -0
- package/dist/cli/storage-search-session.impl.js +36 -0
- package/dist/cli/storage-search-session.impl.js.map +1 -0
- package/dist/cli/storage-search-session.js +33 -186
- package/dist/cli/storage-search-session.js.map +1 -1
- package/dist/cli/team-command.code.js +217 -0
- package/dist/cli/team-command.code.js.map +1 -0
- package/dist/cli/team-command.impl.js +36 -0
- package/dist/cli/team-command.impl.js.map +1 -0
- package/dist/cli/team-command.js +32 -213
- package/dist/cli/team-command.js.map +1 -1
- package/dist/cli.js +60 -11
- package/dist/cli.js.map +1 -1
- package/dist/config.js +1 -1
- package/dist/core/agent-session-methods.d.ts +4 -3
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +5 -0
- package/dist/core/compaction/compaction.d.ts +6 -0
- package/dist/core/compaction/model-resolver.d.ts +1 -1
- package/dist/core/debug.code.js +3 -0
- package/dist/core/debug.code.js.map +1 -0
- package/dist/core/debug.impl.js +36 -0
- package/dist/core/debug.impl.js.map +1 -0
- package/dist/core/debug.js +35 -2
- package/dist/core/default-model-api-prewarm.d.ts +5 -0
- package/dist/core/export-html/card-projection.code.js +257 -0
- package/dist/core/export-html/card-projection.code.js.map +1 -0
- package/dist/core/export-html/card-projection.impl.js +36 -0
- package/dist/core/export-html/card-projection.impl.js.map +1 -0
- package/dist/core/export-html/card-projection.js +34 -255
- package/dist/core/export-html/card-projection.js.map +1 -1
- package/dist/core/export-html/index.code.js +655 -0
- package/dist/core/export-html/index.code.js.map +1 -0
- package/dist/core/export-html/index.impl.js +36 -0
- package/dist/core/export-html/index.impl.js.map +1 -0
- package/dist/core/export-html/index.js +30 -604
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/json-spans.code.js +3 -0
- package/dist/core/export-html/json-spans.code.js.map +1 -0
- package/dist/core/export-html/json-spans.impl.js +36 -0
- package/dist/core/export-html/json-spans.impl.js.map +1 -0
- package/dist/core/export-html/json-spans.js +35 -2
- package/dist/core/export-html/oversized-render-inputs.code.js +125 -0
- package/dist/core/export-html/oversized-render-inputs.code.js.map +1 -0
- package/dist/core/export-html/oversized-render-inputs.impl.js +36 -0
- package/dist/core/export-html/oversized-render-inputs.impl.js.map +1 -0
- package/dist/core/export-html/oversized-render-inputs.js +31 -120
- package/dist/core/export-html/oversized-render-inputs.js.map +1 -1
- package/dist/core/export-html/tool-renderer.code.js +350 -0
- package/dist/core/export-html/tool-renderer.code.js.map +1 -0
- package/dist/core/export-html/tool-renderer.impl.js +36 -0
- package/dist/core/export-html/tool-renderer.impl.js.map +1 -0
- package/dist/core/export-html/tool-renderer.js +33 -347
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/jiti-loader.code.js +3 -0
- package/dist/core/extensions/jiti-loader.code.js.map +1 -0
- package/dist/core/extensions/jiti-loader.impl.js +36 -0
- package/dist/core/extensions/jiti-loader.impl.js.map +1 -0
- package/dist/core/extensions/jiti-loader.js +35 -2
- package/dist/core/extensions/jiti-static-loader.code.js +3 -0
- package/dist/core/extensions/jiti-static-loader.code.js.map +1 -0
- package/dist/core/extensions/jiti-static-loader.impl.js +36 -0
- package/dist/core/extensions/jiti-static-loader.impl.js.map +1 -0
- package/dist/core/extensions/jiti-static-loader.js +35 -2
- package/dist/core/extensions/loader-host-modules.code.js +3 -0
- package/dist/core/extensions/loader-host-modules.code.js.map +1 -0
- package/dist/core/extensions/loader-host-modules.impl.js +36 -0
- package/dist/core/extensions/loader-host-modules.impl.js.map +1 -0
- package/dist/core/extensions/loader-host-modules.js +35 -2
- package/dist/core/extensions/loader-virtual-modules.d.ts +1 -6
- package/dist/core/extensions/loader-virtual-modules.js +1 -1
- package/dist/core/extensions/runner-context.js +3 -3
- package/dist/core/extensions/session-events.d.ts +4 -0
- package/dist/core/extensions/session-events.js.map +1 -1
- package/dist/core/intercom-broker-control-host.code.js +5 -0
- package/dist/core/intercom-broker-control-host.code.js.map +1 -0
- package/dist/core/intercom-broker-control-host.impl.js +36 -0
- package/dist/core/intercom-broker-control-host.impl.js.map +1 -0
- package/dist/core/intercom-broker-control-host.js +35 -4
- package/dist/core/intercom-broker-control.code.js +63 -0
- package/dist/core/intercom-broker-control.code.js.map +1 -0
- package/dist/core/intercom-broker-control.d.ts +21 -0
- package/dist/core/intercom-broker-control.impl.js +36 -0
- package/dist/core/intercom-broker-control.impl.js.map +1 -0
- package/dist/core/intercom-broker-control.js +35 -17
- package/dist/core/intercom-broker-control.js.map +1 -1
- package/dist/core/package-manager-storage-adapters.code.js +3 -0
- package/dist/core/package-manager-storage-adapters.code.js.map +1 -0
- package/dist/core/package-manager-storage-adapters.impl.js +36 -0
- package/dist/core/package-manager-storage-adapters.impl.js.map +1 -0
- package/dist/core/package-manager-storage-adapters.js +35 -2
- package/dist/core/process-start-token.d.ts +8 -2
- package/dist/core/process-tree-containment.d.ts +27 -0
- package/dist/core/queued-message-delivery.d.ts +5 -2
- package/dist/core/resume/blueprint/process.d.ts +3 -1
- package/dist/core/sdk.code.js +9 -0
- package/dist/core/sdk.code.js.map +1 -0
- package/dist/core/sdk.impl.js +36 -0
- package/dist/core/sdk.impl.js.map +1 -0
- package/dist/core/sdk.js +35 -8
- package/dist/core/session-manager-core.d.ts +15 -5
- package/dist/core/session-manager-core.js +195 -38
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-list.code.js +3 -0
- package/dist/core/session-manager-list.code.js.map +1 -0
- package/dist/core/session-manager-list.impl.js +36 -0
- package/dist/core/session-manager-list.impl.js.map +1 -0
- package/dist/core/session-manager-list.js +35 -2
- package/dist/core/session-manager-types.d.ts +20 -0
- package/dist/core/session-manager.code.js +8 -0
- package/dist/core/session-manager.code.js.map +1 -0
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.impl.js +36 -0
- package/dist/core/session-manager.impl.js.map +1 -0
- package/dist/core/session-manager.js +35 -7
- package/dist/core/session-storage.code.js +3 -0
- package/dist/core/session-storage.code.js.map +1 -0
- package/dist/core/session-storage.impl.js +36 -0
- package/dist/core/session-storage.impl.js.map +1 -0
- package/dist/core/session-storage.js +35 -2
- package/dist/core/storage/file-identity.d.ts +3 -0
- package/dist/core/storage/file-identity.js +296 -86
- package/dist/core/storage/file-identity.js.map +1 -1
- package/dist/core/storage/index.d.ts +1 -1
- package/dist/core/storage/index.js +52 -7
- package/dist/core/storage/index.js.map +1 -1
- package/dist/core/storage/node-sqlite-thread.js +47 -2
- package/dist/core/storage/node-sqlite.js +49 -4
- package/dist/core/storage/node-sqlite.js.map +1 -1
- package/dist/core/storage/offline-snapshot-file.code.js +37 -0
- package/dist/core/storage/offline-snapshot-file.code.js.map +1 -0
- package/dist/core/storage/offline-snapshot-file.impl.js +36 -0
- package/dist/core/storage/offline-snapshot-file.impl.js.map +1 -0
- package/dist/core/storage/offline-snapshot-file.js +33 -34
- package/dist/core/storage/offline-snapshot-file.js.map +1 -1
- package/dist/core/storage/provider.js +52 -7
- package/dist/core/storage/selection.js +49 -4
- package/dist/core/storage/session/branch-fork-source.code.js +146 -0
- package/dist/core/storage/session/branch-fork-source.code.js.map +1 -0
- package/dist/core/storage/session/branch-fork-source.impl.js +36 -0
- package/dist/core/storage/session/branch-fork-source.impl.js.map +1 -0
- package/dist/core/storage/session/branch-fork-source.js +32 -97
- package/dist/core/storage/session/branch-fork-source.js.map +1 -1
- package/dist/core/storage/session/card-view.code.js +60 -0
- package/dist/core/storage/session/card-view.code.js.map +1 -0
- package/dist/core/storage/session/card-view.impl.js +36 -0
- package/dist/core/storage/session/card-view.impl.js.map +1 -0
- package/dist/core/storage/session/card-view.js +34 -58
- package/dist/core/storage/session/card-view.js.map +1 -1
- package/dist/core/storage/session/child-reader.code.js +139 -0
- package/dist/core/storage/session/child-reader.code.js.map +1 -0
- package/dist/core/storage/session/child-reader.d.ts +1 -0
- package/dist/core/storage/session/child-reader.impl.js +36 -0
- package/dist/core/storage/session/child-reader.impl.js.map +1 -0
- package/dist/core/storage/session/child-reader.js +33 -91
- package/dist/core/storage/session/child-reader.js.map +1 -1
- package/dist/core/storage/session/chunked-resume-projection.code.js +3 -0
- package/dist/core/storage/session/chunked-resume-projection.code.js.map +1 -0
- package/dist/core/storage/session/chunked-resume-projection.impl.js +36 -0
- package/dist/core/storage/session/chunked-resume-projection.impl.js.map +1 -0
- package/dist/core/storage/session/chunked-resume-projection.js +35 -2
- package/dist/core/storage/session/expanded-child-details.code.js +684 -0
- package/dist/core/storage/session/expanded-child-details.code.js.map +1 -0
- package/dist/core/storage/session/expanded-child-details.impl.js +36 -0
- package/dist/core/storage/session/expanded-child-details.impl.js.map +1 -0
- package/dist/core/storage/session/expanded-child-details.js +31 -634
- package/dist/core/storage/session/expanded-child-details.js.map +1 -1
- package/dist/core/storage/session/fork-row-bytes.code.js +3 -0
- package/dist/core/storage/session/fork-row-bytes.code.js.map +1 -0
- package/dist/core/storage/session/fork-row-bytes.impl.js +36 -0
- package/dist/core/storage/session/fork-row-bytes.impl.js.map +1 -0
- package/dist/core/storage/session/fork-row-bytes.js +35 -2
- package/dist/core/storage/session/fork-row-index.code.js +3 -0
- package/dist/core/storage/session/fork-row-index.code.js.map +1 -0
- package/dist/core/storage/session/fork-row-index.impl.js +36 -0
- package/dist/core/storage/session/fork-row-index.impl.js.map +1 -0
- package/dist/core/storage/session/fork-row-index.js +35 -2
- package/dist/core/storage/session/fork-staging.code.js +580 -0
- package/dist/core/storage/session/fork-staging.code.js.map +1 -0
- package/dist/core/storage/session/fork-staging.impl.js +36 -0
- package/dist/core/storage/session/fork-staging.impl.js.map +1 -0
- package/dist/core/storage/session/fork-staging.js +30 -574
- package/dist/core/storage/session/fork-staging.js.map +1 -1
- package/dist/core/storage/session/fork-window.code.js +522 -0
- package/dist/core/storage/session/fork-window.code.js.map +1 -0
- package/dist/core/storage/session/fork-window.impl.js +36 -0
- package/dist/core/storage/session/fork-window.impl.js.map +1 -0
- package/dist/core/storage/session/fork-window.js +30 -471
- package/dist/core/storage/session/fork-window.js.map +1 -1
- package/dist/core/storage/session/history-pages.code.js +3 -0
- package/dist/core/storage/session/history-pages.code.js.map +1 -0
- package/dist/core/storage/session/history-pages.impl.js +36 -0
- package/dist/core/storage/session/history-pages.impl.js.map +1 -0
- package/dist/core/storage/session/history-pages.js +35 -2
- package/dist/core/storage/session/jsonl-entry-projection.code.js +3 -0
- package/dist/core/storage/session/jsonl-entry-projection.code.js.map +1 -0
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +36 -0
- package/dist/core/storage/session/jsonl-entry-projection.impl.js.map +1 -0
- package/dist/core/storage/session/jsonl-entry-projection.js +35 -2
- package/dist/core/storage/session/jsonl-session-store.code.js +3 -0
- package/dist/core/storage/session/jsonl-session-store.code.js.map +1 -0
- package/dist/core/storage/session/jsonl-session-store.impl.js +36 -0
- package/dist/core/storage/session/jsonl-session-store.impl.js.map +1 -0
- package/dist/core/storage/session/jsonl-session-store.js +35 -2
- package/dist/core/storage/session/memory-session-store.code.js +3 -0
- package/dist/core/storage/session/memory-session-store.code.js.map +1 -0
- package/dist/core/storage/session/memory-session-store.impl.js +36 -0
- package/dist/core/storage/session/memory-session-store.impl.js.map +1 -0
- package/dist/core/storage/session/memory-session-store.js +35 -2
- package/dist/core/storage/session/pinned-branch-resume.code.js +117 -0
- package/dist/core/storage/session/pinned-branch-resume.code.js.map +1 -0
- package/dist/core/storage/session/pinned-branch-resume.impl.js +36 -0
- package/dist/core/storage/session/pinned-branch-resume.impl.js.map +1 -0
- package/dist/core/storage/session/pinned-branch-resume.js +33 -69
- package/dist/core/storage/session/pinned-branch-resume.js.map +1 -1
- package/dist/core/storage/session/released-history-files.code.js +465 -0
- package/dist/core/storage/session/released-history-files.code.js.map +1 -0
- package/dist/core/storage/session/released-history-files.impl.js +36 -0
- package/dist/core/storage/session/released-history-files.impl.js.map +1 -0
- package/dist/core/storage/session/released-history-files.js +32 -461
- package/dist/core/storage/session/released-history-files.js.map +1 -1
- package/dist/core/storage/session/resident-fork-rows.code.js +57 -0
- package/dist/core/storage/session/resident-fork-rows.code.js.map +1 -0
- package/dist/core/storage/session/resident-fork-rows.impl.js +36 -0
- package/dist/core/storage/session/resident-fork-rows.impl.js.map +1 -0
- package/dist/core/storage/session/resident-fork-rows.js +32 -53
- package/dist/core/storage/session/resident-fork-rows.js.map +1 -1
- package/dist/core/storage/session/session-resume.code.js +3 -0
- package/dist/core/storage/session/session-resume.code.js.map +1 -0
- package/dist/core/storage/session/session-resume.impl.js +36 -0
- package/dist/core/storage/session/session-resume.impl.js.map +1 -0
- package/dist/core/storage/session/session-resume.js +35 -2
- package/dist/core/storage/session/snapshot-cut.code.js +3 -0
- package/dist/core/storage/session/snapshot-cut.code.js.map +1 -0
- package/dist/core/storage/session/snapshot-cut.impl.js +36 -0
- package/dist/core/storage/session/snapshot-cut.impl.js.map +1 -0
- package/dist/core/storage/session/snapshot-cut.js +35 -2
- package/dist/core/storage/session/snapshot-history.code.js +107 -0
- package/dist/core/storage/session/snapshot-history.code.js.map +1 -0
- package/dist/core/storage/session/snapshot-history.impl.js +36 -0
- package/dist/core/storage/session/snapshot-history.impl.js.map +1 -0
- package/dist/core/storage/session/snapshot-history.js +34 -60
- package/dist/core/storage/session/snapshot-history.js.map +1 -1
- package/dist/core/storage/session/sql-session-store.code.js +3 -0
- package/dist/core/storage/session/sql-session-store.code.js.map +1 -0
- package/dist/core/storage/session/sql-session-store.impl.js +36 -0
- package/dist/core/storage/session/sql-session-store.impl.js.map +1 -0
- package/dist/core/storage/session/sql-session-store.js +35 -2
- package/dist/core/storage/session/tree-outline.code.js +3 -0
- package/dist/core/storage/session/tree-outline.code.js.map +1 -0
- package/dist/core/storage/session/tree-outline.impl.js +36 -0
- package/dist/core/storage/session/tree-outline.impl.js.map +1 -0
- package/dist/core/storage/session/tree-outline.js +35 -2
- package/dist/core/storage/session/tree-presentation.code.js +342 -0
- package/dist/core/storage/session/tree-presentation.code.js.map +1 -0
- package/dist/core/storage/session/tree-presentation.impl.js +36 -0
- package/dist/core/storage/session/tree-presentation.impl.js.map +1 -0
- package/dist/core/storage/session/tree-presentation.js +31 -337
- package/dist/core/storage/session/tree-presentation.js.map +1 -1
- package/dist/core/storage/session/types.d.ts +26 -0
- package/dist/core/storage/storage-status.code.js +3 -0
- package/dist/core/storage/storage-status.code.js.map +1 -0
- package/dist/core/storage/storage-status.impl.js +36 -0
- package/dist/core/storage/storage-status.impl.js.map +1 -0
- package/dist/core/storage/storage-status.js +35 -2
- package/dist/core/storage/team.code.js +3 -0
- package/dist/core/storage/team.code.js.map +1 -0
- package/dist/core/storage/team.impl.js +36 -0
- package/dist/core/storage/team.impl.js.map +1 -0
- package/dist/core/storage/team.js +35 -2
- package/dist/core/structured-output/index.code.js +3 -0
- package/dist/core/structured-output/index.code.js.map +1 -0
- package/dist/core/structured-output/index.impl.js +36 -0
- package/dist/core/structured-output/index.impl.js.map +1 -0
- package/dist/core/structured-output/index.js +35 -2
- package/dist/core/tasks/command-output.d.ts +4 -1
- package/dist/core/tasks/supervisor.d.ts +2 -0
- package/dist/core/tasks/task-completion-entry.code.js +254 -0
- package/dist/core/tasks/task-completion-entry.code.js.map +1 -0
- package/dist/core/tasks/task-completion-entry.impl.js +36 -0
- package/dist/core/tasks/task-completion-entry.impl.js.map +1 -0
- package/dist/core/tasks/task-completion-entry.js +33 -251
- package/dist/core/tasks/task-completion-entry.js.map +1 -1
- package/dist/core/tasks/task-file-history.code.js +424 -0
- package/dist/core/tasks/task-file-history.code.js.map +1 -0
- package/dist/core/tasks/task-file-history.impl.js +36 -0
- package/dist/core/tasks/task-file-history.impl.js.map +1 -0
- package/dist/core/tasks/task-file-history.js +32 -375
- package/dist/core/tasks/task-file-history.js.map +1 -1
- package/dist/core/tasks/task-reference-archive.code.js +514 -0
- package/dist/core/tasks/task-reference-archive.code.js.map +1 -0
- package/dist/core/tasks/task-reference-archive.js +34 -467
- package/dist/core/tasks/task-reference-archive.js.map +1 -1
- package/dist/core/tasks/task-reference-identity.code.js +164 -0
- package/dist/core/tasks/task-reference-identity.code.js.map +1 -0
- package/dist/core/tasks/task-reference-identity.js +32 -160
- package/dist/core/tasks/task-reference-identity.js.map +1 -1
- package/dist/core/tasks/task-reference-stream.code.js +3 -0
- package/dist/core/tasks/task-reference-stream.code.js.map +1 -0
- package/dist/core/tasks/task-reference-stream.impl.js +36 -0
- package/dist/core/tasks/task-reference-stream.impl.js.map +1 -0
- package/dist/core/tasks/task-reference-stream.js +35 -2
- package/dist/core/tasks/task-unsaved-answer.code.js +3 -0
- package/dist/core/tasks/task-unsaved-answer.code.js.map +1 -0
- package/dist/core/tasks/task-unsaved-answer.impl.js +36 -0
- package/dist/core/tasks/task-unsaved-answer.impl.js.map +1 -0
- package/dist/core/tasks/task-unsaved-answer.js +35 -2
- package/dist/core/tasks/task-view-source.code.js +3 -0
- package/dist/core/tasks/task-view-source.code.js.map +1 -0
- package/dist/core/tasks/task-view-source.d.ts +9 -0
- package/dist/core/tasks/task-view-source.impl.js +36 -0
- package/dist/core/tasks/task-view-source.impl.js.map +1 -0
- package/dist/core/tasks/task-view-source.js +35 -2
- package/dist/core/tools/read-url.code.js +1530 -0
- package/dist/core/tools/read-url.code.js.map +1 -0
- package/dist/core/tools/read-url.impl.js +36 -0
- package/dist/core/tools/read-url.impl.js.map +1 -0
- package/dist/core/tools/read-url.js +30 -1524
- package/dist/core/tools/read-url.js.map +1 -1
- package/dist/core/worktree-snapshot/blob-store.js +50 -5
- package/dist/core/worktree-snapshot/errors.code.js +6 -0
- package/dist/core/worktree-snapshot/errors.code.js.map +1 -0
- package/dist/core/worktree-snapshot/errors.impl.js +36 -0
- package/dist/core/worktree-snapshot/errors.impl.js.map +1 -0
- package/dist/core/worktree-snapshot/errors.js +35 -5
- package/dist/core/worktree-snapshot/session-index-reset.code.js +136 -0
- package/dist/core/worktree-snapshot/session-index-reset.code.js.map +1 -0
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +36 -0
- package/dist/core/worktree-snapshot/session-index-reset.impl.js.map +1 -0
- package/dist/core/worktree-snapshot/session-index-reset.js +34 -134
- package/dist/core/worktree-snapshot/session-index-reset.js.map +1 -1
- package/dist/extensions/codemode/execute.code.js +618 -0
- package/dist/extensions/codemode/execute.code.js.map +1 -0
- package/dist/extensions/codemode/execute.impl.js +36 -0
- package/dist/extensions/codemode/execute.impl.js.map +1 -0
- package/dist/extensions/codemode/execute.js +30 -612
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/renderer.code.js +110 -0
- package/dist/extensions/codemode/renderer.code.js.map +1 -0
- package/dist/extensions/codemode/renderer.impl.js +36 -0
- package/dist/extensions/codemode/renderer.impl.js.map +1 -0
- package/dist/extensions/codemode/renderer.js +33 -107
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/mcp/cli.code.js +565 -0
- package/dist/extensions/mcp/cli.code.js.map +1 -0
- package/dist/extensions/mcp/cli.impl.js +36 -0
- package/dist/extensions/mcp/cli.impl.js.map +1 -0
- package/dist/extensions/mcp/cli.js +32 -561
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/cli.lazy.code.js +52 -0
- package/dist/extensions/mcp/cli.lazy.code.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.impl.js +36 -0
- package/dist/extensions/mcp/cli.lazy.impl.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.js +36 -7
- package/dist/extensions/mcp/cli.lazy.js.map +1 -1
- package/dist/extensions/mcp/client/transports/stdio.d.ts +2 -0
- package/dist/extensions/mcp/runtime.code.js +5 -0
- package/dist/extensions/mcp/runtime.code.js.map +1 -0
- package/dist/extensions/mcp/runtime.impl.js +36 -0
- package/dist/extensions/mcp/runtime.impl.js.map +1 -0
- package/dist/extensions/mcp/runtime.js +35 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/main-first-time-setup.code.js +12 -0
- package/dist/main-first-time-setup.code.js.map +1 -0
- package/dist/main-first-time-setup.impl.js +36 -0
- package/dist/main-first-time-setup.impl.js.map +1 -0
- package/dist/main-first-time-setup.js +35 -11
- package/dist/main-first-time-setup.js.map +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.js +2 -2
- package/dist/modes/interactive/agent-view/agent-view-switcher.d.ts +6 -1
- package/dist/modes/interactive/agent-view/contracts.d.ts +4 -0
- package/dist/modes/interactive/chat-reader-records.d.ts +1 -1
- package/dist/modes/interactive/components/stored-tree-view.code.js +338 -0
- package/dist/modes/interactive/components/stored-tree-view.code.js.map +1 -0
- package/dist/modes/interactive/components/stored-tree-view.impl.js +36 -0
- package/dist/modes/interactive/components/stored-tree-view.impl.js.map +1 -0
- package/dist/modes/interactive/components/stored-tree-view.js +33 -290
- package/dist/modes/interactive/components/stored-tree-view.js.map +1 -1
- package/dist/modes/interactive/components/task-selection-state.d.ts +8 -3
- package/dist/modes/interactive/components/task-transcript-page.d.ts +1 -0
- package/dist/modes/interactive/components/user-message-selector-archive.code.js +191 -0
- package/dist/modes/interactive/components/user-message-selector-archive.code.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +36 -0
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector-archive.js +34 -189
- package/dist/modes/interactive/components/user-message-selector-archive.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +6 -0
- package/dist/modes/interactive/interactive-mode-deps.js +4 -0
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +1 -1
- package/dist/modes/interactive/interactive-queueing.d.ts +4 -0
- package/dist/modes/interactive/interactive-render-chat.d.ts +22 -0
- package/dist/modes/interactive/interactive-startup.d.ts +2 -0
- package/dist/modes/interactive/program-status-reporter.d.ts +2 -1
- package/dist/modes/interactive/startup-shell-eligibility.js +1 -1
- package/dist/modes/interactive/steering-queue-controller.d.ts +4 -0
- package/dist/modes/interactive/theme/theme-schema-factory.d.ts +26 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts +4 -5
- package/dist/modes/interactive-engine/engine-prewarm.d.ts +30 -5
- package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +7 -0
- package/dist/modes/interactive-engine/protocol.d.ts +32 -1
- package/dist/modes/rpc/agent-view-rpc-types.d.ts +12 -1
- package/dist/modes/rpc/agent-view-rpc-types.js.map +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +3 -1
- package/dist/modes/rpc/rpc-types.d.ts +12 -0
- package/dist/package-manager-cli.code.js +1140 -0
- package/dist/package-manager-cli.code.js.map +1 -0
- package/dist/package-manager-cli.impl.js +36 -0
- package/dist/package-manager-cli.impl.js.map +1 -0
- package/dist/package-manager-cli.js +36 -1067
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/rpc-entry.js +2 -2
- 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/13.js +1 -0
- package/dist/startup-stages/2.js +1 -7
- package/dist/startup-stages/3.js +6 -2
- package/dist/startup-stages/4.js +2 -1
- package/dist/startup-stages/5.js +1 -7
- package/dist/startup-stages/6.js +7 -10
- package/dist/startup-stages/7.js +10 -3
- package/dist/startup-stages/8.js +3 -6
- package/dist/startup-stages/9.js +6 -1
- package/dist/startup-stages/stages.json +1 -1
- package/dist/utils/canonical-path.js +2 -0
- package/dist/utils/canonical-path.js.map +1 -1
- package/dist/utils/child-process.d.ts +41 -1
- package/dist/utils/compile-cache-warmup-host.js +63 -18
- package/dist/utils/compile-cache-warmup-host.js.map +1 -1
- package/dist/utils/credential-redaction.d.ts +50 -1
- package/dist/utils/interactive-engine-bootstrap.d.ts +2 -0
- package/dist/utils/interactive-engine-env.d.ts +2 -0
- package/dist/utils/memoize-async.d.ts +32 -0
- package/dist/utils/memoize-async.js +91 -0
- package/dist/utils/memoize-async.js.map +1 -0
- package/dist/utils/photon.js +19 -29
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/shell.d.ts +7 -4
- package/dist/utils/startup-database-spare.code.js +108 -0
- package/dist/utils/startup-database-spare.code.js.map +1 -0
- package/dist/utils/startup-database-spare.impl.js +36 -0
- package/dist/utils/startup-database-spare.impl.js.map +1 -0
- package/dist/utils/startup-database-spare.js +33 -105
- package/dist/utils/startup-database-spare.js.map +1 -1
- package/dist/utils/tools-manager.code.js +3 -0
- package/dist/utils/tools-manager.code.js.map +1 -0
- package/dist/utils/tools-manager.impl.js +36 -0
- package/dist/utils/tools-manager.impl.js.map +1 -0
- package/dist/utils/tools-manager.js +35 -2
- package/dist/utils/windows-cwd.js +585 -0
- package/dist/utils/windows-cwd.js.map +1 -0
- package/docs/extensions.md +1 -1
- package/docs/getting-started/installation.md +2 -0
- package/docs/intercom/operations.md +1 -0
- package/docs/reference/cli.md +2 -2
- package/package.json +24 -24
- package/dist/_shared/mode-shared-HP7GUA7J.js.map +0 -1
- package/dist/_shared/p1a-prewarm-YK3KDTLN.js.map +0 -1
- package/dist/_shared/p1b-elig-PXQA2FYP.js.map +0 -1
- package/dist/_shared/startup-0-0-X4NF3GKM.js.map +0 -1
- package/dist/_shared/startup-0-1-7QTG6VJZ.js.map +0 -1
- package/dist/_shared/startup-0-2-KFDYPDJK.js.map +0 -1
- package/dist/_shared/startup-8-1-KQJBDKRU.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
import { APP_NAME } from "./p0-cli-
|
|
3
|
-
import { getBuiltinPackageLocations, openAdapterSelectionDatabase } from "./startup-0-0-
|
|
4
|
-
import { SESSIONS_TRANSFER_DIRECTORY, StorageImportIncompleteError, StorageTransferError, assertSessionBlobStore, inlineToolOutput, isStorageImportIncompleteError, isStorageTransferError, readTransferDirectory, storeSessionBlobs, takeInlineToolOutput, transferFile, writeLinesAtomically } from "./startup-0-1-
|
|
2
|
+
import { APP_NAME } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
+
import { getBuiltinPackageLocations, openAdapterSelectionDatabase } from "./startup-0-0-TYUFUOJZ.js";
|
|
4
|
+
import { SESSIONS_TRANSFER_DIRECTORY, StorageImportIncompleteError, StorageTransferError, assertSessionBlobStore, inlineToolOutput, isStorageImportIncompleteError, isStorageTransferError, readTransferDirectory, storeSessionBlobs, takeInlineToolOutput, transferFile, writeLinesAtomically } from "./startup-0-1-D4LGGINF.js";
|
|
5
5
|
import { JsonlSessionStore, isCurrentSessionHeader } from "./startup-8-0-34CBHPZH.js";
|
|
6
|
-
import { SettingsManager, adoptInlineSnapshotBlobs, collectStorageStatus, describeStorageError as describeStorageError$1, describeStorageSelection, effectiveSharedSelection, inlineSnapshotBlobs, joinSharedDatabase, projectTrust, resolveSessionStore, selectSessionStorageWithSettings, sessionSnapshotBlobs } from "./startup-8-1-
|
|
6
|
+
import { SettingsManager, adoptInlineSnapshotBlobs, collectStorageStatus, describeStorageError as describeStorageError$1, describeStorageSelection, effectiveSharedSelection, inlineSnapshotBlobs, joinSharedDatabase, projectTrust, resolveSessionStore, selectSessionStorageWithSettings, sessionSnapshotBlobs } from "./startup-8-1-SJW2GMAM.js";
|
|
7
7
|
import { mkdir } from "node:fs/promises";
|
|
8
8
|
import { join, resolve } from "node:path";
|
|
9
9
|
import { pathToFileURL } from "node:url";
|
|
@@ -681,7 +681,7 @@ const errorText = describeStorageError$1;
|
|
|
681
681
|
async function loadBrokerControl(options) {
|
|
682
682
|
try {
|
|
683
683
|
if (options.loadControl) return await options.loadControl();
|
|
684
|
-
const { loadIntercomBrokerControl } = await import("../core/intercom-broker-control.js");
|
|
684
|
+
const { loadIntercomBrokerControl } = await import("../core/intercom-broker-control.code.js").catch((error) => __atomicOnDemandFailed(error, "intercom"));
|
|
685
685
|
return await loadIntercomBrokerControl();
|
|
686
686
|
} catch (error) {
|
|
687
687
|
return error instanceof Error ? error : new Error(String(error));
|
|
@@ -798,12 +798,12 @@ async function runStorageCommand(args, options) {
|
|
|
798
798
|
return 0;
|
|
799
799
|
}
|
|
800
800
|
if (command.kind === "search-session") {
|
|
801
|
-
const { searchStoredSession } = await import("../cli/storage-search-session.js");
|
|
801
|
+
const { searchStoredSession } = await import("../cli/storage-search-session.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
802
802
|
await searchStoredSession(command, options.cwd, options.log);
|
|
803
803
|
return 0;
|
|
804
804
|
}
|
|
805
805
|
if (command.kind === "move-snapshot-chunks") {
|
|
806
|
-
const { SqlSnapshotBlobStore } = await import("../core/worktree-snapshot/blob-store.js");
|
|
806
|
+
const { SqlSnapshotBlobStore } = await import("../core/worktree-snapshot/blob-store.js").catch((error) => __atomicOnDemandFailed(error, "worktree snapshots"));
|
|
807
807
|
await SqlSnapshotBlobStore.moveChunksOffline(resolve(options.cwd, command.file), command.prefix);
|
|
808
808
|
log("Snapshot chunk layout is up to date.");
|
|
809
809
|
return 0;
|
|
@@ -826,7 +826,7 @@ async function loadBrokerStateModule() {
|
|
|
826
826
|
if (intercom === void 0) throw new Error("The bundled Intercom package was not found.");
|
|
827
827
|
const modulePath = ["broker/open-broker-state.ts", "broker/open-broker-state.js"].map((path) => join(intercom.packageDir, path)).find((path) => existsSync(path));
|
|
828
828
|
if (modulePath === void 0) throw new Error("The bundled Intercom package has no broker state module.");
|
|
829
|
-
const [{ createHostModuleJiti }, { getVirtualModules }] = await Promise.all([import("../core/extensions/loader-virtual-modules.js"), import("../core/extensions/loader-host-modules.js")]);
|
|
829
|
+
const [{ createHostModuleJiti }, { getVirtualModules }] = await Promise.all([import("../core/extensions/loader-virtual-modules.js").catch((error) => __atomicOnDemandFailed(error, "this feature")), import("../core/extensions/loader-host-modules.code.js").catch((error) => __atomicOnDemandFailed(error, "this feature"))]);
|
|
830
830
|
return (await createHostModuleJiti(pathToFileURL(modulePath).href, await getVirtualModules())).import(modulePath);
|
|
831
831
|
}
|
|
832
832
|
/** Select an explicit migration target without reading credentials into settings or command output. */
|
|
@@ -880,7 +880,7 @@ async function migrate(command, options, log) {
|
|
|
880
880
|
domain: "sessions"
|
|
881
881
|
});
|
|
882
882
|
try {
|
|
883
|
-
const { SqlSessionStore } = await import("../core/storage/session/sql-session-store.js");
|
|
883
|
+
const { SqlSessionStore } = await import("../core/storage/session/sql-session-store.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
884
884
|
if (sessions instanceof SqlSessionStore) await sessions.prepareForkStaging();
|
|
885
885
|
} finally {
|
|
886
886
|
await sessions.close();
|
|
@@ -1004,4 +1004,49 @@ function sessionStore(transfer) {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
export { LIBSQL_ADAPTER_PACKAGE$1 as LIBSQL_ADAPTER_PACKAGE, STORAGE_TOKEN_FILE$1 as STORAGE_TOKEN_FILE, StorageCommandError, failed, formatStorageStatus, loadBrokerControl, parseStorageCommand, runStorageCommand };
|
|
1006
1006
|
|
|
1007
|
-
//# sourceMappingURL=storage-command-7MGXLJGZ.js.map
|
|
1007
|
+
//# sourceMappingURL=storage-command-7MGXLJGZ.js.map
|
|
1008
|
+
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
1009
|
+
// demand that fails in a process an in-place update left running says to restart.
|
|
1010
|
+
function __atomicOnDemandFailed(error, feature) {
|
|
1011
|
+
return (async () => {
|
|
1012
|
+
const root = new URL("../", import.meta.url);
|
|
1013
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
1014
|
+
const key = `${root.href}#0.10.5-alpha.1`;
|
|
1015
|
+
let release = releases.get(key);
|
|
1016
|
+
if (release === undefined) {
|
|
1017
|
+
const current = (async () => {
|
|
1018
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
1019
|
+
try {
|
|
1020
|
+
const held = await import(new URL(path, root).href);
|
|
1021
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
1022
|
+
} catch {
|
|
1023
|
+
// Not a file this process can load: the next.
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
return undefined;
|
|
1027
|
+
})().then((found) => {
|
|
1028
|
+
if (found === undefined && releases.get(key) === current) releases.delete(key);
|
|
1029
|
+
return found;
|
|
1030
|
+
});
|
|
1031
|
+
releases.set(key, current);
|
|
1032
|
+
release = current;
|
|
1033
|
+
}
|
|
1034
|
+
const running = await release;
|
|
1035
|
+
let installed;
|
|
1036
|
+
try {
|
|
1037
|
+
const { readFile } = process.getBuiltinModule("node:fs/promises");
|
|
1038
|
+
installed = JSON.parse(await readFile(new URL("../package.json", root), "utf8")).version;
|
|
1039
|
+
} catch {
|
|
1040
|
+
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
1041
|
+
}
|
|
1042
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.5-alpha.1" ? installed : running !== undefined && running.version !== "0.10.5-alpha.1" ? "0.10.5-alpha.1" : undefined;
|
|
1043
|
+
if (updatedTo === undefined) throw error;
|
|
1044
|
+
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
1045
|
+
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
1046
|
+
cause: error,
|
|
1047
|
+
});
|
|
1048
|
+
restart.name = "UpdatedInstallError";
|
|
1049
|
+
restart[Symbol.for("atomic.on-demand-restart.v1")] = { application, updatedTo, feature };
|
|
1050
|
+
throw restart;
|
|
1051
|
+
})();
|
|
1052
|
+
}
|
|
@@ -3,7 +3,7 @@ import "./rolldown-runtime-BGM3D5V3.js";
|
|
|
3
3
|
/** An acknowledgement can be lost after the store has written the final reply. Compare only the newest saved
|
|
4
4
|
* message (ignoring bookkeeping after it); never append an already-saved answer twice. */
|
|
5
5
|
async function taskAnswerMissing(unsaved, records) {
|
|
6
|
-
const { compareTaskAnswer } = await import("../core/tasks/task-reference-stream.js");
|
|
6
|
+
const { compareTaskAnswer } = await import("../core/tasks/task-reference-stream.code.js").catch((error) => __atomicOnDemandFailed(error, "/tasks"));
|
|
7
7
|
for await (const row of records) {
|
|
8
8
|
if (row.entry) {
|
|
9
9
|
if (row.entry.type !== "message") continue;
|
|
@@ -24,4 +24,49 @@ async function taskAnswerMissing(unsaved, records) {
|
|
|
24
24
|
}
|
|
25
25
|
export { taskAnswerMissing };
|
|
26
26
|
|
|
27
|
-
//# sourceMappingURL=task-unsaved-answer-VJ2KTB4V.js.map
|
|
27
|
+
//# sourceMappingURL=task-unsaved-answer-VJ2KTB4V.js.map
|
|
28
|
+
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
29
|
+
// demand that fails in a process an in-place update left running says to restart.
|
|
30
|
+
function __atomicOnDemandFailed(error, feature) {
|
|
31
|
+
return (async () => {
|
|
32
|
+
const root = new URL("../", import.meta.url);
|
|
33
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
34
|
+
const key = `${root.href}#0.10.5-alpha.1`;
|
|
35
|
+
let release = releases.get(key);
|
|
36
|
+
if (release === undefined) {
|
|
37
|
+
const current = (async () => {
|
|
38
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
39
|
+
try {
|
|
40
|
+
const held = await import(new URL(path, root).href);
|
|
41
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
42
|
+
} catch {
|
|
43
|
+
// Not a file this process can load: the next.
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
})().then((found) => {
|
|
48
|
+
if (found === undefined && releases.get(key) === current) releases.delete(key);
|
|
49
|
+
return found;
|
|
50
|
+
});
|
|
51
|
+
releases.set(key, current);
|
|
52
|
+
release = current;
|
|
53
|
+
}
|
|
54
|
+
const running = await release;
|
|
55
|
+
let installed;
|
|
56
|
+
try {
|
|
57
|
+
const { readFile } = process.getBuiltinModule("node:fs/promises");
|
|
58
|
+
installed = JSON.parse(await readFile(new URL("../package.json", root), "utf8")).version;
|
|
59
|
+
} catch {
|
|
60
|
+
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
61
|
+
}
|
|
62
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.5-alpha.1" ? installed : running !== undefined && running.version !== "0.10.5-alpha.1" ? "0.10.5-alpha.1" : undefined;
|
|
63
|
+
if (updatedTo === undefined) throw error;
|
|
64
|
+
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
65
|
+
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
66
|
+
cause: error,
|
|
67
|
+
});
|
|
68
|
+
restart.name = "UpdatedInstallError";
|
|
69
|
+
restart[Symbol.for("atomic.on-demand-restart.v1")] = { application, updatedTo, feature };
|
|
70
|
+
throw restart;
|
|
71
|
+
})();
|
|
72
|
+
}
|
|
@@ -50,7 +50,7 @@ async function* treeOutlinePages(store, id, epoch, through, signal) {
|
|
|
50
50
|
streamed: true
|
|
51
51
|
}));
|
|
52
52
|
else {
|
|
53
|
-
const { snapshotOutline } = await import("../core/storage/session/snapshot-history.js");
|
|
53
|
+
const { snapshotOutline } = await import("../core/storage/session/snapshot-history.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
54
54
|
rows = await snapshotOutline(store, id, from, end, epoch);
|
|
55
55
|
}
|
|
56
56
|
const page = [];
|
|
@@ -72,7 +72,7 @@ async function* treeOutlinePages(store, id, epoch, through, signal) {
|
|
|
72
72
|
epoch: sizes.epoch,
|
|
73
73
|
bytes: size.bytes
|
|
74
74
|
}, { signal });
|
|
75
|
-
page.push(await (await import("../core/storage/session/chunked-resume-projection.js")).chunkedTreeOutline(row.seq, chunks));
|
|
75
|
+
page.push(await (await import("../core/storage/session/chunked-resume-projection.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"))).chunkedTreeOutline(row.seq, chunks));
|
|
76
76
|
}
|
|
77
77
|
signal?.throwIfAborted();
|
|
78
78
|
yield page;
|
|
@@ -81,4 +81,49 @@ async function* treeOutlinePages(store, id, epoch, through, signal) {
|
|
|
81
81
|
}
|
|
82
82
|
export { treeOutlineEntry, treeOutlinePages };
|
|
83
83
|
|
|
84
|
-
//# sourceMappingURL=tree-outline-MUEPK5B7.js.map
|
|
84
|
+
//# sourceMappingURL=tree-outline-MUEPK5B7.js.map
|
|
85
|
+
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
86
|
+
// demand that fails in a process an in-place update left running says to restart.
|
|
87
|
+
function __atomicOnDemandFailed(error, feature) {
|
|
88
|
+
return (async () => {
|
|
89
|
+
const root = new URL("../", import.meta.url);
|
|
90
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
91
|
+
const key = `${root.href}#0.10.5-alpha.1`;
|
|
92
|
+
let release = releases.get(key);
|
|
93
|
+
if (release === undefined) {
|
|
94
|
+
const current = (async () => {
|
|
95
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
96
|
+
try {
|
|
97
|
+
const held = await import(new URL(path, root).href);
|
|
98
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
99
|
+
} catch {
|
|
100
|
+
// Not a file this process can load: the next.
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return undefined;
|
|
104
|
+
})().then((found) => {
|
|
105
|
+
if (found === undefined && releases.get(key) === current) releases.delete(key);
|
|
106
|
+
return found;
|
|
107
|
+
});
|
|
108
|
+
releases.set(key, current);
|
|
109
|
+
release = current;
|
|
110
|
+
}
|
|
111
|
+
const running = await release;
|
|
112
|
+
let installed;
|
|
113
|
+
try {
|
|
114
|
+
const { readFile } = process.getBuiltinModule("node:fs/promises");
|
|
115
|
+
installed = JSON.parse(await readFile(new URL("../package.json", root), "utf8")).version;
|
|
116
|
+
} catch {
|
|
117
|
+
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
118
|
+
}
|
|
119
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.5-alpha.1" ? installed : running !== undefined && running.version !== "0.10.5-alpha.1" ? "0.10.5-alpha.1" : undefined;
|
|
120
|
+
if (updatedTo === undefined) throw error;
|
|
121
|
+
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
122
|
+
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
123
|
+
cause: error,
|
|
124
|
+
});
|
|
125
|
+
restart.name = "UpdatedInstallError";
|
|
126
|
+
restart[Symbol.for("atomic.on-demand-restart.v1")] = { application, updatedTo, feature };
|
|
127
|
+
throw restart;
|
|
128
|
+
})();
|
|
129
|
+
}
|
|
@@ -4,6 +4,65 @@ All notable changes to Atomic's Intercom extension, `@bastani/intercom`, are doc
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.10.5-alpha.1] - 2026-11-23
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- On Windows, the Intercom broker now starts as a hidden detached process without `wscript.exe`, `cmd.exe`, or `broker-launch.vbs`, staying outside the launching engine's process tree and breaking away from breakaway-allowing parent job objects. Broker startup now works when Windows Script Host is disabled, preserves startup error logs and exit codes even when paths or arguments contain `%`, and keeps `broker.log` appending and capped at 8 KiB ([#6451](https://github.com/bastani-inc/atomic/pull/6451)).
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- With multi-node routing, a session that reconnects to the same broker while that broker is still recording the departure of its earlier connection keeps its Intercom ID. Before, when the shared database also answered the ID claim late, the broker waited for that departure to finish before it checked the claim, and the session could get a fresh ID instead ([#6433](https://github.com/bastani-inc/atomic/pull/6433)).
|
|
16
|
+
- After an Intercom broker restarts, queued messages for a resumed subagent are now routed to that subagent's registered session ID instead of its display name, so renaming the subagent before queue restoration completes no longer drops its queued messages or misdelivers them to another session using the old name ([#6437](https://github.com/bastani-inc/atomic/pull/6437)).
|
|
17
|
+
- Supervisor replies sent across group isolation on the supervisor channel while the restarted broker is still restoring queued messages now wait behind the subagent's queued messages across every addressing form (session ID, prefix, name, or host session ID), without delaying sends to non-subagent peers ([#6437](https://github.com/bastani-inc/atomic/pull/6437)).
|
|
18
|
+
- With multi-node routing, an Intercom ID that a reconnecting session asked for back is no longer left held for up to 30 s when the shared database wrote the claim only after the session had already been given a fresh ID. That late write is now given back, so the ID can be claimed again at once. A session waiting to take its ID back after a move now gets it as soon as the hold on that ID ends, rather than up to 30 s later ([#6443](https://github.com/bastani-inc/atomic/pull/6443)).
|
|
19
|
+
- With multi-node routing on a shared or pooled database, messages from one sender to the same recipient now stay in send order across local deliveries, cross-node deliveries, mixed replies and plain sends, reconnects, and broker startup, without serializing independent database lookups or blocking sends to other recipients ([#6450](https://github.com/bastani-inc/atomic/pull/6450)).
|
|
20
|
+
- On Windows, MCP server shutdown, process-tree kill commands including `taskkill.exe`, and Intercom's host-identity and broker-stop commands now validate their working directory through canonical path resolution and explicit drive-root handling. They resolve junctions, symlinks, short names, `subst` drives, and extended-length path aliases such as `\\?\`, `\\.\`, and `\\?\UNC\` when checking whether a directory is inside the project folder; prefer verified directories shorter than 248 characters outside the project so spawns succeed without `ENOENT` on default `LongPathsEnabled=0` Windows hosts; reject raw volume devices and incomplete UNC roots; fall back to the working directory's drive root when needed; and prefer `SystemRoot` when running from a genuine drive root. `taskkill.exe` and Intercom helper commands never run inside the project folder or fail with `ENOENT` even when `SystemRoot`, `windir`, or `TMP` points to a junction, `subst` drive, long path, extended-length alias, bare drive, or directory inside the project ([#6447](https://github.com/bastani-inc/atomic/pull/6447), [#6483](https://github.com/bastani-inc/atomic/pull/6483)).
|
|
21
|
+
- Sessions starting at the same time against an older or retiring Intercom broker no longer warn that the broker cannot verify how it routes (or fail to join with `broker-routing-unavailable` when multi-node storage is configured or during verified registration) if their status check or registration closes while another session replaces or stops the broker. They treat that closed connection as a retiring broker and connect verified to the replacement ([#6470](https://github.com/bastani-inc/atomic/pull/6470)).
|
|
22
|
+
- With multi-node routing, sends and replies over a slow shared database no longer fail with `Send timeout` while the broker is still making progress routing or confirming delivery. The broker now extends the sender within its save cap while store progress continues, emits no extra frames on fast stores, and leaves a permanently hung database at its 10 s timeout ([#6465](https://github.com/bastani-inc/atomic/pull/6465)).
|
|
23
|
+
- A session answering a sender outside its groups immediately after receiving the sender's message is no longer refused when the answer reaches Intercom before that message's socket write callback or multi-node delivery settlement finishes. Matching answers now wait for the in-flight delivery to settle before deciding return-path access (for initial openings, reopened closed paths, and partially used budgets) without delaying sends to same-group or unrelated targets, and answers that arrived before a newer message in the same clock tick stay counted toward the older message's budget ([#6475](https://github.com/bastani-inc/atomic/pull/6475)).
|
|
24
|
+
- With multi-node routing, local plain sends queued behind an actively progressing shared-route reply no longer overtake that reply when cumulative database lookups exceed the 300 ms local lookup bound, while still staying bounded if the shared database hangs ([#6481](https://github.com/bastani-inc/atomic/pull/6481)).
|
|
25
|
+
- With multi-node routing, reconnecting sessions on busy shared databases (especially Windows SQLite under heavy disk load) no longer time out their 10 s registration wait when periodic lease renewals or empty outbox scans contend on the write lock or after a broker stall during ID claiming. Periodic broker membership and presence lease renewals now batch into a single shared-store transaction instead of one transaction per session (preserving per-lease unfinished registration retries and partial-failure handling), empty outbox scans check read-only before taking a write lock, post-claim registration waits derive from the client's monotonic remaining connect budget (honouring custom `connectTimeoutMs` without comparing wall clocks across processes or cutting off presence publishing while time remains), client connect timeouts derive from the registration protocol bounds, and client backlog retries stop once `register` has been written ([#6496](https://github.com/bastani-inc/atomic/pull/6496)).
|
|
26
|
+
- On Windows, the detached Intercom broker and its startup relay no longer keep their working directory inside `dist\builtin\intercom`, which previously held a Windows directory handle and caused `npm install -g @bastani/atomic` and `npm uninstall -g @bastani/atomic` to fail with `EBUSY` while a broker was running. The broker now starts in a verified short (< 248-char) working directory outside the installation directory, the caller's project directory, and the agent directory (`/` on macOS and Linux), while absolutizing relative broker entrypoints, custom script commands, and `ATOMIC_CODING_AGENT_DIR`/`PI_CODING_AGENT_DIR` values so broker resolution is independent of its working directory ([#6500](https://github.com/bastani-inc/atomic/pull/6500)).
|
|
27
|
+
|
|
28
|
+
## [0.10.4] - 2026-11-22
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- `intercom({ action: "cancel", replyTo })` closes an ask sent to you that you will not answer: it leaves `pending` and stays closed after restarts, and nothing is sent to its sender ([#6168](https://github.com/bastani-inc/atomic/issues/6168)).
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- An installed Atomic starts its Intercom broker from prebuilt JavaScript instead of compiling the broker's TypeScript at every start. The broker is ready in under 0.1 s instead of 0.5 to 2.8 s on Linux and Windows, so the first Intercom use after a session opens waits that much less, and the broker no longer competes with the end of Atomic's startup ([#6193](https://github.com/bastani-inc/atomic/pull/6193)).
|
|
37
|
+
- On Windows, closing a session while its Intercom broker is still starting no longer waits about half a second for a PowerShell to stop that broker: Atomic's native module stops it, and what it started, at once, still only while its pid names the broker that announced itself. Without the native module PowerShell stops it as before.
|
|
38
|
+
- The notice shown when an ended subagent is woken by an Intercom message now renders as a compact one-line notice card (`↻ Woke <subagent> for a message from <sender> · result arrives here`) with shortened readable IDs instead of a generic `[intercom_subagent_wake]` box. Press Ctrl+O or click anywhere on the notice to expand full subagent and sender IDs; it renders consistently before and after Intercom finishes loading and when resuming sessions ([#6372](https://github.com/bastani-inc/atomic/pull/6372)).
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- An ask sent to you no longer stays in `pending` for good once no reply can reach it. A reply that Intercom refuses for good (`Pending question route does not authorize this public reply`) now closes the ask, and so does a refused reply to one of your subagents that has ended. A restart closes the asks of your subagents that ended and lists them once in the recovery notice (the first 20, and a count of the rest), recording many at once in a few entries so the restart does not wait for a write per ask. A released or paused subagent keeps its ask, since a reply still reaches it ([#6168](https://github.com/bastani-inc/atomic/issues/6168)).
|
|
43
|
+
- Replies that your waiting asks already received are no longer shown again after a restart of a long session. Once a compaction had left the entry that received a reply out of the reopened session, the reply came back as history, or as a new turn when its sender was still connected ([#6168](https://github.com/bastani-inc/atomic/issues/6168)).
|
|
44
|
+
- A session reopened after a compaction no longer keeps every ask you sent that was answered, with its reply, for good. An answered ask is now recorded once its reply is taken, so the next reopened session keeps neither; a session saved by an earlier version records the answers it took at its first restart. An ask whose reply has not been shown yet, a failed ask, and an ask only another session replied to are kept as before. A reopened session with an ask still waiting for its reply connects to Intercom at once, so a reply held for it while it was closed arrives. The same applies to a subagent's `contact_supervisor` questions and their replies.
|
|
45
|
+
- Fixed `atomic intercom restart` ending an unrelated process on Windows when the broker did not acknowledge its shutdown request: Windows can give the pid of a broker that has exited to another process within seconds, and the restart ended whatever process had that pid. It now ends the broker only through a handle to the process it found, only if that process is the one that recorded itself as the broker, and only the broker itself, not a process it started. When the agent directory is on a FAT or exFAT volume, whose file times cannot show which process recorded itself, it takes the pid as the broker's, as before, but still ends only the process the pid named when the restart found the broker. On Linux it signals the broker only while its pid still names the process it found. The restart's 10-second wait for the broker to exit, and a session's wait for a broker it is starting on Windows, now end as soon as the broker's pid names another process instead of running to their limit.
|
|
46
|
+
- `atomic intercom upgrade`, and a session replacing an older broker, no longer wait up to a minute for the older broker to exit once Windows has given its pid to another process: the wait ends as soon as the pid names another process, and the session goes on to start this version's broker. It tells by the process's start where that can be read without starting a process (Linux, and Windows with Atomic's native module), and otherwise on Windows by `broker.pid`'s write time. A broker spawn lock no longer stays held by a process that was given the pid of the spawner or broker it names: the lock records when that process started and is taken once the pid names a process started at another time. On macOS, `atomic intercom restart` reads the broker's start from Atomic's native module (without starting `ps`), so its wait also ends once the pid names another process, and a broker that did not acknowledge its shutdown is not signalled when its pid names another process.
|
|
47
|
+
- With multi-node routing, a reply that no route on its broker authorizes, sent while the shared database answers slowly or not at all, now gets its retryable refusal (`route_unavailable`) within 5 s. Before, its two shared-database checks could each wait 5 s, so the refusal came after the sender had stopped waiting at 10 s: the sender saw `Send timeout`, and a reply it sent right after, which waited behind the first, timed out too. A reply whose check runs past those 5 s is refused as retryable instead of being refused for good later.
|
|
48
|
+
- A broker restarted after a crash on a busy machine no longer drops the messages the earlier broker kept for subagents that ended when its first session registers before the store's code has loaded. The broker waits up to 2 s for its store to open, and that wait now starts once the store's code has loaded, so a slow load no longer uses it up. When that load is slow, the first session's registration can now wait up to 5 s in all instead of 2 s. Past that, the broker keeps its queue in memory, as before ([#6249](https://github.com/bastani-inc/atomic/pull/6249)).
|
|
49
|
+
- The commands that identify the host for multi-node routing (`reg`, Windows PowerShell, `sysctl` and `ioreg`) run from the operating system's own directories, and the `git` that names a session's project group only from the absolute directories in your PATH; the working directory counts only when PATH names it.
|
|
50
|
+
- With multi-node routing, two registrations of the same session on different brokers no longer both use the Intercom ID it had: while one is connected, the other gets a fresh ID. A session that left gets its ID back on any broker at once; one whose broker crashed gets it back at once on another broker of the same machine, or once that broker restarts. On a broker of another machine it gets a fresh ID while the crashed broker's hold on its ID lasts (about 30 seconds), keeps asking for its ID, and is moved back to it once the hold lapses; sends to its ID reach it throughout, and the fresh ID keeps reaching it until it leaves. Asks it got under the fresh ID can still be answered after the move, and the answer comes from the ID the asker asked. When a returning session's claim of its ID was written but answered late, and another session of it on the same broker asked for that ID meanwhile, the returning session now keeps the ID and the other gets a fresh one (it was the other way around). A broker that was paused, or could not reach the shared database, for long enough that another registration took the ID disconnects its own session as soon as the database answers, and that session reconnects with a fresh ID. A session that registered while its broker was still connecting to the shared database is checked the same way once that connection is made. Brokers of earlier versions, and a PostgreSQL runtime role without permission to change tables until `atomic storage migrate` is run as the owner role, behave as before.
|
|
51
|
+
- Quitting a session while it is still starting its Intercom broker no longer leaves that broker running for good when the quit takes longer than its 5 s shutdown bound, as it can on a loaded Windows machine. The broker start now stops as soon as the quit begins, instead of when Intercom's own shutdown step runs.
|
|
52
|
+
- A session answering a sender outside its groups can no longer send a fourth answer after that sender's latest message when it answered just as that message reached it: an answer that reaches Intercom once a newer message was handed to the session counts toward the newer message's 3, also with multi-node routing. An answer to the older message that crosses the newer one on its way counts toward it too.
|
|
53
|
+
- With multi-node routing, a session answering a sender outside its groups can no longer send a fourth answer after that sender's latest message when the shared database failed to record that message as delivered and it was handed to the session again. Answers the session sent since the message first reached it now count toward that message's 3 ([#6300](https://github.com/bastani-inc/atomic/pull/6300)).
|
|
54
|
+
- On Windows, an Intercom broker no longer waits for good to start when an earlier broker stopped while it was starting and Windows gave that broker's process ID to another process. Brokers now record when their process was created next to its ID, so a later process with the same ID is not taken for the earlier broker. A broker of an earlier version still goes by the process ID alone ([#6312](https://github.com/bastani-inc/atomic/pull/6312)).
|
|
55
|
+
- With multi-node routing, a session that took back its own Intercom ID without the hand-over its broker gave it for the move (for example, after Atomic restarted during the move) is now told at once that its answer to an ask sent to its earlier ID cannot be delivered. It was told to try again shortly for as long as 10 minutes after any broker went down, although no retry could succeed. The refusal is the final one (`Pending question route does not authorize this public reply`), so the ask also leaves `pending` ([#6316](https://github.com/bastani-inc/atomic/pull/6316)).
|
|
56
|
+
- The Intercom broker drops the reply routes it keeps for a released subagent's unanswered asks once the session that launched the subagent has been gone for a week, as it drops the asks it keeps for any session that has been away that long. Before, a broker kept them for as long as it ran, and enough of them made later released subagents' asks fail at once with "the Intercom broker's released-subagent reply routes are full" ([#6337](https://github.com/bastani-inc/atomic/pull/6337)).
|
|
57
|
+
- An Intercom broker no longer creates its directory again after the agent directory was deleted while it still ran, as when a session was killed and its agent directory removed at once. It recreated the directory when a session registered, when it opened its store of messages for subagents that ended, or, with multi-node routing on macOS and Windows, when it saved an id for this machine, and then took its socket lock there as it shut down. It now keeps what it would have written in memory, and writes nothing into a directory created after it by a later broker ([#6376](https://github.com/bastani-inc/atomic/pull/6376)).
|
|
58
|
+
- With multi-node routing, a session that its broker moved back to its earlier Intercom ID keeps the ID it had meanwhile as a second ID when that broker restarts before the session registers again, as it does without the restart. Before, the restart lost that ID. The broker now keeps these moves, for up to about 7 days, with the asks it keeps for away sessions ([#6379](https://github.com/bastani-inc/atomic/pull/6379)).
|
|
59
|
+
- Before the builtin Intercom extension loads on first use, its `intercom` and `contact_supervisor` tools and shortcut metadata now match the loaded extension, including the `delivery` parameter, the `groups` action and the full `contact_supervisor` schema ([#6389](https://github.com/bastani-inc/atomic/pull/6389)).
|
|
60
|
+
- With multi-node routing, a session whose Intercom broker stopped (for example, it crashed) now gets its Intercom ID back on another broker of the same machine when the shared database answers slowly. Taking the ID from the stopped broker takes four database round trips, and the claim gave up after 2.5 s, so with round trips of about 0.7 s or more the session came back under a fresh ID. The claim now gets up to 2.5 s more while it is taking the ID from a broker that has stopped, and the registration's later wait for the database is shortened by the same time, so the session's connection attempt is not kept waiting any longer ([#6369](https://github.com/bastani-inc/atomic/pull/6369)).
|
|
61
|
+
- On macOS, an Intercom broker's spawn and socket locks now record their holder's start beside its process ID, as on Windows and Linux, so a lock whose holder exited while macOS gave its ID to another process is taken over at once rather than when it ages out. A broker found stopped is now checked by that start, read without starting `ps`. A lock written by an earlier version still goes by the process ID alone ([#6394](https://github.com/bastani-inc/atomic/pull/6394), [#6406](https://github.com/bastani-inc/atomic/pull/6406)).
|
|
62
|
+
- Database duplicate-column detection and departed-child delivery-failure messages no longer slow down on long error strings with repeated `column ` phrases or leading whitespace, returning the same results in one linear pass ([#6397](https://github.com/bastani-inc/atomic/pull/6397)).
|
|
63
|
+
- The Intercom broker now checks Unix socket ownership with exact 64-bit device and inode IDs instead of rounded numbers, preventing a displaced broker on a 64-bit-inode filesystem from mistaking a newer broker's socket for its own or removing it on shutdown ([#6424](https://github.com/bastani-inc/atomic/pull/6424)).
|
|
64
|
+
- Right after an Intercom broker restarts, a message sent to a resumed subagent can no longer overtake messages still queued for that subagent from before the restart, including while the restarted broker is identifying which subagents have queued messages or when the send addresses the subagent by its new session ID ([#6420](https://github.com/bastani-inc/atomic/pull/6420)).
|
|
65
|
+
|
|
7
66
|
## [0.10.4-alpha.2] - 2026-11-22
|
|
8
67
|
|
|
9
68
|
### Changed
|
|
@@ -399,7 +399,6 @@ Runtime files live in `~/.atomic/agent/intercom/`. Setting `ATOMIC_CODING_AGENT_
|
|
|
399
399
|
- `broker.starting` records a starting broker's PID until it begins listening.
|
|
400
400
|
- `broker.spawn.lock` coordinates concurrent broker spawns with a 60-second backstop.
|
|
401
401
|
- `broker.sock.replace.lock` serializes stale socket replacement during broker startup.
|
|
402
|
-
- `broker-launch.vbs` launches the broker without a console window on Windows.
|
|
403
402
|
- `broker.log` captures broker stderr, capped internally at 8 KiB by `broker/bounded-stderr-install.ts`.
|
|
404
403
|
- `broker.log.previous` keeps the bounded tail of the previous nonempty broker log.
|
|
405
404
|
- `broker-watchdog.log` records the latest watchdog termination.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { execFile } from "node:child_process";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
|
-
import { mkdirSync, readFileSync, readlinkSync,
|
|
4
|
-
import { tmpdir } from "node:os";
|
|
3
|
+
import { mkdirSync, readFileSync, readlinkSync, writeFileSync } from "node:fs";
|
|
5
4
|
import { dirname, join, win32 } from "node:path";
|
|
6
5
|
import { hostCommandEnvironment } from "./host-command-environment.js";
|
|
7
6
|
import { getIntercomDirPath } from "./paths.js";
|
|
7
|
+
import { resolveSafeWindowsWorkingDirectoryAsync } from "./windows-cwd.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* A machine-id or boot command that does not answer by then leaves the host without that fact. PowerShell can take
|
|
@@ -83,58 +83,13 @@ function hostCommandPath(command: string): string {
|
|
|
83
83
|
return process.platform === "darwin" ? `/usr/sbin/${command}` : command;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
function isAbsoluteWindowsPath(value: string): boolean {
|
|
87
|
-
if (value === "" || value.includes("\0") || !win32.isAbsolute(value)) return false;
|
|
88
|
-
// Reject drive-relative rooted paths like `\Windows` whose root is a single separator.
|
|
89
|
-
return win32.parse(value).root.length > 1;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function isExistingAbsoluteWindowsDirectory(dir: string | undefined): dir is string {
|
|
93
|
-
if (dir === undefined || !isAbsoluteWindowsPath(dir)) return false;
|
|
94
|
-
try {
|
|
95
|
-
return statSync(dir).isDirectory();
|
|
96
|
-
} catch {
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function isInsideWindowsDirectory(folder: string, candidate: string): boolean {
|
|
102
|
-
if (!isAbsoluteWindowsPath(folder) || !isAbsoluteWindowsPath(candidate)) return false;
|
|
103
|
-
const rel = win32.relative(win32.resolve(folder).toLowerCase(), win32.resolve(candidate).toLowerCase());
|
|
104
|
-
return rel !== ".." && !rel.startsWith("..\\") && !win32.isAbsolute(rel);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
86
|
/**
|
|
108
87
|
* A safe working directory for a Windows host command so it never keeps the folder Atomic runs in in use, and never
|
|
109
|
-
* fails an explicit-path command when `SystemRoot` is missing, relative, or not a
|
|
88
|
+
* fails an explicit-path command when `SystemRoot` is missing, relative, a junction into the project, or not a
|
|
89
|
+
* directory. Uses a bounded async check so a slow or offline UNC working directory cannot stall host commands.
|
|
110
90
|
*/
|
|
111
|
-
function hostCommandWorkingDirectory(commandPath: string): string | undefined {
|
|
112
|
-
|
|
113
|
-
const commandDir = isAbsoluteWindowsPath(commandPath) ? win32.dirname(commandPath) : undefined;
|
|
114
|
-
const commandRoot = isAbsoluteWindowsPath(commandPath) ? win32.parse(commandPath).root : undefined;
|
|
115
|
-
const tempRoot = isAbsoluteWindowsPath(tempDir) ? win32.parse(tempDir).root : undefined;
|
|
116
|
-
const candidates = [
|
|
117
|
-
process.env.SystemRoot,
|
|
118
|
-
process.env.windir,
|
|
119
|
-
"C:\\Windows",
|
|
120
|
-
tempDir,
|
|
121
|
-
commandDir,
|
|
122
|
-
commandRoot,
|
|
123
|
-
tempRoot,
|
|
124
|
-
];
|
|
125
|
-
let currentCwd: string | undefined;
|
|
126
|
-
try {
|
|
127
|
-
currentCwd = process.cwd();
|
|
128
|
-
} catch {
|
|
129
|
-
currentCwd = undefined;
|
|
130
|
-
}
|
|
131
|
-
let fallback: string | undefined;
|
|
132
|
-
for (const candidate of candidates) {
|
|
133
|
-
if (!isExistingAbsoluteWindowsDirectory(candidate)) continue;
|
|
134
|
-
if (currentCwd === undefined || !isInsideWindowsDirectory(currentCwd, candidate)) return candidate;
|
|
135
|
-
fallback ??= candidate;
|
|
136
|
-
}
|
|
137
|
-
return fallback;
|
|
91
|
+
function hostCommandWorkingDirectory(commandPath: string): Promise<string | undefined> {
|
|
92
|
+
return resolveSafeWindowsWorkingDirectoryAsync({ commandPath, timeoutMs: 150 });
|
|
138
93
|
}
|
|
139
94
|
|
|
140
95
|
/**
|
|
@@ -148,11 +103,11 @@ export const systemSources = (
|
|
|
148
103
|
platform: process.platform,
|
|
149
104
|
readFile: (path) => readFileSync(path, "utf8"),
|
|
150
105
|
readLink: (path) => readlinkSync(path),
|
|
151
|
-
run: (command, args) =>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
106
|
+
run: async (command, args) => {
|
|
107
|
+
const file = hostCommandPath(command);
|
|
108
|
+
// On Windows, run outside the project folder so a host command never keeps the folder Atomic runs in in use.
|
|
109
|
+
const cwd = process.platform === "win32" ? await hostCommandWorkingDirectory(file) : undefined;
|
|
110
|
+
return await new Promise<string>((resolve, reject) => {
|
|
156
111
|
const child = execFile(
|
|
157
112
|
file,
|
|
158
113
|
[...args],
|
|
@@ -166,7 +121,8 @@ export const systemSources = (
|
|
|
166
121
|
(error, stdout) => (error ? reject(error) : resolve(stdout)),
|
|
167
122
|
);
|
|
168
123
|
child.stdin?.end();
|
|
169
|
-
})
|
|
124
|
+
});
|
|
125
|
+
},
|
|
170
126
|
writeNewPrivateFile: (path, content) => {
|
|
171
127
|
if (directoryHeld === undefined) mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
|
|
172
128
|
else if (!directoryHeld()) throw new Error(`${dirname(path)} was removed`);
|
|
@@ -6,6 +6,7 @@ import { setTimeout as delay } from "node:timers/promises";
|
|
|
6
6
|
import * as atomicHost from "@bastani/atomic";
|
|
7
7
|
import { hostCommandEnvironment } from "./host-command-environment.js";
|
|
8
8
|
import { processCreationTimeOf, recognisedProcessStart } from "./start-announcement.js";
|
|
9
|
+
import { resolveSafeWindowsWorkingDirectoryAsync } from "./windows-cwd.js";
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* A broker process found by its pid, told apart from a later process the OS gives the same pid (#6133). Windows gives
|
|
@@ -320,17 +321,36 @@ export async function stopWindowsProcess(
|
|
|
320
321
|
if ((await readProcessCreationTime(pid)) !== started) return;
|
|
321
322
|
if (performance.now() - entered >= WINDOWS_STOP_START_MS) return;
|
|
322
323
|
const systemRoot = process.env.SystemRoot || process.env.windir || "C:\\Windows";
|
|
324
|
+
const powershellPath = join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
325
|
+
const cwdBudgetMs = Math.min(150, Math.max(0, Math.floor(WINDOWS_STOP_START_MS - (performance.now() - entered))));
|
|
326
|
+
const cwd = await resolveSafeWindowsWorkingDirectoryAsync({
|
|
327
|
+
commandPath: powershellPath,
|
|
328
|
+
preferCommandDir: true,
|
|
329
|
+
timeoutMs: cwdBudgetMs,
|
|
330
|
+
});
|
|
331
|
+
if (performance.now() - entered >= WINDOWS_STOP_START_MS) return;
|
|
323
332
|
await new Promise<void>((resolve) => {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
333
|
+
let powershell: ReturnType<typeof spawn>;
|
|
334
|
+
try {
|
|
335
|
+
powershell = spawn(
|
|
336
|
+
powershellPath,
|
|
337
|
+
[
|
|
338
|
+
"-NoProfile",
|
|
339
|
+
"-NonInteractive",
|
|
340
|
+
"-EncodedCommand",
|
|
341
|
+
Buffer.from(stopWindowsProcessScript(pid, started, waitMs, descendants), "utf16le").toString("base64"),
|
|
342
|
+
],
|
|
343
|
+
{
|
|
344
|
+
...(cwd === undefined ? {} : { cwd }),
|
|
345
|
+
env: hostCommandEnvironment(),
|
|
346
|
+
stdio: "ignore",
|
|
347
|
+
windowsHide: true,
|
|
348
|
+
},
|
|
349
|
+
);
|
|
350
|
+
} catch {
|
|
351
|
+
resolve();
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
334
354
|
powershell.unref();
|
|
335
355
|
const done = () => {
|
|
336
356
|
clearTimeout(timer);
|
|
@@ -7,6 +7,7 @@ import { isBrokerStatusReport } from "./broker-status.js";
|
|
|
7
7
|
import { BROKER_CONTROL_TIMEOUT_MS, controlRequest } from "./control-request.js";
|
|
8
8
|
import { getBrokerSocketPathAsync } from "./paths.js";
|
|
9
9
|
import { type BrokerProtocolRange, protocolRangeOf } from "./protocol-version.js";
|
|
10
|
+
import { isUnansweredCloseFromRetiringBroker, snapshotBrokerPidBeforeRequest } from "./retiring-broker-check.js";
|
|
10
11
|
|
|
11
12
|
export interface BrokerRouting {
|
|
12
13
|
readonly acrossMachines: boolean;
|
|
@@ -17,8 +18,12 @@ export interface BrokerRouting {
|
|
|
17
18
|
|
|
18
19
|
export async function queryBrokerRouting(agentDir: string): Promise<BrokerRouting> {
|
|
19
20
|
const startedAt = Date.now();
|
|
21
|
+
const [socketPath, pidBefore] = await Promise.all([
|
|
22
|
+
getBrokerSocketPathAsync(process.platform, agentDir),
|
|
23
|
+
snapshotBrokerPidBeforeRequest(agentDir),
|
|
24
|
+
]);
|
|
20
25
|
const answer = await controlRequest(
|
|
21
|
-
|
|
26
|
+
socketPath,
|
|
22
27
|
"broker_status",
|
|
23
28
|
"broker_status",
|
|
24
29
|
BROKER_CONTROL_TIMEOUT_MS,
|
|
@@ -32,7 +37,12 @@ export async function queryBrokerRouting(agentDir: string): Promise<BrokerRoutin
|
|
|
32
37
|
});
|
|
33
38
|
}
|
|
34
39
|
const reply = answer.reply;
|
|
35
|
-
if (reply === undefined)
|
|
40
|
+
if (reply === undefined) {
|
|
41
|
+
if (await isUnansweredCloseFromRetiringBroker(socketPath, agentDir, pidBefore)) {
|
|
42
|
+
throw new IntercomBrokerRetiringError();
|
|
43
|
+
}
|
|
44
|
+
throw new IntercomRoutingUnavailableError("unsupported", "broker_status");
|
|
45
|
+
}
|
|
36
46
|
if (typeof reply !== "object" || reply === null || Array.isArray(reply) || !isBrokerStatusReport(reply.report)) {
|
|
37
47
|
throw new IntercomRoutingUnavailableError("malformed", "broker_status");
|
|
38
48
|
}
|