@bastani/atomic 0.10.11-alpha.2 → 0.10.11-alpha.4
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 +150 -0
- package/README.md +5 -8
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +6 -6
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +5 -5
- package/dist/_shared/mode-shared-2QJSCUM6.js +6 -6
- package/dist/_shared/p0-cli-BB45ZQY6.js +46 -67
- package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +7 -8
- package/dist/_shared/p1a-prewarm-XIU57JHF.js.map +1 -1
- package/dist/_shared/{p1b-elig-ENCUPKKJ.js → p1b-elig-TVB5CBLL.js} +36 -8
- package/dist/_shared/p1b-elig-TVB5CBLL.js.map +1 -0
- package/dist/_shared/p2-shell-main-B2WIALFD.js +6 -3
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +3 -3
- package/dist/_shared/{sdk-IQMULKFU.js → sdk-B5LEWGGI.js} +1218 -657
- package/dist/_shared/sdk-B5LEWGGI.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/{startup-0-0-3IXNMFM2.js → startup-0-0-XJJDOIEC.js} +50 -48
- package/dist/_shared/startup-0-0-XJJDOIEC.js.map +1 -0
- package/dist/_shared/{startup-0-1-7T2IAE7J.js → startup-0-1-M6OWAYHH.js} +540 -136
- package/dist/_shared/startup-0-1-M6OWAYHH.js.map +1 -0
- package/dist/_shared/startup-0-2-5QHPCEON.js +47 -48
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +1 -1
- package/dist/_shared/startup-0-3-4ZYBYQNM.js +5 -5
- package/dist/_shared/startup-0-4-ZMJV547D.js +12 -7
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -1
- package/dist/_shared/startup-0-5-YDW47QX6.js +7 -7
- package/dist/_shared/startup-0-5-YDW47QX6.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +6 -6
- package/dist/_shared/startup-12-0-55AAXBJZ.js +2 -2
- package/dist/_shared/startup-14-0-MLX36RBG.js +4 -5
- package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
- package/dist/_shared/startup-15-1-4S7FLMNG.js +19 -27
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +2144 -249
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/{startup-8-1-X32CYSXB.js → startup-8-1-LZFXSD3Z.js} +98 -1184
- package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +188 -37
- package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
- package/dist/_shared/storage-status-K7PX2RXA.js +557 -0
- package/dist/_shared/storage-status-K7PX2RXA.js.map +1 -0
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/team-DOQKICG2.js +376 -0
- package/dist/_shared/team-DOQKICG2.js.map +1 -0
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +42 -0
- package/dist/builtin/intercom/README.md +2 -2
- package/dist/builtin/intercom/broker/broker.bundle.mjs +1917 -381
- package/dist/builtin/intercom/broker/client.ts +8 -0
- package/dist/builtin/intercom/broker/database-wake-up-bus.ts +324 -68
- package/dist/builtin/intercom/broker/multinode-router.ts +256 -39
- package/dist/builtin/intercom/broker/multinode-state-store.ts +71 -5
- package/dist/builtin/intercom/broker/open-broker-state.ts +14 -0
- package/dist/builtin/intercom/broker/send-order-gate.ts +5 -2
- package/dist/builtin/intercom/broker/sql-add-column.ts +50 -5
- package/dist/builtin/intercom/broker/sql-ended-child-queue-store.ts +3 -2
- package/dist/builtin/intercom/broker/sql-held-send-store.ts +2 -2
- package/dist/builtin/intercom/broker/sql-known-session-store.ts +43 -19
- package/dist/builtin/intercom/broker/sql-lease-store.ts +473 -121
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +821 -79
- package/dist/builtin/intercom/broker/sql-pending-ask-store.ts +8 -5
- package/dist/builtin/intercom/broker/sql-released-ask-store.ts +12 -5
- package/dist/builtin/intercom/broker/sql-restoring-reservation-store.ts +256 -8
- package/dist/builtin/intercom/broker/sql-retention.ts +150 -0
- package/dist/builtin/intercom/broker/sql-schema.ts +175 -24
- package/dist/builtin/intercom/broker/sql-sent-message-authority.ts +74 -19
- package/dist/builtin/intercom/broker/wake-up-bus.ts +6 -0
- package/dist/builtin/intercom/index.bundle.mjs +14 -4
- package/dist/builtin/intercom/package.json +1 -1
- 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/skills/skill-creator/eval-viewer/generate_review.py +8 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/index.bundle.mjs +2 -10
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/bun/bundled-sqlite.js +41 -0
- package/dist/bun/bundled-sqlite.js.map +1 -0
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +4 -4
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +3 -3
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +3 -3
- package/dist/cli/intercom-command.code.js.map +1 -1
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.code.js +2 -2
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +3 -3
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.code.js +19 -113
- package/dist/cli/team-command.code.js.map +1 -1
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +5 -18
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-rehydrate-errors.d.ts +4 -9
- package/dist/core/compaction/compactor.d.ts +3 -3
- package/dist/core/debug.code.js +1 -1
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +4 -4
- package/dist/core/export-html/index.code.js.map +1 -1
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.code.js +1 -1
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/extensions/loader-virtual-modules.js +1 -1
- package/dist/core/extensions/runner-context.js +2 -2
- package/dist/core/intercom-broker-control-host.code.js +2 -2
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +3 -3
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/package-manager-storage-adapters.code.js +1 -1
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/process-start-token.d.ts +12 -3
- package/dist/core/process-tree-containment.d.ts +16 -0
- package/dist/core/sdk-types.d.ts +1 -2
- package/dist/core/sdk-types.js.map +1 -1
- package/dist/core/sdk.code.js +3 -3
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +5 -5
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.code.js +1 -1
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.code.js +1 -1
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/settings-schema.d.ts +0 -3
- package/dist/core/storage/added-exports-0-10-11.js +19 -0
- package/dist/core/storage/added-exports-0-10-11.js.map +1 -0
- package/dist/core/storage/creation-time.js +105 -0
- package/dist/core/storage/creation-time.js.map +1 -0
- package/dist/core/storage/database.d.ts +25 -5
- package/dist/core/storage/database.js.map +1 -1
- package/dist/core/storage/dialect.d.ts +1 -1
- package/dist/core/storage/dialect.js +1 -1
- package/dist/core/storage/dialect.js.map +1 -1
- package/dist/core/storage/errors.d.ts +13 -13
- package/dist/core/storage/errors.js +10 -16
- package/dist/core/storage/errors.js.map +1 -1
- package/dist/core/storage/fenced-paths.d.ts +18 -6
- package/dist/core/storage/fenced-paths.js +18 -6
- package/dist/core/storage/fenced-paths.js.map +1 -1
- package/dist/core/storage/file-identity.d.ts +2 -0
- package/dist/core/storage/file-identity.js +24 -8
- package/dist/core/storage/file-identity.js.map +1 -1
- package/dist/core/storage/index.d.ts +3 -2
- package/dist/core/storage/index.js +5 -3
- package/dist/core/storage/index.js.map +1 -1
- package/dist/core/storage/libsql-removed.d.ts +71 -0
- package/dist/core/storage/libsql-removed.js +123 -0
- package/dist/core/storage/libsql-removed.js.map +1 -0
- package/dist/core/storage/migrations.d.ts +78 -14
- package/dist/core/storage/migrations.js +375 -49
- package/dist/core/storage/migrations.js.map +1 -1
- package/dist/core/storage/node-sqlite-file-gate.js +0 -15
- package/dist/core/storage/node-sqlite-file-gate.js.map +1 -1
- package/dist/core/storage/node-sqlite-thread.js +215 -30
- package/dist/core/storage/node-sqlite-thread.js.map +1 -1
- package/dist/core/storage/node-sqlite.js +484 -72
- package/dist/core/storage/node-sqlite.js.map +1 -1
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/prefix.d.ts +1 -1
- package/dist/core/storage/prefix.js +9 -2
- package/dist/core/storage/prefix.js.map +1 -1
- package/dist/core/storage/process-selection.d.ts +5 -5
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/schema-catalog.d.ts +76 -15
- package/dist/core/storage/schema-catalog.js +359 -68
- package/dist/core/storage/schema-catalog.js.map +1 -1
- package/dist/core/storage/selection.d.ts +7 -82
- package/dist/core/storage/selection.js +20 -235
- package/dist/core/storage/selection.js.map +1 -1
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +3 -3
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-detach.d.ts +11 -1
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +4 -7
- package/dist/core/storage/session/fork-staging.code.js.map +1 -1
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-sweep.js +31 -7
- package/dist/core/storage/session/fork-sweep.js.map +1 -1
- package/dist/core/storage/session/fork-window.code.js +3 -3
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-lock.d.ts +100 -0
- package/dist/core/storage/session/jsonl-session-store.d.ts +46 -24
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +9 -9
- package/dist/core/storage/session/released-history-files.code.js.map +1 -1
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/session-search-index.d.ts +52 -5
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +3 -3
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.d.ts +99 -18
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/sqlite-facade.d.ts +12 -1
- package/dist/core/storage/sqlite-facade.js +310 -33
- package/dist/core/storage/sqlite-facade.js.map +1 -1
- package/dist/core/storage/sqlite-open-batch.js +10 -0
- package/dist/core/storage/sqlite-open-batch.js.map +1 -0
- package/dist/core/storage/storage-status.code.js +1 -1
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.code.js +1 -1
- package/dist/core/storage/team.d.ts +26 -115
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.code.js +1 -1
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +3 -3
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +4 -4
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.code.js +1 -1
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/history-tasks.d.ts +3 -2
- package/dist/core/tools/read-url.code.js +4 -4
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.d.ts +44 -5
- package/dist/core/worktree-snapshot/blob-store.js +553 -30
- package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
- package/dist/core/worktree-snapshot/errors.code.js +2 -2
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/fork-blob-guard.js +81 -0
- package/dist/core/worktree-snapshot/fork-blob-guard.js.map +1 -0
- package/dist/core/worktree-snapshot/fork-snapshot-index.js +208 -50
- package/dist/core/worktree-snapshot/fork-snapshot-index.js.map +1 -1
- package/dist/core/worktree-snapshot/session-index-reset.code.js +4 -0
- package/dist/core/worktree-snapshot/session-index-reset.code.js.map +1 -1
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.code.js +1 -1
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.code.js +2 -2
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +3 -3
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -5
- package/dist/main-first-time-setup.code.js +1 -1
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/main.js +1 -1
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/modes/interactive/startup-shell-eligibility.js +1 -1
- package/dist/modes/interactive-engine/engine-prewarm.d.ts +1 -1
- package/dist/modes/print-mode.js +1 -1
- package/dist/package-manager-cli.code.js +6 -6
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/rpc-entry.js +1 -1
- 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/2.js +2 -4
- package/dist/startup-stages/3.js +1 -3
- package/dist/startup-stages/4.js +1 -2
- package/dist/startup-stages/5.js +1 -1
- package/dist/startup-stages/6.js +5 -7
- package/dist/startup-stages/7.js +3 -10
- package/dist/startup-stages/8.js +7 -2
- package/dist/startup-stages/9.js +1 -7
- package/dist/startup-stages/stages.json +1 -1
- package/dist/utils/compile-cache-deferral.js +8 -13
- package/dist/utils/compile-cache-deferral.js.map +1 -1
- package/dist/utils/compile-cache-warmup-host.js +3 -4
- package/dist/utils/compile-cache-warmup-host.js.map +1 -1
- package/dist/utils/compile-cache.js +12 -100
- package/dist/utils/compile-cache.js.map +1 -1
- package/dist/utils/startup-database-spare.code.js +2 -2
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.code.js +1 -1
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/dist/utils/worker-threads.js +2 -15
- package/dist/utils/worker-threads.js.map +1 -1
- package/docs/build.md +3 -3
- package/docs/changelog.mdx +1470 -69
- package/docs/compaction/reference.md +5 -5
- package/docs/compaction.md +7 -9
- package/docs/containerization.md +2 -2
- package/docs/custom-provider/api-reference.md +1 -1
- package/docs/docs.json +37 -10
- package/docs/environment-variables.md +0 -2
- package/docs/extensions/api-reference.md +4 -4
- package/docs/getting-started/installation.md +3 -0
- package/docs/guides/configuration.md +1 -1
- package/docs/guides/non-interactive.md +1 -1
- package/docs/guides/resume-on-any-machine.md +14 -22
- package/docs/guides/team-setup.md +56 -83
- package/docs/guides.md +2 -4
- package/docs/herdr.md +1 -1
- package/docs/index.md +1 -1
- package/docs/intercom/operations.md +26 -21
- package/docs/intercom/reference.md +2 -2
- package/docs/intercom.md +1 -1
- package/docs/libraries/storage-postgres.md +9 -9
- package/docs/libraries.md +2 -3
- package/docs/models-configuration.md +2 -2
- package/docs/models.md +2 -3
- package/docs/packages/authoring.md +7 -7
- package/docs/packages.md +1 -1
- package/docs/programmatic.md +2 -2
- package/docs/quickstart.md +1 -1
- package/docs/reference/cli.md +6 -11
- package/docs/reference.md +2 -2
- package/docs/rpc/extension-ui.md +2 -2
- package/docs/sdk/reference.md +5 -4
- package/docs/sdk/storage.md +8 -92
- package/docs/sdk/structured-decisions.md +1 -1
- package/docs/sdk/web-server.md +3 -3
- package/docs/sdk.md +14 -4
- package/docs/security.md +1 -1
- package/docs/session-format.md +5 -5
- package/docs/sessions.md +29 -49
- package/docs/settings.md +7 -8
- package/docs/storage/custom-adapters.md +255 -0
- package/docs/storage/jsonl.md +117 -0
- package/docs/{guides/postgres-pgbouncer.md → storage/postgres/pgbouncer.md} +66 -68
- package/docs/storage/postgres/tuning.md +337 -0
- package/docs/storage/postgres.md +556 -0
- package/docs/storage/sqlite.md +99 -0
- package/docs/storage.md +326 -990
- package/docs/subagents/authoring.md +1 -1
- package/docs/subagents.md +2 -2
- package/docs/tools.md +1 -1
- package/docs/worktree-snapshots.md +2 -2
- package/package.json +9 -9
- package/schemas/models.schema.json +2 -2
- package/schemas/settings.schema.json +0 -14
- package/dist/_shared/p1b-elig-ENCUPKKJ.js.map +0 -1
- package/dist/_shared/sdk-IQMULKFU.js.map +0 -1
- package/dist/_shared/startup-0-0-3IXNMFM2.js.map +0 -1
- package/dist/_shared/startup-0-1-7T2IAE7J.js.map +0 -1
- package/dist/_shared/startup-8-1-X32CYSXB.js.map +0 -1
- package/dist/core/intercom-broker-control.d.ts +0 -129
- package/dist/startup-stages/13.js +0 -1
- package/docs/guides/postgres-tuning.md +0 -311
- package/docs/libraries/storage-libsql.md +0 -97
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SqliteDatabase, SqliteExecutor } from "../database.js";
|
|
1
|
+
import type { SqliteDatabase, SqliteExecutor, SqliteStatement } from "../database.js";
|
|
2
2
|
import type { SessionSearchCoverage, SessionSearchExtendOptions, SessionSearchIndex, SessionSearchText } from "./types.js";
|
|
3
3
|
import { yieldTurn } from "./yield-turn.js";
|
|
4
4
|
export { yieldTurn };
|
|
@@ -10,6 +10,24 @@ export declare const SESSION_SEARCH_TABLES: Readonly<{
|
|
|
10
10
|
trigrams: "search_trgm";
|
|
11
11
|
entriesForget: "entries_search_forget";
|
|
12
12
|
}>;
|
|
13
|
+
/**
|
|
14
|
+
* The ledger step, `schema:session-search-tuning`, that gives an existing PostgreSQL trigram index the pending-list
|
|
15
|
+
* limit below and its entries table the autovacuum settings below.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SESSION_SEARCH_TUNING_DOMAIN = "session-search-tuning";
|
|
18
|
+
/**
|
|
19
|
+
* The PostgreSQL trigram index's `gin_pending_list_limit`, in kB: 64 MB rather than the server's default 4 MB. An insert
|
|
20
|
+
* that finds the pending list over this limit merges the whole list into the index itself, inside its transaction and
|
|
21
|
+
* the session's lock; the background merge (`SEARCH_PENDING_MERGE_CHARS`) and autovacuum keep the list far below it.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SEARCH_PENDING_LIST_LIMIT_KB = 65536;
|
|
24
|
+
/**
|
|
25
|
+
* The characters of search text one search index writes on PostgreSQL between background merges of the trigram
|
|
26
|
+
* index's pending list (`gin_clean_pending_list`): about 1 MB of pending list for text with many distinct trigrams.
|
|
27
|
+
* A merge empties the list of every writer's text, so with many processes writing, the list holds about this much
|
|
28
|
+
* text between merges whatever their number.
|
|
29
|
+
*/
|
|
30
|
+
export declare const SEARCH_PENDING_MERGE_CHARS = 131072;
|
|
13
31
|
export declare const SEARCH_PART_CHARS = 4096;
|
|
14
32
|
export declare const SEARCH_PART_OVERLAP = 512;
|
|
15
33
|
export declare const MAX_INDEXED_ENTRY_CHARS: number;
|
|
@@ -25,19 +43,48 @@ export declare class SqlSessionSearchIndex implements SessionSearchIndex {
|
|
|
25
43
|
private readonly tables;
|
|
26
44
|
private readonly engine;
|
|
27
45
|
private writesPrepared;
|
|
46
|
+
/** Characters of search text written since the last background merge of the pending list began. */
|
|
47
|
+
private pendingChars;
|
|
48
|
+
/** The background merge of the pending list in flight, if any. */
|
|
49
|
+
private merging;
|
|
50
|
+
/** False once a merge found that this role may not merge the pending list, which autovacuum then merges. */
|
|
51
|
+
private mayMerge;
|
|
28
52
|
private constructor();
|
|
29
|
-
static open(database: SqliteDatabase, sessionTables: SessionTables, prefix: string | undefined): Promise<SqlSessionSearchIndex | undefined>;
|
|
53
|
+
static open(database: SqliteDatabase, sessionTables: SessionTables, prefix: string | undefined, onUnavailable?: () => void): Promise<SqlSessionSearchIndex | undefined>;
|
|
30
54
|
private static tablesExist;
|
|
55
|
+
/** The statements that forget session `sessionId`, in order: its indexed text, then its state row. */
|
|
56
|
+
private forgetStatements;
|
|
31
57
|
forget(tx: SqliteExecutor, sessionId: string): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Forgets session `sessionId` inside transaction `tx` under a savepoint, so an index that cannot be forgotten leaves
|
|
60
|
+
* the transaction going. Where `tx` is pipelined on PostgreSQL, the savepoint, the forget and the release go out in
|
|
61
|
+
* one round trip: a statement that fails aborts the transaction, so nothing after it runs, and the release with it;
|
|
62
|
+
* the transaction then goes back to the savepoint, which still stands, and drops it.
|
|
63
|
+
*/
|
|
32
64
|
forgetWithin(tx: SqliteExecutor, sessionId: string): Promise<void>;
|
|
33
65
|
coverage(sessionId: string, format: number): Promise<SessionSearchCoverage | undefined>;
|
|
34
66
|
extend(sessionId: string, format: number, afterSeq: number, throughSeq: number, texts: readonly SessionSearchText[], options?: SessionSearchExtendOptions): Promise<boolean>;
|
|
67
|
+
/**
|
|
68
|
+
* Counts `chars` of search text a committed write added, and once `SEARCH_PENDING_MERGE_CHARS` of them have, starts a
|
|
69
|
+
* background merge of the pending list, which this write and the writes after it do not wait for. So no write merges
|
|
70
|
+
* the list inside its transaction, which holds the session's lock (PostgreSQL only).
|
|
71
|
+
*/
|
|
72
|
+
private notePendingChars;
|
|
35
73
|
private mergeBacklog;
|
|
36
74
|
/**
|
|
37
|
-
* A write of the session `sessionId`'s index rows
|
|
38
|
-
*
|
|
75
|
+
* A write of the session `sessionId`'s index rows, in the domain of that session's index rather than the session's
|
|
76
|
+
* own: saves to the session, which take the session's domain, run beside it. A rewrite of the session, which forgets
|
|
77
|
+
* its index, takes this domain too ({@link writeLock}), so an index write commits wholly before the rewrite reads
|
|
78
|
+
* the index or starts after it commits, and its checks then see the rewrite. `delete` holds the whole database.
|
|
79
|
+
*/
|
|
80
|
+
private searchWrite;
|
|
81
|
+
private searchDomain;
|
|
82
|
+
/**
|
|
83
|
+
* On PostgreSQL, the statement that takes, inside a transaction of the session's own domain, the advisory lock index
|
|
84
|
+
* writes of the session `sessionId` hold ({@link searchWrite}), keyed as the driver keys a domain's lock. A rewrite
|
|
85
|
+
* runs it before it touches the index. Undefined where transactions do not run beside each other.
|
|
39
86
|
*/
|
|
40
|
-
|
|
87
|
+
writeLock(sessionId: string): SqliteStatement | undefined;
|
|
41
88
|
private writeTransaction;
|
|
42
89
|
candidates(sessionId: string, anyOf: readonly (readonly string[])[], fromSeq: number, toSeq: number, limit: number, generation?: string, signal?: AbortSignal): Promise<readonly number[] | undefined>;
|
|
43
90
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
2
|
import { getBranchPath } from "../../../_shared/startup-0-3-4ZYBYQNM.js";
|
|
3
|
-
import { ChildCatalog } from "../../../_shared/startup-0-1-
|
|
3
|
+
import { ChildCatalog } from "../../../_shared/startup-0-1-M6OWAYHH.js";
|
|
4
4
|
import { assertSnapshotCut, foldSessionResume, lastBranchAnswer, sessionResumeOf, snapshotChunk, snapshotHead, snapshotPage, snapshotStamp, transcriptBranchSpan } from "../../../_shared/startup-8-0-34CBHPZH.js";
|
|
5
5
|
// dist/core/storage/session/snapshot-history.js
|
|
6
6
|
async function snapshotWindow(store, sessionId, leaf, through, expected, isProxy) {
|
|
@@ -66,7 +66,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
66
66
|
return (async () => {
|
|
67
67
|
const root = new URL("../../../", import.meta.url);
|
|
68
68
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
69
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
69
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
70
70
|
let release = releases.get(key);
|
|
71
71
|
if (release === undefined) {
|
|
72
72
|
const current = (async () => {
|
|
@@ -94,7 +94,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
94
94
|
} catch {
|
|
95
95
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
96
96
|
}
|
|
97
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.
|
|
97
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.4" ? installed : running !== undefined && running.version !== "0.10.11-alpha.4" ? "0.10.11-alpha.4" : undefined;
|
|
98
98
|
if (updatedTo === undefined) throw error;
|
|
99
99
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
100
100
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../../../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
export { LISTING_FETCH_BATCH, SESSION_APPEND_FUNCTION_DOMAIN, SESSION_BLOB_CHUNK_BYTES, SESSION_DOMAIN, SESSION_ENTRY_CHUNK_BYTES, SESSION_FILLFACTOR_DOMAIN, SESSION_PRESENCE_DOMAIN, SESSION_PRESENCE_TABLES, SESSION_READ_FETCH, SESSION_READ_PAGE_CHARS, SESSION_RESUME_REBUILD, SESSION_SCHEMA_VERSION, SESSION_SCHEMA_VERSION_CHUNKED, SESSION_SCHEMA_VERSION_SHARED_HISTORY, SESSION_TABLES, SqlSessionStore } from "../../../_shared/sdk-
|
|
2
|
+
export { LISTING_FETCH_BATCH, SESSION_APPEND_FUNCTION_DOMAIN, SESSION_BLOB_CHUNK_BYTES, SESSION_DOMAIN, SESSION_ENTRY_CHUNK_BYTES, SESSION_FILLFACTOR_DOMAIN, SESSION_PRESENCE_DOMAIN, SESSION_PRESENCE_TABLES, SESSION_READ_FETCH, SESSION_READ_PAGE_CHARS, SESSION_RESUME_REBUILD, SESSION_SCHEMA_VERSION, SESSION_SCHEMA_VERSION_CHUNKED, SESSION_SCHEMA_VERSION_SHARED_HISTORY, SESSION_TABLES, SqlSessionStore } from "../../../_shared/sdk-B5LEWGGI.js";
|
|
3
3
|
//# sourceMappingURL=sql-session-store.code.js.map
|
|
@@ -104,12 +104,16 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
104
104
|
private chatStore?;
|
|
105
105
|
/** The database's reader handle, once a read opened it: see `readerDatabase`. */
|
|
106
106
|
private reader?;
|
|
107
|
+
/** Each session's writes this store started and has not finished, each settled as its write is: see `writing`. */
|
|
108
|
+
private readonly unfinishedWrites;
|
|
107
109
|
/** The sessions schema version each transaction read first, by its handle: see `sharedHistoryForks`. */
|
|
108
110
|
private readonly schemaVersions;
|
|
109
111
|
/** The fork tables under this store's prefix, which exist once its sessions schema is version 3 (#6560). */
|
|
110
112
|
private readonly forkTables;
|
|
111
113
|
/** See {@link forkLinks}. */
|
|
112
114
|
private forkLinkStatements?;
|
|
115
|
+
/** See {@link entryLinks}. */
|
|
116
|
+
private entryLinkStatements?;
|
|
113
117
|
/**
|
|
114
118
|
* Whether a read of this store found its sessions schema at {@link SESSION_SCHEMA_VERSION_SHARED_HISTORY}: one way,
|
|
115
119
|
* as the switch is. A read outside a transaction reads sessions through their views once it is set, and before that
|
|
@@ -122,11 +126,6 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
122
126
|
private readonly forkedSessions;
|
|
123
127
|
/** The sessions each recently forked session's segments named when this store last read them (#6560). */
|
|
124
128
|
private readonly forkSources;
|
|
125
|
-
/**
|
|
126
|
-
* Absent on a local libSQL file, which then behaves as before: @libsql/client waits for another process's write
|
|
127
|
-
* lock on the calling thread, even to begin a transaction, so a side write would stop the event loop where an
|
|
128
|
-
* ordinary turn-ending notice writes nothing (#5682).
|
|
129
|
-
*/
|
|
130
129
|
get chatRecords(): SqlSessionChatRecords | undefined;
|
|
131
130
|
private readonly entryByteLength;
|
|
132
131
|
private chunkRowids?;
|
|
@@ -190,10 +189,25 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
190
189
|
*/
|
|
191
190
|
private sessionWrite;
|
|
192
191
|
/**
|
|
193
|
-
* `transaction` for a body that only reads
|
|
194
|
-
* offers one: its reads then wait for neither the writes queued on this store's connection nor their
|
|
192
|
+
* `transaction` for a body that only reads session `sessionId`, in one read-only snapshot, on the database's reader
|
|
193
|
+
* handle when it offers one: its reads then wait for neither the writes queued on this store's connection nor their
|
|
194
|
+
* locks. It first waits for the writes of that session this store started and has not finished (`writing`), so a
|
|
195
|
+
* caller that starts a write and then reads, without awaiting the write, reads it as the store's own connection would
|
|
196
|
+
* have; with none unfinished it waits for nothing.
|
|
195
197
|
*/
|
|
196
198
|
private readTransaction;
|
|
199
|
+
/**
|
|
200
|
+
* Runs `firstRead` behind the sessions schema check in one read-only transaction: on a pipelined connection the
|
|
201
|
+
* begin, schema check, read and commit go out in one round trip on one pool checkout, and an unsupported schema
|
|
202
|
+
* version is always thrown before `firstRead`'s result or failure is observed.
|
|
203
|
+
*/
|
|
204
|
+
private readChecked;
|
|
205
|
+
/**
|
|
206
|
+
* `write`, a write of session `sessionId` this store has just started, kept in `unfinishedWrites` until it settles,
|
|
207
|
+
* for the reads of the session that start meanwhile to wait for (`readTransaction`). No write waits for a read, and
|
|
208
|
+
* no write of this store reads through `readTransaction`, so the wait never comes back to the write.
|
|
209
|
+
*/
|
|
210
|
+
private writing;
|
|
197
211
|
/**
|
|
198
212
|
* The database's reader handle, opened at the first read and closed with the store; the database without one. A
|
|
199
213
|
* reader that cannot open, such as when its file can no longer be opened anew, leaves the read on the store's own
|
|
@@ -295,9 +309,30 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
295
309
|
private static switchAtOpen;
|
|
296
310
|
get descriptor(): StorageDescriptor;
|
|
297
311
|
create(header: SessionRecordHeader, entries: readonly SessionEntry[]): Promise<SessionWriteResult>;
|
|
312
|
+
private writeCreate;
|
|
313
|
+
/**
|
|
314
|
+
* The read that begins a transaction writing a new session `id`, by `create` or by a fork: whether it exists and, where
|
|
315
|
+
* this store has seen shared history, whether a deleted session with this ID left rows forks still read, in the same
|
|
316
|
+
* statement.
|
|
317
|
+
*/
|
|
318
|
+
private newSessionRead;
|
|
319
|
+
/**
|
|
320
|
+
* In the transaction that writes a new session `id`, before its writes, given what {@link newSessionRead} found:
|
|
321
|
+
* refuses a session that exists. Where a deleted session with this ID left rows forks still read, those forks get
|
|
322
|
+
* their own copies first and the rows go, so the new session starts empty and their sweep never takes its rows. A
|
|
323
|
+
* fork whose copy a missing source chunk refuses keeps the old rows, and the new session is refused with it.
|
|
324
|
+
*/
|
|
325
|
+
private startNewSession;
|
|
326
|
+
/**
|
|
327
|
+
* {@link startNewSession} for a fork with shared history, once it has read its donor: resolves with the donor. A donor
|
|
328
|
+
* that read the rows a deleted session with the child's ID left holds its own copy of them now, in segments of its
|
|
329
|
+
* own, and is read again (#6560).
|
|
330
|
+
*/
|
|
331
|
+
private startSharedFork;
|
|
298
332
|
createFork(header: SessionRecordHeader, entries: SessionForkSeed, source: ForkArchiveSource): Promise<(SessionWriteResult & {
|
|
299
333
|
remainingBlobs?: readonly string[];
|
|
300
334
|
}) | undefined>;
|
|
335
|
+
private writeCreateFork;
|
|
301
336
|
/**
|
|
302
337
|
* A fork from the entries a caller holds. Where the database has shared history (#6560) and the source is still in
|
|
303
338
|
* the generation the fork read it in, every entry the store read from the source and the caller kept unchanged, and
|
|
@@ -354,6 +389,7 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
354
389
|
createStagedFork(header: SessionRecordHeader, stream: SessionForkStream, source: ForkArchiveSource): Promise<SessionWriteResult & {
|
|
355
390
|
readonly remainingBlobs: readonly string[];
|
|
356
391
|
}>;
|
|
392
|
+
private writeCreateStagedFork;
|
|
357
393
|
/**
|
|
358
394
|
* Creates the fork staging table unless it exists, as `atomic storage migrate` does as the owner role (#5594): a
|
|
359
395
|
* runtime role without DDL privileges then stages bounded clones too. Opens never create it.
|
|
@@ -371,6 +407,8 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
371
407
|
private forkHost;
|
|
372
408
|
/** The statements that link the entries a session with fork segments stores, as a copy links them (#6560). */
|
|
373
409
|
private forkLinks;
|
|
410
|
+
/** How the snapshot index links a materialization's copies and a fork moved onto another copy (#6560). */
|
|
411
|
+
private entryLinks;
|
|
374
412
|
/**
|
|
375
413
|
* @internal Gives every fork that shares history with `sessionId` its own copy of what it reads, so the session's
|
|
376
414
|
* rows no longer stay for them; see fork-detach.ts. Detaches a crash stopped are finished first. Nothing to do where
|
|
@@ -425,9 +463,10 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
425
463
|
private lineageTables;
|
|
426
464
|
/**
|
|
427
465
|
* The reads that begin a fork of session `donor` into `child` with shared history (#6560), in order: whether the child
|
|
428
|
-
* exists; the
|
|
429
|
-
*
|
|
430
|
-
*
|
|
466
|
+
* exists; the tombstones of the deleted sessions among the donor's sources, locked `key-share`; the rows of the donor
|
|
467
|
+
* and of the sessions its segments name, as the statement starts or as this store last saw them, each locked
|
|
468
|
+
* `key-share` in id order, unless the child exists, with the donor's watermark and generation, and with `withState`
|
|
469
|
+
* its summary state; then the donor's segments, read once those locks are held.
|
|
431
470
|
*/
|
|
432
471
|
private sharedForkReads;
|
|
433
472
|
/**
|
|
@@ -455,6 +494,7 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
455
494
|
append(sessionId: string, entries: readonly SessionEntry[], options: SessionWriteOptions): Promise<{
|
|
456
495
|
readonly lastSeq: number;
|
|
457
496
|
}>;
|
|
497
|
+
private writeAppend;
|
|
458
498
|
/**
|
|
459
499
|
* Remembers `row`, the session's row a committed write of this store left, for the next append to plan from, where
|
|
460
500
|
* appends go through the append function; forgets the session's row when `row` is undefined. At most
|
|
@@ -489,11 +529,14 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
489
529
|
*/
|
|
490
530
|
prepareAppendFunction(): Promise<void>;
|
|
491
531
|
replace(sessionId: string, header: SessionRecordHeader, entries: readonly SessionEntry[], options: SessionWriteOptions): Promise<SessionWriteResult>;
|
|
532
|
+
private writeReplace;
|
|
492
533
|
updateHeader(header: SessionRecordHeader, options: SessionWriteOptions): Promise<SessionWriteResult>;
|
|
534
|
+
private writeUpdateHeader;
|
|
493
535
|
load(sessionId: string): Promise<SessionSnapshot>;
|
|
494
536
|
readEntryRange(sessionId: string, query: SessionEntriesQuery): Promise<SessionEntriesPage>;
|
|
495
537
|
readHeader(sessionId: string): Promise<SessionRecordHeader | undefined>;
|
|
496
538
|
delete(sessionId: string): Promise<void>;
|
|
539
|
+
private writeDelete;
|
|
497
540
|
/**
|
|
498
541
|
* The fork history of `sessionId` where the transaction `tx` runs on shared history: through `reads`, the transaction's
|
|
499
542
|
* leading reads, or, for a store that had not seen shared history when the transaction began, read now.
|
|
@@ -587,6 +630,10 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
587
630
|
private pruneSummaries;
|
|
588
631
|
private assertOpen;
|
|
589
632
|
private assertListing;
|
|
633
|
+
/** The session-row read that `read` makes first, shared with `load`'s leading statements. */
|
|
634
|
+
private loadHeadStatement;
|
|
635
|
+
/** One page read of `readRows`, shared with `load`'s leading statements. */
|
|
636
|
+
private readRowsPageStatement;
|
|
590
637
|
private read;
|
|
591
638
|
/**
|
|
592
639
|
* The entries of session `sessionId` from `from` through `through`, in pages, through its view (#6560): only those
|
|
@@ -605,17 +652,32 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
605
652
|
* `entry_id`, `entry_json` and `chunks`, and where each is stored.
|
|
606
653
|
*/
|
|
607
654
|
private entriesView;
|
|
608
|
-
private
|
|
655
|
+
private cacheResumeIndex;
|
|
656
|
+
/**
|
|
657
|
+
* Persists a freshly rebuilt current-leaf resume index through one conditional `UPDATE ... RETURNING` guarded by
|
|
658
|
+
* `(id, revision, last_seq)`, so a concurrent write can never have a stale index marked current. Returns whether the
|
|
659
|
+
* row still stood at `(row.revision, row.last_seq)`. On a read-only connection where the update cannot run, verifies
|
|
660
|
+
* `(revision, last_seq)` when `verifyOnReadOnly` is set and caches the index in memory only.
|
|
661
|
+
*/
|
|
662
|
+
private persistRebuiltResumeIndex;
|
|
609
663
|
/**
|
|
610
|
-
* Runs `read
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
*
|
|
664
|
+
* Runs `read` inside a read-only snapshot transaction with a current resume index. For the session's current leaf
|
|
665
|
+
* (`cut` absent), reads the session row with the transaction's start so a current index costs no read before it
|
|
666
|
+
* (#6560). When the index is missing or stale (or a historical cut is requested), passes the already-read row into
|
|
667
|
+
* `prepareResume` to rebuild without re-reading it, then runs `read` in a transaction whose leading read verifies
|
|
668
|
+
* `(revision, last_seq)` still matches.
|
|
614
669
|
*/
|
|
615
670
|
private withResumeIndex;
|
|
616
671
|
private prepareResume;
|
|
672
|
+
/**
|
|
673
|
+
* Folds the entries of `sessionId` through `limit` into a resume index on `this.database`. Returns `undefined` when a
|
|
674
|
+
* concurrent schema switch or session replacement requires restarting the rebuild attempt.
|
|
675
|
+
*/
|
|
676
|
+
private foldResumeIndex;
|
|
617
677
|
readTail(sessionId: string, fromSeq: number): Promise<SessionTail>;
|
|
618
678
|
readRange(sessionId: string, startSeq: number, endSeq: number, expectedEpoch?: string): Promise<SessionEntryRange>;
|
|
679
|
+
/** The statement of {@link historyHead}, shared with leading reads. */
|
|
680
|
+
private historyHeadStatement;
|
|
619
681
|
/**
|
|
620
682
|
* The session's watermark and generation; with `segments`, the fork segments table of a database with shared
|
|
621
683
|
* history, also whether the session has segments (#6560), in the same statement: a read that leaves a session without
|
|
@@ -675,7 +737,7 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
675
737
|
readScanPage(sessionId: string, startSeq: number, endSeq: number, epoch: string | undefined, limit: number, options?: SessionScanOptions): Promise<SessionScanPage>;
|
|
676
738
|
/**
|
|
677
739
|
* A condition on an entries row that holds for every entry `select` selects (and more): an entry larger than a page;
|
|
678
|
-
* on SQLite
|
|
740
|
+
* on SQLite, a message whose stored type and role say it is a tool result, or an assistant message with a
|
|
679
741
|
* tool call named other than `exceptCalls`, and any row that is not valid JSON; on Postgres, which would parse each
|
|
680
742
|
* row's JSON to read those, any row whose JSON holds a tool call block's `"toolCall"` or a result's `"toolResult"`,
|
|
681
743
|
* which `JSON.stringify`, the only writer of a row, always writes as such (it never escapes a letter).
|
|
@@ -740,14 +802,20 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
740
802
|
/** Whether session `sessionId` has fork segments, read in `tx`, whose database has shared history (#6560). */
|
|
741
803
|
private hasForkSegments;
|
|
742
804
|
private appendedResume;
|
|
805
|
+
/**
|
|
806
|
+
* Single-statement lookup of the latest seq of `entryId` in session `sessionId` through `viewTables`: checks
|
|
807
|
+
* whether `snapshot_index_sources` has a complete `'session-entries'` backfill in the same snapshot and reads
|
|
808
|
+
* `sessionLinks` when complete or `entries` otherwise. With `requireSession`, anchors the row on `sessions` so a
|
|
809
|
+
* missing session returns no row.
|
|
810
|
+
*/
|
|
811
|
+
private entrySeqStatement;
|
|
743
812
|
/**
|
|
744
813
|
* The latest seq of session `sessionId` that holds entry `entryId`, through its view (#6560): in transaction
|
|
745
814
|
* `executor` with `tables`, or, with `tables` undefined, outside a transaction through `outsideTransaction`. A fork's
|
|
746
815
|
* inherited entries are linked under the sessions that store them, at their seqs there, which the view renumbers.
|
|
747
816
|
*/
|
|
748
817
|
private seqOfEntry;
|
|
749
|
-
|
|
750
|
-
/** The statement that saves the session's row as `saveSummary` saves it, with what `saveSummary` returns. */
|
|
818
|
+
/** The statement that saves the session's row, with the search texts of `snapshot`'s entries and its generation. */
|
|
751
819
|
private summaryWrite;
|
|
752
820
|
private insertEntries;
|
|
753
821
|
/**
|
|
@@ -780,6 +848,19 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
780
848
|
* waiting for each statement's answer, so it never holds more than about that much of them, or sends it, at once.
|
|
781
849
|
*/
|
|
782
850
|
private writeEntries;
|
|
851
|
+
/**
|
|
852
|
+
* The deletes of session `sessionId`'s rows in `before` (the tables of rows only `delete` removes), then in its search
|
|
853
|
+
* texts, entry chunks and entries, in that order: what a delete or a replace removes ahead of the session's row.
|
|
854
|
+
*/
|
|
855
|
+
private sessionRowDeletes;
|
|
856
|
+
/** The delete of session `sessionId`'s row. */
|
|
857
|
+
private sessionRowDelete;
|
|
858
|
+
/**
|
|
859
|
+
* Runs `statements` as the last calls of transaction `tx`: where its connection is pipelined, they go out with the
|
|
860
|
+
* commit, in one round trip, and commit together or, when one fails, not at all; on a connection thread, as one
|
|
861
|
+
* request; otherwise one after another. The first that fails ends them with its failure.
|
|
862
|
+
*/
|
|
863
|
+
private finishWrites;
|
|
783
864
|
private encode;
|
|
784
865
|
}
|
|
785
866
|
/** A marker of a running session, with the sessions schema and the Atomic version its process recorded. */
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using /tree.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using /tree.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.11-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.4") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.4 while this session was running; restart it to keep using /tree.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|