@bastani/atomic 0.10.4-alpha.2 → 0.10.5-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +238 -0
- package/dist/_shared/chunk-CDOYTDYM.js +4 -0
- package/dist/_shared/chunk-CDOYTDYM.js.map +1 -0
- package/dist/_shared/compile-cache-warmup-host-RU5L7I7A.js +1 -1
- package/dist/_shared/dist-KOELCESV.js +48 -3
- package/dist/_shared/fork-row-index-UAUAQRD5.js +47 -2
- package/dist/_shared/http-YFAPTIZD.js +16 -4
- package/dist/_shared/http-YFAPTIZD.js.map +1 -1
- package/dist/_shared/lib-4PES5P4V.js +59 -14
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +1706 -258
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +317 -64
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/{mode-shared-HP7GUA7J.js → mode-shared-2QJSCUM6.js} +432 -81
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -0
- package/dist/_shared/p0-cli-BB45ZQY6.js +3482 -0
- package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -0
- package/dist/_shared/p0-cli-GUFK7TPN.js +2 -2838
- package/dist/_shared/p0-cli-GUFK7TPN.js.map +1 -1
- package/dist/_shared/{p1a-prewarm-YK3KDTLN.js → p1a-prewarm-UQY3X2UK.js} +270 -73
- package/dist/_shared/p1a-prewarm-UQY3X2UK.js.map +1 -0
- package/dist/_shared/{p1b-elig-PXQA2FYP.js → p1b-elig-ENCUPKKJ.js} +190 -121
- package/dist/_shared/p1b-elig-ENCUPKKJ.js.map +1 -0
- package/dist/_shared/p2-common-YLSYXMDQ.js +1 -3
- package/dist/_shared/p2-common-YLSYXMDQ.js.map +1 -1
- package/dist/_shared/p2-shell-TJBYQMCJ.js +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js +500 -127
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +4 -4
- package/dist/_shared/sdk-WQIOHVKO.js +56 -11
- package/dist/_shared/session-data-AHTU7IS6.js +48 -3
- package/dist/_shared/session-manager-list-2BLEEZVG.js +2 -2
- package/dist/_shared/settings-startup-65YEWRV2.js.map +1 -1
- package/dist/_shared/sql-session-store-5FD3WBMZ.js +57 -12
- package/dist/_shared/{startup-0-0-X4NF3GKM.js → startup-0-0-TYUFUOJZ.js} +528 -321
- package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +1 -0
- package/dist/_shared/{startup-0-1-7QTG6VJZ.js → startup-0-1-D4LGGINF.js} +284 -81
- package/dist/_shared/startup-0-1-D4LGGINF.js.map +1 -0
- package/dist/_shared/{startup-0-2-KFDYPDJK.js → startup-0-2-SZGQIWHI.js} +483 -154
- package/dist/_shared/startup-0-2-SZGQIWHI.js.map +1 -0
- package/dist/_shared/startup-0-3-T4DVFYWX.js +340 -110
- package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
- package/dist/_shared/startup-0-4-HN5EB4K7.js +261 -59
- package/dist/_shared/startup-0-4-HN5EB4K7.js.map +1 -1
- package/dist/_shared/startup-0-5-OHJNE6JH.js +421 -148
- package/dist/_shared/startup-0-5-OHJNE6JH.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +62 -11
- package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
- package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +12 -11
- package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +53 -158
- package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +231 -46
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +115 -35
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/{startup-8-1-KQJBDKRU.js → startup-8-1-SJW2GMAM.js} +203 -62
- package/dist/_shared/startup-8-1-SJW2GMAM.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +55 -10
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +47 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +48 -3
- package/dist/builtin/intercom/CHANGELOG.md +59 -0
- package/dist/builtin/intercom/README.md +0 -1
- package/dist/builtin/intercom/broker/broker-instance.ts +13 -57
- package/dist/builtin/intercom/broker/broker-process.ts +30 -10
- package/dist/builtin/intercom/broker/broker-routing.ts +12 -2
- package/dist/builtin/intercom/broker/broker.bundle.mjs +2557 -498
- package/dist/builtin/intercom/broker/broker.ts +164 -55
- package/dist/builtin/intercom/broker/client.ts +36 -16
- package/dist/builtin/intercom/broker/control.ts +83 -20
- package/dist/builtin/intercom/broker/durable-ended-queue.ts +65 -19
- package/dist/builtin/intercom/broker/host-command-environment.ts +7 -2
- package/dist/builtin/intercom/broker/multinode-router.ts +1675 -387
- package/dist/builtin/intercom/broker/multinode-state-store.ts +10 -0
- package/dist/builtin/intercom/broker/paths.ts +68 -6
- package/dist/builtin/intercom/broker/pending-send-registry.ts +5 -0
- package/dist/builtin/intercom/broker/registration-bounds.ts +38 -0
- package/dist/builtin/intercom/broker/retiring-broker-check.ts +178 -0
- package/dist/builtin/intercom/broker/return-paths.ts +268 -7
- package/dist/builtin/intercom/broker/send-handler.ts +253 -28
- package/dist/builtin/intercom/broker/send-order-gate.ts +410 -0
- package/dist/builtin/intercom/broker/spawn.ts +950 -202
- package/dist/builtin/intercom/broker/sql-lease-store.ts +37 -0
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +7 -0
- package/dist/builtin/intercom/broker/windows-cwd.ts +546 -0
- package/dist/builtin/intercom/index.bundle.mjs +3506 -2328
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/intercom/retry-policy.ts +4 -0
- package/dist/builtin/intercom/types.ts +2 -0
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +46 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +336 -86
- package/dist/builtin/web-access/CHANGELOG.md +12 -0
- package/dist/builtin/web-access/index.bundle.mjs +23 -38
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/bun/cli.js +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/internal-intercom-broker.js +119 -4
- package/dist/bun/internal-intercom-broker.js.map +1 -1
- package/dist/bun/register-theme-validator.js +6 -0
- package/dist/bun/register-theme-validator.js.map +1 -0
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +1102 -0
- package/dist/cli/auth-cli.code.js.map +1 -0
- package/dist/cli/auth-cli.impl.js +36 -0
- package/dist/cli/auth-cli.impl.js.map +1 -0
- package/dist/cli/auth-cli.js +30 -1096
- package/dist/cli/auth-cli.js.map +1 -1
- package/dist/cli/blueprint-command.code.js +906 -0
- package/dist/cli/blueprint-command.code.js.map +1 -0
- package/dist/cli/blueprint-command.impl.js +36 -0
- package/dist/cli/blueprint-command.impl.js.map +1 -0
- package/dist/cli/blueprint-command.js +30 -900
- package/dist/cli/blueprint-command.js.map +1 -1
- package/dist/cli/intercom-command.code.js +153 -0
- package/dist/cli/intercom-command.code.js.map +1 -0
- package/dist/cli/intercom-command.impl.js +36 -0
- package/dist/cli/intercom-command.impl.js.map +1 -0
- package/dist/cli/intercom-command.js +33 -105
- package/dist/cli/intercom-command.js.map +1 -1
- package/dist/cli/list-models.code.js +60 -0
- package/dist/cli/list-models.code.js.map +1 -0
- package/dist/cli/list-models.impl.js +36 -0
- package/dist/cli/list-models.impl.js.map +1 -0
- package/dist/cli/list-models.js +33 -57
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.code.js +55 -0
- package/dist/cli/session-picker.code.js.map +1 -0
- package/dist/cli/session-picker.impl.js +36 -0
- package/dist/cli/session-picker.impl.js.map +1 -0
- package/dist/cli/session-picker.js +33 -52
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.code.js +5 -0
- package/dist/cli/startup-ui.code.js.map +1 -0
- package/dist/cli/startup-ui.impl.js +36 -0
- package/dist/cli/startup-ui.impl.js.map +1 -0
- package/dist/cli/startup-ui.js +35 -4
- package/dist/cli/storage-command.code.js +3 -0
- package/dist/cli/storage-command.code.js.map +1 -0
- package/dist/cli/storage-command.impl.js +36 -0
- package/dist/cli/storage-command.impl.js.map +1 -0
- package/dist/cli/storage-command.js +35 -2
- package/dist/cli/storage-search-session.code.js +189 -0
- package/dist/cli/storage-search-session.code.js.map +1 -0
- package/dist/cli/storage-search-session.impl.js +36 -0
- package/dist/cli/storage-search-session.impl.js.map +1 -0
- package/dist/cli/storage-search-session.js +33 -186
- package/dist/cli/storage-search-session.js.map +1 -1
- package/dist/cli/team-command.code.js +217 -0
- package/dist/cli/team-command.code.js.map +1 -0
- package/dist/cli/team-command.impl.js +36 -0
- package/dist/cli/team-command.impl.js.map +1 -0
- package/dist/cli/team-command.js +32 -213
- package/dist/cli/team-command.js.map +1 -1
- package/dist/cli.js +60 -11
- package/dist/cli.js.map +1 -1
- package/dist/config.js +1 -1
- package/dist/core/agent-session-methods.d.ts +4 -3
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +5 -0
- package/dist/core/compaction/compaction.d.ts +6 -0
- package/dist/core/compaction/model-resolver.d.ts +1 -1
- package/dist/core/debug.code.js +3 -0
- package/dist/core/debug.code.js.map +1 -0
- package/dist/core/debug.impl.js +36 -0
- package/dist/core/debug.impl.js.map +1 -0
- package/dist/core/debug.js +35 -2
- package/dist/core/default-model-api-prewarm.d.ts +5 -0
- package/dist/core/export-html/card-projection.code.js +257 -0
- package/dist/core/export-html/card-projection.code.js.map +1 -0
- package/dist/core/export-html/card-projection.impl.js +36 -0
- package/dist/core/export-html/card-projection.impl.js.map +1 -0
- package/dist/core/export-html/card-projection.js +34 -255
- package/dist/core/export-html/card-projection.js.map +1 -1
- package/dist/core/export-html/index.code.js +655 -0
- package/dist/core/export-html/index.code.js.map +1 -0
- package/dist/core/export-html/index.impl.js +36 -0
- package/dist/core/export-html/index.impl.js.map +1 -0
- package/dist/core/export-html/index.js +30 -604
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/json-spans.code.js +3 -0
- package/dist/core/export-html/json-spans.code.js.map +1 -0
- package/dist/core/export-html/json-spans.impl.js +36 -0
- package/dist/core/export-html/json-spans.impl.js.map +1 -0
- package/dist/core/export-html/json-spans.js +35 -2
- package/dist/core/export-html/oversized-render-inputs.code.js +125 -0
- package/dist/core/export-html/oversized-render-inputs.code.js.map +1 -0
- package/dist/core/export-html/oversized-render-inputs.impl.js +36 -0
- package/dist/core/export-html/oversized-render-inputs.impl.js.map +1 -0
- package/dist/core/export-html/oversized-render-inputs.js +31 -120
- package/dist/core/export-html/oversized-render-inputs.js.map +1 -1
- package/dist/core/export-html/tool-renderer.code.js +350 -0
- package/dist/core/export-html/tool-renderer.code.js.map +1 -0
- package/dist/core/export-html/tool-renderer.impl.js +36 -0
- package/dist/core/export-html/tool-renderer.impl.js.map +1 -0
- package/dist/core/export-html/tool-renderer.js +33 -347
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/jiti-loader.code.js +3 -0
- package/dist/core/extensions/jiti-loader.code.js.map +1 -0
- package/dist/core/extensions/jiti-loader.impl.js +36 -0
- package/dist/core/extensions/jiti-loader.impl.js.map +1 -0
- package/dist/core/extensions/jiti-loader.js +35 -2
- package/dist/core/extensions/jiti-static-loader.code.js +3 -0
- package/dist/core/extensions/jiti-static-loader.code.js.map +1 -0
- package/dist/core/extensions/jiti-static-loader.impl.js +36 -0
- package/dist/core/extensions/jiti-static-loader.impl.js.map +1 -0
- package/dist/core/extensions/jiti-static-loader.js +35 -2
- package/dist/core/extensions/loader-host-modules.code.js +3 -0
- package/dist/core/extensions/loader-host-modules.code.js.map +1 -0
- package/dist/core/extensions/loader-host-modules.impl.js +36 -0
- package/dist/core/extensions/loader-host-modules.impl.js.map +1 -0
- package/dist/core/extensions/loader-host-modules.js +35 -2
- package/dist/core/extensions/loader-virtual-modules.d.ts +1 -6
- package/dist/core/extensions/loader-virtual-modules.js +1 -1
- package/dist/core/extensions/runner-context.js +3 -3
- package/dist/core/extensions/session-events.d.ts +4 -0
- package/dist/core/extensions/session-events.js.map +1 -1
- package/dist/core/intercom-broker-control-host.code.js +5 -0
- package/dist/core/intercom-broker-control-host.code.js.map +1 -0
- package/dist/core/intercom-broker-control-host.impl.js +36 -0
- package/dist/core/intercom-broker-control-host.impl.js.map +1 -0
- package/dist/core/intercom-broker-control-host.js +35 -4
- package/dist/core/intercom-broker-control.code.js +63 -0
- package/dist/core/intercom-broker-control.code.js.map +1 -0
- package/dist/core/intercom-broker-control.d.ts +21 -0
- package/dist/core/intercom-broker-control.impl.js +36 -0
- package/dist/core/intercom-broker-control.impl.js.map +1 -0
- package/dist/core/intercom-broker-control.js +35 -17
- package/dist/core/intercom-broker-control.js.map +1 -1
- package/dist/core/package-manager-storage-adapters.code.js +3 -0
- package/dist/core/package-manager-storage-adapters.code.js.map +1 -0
- package/dist/core/package-manager-storage-adapters.impl.js +36 -0
- package/dist/core/package-manager-storage-adapters.impl.js.map +1 -0
- package/dist/core/package-manager-storage-adapters.js +35 -2
- package/dist/core/process-start-token.d.ts +8 -2
- package/dist/core/process-tree-containment.d.ts +27 -0
- package/dist/core/queued-message-delivery.d.ts +5 -2
- package/dist/core/resume/blueprint/process.d.ts +3 -1
- package/dist/core/sdk.code.js +9 -0
- package/dist/core/sdk.code.js.map +1 -0
- package/dist/core/sdk.impl.js +36 -0
- package/dist/core/sdk.impl.js.map +1 -0
- package/dist/core/sdk.js +35 -8
- package/dist/core/session-manager-core.d.ts +15 -5
- package/dist/core/session-manager-core.js +195 -38
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-list.code.js +3 -0
- package/dist/core/session-manager-list.code.js.map +1 -0
- package/dist/core/session-manager-list.impl.js +36 -0
- package/dist/core/session-manager-list.impl.js.map +1 -0
- package/dist/core/session-manager-list.js +35 -2
- package/dist/core/session-manager-types.d.ts +20 -0
- package/dist/core/session-manager.code.js +8 -0
- package/dist/core/session-manager.code.js.map +1 -0
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.impl.js +36 -0
- package/dist/core/session-manager.impl.js.map +1 -0
- package/dist/core/session-manager.js +35 -7
- package/dist/core/session-storage.code.js +3 -0
- package/dist/core/session-storage.code.js.map +1 -0
- package/dist/core/session-storage.impl.js +36 -0
- package/dist/core/session-storage.impl.js.map +1 -0
- package/dist/core/session-storage.js +35 -2
- package/dist/core/storage/file-identity.d.ts +3 -0
- package/dist/core/storage/file-identity.js +296 -86
- package/dist/core/storage/file-identity.js.map +1 -1
- package/dist/core/storage/index.d.ts +1 -1
- package/dist/core/storage/index.js +52 -7
- package/dist/core/storage/index.js.map +1 -1
- package/dist/core/storage/node-sqlite-thread.js +47 -2
- package/dist/core/storage/node-sqlite.js +49 -4
- package/dist/core/storage/node-sqlite.js.map +1 -1
- package/dist/core/storage/offline-snapshot-file.code.js +37 -0
- package/dist/core/storage/offline-snapshot-file.code.js.map +1 -0
- package/dist/core/storage/offline-snapshot-file.impl.js +36 -0
- package/dist/core/storage/offline-snapshot-file.impl.js.map +1 -0
- package/dist/core/storage/offline-snapshot-file.js +33 -34
- package/dist/core/storage/offline-snapshot-file.js.map +1 -1
- package/dist/core/storage/provider.js +52 -7
- package/dist/core/storage/selection.js +49 -4
- package/dist/core/storage/session/branch-fork-source.code.js +146 -0
- package/dist/core/storage/session/branch-fork-source.code.js.map +1 -0
- package/dist/core/storage/session/branch-fork-source.impl.js +36 -0
- package/dist/core/storage/session/branch-fork-source.impl.js.map +1 -0
- package/dist/core/storage/session/branch-fork-source.js +32 -97
- package/dist/core/storage/session/branch-fork-source.js.map +1 -1
- package/dist/core/storage/session/card-view.code.js +60 -0
- package/dist/core/storage/session/card-view.code.js.map +1 -0
- package/dist/core/storage/session/card-view.impl.js +36 -0
- package/dist/core/storage/session/card-view.impl.js.map +1 -0
- package/dist/core/storage/session/card-view.js +34 -58
- package/dist/core/storage/session/card-view.js.map +1 -1
- package/dist/core/storage/session/child-reader.code.js +139 -0
- package/dist/core/storage/session/child-reader.code.js.map +1 -0
- package/dist/core/storage/session/child-reader.d.ts +1 -0
- package/dist/core/storage/session/child-reader.impl.js +36 -0
- package/dist/core/storage/session/child-reader.impl.js.map +1 -0
- package/dist/core/storage/session/child-reader.js +33 -91
- package/dist/core/storage/session/child-reader.js.map +1 -1
- package/dist/core/storage/session/chunked-resume-projection.code.js +3 -0
- package/dist/core/storage/session/chunked-resume-projection.code.js.map +1 -0
- package/dist/core/storage/session/chunked-resume-projection.impl.js +36 -0
- package/dist/core/storage/session/chunked-resume-projection.impl.js.map +1 -0
- package/dist/core/storage/session/chunked-resume-projection.js +35 -2
- package/dist/core/storage/session/expanded-child-details.code.js +684 -0
- package/dist/core/storage/session/expanded-child-details.code.js.map +1 -0
- package/dist/core/storage/session/expanded-child-details.impl.js +36 -0
- package/dist/core/storage/session/expanded-child-details.impl.js.map +1 -0
- package/dist/core/storage/session/expanded-child-details.js +31 -634
- package/dist/core/storage/session/expanded-child-details.js.map +1 -1
- package/dist/core/storage/session/fork-row-bytes.code.js +3 -0
- package/dist/core/storage/session/fork-row-bytes.code.js.map +1 -0
- package/dist/core/storage/session/fork-row-bytes.impl.js +36 -0
- package/dist/core/storage/session/fork-row-bytes.impl.js.map +1 -0
- package/dist/core/storage/session/fork-row-bytes.js +35 -2
- package/dist/core/storage/session/fork-row-index.code.js +3 -0
- package/dist/core/storage/session/fork-row-index.code.js.map +1 -0
- package/dist/core/storage/session/fork-row-index.impl.js +36 -0
- package/dist/core/storage/session/fork-row-index.impl.js.map +1 -0
- package/dist/core/storage/session/fork-row-index.js +35 -2
- package/dist/core/storage/session/fork-staging.code.js +580 -0
- package/dist/core/storage/session/fork-staging.code.js.map +1 -0
- package/dist/core/storage/session/fork-staging.impl.js +36 -0
- package/dist/core/storage/session/fork-staging.impl.js.map +1 -0
- package/dist/core/storage/session/fork-staging.js +30 -574
- package/dist/core/storage/session/fork-staging.js.map +1 -1
- package/dist/core/storage/session/fork-window.code.js +522 -0
- package/dist/core/storage/session/fork-window.code.js.map +1 -0
- package/dist/core/storage/session/fork-window.impl.js +36 -0
- package/dist/core/storage/session/fork-window.impl.js.map +1 -0
- package/dist/core/storage/session/fork-window.js +30 -471
- package/dist/core/storage/session/fork-window.js.map +1 -1
- package/dist/core/storage/session/history-pages.code.js +3 -0
- package/dist/core/storage/session/history-pages.code.js.map +1 -0
- package/dist/core/storage/session/history-pages.impl.js +36 -0
- package/dist/core/storage/session/history-pages.impl.js.map +1 -0
- package/dist/core/storage/session/history-pages.js +35 -2
- package/dist/core/storage/session/jsonl-entry-projection.code.js +3 -0
- package/dist/core/storage/session/jsonl-entry-projection.code.js.map +1 -0
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +36 -0
- package/dist/core/storage/session/jsonl-entry-projection.impl.js.map +1 -0
- package/dist/core/storage/session/jsonl-entry-projection.js +35 -2
- package/dist/core/storage/session/jsonl-session-store.code.js +3 -0
- package/dist/core/storage/session/jsonl-session-store.code.js.map +1 -0
- package/dist/core/storage/session/jsonl-session-store.impl.js +36 -0
- package/dist/core/storage/session/jsonl-session-store.impl.js.map +1 -0
- package/dist/core/storage/session/jsonl-session-store.js +35 -2
- package/dist/core/storage/session/memory-session-store.code.js +3 -0
- package/dist/core/storage/session/memory-session-store.code.js.map +1 -0
- package/dist/core/storage/session/memory-session-store.impl.js +36 -0
- package/dist/core/storage/session/memory-session-store.impl.js.map +1 -0
- package/dist/core/storage/session/memory-session-store.js +35 -2
- package/dist/core/storage/session/pinned-branch-resume.code.js +117 -0
- package/dist/core/storage/session/pinned-branch-resume.code.js.map +1 -0
- package/dist/core/storage/session/pinned-branch-resume.impl.js +36 -0
- package/dist/core/storage/session/pinned-branch-resume.impl.js.map +1 -0
- package/dist/core/storage/session/pinned-branch-resume.js +33 -69
- package/dist/core/storage/session/pinned-branch-resume.js.map +1 -1
- package/dist/core/storage/session/released-history-files.code.js +465 -0
- package/dist/core/storage/session/released-history-files.code.js.map +1 -0
- package/dist/core/storage/session/released-history-files.impl.js +36 -0
- package/dist/core/storage/session/released-history-files.impl.js.map +1 -0
- package/dist/core/storage/session/released-history-files.js +32 -461
- package/dist/core/storage/session/released-history-files.js.map +1 -1
- package/dist/core/storage/session/resident-fork-rows.code.js +57 -0
- package/dist/core/storage/session/resident-fork-rows.code.js.map +1 -0
- package/dist/core/storage/session/resident-fork-rows.impl.js +36 -0
- package/dist/core/storage/session/resident-fork-rows.impl.js.map +1 -0
- package/dist/core/storage/session/resident-fork-rows.js +32 -53
- package/dist/core/storage/session/resident-fork-rows.js.map +1 -1
- package/dist/core/storage/session/session-resume.code.js +3 -0
- package/dist/core/storage/session/session-resume.code.js.map +1 -0
- package/dist/core/storage/session/session-resume.impl.js +36 -0
- package/dist/core/storage/session/session-resume.impl.js.map +1 -0
- package/dist/core/storage/session/session-resume.js +35 -2
- package/dist/core/storage/session/snapshot-cut.code.js +3 -0
- package/dist/core/storage/session/snapshot-cut.code.js.map +1 -0
- package/dist/core/storage/session/snapshot-cut.impl.js +36 -0
- package/dist/core/storage/session/snapshot-cut.impl.js.map +1 -0
- package/dist/core/storage/session/snapshot-cut.js +35 -2
- package/dist/core/storage/session/snapshot-history.code.js +107 -0
- package/dist/core/storage/session/snapshot-history.code.js.map +1 -0
- package/dist/core/storage/session/snapshot-history.impl.js +36 -0
- package/dist/core/storage/session/snapshot-history.impl.js.map +1 -0
- package/dist/core/storage/session/snapshot-history.js +34 -60
- package/dist/core/storage/session/snapshot-history.js.map +1 -1
- package/dist/core/storage/session/sql-session-store.code.js +3 -0
- package/dist/core/storage/session/sql-session-store.code.js.map +1 -0
- package/dist/core/storage/session/sql-session-store.impl.js +36 -0
- package/dist/core/storage/session/sql-session-store.impl.js.map +1 -0
- package/dist/core/storage/session/sql-session-store.js +35 -2
- package/dist/core/storage/session/tree-outline.code.js +3 -0
- package/dist/core/storage/session/tree-outline.code.js.map +1 -0
- package/dist/core/storage/session/tree-outline.impl.js +36 -0
- package/dist/core/storage/session/tree-outline.impl.js.map +1 -0
- package/dist/core/storage/session/tree-outline.js +35 -2
- package/dist/core/storage/session/tree-presentation.code.js +342 -0
- package/dist/core/storage/session/tree-presentation.code.js.map +1 -0
- package/dist/core/storage/session/tree-presentation.impl.js +36 -0
- package/dist/core/storage/session/tree-presentation.impl.js.map +1 -0
- package/dist/core/storage/session/tree-presentation.js +31 -337
- package/dist/core/storage/session/tree-presentation.js.map +1 -1
- package/dist/core/storage/session/types.d.ts +26 -0
- package/dist/core/storage/storage-status.code.js +3 -0
- package/dist/core/storage/storage-status.code.js.map +1 -0
- package/dist/core/storage/storage-status.impl.js +36 -0
- package/dist/core/storage/storage-status.impl.js.map +1 -0
- package/dist/core/storage/storage-status.js +35 -2
- package/dist/core/storage/team.code.js +3 -0
- package/dist/core/storage/team.code.js.map +1 -0
- package/dist/core/storage/team.impl.js +36 -0
- package/dist/core/storage/team.impl.js.map +1 -0
- package/dist/core/storage/team.js +35 -2
- package/dist/core/structured-output/index.code.js +3 -0
- package/dist/core/structured-output/index.code.js.map +1 -0
- package/dist/core/structured-output/index.impl.js +36 -0
- package/dist/core/structured-output/index.impl.js.map +1 -0
- package/dist/core/structured-output/index.js +35 -2
- package/dist/core/tasks/command-output.d.ts +4 -1
- package/dist/core/tasks/supervisor.d.ts +2 -0
- package/dist/core/tasks/task-completion-entry.code.js +254 -0
- package/dist/core/tasks/task-completion-entry.code.js.map +1 -0
- package/dist/core/tasks/task-completion-entry.impl.js +36 -0
- package/dist/core/tasks/task-completion-entry.impl.js.map +1 -0
- package/dist/core/tasks/task-completion-entry.js +33 -251
- package/dist/core/tasks/task-completion-entry.js.map +1 -1
- package/dist/core/tasks/task-file-history.code.js +424 -0
- package/dist/core/tasks/task-file-history.code.js.map +1 -0
- package/dist/core/tasks/task-file-history.impl.js +36 -0
- package/dist/core/tasks/task-file-history.impl.js.map +1 -0
- package/dist/core/tasks/task-file-history.js +32 -375
- package/dist/core/tasks/task-file-history.js.map +1 -1
- package/dist/core/tasks/task-reference-archive.code.js +514 -0
- package/dist/core/tasks/task-reference-archive.code.js.map +1 -0
- package/dist/core/tasks/task-reference-archive.js +34 -467
- package/dist/core/tasks/task-reference-archive.js.map +1 -1
- package/dist/core/tasks/task-reference-identity.code.js +164 -0
- package/dist/core/tasks/task-reference-identity.code.js.map +1 -0
- package/dist/core/tasks/task-reference-identity.js +32 -160
- package/dist/core/tasks/task-reference-identity.js.map +1 -1
- package/dist/core/tasks/task-reference-stream.code.js +3 -0
- package/dist/core/tasks/task-reference-stream.code.js.map +1 -0
- package/dist/core/tasks/task-reference-stream.impl.js +36 -0
- package/dist/core/tasks/task-reference-stream.impl.js.map +1 -0
- package/dist/core/tasks/task-reference-stream.js +35 -2
- package/dist/core/tasks/task-unsaved-answer.code.js +3 -0
- package/dist/core/tasks/task-unsaved-answer.code.js.map +1 -0
- package/dist/core/tasks/task-unsaved-answer.impl.js +36 -0
- package/dist/core/tasks/task-unsaved-answer.impl.js.map +1 -0
- package/dist/core/tasks/task-unsaved-answer.js +35 -2
- package/dist/core/tasks/task-view-source.code.js +3 -0
- package/dist/core/tasks/task-view-source.code.js.map +1 -0
- package/dist/core/tasks/task-view-source.d.ts +9 -0
- package/dist/core/tasks/task-view-source.impl.js +36 -0
- package/dist/core/tasks/task-view-source.impl.js.map +1 -0
- package/dist/core/tasks/task-view-source.js +35 -2
- package/dist/core/tools/read-url.code.js +1530 -0
- package/dist/core/tools/read-url.code.js.map +1 -0
- package/dist/core/tools/read-url.impl.js +36 -0
- package/dist/core/tools/read-url.impl.js.map +1 -0
- package/dist/core/tools/read-url.js +30 -1524
- package/dist/core/tools/read-url.js.map +1 -1
- package/dist/core/worktree-snapshot/blob-store.js +50 -5
- package/dist/core/worktree-snapshot/errors.code.js +6 -0
- package/dist/core/worktree-snapshot/errors.code.js.map +1 -0
- package/dist/core/worktree-snapshot/errors.impl.js +36 -0
- package/dist/core/worktree-snapshot/errors.impl.js.map +1 -0
- package/dist/core/worktree-snapshot/errors.js +35 -5
- package/dist/core/worktree-snapshot/session-index-reset.code.js +136 -0
- package/dist/core/worktree-snapshot/session-index-reset.code.js.map +1 -0
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +36 -0
- package/dist/core/worktree-snapshot/session-index-reset.impl.js.map +1 -0
- package/dist/core/worktree-snapshot/session-index-reset.js +34 -134
- package/dist/core/worktree-snapshot/session-index-reset.js.map +1 -1
- package/dist/extensions/codemode/execute.code.js +618 -0
- package/dist/extensions/codemode/execute.code.js.map +1 -0
- package/dist/extensions/codemode/execute.impl.js +36 -0
- package/dist/extensions/codemode/execute.impl.js.map +1 -0
- package/dist/extensions/codemode/execute.js +30 -612
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/renderer.code.js +110 -0
- package/dist/extensions/codemode/renderer.code.js.map +1 -0
- package/dist/extensions/codemode/renderer.impl.js +36 -0
- package/dist/extensions/codemode/renderer.impl.js.map +1 -0
- package/dist/extensions/codemode/renderer.js +33 -107
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/mcp/cli.code.js +565 -0
- package/dist/extensions/mcp/cli.code.js.map +1 -0
- package/dist/extensions/mcp/cli.impl.js +36 -0
- package/dist/extensions/mcp/cli.impl.js.map +1 -0
- package/dist/extensions/mcp/cli.js +32 -561
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/cli.lazy.code.js +52 -0
- package/dist/extensions/mcp/cli.lazy.code.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.impl.js +36 -0
- package/dist/extensions/mcp/cli.lazy.impl.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.js +36 -7
- package/dist/extensions/mcp/cli.lazy.js.map +1 -1
- package/dist/extensions/mcp/client/transports/stdio.d.ts +2 -0
- package/dist/extensions/mcp/runtime.code.js +5 -0
- package/dist/extensions/mcp/runtime.code.js.map +1 -0
- package/dist/extensions/mcp/runtime.impl.js +36 -0
- package/dist/extensions/mcp/runtime.impl.js.map +1 -0
- package/dist/extensions/mcp/runtime.js +35 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/main-first-time-setup.code.js +12 -0
- package/dist/main-first-time-setup.code.js.map +1 -0
- package/dist/main-first-time-setup.impl.js +36 -0
- package/dist/main-first-time-setup.impl.js.map +1 -0
- package/dist/main-first-time-setup.js +35 -11
- package/dist/main-first-time-setup.js.map +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.js +2 -2
- package/dist/modes/interactive/agent-view/agent-view-switcher.d.ts +6 -1
- package/dist/modes/interactive/agent-view/contracts.d.ts +4 -0
- package/dist/modes/interactive/chat-reader-records.d.ts +1 -1
- package/dist/modes/interactive/components/stored-tree-view.code.js +338 -0
- package/dist/modes/interactive/components/stored-tree-view.code.js.map +1 -0
- package/dist/modes/interactive/components/stored-tree-view.impl.js +36 -0
- package/dist/modes/interactive/components/stored-tree-view.impl.js.map +1 -0
- package/dist/modes/interactive/components/stored-tree-view.js +33 -290
- package/dist/modes/interactive/components/stored-tree-view.js.map +1 -1
- package/dist/modes/interactive/components/task-selection-state.d.ts +8 -3
- package/dist/modes/interactive/components/task-transcript-page.d.ts +1 -0
- package/dist/modes/interactive/components/user-message-selector-archive.code.js +191 -0
- package/dist/modes/interactive/components/user-message-selector-archive.code.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +36 -0
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector-archive.js +34 -189
- package/dist/modes/interactive/components/user-message-selector-archive.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +6 -0
- package/dist/modes/interactive/interactive-mode-deps.js +4 -0
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +1 -1
- package/dist/modes/interactive/interactive-queueing.d.ts +4 -0
- package/dist/modes/interactive/interactive-render-chat.d.ts +22 -0
- package/dist/modes/interactive/interactive-startup.d.ts +2 -0
- package/dist/modes/interactive/program-status-reporter.d.ts +2 -1
- package/dist/modes/interactive/startup-shell-eligibility.js +1 -1
- package/dist/modes/interactive/steering-queue-controller.d.ts +4 -0
- package/dist/modes/interactive/theme/theme-schema-factory.d.ts +26 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts +4 -5
- package/dist/modes/interactive-engine/engine-prewarm.d.ts +30 -5
- package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +7 -0
- package/dist/modes/interactive-engine/protocol.d.ts +32 -1
- package/dist/modes/rpc/agent-view-rpc-types.d.ts +12 -1
- package/dist/modes/rpc/agent-view-rpc-types.js.map +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +3 -1
- package/dist/modes/rpc/rpc-types.d.ts +12 -0
- package/dist/package-manager-cli.code.js +1140 -0
- package/dist/package-manager-cli.code.js.map +1 -0
- package/dist/package-manager-cli.impl.js +36 -0
- package/dist/package-manager-cli.impl.js.map +1 -0
- package/dist/package-manager-cli.js +36 -1067
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/rpc-entry.js +2 -2
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/10.js +1 -1
- package/dist/startup-stages/11.js +1 -1
- package/dist/startup-stages/12.js +1 -1
- package/dist/startup-stages/13.js +1 -0
- package/dist/startup-stages/2.js +1 -7
- package/dist/startup-stages/3.js +6 -2
- package/dist/startup-stages/4.js +2 -1
- package/dist/startup-stages/5.js +1 -7
- package/dist/startup-stages/6.js +7 -10
- package/dist/startup-stages/7.js +10 -3
- package/dist/startup-stages/8.js +3 -6
- package/dist/startup-stages/9.js +6 -1
- package/dist/startup-stages/stages.json +1 -1
- package/dist/utils/canonical-path.js +2 -0
- package/dist/utils/canonical-path.js.map +1 -1
- package/dist/utils/child-process.d.ts +41 -1
- package/dist/utils/compile-cache-warmup-host.js +63 -18
- package/dist/utils/compile-cache-warmup-host.js.map +1 -1
- package/dist/utils/credential-redaction.d.ts +50 -1
- package/dist/utils/interactive-engine-bootstrap.d.ts +2 -0
- package/dist/utils/interactive-engine-env.d.ts +2 -0
- package/dist/utils/memoize-async.d.ts +32 -0
- package/dist/utils/memoize-async.js +91 -0
- package/dist/utils/memoize-async.js.map +1 -0
- package/dist/utils/photon.js +19 -29
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/shell.d.ts +7 -4
- package/dist/utils/startup-database-spare.code.js +108 -0
- package/dist/utils/startup-database-spare.code.js.map +1 -0
- package/dist/utils/startup-database-spare.impl.js +36 -0
- package/dist/utils/startup-database-spare.impl.js.map +1 -0
- package/dist/utils/startup-database-spare.js +33 -105
- package/dist/utils/startup-database-spare.js.map +1 -1
- package/dist/utils/tools-manager.code.js +3 -0
- package/dist/utils/tools-manager.code.js.map +1 -0
- package/dist/utils/tools-manager.impl.js +36 -0
- package/dist/utils/tools-manager.impl.js.map +1 -0
- package/dist/utils/tools-manager.js +35 -2
- package/dist/utils/windows-cwd.js +585 -0
- package/dist/utils/windows-cwd.js.map +1 -0
- package/docs/extensions.md +1 -1
- package/docs/getting-started/installation.md +2 -0
- package/docs/intercom/operations.md +1 -0
- package/docs/reference/cli.md +2 -2
- package/package.json +24 -24
- package/dist/_shared/mode-shared-HP7GUA7J.js.map +0 -1
- package/dist/_shared/p1a-prewarm-YK3KDTLN.js.map +0 -1
- package/dist/_shared/p1b-elig-PXQA2FYP.js.map +0 -1
- package/dist/_shared/startup-0-0-X4NF3GKM.js.map +0 -1
- package/dist/_shared/startup-0-1-7QTG6VJZ.js.map +0 -1
- package/dist/_shared/startup-0-2-KFDYPDJK.js.map +0 -1
- package/dist/_shared/startup-8-1-KQJBDKRU.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __commonJSMin } from "./rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
import { APP_NAME, createChildProcessEnvironment, getAgentConfigPaths, getAgentDir, getBinDir, normalizePath, stripBom } from "./p0-cli-
|
|
3
|
-
import { DEFAULT_MAX_BYTES, DEFAULT_MAX_RESULT_SIZE_CHARS, GitUnavailableError, PERSISTED_OUTPUT_CLOSING_TAG, PERSISTED_OUTPUT_TAG, PREVIEW_SIZE_BYTES, ROW_INTENT_META, TASK_MARKS, TOOL_RESULTS_SUBDIR, VERBATIM_COMPACTION_STRATEGY, createConversationRegion, createGitEnvironment, flushable, getErrnoCode, isGitUnavailableError, many, minimatch, none, omitLegacyThinkingSections, raceWithAbortSignal, readLedger, redactCredentials, require_constants, require_identity, require_resolve_end, require_stringifyNumber, resolvePhysicalPath, resolvePhysicalPathAsync, rootKey, styleFieldTone, truncateTail } from "./startup-0-0-
|
|
4
|
-
import { LEGACY_AZURE_PROVIDER, MultiSelectView, WorkspaceBindingError, WorkspaceCollectionError, WorkspaceConfigError, WorkspaceRestoreError, WorkspaceSnapshotError, WorkspaceTimeoutError, convertToLlm, createBranchSummaryMessage, createCustomMessage, crossTabLeftWidthWithDonation, diffWords, extensionRefreshRejection, fixUtf8Stream, gitInstallCommand, messageIsLlmVisible, messageStartsLlmUserTurn, normalizeProviderKeys, require_re, selectActivePreviewPaneIndex, unreadablePathError } from "./startup-0-1-
|
|
2
|
+
import { APP_NAME, createChildProcessEnvironment, getAgentConfigPaths, getAgentDir, getBinDir, normalizePath, stripBom } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
+
import { DEFAULT_MAX_BYTES, DEFAULT_MAX_RESULT_SIZE_CHARS, GitUnavailableError, PERSISTED_OUTPUT_CLOSING_TAG, PERSISTED_OUTPUT_TAG, PREVIEW_SIZE_BYTES, ROW_INTENT_META, TASK_MARKS, TOOL_RESULTS_SUBDIR, VERBATIM_COMPACTION_STRATEGY, createConversationRegion, createGitEnvironment, flushable, getErrnoCode, isGitUnavailableError, many, minimatch, none, omitLegacyThinkingSections, raceWithAbortSignal, readLedger, redactCredentials, require_constants, require_identity, require_resolve_end, require_stringifyNumber, resolvePhysicalPath, resolvePhysicalPathAsync, rootKey, styleFieldTone, truncateTail } from "./startup-0-0-TYUFUOJZ.js";
|
|
4
|
+
import { LEGACY_AZURE_PROVIDER, MultiSelectView, WorkspaceBindingError, WorkspaceCollectionError, WorkspaceConfigError, WorkspaceRestoreError, WorkspaceSnapshotError, WorkspaceTimeoutError, convertToLlm, createBranchSummaryMessage, createCustomMessage, crossTabLeftWidthWithDonation, diffWords, extensionRefreshRejection, fixUtf8Stream, gitInstallCommand, messageIsLlmVisible, messageStartsLlmUserTurn, normalizeProviderKeys, require_re, selectActivePreviewPaneIndex, unreadablePathError } from "./startup-0-1-D4LGGINF.js";
|
|
5
5
|
import { OVERLAY_ACTIVE_ROW_MARKER, TerminalTextSanitizer, getMarkdownTheme, keyHintIfBound, singleLineDisplayText, terminalDisplayText, theme } from "./p2-shell-main-B2WIALFD.js";
|
|
6
6
|
import { stripJsonComments } from "./p1-shared-RG5I5LJ6.js";
|
|
7
|
-
import { processStartTokenAsync, takeTakeoverMutexAsync } from "./p1b-elig-
|
|
7
|
+
import { nativeProcessCreationTime, nativeTerminateProcess, processStartTokenAsync, readProcessCreationTime, takeTakeoverMutexAsync, windowsStartTokenForCreationTime } from "./p1b-elig-ENCUPKKJ.js";
|
|
8
8
|
import { windowsPowerShellEnvironment } from "./p1-elig-shell-WWRO3L2R.js";
|
|
9
|
-
import { ChatRowView, DialogView, FileAuthStorageBackend, InMemoryAuthStorageBackend, OptionListView, PreviewBlockRenderer, QuestionnairePropsAdapter, asyncAuthStorageReads, ensureSessionTempDirAsync, ensureTempDirAsync, estimateProjectedContextTokens, gen, killProcessTree, normalizeDerivedSessionEntries, require_semver, resolveSessionTempDirPath, selectChatRowProps, selectDialogProps, selectMultiSelectProps, selectOptionListProps, selectPreviewPaneProps, selectSubmitPickerProps, selectTabBarProps } from "./startup-0-2-
|
|
9
|
+
import { ChatRowView, DialogView, FileAuthStorageBackend, InMemoryAuthStorageBackend, OptionListView, PreviewBlockRenderer, QuestionnairePropsAdapter, asyncAuthStorageReads, ensureSessionTempDirAsync, ensureTempDirAsync, estimateProjectedContextTokens, gen, killProcessTree, normalizeDerivedSessionEntries, require_semver, resolveSessionTempDirPath, selectChatRowProps, selectDialogProps, selectMultiSelectProps, selectOptionListProps, selectPreviewPaneProps, selectSubmitPickerProps, selectTabBarProps } from "./startup-0-2-SZGQIWHI.js";
|
|
10
10
|
import { PersistedOutputFile, PreviewPane, applyContextEdit, atomicWorkingGlyph, buildSessionProjection, capPersistedText, clearConfigValueCache, collectContextEdits, containsConfiguredValue, createCodemodeToolDefinition, getConfigValueEnvVarNames, getHomeDir, isCommandConfigValue, isConfigValueConfigured, isLegacyEnvVarNameConfigValue, loadCodemodeRenderers, processImage, require_Alias, require_Scalar, require_compare, require_compare_build, require_parse, resolveConfigValueAsync, resolveConfigValueOrThrowAsync, resolveHeadersOrThrowAsync, resolveWorktreeSnapshotSettings, runWorkspaceProcess, sessionEntryToContextMessages, sha256Hex, splitFallbackModel, stepProcessWatcher, stepStartingWatcher, waitFor } from "./startup-0-3-T4DVFYWX.js";
|
|
11
11
|
import { SETTINGS_DEFAULTS } from "./p2-common-YLSYXMDQ.js";
|
|
12
12
|
import { access, chmod, lstat, mkdir, open, readFile, rm } from "node:fs/promises";
|
|
@@ -16,7 +16,7 @@ import { hostname, tmpdir } from "node:os";
|
|
|
16
16
|
import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, relative as relative$1, resolve as resolve$1, sep as sep$1 } from "node:path";
|
|
17
17
|
import { execFile } from "node:child_process";
|
|
18
18
|
import { pathExists as pathExists$1 } from "../utils/path-exists.js";
|
|
19
|
-
import { constants as constants$2, mkdirSync as mkdirSync$1, renameSync as renameSync$1, writeFileSync as writeFileSync$1 } from "node:fs";
|
|
19
|
+
import { constants as constants$2, mkdirSync as mkdirSync$1, renameSync as renameSync$1, rmSync as rmSync$1, writeFileSync as writeFileSync$1 } from "node:fs";
|
|
20
20
|
import { containsKnownEnvCredential, isModelType, normalizeProviderId, toInlineImage } from "@bastani/atomic-ai";
|
|
21
21
|
import { Input, Markdown, Text, stripTerminalSequences, truncateToWidth, visibleWidth } from "@bastani/atomic-tui";
|
|
22
22
|
import { StoreClosedError } from "../core/storage/errors.js";
|
|
@@ -1436,13 +1436,24 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1436
1436
|
exports.resolveFlowScalar = resolveFlowScalar;
|
|
1437
1437
|
}));
|
|
1438
1438
|
const HOST = createHash("sha256").update(hostname()).digest("hex").slice(0, 12);
|
|
1439
|
-
async function locked(pid) {
|
|
1440
|
-
const start = await processStartTokenAsync(pid);
|
|
1439
|
+
async function locked(pid, options) {
|
|
1440
|
+
const start = options === void 0 ? await processStartTokenAsync(pid) : await processStartTokenAsync(pid, options);
|
|
1441
1441
|
return start === void 0 ? { pid } : {
|
|
1442
1442
|
pid,
|
|
1443
1443
|
start
|
|
1444
1444
|
};
|
|
1445
1445
|
}
|
|
1446
|
+
/** Milliseconds between Windows FILETIME epoch (1601-01-01) and Unix epoch (1970-01-01). */
|
|
1447
|
+
const WINDOWS_EPOCH_OFFSET_MS = 11644473600000n;
|
|
1448
|
+
function filetimeToUnixMs(created) {
|
|
1449
|
+
if (!/^[1-9]\d*$/.test(created)) return void 0;
|
|
1450
|
+
const ms = BigInt(created) / 10000n;
|
|
1451
|
+
if (ms < WINDOWS_EPOCH_OFFSET_MS) return void 0;
|
|
1452
|
+
return Number(ms - WINDOWS_EPOCH_OFFSET_MS);
|
|
1453
|
+
}
|
|
1454
|
+
function windowsStartToken(created) {
|
|
1455
|
+
return windowsStartTokenForCreationTime?.(created) ?? createHash("sha256").update(`windows\n${created}`).digest("hex").slice(0, 12);
|
|
1456
|
+
}
|
|
1446
1457
|
function buildLockPath(storeDir, root) {
|
|
1447
1458
|
return join$1(storeDir, "blueprint-builds", "locks", `${rootKey(root)}.json`);
|
|
1448
1459
|
}
|
|
@@ -1450,12 +1461,36 @@ function isLockedProcess(value) {
|
|
|
1450
1461
|
const candidate = value;
|
|
1451
1462
|
return typeof candidate === "object" && candidate !== null && Number.isInteger(candidate.pid) && (candidate.start === void 0 || typeof candidate.start === "string");
|
|
1452
1463
|
}
|
|
1453
|
-
|
|
1464
|
+
const STEP_START_MAX_ATTEMPTS = 4;
|
|
1465
|
+
const STEP_START_RETRY_MS = 500;
|
|
1466
|
+
const LOCK_IO_MAX_ATTEMPTS = 25;
|
|
1467
|
+
const LOCK_IO_RETRY_MS = 20;
|
|
1468
|
+
const TRANSIENT_LOCK_IO_CODES = /* @__PURE__ */ new Set([
|
|
1469
|
+
"EPERM",
|
|
1470
|
+
"EACCES",
|
|
1471
|
+
"EBUSY"
|
|
1472
|
+
]);
|
|
1473
|
+
const HOLDER_RETRY_KEY = -1;
|
|
1474
|
+
const WRITE_RETRY_KEY = -2;
|
|
1475
|
+
function isTransientWindowsLockError(error, attempt) {
|
|
1476
|
+
const code = error.code ?? "";
|
|
1477
|
+
return process.platform === "win32" && attempt < LOCK_IO_MAX_ATTEMPTS && TRANSIENT_LOCK_IO_CODES.has(code);
|
|
1478
|
+
}
|
|
1479
|
+
async function readLockFile(file, signal) {
|
|
1454
1480
|
let text;
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1481
|
+
for (let attempt = 1;; attempt++) {
|
|
1482
|
+
signal?.throwIfAborted();
|
|
1483
|
+
try {
|
|
1484
|
+
text = await readFile(file, "utf8");
|
|
1485
|
+
break;
|
|
1486
|
+
} catch (error) {
|
|
1487
|
+
if (error.code === "ENOENT") return { kind: "none" };
|
|
1488
|
+
if (isTransientWindowsLockError(error, attempt)) {
|
|
1489
|
+
await delay(LOCK_IO_RETRY_MS, signal);
|
|
1490
|
+
continue;
|
|
1491
|
+
}
|
|
1492
|
+
return { kind: "corrupt" };
|
|
1493
|
+
}
|
|
1459
1494
|
}
|
|
1460
1495
|
try {
|
|
1461
1496
|
const lock = JSON.parse(text);
|
|
@@ -1478,42 +1513,136 @@ async function removeLock(file) {
|
|
|
1478
1513
|
await rm(file, { force: true });
|
|
1479
1514
|
} catch {}
|
|
1480
1515
|
}
|
|
1481
|
-
function
|
|
1516
|
+
function processAlive(pid) {
|
|
1517
|
+
if (!Number.isInteger(pid) || pid <= 0) return false;
|
|
1518
|
+
try {
|
|
1519
|
+
process.kill(pid, 0);
|
|
1520
|
+
return true;
|
|
1521
|
+
} catch (error) {
|
|
1522
|
+
return error.code === "EPERM";
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
function clearRetryTimer(writer, key) {
|
|
1526
|
+
const timer = writer.retryTimers.get(key);
|
|
1527
|
+
if (timer !== void 0) {
|
|
1528
|
+
clearTimeout(timer);
|
|
1529
|
+
writer.retryTimers.delete(key);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
function clearAllRetryTimers(writer) {
|
|
1533
|
+
for (const timer of writer.retryTimers.values()) clearTimeout(timer);
|
|
1534
|
+
writer.retryTimers.clear();
|
|
1535
|
+
}
|
|
1536
|
+
function usesFallbackStartReader() {
|
|
1537
|
+
return process.platform === "win32" && nativeProcessCreationTime?.(process.pid) === void 0;
|
|
1538
|
+
}
|
|
1539
|
+
function readStepStartDurably(writer, pid, step, attempt, stillRunning) {
|
|
1540
|
+
const isAlive = () => stillRunning === void 0 ? processAlive(pid) : stillRunning();
|
|
1541
|
+
if (!isAlive()) return;
|
|
1542
|
+
processStartTokenAsync(pid, { fresh: true }).then((start) => {
|
|
1543
|
+
if (writer.settled || writer.steps.get(pid) !== step || !isAlive()) return;
|
|
1544
|
+
if (start !== void 0) {
|
|
1545
|
+
writer.steps.set(pid, {
|
|
1546
|
+
...step,
|
|
1547
|
+
start
|
|
1548
|
+
});
|
|
1549
|
+
writeBuildLocksDurably(writer);
|
|
1550
|
+
return;
|
|
1551
|
+
}
|
|
1552
|
+
if (!usesFallbackStartReader() || attempt >= STEP_START_MAX_ATTEMPTS) return;
|
|
1553
|
+
clearRetryTimer(writer, pid);
|
|
1554
|
+
const timer = setTimeout(() => {
|
|
1555
|
+
writer.retryTimers.delete(pid);
|
|
1556
|
+
if (writer.settled || writer.steps.get(pid) !== step || !isAlive()) return;
|
|
1557
|
+
readStepStartDurably(writer, pid, step, attempt + 1, stillRunning);
|
|
1558
|
+
}, STEP_START_RETRY_MS);
|
|
1559
|
+
timer.unref?.();
|
|
1560
|
+
writer.retryTimers.set(pid, timer);
|
|
1561
|
+
});
|
|
1562
|
+
}
|
|
1563
|
+
function backfillHolderStart(writer, attempt) {
|
|
1564
|
+
if (writer.settled || writer.holder.start !== void 0) return;
|
|
1565
|
+
if (!usesFallbackStartReader() || attempt >= STEP_START_MAX_ATTEMPTS) return;
|
|
1566
|
+
clearRetryTimer(writer, HOLDER_RETRY_KEY);
|
|
1567
|
+
const timer = setTimeout(() => {
|
|
1568
|
+
writer.retryTimers.delete(HOLDER_RETRY_KEY);
|
|
1569
|
+
if (writer.settled || writer.holder.start !== void 0) return;
|
|
1570
|
+
processStartTokenAsync(process.pid, { fresh: true }).then((start) => {
|
|
1571
|
+
if (writer.settled || writer.holder.start !== void 0) return;
|
|
1572
|
+
if (start !== void 0) {
|
|
1573
|
+
writer.holder = {
|
|
1574
|
+
pid: process.pid,
|
|
1575
|
+
start
|
|
1576
|
+
};
|
|
1577
|
+
if (writer.started) writeBuildLocksDurably(writer);
|
|
1578
|
+
return;
|
|
1579
|
+
}
|
|
1580
|
+
backfillHolderStart(writer, attempt + 1);
|
|
1581
|
+
});
|
|
1582
|
+
}, STEP_START_RETRY_MS);
|
|
1583
|
+
timer.unref?.();
|
|
1584
|
+
writer.retryTimers.set(HOLDER_RETRY_KEY, timer);
|
|
1585
|
+
}
|
|
1586
|
+
function recordStepProcessDurably(writer, pid, running, stillRunning) {
|
|
1482
1587
|
const { steps } = writer;
|
|
1588
|
+
clearRetryTimer(writer, pid);
|
|
1483
1589
|
if (running) {
|
|
1590
|
+
writer.started = true;
|
|
1484
1591
|
const step = {
|
|
1485
1592
|
pid,
|
|
1486
1593
|
at: Date.now()
|
|
1487
1594
|
};
|
|
1488
1595
|
steps.set(pid, step);
|
|
1489
|
-
|
|
1490
|
-
if (start === void 0 || steps.get(pid) !== step) return;
|
|
1491
|
-
steps.set(pid, {
|
|
1492
|
-
...step,
|
|
1493
|
-
start
|
|
1494
|
-
});
|
|
1495
|
-
writeBuildLocksDurably(writer);
|
|
1496
|
-
});
|
|
1596
|
+
readStepStartDurably(writer, pid, step, 1, stillRunning);
|
|
1497
1597
|
} else steps.delete(pid);
|
|
1498
1598
|
writeBuildLocksDurably(writer);
|
|
1499
1599
|
}
|
|
1500
1600
|
function writeBuildLocksDurably(writer) {
|
|
1501
1601
|
if (writer.settled) return;
|
|
1602
|
+
clearRetryTimer(writer, WRITE_RETRY_KEY);
|
|
1502
1603
|
const lock = {
|
|
1503
1604
|
host: HOST,
|
|
1504
1605
|
...writer.holder,
|
|
1505
1606
|
steps: [...writer.steps.values()]
|
|
1506
1607
|
};
|
|
1507
|
-
|
|
1508
|
-
|
|
1608
|
+
let transientFailed = false;
|
|
1609
|
+
let permanentFailed = false;
|
|
1610
|
+
const nextAttempt = writer.writeFailures + 1;
|
|
1611
|
+
for (const [file, root] of writer.files) {
|
|
1509
1612
|
const temporary = `${file}.${process.pid}.tmp`;
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1613
|
+
let dirReady = false;
|
|
1614
|
+
try {
|
|
1615
|
+
mkdirSync$1(dirname$1(file), { recursive: true });
|
|
1616
|
+
dirReady = true;
|
|
1617
|
+
writeFileSync$1(temporary, JSON.stringify(lock), { mode: 384 });
|
|
1618
|
+
renameSync$1(temporary, file);
|
|
1619
|
+
} catch (error) {
|
|
1620
|
+
try {
|
|
1621
|
+
rmSync$1(temporary, { force: true });
|
|
1622
|
+
} catch {}
|
|
1623
|
+
if (dirReady && isTransientWindowsLockError(error, nextAttempt)) {
|
|
1624
|
+
transientFailed = true;
|
|
1625
|
+
continue;
|
|
1626
|
+
}
|
|
1627
|
+
permanentFailed = true;
|
|
1628
|
+
if (writer.told) continue;
|
|
1629
|
+
writer.told = true;
|
|
1630
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
1631
|
+
writer.onUnwritable?.(`The blueprint build lock of ${root} could not be written (${reason.slice(0, 200)}); if Atomic is killed during this build, the next resume cannot tell, and may build the worktree again while a step of this build still runs there.`);
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
if (!transientFailed && !permanentFailed) {
|
|
1635
|
+
writer.writeFailures = 0;
|
|
1636
|
+
return;
|
|
1637
|
+
}
|
|
1638
|
+
if (transientFailed && !writer.settled) {
|
|
1639
|
+
writer.writeFailures = nextAttempt;
|
|
1640
|
+
const timer = setTimeout(() => {
|
|
1641
|
+
writer.retryTimers.delete(WRITE_RETRY_KEY);
|
|
1642
|
+
writeBuildLocksDurably(writer);
|
|
1643
|
+
}, LOCK_IO_RETRY_MS);
|
|
1644
|
+
timer.unref?.();
|
|
1645
|
+
writer.retryTimers.set(WRITE_RETRY_KEY, timer);
|
|
1517
1646
|
}
|
|
1518
1647
|
}
|
|
1519
1648
|
/**
|
|
@@ -1521,23 +1650,20 @@ function writeBuildLocksDurably(writer) {
|
|
|
1521
1650
|
* running process's. `"unknown"` when either start cannot be read: a process of that id runs, but it may be a later
|
|
1522
1651
|
* one given the same id.
|
|
1523
1652
|
*/
|
|
1524
|
-
async function identity(recorded) {
|
|
1525
|
-
|
|
1526
|
-
if (recorded.start
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
} catch (error) {
|
|
1531
|
-
return error.code === "EPERM" ? "unknown" : "gone";
|
|
1532
|
-
}
|
|
1653
|
+
async function identity(recorded, options) {
|
|
1654
|
+
if (!processAlive(recorded.pid)) return "gone";
|
|
1655
|
+
if (recorded.start === void 0) return "unknown";
|
|
1656
|
+
const start = options === void 0 ? await processStartTokenAsync(recorded.pid) : await processStartTokenAsync(recorded.pid, options);
|
|
1657
|
+
if (start !== void 0) return start === recorded.start ? "same" : "gone";
|
|
1658
|
+
return processAlive(recorded.pid) ? "unknown" : "gone";
|
|
1533
1659
|
}
|
|
1534
1660
|
/**
|
|
1535
1661
|
* On Windows, the processes left behind by `steps` whose step process itself has ended: Git for Windows' `bash.exe`
|
|
1536
1662
|
* starts the shell as a child and may end without it, and nothing then ties that shell to a process tree. They are
|
|
1537
1663
|
* found as processes whose parent has a step's id, started after the step and before any later process given that id;
|
|
1538
1664
|
* stopping each stops its own children. Only steps whose start was recorded are followed, and without one the host's
|
|
1539
|
-
* processes are not listed. Each is returned with its
|
|
1540
|
-
* later one given its id.
|
|
1665
|
+
* processes are not listed. Each is returned with its verified creation time and start token, so stopping checks the
|
|
1666
|
+
* exact creation time atomically and the wait follows that process, not a later one given its id.
|
|
1541
1667
|
*/
|
|
1542
1668
|
async function orphanedChildren(steps) {
|
|
1543
1669
|
if (!steps.some((step) => step.start !== void 0 && step.at !== void 0)) return [];
|
|
@@ -1557,7 +1683,15 @@ async function orphanedChildren(steps) {
|
|
|
1557
1683
|
if (candidate.parent !== step.pid || candidate.created < after) continue;
|
|
1558
1684
|
if (before !== void 0 && candidate.created >= before) continue;
|
|
1559
1685
|
if (found.some((known) => known.pid === candidate.pid)) continue;
|
|
1560
|
-
|
|
1686
|
+
const created = await readProcessCreationTime(candidate.pid);
|
|
1687
|
+
if (created === void 0) continue;
|
|
1688
|
+
const createdMs = filetimeToUnixMs(created);
|
|
1689
|
+
if (createdMs === void 0 || createdMs < after || before !== void 0 && createdMs >= before) continue;
|
|
1690
|
+
found.push({
|
|
1691
|
+
pid: candidate.pid,
|
|
1692
|
+
start: windowsStartToken(created),
|
|
1693
|
+
created
|
|
1694
|
+
});
|
|
1561
1695
|
}
|
|
1562
1696
|
}
|
|
1563
1697
|
return found;
|
|
@@ -1594,14 +1728,30 @@ function delay(ms, signal) {
|
|
|
1594
1728
|
signal?.addEventListener("abort", onAbort, { once: true });
|
|
1595
1729
|
});
|
|
1596
1730
|
}
|
|
1597
|
-
async function stepsWhose(steps, wanted) {
|
|
1598
|
-
const identities = await Promise.all(steps.map((step) => identity(step)));
|
|
1731
|
+
async function stepsWhose(steps, wanted, options) {
|
|
1732
|
+
const identities = await Promise.all(steps.map((step) => identity(step, options)));
|
|
1599
1733
|
return steps.filter((_, index) => identities[index] === wanted);
|
|
1600
1734
|
}
|
|
1735
|
+
async function provenForStop(steps) {
|
|
1736
|
+
if (process.platform !== "win32") return stepsWhose(steps, "same");
|
|
1737
|
+
return (await Promise.all(steps.map(async (step) => {
|
|
1738
|
+
if (step.start === void 0) return void 0;
|
|
1739
|
+
const native = nativeProcessCreationTime?.(step.pid);
|
|
1740
|
+
const created = native !== void 0 ? native ?? void 0 : processAlive(step.pid) ? await readProcessCreationTime(step.pid) : void 0;
|
|
1741
|
+
if (created === void 0 || windowsStartToken(created) !== step.start) return void 0;
|
|
1742
|
+
return {
|
|
1743
|
+
...step,
|
|
1744
|
+
created
|
|
1745
|
+
};
|
|
1746
|
+
}))).filter((step) => step !== void 0);
|
|
1747
|
+
}
|
|
1601
1748
|
/** Stops each of `steps` proven to be the step its lock recorded, and `extra`, and waits briefly until they ended. */
|
|
1602
1749
|
async function stopProven(steps, signal, extra = []) {
|
|
1603
|
-
const proven = [...await
|
|
1604
|
-
for (const step of proven)
|
|
1750
|
+
const proven = [...await provenForStop(steps), ...extra];
|
|
1751
|
+
for (const step of proven) if (process.platform === "win32") {
|
|
1752
|
+
if (step.created === void 0) continue;
|
|
1753
|
+
if (nativeTerminateProcess?.(step.pid, step.created, true) === void 0) killProcessTree(step.pid);
|
|
1754
|
+
} else killProcessTree(step.pid);
|
|
1605
1755
|
for (let waited = 0; waited < 50 && (await stepsWhose(proven, "same")).length > 0; waited++) await delay(100, signal);
|
|
1606
1756
|
}
|
|
1607
1757
|
/**
|
|
@@ -1653,7 +1803,7 @@ async function settleLock(file, root, options, wait) {
|
|
|
1653
1803
|
};
|
|
1654
1804
|
let stopped = false;
|
|
1655
1805
|
for (;;) {
|
|
1656
|
-
const read = await readLockFile(file);
|
|
1806
|
+
const read = await readLockFile(file, options.signal);
|
|
1657
1807
|
if (read.kind === "none") return {
|
|
1658
1808
|
warnings: [],
|
|
1659
1809
|
cancelled: false
|
|
@@ -1785,23 +1935,27 @@ async function withBuildLocks(storeDir, roots, build, onUnwritable) {
|
|
|
1785
1935
|
const steps = /* @__PURE__ */ new Map();
|
|
1786
1936
|
const writer = {
|
|
1787
1937
|
files,
|
|
1788
|
-
holder: await locked(process.pid),
|
|
1938
|
+
holder: await locked(process.pid, { fresh: true }),
|
|
1789
1939
|
steps,
|
|
1940
|
+
retryTimers: /* @__PURE__ */ new Map(),
|
|
1790
1941
|
...onUnwritable === void 0 ? {} : { onUnwritable },
|
|
1942
|
+
writeFailures: 0,
|
|
1943
|
+
started: false,
|
|
1791
1944
|
settled: false,
|
|
1792
1945
|
told: false
|
|
1793
1946
|
};
|
|
1794
|
-
|
|
1947
|
+
if (writer.holder.start === void 0) backfillHolderStart(writer, 1);
|
|
1795
1948
|
const starting = () => {
|
|
1796
|
-
if (started) return;
|
|
1797
|
-
started = true;
|
|
1949
|
+
if (writer.started) return;
|
|
1950
|
+
writer.started = true;
|
|
1798
1951
|
writeBuildLocksDurably(writer);
|
|
1799
1952
|
};
|
|
1800
|
-
const watch = (pid, running) => recordStepProcessDurably(writer, pid, running);
|
|
1953
|
+
const watch = (pid, running, stillRunning) => recordStepProcessDurably(writer, pid, running, stillRunning);
|
|
1801
1954
|
try {
|
|
1802
1955
|
return await stepStartingWatcher.run(starting, () => stepProcessWatcher.run(watch, build));
|
|
1803
1956
|
} finally {
|
|
1804
1957
|
writer.settled = true;
|
|
1958
|
+
clearAllRetryTimers(writer);
|
|
1805
1959
|
steps.clear();
|
|
1806
1960
|
for (const file of files.keys()) if ((await readLock(file))?.pid === process.pid) await removeLock(file);
|
|
1807
1961
|
}
|
|
@@ -4438,7 +4592,7 @@ async function redirectOversizedToolResult(input) {
|
|
|
4438
4592
|
// dist/core/workspace/git.js
|
|
4439
4593
|
/** Git provisioning's git (#4322): a system git when it is recent enough, else a portable one it downloads. */
|
|
4440
4594
|
const PROVISIONED_GIT = async (signal) => {
|
|
4441
|
-
const { resolveGit } = await import("../utils/tools-manager.js");
|
|
4595
|
+
const { resolveGit } = await import("../utils/tools-manager.code.js").catch((error) => __atomicOnDemandFailed(error, "this feature"));
|
|
4442
4596
|
const git = await resolveGit({ signal });
|
|
4443
4597
|
const env = {};
|
|
4444
4598
|
for (const [key, value] of Object.entries(git.env)) if (value !== void 0) env[key] = value;
|
|
@@ -4607,13 +4761,16 @@ async function assertWorkspaceGitAvailable(signal) {
|
|
|
4607
4761
|
const { path } = await executable(signal);
|
|
4608
4762
|
let check = availableExecutables.get(path);
|
|
4609
4763
|
if (check === void 0) {
|
|
4610
|
-
|
|
4764
|
+
const current = runWorkspaceGit({
|
|
4611
4765
|
cwd: tmpdir(),
|
|
4612
4766
|
args: ["--version"],
|
|
4613
4767
|
phase: "probe"
|
|
4614
|
-
}).then((result) => assertSupportedVersion(path, result.stdout))
|
|
4615
|
-
|
|
4616
|
-
|
|
4768
|
+
}).then((result) => assertSupportedVersion(path, result.stdout)).catch((error) => {
|
|
4769
|
+
if (availableExecutables.get(path) === current) availableExecutables.delete(path);
|
|
4770
|
+
throw error;
|
|
4771
|
+
});
|
|
4772
|
+
availableExecutables.set(path, current);
|
|
4773
|
+
check = current;
|
|
4617
4774
|
}
|
|
4618
4775
|
await waitFor(check, signal);
|
|
4619
4776
|
}
|
|
@@ -5821,4 +5978,49 @@ async function migrateModelsJsonConfigValuesAsync(agentDir) {
|
|
|
5821
5978
|
}
|
|
5822
5979
|
export { AuthStorage, DEFAULT_BLOB_GRACE_SECONDS, DETAIL_FIRST_PREFIX, DETAIL_PREFIX, MODEL_LABEL_SEPARATOR, NoticeLine, OutputAccumulator, ReadOnlyAuthStorage, SNAPSHOT_COLLECTION_SESSION_DELAY_MS, STATUS_MARKERS, TOOL_BLOCK_LIMITS, ToolBlock, ToolBlockGroup, ToolBlockMarkdown, ToolBlockRecords, accountSnapshotVersion, applyAutoloadDisabledNamePatterns, applyAutoloadDisabledPatterns, applyExtension, applyModelOverride, applyModelsJson, applyNamePatterns, applyPatterns, assertRestorePathBudget, assertWorkspaceGitAvailable, autoDetectCompactionQuery, boundOversizedText, buildQuestionnaire, cancelledBuilds, canonicalPaths, canonicalizeWorktreePath, canonicalizeWorktreePathAsync, captureIndexPath, checkoutStoreIdOf, clearApiKeyCache, codemode_default, collapseToolBlockLines, collectSnapshotGarbage, componentNeedsWorkingClock, composeApiKeyAuth, composeOAuthAuth, configuredApiKey, configuredHeaders, containsAuthConfig, containsCredential, containsCredentialValue, createCodemodeExtension, defaultWorktreeSnapshotStoreDir, executeBashWithOperations, formatModelLabel, formatModelReferenceLabel, gitOutput, hasGlobPattern, isEnabledByOverrides, isOverridePattern, isToolBlock, jsonParser, markdownPreviewRows, migrateAuthJsonConfigValues, migrateAuthJsonConfigValuesAsync, migrateModelsJsonConfigValues, migrateModelsJsonConfigValuesAsync, normalizeToolResultImages, noticeLineText, pathExists$1 as pathExists, prepareCompactionBoundary, rawModelHeaders, readStoredCredential, redirectOversizedToolResult, renderDiff, repositoryIdOf, repositoryIdsOf, require_bool, require_bool$1, require_clean, require_coerce, require_compare_loose, require_createNode, require_diff, require_eq, require_float, require_float$1, require_gt, require_gte, require_lt, require_lte, require_merge, require_neq, require_null, require_prerelease, require_rcompare, require_resolve_block_scalar, require_resolve_flow_scalar, require_rsort, require_sort, require_stringifyString, require_truncate, require_valid, runCanonicalSteps, runCanonicalStepsAsync, runWorkspaceGit, runningSnapshotCollection, sameRemote, scheduleSnapshotCollection, settleOtherBuilds, sharedRepositoryIdOf, sharedRepositoryIdsOf, splitPatterns, stagingWorktreeName, taskEntryReferences, taskTranscriptPageWithCuts, toLlmContent, toPosixPath, withBuildLocks };
|
|
5823
5980
|
|
|
5824
|
-
//# sourceMappingURL=startup-0-4-HN5EB4K7.js.map
|
|
5981
|
+
//# sourceMappingURL=startup-0-4-HN5EB4K7.js.map
|
|
5982
|
+
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
5983
|
+
// demand that fails in a process an in-place update left running says to restart.
|
|
5984
|
+
function __atomicOnDemandFailed(error, feature) {
|
|
5985
|
+
return (async () => {
|
|
5986
|
+
const root = new URL("../", import.meta.url);
|
|
5987
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
5988
|
+
const key = `${root.href}#0.10.5-alpha.1`;
|
|
5989
|
+
let release = releases.get(key);
|
|
5990
|
+
if (release === undefined) {
|
|
5991
|
+
const current = (async () => {
|
|
5992
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
5993
|
+
try {
|
|
5994
|
+
const held = await import(new URL(path, root).href);
|
|
5995
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
5996
|
+
} catch {
|
|
5997
|
+
// Not a file this process can load: the next.
|
|
5998
|
+
}
|
|
5999
|
+
}
|
|
6000
|
+
return undefined;
|
|
6001
|
+
})().then((found) => {
|
|
6002
|
+
if (found === undefined && releases.get(key) === current) releases.delete(key);
|
|
6003
|
+
return found;
|
|
6004
|
+
});
|
|
6005
|
+
releases.set(key, current);
|
|
6006
|
+
release = current;
|
|
6007
|
+
}
|
|
6008
|
+
const running = await release;
|
|
6009
|
+
let installed;
|
|
6010
|
+
try {
|
|
6011
|
+
const { readFile } = process.getBuiltinModule("node:fs/promises");
|
|
6012
|
+
installed = JSON.parse(await readFile(new URL("../package.json", root), "utf8")).version;
|
|
6013
|
+
} catch {
|
|
6014
|
+
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
6015
|
+
}
|
|
6016
|
+
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;
|
|
6017
|
+
if (updatedTo === undefined) throw error;
|
|
6018
|
+
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
6019
|
+
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
6020
|
+
cause: error,
|
|
6021
|
+
});
|
|
6022
|
+
restart.name = "UpdatedInstallError";
|
|
6023
|
+
restart[Symbol.for("atomic.on-demand-restart.v1")] = { application, updatedTo, feature };
|
|
6024
|
+
throw restart;
|
|
6025
|
+
})();
|
|
6026
|
+
}
|