@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,8 +1,8 @@
|
|
|
1
1
|
import { __name } from "./rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
import { createSessionCwdMatcher, normalizePath, resolvePath } from "./p0-cli-
|
|
3
|
-
import { CURRENT_SESSION_VERSION, EntryTypeReader, JsonTextChecker, applySessionSummaryEntries, bindChatEpoch, boundedChatRecord, decodeChatRecord, firstChatOrders, getErrnoCode, historySnapshotFor, inheritForkScope, isClassifiedWorkflowSession, materializeSessionSummaryMetadata, noteSnapshotGeneration, observeReferenceCut, readLines, referenceMetadataRead, registerArchiveLoad, registerForkScope, require_sha256, sha256Hex, summarizeSession, yieldTurn } from "./startup-0-0-
|
|
4
|
-
import { AgentRehydrateError, AgentReleaseConfigError, SessionKeyDigests, appendFileChatRecord, deleteFileChatRecords, hasFileChatRecords, latestLegacyMessageTime, legacyCompletionTarget, readFileChatOrders, readFileChatRecords, rememberEarlierCompletion, summarizeLegacySession } from "./startup-0-1-
|
|
5
|
-
import { agentWakeDispatcher } from "./startup-0-2-
|
|
2
|
+
import { createSessionCwdMatcher, normalizePath, resolvePath } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
+
import { CURRENT_SESSION_VERSION, EntryTypeReader, JsonTextChecker, applySessionSummaryEntries, bindChatEpoch, boundedChatRecord, decodeChatRecord, firstChatOrders, getErrnoCode, historySnapshotFor, inheritForkScope, isClassifiedWorkflowSession, materializeSessionSummaryMetadata, noteSnapshotGeneration, observeReferenceCut, readLines, referenceMetadataRead, registerArchiveLoad, registerForkScope, require_sha256, sha256Hex, summarizeSession, yieldTurn } from "./startup-0-0-TYUFUOJZ.js";
|
|
4
|
+
import { AgentRehydrateError, AgentReleaseConfigError, SessionKeyDigests, appendFileChatRecord, deleteFileChatRecords, hasFileChatRecords, latestLegacyMessageTime, legacyCompletionTarget, readFileChatOrders, readFileChatRecords, rememberEarlierCompletion, summarizeLegacySession } from "./startup-0-1-D4LGGINF.js";
|
|
5
|
+
import { agentWakeDispatcher } from "./startup-0-2-SZGQIWHI.js";
|
|
6
6
|
import { SESSION_HISTORY_CHUNK_BYTES, SESSION_HISTORY_PAGE_BYTES, SESSION_HISTORY_SCAN_ENTRIES, SessionIdError, entrySizeLimit, matchesSessionIdPrefix, yieldSessionTurn } from "./settings-startup-65YEWRV2.js";
|
|
7
7
|
import { access, appendFile, copyFile, link, mkdir, open, readFile, readdir, rename, stat, truncate, unlink, writeFile } from "node:fs/promises";
|
|
8
8
|
import { closeSync, existsSync, openSync, readSync, readdirSync, statSync } from "fs";
|
|
@@ -984,7 +984,7 @@ async function readSessionTail(store, sessionId, fromSeq) {
|
|
|
984
984
|
async function readSessionRange(store, sessionId, startSeq, endSeq, expectedEpoch) {
|
|
985
985
|
if (store.readRange) return expectedEpoch === void 0 ? store.readRange(sessionId, startSeq, endSeq) : store.readRange(sessionId, startSeq, endSeq, expectedEpoch);
|
|
986
986
|
const snapshot = await store.load(sessionId);
|
|
987
|
-
const { assertSnapshotCut } = await import("../core/storage/session/snapshot-history.
|
|
987
|
+
const { assertSnapshotCut } = await import("../core/storage/session/snapshot-history.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
988
988
|
assertSnapshotCut(snapshot, expectedEpoch, Math.min(endSeq, snapshot.lastSeq));
|
|
989
989
|
return {
|
|
990
990
|
...sessionRangeOf(snapshot.entries, startSeq, endSeq),
|
|
@@ -1054,21 +1054,31 @@ function selectedPagePlan(sessionId, seqs, lastSeq, bytesOf, backward = false) {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
return { seqs: backward ? selected.reverse() : selected };
|
|
1056
1056
|
}
|
|
1057
|
+
function latestIndexSettingSeq(index, ranges, key) {
|
|
1058
|
+
const seq = index.latest[key]?.at(-1);
|
|
1059
|
+
return seq !== void 0 && onBranch(ranges, seq) ? seq : void 0;
|
|
1060
|
+
}
|
|
1057
1061
|
function sessionResumePlan(index, leafSeq = index.leafSeq, deferChildren = false) {
|
|
1058
1062
|
const compaction = latestCompactionOf(index, leafSeq);
|
|
1059
1063
|
const from = compaction === void 0 ? 1 : Math.min(compaction.retainedStartSeq, compaction.coveredThroughSeq ?? compaction.retainedStartSeq);
|
|
1060
|
-
const
|
|
1064
|
+
const ranges = branchRanges(index, leafSeq);
|
|
1065
|
+
const branch = ranges.map(([a, b]) => [Math.max(a, from), b]).filter(([a, b]) => a <= b).reverse();
|
|
1061
1066
|
const inTail = (seq) => branch.some(([a, b]) => seq >= a && seq <= b);
|
|
1062
1067
|
const acks = index.acks.filter(([intentSeq, ackSeq]) => inTail(intentSeq) && !inTail(ackSeq));
|
|
1063
1068
|
const state = [.../* @__PURE__ */ new Set([...stateSeqsBefore(index, Number.MAX_SAFE_INTEGER, true).filter((seq) => !inTail(seq)), ...acks.map(([, ackSeq]) => ackSeq)])].sort((left, right) => left - right);
|
|
1064
1069
|
const candidates = deferChildren ? new Set(childCatalogCut(index).seqs) : void 0;
|
|
1065
1070
|
const children = candidates ? state.filter((seq) => candidates.has(seq)) : [];
|
|
1071
|
+
const settings = leafSeq === index.leafSeq ? {
|
|
1072
|
+
model: latestIndexSettingSeq(index, ranges, "setting:model_change") ?? null,
|
|
1073
|
+
thinkingLevel: latestIndexSettingSeq(index, ranges, "setting:thinking_level_change") ?? null
|
|
1074
|
+
} : void 0;
|
|
1066
1075
|
return {
|
|
1067
1076
|
leafSeq,
|
|
1068
1077
|
compaction,
|
|
1069
1078
|
branch,
|
|
1070
1079
|
state: children.length ? state.filter((seq) => !candidates.has(seq)) : state,
|
|
1071
|
-
children
|
|
1080
|
+
children,
|
|
1081
|
+
...settings ? { settings } : {}
|
|
1072
1082
|
};
|
|
1073
1083
|
}
|
|
1074
1084
|
/** The resume fold appends these pairs in acknowledgement sequence order. */
|
|
@@ -1152,6 +1162,16 @@ function sessionResumeFrom(index, header, branch, state, leafId, deferred = [])
|
|
|
1152
1162
|
const plan = sessionResumePlan(index);
|
|
1153
1163
|
const boundary = plan.compaction === void 0 ? void 0 : branch.find((held) => held.seq === plan.compaction.seq)?.entry;
|
|
1154
1164
|
const returned = [...state, ...branch].sort((a, b) => a.seq - b.seq);
|
|
1165
|
+
const retainedSetting = (entryType, expectedSeq) => {
|
|
1166
|
+
if (expectedSeq === void 0) return { status: "not-held" };
|
|
1167
|
+
if (expectedSeq === null) return returned.some((held) => held.entry.type === entryType && onBranch(ranges, held.seq)) ? { status: "not-held" } : { status: "none" };
|
|
1168
|
+
const match = returned.find((held) => held.seq === expectedSeq);
|
|
1169
|
+
if (!match || match.entry.type !== entryType || !onBranch(ranges, expectedSeq) || returned.some((held) => held.seq > expectedSeq && held.entry.type === entryType && onBranch(ranges, held.seq))) return { status: "not-held" };
|
|
1170
|
+
return {
|
|
1171
|
+
status: "held",
|
|
1172
|
+
seq: expectedSeq
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1155
1175
|
return {
|
|
1156
1176
|
header,
|
|
1157
1177
|
lastSeq: index.seq,
|
|
@@ -1176,6 +1196,10 @@ function sessionResumeFrom(index, header, branch, state, leafId, deferred = [])
|
|
|
1176
1196
|
})),
|
|
1177
1197
|
aliases: index.childAliases
|
|
1178
1198
|
} } : {},
|
|
1199
|
+
retainedSettings: {
|
|
1200
|
+
model: retainedSetting("model_change", plan.settings?.model),
|
|
1201
|
+
thinkingLevel: retainedSetting("thinking_level_change", plan.settings?.thinkingLevel)
|
|
1202
|
+
},
|
|
1179
1203
|
omitted: omittedTotals(index, branch[0]?.seq ?? index.seq + 1, returned.map((held) => held.entry), returned.some((held) => held.seq === index.latestAssistantSeq)),
|
|
1180
1204
|
recovery: {
|
|
1181
1205
|
workflowStarts: index.workflowStarts,
|
|
@@ -1306,7 +1330,7 @@ function storeSnapshotIndex(store, sessionId, epoch, through) {
|
|
|
1306
1330
|
}
|
|
1307
1331
|
/** The whole entry behind `reference`, when it is a snapshot entry; its type is read first, without its body. */
|
|
1308
1332
|
async function oversizedSnapshotEntry(cut, reference, signal) {
|
|
1309
|
-
const { chunkedBranchState } = await import("../core/storage/session/chunked-resume-projection.
|
|
1333
|
+
const { chunkedBranchState } = await import("../core/storage/session/chunked-resume-projection.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
1310
1334
|
const { type } = await chunkedBranchState(() => cut.chunks(reference, signal));
|
|
1311
1335
|
if (type !== "worktree_snapshot") return void 0;
|
|
1312
1336
|
const decoder = new TextDecoder();
|
|
@@ -2113,7 +2137,7 @@ async function* historyPages(store, sessionId, epoch, watermark, options, packet
|
|
|
2113
2137
|
end: pinned.end,
|
|
2114
2138
|
older: true,
|
|
2115
2139
|
newer: pinned.newer
|
|
2116
|
-
} : store.readBranchSpan ? await store.readBranchSpan(sessionId, branchCut) : await (await import("../core/storage/session/snapshot-history.
|
|
2140
|
+
} : store.readBranchSpan ? await store.readBranchSpan(sessionId, branchCut) : await (await import("../core/storage/session/snapshot-history.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"))).snapshotBranchSpan(snapshotSource(store), sessionId, branchCut);
|
|
2117
2141
|
if (scan && !reverse) pinned = span;
|
|
2118
2142
|
if (leaf !== void 0) {
|
|
2119
2143
|
options.signal?.throwIfAborted();
|
|
@@ -2244,7 +2268,7 @@ async function findInSessionHistory(pages, id, chunks, signal) {
|
|
|
2244
2268
|
if (item.entry.id === id) return item.seq;
|
|
2245
2269
|
} else {
|
|
2246
2270
|
if (!chunks) return void 0;
|
|
2247
|
-
if (await (await import("../core/storage/session/chunked-resume-projection.
|
|
2271
|
+
if (await (await import("../core/storage/session/chunked-resume-projection.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"))).chunkedEntryHasId(chunks(item), id)) return item.seq;
|
|
2248
2272
|
}
|
|
2249
2273
|
}
|
|
2250
2274
|
}
|
|
@@ -3704,8 +3728,8 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
3704
3728
|
try {
|
|
3705
3729
|
const spans = [];
|
|
3706
3730
|
const ids = [];
|
|
3707
|
-
const { encodedForkRow } = await import("../core/storage/session/fork-row-bytes.
|
|
3708
|
-
const { foldForkRow, findForkRow } = await import("../core/storage/session/fork-row-index.
|
|
3731
|
+
const { encodedForkRow } = await import("../core/storage/session/fork-row-bytes.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
3732
|
+
const { foldForkRow, findForkRow } = await import("../core/storage/session/fork-row-index.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
3709
3733
|
const staging = Buffer.allocUnsafe(SESSION_HISTORY_PAGE_BYTES);
|
|
3710
3734
|
let staged = 0;
|
|
3711
3735
|
const flush = async () => {
|
|
@@ -4153,7 +4177,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
4153
4177
|
}
|
|
4154
4178
|
readChildDisplayCut(sessionId, launch) {
|
|
4155
4179
|
return this.run(async () => {
|
|
4156
|
-
const { childDisplayCut } = await import("../core/storage/session/card-view.
|
|
4180
|
+
const { childDisplayCut } = await import("../core/storage/session/card-view.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
4157
4181
|
const { path, jsonl } = await this.indexed(sessionId);
|
|
4158
4182
|
const found = typeof launch.launchLeafId === "string" ? await this.seqInFile(path, jsonl, launch.launchLeafId) : void 0;
|
|
4159
4183
|
return childDisplayCut(jsonl.index, launch, found);
|
|
@@ -4322,7 +4346,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
4322
4346
|
}
|
|
4323
4347
|
readForkWindow(sessionId, entryId, options) {
|
|
4324
4348
|
return this.run(async () => {
|
|
4325
|
-
const { indexedForkWindow, rangedForkMetadata, scanForkRecords } = await import("../core/storage/session/fork-window.
|
|
4349
|
+
const { indexedForkWindow, rangedForkMetadata, scanForkRecords } = await import("../core/storage/session/fork-window.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
4326
4350
|
for (;;) {
|
|
4327
4351
|
const { path, header, jsonl } = await this.indexed(sessionId);
|
|
4328
4352
|
const file = await open(path, "r");
|
|
@@ -5817,8 +5841,8 @@ var MemorySessionStore = class MemorySessionStore {
|
|
|
5817
5841
|
validateSessionHeader(header);
|
|
5818
5842
|
if (this.records.has(header.id)) throw new SessionExistsError(header.id);
|
|
5819
5843
|
const record = this.encodeSession(header, []);
|
|
5820
|
-
const { encodedForkRow } = await import("../core/storage/session/fork-row-bytes.
|
|
5821
|
-
const { foldForkRow, findForkRow, forkIdHash } = await import("../core/storage/session/fork-row-index.
|
|
5844
|
+
const { encodedForkRow } = await import("../core/storage/session/fork-row-bytes.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
5845
|
+
const { foldForkRow, findForkRow, forkIdHash } = await import("../core/storage/session/fork-row-index.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
5822
5846
|
const ids = [];
|
|
5823
5847
|
const lookup = (id) => findForkRow(id, ids, async function* (seq) {
|
|
5824
5848
|
const data = record.entries[seq - 1];
|
|
@@ -6100,7 +6124,7 @@ var MemorySessionStore = class MemorySessionStore {
|
|
|
6100
6124
|
async appendPrivateMirrorChunks(id, seq, size, chunks) {
|
|
6101
6125
|
const record = this.privateMirrorRecord(id);
|
|
6102
6126
|
if (record.lastSeq + 1 !== seq) throw new SessionConflictError(id, seq - 1, record.lastSeq);
|
|
6103
|
-
const bytes = new Uint8Array(size), { entryProjector } = await import("../core/storage/session/jsonl-entry-projection.
|
|
6127
|
+
const bytes = new Uint8Array(size), { entryProjector } = await import("../core/storage/session/jsonl-entry-projection.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
6104
6128
|
const project = entryProjector();
|
|
6105
6129
|
let at = 0;
|
|
6106
6130
|
for await (const chunk of chunks) {
|
|
@@ -6237,7 +6261,7 @@ var MemorySessionStore = class MemorySessionStore {
|
|
|
6237
6261
|
}
|
|
6238
6262
|
}
|
|
6239
6263
|
async readChildDisplayCut(sessionId, launch) {
|
|
6240
|
-
const { childDisplayCut } = await import("../core/storage/session/card-view.
|
|
6264
|
+
const { childDisplayCut } = await import("../core/storage/session/card-view.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
6241
6265
|
for (;;) {
|
|
6242
6266
|
const record = await this.settledRecord(sessionId);
|
|
6243
6267
|
const index = await this.resumeIndex(sessionId, record);
|
|
@@ -6322,7 +6346,7 @@ var MemorySessionStore = class MemorySessionStore {
|
|
|
6322
6346
|
}
|
|
6323
6347
|
}
|
|
6324
6348
|
async readForkWindow(sessionId, entryId, options) {
|
|
6325
|
-
const { indexedForkWindow, rangedForkMetadata, scanForkRecords, locateFork, fullForkWindow } = await import("../core/storage/session/fork-window.
|
|
6349
|
+
const { indexedForkWindow, rangedForkMetadata, scanForkRecords, locateFork, fullForkWindow } = await import("../core/storage/session/fork-window.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
6326
6350
|
for (;;) {
|
|
6327
6351
|
const record = await this.settledRecord(sessionId);
|
|
6328
6352
|
if (record.directory && !record.directory.readRange) {
|
|
@@ -6651,7 +6675,7 @@ var MemorySessionStore = class MemorySessionStore {
|
|
|
6651
6675
|
while (last >= 1) {
|
|
6652
6676
|
const [low, high] = this.spanOf(held, last, last);
|
|
6653
6677
|
if (high - low > SCAN_WINDOW_BYTES && (!held.directory || held.directory.readRange)) {
|
|
6654
|
-
const { chunkedEntryHasId } = await import("../core/storage/session/chunked-resume-projection.
|
|
6678
|
+
const { chunkedEntryHasId } = await import("../core/storage/session/chunked-resume-projection.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
6655
6679
|
const read = (start, end) => this.bytesOf(sessionId, held, start, end);
|
|
6656
6680
|
async function* parts() {
|
|
6657
6681
|
for (let start = low; start < high; start += SESSION_HISTORY_CHUNK_BYTES) yield await read(start, Math.min(high, start + SESSION_HISTORY_CHUNK_BYTES));
|
|
@@ -7566,7 +7590,7 @@ async function archivedAnswerAt(store, id, epoch, through, firstSeq, parent, edi
|
|
|
7566
7590
|
const replacement = async (seq) => {
|
|
7567
7591
|
for await (const { items } of pages(seq, seq)) {
|
|
7568
7592
|
const item = items[0];
|
|
7569
|
-
if (!("entry" in item)) return (await import("../core/storage/session/chunked-resume-projection.
|
|
7593
|
+
if (!("entry" in item)) return (await import("../core/storage/session/chunked-resume-projection.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"))).chunkedAnswerContent(chunks(item), true);
|
|
7570
7594
|
if (item.entry.type === "context_edit") return item.entry.replacement === null ? null : contentText(item.entry.replacement.content);
|
|
7571
7595
|
}
|
|
7572
7596
|
};
|
|
@@ -7583,13 +7607,13 @@ async function archivedAnswerAt(store, id, epoch, through, firstSeq, parent, edi
|
|
|
7583
7607
|
role: raw.type === "message" ? raw.message.role : void 0,
|
|
7584
7608
|
stop: raw.type === "message" && raw.message.role === "assistant" && raw.message.stopReason === "stop"
|
|
7585
7609
|
};
|
|
7586
|
-
} else entry = await (await import("../core/storage/session/chunked-resume-projection.
|
|
7610
|
+
} else entry = await (await import("../core/storage/session/chunked-resume-projection.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"))).chunkedAnswerHeader(chunks(item));
|
|
7587
7611
|
if (entry.id !== parent) continue;
|
|
7588
7612
|
parent = entry.parentId;
|
|
7589
7613
|
if (entry.targetId !== void 0 && !latest.has(entry.targetId)) latest.set(entry.targetId, item.seq);
|
|
7590
7614
|
if (entry.type === "message" && entry.role === "assistant") {
|
|
7591
7615
|
const edited = latest.get(entry.id);
|
|
7592
|
-
const text = overlay?.targetId === entry.id ? overlay.replacement === null ? null : contentText(overlay.replacement.content) : edited !== void 0 ? await replacement(edited) : "entry" in item ? contentText(item.entry.type === "message" && item.entry.message.role === "assistant" && item.entry.message.content) : await (await import("../core/storage/session/chunked-resume-projection.
|
|
7616
|
+
const text = overlay?.targetId === entry.id ? overlay.replacement === null ? null : contentText(overlay.replacement.content) : edited !== void 0 ? await replacement(edited) : "entry" in item ? contentText(item.entry.type === "message" && item.entry.message.role === "assistant" && item.entry.message.content) : await (await import("../core/storage/session/chunked-resume-projection.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"))).chunkedAnswerContent(chunks(item), false);
|
|
7593
7617
|
if (text !== null && (text || entry.stop)) return text ? { text } : {};
|
|
7594
7618
|
}
|
|
7595
7619
|
if (parent === null) return;
|
|
@@ -7721,7 +7745,7 @@ var LegacySessionStore = class LegacySessionStore {
|
|
|
7721
7745
|
}
|
|
7722
7746
|
async updateHeader(header, options) {
|
|
7723
7747
|
await this.convert(header.id);
|
|
7724
|
-
return (await import("../core/storage/session/snapshot-history.
|
|
7748
|
+
return (await import("../core/storage/session/snapshot-history.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"))).updateStoredHeader(this.inner, header, options);
|
|
7725
7749
|
}
|
|
7726
7750
|
async load(sessionId) {
|
|
7727
7751
|
await this.convert(sessionId);
|
|
@@ -7735,7 +7759,7 @@ var LegacySessionStore = class LegacySessionStore {
|
|
|
7735
7759
|
await this.convert(sessionId);
|
|
7736
7760
|
if (this.inner.readRange) return this.inner.readRange(sessionId, startSeq, endSeq, expectedEpoch);
|
|
7737
7761
|
const snapshot = await this.inner.load(sessionId);
|
|
7738
|
-
const { assertSnapshotCut, snapshotStamp } = await import("../core/storage/session/snapshot-history.
|
|
7762
|
+
const { assertSnapshotCut, snapshotStamp } = await import("../core/storage/session/snapshot-history.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
7739
7763
|
assertSnapshotCut(snapshot, expectedEpoch, Math.min(endSeq, snapshot.lastSeq));
|
|
7740
7764
|
return {
|
|
7741
7765
|
...sessionRangeOf(snapshot.entries, startSeq, endSeq),
|
|
@@ -7745,13 +7769,13 @@ var LegacySessionStore = class LegacySessionStore {
|
|
|
7745
7769
|
async readBranchSpan(sessionId, cut) {
|
|
7746
7770
|
await this.convert(sessionId);
|
|
7747
7771
|
if (this.inner.readBranchSpan) return this.inner.readBranchSpan(sessionId, cut);
|
|
7748
|
-
return (await import("../core/storage/session/snapshot-history.
|
|
7772
|
+
return (await import("../core/storage/session/snapshot-history.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"))).snapshotBranchSpan(this.inner, sessionId, cut);
|
|
7749
7773
|
}
|
|
7750
7774
|
async readEntrySizes(sessionId, startSeq, endSeq, limit) {
|
|
7751
7775
|
await this.convert(sessionId);
|
|
7752
7776
|
if (this.inner.readEntrySizes) return limit === void 0 ? this.inner.readEntrySizes(sessionId, startSeq, endSeq) : this.inner.readEntrySizes(sessionId, startSeq, endSeq, limit);
|
|
7753
7777
|
const snapshot = await this.inner.load(sessionId);
|
|
7754
|
-
const { snapshotStamp } = await import("../core/storage/session/snapshot-history.
|
|
7778
|
+
const { snapshotStamp } = await import("../core/storage/session/snapshot-history.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
7755
7779
|
const start = Math.max(startSeq, 1);
|
|
7756
7780
|
return {
|
|
7757
7781
|
epoch: snapshotStamp(snapshot),
|
|
@@ -7765,7 +7789,7 @@ var LegacySessionStore = class LegacySessionStore {
|
|
|
7765
7789
|
async readEntryChunk(reference, offset, bytes) {
|
|
7766
7790
|
await this.convert(reference.sessionId);
|
|
7767
7791
|
if (this.inner.readEntryChunk) return bytes === void 0 ? this.inner.readEntryChunk(reference, offset) : this.inner.readEntryChunk(reference, offset, bytes);
|
|
7768
|
-
return (await import("../core/storage/session/snapshot-history.
|
|
7792
|
+
return (await import("../core/storage/session/snapshot-history.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"))).snapshotChunk(this.inner, reference, offset);
|
|
7769
7793
|
}
|
|
7770
7794
|
async findLatestCompaction(sessionId, leafId) {
|
|
7771
7795
|
await this.convert(sessionId);
|
|
@@ -7774,7 +7798,7 @@ var LegacySessionStore = class LegacySessionStore {
|
|
|
7774
7798
|
async readResume(sessionId, leafId, options) {
|
|
7775
7799
|
await this.convert(sessionId);
|
|
7776
7800
|
if (this.inner.readResume) return options ? this.inner.readResume(sessionId, leafId, options) : this.inner.readResume(sessionId, leafId);
|
|
7777
|
-
return (await import("../core/storage/session/snapshot-history.
|
|
7801
|
+
return (await import("../core/storage/session/snapshot-history.code.js").catch((error) => __atomicOnDemandFailed(error, "session storage"))).snapshotWindow(this.inner, sessionId, leafId, void 0, void 0, isProxy);
|
|
7778
7802
|
}
|
|
7779
7803
|
async findEntrySeq(sessionId, entryId) {
|
|
7780
7804
|
await this.convert(sessionId);
|
|
@@ -7937,11 +7961,22 @@ var LegacySessionStore = class LegacySessionStore {
|
|
|
7937
7961
|
* own, which would wait for the lock synchronously while another connection of this process holds it (#5530).
|
|
7938
7962
|
*/
|
|
7939
7963
|
deletionDatabase() {
|
|
7940
|
-
this.deletions
|
|
7941
|
-
const
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7964
|
+
if (this.deletions === void 0) {
|
|
7965
|
+
const current = openNodeSqliteDatabase(this.databasePath).then(async (database) => {
|
|
7966
|
+
try {
|
|
7967
|
+
const exists = `SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = '${DELETED_TABLE}'`;
|
|
7968
|
+
if (await database.get(exists) === void 0) await database.transaction((transaction) => transaction.exec(`CREATE TABLE IF NOT EXISTS ${DELETED_TABLE}(id TEXT PRIMARY KEY, deleted_at INTEGER NOT NULL)`));
|
|
7969
|
+
return database;
|
|
7970
|
+
} catch (error) {
|
|
7971
|
+
await database.close().catch(() => {});
|
|
7972
|
+
throw error;
|
|
7973
|
+
}
|
|
7974
|
+
}).catch((error) => {
|
|
7975
|
+
if (this.deletions === current) this.deletions = void 0;
|
|
7976
|
+
throw error;
|
|
7977
|
+
});
|
|
7978
|
+
this.deletions = current;
|
|
7979
|
+
}
|
|
7945
7980
|
return this.deletions;
|
|
7946
7981
|
}
|
|
7947
7982
|
async isDeleted(sessionId) {
|
|
@@ -7981,4 +8016,49 @@ async function newestCopiesFirst(copies) {
|
|
|
7981
8016
|
}
|
|
7982
8017
|
export { EMPTY_SESSION_HISTORY_TOTALS, JSONL_INDEX_VERSION, JsonlSessionStore, JsonlStoragePoisonedError, LegacySessionStore, MemorySessionStore, RESUME_UPGRADE_SOURCES, SPILL_BLOCK_BYTES, SPILL_DIRECTORY_RETRY_MS, SessionFormatVersionError$1 as SessionFormatVersionError, addEntryToHistoryTotals, agentSessionPersistenceFailureMethods, agentSessionReleaseMethods, appendFailureWroteNothing, archivedAnswerAt, assertSnapshotCut, assertValidSessionId, bindSessionFile, branchRanges, checkedCustomMessage, checkedCustomType, checkedLabel, childCatalogCut, clearPersistenceFailure, completionIdOf, createBranchSummaryEntry, createCompactionEntry, createContextEditEntry, createCustomEntry, createCustomMessageEntry, createLabelEntry, createMessageEntry, createModelChangeEntry, createSessionFilePath, createSessionHeader, createSessionId, createSessionInfoEntry, createSessionSummaryEntry, createThinkingLevelChangeEntry, createWorktreeSnapshotEntry, earlierTranscriptCursor, enableReleaseWhenIdle, entryProjector, findInSessionHistory, findMostRecentSession, findQueuedMessages, findQueuedMessagesInFile, findQueuedMessagesInStore, findSessionCompaction, findWorktreeSnapshotRecords, firstHistoryCursor, foldSessionResume, foreignResumeIds, generateId, getEntriesWithoutHeader, getLastConversationMessageId, getLatestSessionName, getLatestSessionSummary, historyChunks, historyPageGeneration, historyPages, intentForAcknowledgement, isBranchCustomState, isCurrentSessionHeader, isExtensionCustomState, isInternalHeader, isPrivateMemorySessionStore, isSessionHistoryEntry, isSessionResumeIndex, isUpgradableSessionResumeIndex, jsonlEntryProjection, keepRefusedInput, lastAssistantAnswer, lastBranchAnswer, latestCompactionOf, loadEntriesFromFile, markPrivateMemorySessionStore, notReopenable, noteMessageSaved, omittedTotals, onSessionClose, parseReleaseWhenIdle, parseSessionEntries, parseStoredSessionEntries, readAhead, readEarlierCompletionIntents, readSessionHeaderAsync, readSessionHistory, readSessionHistoryChunks, readSessionRange, readSessionTail, recordPersistenceFailure, recoveryWitnessesOf, refoldSessionResume, repeatsShownUnsavedInput, resumeIndexNeedsRefold, rethrowUnlessReportedPersistenceFailure, savedWindowAnswer, selectResumeLeaf, selectedHistoryPages, selectedPagePlan, sessionClosing, sessionCompactionOf, sessionRangeOf, sessionResumeFrom, sessionResumeOf, sessionResumePlan, sessionResumeUpgrade, sessionTailFrom, sessionTailOf, snapshotChunk, snapshotCutOf, snapshotHead, snapshotPage, snapshotStamp, stateSeqsBefore, storeSnapshotIndex, transcriptBranchSpan, transcriptCursorWithin, updateWorkflowStarts, upgradeStoredSessionEntries, validateSessionEntries, validateSessionEntryStructure, validateSessionFileEntries, validateSessionHeader, validateSessionText, withForkFileWindow, witnessedIn, worktreeSnapshotPages, writesEndWithWriter };
|
|
7983
8018
|
|
|
7984
|
-
//# sourceMappingURL=startup-8-0-34CBHPZH.js.map
|
|
8019
|
+
//# sourceMappingURL=startup-8-0-34CBHPZH.js.map
|
|
8020
|
+
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
8021
|
+
// demand that fails in a process an in-place update left running says to restart.
|
|
8022
|
+
function __atomicOnDemandFailed(error, feature) {
|
|
8023
|
+
return (async () => {
|
|
8024
|
+
const root = new URL("../", import.meta.url);
|
|
8025
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
8026
|
+
const key = `${root.href}#0.10.5-alpha.1`;
|
|
8027
|
+
let release = releases.get(key);
|
|
8028
|
+
if (release === undefined) {
|
|
8029
|
+
const current = (async () => {
|
|
8030
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
8031
|
+
try {
|
|
8032
|
+
const held = await import(new URL(path, root).href);
|
|
8033
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
8034
|
+
} catch {
|
|
8035
|
+
// Not a file this process can load: the next.
|
|
8036
|
+
}
|
|
8037
|
+
}
|
|
8038
|
+
return undefined;
|
|
8039
|
+
})().then((found) => {
|
|
8040
|
+
if (found === undefined && releases.get(key) === current) releases.delete(key);
|
|
8041
|
+
return found;
|
|
8042
|
+
});
|
|
8043
|
+
releases.set(key, current);
|
|
8044
|
+
release = current;
|
|
8045
|
+
}
|
|
8046
|
+
const running = await release;
|
|
8047
|
+
let installed;
|
|
8048
|
+
try {
|
|
8049
|
+
const { readFile } = process.getBuiltinModule("node:fs/promises");
|
|
8050
|
+
installed = JSON.parse(await readFile(new URL("../package.json", root), "utf8")).version;
|
|
8051
|
+
} catch {
|
|
8052
|
+
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
8053
|
+
}
|
|
8054
|
+
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;
|
|
8055
|
+
if (updatedTo === undefined) throw error;
|
|
8056
|
+
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
8057
|
+
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
8058
|
+
cause: error,
|
|
8059
|
+
});
|
|
8060
|
+
restart.name = "UpdatedInstallError";
|
|
8061
|
+
restart[Symbol.for("atomic.on-demand-restart.v1")] = { application, updatedTo, feature };
|
|
8062
|
+
throw restart;
|
|
8063
|
+
})();
|
|
8064
|
+
}
|