@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,20 +1,21 @@
|
|
|
1
1
|
import "./rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
import { flushLifecycleTraceAtQuit, getAgentDir, loadOnDemand, markLifecycleTiming, setDebugSetting, startedWithHangupIgnored } from "./p0-cli-
|
|
3
|
-
import { QueuedDeliveryRelay, THINKING_LEVELS, attachJsonlLineReader, bindSavedReadLines, chatReceipt, flushRawStdout, keepDroppedQueuedMessages, markEventLoopShutdown, markEventLoopStartupComplete, onBlueprintBuildFinished, onBlueprintBuildWaiting, outputExtensionLoadErrors, quitAsInteractiveApp, rawStdoutWriteFailed, sliceTail, takeOverStdout, transcriptLayoutOf, waitForRawStdoutBackpressure, withQueuedDeliveryChange, writeRawStdout, yieldToEventLoop } from "./startup-0-0-
|
|
4
|
-
import { ensurePngTranscoder, hasQuitStoppableCommands, isJsonValue, killQuitStoppableCommandsNow, parseEngineExplicitQuitCommand, parseInteractiveEngineCommand, prewarmModelApi, runCallback, runSynchronousCallback, serializeInteractiveEngineMessage, settingsWriteOwner, taskPromptHost } from "./startup-0-1-
|
|
2
|
+
import { flushLifecycleTraceAtQuit, getAgentDir, loadOnDemand, markLifecycleTiming, setDebugSetting, startedWithHangupIgnored } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
+
import { QueuedDeliveryRelay, THINKING_LEVELS, attachJsonlLineReader, bindSavedReadLines, chatReceipt, flushRawStdout, keepDroppedQueuedMessages, markEventLoopShutdown, markEventLoopStartupComplete, onBlueprintBuildFinished, onBlueprintBuildWaiting, outputExtensionLoadErrors, quitAsInteractiveApp, rawStdoutWriteFailed, sliceTail, takeOverStdout, transcriptLayoutOf, userMessageOrigin, waitForRawStdoutBackpressure, withQueuedDeliveryChange, writeRawStdout, yieldToEventLoop } from "./startup-0-0-TYUFUOJZ.js";
|
|
4
|
+
import { ensurePngTranscoder, hasQuitStoppableCommands, isJsonValue, killQuitStoppableCommandsNow, parseEngineExplicitQuitCommand, parseInteractiveEngineCommand, prewarmModelApi, runCallback, runSynchronousCallback, serializeInteractiveEngineMessage, settingsWriteOwner, taskPromptHost } from "./startup-0-1-D4LGGINF.js";
|
|
5
5
|
import { KeybindingsManager as KeybindingsManager$1, getEditorTheme, theme } from "./p2-shell-main-B2WIALFD.js";
|
|
6
|
-
import { killTrackedDetachedChildren, taskTranscriptSource } from "./startup-0-2-
|
|
7
|
-
import { getOwnerTaskStore, startInteractiveEngineLiveness } from "./startup-0-3-T4DVFYWX.js";
|
|
6
|
+
import { killTrackedDetachedChildren, taskTranscriptSource, watchTaskTranscriptBindings } from "./startup-0-2-SZGQIWHI.js";
|
|
7
|
+
import { getOwnerTaskStore, isTaskTurnInterrupted, startInteractiveEngineLiveness, watchOwnerTaskStoreBinding } from "./startup-0-3-T4DVFYWX.js";
|
|
8
8
|
import { SESSION_HISTORY_SCAN_ENTRIES } from "./settings-startup-65YEWRV2.js";
|
|
9
9
|
import { findQueuedMessages, findQueuedMessagesInFile, findQueuedMessagesInStore, firstHistoryCursor } from "./startup-8-0-34CBHPZH.js";
|
|
10
10
|
import { CredentialSynchronizationError, createAuthInteraction, getSkillCatalog, isOAuthLoginCancelled, normalizeOAuthLoginError } from "./startup-0-5-OHJNE6JH.js";
|
|
11
11
|
import { ToolBlock } from "./startup-0-4-HN5EB4K7.js";
|
|
12
|
-
import { FooterDataProvider, dismissedAgentPanelItems, isBuiltinToolCallRenderer, isBuiltinToolResultRenderer, ownerTaskViewSource, sourceError, subscribeAgentPanel } from "./startup-8-1-
|
|
12
|
+
import { FooterDataProvider, dismissedAgentPanelItems, isBuiltinToolCallRenderer, isBuiltinToolResultRenderer, onOwnerTaskAction, ownerTaskViewSource, sourceError, subscribeAgentPanel } from "./startup-8-1-SJW2GMAM.js";
|
|
13
13
|
import { queuedMessageReceiptId } from "./startup-15-0-YUKGAC63.js";
|
|
14
14
|
import { SessionManager } from "./startup-10-0-TDQNBDDL.js";
|
|
15
|
+
import { interactiveEngineStartupEnv, isInteractiveEngineChild } from "./p1a-prewarm-UQY3X2UK.js";
|
|
16
|
+
import { getExtensionRuntimeEventBus } from "./startup-14-0-MLX36RBG.js";
|
|
15
17
|
import { HOST_STARTED_SESSION } from "./startup-15-1-4S7FLMNG.js";
|
|
16
|
-
import {
|
|
17
|
-
import { CONSOLE_CLOSED_EXIT_CODE, CONSOLE_CLOSED_SHUTDOWN_MS, ChatSessionHost, CustomMessageComponent, KeybindingsReloadCoordinator, RETAINED_TOOL_RENDERERS, STOP_ALL_STATUS_KEY, ToolExecutionComponent, agentPanelReturning, bindAgentPanel, createRpcErrorResponse, createRpcSuccessResponse, disposeRenderer, engineTaskInspectorUi, exitWithStatus, formatRpcErrorMessage, handleSetViewedAgent, installEngineAgentViewBridge, markHintRoutesAsEngine, openLocalAgentViewPort, readTaskCompletionHistory, readTaskPrompts, retainedToolRenderer, rpcShutdownErrorEvent, runHintRoute, runRendererCleanup, sameRows, showAgentPanel, showEngineTaskInspector, stopAllBackgroundWork, themedChatHostStyle, withBlockRenderTime } from "./mode-shared-HP7GUA7J.js";
|
|
18
|
+
import { CONSOLE_CLOSED_EXIT_CODE, CONSOLE_CLOSED_SHUTDOWN_MS, ChatSessionHost, CustomMessageComponent, KeybindingsReloadCoordinator, RETAINED_TOOL_RENDERERS, STOP_ALL_STATUS_KEY, ToolExecutionComponent, agentPanelReturning, bindAgentPanel, createRpcErrorResponse, createRpcSuccessResponse, disposeRenderer, engineTaskInspectorUi, exitWithStatus, formatRpcErrorMessage, handleSetViewedAgent, installEngineAgentViewBridge, markHintRoutesAsEngine, onTaskDismissed, openLocalAgentViewPort, readTaskCompletionHistory, readTaskPrompts, retainedToolRenderer, rpcShutdownErrorEvent, runHintRoute, runRendererCleanup, sameRows, showAgentPanel, showEngineTaskInspector, stopAllBackgroundWork, themedChatHostStyle, withBlockRenderTime } from "./mode-shared-2QJSCUM6.js";
|
|
18
19
|
import { join } from "node:path";
|
|
19
20
|
import { writeSync } from "node:fs";
|
|
20
21
|
import { normalizeProviderId } from "@bastani/atomic-ai";
|
|
@@ -413,6 +414,7 @@ var EngineCustomUiService = class {
|
|
|
413
414
|
componentId,
|
|
414
415
|
overlay: options?.overlay === true,
|
|
415
416
|
purpose: options?.purpose,
|
|
417
|
+
...options?.purpose === "navigation" ? { acksClicks: true } : {},
|
|
416
418
|
deferInlineCustomUiFocus: options?.deferInlineCustomUiFocus,
|
|
417
419
|
handlesCtrlC: options?.handlesCtrlC,
|
|
418
420
|
handlesInternalUiAction: options?.handlesInternalUiAction,
|
|
@@ -529,6 +531,11 @@ var EngineCustomUiService = class {
|
|
|
529
531
|
requestId: command.requestId,
|
|
530
532
|
handled: false
|
|
531
533
|
});
|
|
534
|
+
else if ((command.type === "engine_custom_click" || command.type === "engine_custom_click_settle") && command.ackId !== void 0) this.send({
|
|
535
|
+
type: "engine_custom_click_result",
|
|
536
|
+
componentId: command.componentId,
|
|
537
|
+
ackId: command.ackId
|
|
538
|
+
});
|
|
532
539
|
return true;
|
|
533
540
|
}
|
|
534
541
|
switch (command.type) {
|
|
@@ -587,76 +594,90 @@ var EngineCustomUiService = class {
|
|
|
587
594
|
}
|
|
588
595
|
break;
|
|
589
596
|
}
|
|
590
|
-
case "engine_custom_click":
|
|
591
|
-
const paintedRowKey = record.component.paintedRowKey;
|
|
592
|
-
if (paintedRowKey !== void 0 && command.rowKey) {
|
|
593
|
-
if (paintedRowKey.call(record.component, command.y) !== command.rowKey) break;
|
|
594
|
-
} else if (command.frame !== record.frame) break;
|
|
595
|
-
const { x, y, width, height, clickId } = command;
|
|
596
|
-
record.handlingInput = true;
|
|
597
|
+
case "engine_custom_click":
|
|
597
598
|
try {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
599
|
+
const paintedRowKey = record.component.paintedRowKey;
|
|
600
|
+
if (paintedRowKey !== void 0 && command.rowKey) {
|
|
601
|
+
if (paintedRowKey.call(record.component, command.y) !== command.rowKey) break;
|
|
602
|
+
} else if (command.frame !== record.frame) break;
|
|
603
|
+
const { x, y, width, height, clickId } = command;
|
|
604
|
+
record.handlingInput = true;
|
|
605
|
+
try {
|
|
606
|
+
runSynchronousCallback({
|
|
607
|
+
kind: "renderer",
|
|
608
|
+
name: command.componentId
|
|
609
|
+
}, () => {
|
|
610
|
+
const result = record.component.handleMouse?.call(record.component, {
|
|
611
|
+
type: "click",
|
|
612
|
+
button: "left",
|
|
613
|
+
x,
|
|
614
|
+
y,
|
|
615
|
+
screenX: x,
|
|
616
|
+
screenY: y,
|
|
617
|
+
width,
|
|
618
|
+
height,
|
|
619
|
+
shift: false,
|
|
620
|
+
alt: false,
|
|
621
|
+
ctrl: false,
|
|
622
|
+
clickCount: 1
|
|
623
|
+
});
|
|
624
|
+
if (!result?.whenSingleClick) return;
|
|
625
|
+
if (clickId === void 0) result.whenSingleClick();
|
|
626
|
+
else {
|
|
627
|
+
const waiting = record.singleClickActions ?? /* @__PURE__ */ new Map();
|
|
628
|
+
record.singleClickActions = waiting;
|
|
629
|
+
waiting.set(clickId, result);
|
|
630
|
+
if (!command.cancelsClicks && waiting.size > LEGACY_WAITING_SINGLE_CLICKS) {
|
|
631
|
+
const oldest = waiting.keys().next().value;
|
|
632
|
+
const evicted = waiting.get(oldest);
|
|
633
|
+
waiting.delete(oldest);
|
|
634
|
+
evicted?.onSingleClickCancel?.();
|
|
635
|
+
}
|
|
627
636
|
}
|
|
628
|
-
}
|
|
637
|
+
});
|
|
638
|
+
} catch {} finally {
|
|
639
|
+
record.handlingInput = false;
|
|
640
|
+
}
|
|
641
|
+
} finally {
|
|
642
|
+
if (command.ackId !== void 0) this.send({
|
|
643
|
+
type: "engine_custom_click_result",
|
|
644
|
+
componentId: command.componentId,
|
|
645
|
+
ackId: command.ackId
|
|
629
646
|
});
|
|
630
|
-
} catch {} finally {
|
|
631
|
-
record.handlingInput = false;
|
|
632
647
|
}
|
|
633
648
|
if (record.paintAfterInput === true) {
|
|
634
649
|
record.paintAfterInput = false;
|
|
635
650
|
this.paintComponent(command.componentId);
|
|
636
651
|
}
|
|
637
652
|
break;
|
|
638
|
-
}
|
|
639
653
|
case "engine_custom_click_cancel":
|
|
640
|
-
case "engine_custom_click_settle":
|
|
641
|
-
const result = record.singleClickActions?.get(command.clickId);
|
|
642
|
-
record.singleClickActions?.delete(command.clickId);
|
|
643
|
-
const action = command.type === "engine_custom_click_cancel" ? result?.onSingleClickCancel : result?.whenSingleClick;
|
|
644
|
-
if (action === void 0) break;
|
|
645
|
-
record.handlingInput = true;
|
|
654
|
+
case "engine_custom_click_settle":
|
|
646
655
|
try {
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
656
|
+
const result = record.singleClickActions?.get(command.clickId);
|
|
657
|
+
record.singleClickActions?.delete(command.clickId);
|
|
658
|
+
const action = command.type === "engine_custom_click_cancel" ? result?.onSingleClickCancel : result?.whenSingleClick;
|
|
659
|
+
if (action === void 0) break;
|
|
660
|
+
record.handlingInput = true;
|
|
661
|
+
try {
|
|
662
|
+
runSynchronousCallback({
|
|
663
|
+
kind: "renderer",
|
|
664
|
+
name: command.componentId
|
|
665
|
+
}, action);
|
|
666
|
+
} catch {} finally {
|
|
667
|
+
record.handlingInput = false;
|
|
668
|
+
}
|
|
669
|
+
} finally {
|
|
670
|
+
if (command.type === "engine_custom_click_settle" && command.ackId !== void 0) this.send({
|
|
671
|
+
type: "engine_custom_click_result",
|
|
672
|
+
componentId: command.componentId,
|
|
673
|
+
ackId: command.ackId
|
|
674
|
+
});
|
|
653
675
|
}
|
|
654
676
|
if (record.paintAfterInput === true) {
|
|
655
677
|
record.paintAfterInput = false;
|
|
656
678
|
this.paintComponent(command.componentId);
|
|
657
679
|
}
|
|
658
680
|
break;
|
|
659
|
-
}
|
|
660
681
|
case "engine_custom_copy_result":
|
|
661
682
|
record.terminal.resolveCopy(command.requestId, command.error);
|
|
662
683
|
break;
|
|
@@ -780,6 +801,7 @@ var EngineCustomUiService = class {
|
|
|
780
801
|
const scrollRequest = record.component.getScrollRequest?.();
|
|
781
802
|
const rowKeys = rowKeysOf(record.component, lines.length);
|
|
782
803
|
const layout = record.transcript === true ? transcriptLayoutOf(record.component) : void 0;
|
|
804
|
+
const previewSeq = record.widgetKey !== void 0 ? record.component.previewSeq?.() : void 0;
|
|
783
805
|
record.frame = (record.frame ?? 0) + 1;
|
|
784
806
|
this.send({
|
|
785
807
|
type: "engine_custom_frame",
|
|
@@ -789,6 +811,7 @@ var EngineCustomUiService = class {
|
|
|
789
811
|
frame: record.frame,
|
|
790
812
|
...rowKeys ? { rowKeys } : {},
|
|
791
813
|
...layout ? { layout } : {},
|
|
814
|
+
...previewSeq !== void 0 && previewSeq > 0 ? { previewSeq } : {},
|
|
792
815
|
...scrollRequest ? { scrollRequest } : {}
|
|
793
816
|
});
|
|
794
817
|
}
|
|
@@ -1660,16 +1683,196 @@ function removesFromLane(before, after) {
|
|
|
1660
1683
|
}
|
|
1661
1684
|
return false;
|
|
1662
1685
|
}
|
|
1686
|
+
const AUTO_RESTART_CONTINUATION_PREFIX = "Atomic restarted while you were working";
|
|
1687
|
+
const SUBAGENT_CHILD_STOPPED_EVENT = "subagent:child-stopped";
|
|
1688
|
+
function userMessagePlainText(content) {
|
|
1689
|
+
if (typeof content === "string") return content;
|
|
1690
|
+
if (!Array.isArray(content)) return "";
|
|
1691
|
+
return content.flatMap((part) => part.type === "text" && typeof part.text === "string" ? [part.text] : []).join("\n");
|
|
1692
|
+
}
|
|
1663
1693
|
var EngineAgentViewRegistry = class {
|
|
1664
1694
|
views = /* @__PURE__ */ new Map();
|
|
1665
1695
|
nextView = 0;
|
|
1666
1696
|
context;
|
|
1697
|
+
stopInvalidationWatch;
|
|
1667
1698
|
constructor(context) {
|
|
1668
1699
|
this.context = context;
|
|
1700
|
+
this.stopInvalidationWatch = this.watchChildInvalidations();
|
|
1669
1701
|
}
|
|
1670
1702
|
port(viewId) {
|
|
1671
1703
|
return this.views.get(viewId)?.port;
|
|
1672
1704
|
}
|
|
1705
|
+
hasOpenViewForSession(sessionId) {
|
|
1706
|
+
for (const view of this.views.values()) if (view.port.status().sessionId === sessionId) return true;
|
|
1707
|
+
return false;
|
|
1708
|
+
}
|
|
1709
|
+
emitInvalidation(sessionId, sessionFile, reason) {
|
|
1710
|
+
if (sessionId === void 0 || sessionId.length === 0) return;
|
|
1711
|
+
this.context.send({
|
|
1712
|
+
type: "engine_agent_queue_invalidated",
|
|
1713
|
+
sessionId,
|
|
1714
|
+
...sessionFile === void 0 ? {} : { sessionFile },
|
|
1715
|
+
reason
|
|
1716
|
+
});
|
|
1717
|
+
}
|
|
1718
|
+
/**
|
|
1719
|
+
* Watch child subagent lifecycle in this engine so the host drops any pending lost-queue restore when a child is
|
|
1720
|
+
* stopped, cleared, ended non-resumably, or sent input by another path before the user reopens it.
|
|
1721
|
+
*/
|
|
1722
|
+
watchChildInvalidations() {
|
|
1723
|
+
const { session } = this.context;
|
|
1724
|
+
let boundStore;
|
|
1725
|
+
let stopStore;
|
|
1726
|
+
let stopActions;
|
|
1727
|
+
let stopDismiss;
|
|
1728
|
+
let stopTranscriptBind;
|
|
1729
|
+
const tracked = /* @__PURE__ */ new Map();
|
|
1730
|
+
let initialScanComplete = false;
|
|
1731
|
+
const cleanupTracked = (taskId) => {
|
|
1732
|
+
tracked.get(taskId)?.unsubscribeSession?.();
|
|
1733
|
+
tracked.delete(taskId);
|
|
1734
|
+
};
|
|
1735
|
+
const cleanupAllTracked = () => {
|
|
1736
|
+
for (const taskId of [...tracked.keys()]) cleanupTracked(taskId);
|
|
1737
|
+
};
|
|
1738
|
+
const attachSessionSubscription = (entry, transcript) => {
|
|
1739
|
+
if (entry.followedSession === transcript) return;
|
|
1740
|
+
entry.unsubscribeSession?.();
|
|
1741
|
+
entry.unsubscribeSession = void 0;
|
|
1742
|
+
entry.followedSession = transcript;
|
|
1743
|
+
if (transcript?.subscribe === void 0) return;
|
|
1744
|
+
let seenUserMessage = transcript.getEntries().some((row) => row.type === "message" && row.message.role === "user");
|
|
1745
|
+
entry.unsubscribeSession = transcript.subscribe((event) => {
|
|
1746
|
+
if (event.type !== "message_start") return;
|
|
1747
|
+
const sid = entry.sessionId ?? transcript.getSessionId();
|
|
1748
|
+
const sfile = entry.sessionFile ?? transcript.getSessionFile?.();
|
|
1749
|
+
if (event.message.role === "custom") {
|
|
1750
|
+
if (event.message.customType === "intercom_message" && !this.hasOpenViewForSession(sid)) this.emitInvalidation(sid, sfile, "sent-elsewhere");
|
|
1751
|
+
return;
|
|
1752
|
+
}
|
|
1753
|
+
if (event.message.role === "user") {
|
|
1754
|
+
const text = userMessagePlainText(event.message.content).trim();
|
|
1755
|
+
if (text.length === 0 || text.startsWith(AUTO_RESTART_CONTINUATION_PREFIX)) return;
|
|
1756
|
+
if (seenUserMessage && !this.hasOpenViewForSession(sid)) this.emitInvalidation(sid, sfile, "sent-elsewhere");
|
|
1757
|
+
seenUserMessage = true;
|
|
1758
|
+
}
|
|
1759
|
+
});
|
|
1760
|
+
};
|
|
1761
|
+
const syncStore = () => {
|
|
1762
|
+
const store = boundStore;
|
|
1763
|
+
if (store === void 0) return;
|
|
1764
|
+
const source = ownerTaskViewSource(store);
|
|
1765
|
+
const dismissedPanel = dismissedAgentPanelItems(session);
|
|
1766
|
+
const present = /* @__PURE__ */ new Set();
|
|
1767
|
+
const liveSessions = /* @__PURE__ */ new Set();
|
|
1768
|
+
for (const task of store.tasks) {
|
|
1769
|
+
if (task.kind !== "agent") continue;
|
|
1770
|
+
const taskId = task.ref.taskId;
|
|
1771
|
+
present.add(taskId);
|
|
1772
|
+
const follow = source.followTaskTranscript(taskId)?.session;
|
|
1773
|
+
const sid = follow?.getSessionId?.();
|
|
1774
|
+
const sfile = follow?.getSessionFile?.();
|
|
1775
|
+
if (sid !== void 0) liveSessions.add(sid);
|
|
1776
|
+
const interrupted = isTaskTurnInterrupted(task);
|
|
1777
|
+
const readOnly = source.taskReadOnlyReason?.(taskId) !== void 0;
|
|
1778
|
+
const settled = task.execution.kind === "settled";
|
|
1779
|
+
const dismissed = dismissedPanel.has(`task:${taskId}`);
|
|
1780
|
+
const existing = tracked.get(taskId);
|
|
1781
|
+
if (existing === void 0) {
|
|
1782
|
+
const isResumedAfterStartup = initialScanComplete && String(task.launchOperationId ?? "").includes(":resume:");
|
|
1783
|
+
const created = {
|
|
1784
|
+
...sid === void 0 ? {} : { sessionId: sid },
|
|
1785
|
+
...sfile === void 0 ? {} : { sessionFile: sfile },
|
|
1786
|
+
interrupted,
|
|
1787
|
+
readOnly,
|
|
1788
|
+
settled,
|
|
1789
|
+
dismissed,
|
|
1790
|
+
resumeInvalidationPending: isResumedAfterStartup && sid === void 0
|
|
1791
|
+
};
|
|
1792
|
+
tracked.set(taskId, created);
|
|
1793
|
+
attachSessionSubscription(created, follow);
|
|
1794
|
+
if (isResumedAfterStartup && sid !== void 0 && !this.hasOpenViewForSession(sid)) this.emitInvalidation(sid, sfile, "sent-elsewhere");
|
|
1795
|
+
continue;
|
|
1796
|
+
}
|
|
1797
|
+
if (sid !== void 0) existing.sessionId = sid;
|
|
1798
|
+
if (sfile !== void 0) existing.sessionFile = sfile;
|
|
1799
|
+
attachSessionSubscription(existing, follow);
|
|
1800
|
+
if (existing.resumeInvalidationPending && existing.sessionId !== void 0) {
|
|
1801
|
+
existing.resumeInvalidationPending = false;
|
|
1802
|
+
if (!this.hasOpenViewForSession(existing.sessionId)) this.emitInvalidation(existing.sessionId, existing.sessionFile, "sent-elsewhere");
|
|
1803
|
+
}
|
|
1804
|
+
if (!existing.interrupted && interrupted) this.emitInvalidation(existing.sessionId, existing.sessionFile, "stopped");
|
|
1805
|
+
if (!existing.settled && settled && task.execution.kind === "settled" && task.execution.result.kind === "cancelled" && task.execution.result.released === void 0) this.emitInvalidation(existing.sessionId, existing.sessionFile, "stopped");
|
|
1806
|
+
if (!existing.readOnly && readOnly) this.emitInvalidation(existing.sessionId, existing.sessionFile, "session-ended");
|
|
1807
|
+
if (!existing.dismissed && dismissed) this.emitInvalidation(existing.sessionId, existing.sessionFile, "cleared");
|
|
1808
|
+
existing.interrupted = interrupted;
|
|
1809
|
+
existing.readOnly = readOnly;
|
|
1810
|
+
existing.settled = settled;
|
|
1811
|
+
existing.dismissed = dismissed;
|
|
1812
|
+
}
|
|
1813
|
+
for (const [taskId, entry] of [...tracked]) {
|
|
1814
|
+
if (present.has(taskId)) continue;
|
|
1815
|
+
if (entry.sessionId !== void 0 && !liveSessions.has(entry.sessionId)) this.emitInvalidation(entry.sessionId, entry.sessionFile, "cleared");
|
|
1816
|
+
cleanupTracked(taskId);
|
|
1817
|
+
}
|
|
1818
|
+
initialScanComplete = true;
|
|
1819
|
+
};
|
|
1820
|
+
const bindStore = (store) => {
|
|
1821
|
+
if (store === boundStore) return;
|
|
1822
|
+
stopStore?.();
|
|
1823
|
+
stopActions?.();
|
|
1824
|
+
stopDismiss?.();
|
|
1825
|
+
stopTranscriptBind?.();
|
|
1826
|
+
cleanupAllTracked();
|
|
1827
|
+
boundStore = store;
|
|
1828
|
+
initialScanComplete = false;
|
|
1829
|
+
if (store === void 0 || store.supervisor == null || typeof store.supervisor !== "object" || typeof store.resolveTask !== "function") return;
|
|
1830
|
+
const source = ownerTaskViewSource(store);
|
|
1831
|
+
stopStore = store.subscribe(syncStore);
|
|
1832
|
+
stopTranscriptBind = watchTaskTranscriptBindings(store.supervisor, () => syncStore());
|
|
1833
|
+
stopActions = onOwnerTaskAction(store, (event) => {
|
|
1834
|
+
const entry = tracked.get(event.taskId);
|
|
1835
|
+
const sid = event.sessionId ?? entry?.sessionId;
|
|
1836
|
+
const sfile = event.sessionFile ?? entry?.sessionFile;
|
|
1837
|
+
if (event.action === "sent") {
|
|
1838
|
+
if (sid !== void 0 && !this.hasOpenViewForSession(sid)) this.emitInvalidation(sid, sfile, "sent-elsewhere");
|
|
1839
|
+
return;
|
|
1840
|
+
}
|
|
1841
|
+
this.emitInvalidation(sid, sfile, event.action);
|
|
1842
|
+
});
|
|
1843
|
+
stopDismiss = onTaskDismissed(source, (taskId) => {
|
|
1844
|
+
const entry = tracked.get(taskId);
|
|
1845
|
+
const follow = source.followTaskTranscript(taskId)?.session;
|
|
1846
|
+
const sid = entry?.sessionId ?? follow?.getSessionId?.();
|
|
1847
|
+
const sfile = entry?.sessionFile ?? follow?.getSessionFile?.();
|
|
1848
|
+
this.emitInvalidation(sid, sfile, "cleared");
|
|
1849
|
+
});
|
|
1850
|
+
syncStore();
|
|
1851
|
+
};
|
|
1852
|
+
const runtime = session.resourceLoader?.getExtensions?.()?.runtime;
|
|
1853
|
+
const stopIdleChildStopped = runtime ? getExtensionRuntimeEventBus(runtime).on(SUBAGENT_CHILD_STOPPED_EVENT, (payload) => {
|
|
1854
|
+
if (payload == null || typeof payload !== "object") return;
|
|
1855
|
+
const record = payload;
|
|
1856
|
+
const taskId = typeof record.taskId === "string" ? record.taskId : void 0;
|
|
1857
|
+
const entry = taskId === void 0 ? void 0 : tracked.get(taskId);
|
|
1858
|
+
const sid = typeof record.sessionId === "string" && record.sessionId.length > 0 ? record.sessionId : entry?.sessionId;
|
|
1859
|
+
const sfile = typeof record.sessionFile === "string" && record.sessionFile.length > 0 ? record.sessionFile : entry?.sessionFile;
|
|
1860
|
+
this.emitInvalidation(sid, sfile, "stopped");
|
|
1861
|
+
}) : void 0;
|
|
1862
|
+
const stopBinding = watchOwnerTaskStoreBinding(session, () => bindStore(getOwnerTaskStore(session)));
|
|
1863
|
+
const stopPanel = subscribeAgentPanel(session, () => syncStore());
|
|
1864
|
+
bindStore(getOwnerTaskStore(session));
|
|
1865
|
+
return () => {
|
|
1866
|
+
stopIdleChildStopped?.();
|
|
1867
|
+
stopPanel();
|
|
1868
|
+
stopBinding();
|
|
1869
|
+
stopStore?.();
|
|
1870
|
+
stopActions?.();
|
|
1871
|
+
stopDismiss?.();
|
|
1872
|
+
stopTranscriptBind?.();
|
|
1873
|
+
cleanupAllTracked();
|
|
1874
|
+
};
|
|
1875
|
+
}
|
|
1673
1876
|
/** Where the view's transcript is drawn: the engine's chat settings, with the host chat's own display toggles. */
|
|
1674
1877
|
environment(tui) {
|
|
1675
1878
|
const { ui, customUi } = this.context;
|
|
@@ -1765,6 +1968,7 @@ var EngineAgentViewRegistry = class {
|
|
|
1765
1968
|
return true;
|
|
1766
1969
|
}
|
|
1767
1970
|
dispose() {
|
|
1971
|
+
this.stopInvalidationWatch();
|
|
1768
1972
|
for (const viewId of [...this.views.keys()]) this.close(viewId);
|
|
1769
1973
|
}
|
|
1770
1974
|
};
|
|
@@ -2323,6 +2527,7 @@ function createRpcCommandHandler({ runtimeHost, getSession, rebindSession, outpu
|
|
|
2323
2527
|
images: command.images,
|
|
2324
2528
|
streamingBehavior: command.streamingBehavior,
|
|
2325
2529
|
...typeof command.queuedMessageId === "string" ? { queuedMessageId: command.queuedMessageId } : {},
|
|
2530
|
+
...typeof command.originSendId === "string" ? { originSendId: command.originSendId } : {},
|
|
2326
2531
|
source: "rpc",
|
|
2327
2532
|
preflightResult: (didSucceed, disposition) => {
|
|
2328
2533
|
if (didSucceed) {
|
|
@@ -2766,7 +2971,7 @@ function createRpcCommandHandler({ runtimeHost, getSession, rebindSession, outpu
|
|
|
2766
2971
|
});
|
|
2767
2972
|
case "get_fork_messages": {
|
|
2768
2973
|
if (session.sessionManager.hasFullHistory()) return createRpcSuccessResponse(id, command.type, { messages: session.getUserMessagesForForking() });
|
|
2769
|
-
const { archive, prompts } = await loadOnDemand("fork", async () => (await import("../modes/interactive/components/user-message-selector-archive.
|
|
2974
|
+
const { archive, prompts } = await loadOnDemand("fork", async () => (await import("../modes/interactive/components/user-message-selector-archive.code.js").catch((error) => __atomicOnDemandFailed(error, "/fork"))).ForkPromptArchive.open(session.sessionManager));
|
|
2770
2975
|
try {
|
|
2771
2976
|
return createRpcSuccessResponse(id, command.type, { messages: prompts.map(({ entryId, text }) => ({
|
|
2772
2977
|
entryId,
|
|
@@ -2809,6 +3014,7 @@ function createRpcCommandHandler({ runtimeHost, getSession, rebindSession, outpu
|
|
|
2809
3014
|
}
|
|
2810
3015
|
return createRpcSuccessResponse(id, "reload");
|
|
2811
3016
|
case "start_pending_recovery": return createRpcSuccessResponse(id, "start_pending_recovery", await session.startPendingRecovery(command.reason));
|
|
3017
|
+
case "start_pending_recovery_restore": return createRpcSuccessResponse(id, "start_pending_recovery_restore", await session.startPendingRecoveryRestore(command.reason));
|
|
2812
3018
|
case "get_shortcuts": {
|
|
2813
3019
|
const effectiveBindings = await getShortcutBindings();
|
|
2814
3020
|
const shortcuts = session.extensionRunner.getShortcuts(effectiveBindings);
|
|
@@ -2899,6 +3105,7 @@ const CONCURRENT_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
2899
3105
|
"user_bash",
|
|
2900
3106
|
"refresh_models",
|
|
2901
3107
|
"start_pending_recovery",
|
|
3108
|
+
"start_pending_recovery_restore",
|
|
2902
3109
|
"stop_all_background",
|
|
2903
3110
|
"agent_view_open",
|
|
2904
3111
|
"agent_view_close",
|
|
@@ -3589,7 +3796,8 @@ var RpcSessionBinding = class {
|
|
|
3589
3796
|
seq: saved.seq
|
|
3590
3797
|
};
|
|
3591
3798
|
const queuedMessageId = this.queuedDeliveries !== void 0 && (event.type === "message_start" || event.type === "message_end" && saved !== void 0) && event.message.role === "user" ? queuedMessageReceiptId(event.message) : void 0;
|
|
3592
|
-
const
|
|
3799
|
+
const originSendId = this.queuedDeliveries !== void 0 && event.type === "message_start" && event.message.role === "user" ? userMessageOrigin(event.message) : void 0;
|
|
3800
|
+
const record = withQueuedDeliveryChange(withSaved, this.queuedDeliveries?.note(session, event, queuedMessageId, originSendId));
|
|
3593
3801
|
this.output(receipt ? {
|
|
3594
3802
|
...record,
|
|
3595
3803
|
atomicChatReceipt: receipt
|
|
@@ -3898,4 +4106,49 @@ async function runRpcMode(runtimeHost, options = {}) {
|
|
|
3898
4106
|
}
|
|
3899
4107
|
export { runRpcMode, toJsonEvent };
|
|
3900
4108
|
|
|
3901
|
-
//# sourceMappingURL=mode-rpc-sdk-IOPGDYR4.js.map
|
|
4109
|
+
//# sourceMappingURL=mode-rpc-sdk-IOPGDYR4.js.map
|
|
4110
|
+
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
4111
|
+
// demand that fails in a process an in-place update left running says to restart.
|
|
4112
|
+
function __atomicOnDemandFailed(error, feature) {
|
|
4113
|
+
return (async () => {
|
|
4114
|
+
const root = new URL("../", import.meta.url);
|
|
4115
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
4116
|
+
const key = `${root.href}#0.10.5-alpha.1`;
|
|
4117
|
+
let release = releases.get(key);
|
|
4118
|
+
if (release === undefined) {
|
|
4119
|
+
const current = (async () => {
|
|
4120
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
4121
|
+
try {
|
|
4122
|
+
const held = await import(new URL(path, root).href);
|
|
4123
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
4124
|
+
} catch {
|
|
4125
|
+
// Not a file this process can load: the next.
|
|
4126
|
+
}
|
|
4127
|
+
}
|
|
4128
|
+
return undefined;
|
|
4129
|
+
})().then((found) => {
|
|
4130
|
+
if (found === undefined && releases.get(key) === current) releases.delete(key);
|
|
4131
|
+
return found;
|
|
4132
|
+
});
|
|
4133
|
+
releases.set(key, current);
|
|
4134
|
+
release = current;
|
|
4135
|
+
}
|
|
4136
|
+
const running = await release;
|
|
4137
|
+
let installed;
|
|
4138
|
+
try {
|
|
4139
|
+
const { readFile } = process.getBuiltinModule("node:fs/promises");
|
|
4140
|
+
installed = JSON.parse(await readFile(new URL("../package.json", root), "utf8")).version;
|
|
4141
|
+
} catch {
|
|
4142
|
+
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
4143
|
+
}
|
|
4144
|
+
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;
|
|
4145
|
+
if (updatedTo === undefined) throw error;
|
|
4146
|
+
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
4147
|
+
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
4148
|
+
cause: error,
|
|
4149
|
+
});
|
|
4150
|
+
restart.name = "UpdatedInstallError";
|
|
4151
|
+
restart[Symbol.for("atomic.on-demand-restart.v1")] = { application, updatedTo, feature };
|
|
4152
|
+
throw restart;
|
|
4153
|
+
})();
|
|
4154
|
+
}
|