@bastani/atomic 0.10.11-alpha.2 → 0.10.11-alpha.3
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 +99 -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} +14 -2
- package/dist/_shared/{p1b-elig-ENCUPKKJ.js.map → p1b-elig-TVB5CBLL.js.map} +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +3 -3
- package/dist/_shared/{sdk-IQMULKFU.js → sdk-B5LEWGGI.js} +340 -163
- 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-EZUKEP4Q.js} +48 -40
- package/dist/_shared/startup-0-0-EZUKEP4Q.js.map +1 -0
- package/dist/_shared/{startup-0-1-7T2IAE7J.js → startup-0-1-RTOHJFDJ.js} +195 -42
- package/dist/_shared/startup-0-1-RTOHJFDJ.js.map +1 -0
- package/dist/_shared/startup-0-2-5QHPCEON.js +33 -43
- 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 +39 -23
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/{startup-8-1-X32CYSXB.js → startup-8-1-LZFXSD3Z.js} +90 -1176
- package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +186 -35
- 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 +23 -0
- package/dist/builtin/intercom/README.md +2 -2
- package/dist/builtin/intercom/broker/broker.bundle.mjs +913 -289
- package/dist/builtin/intercom/broker/database-wake-up-bus.ts +243 -64
- package/dist/builtin/intercom/broker/multinode-router.ts +154 -22
- package/dist/builtin/intercom/broker/multinode-state-store.ts +30 -3
- package/dist/builtin/intercom/broker/open-broker-state.ts +14 -0
- package/dist/builtin/intercom/broker/sql-add-column.ts +29 -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 +170 -74
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +298 -47
- 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 +24 -7
- package/dist/builtin/intercom/broker/sql-retention.ts +141 -0
- package/dist/builtin/intercom/broker/sql-schema.ts +136 -19
- 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 +2 -3
- 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/package.json +1 -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 +2 -2
- 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 +8 -0
- 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 +19 -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 +11 -0
- package/dist/core/storage/fenced-paths.js +11 -0
- 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 +8 -13
- package/dist/core/storage/node-sqlite-thread.js.map +1 -1
- package/dist/core/storage/node-sqlite.js +51 -3
- 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 +7 -8
- package/dist/core/storage/schema-catalog.js +8 -8
- 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-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-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-store.d.ts +5 -1
- 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 +3 -3
- 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 +43 -4
- 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 +48 -11
- 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 +6 -1
- package/dist/core/storage/sqlite-facade.js +1 -0
- package/dist/core/storage/sqlite-facade.js.map +1 -1
- 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 +40 -3
- package/dist/core/worktree-snapshot/blob-store.js +414 -21
- 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 +79 -38
- 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 +1421 -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/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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __commonJSMin, __name, __require, __toESM } from "./rolldown-runtime-BGM3D5V3.js";
|
|
2
2
|
import { APP_NAME, BUILTIN_PACKAGE_DIR_NAMES, CONFIG_DIR_NAME, ENV_AGENT_DIR, ENV_DEBUG, ENV_OFFLINE, ENV_PACKAGE_DIR, ENV_SELF_UPDATE_COMMAND, ENV_SESSION_DIR, ENV_SHARE_VIEWER_URL, ENV_STDIN_TIMEOUT_MS, ENV_TELEMETRY, INSTALLED_EXTENSION_ENTRIES, SOURCE_EXTENSION_ENTRIES, VERSION, createChildProcessEnvironment, createModuleRequire, findHelperExecutableAsync, getAgentDir, getAgentDirs, getBinDir, getEnvValue, getPackageDir, helperLaunchAsync, isBunBinary, isBundledBuild, isChildProcessExitStatusUnknownError, missingHelperOptions, resolvePath, stripBom, waitForChildProcess } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
-
import { BUILTIN_HELP_TOOL_NAMES, BUILTIN_PATH_PREFIX, CountdownTimer, Diff, DynamicBorder, EventSourceError, FORKED_PACKAGE_NAMES, FileToolAbortedError, FramedSelector, GIT_MINIMUM_VERSION, GitProvisionConfigError, GitProvisionTimeoutError, GitUnavailableError, JSON_RPC_ERROR_CODES, LlamaServerRequestError, LlamaServerUnreachableError, MAX_POSITION_LENGTH, MAX_TOOL_DETACHMENT_AFTER_MS, ManagedToolDownloadError, ManagedToolTimeoutError, McpAbortError, McpConnectionClosedError, McpError, McpTimeoutError, ROW_INTENT_META, STALE_EXTENSION_CONTEXT_MESSAGE, SUPPORTED_PROTOCOL_VERSIONS, Stop, SubscriptionClosedError, SubscriptionConfigError, SubscriptionEventError, SubscriptionHandlerError, SubscriptionRecordError, TASK_MARKS, TaskCleanupError, TaskEvictedError, ToolDetachmentError, VALID_THINKING_LEVELS, abortSymbol, applyExifOrientation, applySessionSummaryEntries, asyncScope, attachCleanupCause as attachCleanupCause$1, attachGitCleanupFailure, cancelReasonText, canonicalEventBusFor, captureHerdrEnvironment, combineUsage, compactTemplate, compactUrl, createGitEnvironment, createOwnedAbortController, decodeChatOrder, decodeChatRecord, defaultToolNamesFor, deserializeToolDetachmentError, encodeChatOrder, fetchWithRetry, fieldTone, firstChatOrders, flushable, formatSize, formatTodoId, formatTokenCount, getBuiltinPackageLocations, getDefaultCacheRetention, getDefaultSessionDirPath, getFinalValue, getFunctionList, getManyValues, getPiUserAgent, getProviderLoginHelp, getResourcePathKeyAsync, getTodoStatus, getTodoTitle, getToolListError, holdProcessDescendants, isEventSourceError, isExtensionStartupFailure, isFinalValue, isFlushable, isFunctionList, isGitProvisionError, isGitUnavailableError, isInstallTelemetryEnabled, isJsonRpcId, isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse, isManagedToolError, isMandatoryRuntimeTool, isMany, isObject, isPathInside, isStop, isSyntheticPath, isTodoClosed, isTrustedMandatoryRuntimeTool, isValidThinkingLevel, joinForkSegments, leadingAndTrailingWs, leadingWs, longestCommonPrefix, longestCommonSuffix, materializeSessionSummaryMetadata, maximumOverlap, mergeReadRanges, none, normalizeDisplayText, normalizeTodoId, parseTranscriptFrameLayout, registerCanonicalEventBus, removePrefix, removeSuffix, renderToolPath, replacePrefix, replaceSuffix, replaceTabs, reportContained, require_constants, require_debug, require_identity, require_ignore, require_parse_url, require_sha256, require_stringifyNumber, require_util_contains_newline, rowTone, segment, segmentLength,
|
|
3
|
+
import { BUILTIN_HELP_TOOL_NAMES, BUILTIN_PATH_PREFIX, CountdownTimer, Diff, DynamicBorder, EventSourceError, FORKED_PACKAGE_NAMES, FileToolAbortedError, FramedSelector, GIT_MINIMUM_VERSION, GitProvisionConfigError, GitProvisionTimeoutError, GitUnavailableError, JSON_RPC_ERROR_CODES, LlamaServerRequestError, LlamaServerUnreachableError, MAX_POSITION_LENGTH, MAX_TOOL_DETACHMENT_AFTER_MS, ManagedToolDownloadError, ManagedToolTimeoutError, McpAbortError, McpConnectionClosedError, McpError, McpTimeoutError, ROW_INTENT_META, STALE_EXTENSION_CONTEXT_MESSAGE, SUPPORTED_PROTOCOL_VERSIONS, Stop, SubscriptionClosedError, SubscriptionConfigError, SubscriptionEventError, SubscriptionHandlerError, SubscriptionRecordError, TASK_MARKS, TaskCleanupError, TaskEvictedError, ToolDetachmentError, VALID_THINKING_LEVELS, abortSymbol, applyExifOrientation, applySessionSummaryEntries, asyncScope, attachCleanupCause as attachCleanupCause$1, attachGitCleanupFailure, canWatchProcessUntilHostDies, cancelReasonText, canonicalEventBusFor, captureHerdrEnvironment, combineUsage, compactTemplate, compactUrl, createGitEnvironment, createOwnedAbortController, decodeChatOrder, decodeChatRecord, defaultToolNamesFor, deserializeToolDetachmentError, encodeChatOrder, fetchWithRetry, fieldTone, firstChatOrders, flushable, formatSize, formatTodoId, formatTokenCount, getBuiltinPackageLocations, getDefaultCacheRetention, getDefaultSessionDirPath, getFinalValue, getFunctionList, getManyValues, getPiUserAgent, getProviderLoginHelp, getResourcePathKeyAsync, getTodoStatus, getTodoTitle, getToolListError, holdProcessDescendants, isEventSourceError, isExtensionStartupFailure, isFinalValue, isFlushable, isFunctionList, isGitProvisionError, isGitUnavailableError, isInstallTelemetryEnabled, isJsonRpcId, isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse, isManagedToolError, isMandatoryRuntimeTool, isMany, isObject, isPathInside, isStop, isSyntheticPath, isTodoClosed, isTrustedMandatoryRuntimeTool, isValidThinkingLevel, joinForkSegments, leadingAndTrailingWs, leadingWs, longestCommonPrefix, longestCommonSuffix, materializeSessionSummaryMetadata, maximumOverlap, mergeReadRanges, none, normalizeDisplayText, normalizeTodoId, parseTranscriptFrameLayout, registerCanonicalEventBus, removePrefix, removeSuffix, renderToolPath, replacePrefix, replaceSuffix, replaceTabs, reportContained, require_constants, require_debug, require_identity, require_ignore, require_parse_url, require_sha256, require_stringifyNumber, require_util_contains_newline, rowTone, segment, segmentLength, setFunctionList, sharedWakeDispatcher, sleep as sleep$1, spanElapsedMs, spawnHostProcess, splitTodosByAssignment, stop, str as str$1, stripFenceMarkers, styleFieldTone, summarizeSession, toError, trailingWs, uniquifyToolCallIds, validQuestionnaire, watchProcessUntilHostDies, withCleanup, withLegacyPackageNames, yieldToEventLoop, yieldTurn } from "./startup-0-0-EZUKEP4Q.js";
|
|
4
4
|
import { CodeHighlighter, OVERLAY_ACTIVE_ROW_MARKER, getLanguageFromPath, graphemeAt, highlightCode, keyHint, loadPhoton, navActionText, navFirstKeyText, parenthesizedKeyHint, rawKeyHint, renderNavHintLine, singleLineDisplayText, terminalDisplayCursor, terminalDisplayText, theme } from "./p2-shell-main-B2WIALFD.js";
|
|
5
|
-
import { failureDebugFields, findInCauseChain, hasErrorIdentity, reportDebugAsync, serializeErrorCause } from "./p1b-elig-
|
|
5
|
+
import { failureDebugFields, findInCauseChain, hasErrorIdentity, reportDebugAsync, serializeErrorCause } from "./p1b-elig-TVB5CBLL.js";
|
|
6
6
|
import { windowsPowerShellEnvironment } from "./p1-elig-shell-WWRO3L2R.js";
|
|
7
7
|
import { parseSerializedDecisionError } from "./settings-startup-HXQLSUWM.js";
|
|
8
8
|
import { SETTINGS_DEFAULTS } from "./p2-common-YLSYXMDQ.js";
|
|
@@ -36,8 +36,10 @@ import { Buffer as Buffer$1, constants as constants$3 } from "node:buffer";
|
|
|
36
36
|
import { StringDecoder } from "node:string_decoder";
|
|
37
37
|
import { isProxy } from "node:util/types";
|
|
38
38
|
import { Type as Type$1 } from "@bastani/atomic-ai/utils/typebox/index";
|
|
39
|
+
import { storageSchemaCurrent } from "../core/storage/added-exports.js";
|
|
39
40
|
import { dialectOf } from "../core/storage/dialect.js";
|
|
40
|
-
import
|
|
41
|
+
import * as migrations from "../core/storage/migrations.js";
|
|
42
|
+
import { applyStorageMigrations, ensureStorageSchema, withShortSchemaLockWaits } from "../core/storage/migrations.js";
|
|
41
43
|
import { schemaCatalogOf } from "../core/storage/schema-catalog.js";
|
|
42
44
|
import { sequenceRunner } from "../core/storage/statement-sequence.js";
|
|
43
45
|
import { TextDecoder as TextDecoder$1 } from "util";
|
|
@@ -276,7 +278,7 @@ ${chalk.bold("Commands:")}
|
|
|
276
278
|
${APP_NAME} auth <command> Log in or out, print credentials, or check provider readiness
|
|
277
279
|
${APP_NAME} mcp <command> Configure MCP servers, check connections, and sign in
|
|
278
280
|
${APP_NAME} storage <command> Show storage selections and connectivity, or join a shared database
|
|
279
|
-
${APP_NAME} team <command>
|
|
281
|
+
${APP_NAME} team <command> Show the storage layout in effect (individual, team, ci or custom)
|
|
280
282
|
${APP_NAME} intercom <command> Show or restart this machine's Intercom broker
|
|
281
283
|
${APP_NAME} blueprint cache-key Print cache keys and paths for a runner's cache action (actions/cache)
|
|
282
284
|
${APP_NAME} blueprint prebuild Prebuild a repository into an idle worktree for later resume
|
|
@@ -464,11 +466,6 @@ ${chalk.bold("Environment Variables:")}
|
|
|
464
466
|
PI_* aliases are also supported for app-specific variables above.
|
|
465
467
|
ATOMIC_STORAGE - Shared storage selection JSON for sessions and Intercom (overridden by --storage)
|
|
466
468
|
ATOMIC_SESSIONS_STORAGE - Session-only storage selection JSON (cannot be combined with ${ENV_SESSION_DIR})
|
|
467
|
-
ATOMIC_PROFILE - ci: use the team database for sessions and Intercom without settings
|
|
468
|
-
ATOMIC_TEAM_URL - Team database URL for ATOMIC_PROFILE=ci
|
|
469
|
-
ATOMIC_TEAM_TOKEN - Team database token for ATOMIC_PROFILE=ci (or ATOMIC_TEAM_TOKEN_FILE)
|
|
470
|
-
ATOMIC_TEAM_TOKEN_FILE - File holding the team database token for ATOMIC_PROFILE=ci
|
|
471
|
-
ATOMIC_TEAM_PREFIX - Team table prefix for ATOMIC_PROFILE=ci
|
|
472
469
|
|
|
473
470
|
${chalk.bold("Built-in Tool Names:")}
|
|
474
471
|
${formatBuiltinToolHelpLines()}
|
|
@@ -4483,15 +4480,10 @@ const LOCAL_ONLY_STORAGE = /* @__PURE__ */ new Set([
|
|
|
4483
4480
|
function isLocalOnlySessionStorage(adapter) {
|
|
4484
4481
|
return LOCAL_ONLY_STORAGE.has(adapter);
|
|
4485
4482
|
}
|
|
4486
|
-
/** The command that joins this node to shared storage, named in hints when a lookup misses on local-only storage. */
|
|
4487
|
-
const TEAM_JOIN_COMMAND = "atomic team join <url> --token-file <path>";
|
|
4488
4483
|
/** The command that points this node's storage at a shared database, keeping the rest of its layout. */
|
|
4489
|
-
const STORAGE_JOIN_COMMAND = "atomic storage join <url> --
|
|
4490
|
-
/**
|
|
4491
|
-
|
|
4492
|
-
* `atomic team join` keeps sessions on each machine, so a machine joined that way leaves the team first.
|
|
4493
|
-
*/
|
|
4494
|
-
const SESSION_STORAGE_JOIN = `\`${STORAGE_JOIN_COMMAND}\` (after \`atomic team leave\` on a machine joined with \`atomic team join\`, which keeps sessions on each machine)`;
|
|
4484
|
+
const STORAGE_JOIN_COMMAND = "atomic storage join <postgres-url> --password-file <path>";
|
|
4485
|
+
/** How a node puts its sessions in shared storage, named in hints when a session lookup misses on local-only storage. */
|
|
4486
|
+
const SESSION_STORAGE_JOIN = `\`${STORAGE_JOIN_COMMAND}\``;
|
|
4495
4487
|
/** How deep cause chains are serialized and walked. */
|
|
4496
4488
|
const MAX_CAUSE_DEPTH$1 = 8;
|
|
4497
4489
|
const AGENT_REHYDRATE_ERROR_NAME = "AgentRehydrateError";
|
|
@@ -8241,6 +8233,8 @@ async function execCommand(command, args, cwd, options, onQuit) {
|
|
|
8241
8233
|
truncated: false
|
|
8242
8234
|
};
|
|
8243
8235
|
}
|
|
8236
|
+
const endsWithHost = onQuit !== void 0;
|
|
8237
|
+
const guardianEndsIt = endsWithHost && canWatchProcessUntilHostDies();
|
|
8244
8238
|
const proc = spawnHostProcess(launch.file, argv, {
|
|
8245
8239
|
cwd,
|
|
8246
8240
|
env,
|
|
@@ -8249,9 +8243,11 @@ async function execCommand(command, args, cwd, options, onQuit) {
|
|
|
8249
8243
|
"pipe",
|
|
8250
8244
|
"pipe"
|
|
8251
8245
|
],
|
|
8252
|
-
endWithParent:
|
|
8246
|
+
endWithParent: endsWithHost && !guardianEndsIt,
|
|
8253
8247
|
...missingHelperOptions(launch)
|
|
8254
8248
|
});
|
|
8249
|
+
const hostDeathWatch = guardianEndsIt && proc.pid !== void 0 ? watchProcessUntilHostDies(proc.pid) : void 0;
|
|
8250
|
+
if (hostDeathWatch !== void 0) proc.once("exit", () => hostDeathWatch.release());
|
|
8255
8251
|
if (onQuit !== void 0 && proc.pid !== void 0) quitStoppableCommands.add(proc);
|
|
8256
8252
|
let stdout = "";
|
|
8257
8253
|
let stderr = "";
|
|
@@ -8360,6 +8356,7 @@ async function execCommand(command, args, cwd, options, onQuit) {
|
|
|
8360
8356
|
if (!killed && isChildProcessExitStatusUnknownError(error)) stderr = stderr ? `${stderr}\n${error.message}` : error.message;
|
|
8361
8357
|
else if (!stderr) stderr = error.message;
|
|
8362
8358
|
} finally {
|
|
8359
|
+
hostDeathWatch?.release();
|
|
8363
8360
|
clearTimeout(timeoutId);
|
|
8364
8361
|
options?.signal?.removeEventListener("abort", abort);
|
|
8365
8362
|
stopOnQuit?.();
|
|
@@ -9558,9 +9555,24 @@ async function create(path, header) {
|
|
|
9558
9555
|
throw e;
|
|
9559
9556
|
}
|
|
9560
9557
|
}
|
|
9561
|
-
/**
|
|
9558
|
+
/**
|
|
9559
|
+
* Device, a known inode, a recorded creation time and the header: an unknown inode or creation time proves no owner.
|
|
9560
|
+
* Where creation times move (APFS and HFS+, which never reuse an inode number) the epoch has none; see
|
|
9561
|
+
* `creation-time.ts`.
|
|
9562
|
+
*/
|
|
9562
9563
|
function hasStableFileOwner(epoch) {
|
|
9563
|
-
return /^\d+:[1-9]\d*:[1-9]\d*:[\da-f]{16}$/.test(epoch);
|
|
9564
|
+
return /^\d+:[1-9]\d*:(?:[1-9]\d*:)?[\da-f]{16}$/.test(epoch);
|
|
9565
|
+
}
|
|
9566
|
+
/**
|
|
9567
|
+
* The epoch an older build gave the owner's file on macOS, with its creation time in it, which the diagnostics it
|
|
9568
|
+
* saved are kept under: only while the file is still the one `owner.epoch` names, and has a creation time.
|
|
9569
|
+
*/
|
|
9570
|
+
async function olderEpoch(owner) {
|
|
9571
|
+
const current = /^(\d+:[1-9]\d*):([\da-f]{16})$/.exec(owner.epoch);
|
|
9572
|
+
if (!current || !owner.file) return void 0;
|
|
9573
|
+
const stats = await stat(owner.file, { bigint: true }).catch(() => void 0);
|
|
9574
|
+
if (!stats || stats.birthtimeNs <= 0n || `${stats.dev}:${stats.ino}` !== current[1]) return void 0;
|
|
9575
|
+
return `${current[1]}:${stats.birthtimeNs}:${current[2]}`;
|
|
9564
9576
|
}
|
|
9565
9577
|
async function discoverChatFile(file, id) {
|
|
9566
9578
|
const { path } = files({
|
|
@@ -9617,8 +9629,13 @@ async function readSlot(owner, slot) {
|
|
|
9617
9629
|
}
|
|
9618
9630
|
async function readFileChatRecords(owner, anchors) {
|
|
9619
9631
|
if (!hasStableFileOwner(owner.epoch)) return [];
|
|
9632
|
+
const older = await olderEpoch(owner);
|
|
9633
|
+
const owners = older === void 0 ? [owner] : [{
|
|
9634
|
+
...owner,
|
|
9635
|
+
epoch: older
|
|
9636
|
+
}, owner];
|
|
9620
9637
|
const result = [];
|
|
9621
|
-
for (const anchor of anchors) for (const line of await readSlot(
|
|
9638
|
+
for (const anchor of anchors) for (const each of owners) for (const line of await readSlot(each, slotFor(each, anchor))) {
|
|
9622
9639
|
const record = decodeChatRecord(line);
|
|
9623
9640
|
if (record) result.push({
|
|
9624
9641
|
anchor,
|
|
@@ -9629,7 +9646,16 @@ async function readFileChatRecords(owner, anchors) {
|
|
|
9629
9646
|
}
|
|
9630
9647
|
async function readFileChatOrders(owner, promptIds) {
|
|
9631
9648
|
if (!promptIds.length || !owner.file || !hasStableFileOwner(owner.epoch)) return [];
|
|
9632
|
-
const
|
|
9649
|
+
const older = await olderEpoch(owner);
|
|
9650
|
+
const owners = older === void 0 ? [owner] : [{
|
|
9651
|
+
...owner,
|
|
9652
|
+
epoch: older
|
|
9653
|
+
}, owner];
|
|
9654
|
+
const orders = [];
|
|
9655
|
+
for (const each of owners) for (const line of await readSlot(each, orderSlot(each))) {
|
|
9656
|
+
const order = decodeChatOrder(line);
|
|
9657
|
+
if (order) orders.push(order);
|
|
9658
|
+
}
|
|
9633
9659
|
return firstChatOrders(orders, promptIds);
|
|
9634
9660
|
}
|
|
9635
9661
|
async function deleteFileChatRecords(owner) {
|
|
@@ -12337,6 +12363,11 @@ var HistorySearchPositions = class {
|
|
|
12337
12363
|
}
|
|
12338
12364
|
};
|
|
12339
12365
|
// dist/core/storage/session/session-search-index.js
|
|
12366
|
+
/**
|
|
12367
|
+
* `ensureStorageSchemaOnce` of `migrations.ts`, which the copies earlier releases loaded lack: taken from the module
|
|
12368
|
+
* namespace, so this module links against them too. Without it the tuning runs in a transaction of its own, as before.
|
|
12369
|
+
*/
|
|
12370
|
+
const setupOnce = migrations;
|
|
12340
12371
|
const SESSION_SEARCH_DOMAIN = "session-search";
|
|
12341
12372
|
const SESSION_SEARCH_TABLES = Object.freeze({
|
|
12342
12373
|
state: "search_state",
|
|
@@ -12345,6 +12376,19 @@ const SESSION_SEARCH_TABLES = Object.freeze({
|
|
|
12345
12376
|
trigrams: "search_trgm",
|
|
12346
12377
|
entriesForget: "entries_search_forget"
|
|
12347
12378
|
});
|
|
12379
|
+
/**
|
|
12380
|
+
* The ledger step, `schema:session-search-tuning`, that gives an existing PostgreSQL trigram index the pending-list
|
|
12381
|
+
* limit below and its entries table the autovacuum settings below.
|
|
12382
|
+
*/
|
|
12383
|
+
const SESSION_SEARCH_TUNING_DOMAIN = "session-search-tuning";
|
|
12384
|
+
const SESSION_SEARCH_TUNING_REVISION = 1;
|
|
12385
|
+
/**
|
|
12386
|
+
* The PostgreSQL trigram index's `gin_pending_list_limit`, in kB: 64 MB rather than the server's default 4 MB. An insert
|
|
12387
|
+
* that finds the pending list over this limit merges the whole list into the index itself, inside its transaction and
|
|
12388
|
+
* the session's lock; the background merge (`SEARCH_PENDING_MERGE_CHARS`) and autovacuum keep the list far below it.
|
|
12389
|
+
*/
|
|
12390
|
+
const SEARCH_PENDING_LIST_LIMIT_KB = 65536;
|
|
12391
|
+
const SEARCH_ENTRIES_AUTOVACUUM = `autovacuum_vacuum_insert_threshold = 1000, autovacuum_vacuum_insert_scale_factor = 0`;
|
|
12348
12392
|
const SEARCH_PART_CHARS = 4096;
|
|
12349
12393
|
const MAX_INDEXED_ENTRY_CHARS = 8388608;
|
|
12350
12394
|
const PART_BITS = 14;
|
|
@@ -12597,12 +12641,18 @@ const sqliteFts = {
|
|
|
12597
12641
|
return seqs;
|
|
12598
12642
|
}
|
|
12599
12643
|
};
|
|
12644
|
+
/**
|
|
12645
|
+
* The search indexes this process found it does not own, by database (`databaseIdentity`, which names the role and
|
|
12646
|
+
* schema too), ledger and index: their tuning is left to `atomic storage migrate`, so later opens do not read the
|
|
12647
|
+
* catalog for it again.
|
|
12648
|
+
*/
|
|
12649
|
+
const unownedSearchIndexes = /* @__PURE__ */ new Set();
|
|
12600
12650
|
async function createTrigramIndex(tx, dialect, tables) {
|
|
12601
12651
|
await tx.exec("SAVEPOINT atomic_session_search_trgm");
|
|
12602
12652
|
try {
|
|
12603
12653
|
await tx.exec("CREATE EXTENSION IF NOT EXISTS pg_trgm");
|
|
12604
12654
|
const found = await tx.get("SELECT n.nspname AS schema FROM pg_catalog.pg_extension e JOIN pg_catalog.pg_namespace n ON n.oid = e.extnamespace WHERE e.extname = 'pg_trgm'");
|
|
12605
|
-
await tx.exec(`CREATE INDEX IF NOT EXISTS ${tables.trigrams} ON ${tables.entries} USING gin (body ${dialect.identifier(String(found?.schema))}.gin_trgm_ops)`);
|
|
12655
|
+
await tx.exec(`CREATE INDEX IF NOT EXISTS ${tables.trigrams} ON ${tables.entries} USING gin (body ${dialect.identifier(String(found?.schema))}.gin_trgm_ops) WITH (gin_pending_list_limit = ${SEARCH_PENDING_LIST_LIMIT_KB})`);
|
|
12606
12656
|
await tx.exec("RELEASE SAVEPOINT atomic_session_search_trgm");
|
|
12607
12657
|
} catch {
|
|
12608
12658
|
await tx.exec("ROLLBACK TO SAVEPOINT atomic_session_search_trgm");
|
|
@@ -12615,7 +12665,7 @@ async function trigramIndexExists(database, dialect, tables) {
|
|
|
12615
12665
|
const postgresTrigrams = {
|
|
12616
12666
|
async create(tx, dialect, tables, sessionTables) {
|
|
12617
12667
|
const { int, text } = dialect.types;
|
|
12618
|
-
await tx.exec(`CREATE TABLE IF NOT EXISTS ${tables.entries} (sid ${int} NOT NULL, seq ${int} NOT NULL, part ${int} NOT NULL, body ${text} NOT NULL, PRIMARY KEY (sid, seq, part))`);
|
|
12668
|
+
await tx.exec(`CREATE TABLE IF NOT EXISTS ${tables.entries} (sid ${int} NOT NULL, seq ${int} NOT NULL, part ${int} NOT NULL, body ${text} NOT NULL, PRIMARY KEY (sid, seq, part)) WITH (${SEARCH_ENTRIES_AUTOVACUUM})`);
|
|
12619
12669
|
await tx.exec(dialect.renderTrigger(forgetTrigger(tables, sessionTables, postgresTrigrams)));
|
|
12620
12670
|
await createTrigramIndex(tx, dialect, tables);
|
|
12621
12671
|
},
|
|
@@ -12639,6 +12689,60 @@ const postgresTrigrams = {
|
|
|
12639
12689
|
async merge() {
|
|
12640
12690
|
return false;
|
|
12641
12691
|
},
|
|
12692
|
+
async tune(database, dialect, tables, ledger) {
|
|
12693
|
+
if (database.readOnly === true) return;
|
|
12694
|
+
const schema = {
|
|
12695
|
+
ledger,
|
|
12696
|
+
domain: SESSION_SEARCH_TUNING_DOMAIN,
|
|
12697
|
+
revision: SESSION_SEARCH_TUNING_REVISION
|
|
12698
|
+
};
|
|
12699
|
+
if (await storageSchemaCurrent(database, schema)) return;
|
|
12700
|
+
const identity = database.databaseIdentity?.();
|
|
12701
|
+
const key = identity === void 0 ? void 0 : JSON.stringify([
|
|
12702
|
+
identity,
|
|
12703
|
+
ledger,
|
|
12704
|
+
tables.trigrams
|
|
12705
|
+
]);
|
|
12706
|
+
if (key !== void 0 && unownedSearchIndexes.has(key)) return;
|
|
12707
|
+
const found = await database.get(`SELECT pg_catalog.pg_has_role(current_user, i.relowner, 'USAGE')
|
|
12708
|
+
AND pg_catalog.pg_has_role(current_user, t.relowner, 'USAGE') AS owned
|
|
12709
|
+
FROM pg_catalog.pg_class i
|
|
12710
|
+
JOIN pg_catalog.pg_index x ON x.indexrelid = i.oid
|
|
12711
|
+
JOIN pg_catalog.pg_class t ON t.oid = x.indrelid
|
|
12712
|
+
WHERE i.relnamespace = current_schema()::regnamespace AND i.relname = ?`, dialect.identifier(tables.trigrams));
|
|
12713
|
+
if (found === void 0) return;
|
|
12714
|
+
if (found.owned !== true && Number(found.owned) !== 1) {
|
|
12715
|
+
if (key !== void 0) unownedSearchIndexes.add(key);
|
|
12716
|
+
return;
|
|
12717
|
+
}
|
|
12718
|
+
const setup = async (tx) => {
|
|
12719
|
+
await tx.exec(`ALTER INDEX ${tables.trigrams} SET (gin_pending_list_limit = ${SEARCH_PENDING_LIST_LIMIT_KB})`);
|
|
12720
|
+
await tx.exec(`ALTER TABLE ${tables.entries} SET (${SEARCH_ENTRIES_AUTOVACUUM})`);
|
|
12721
|
+
};
|
|
12722
|
+
const once = setupOnce.ensureStorageSchemaOnce;
|
|
12723
|
+
if (once !== void 0) await once(database, schema, setup);
|
|
12724
|
+
else await database.transaction((tx) => ensureStorageSchema(tx, dialect, schema, () => setup(tx)), {
|
|
12725
|
+
retryTransientFailures: true,
|
|
12726
|
+
concurrency: {
|
|
12727
|
+
kind: "serial",
|
|
12728
|
+
domain: ledger
|
|
12729
|
+
}
|
|
12730
|
+
});
|
|
12731
|
+
},
|
|
12732
|
+
async mergePending(database, dialect, tables) {
|
|
12733
|
+
const owned = (await database.autocommit?.({
|
|
12734
|
+
sql: `SELECT CASE WHEN pg_catalog.pg_has_role(current_user, c.relowner, 'USAGE')
|
|
12735
|
+
AND pg_catalog.pg_try_advisory_xact_lock(pg_catalog.hashtextextended(current_schema() || '.' || c.relname || ':pending', 0))
|
|
12736
|
+
THEN pg_catalog.gin_clean_pending_list(c.oid) END AS pages,
|
|
12737
|
+
pg_catalog.pg_has_role(current_user, c.relowner, 'USAGE') AS owned
|
|
12738
|
+
FROM pg_catalog.pg_class c WHERE c.relnamespace = current_schema()::regnamespace AND c.relname = ?`,
|
|
12739
|
+
params: [dialect.identifier(tables.trigrams)]
|
|
12740
|
+
}, {
|
|
12741
|
+
kind: "serial",
|
|
12742
|
+
domain: `${tables.trigrams}:pending`
|
|
12743
|
+
}) ?? [])[0]?.owned;
|
|
12744
|
+
return owned === true || Number(owned) === 1;
|
|
12745
|
+
},
|
|
12642
12746
|
async insert(tx, tables, sid, docs, signal) {
|
|
12643
12747
|
for (let start = 0; start < docs.length; start += INSERT_ROWS_PER_STATEMENT) {
|
|
12644
12748
|
signal?.throwIfAborted();
|
|
@@ -12713,6 +12817,12 @@ var SqlSessionSearchIndex = class SqlSessionSearchIndex {
|
|
|
12713
12817
|
tables;
|
|
12714
12818
|
engine;
|
|
12715
12819
|
writesPrepared = false;
|
|
12820
|
+
/** Characters of search text written since the last background merge of the pending list began. */
|
|
12821
|
+
pendingChars = 0;
|
|
12822
|
+
/** The background merge of the pending list in flight, if any. */
|
|
12823
|
+
merging;
|
|
12824
|
+
/** False once a merge found that this role may not merge the pending list, which autovacuum then merges. */
|
|
12825
|
+
mayMerge = true;
|
|
12716
12826
|
constructor(database, sessionTables, tables) {
|
|
12717
12827
|
this.database = database;
|
|
12718
12828
|
this.dialect = dialectOf(database);
|
|
@@ -12723,20 +12833,25 @@ var SqlSessionSearchIndex = class SqlSessionSearchIndex {
|
|
|
12723
12833
|
static async open(database, sessionTables, prefix) {
|
|
12724
12834
|
const tables = renderStorageIdentifiers("sessions", SESSION_SEARCH_TABLES, prefix);
|
|
12725
12835
|
const engine = engineFor(dialectOf(database));
|
|
12836
|
+
const ledger = storageMigrationTable(prefix);
|
|
12837
|
+
let created = false;
|
|
12726
12838
|
try {
|
|
12727
12839
|
if (await SqlSessionSearchIndex.tablesExist(database, tables)) return new SqlSessionSearchIndex(database, sessionTables, tables);
|
|
12728
12840
|
await applyStorageMigrations(database, SESSION_SEARCH_DOMAIN, [{
|
|
12729
12841
|
version: 1,
|
|
12730
12842
|
up: async (tx, dialect) => {
|
|
12731
12843
|
const { int, text, rowKey } = dialect.types;
|
|
12732
|
-
|
|
12844
|
+
const tuned = engine.tune === void 0 ? "" : `; INSERT INTO ${ledger} (domain, version, applied_at) VALUES ('schema:${SESSION_SEARCH_TUNING_DOMAIN}', ${SESSION_SEARCH_TUNING_REVISION}, ${dialect.nowMs}) ON CONFLICT DO NOTHING`;
|
|
12845
|
+
await tx.exec(`CREATE TABLE IF NOT EXISTS ${tables.state} (sid ${rowKey}, session_id ${text} NOT NULL UNIQUE, format ${int} NOT NULL, indexed_seq ${int} NOT NULL, revision ${text} NOT NULL, entry_id ${text} NOT NULL)${dialect.tableOptions}${tuned}`);
|
|
12733
12846
|
await engine.create(tx, dialect, tables, sessionTables);
|
|
12847
|
+
created = true;
|
|
12734
12848
|
}
|
|
12735
12849
|
}], {
|
|
12736
|
-
table:
|
|
12850
|
+
table: ledger,
|
|
12737
12851
|
acceptNewer: true
|
|
12738
12852
|
});
|
|
12739
12853
|
if (!await engine.ready(database, dialectOf(database), tables)) return void 0;
|
|
12854
|
+
if (!created) await engine.tune?.(database, dialectOf(database), tables, ledger).catch(() => void 0);
|
|
12740
12855
|
} catch {
|
|
12741
12856
|
return;
|
|
12742
12857
|
}
|
|
@@ -12780,7 +12895,7 @@ var SqlSessionSearchIndex = class SqlSessionSearchIndex {
|
|
|
12780
12895
|
indexedSeq,
|
|
12781
12896
|
lastSeq
|
|
12782
12897
|
}, generation, row.session_revision);
|
|
12783
|
-
await this.database.transaction((tx) => this.forget(tx, sessionId), this.
|
|
12898
|
+
await this.database.transaction((tx) => this.forget(tx, sessionId), this.searchWrite(sessionId));
|
|
12784
12899
|
return withCoverageMeta({
|
|
12785
12900
|
indexedSeq: 0,
|
|
12786
12901
|
lastSeq
|
|
@@ -12789,9 +12904,10 @@ var SqlSessionSearchIndex = class SqlSessionSearchIndex {
|
|
|
12789
12904
|
async extend(sessionId, format, afterSeq, throughSeq, texts, options) {
|
|
12790
12905
|
if (throughSeq >= SEQ_SPACE || throughSeq < afterSeq) return false;
|
|
12791
12906
|
options?.signal?.throwIfAborted();
|
|
12792
|
-
const txOptions = this.
|
|
12907
|
+
const txOptions = this.searchWrite(sessionId);
|
|
12793
12908
|
const { docs, oversizedSeqs } = prepareDocs(texts);
|
|
12794
|
-
|
|
12909
|
+
const totalChars = docs.reduce((sum, doc) => sum + doc.text.length, 0);
|
|
12910
|
+
if (totalChars <= BATCH_CHARS) {
|
|
12795
12911
|
let backlog = false;
|
|
12796
12912
|
const extended = await this.writeTransaction(sessionId, async (tx) => {
|
|
12797
12913
|
options?.signal?.throwIfAborted();
|
|
@@ -12825,6 +12941,7 @@ var SqlSessionSearchIndex = class SqlSessionSearchIndex {
|
|
|
12825
12941
|
const nextWhole = mergeWholeSeqs(row.whole_seqs, oversizedSeqs);
|
|
12826
12942
|
return (await tx.run(`UPDATE ${this.tables.state} SET indexed_seq = ?, entry_id = ? WHERE sid = ? AND session_id = ? AND format = ? AND indexed_seq = ? AND revision = ?`, throughSeq, nextWhole, sid, sessionId, format, afterSeq, activeGen)).changes === 1;
|
|
12827
12943
|
});
|
|
12944
|
+
this.notePendingChars(totalChars);
|
|
12828
12945
|
if (extended && backlog) await this.mergeBacklog(options?.signal);
|
|
12829
12946
|
return extended;
|
|
12830
12947
|
}
|
|
@@ -12876,6 +12993,7 @@ var SqlSessionSearchIndex = class SqlSessionSearchIndex {
|
|
|
12876
12993
|
}
|
|
12877
12994
|
return true;
|
|
12878
12995
|
}, txOptions)) return false;
|
|
12996
|
+
this.notePendingChars(batch.reduce((sum, doc) => sum + doc.text.length, 0));
|
|
12879
12997
|
if (backlog) await this.mergeBacklog(options?.signal);
|
|
12880
12998
|
start = end;
|
|
12881
12999
|
await yieldTurn();
|
|
@@ -12889,6 +13007,22 @@ var SqlSessionSearchIndex = class SqlSessionSearchIndex {
|
|
|
12889
13007
|
return (await tx.run(`UPDATE ${this.tables.state} SET indexed_seq = ?, entry_id = ? WHERE sid = ? AND session_id = ? AND format = ? AND indexed_seq = ? AND revision = ?`, throughSeq, nextWhole, sid, sessionId, format, afterSeq, activeGen)).changes === 1;
|
|
12890
13008
|
}, txOptions);
|
|
12891
13009
|
}
|
|
13010
|
+
/**
|
|
13011
|
+
* Counts `chars` of search text a committed write added, and once `SEARCH_PENDING_MERGE_CHARS` of them have, starts a
|
|
13012
|
+
* background merge of the pending list, which this write and the writes after it do not wait for. So no write merges
|
|
13013
|
+
* the list inside its transaction, which holds the session's lock (PostgreSQL only).
|
|
13014
|
+
*/
|
|
13015
|
+
notePendingChars(chars) {
|
|
13016
|
+
if (this.engine.mergePending === void 0 || !this.mayMerge || this.database.readOnly === true) return;
|
|
13017
|
+
this.pendingChars += chars;
|
|
13018
|
+
if (this.pendingChars < 131072 || this.merging !== void 0) return;
|
|
13019
|
+
this.pendingChars = 0;
|
|
13020
|
+
this.merging = this.engine.mergePending(this.database, this.dialect, this.tables).then((merged) => {
|
|
13021
|
+
if (!merged) this.mayMerge = false;
|
|
13022
|
+
}, () => void 0).finally(() => {
|
|
13023
|
+
this.merging = void 0;
|
|
13024
|
+
});
|
|
13025
|
+
}
|
|
12892
13026
|
async mergeBacklog(signal) {
|
|
12893
13027
|
for (let write = 0; write < MAX_MERGE_BACKLOG_WRITES; write++) {
|
|
12894
13028
|
await yieldTurn();
|
|
@@ -12896,11 +13030,34 @@ var SqlSessionSearchIndex = class SqlSessionSearchIndex {
|
|
|
12896
13030
|
}
|
|
12897
13031
|
}
|
|
12898
13032
|
/**
|
|
12899
|
-
* A write of the session `sessionId`'s index rows
|
|
12900
|
-
*
|
|
13033
|
+
* A write of the session `sessionId`'s index rows, in the domain of that session's index rather than the session's
|
|
13034
|
+
* own: saves to the session, which take the session's domain, run beside it. A rewrite of the session, which forgets
|
|
13035
|
+
* its index, takes this domain too ({@link writeLock}), so an index write commits wholly before the rewrite reads
|
|
13036
|
+
* the index or starts after it commits, and its checks then see the rewrite. `delete` holds the whole database.
|
|
12901
13037
|
*/
|
|
12902
|
-
|
|
12903
|
-
return
|
|
13038
|
+
searchWrite(sessionId) {
|
|
13039
|
+
return {
|
|
13040
|
+
retryTransientFailures: true,
|
|
13041
|
+
concurrency: {
|
|
13042
|
+
kind: "serial",
|
|
13043
|
+
domain: this.searchDomain(sessionId)
|
|
13044
|
+
}
|
|
13045
|
+
};
|
|
13046
|
+
}
|
|
13047
|
+
searchDomain(sessionId) {
|
|
13048
|
+
return `${this.tables.state}:${sessionId}`;
|
|
13049
|
+
}
|
|
13050
|
+
/**
|
|
13051
|
+
* On PostgreSQL, the statement that takes, inside a transaction of the session's own domain, the advisory lock index
|
|
13052
|
+
* writes of the session `sessionId` hold ({@link searchWrite}), keyed as the driver keys a domain's lock. A rewrite
|
|
13053
|
+
* runs it before it touches the index. Undefined where transactions do not run beside each other.
|
|
13054
|
+
*/
|
|
13055
|
+
writeLock(sessionId) {
|
|
13056
|
+
if (this.dialect.name !== "postgres") return void 0;
|
|
13057
|
+
return {
|
|
13058
|
+
sql: "SELECT pg_catalog.pg_advisory_xact_lock(pg_catalog.hashtextextended(CASE WHEN current_schema() = 'public' THEN '' ELSE current_schema() || ':' END || ?, 0)) IS NULL AS locked",
|
|
13059
|
+
params: [this.searchDomain(sessionId)]
|
|
13060
|
+
};
|
|
12904
13061
|
}
|
|
12905
13062
|
async writeTransaction(sessionId, body) {
|
|
12906
13063
|
let prepared = this.writesPrepared;
|
|
@@ -12910,7 +13067,7 @@ var SqlSessionSearchIndex = class SqlSessionSearchIndex {
|
|
|
12910
13067
|
prepared = true;
|
|
12911
13068
|
}
|
|
12912
13069
|
return body(tx);
|
|
12913
|
-
}, this.
|
|
13070
|
+
}, this.searchWrite(sessionId));
|
|
12914
13071
|
if (prepared) this.writesPrepared = true;
|
|
12915
13072
|
return result;
|
|
12916
13073
|
}
|
|
@@ -16692,10 +16849,6 @@ const SettingsSchema = Type$1.Object({
|
|
|
16692
16849
|
$schema: Type$1.Optional(Type$1.String({ description: "JSON Schema reference." })),
|
|
16693
16850
|
storage: Type$1.Optional(StorageSelectionSchema),
|
|
16694
16851
|
sessions: Type$1.Optional(Type$1.Object({ storage: Type$1.Optional(SessionStorageSelectionSchema) })),
|
|
16695
|
-
teamJoin: Type$1.Optional(Type$1.Object({ storage: Type$1.String({
|
|
16696
|
-
pattern: "^sha256:[0-9a-f]{64}$",
|
|
16697
|
-
description: "Fingerprint of the `storage` selection that `atomic team join` wrote."
|
|
16698
|
-
}) }, { description: "Managed team join record; leave unchanged." })),
|
|
16699
16852
|
lastChangelogVersion: Type$1.Optional(Type$1.String()),
|
|
16700
16853
|
firstRunOnboardingStartedVersion: Type$1.Optional(Type$1.String({ description: "Managed onboarding state; leave unchanged." })),
|
|
16701
16854
|
onboardedVersion: Type$1.Optional(Type$1.String({ description: "Managed onboarding completion state; leave unchanged." })),
|
|
@@ -19302,16 +19455,16 @@ var ChildCatalog = class ChildCatalog {
|
|
|
19302
19455
|
function sessionScratchDir(agentDir, cwd, _sessionId) {
|
|
19303
19456
|
return getDefaultSessionDirPath(cwd, agentDir);
|
|
19304
19457
|
}
|
|
19305
|
-
export { AgentRehydrateError, AgentReleaseConfigError, CacheWarmer, ChildCatalog, CommandDeliveries, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_SUBSCRIPTION_MAX_CONCURRENT, EMPTY_OUTPUT_TEXT, EngineHealthController, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, GIT_RELEASE, HistorySearchPositions, IMAGE_RESIZE_WORKER_RESPONSE_TYPE, LEGACY_AZURE_PROVIDER, LlamaClient, MAX_INDEXED_ENTRY_CHARS, MULTI_SUBMIT_LABEL, MarkdownContentCache, McpClient, MultiSelectView, NestedGitignore, NestedToolCallRunner, NoUsableModelError, QuestionParamsSchema, RESERVED_LABELS, RESUME_TIMINGS_TYPE, RemoteModelCatalog, RemoteQueuePause, ReopenedCompletionHeaders, ResumeTimingsRecorder, SEARCH_PART_CHARS, SESSIONS_TRANSFER_DIRECTORY, SESSION_STORAGE_JOIN, STORAGE_JOIN_COMMAND, SUMMARY_COMPACTION_PREFIX, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, SqlSessionSearchIndex, StorageImportIncompleteError, StorageSelectionSchema, StorageTransferError, StringEnum,
|
|
19458
|
+
export { AgentRehydrateError, AgentReleaseConfigError, CacheWarmer, ChildCatalog, CommandDeliveries, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_SUBSCRIPTION_MAX_CONCURRENT, EMPTY_OUTPUT_TEXT, EngineHealthController, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, GIT_RELEASE, HistorySearchPositions, IMAGE_RESIZE_WORKER_RESPONSE_TYPE, LEGACY_AZURE_PROVIDER, LlamaClient, MAX_INDEXED_ENTRY_CHARS, MULTI_SUBMIT_LABEL, MarkdownContentCache, McpClient, MultiSelectView, NestedGitignore, NestedToolCallRunner, NoUsableModelError, QuestionParamsSchema, RESERVED_LABELS, RESUME_TIMINGS_TYPE, RemoteModelCatalog, RemoteQueuePause, ReopenedCompletionHeaders, ResumeTimingsRecorder, SEARCH_PART_CHARS, SESSIONS_TRANSFER_DIRECTORY, SESSION_STORAGE_JOIN, STORAGE_JOIN_COMMAND, SUMMARY_COMPACTION_PREFIX, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, SqlSessionSearchIndex, StorageImportIncompleteError, StorageSelectionSchema, StorageTransferError, StringEnum, TOOL_OUTPUT_ENTRY_TYPE, TRANSPILE_CACHE_WRITE_WAIT_MS, TaskElapsedClocks, TaskToolError, ToolExecutionScheduler, TransportEvents, UNORDERED_ADMISSION, VERBATIM_COMPACTION_PREFIX, VERIFICATION_PENDING_REASON, WorkspaceBindingError, WorkspaceCollectionError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceError, WorkspaceGitError, WorkspacePublicationError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, WrappingSelect, acceptsForkReplay, addResource, adoptCommandSession, appendFileChatRecord, assertSessionBlobStore, assertSettingsWrites, attachCleanupCause, bindRegistrationCallbacks, bindTaskClock, bindTaskClockSource, bodyWidths, buildDirectoryTree, buildDirectoryTreeFromOperations, buildToolStatusReport, cancelInitialBinding, cancelPausedOwnerTasks, cancelReceiptSentence, cancelReceiptStatus, captureForkReplayPair, captureRegistrationInvocation, carriedTransformedPrompt, carryCompletionEvidence, chatAnswerIntent, chatNumberingFor, childPresentationInput, claimInteractiveBind, classifyCompactionModel, cleanupFailureSummary, collectAgentTasks, collectCommandDeliveries, collectExtensionPackageWarnings, collectFlags, collectMarkdownTransformers, collectPackageInstallWarnings, collectRegisteredTools, collectSettingsDiagnostics, columnWidths, compareCreated, compareFrozen, computeFocusedOptionHasPreview, conflictEntries, convertImageBytesToPng, convertToLlm, convertToLlmWithForkBoundaries, convertToPng, copyRegistrations, copySessionBlobs, createAccumulator, createBranchSummaryMessage, createCustomMessage, createInvocationBindings, createLazyBuiltinFactory, createManagedTaskClocks, createProviderAlias, createSessionHistoryToolDefinition, createSkillRouter, createVerbatimCompactionMessage, crossTabLeftWidthWithDonation, currentResourceAdmission, decideLayout, deferCommandTurn, deferMessagesInterleavedWithToolBatch, deferRestorePhase, deleteFileChatRecords, describeToolSelection, detectLinuxLibc, diffLines, diffWords, discoverChatFile, drainProcessStdio, drainWindowsDirectorySecurityReads, dropDeferredCommandTurn, ensurePngTranscoder, ensureTool, errorMessage$1 as errorMessage, execCommand, extensionRefreshRejection, extensionSource, filterSupersededHerdrIntegrationPaths, findEntryRenderer, findMessageRenderer, findToolDefinition, findWorkspaceError, fixUtf8Stream, flush, forkReplayFilter, forkToolDeclarations, formatAnswerScalar, formatBytes, formatNoUsableModelMessage, formatPackageInstallWarning, formatResumeTimings, formatTokenSegment, formatToolStatus, genBridge, getBuiltinExtensionEntryLabel, getClientIdentity, getCommandEnv, getGitDistributionTarget, getGitInstallDir, getGitReleaseMarker, getGitShellEnvironment, getGitShellEnvironmentAsync, getGitStatus, getGitStatusAsync, getLatestVersion, getLazyBuiltinSpec, getLoaderAgentDirs, getPromptCacheTtlMs, getStorageAdapterHostModules, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasExtensionHandlers, hasFileChatRecords, hasLazyBuiltinSpec, hasQuitStoppableCommands, hasRecordedTransformedPrompt, hasTaskPromptHost, hasTransformedPrompt, heldPromptInput, heldPrompts, initialBindScope, inlineToolOutput, insertForcedOptionsBeforeTerminator, invocationExtension, invocationRuntime, isAgentRehydrateError, isAgentReleaseConfigError, isBashToolResult, isContentFilterRefusal, isEditToolResult, isFindToolResult, isForkHeader, isHeldPromptInput, isInsideInputHook, isJsonValue, isLocalOnlySessionStorage, isLsToolResult, isNativeBuiltinExtensionPath, isOfflineModeEnabled, isPowerShellToolResult, isPresentationHostInput, isProviderCredentialRejection, isReadToolResult, isRetryableAgentRehydrateError, isRetryableModelFailure, isRetryableSameModelFailure, isRetryableWorkspaceError, isSafetyRefusalFailure, isSourceBuiltinExtensionPath, isStorageImportIncompleteError, isStorageTransferError, isTaskToolError, isToolCallEventType, isTruthyEnvFlag, isUnrecognizedModelFailure, isVerbatimCompactionMessage, isWorkspaceBindingError, isWorkspaceCollectionError, isWorkspaceConfigError, isWorkspaceDriftError, isWorkspaceError, isWorkspaceGitError, isWorkspacePublicationError, isWorkspaceRestoreError, isWorkspaceSandboxError, isWorkspaceSnapshotError, isWorkspaceTimeoutError, isWriteToolResult, joinCommandSend, joinCommandTurn, killQuitStoppableCommandsNow, latestLegacyMessageTime, latestResumeTimings, legacyCompletionTarget, lifecycleScopeForOwner, llamaInferenceUrl, loadVirtualModules, loaderHostModulesTestHooks, mergeExtensionWarnings, mergeResourcePaths, messageIsLlmVisible, messageStartsLlmUserTurn, migrateCompactionModelSettings, modelFailureMessage, next, nextTransformedPromptRecord, normalizeAzureSettings, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelProvider, normalizeModelReference, normalizeProviderKeys, noteCommandAnswer, noteCommandTurnMessage, noteRestoreFetch, openEventSubscription, originalRegistrationCallback, ownedSettingsManagers, parseArgs, parseConflictBytes, parseEngineExplicitQuitCommand, parseGitVersion, parseInteractiveEngineCommand, parseInteractiveEngineMessage, parseSkillUri, partitionByCredentials, plainStatMtimeMs, powershellCandidates, prepareRegistrationCallbacks, presentTaskError, presentationHostInput, prewarmModelApi, printHelp, projectTransformedPrompt, providerOfModelReference, publishEvent, readConflictUrl, readFileChatOrders, readFileChatRecords, readHostInputFormRequest, readInlineCaret, readInlineDraft, readLocalFileChunks, readPipedStdin, readTransferDirectory, reconcileRegistration, recordBlueprintStep, recordClosedStart, recordResumeTimings, recordSettingsWrite, refreshConflictFile, registerConflictBlocks, registerFactoryStartupHandler, registerInitialBindings, registerLazyBuiltin, registrationFields, rehydrateAgentRehydrateError, rehydrateTaskToolError, rehydrateWorkspaceError, rejectMalformedToolArguments, rememberEarlierCompletion, renderTodoCall, renderTodoResult, reopenedCompletionName, repairOrphanToolResults, reparentedSegments, reportDiagnostics, requestedThinkingLevelForModelSwitch, requireTimerMs, require_from_url, require_int, require_int$1, require_log, require_re, require_timestamp, require_toJS, require_trim_comparator_whitespace, require_util_flow_indent_check, require_util_map_includes, require_visit, reserveQueuedInputAdmission, resetGitProvisionStateForTest, resizeImageInProcess, resolveCompactionModel, resolveGit, resolveGitSync, resolveInlineDraftValue, resolveInstalledGit, resolveInvocationRuntime, resolveRegisteredCommands, resolveResourcePath, resolveToolConcurrency, resolvesCompletionHeader, routeKey, routeNamesPrompt, runCallback, runCommandHandler, runInputHook, runSynchronousCallback, runWithProgress, scheduleToolExecution, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, selectReadLinesFromChunks, selectReadLinesFromList, serializeAgentRehydrateError, serializeInteractiveEngineFrame, serializeInteractiveEngineMessage, serializeTodoForAgent, serializeTodoListForAgent, serializeWorkspaceError, sessionBlobHashes, sessionBlobOutput, sessionLifecycleCreation, sessionLifecycleScopes, sessionPosition, sessionScratchDir, setCallbackActivityReporter, settingsWriteOwner, shareCompletionEvidence, showLlamaUi, shownSpanMs, skillUri, splitSearchTextParts, splitSegment, startedAsFork, startupRegistrationTokens, startupSourceId, stopIndex, storeInlineToolOutputs, storeSessionBlobs, streamCutDurationMs, stripVerbatimCompactionPrefix, subagentsLazyBuiltinSpec, summarizeLegacySession, takeInlineToolOutput, takeInlineToolOutputEntry, taskClockOf, taskClockRunning, taskClocksFor, taskElapsedMs, taskPromptHost, thinkingLevelForModelSwitch, timeCheckoutRestore, timeRestorePhase, toResolvedPaths, tokenize, toolChangeSupport, toolOutputUrl, toolOutputUrlHash, trackAdmittedAgentTask, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, transferFile, transformedPromptOwner, transpileCacheWritesSettled, unpackIds, unreadablePathError, unreadableTrustSettingsDiagnostics, unwritablePathError, userLikeContentBlockIsLlmVisible, validateEventSource, validateSubscriptionAdmission, verbatimRecallHint, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, watchHeldPromptAttention, withGitProvisionSettingsForTest, withImagesBlocked, withInlineDraft, withOwnResourceAdmission, withResourceAdmission, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner, withoutCarriedToolOutput, withoutSearchPosition, writeChunksAtomically, writeLinesAtomically, writeRenderers };
|
|
19306
19459
|
|
|
19307
|
-
//# sourceMappingURL=startup-0-1-
|
|
19460
|
+
//# sourceMappingURL=startup-0-1-RTOHJFDJ.js.map
|
|
19308
19461
|
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
19309
19462
|
// demand that fails in a process an in-place update left running says to restart.
|
|
19310
19463
|
function __atomicOnDemandFailed(error, feature) {
|
|
19311
19464
|
return (async () => {
|
|
19312
19465
|
const root = new URL("../", import.meta.url);
|
|
19313
19466
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
19314
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
19467
|
+
const key = `${root.href}#0.10.11-alpha.3`;
|
|
19315
19468
|
let release = releases.get(key);
|
|
19316
19469
|
if (release === undefined) {
|
|
19317
19470
|
const current = (async () => {
|
|
@@ -19339,7 +19492,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
19339
19492
|
} catch {
|
|
19340
19493
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
19341
19494
|
}
|
|
19342
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.
|
|
19495
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.3" ? installed : running !== undefined && running.version !== "0.10.11-alpha.3" ? "0.10.11-alpha.3" : undefined;
|
|
19343
19496
|
if (updatedTo === undefined) throw error;
|
|
19344
19497
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
19345
19498
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|