@bastani/atomic 0.10.4 → 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 +44 -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} +519 -316
- 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 +21 -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 +6 -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/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 +30 -1096
- package/dist/cli/auth-cli.impl.js.map +1 -1
- package/dist/cli/auth-cli.js +11 -7
- 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 +30 -900
- package/dist/cli/blueprint-command.impl.js.map +1 -1
- package/dist/cli/blueprint-command.js +11 -7
- 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 +33 -105
- package/dist/cli/intercom-command.impl.js.map +1 -1
- package/dist/cli/intercom-command.js +11 -7
- 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 +33 -57
- package/dist/cli/list-models.impl.js.map +1 -1
- package/dist/cli/list-models.js +11 -7
- 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 +33 -52
- package/dist/cli/session-picker.impl.js.map +1 -1
- package/dist/cli/session-picker.js +11 -7
- 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 +35 -4
- package/dist/cli/startup-ui.js +11 -7
- 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 +35 -2
- package/dist/cli/storage-command.js +11 -7
- 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 +33 -186
- package/dist/cli/storage-search-session.impl.js.map +1 -1
- package/dist/cli/storage-search-session.js +11 -7
- 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 +32 -213
- package/dist/cli/team-command.impl.js.map +1 -1
- package/dist/cli/team-command.js +11 -7
- 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 +35 -2
- package/dist/core/debug.js +11 -7
- 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 +34 -255
- package/dist/core/export-html/card-projection.impl.js.map +1 -1
- package/dist/core/export-html/card-projection.js +11 -7
- 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 +30 -604
- package/dist/core/export-html/index.impl.js.map +1 -1
- package/dist/core/export-html/index.js +11 -7
- 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 +35 -2
- package/dist/core/export-html/json-spans.js +11 -7
- 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 +31 -120
- package/dist/core/export-html/oversized-render-inputs.impl.js.map +1 -1
- package/dist/core/export-html/oversized-render-inputs.js +11 -7
- 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 +33 -347
- package/dist/core/export-html/tool-renderer.impl.js.map +1 -1
- package/dist/core/export-html/tool-renderer.js +11 -7
- 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 +35 -2
- package/dist/core/extensions/jiti-loader.js +11 -7
- 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 +35 -2
- package/dist/core/extensions/jiti-static-loader.js +11 -7
- 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 +35 -2
- package/dist/core/extensions/loader-host-modules.js +11 -7
- 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 +35 -4
- package/dist/core/intercom-broker-control-host.js +11 -7
- 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 +35 -17
- package/dist/core/intercom-broker-control.impl.js.map +1 -1
- package/dist/core/intercom-broker-control.js +11 -7
- 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 +35 -2
- package/dist/core/package-manager-storage-adapters.js +11 -7
- 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 +35 -8
- package/dist/core/sdk.js +11 -7
- 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 +35 -2
- package/dist/core/session-manager-list.js +11 -7
- 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 +35 -7
- package/dist/core/session-manager.js +11 -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 +35 -2
- package/dist/core/session-storage.js +11 -7
- 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 +33 -34
- package/dist/core/storage/offline-snapshot-file.impl.js.map +1 -1
- package/dist/core/storage/offline-snapshot-file.js +11 -7
- 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 +32 -97
- package/dist/core/storage/session/branch-fork-source.impl.js.map +1 -1
- package/dist/core/storage/session/branch-fork-source.js +11 -7
- 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 +34 -58
- package/dist/core/storage/session/card-view.impl.js.map +1 -1
- package/dist/core/storage/session/card-view.js +11 -7
- 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 +33 -91
- package/dist/core/storage/session/child-reader.impl.js.map +1 -1
- package/dist/core/storage/session/child-reader.js +11 -7
- 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 +35 -2
- package/dist/core/storage/session/chunked-resume-projection.js +11 -7
- 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 +31 -634
- package/dist/core/storage/session/expanded-child-details.impl.js.map +1 -1
- package/dist/core/storage/session/expanded-child-details.js +11 -7
- 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 +35 -2
- package/dist/core/storage/session/fork-row-bytes.js +11 -7
- 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 +35 -2
- package/dist/core/storage/session/fork-row-index.js +11 -7
- 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 +30 -574
- package/dist/core/storage/session/fork-staging.impl.js.map +1 -1
- package/dist/core/storage/session/fork-staging.js +11 -7
- 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 +30 -471
- package/dist/core/storage/session/fork-window.impl.js.map +1 -1
- package/dist/core/storage/session/fork-window.js +11 -7
- 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 +35 -2
- package/dist/core/storage/session/history-pages.js +11 -7
- 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 +35 -2
- package/dist/core/storage/session/jsonl-entry-projection.js +11 -7
- 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 +35 -2
- package/dist/core/storage/session/jsonl-session-store.js +11 -7
- 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 +35 -2
- package/dist/core/storage/session/memory-session-store.js +11 -7
- 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 +33 -69
- package/dist/core/storage/session/pinned-branch-resume.impl.js.map +1 -1
- package/dist/core/storage/session/pinned-branch-resume.js +11 -7
- 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 +32 -461
- package/dist/core/storage/session/released-history-files.impl.js.map +1 -1
- package/dist/core/storage/session/released-history-files.js +11 -7
- 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 +32 -53
- package/dist/core/storage/session/resident-fork-rows.impl.js.map +1 -1
- package/dist/core/storage/session/resident-fork-rows.js +11 -7
- 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 +35 -2
- package/dist/core/storage/session/session-resume.js +11 -7
- 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 +35 -2
- package/dist/core/storage/session/snapshot-cut.js +11 -7
- 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 +34 -60
- package/dist/core/storage/session/snapshot-history.impl.js.map +1 -1
- package/dist/core/storage/session/snapshot-history.js +11 -7
- 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 +35 -2
- package/dist/core/storage/session/sql-session-store.js +11 -7
- 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 +35 -2
- package/dist/core/storage/session/tree-outline.js +11 -7
- 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 +31 -337
- package/dist/core/storage/session/tree-presentation.impl.js.map +1 -1
- package/dist/core/storage/session/tree-presentation.js +11 -7
- 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 +35 -2
- package/dist/core/storage/storage-status.js +11 -7
- 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 +35 -2
- package/dist/core/storage/team.js +11 -7
- 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 +35 -2
- package/dist/core/structured-output/index.js +11 -7
- 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 +33 -251
- package/dist/core/tasks/task-completion-entry.impl.js.map +1 -1
- package/dist/core/tasks/task-completion-entry.js +11 -7
- 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 +32 -375
- package/dist/core/tasks/task-file-history.impl.js.map +1 -1
- package/dist/core/tasks/task-file-history.js +11 -7
- package/dist/core/tasks/{task-reference-archive.impl.js → task-reference-archive.code.js} +51 -6
- package/dist/core/tasks/{task-reference-archive.impl.js.map → task-reference-archive.code.js.map} +1 -1
- package/dist/core/tasks/task-reference-archive.js +11 -7
- package/dist/core/tasks/{task-reference-identity.impl.js → task-reference-identity.code.js} +1 -1
- package/dist/core/tasks/{task-reference-identity.impl.js.map → task-reference-identity.code.js.map} +1 -1
- package/dist/core/tasks/task-reference-identity.js +11 -7
- 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 +35 -2
- package/dist/core/tasks/task-reference-stream.js +11 -7
- 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 +35 -2
- package/dist/core/tasks/task-unsaved-answer.js +11 -7
- 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 +35 -2
- package/dist/core/tasks/task-view-source.js +12 -8
- 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 +30 -1524
- package/dist/core/tools/read-url.impl.js.map +1 -1
- package/dist/core/tools/read-url.js +11 -7
- 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 +35 -5
- package/dist/core/worktree-snapshot/errors.js +11 -7
- 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 +34 -134
- package/dist/core/worktree-snapshot/session-index-reset.impl.js.map +1 -1
- package/dist/core/worktree-snapshot/session-index-reset.js +11 -7
- 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 +30 -612
- package/dist/extensions/codemode/execute.impl.js.map +1 -1
- package/dist/extensions/codemode/execute.js +11 -7
- 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 +33 -107
- package/dist/extensions/codemode/renderer.impl.js.map +1 -1
- package/dist/extensions/codemode/renderer.js +11 -7
- 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 +32 -561
- package/dist/extensions/mcp/cli.impl.js.map +1 -1
- package/dist/extensions/mcp/cli.js +11 -7
- 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 -7
- package/dist/extensions/mcp/cli.lazy.impl.js.map +1 -1
- package/dist/extensions/mcp/cli.lazy.js +11 -7
- 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 +35 -4
- package/dist/extensions/mcp/runtime.js +11 -7
- 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 +35 -11
- package/dist/main-first-time-setup.impl.js.map +1 -1
- package/dist/main-first-time-setup.js +11 -7
- 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 +33 -290
- package/dist/modes/interactive/components/stored-tree-view.impl.js.map +1 -1
- package/dist/modes/interactive/components/stored-tree-view.js +11 -7
- 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 +34 -189
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector-archive.js +11 -7
- package/dist/modes/interactive/interactive-mode-base.d.ts +6 -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 -1067
- package/dist/package-manager-cli.impl.js.map +1 -1
- package/dist/package-manager-cli.js +11 -7
- 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 +33 -105
- package/dist/utils/startup-database-spare.impl.js.map +1 -1
- package/dist/utils/startup-database-spare.js +11 -7
- 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 +35 -2
- package/dist/utils/tools-manager.js +11 -7
- 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 +1 -1
- 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,189 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
async function openSearchDatabase(filename) {
|
|
21
|
-
const path = await realpath(filename);
|
|
22
|
-
if (/^[/\\]{2}/.test(path)) throw new Error("An existing local SQLite session file is required.");
|
|
23
|
-
const worker = await SqliteSelectorConnection.open(":memory:", { readonly: true });
|
|
24
|
-
async function attach() {
|
|
25
|
-
const before = await stat(path, { bigint: true });
|
|
26
|
-
if (!before.isFile()) throw new Error(`Not a local SQLite file: ${path}`);
|
|
27
|
-
const [live, journal] = await Promise.all([existingFile(`${path}-wal`), existingFile(`${path}-journal`)]);
|
|
28
|
-
if (journal || live && (before.size < 100n || !await existingFile(`${path}-shm`))) throw new Error("Cannot read this SQLite database without recovery. Close its writer cleanly, then retry.");
|
|
29
|
-
const uri = pathToFileURL(path);
|
|
30
|
-
uri.search = live ? "mode=ro&readonly_shm=1" : "mode=ro&immutable=1";
|
|
31
|
-
try {
|
|
32
|
-
await worker.run("ATTACH DATABASE ? AS transcript", [uri.href]);
|
|
33
|
-
} catch (error) {
|
|
34
|
-
if (live) throw new Error("Cannot read the existing SQLite WAL and shared-memory index. The writer may have just closed; retry against a cleanly closed database.", { cause: error });
|
|
35
|
-
throw error;
|
|
36
|
-
}
|
|
37
|
-
return {
|
|
38
|
-
live,
|
|
39
|
-
before
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
try {
|
|
43
|
-
await worker.run("PRAGMA temp_store=MEMORY");
|
|
44
|
-
await worker.run("PRAGMA query_only=ON");
|
|
45
|
-
await worker.run("PRAGMA trusted_schema=OFF");
|
|
46
|
-
let source = await attach();
|
|
47
|
-
const readOnly = () => {
|
|
48
|
-
throw new Error("The transcript search connection is read-only.");
|
|
49
|
-
};
|
|
50
|
-
return {
|
|
51
|
-
readOnly: true,
|
|
52
|
-
descriptor: {
|
|
53
|
-
adapter: "node-sqlite",
|
|
54
|
-
location: path
|
|
55
|
-
},
|
|
56
|
-
async get(sql, ...params) {
|
|
57
|
-
return (await worker.storageRows(sql, params))[0];
|
|
58
|
-
},
|
|
59
|
-
all(sql, ...params) {
|
|
60
|
-
return worker.storageRows(sql, params);
|
|
61
|
-
},
|
|
62
|
-
exec: readOnly,
|
|
63
|
-
run: readOnly,
|
|
64
|
-
transaction: readOnly,
|
|
65
|
-
/** Never publish a page read through an immutable handle if the file changed or a writer started. */
|
|
66
|
-
async refresh() {
|
|
67
|
-
if (source.live) return false;
|
|
68
|
-
const now = await stat(path, { bigint: true });
|
|
69
|
-
const { before } = source;
|
|
70
|
-
if (now.dev === before.dev && now.ino === before.ino && now.size === before.size && now.mtimeNs === before.mtimeNs && now.ctimeNs === before.ctimeNs && !await existingFile(`${path}-wal`) && !await existingFile(`${path}-journal`)) return false;
|
|
71
|
-
await worker.run("DETACH DATABASE transcript");
|
|
72
|
-
source = await attach();
|
|
73
|
-
return true;
|
|
74
|
-
},
|
|
75
|
-
close: () => worker.close()
|
|
76
|
-
};
|
|
77
|
-
} catch (error) {
|
|
78
|
-
await worker.close();
|
|
79
|
-
throw error;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
// dist/cli/storage-search-session.js
|
|
83
|
-
function parseCursor(text) {
|
|
84
|
-
const parts = /^([1-9]\d{0,15})(?:\.(0|[1-9]\d{0,15})(?:\.([1-9]\d{0,15}))?)?$/.exec(text);
|
|
85
|
-
if (!parts || parts[2] === "0" && !parts[3]) return void 0;
|
|
86
|
-
const cursor = [
|
|
87
|
-
Number(parts[1]),
|
|
88
|
-
Number(parts[2] ?? 0),
|
|
89
|
-
Number(parts[3] ?? 0)
|
|
90
|
-
];
|
|
91
|
-
return cursor.every(Number.isSafeInteger) ? cursor : void 0;
|
|
92
|
-
}
|
|
93
|
-
function advances([seq, match, line], [nextSeq, nextMatch, nextLine]) {
|
|
94
|
-
return nextSeq > seq || nextSeq === seq && (nextLine > line || nextLine === line && nextMatch > match);
|
|
95
|
-
}
|
|
96
|
-
/** Only the built-in provider's leading entry-zero budget note can offer another page. The source never comes from output. */
|
|
97
|
-
function budgetCursor(note, base) {
|
|
98
|
-
const prefix = `${base}:0: [searched entries `;
|
|
99
|
-
const link = `; continue with ${base}?cursor=`;
|
|
100
|
-
const end = note.indexOf(link, prefix.length);
|
|
101
|
-
if (!note.startsWith(prefix) || !note.endsWith("]") || end < 0) return void 0;
|
|
102
|
-
if (!/^\d+-\d+(?: of \d+)?; the (?:byte|row|time) budget ran out(?:; entry \d+ not searched(?:: the pattern ran past the time budget on it)?)?$/.test(note.slice(prefix.length, end))) return void 0;
|
|
103
|
-
return note.slice(end + link.length, -1);
|
|
104
|
-
}
|
|
105
|
-
/** Unlike Bun's global console, a Console bound to the stream reports pipe errors through that stream. */
|
|
106
|
-
async function printPage(output, text) {
|
|
107
|
-
const stdout = process.stdout;
|
|
108
|
-
let failure;
|
|
109
|
-
const onError = (error) => {
|
|
110
|
-
failure = error;
|
|
111
|
-
};
|
|
112
|
-
stdout.on("error", onError);
|
|
113
|
-
try {
|
|
114
|
-
output.log(text);
|
|
115
|
-
await new Promise((resolve, reject) => stdout.write("", (error) => error ? reject(error) : resolve()));
|
|
116
|
-
if (failure) throw failure;
|
|
117
|
-
return true;
|
|
118
|
-
} catch (error) {
|
|
119
|
-
if ((failure ?? error)?.code === "EPIPE") {
|
|
120
|
-
stdout.end();
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
throw error;
|
|
124
|
-
} finally {
|
|
125
|
-
stdout.off("error", onError);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
async function searchStoredSession({ file, sessionId, pattern, cursor }, cwd, log) {
|
|
129
|
-
if (!sessionId || /[^A-Za-z0-9_-]/.test(sessionId)) throw new Error("Use a single session ID containing only letters, digits, hyphens or underscores; use ordinary search for other selectors.");
|
|
130
|
-
let position = parseCursor(cursor ?? "1");
|
|
131
|
-
if (!position) throw new Error("Use the numeric entry cursor from the printed session URL, not a listing cursor or a range.");
|
|
132
|
-
const path = resolve(cwd, file);
|
|
133
|
-
if (file === ":memory:" || /^(?:[a-z][a-z\d+.-]*:\/\/|file:|[/\\]{2})/i.test(file) || /^[/\\]{2}/.test(path)) throw new Error("An existing local SQLite session file is required; no configured store is substituted.");
|
|
134
|
-
const output = log ? void 0 : new console.Console({
|
|
135
|
-
stdout: process.stdout,
|
|
136
|
-
ignoreErrors: false
|
|
137
|
-
});
|
|
138
|
-
const db = await openSearchDatabase(path);
|
|
139
|
-
try {
|
|
140
|
-
const store = await SqlSessionStore.openTranscriptReader(db);
|
|
141
|
-
try {
|
|
142
|
-
const table = renderStorageIdentifiers("sessions", SESSION_TABLES).sessions;
|
|
143
|
-
const revision = async () => (await db.get(`SELECT revision FROM ${table} WHERE id = ?`, sessionId))?.revision;
|
|
144
|
-
const initial = await revision();
|
|
145
|
-
if (initial === void 0) throw new Error(`Session not found in the named database: ${sessionId}`);
|
|
146
|
-
const history = createHistoryRouter({
|
|
147
|
-
cwd,
|
|
148
|
-
sessionStore: () => store
|
|
149
|
-
});
|
|
150
|
-
const search = createSearchToolDefinition(cwd);
|
|
151
|
-
const base = `history://sessions/${sessionId}`;
|
|
152
|
-
for (;;) {
|
|
153
|
-
let note = "";
|
|
154
|
-
const url = cursor === void 0 ? base : `${base}?cursor=${cursor}`;
|
|
155
|
-
const page = await search.execute("storage-search", {
|
|
156
|
-
pattern,
|
|
157
|
-
paths: url
|
|
158
|
-
}, void 0, void 0, {
|
|
159
|
-
cwd,
|
|
160
|
-
internalResourceRouter: { async search(target, request) {
|
|
161
|
-
if (target !== url) throw new Error("Unexpected history search scope");
|
|
162
|
-
const raw = await history.search(target, request);
|
|
163
|
-
note = raw?.split("\n", 1)[0] ?? "";
|
|
164
|
-
return raw;
|
|
165
|
-
} }
|
|
166
|
-
});
|
|
167
|
-
const reopened = await db.refresh();
|
|
168
|
-
if (await revision() !== initial) throw new Error("The session changed during the search; rerun it or follow the last printed cursor manually.");
|
|
169
|
-
if (reopened) continue;
|
|
170
|
-
const text = page.content[0];
|
|
171
|
-
if (text?.type !== "text") throw new Error("Expected a text page from history search");
|
|
172
|
-
if (log) await log(text.text);
|
|
173
|
-
else if (!await printPage(output, text.text)) return;
|
|
174
|
-
if (typeof initial !== "string" || !initial || !note || !(text.text === note || text.text.startsWith(`${note}\n`))) return;
|
|
175
|
-
cursor = budgetCursor(note, base);
|
|
176
|
-
const next = cursor === void 0 ? void 0 : parseCursor(cursor);
|
|
177
|
-
if (!next || !advances(position, next)) return;
|
|
178
|
-
position = next;
|
|
1
|
+
// Written by the build (scripts/in-place-update-gate.mjs): when this module's code cannot load in a process of an earlier release
|
|
2
|
+
// that an in-place update left running, the process is told to restart.
|
|
3
|
+
let module;
|
|
4
|
+
try {
|
|
5
|
+
module = await import("./storage-search-session.code.js");
|
|
6
|
+
} catch (error) {
|
|
7
|
+
const root = new URL("../", import.meta.url);
|
|
8
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
+
const key = `${root.href}#0.10.5-alpha.1`;
|
|
10
|
+
let release = releases.get(key);
|
|
11
|
+
if (release === undefined) {
|
|
12
|
+
const current = (async () => {
|
|
13
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
14
|
+
try {
|
|
15
|
+
const held = await import(new URL(path, root).href);
|
|
16
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
17
|
+
} catch {
|
|
18
|
+
// Not a file this process can load: the next.
|
|
19
|
+
}
|
|
179
20
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
21
|
+
return undefined;
|
|
22
|
+
})().then((found) => {
|
|
23
|
+
if (found === undefined && releases.get(key) === current) releases.delete(key);
|
|
24
|
+
return found;
|
|
25
|
+
});
|
|
26
|
+
releases.set(key, current);
|
|
27
|
+
release = current;
|
|
185
28
|
}
|
|
29
|
+
const running = await release;
|
|
30
|
+
if (running === undefined || running.version === "0.10.5-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.5-alpha.1 while this session was running; restart it to keep using session storage.", {
|
|
32
|
+
cause: error,
|
|
33
|
+
});
|
|
186
34
|
}
|
|
187
|
-
export { searchStoredSession };
|
|
188
|
-
|
|
189
|
-
//# sourceMappingURL=storage-search-session.impl.js.map
|
|
35
|
+
export const { searchStoredSession } = module;
|
|
36
|
+
//# sourceMappingURL=storage-search-session.impl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-search-session.impl.js","
|
|
1
|
+
{"version":3,"file":"storage-search-session.impl.js","sources":[],"names":[],"mappings":""}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// that an in-place update left running, the process is told to restart.
|
|
3
3
|
let module;
|
|
4
4
|
try {
|
|
5
|
-
module = await import("./storage-search-session.
|
|
5
|
+
module = await import("./storage-search-session.code.js");
|
|
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.5-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
|
-
|
|
12
|
+
const current = (async () => {
|
|
13
13
|
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
14
14
|
try {
|
|
15
15
|
const held = await import(new URL(path, root).href);
|
|
@@ -19,12 +19,16 @@ try {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
return undefined;
|
|
22
|
-
})()
|
|
23
|
-
|
|
22
|
+
})().then((found) => {
|
|
23
|
+
if (found === undefined && releases.get(key) === current) releases.delete(key);
|
|
24
|
+
return found;
|
|
25
|
+
});
|
|
26
|
+
releases.set(key, current);
|
|
27
|
+
release = current;
|
|
24
28
|
}
|
|
25
29
|
const running = await release;
|
|
26
|
-
if (running === undefined || running.version === "0.10.
|
|
27
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.5-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.5-alpha.1 while this session was running; restart it to keep using session storage.", {
|
|
28
32
|
cause: error,
|
|
29
33
|
});
|
|
30
34
|
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
+
import { APP_NAME } from "../_shared/p0-cli-BB45ZQY6.js";
|
|
3
|
+
import { createGitEnvironment } from "../_shared/startup-0-0-TYUFUOJZ.js";
|
|
4
|
+
import { processStorageEnvironment } from "../_shared/startup-0-2-SZGQIWHI.js";
|
|
5
|
+
import { collectStorageStatus, describeStorageError as describeStorageError$1, joinTeamWith, leaveTeamWith, selectTeamProfile } from "../_shared/startup-8-1-SJW2GMAM.js";
|
|
6
|
+
import { failed, formatStorageStatus, loadBrokerControl } from "../_shared/storage-command-7MGXLJGZ.js";
|
|
7
|
+
import { StorageError, TeamProfileConfigError, isTeamProfileConfigError, isTeamProfileError } from "../core/storage/errors.js";
|
|
8
|
+
import { LIBSQL_ADAPTER_PACKAGE } from "../core/storage/selection.js";
|
|
9
|
+
// dist/cli/team-command.js
|
|
10
|
+
/**
|
|
11
|
+
* `atomic team join|status|leave`: the recommended team layout as one command, over the SDK's `joinTeam`,
|
|
12
|
+
* `selectTeamProfile` and `leaveTeam`. Intercom routing shares a team database; sessions stay local.
|
|
13
|
+
*/
|
|
14
|
+
const HELP = `Usage:
|
|
15
|
+
${APP_NAME} team join <url> [--token-file <path>] [--prefix <prefix>]
|
|
16
|
+
${APP_NAME} team status [--json]
|
|
17
|
+
${APP_NAME} team leave
|
|
18
|
+
|
|
19
|
+
Commands:
|
|
20
|
+
join Share Intercom routing with your team through a libSQL / Turso database while
|
|
21
|
+
sessions stay on this machine. Checks the token and the connection with
|
|
22
|
+
${LIBSQL_ADAPTER_PACKAGE}, stores the token in the agent directory (mode 600), sets the
|
|
23
|
+
global \`storage\` setting to the team database and \`sessions.storage\` to the local store in
|
|
24
|
+
one write, restarts the Intercom broker, and prints the storage status. While multi-node
|
|
25
|
+
routing is on, sessions join a project group (project:<owner>/<repo>) instead of "default".
|
|
26
|
+
Nothing is changed when a check fails.
|
|
27
|
+
status Show the profile in effect (individual, team, ci or custom) and the storage status. Exits 1
|
|
28
|
+
when a selection is invalid, an adapter cannot load, or a database does not answer.
|
|
29
|
+
leave Restore the individual layout: remove \`storage\` and \`sessions.storage\` when they hold what
|
|
30
|
+
\`team join\` wrote, delete that token file unless a setting still references it, and restart
|
|
31
|
+
the Intercom broker. Other settings are unchanged; running it again changes nothing.
|
|
32
|
+
|
|
33
|
+
Options:
|
|
34
|
+
--json Print the status as JSON
|
|
35
|
+
--token-file <path> File holding the database token, for example from \`turso db tokens create\`;
|
|
36
|
+
surrounding whitespace is removed. Required except for file: URLs
|
|
37
|
+
--prefix <prefix> Table prefix, to share one database between teams`;
|
|
38
|
+
const HELP_HINT = `Use "${APP_NAME} team --help" for usage.`;
|
|
39
|
+
const PROFILE_DESCRIPTIONS = {
|
|
40
|
+
individual: "sessions on this machine; Intercom on this machine only",
|
|
41
|
+
team: "sessions on this machine; Intercom on the team database",
|
|
42
|
+
ci: "sessions and Intercom on the team database",
|
|
43
|
+
custom: "matches no preset; see the selections below"
|
|
44
|
+
};
|
|
45
|
+
function usage(code, field, hint) {
|
|
46
|
+
return new TeamProfileConfigError(code, {
|
|
47
|
+
source: "cli",
|
|
48
|
+
field,
|
|
49
|
+
hint
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/** Parse the arguments after `team`. An option is named without any `=value` part, which could hold a secret. */
|
|
53
|
+
function parseTeamCommand(args) {
|
|
54
|
+
const [command, ...rest] = args;
|
|
55
|
+
if (command === void 0 || command === "help" || args.includes("--help") || args.includes("-h")) return { kind: "help" };
|
|
56
|
+
if (command !== "join" && command !== "status" && command !== "leave") throw usage("unknown-command", "<command>", `Use join, status or leave. ${HELP_HINT}`);
|
|
57
|
+
const positional = [];
|
|
58
|
+
const values = /* @__PURE__ */ new Map();
|
|
59
|
+
let json = false;
|
|
60
|
+
for (let index = 0; index < rest.length; index++) {
|
|
61
|
+
const arg = rest[index];
|
|
62
|
+
if (command === "status" && arg === "--json") {
|
|
63
|
+
json = true;
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (command === "join" && (arg === "--token-file" || arg === "--prefix")) {
|
|
67
|
+
const value = rest[++index];
|
|
68
|
+
if (value === void 0) throw usage("missing-value", arg, `Pass a value after ${arg}.`);
|
|
69
|
+
values.set(arg, value);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (arg.startsWith("-")) throw usage("unknown-option", arg.split("=")[0], `"${APP_NAME} team ${command}" does not take it. ${HELP_HINT}`);
|
|
73
|
+
positional.push(arg);
|
|
74
|
+
}
|
|
75
|
+
if (command === "join") {
|
|
76
|
+
if (positional.length === 0) throw usage("missing-url", "<url>", `Pass the team database URL: ${APP_NAME} team join <url> [--token-file <path>] [--prefix <prefix>]`);
|
|
77
|
+
if (positional.length > 1) throw usage("unexpected-argument", "arguments after <url>", `Pass one URL. ${HELP_HINT}`);
|
|
78
|
+
const tokenFile = values.get("--token-file");
|
|
79
|
+
const prefix = values.get("--prefix");
|
|
80
|
+
return {
|
|
81
|
+
kind: "join",
|
|
82
|
+
url: positional[0],
|
|
83
|
+
...tokenFile === void 0 ? {} : { tokenFile },
|
|
84
|
+
...prefix === void 0 ? {} : { prefix }
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (positional.length > 0) throw usage("unexpected-argument", `arguments after ${command}`, `"${APP_NAME} team ${command}" takes none. ${HELP_HINT}`);
|
|
88
|
+
return command === "status" ? {
|
|
89
|
+
kind: "status",
|
|
90
|
+
json
|
|
91
|
+
} : { kind: "leave" };
|
|
92
|
+
}
|
|
93
|
+
function describeRestart(restart, log, error) {
|
|
94
|
+
if (restart.status === "failed") {
|
|
95
|
+
error(restart.error.message);
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
if (restart.status === "not-running") log("No Intercom broker was running; the next session that uses Intercom starts one with these settings.");
|
|
99
|
+
else if (restart.status === "stopped") log(`Stopped the Intercom broker (pid ${restart.previous.pid}); the next session that uses Intercom starts one with these settings.`);
|
|
100
|
+
else {
|
|
101
|
+
const current = restart.current;
|
|
102
|
+
log(`Restarted the Intercom broker: pid ${restart.previous.pid} → ${current.state === "running" ? current.report.pid : current.pid ?? "unknown"}.`);
|
|
103
|
+
}
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
function projectGroupOf(control, options) {
|
|
107
|
+
if (control instanceof Error) return void 0;
|
|
108
|
+
return control.projectHomeGroup(options.cwd, options.agentDir, processStorageEnvironment(), createGitEnvironment());
|
|
109
|
+
}
|
|
110
|
+
async function report(options, json, log) {
|
|
111
|
+
let profile;
|
|
112
|
+
let profileError;
|
|
113
|
+
try {
|
|
114
|
+
profile = selectTeamProfile({
|
|
115
|
+
agentDir: options.agentDir,
|
|
116
|
+
cwd: options.cwd
|
|
117
|
+
});
|
|
118
|
+
} catch (caught) {
|
|
119
|
+
if (!(caught instanceof StorageError)) throw caught;
|
|
120
|
+
profileError = caught.message;
|
|
121
|
+
}
|
|
122
|
+
const control = await loadBrokerControl(options);
|
|
123
|
+
const collected = await collectStorageStatus({
|
|
124
|
+
cwd: options.cwd,
|
|
125
|
+
agentDir: options.agentDir,
|
|
126
|
+
probe: true,
|
|
127
|
+
...control instanceof Error ? {} : { control }
|
|
128
|
+
});
|
|
129
|
+
const status = control instanceof Error ? {
|
|
130
|
+
...collected,
|
|
131
|
+
broker: {
|
|
132
|
+
state: "unknown",
|
|
133
|
+
error: describeStorageError$1(control)
|
|
134
|
+
}
|
|
135
|
+
} : collected;
|
|
136
|
+
const projectGroup = projectGroupOf(control, options);
|
|
137
|
+
if (json) log(JSON.stringify({
|
|
138
|
+
profile: profile ?? null,
|
|
139
|
+
...profileError === void 0 ? {} : { profileError },
|
|
140
|
+
...projectGroup === void 0 ? {} : { projectGroup },
|
|
141
|
+
...status
|
|
142
|
+
}, null, 2));
|
|
143
|
+
else {
|
|
144
|
+
log(profile === void 0 ? `Profile: unknown (${profileError})` : `Profile: ${profile.profile} (${PROFILE_DESCRIPTIONS[profile.profile]})`);
|
|
145
|
+
if (projectGroup !== void 0) log(`Intercom group: sessions in ${options.cwd} join "${projectGroup}" unless ATOMIC_INTERCOM_GROUP or the Intercom config sets a group; sessions that are already running keep theirs until they restart.`);
|
|
146
|
+
log("");
|
|
147
|
+
for (const line of formatStorageStatus(status)) log(line);
|
|
148
|
+
}
|
|
149
|
+
return { failed: profile === void 0 || status.domains.some(failed) };
|
|
150
|
+
}
|
|
151
|
+
/** Run `atomic team <args>` and return the exit code. */
|
|
152
|
+
async function runTeamCommand(args, options) {
|
|
153
|
+
const log = options.log ?? ((line) => console.log(line));
|
|
154
|
+
const error = options.error ?? ((line) => console.error(line));
|
|
155
|
+
try {
|
|
156
|
+
const command = parseTeamCommand(args);
|
|
157
|
+
if (command.kind === "help") {
|
|
158
|
+
log(HELP);
|
|
159
|
+
return 0;
|
|
160
|
+
}
|
|
161
|
+
const context = options.loadControl === void 0 ? {} : { loadControl: options.loadControl };
|
|
162
|
+
if (command.kind === "status") return (await report(options, command.json, log)).failed ? 1 : 0;
|
|
163
|
+
if (command.kind === "join") {
|
|
164
|
+
const reportJoined = (joined) => {
|
|
165
|
+
log(`Connected to ${command.url}.`);
|
|
166
|
+
if (joined.tokenPath !== void 0) log(joined.token === "reused" ? `Kept the token in ${joined.tokenPath}; it already holds this token.` : `Stored the token in ${joined.tokenPath} (mode 600).`);
|
|
167
|
+
log(`Set \`storage\` to the team database and \`sessions.storage\` to the local store in ${joined.settingsPath}; other settings are unchanged.`);
|
|
168
|
+
if (joined.replaced !== void 0) log(`It replaces the previous selection: ${joined.replaced}.`);
|
|
169
|
+
if (joined.replacedSessionsStorage !== void 0) log(`It replaces the previous \`sessions.storage\`: ${joined.replacedSessionsStorage}.`);
|
|
170
|
+
};
|
|
171
|
+
const restarted = describeRestart((await joinTeamWith({
|
|
172
|
+
...command,
|
|
173
|
+
agentDir: options.agentDir,
|
|
174
|
+
cwd: options.cwd,
|
|
175
|
+
onProgress: log
|
|
176
|
+
}, "cli", {
|
|
177
|
+
...context,
|
|
178
|
+
onJoined: reportJoined
|
|
179
|
+
})).broker, log, error);
|
|
180
|
+
log("");
|
|
181
|
+
const status = await report(options, false, log);
|
|
182
|
+
return restarted && !status.failed ? 0 : 1;
|
|
183
|
+
}
|
|
184
|
+
let reportedLeft = false;
|
|
185
|
+
const reportLeft = (left) => {
|
|
186
|
+
reportedLeft = true;
|
|
187
|
+
if (left.removed.length === 0) log(`Nothing to remove: ${left.settingsPath} holds no settings that \`${APP_NAME} team join\` wrote.`);
|
|
188
|
+
else log(`Removed ${left.removed.map((key) => `\`${key}\``).join(" and ")} from ${left.settingsPath}; other settings are unchanged.`);
|
|
189
|
+
for (const { key, reason } of left.kept) log(reason === "changed" ? `Left \`${key}\` in place: it holds something other than what team join writes.` : `Left \`${key}\` in place: \`storage\` is still set, and without it new sessions would move to that store.`);
|
|
190
|
+
};
|
|
191
|
+
const left = await leaveTeamWith({
|
|
192
|
+
agentDir: options.agentDir,
|
|
193
|
+
cwd: options.cwd,
|
|
194
|
+
onProgress: log
|
|
195
|
+
}, {
|
|
196
|
+
...context,
|
|
197
|
+
onLeft: reportLeft
|
|
198
|
+
});
|
|
199
|
+
if (!reportedLeft) reportLeft(left);
|
|
200
|
+
for (const path of left.deletedTokenFiles) log(`Deleted the token file ${path}.`);
|
|
201
|
+
for (const path of left.keptTokenFiles) log(`Kept the token file ${path}: another setting still references it.`);
|
|
202
|
+
const restarted = left.broker === void 0 || describeRestart(left.broker, log, error);
|
|
203
|
+
const profile = selectTeamProfile({
|
|
204
|
+
agentDir: options.agentDir,
|
|
205
|
+
cwd: options.cwd
|
|
206
|
+
});
|
|
207
|
+
const described = profile.profile === "custom" ? `sessions: ${profile.sessions}; Intercom: ${profile.intercom}` : PROFILE_DESCRIPTIONS[profile.profile];
|
|
208
|
+
log(`Profile: ${profile.profile} (${described})`);
|
|
209
|
+
return restarted ? 0 : 1;
|
|
210
|
+
} catch (caught) {
|
|
211
|
+
error(isTeamProfileError(caught) || isTeamProfileConfigError(caught) ? caught.message : `Error: ${describeStorageError$1(caught)}`);
|
|
212
|
+
return 1;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
export { parseTeamCommand, runTeamCommand };
|
|
216
|
+
|
|
217
|
+
//# sourceMappingURL=team-command.code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-command.code.js","names":["describeStorageError"],"sources":["../../src/cli/team-command.ts"],"mappings":";;;;;;;;;;;;;AA6BA,MAAM,OAAO;IACT,SAAQ;IACR,SAAQ;IACR,SAAQ;;;;;aAKC,uBAAsB;;;;;;;;;;;;;;;;AAiBnC,MAAM,YAAY,QAAQ,SAAQ;AAQlC,MAAM,uBAAkE;CACvE,YAAY;CACZ,MAAM;CACN,IAAI;CACJ,QAAQ;AACR;AAED,SAAS,MACR,MACA,OACA,MAAY;CAEZ,OAAO,IAAI,uBAAuB,MAAM;EAAE,QAAQ;EAAO;EAAO;CAAI,CAAE;AACvE;;AAGA,SAAgB,iBAAiB,MAAuB;CACvD,MAAM,CAAC,SAAS,GAAG,QAAQ;CAC3B,IAAI,YAAY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