@bastani/atomic 0.10.11-alpha.1 → 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 +155 -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 +9 -9
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +8 -8
- package/dist/_shared/mode-shared-2QJSCUM6.js +9 -9
- 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 +5 -5
- package/dist/_shared/{sdk-AVFII7NK.js → sdk-B5LEWGGI.js} +2633 -488
- package/dist/_shared/sdk-B5LEWGGI.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +3 -3
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js +1 -1
- package/dist/_shared/{settings-startup-4QCVCI53.js → settings-startup-HXQLSUWM.js} +8 -2
- package/dist/_shared/settings-startup-HXQLSUWM.js.map +1 -0
- package/dist/_shared/{startup-0-0-57KF6LZH.js → startup-0-0-EZUKEP4Q.js} +436 -51
- package/dist/_shared/startup-0-0-EZUKEP4Q.js.map +1 -0
- package/dist/_shared/{startup-0-1-GIY75K46.js → startup-0-1-RTOHJFDJ.js} +240 -279
- package/dist/_shared/startup-0-1-RTOHJFDJ.js.map +1 -0
- package/dist/_shared/{startup-0-2-27OWFHV6.js → startup-0-2-5QHPCEON.js} +254 -46
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +1 -0
- package/dist/_shared/{startup-0-3-T4DVFYWX.js → startup-0-3-4ZYBYQNM.js} +273 -14
- package/dist/_shared/startup-0-3-4ZYBYQNM.js.map +1 -0
- package/dist/_shared/startup-0-4-ZMJV547D.js +14 -9
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -1
- package/dist/_shared/startup-0-5-YDW47QX6.js +10 -10
- package/dist/_shared/startup-0-5-YDW47QX6.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +9 -9
- package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +6 -7
- package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +7 -7
- package/dist/_shared/startup-15-1-4S7FLMNG.js +22 -30
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +455 -102
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/{startup-8-1-X32CYSXB.js → startup-8-1-LZFXSD3Z.js} +162 -1184
- package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +189 -36
- 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 +3 -3
- package/dist/builtin/intercom/CHANGELOG.md +34 -0
- package/dist/builtin/intercom/README.md +2 -2
- package/dist/builtin/intercom/broker/broker.bundle.mjs +1091 -344
- 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 +208 -101
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +516 -102
- 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 +199 -27
- 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/CHANGELOG.md +6 -0
- 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 +6 -6
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +4 -4
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +4 -4
- 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 +2 -2
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +2 -2
- 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 +20 -114
- 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.code.js +1 -1
- 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 +3 -3
- 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 +4 -4
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +27 -15
- package/dist/core/session-manager-core.js.map +1 -1
- 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 +3 -3
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-open-markers.js +3 -0
- package/dist/core/session-open-markers.js.map +1 -0
- 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/added-exports.js +3 -0
- package/dist/core/storage/added-exports.js.map +1 -1
- 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 +56 -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 +4 -3
- 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 +81 -8
- package/dist/core/storage/migrations.js +386 -47
- 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 +36 -12
- package/dist/core/storage/node-sqlite-thread.js.map +1 -1
- package/dist/core/storage/node-sqlite.js +135 -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 +14 -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 +82 -5
- package/dist/core/storage/schema-catalog.js +244 -34
- 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 +9 -8
- package/dist/core/storage/session/branch-fork-source.code.js.map +1 -1
- 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 +4 -4
- 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/errors.js +1 -1
- package/dist/core/storage/session/expanded-child-details.code.js +3 -3
- 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 +118 -0
- 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-schema.js +53 -0
- package/dist/core/storage/session/fork-schema.js.map +1 -0
- package/dist/core/storage/session/fork-segments.d.ts +58 -0
- package/dist/core/storage/session/fork-staging.code.js +5 -8
- 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 +61 -0
- package/dist/core/storage/session/fork-sweep.js.map +1 -0
- package/dist/core/storage/session/fork-window.code.js +4 -4
- 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 +42 -2
- 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 +4 -4
- 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.code.js +1 -1
- 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 +4 -4
- 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 +394 -20
- package/dist/core/storage/session/sql-session-store.impl.js +4 -4
- package/dist/core/storage/session/sql-session-store.js +4 -4
- 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/session/types.d.ts +22 -0
- package/dist/core/storage/sqlite-facade.d.ts +23 -2
- package/dist/core/storage/sqlite-facade.js +34 -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 +4 -4
- 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 +5 -5
- 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-session.d.ts +2 -0
- 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 +71 -3
- package/dist/core/worktree-snapshot/blob-store.js +575 -67
- package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
- package/dist/core/worktree-snapshot/errors.code.js +3 -3
- 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 +162 -0
- package/dist/core/worktree-snapshot/fork-snapshot-index.js.map +1 -0
- 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 +2 -2
- 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 +8 -8
- package/dist/main-first-time-setup.code.js +2 -2
- 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 +3 -3
- 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 +7 -7
- 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 -3
- 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 -6
- 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 +3 -3
- 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 +31 -42
- 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} +73 -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 +333 -956
- 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-AVFII7NK.js.map +0 -1
- package/dist/_shared/settings-startup-4QCVCI53.js.map +0 -1
- package/dist/_shared/startup-0-0-57KF6LZH.js.map +0 -1
- package/dist/_shared/startup-0-1-GIY75K46.js.map +0 -1
- package/dist/_shared/startup-0-2-27OWFHV6.js.map +0 -1
- package/dist/_shared/startup-0-3-T4DVFYWX.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 } from "./rolldown-runtime-BGM3D5V3.js";
|
|
2
2
|
import { APP_NAME, CONFIG_DIR_NAME, DiagnosticWriter, ENV_AGENT_DIR, ENV_TELEMETRY, NATIVES_VERSION, canonicalizePath as canonicalizePath$1, canonicalizePathAsync as canonicalizePathAsync$1, createModuleRequire, detectInstallChangeAsync, getAgentDir, getCwdRelativePath, getDocsPath, getEnvValue, getPackageDir, getPathComparisonKey, getSettingsPath, isBunBinary, isBunRuntime, isChildProcessExitStatusUnknownError, loadOnDemand, markNativeContainedChild, moduleDirFromMetaUrl, normalizePath as normalizePath$1, pathsEqual, requiredEntriesForBuiltin, resolvePath, shortenHomePath, stripBom } from "./p0-cli-BB45ZQY6.js";
|
|
3
3
|
import { clickableKeyTextHint, getGlobalTheme, navActionText, navFirstKeyText, renderNavHintLine, renderNavKeyOverlay, slashCommandHint, terminalDisplayText, theme } from "./p2-shell-main-B2WIALFD.js";
|
|
4
|
-
import { PROJECT_TRUST_DISTRUST_LABEL, PROJECT_TRUST_SESSION_DISTRUST_LABEL, REDACTED_PLACEHOLDER, applyRedactionRanges, findInCauseChain as findInCauseChain$1, hasErrorIdentity, isAsciiDigitCode, isAsciiHexCode, isAsciiLetterCode, isAsciiWordCode, isHorizontalWsCode, lockHolderPath, matchesAsciiCaseInsensitiveAt, prepareTakeoverMutex, processMayRun, processMayRunAsync, processStartToken, processStartTokenAsync, putBack, putBackAsync, readProcessStartToken, redactCredentialShapes, redactUrlCredentials, rehydrateErrorCause, releaseLock, removeAside, removeAsideAsync, removeLeftoverHolderFiles, removeLeftoverHolderFilesAsync, renameReplacing, renameReplacingAsync, scanBasicAuthEndAt, serializeErrorCause, skipHorizontalWs, stripAnsiWithOrigin, takeTakeoverMutex, takeTakeoverMutexAsync } from "./p1b-elig-
|
|
5
|
-
import { DecisionTimeoutError, SessionAlreadyOpenError } from "./settings-startup-
|
|
4
|
+
import { PROJECT_TRUST_DISTRUST_LABEL, PROJECT_TRUST_SESSION_DISTRUST_LABEL, REDACTED_PLACEHOLDER, applyRedactionRanges, findInCauseChain as findInCauseChain$1, hasErrorIdentity, isAsciiDigitCode, isAsciiHexCode, isAsciiLetterCode, isAsciiWordCode, isHorizontalWsCode, lockHolderPath, matchesAsciiCaseInsensitiveAt, prepareTakeoverMutex, processMayRun, processMayRunAsync, processStartToken, processStartTokenAsync, putBack, putBackAsync, readProcessStartToken, redactCredentialShapes, redactUrlCredentials, rehydrateErrorCause, releaseLock, removeAside, removeAsideAsync, removeLeftoverHolderFiles, removeLeftoverHolderFilesAsync, renameReplacing, renameReplacingAsync, scanBasicAuthEndAt, serializeErrorCause, skipHorizontalWs, stripAnsiWithOrigin, takeTakeoverMutex, takeTakeoverMutexAsync } from "./p1b-elig-TVB5CBLL.js";
|
|
5
|
+
import { DecisionTimeoutError, SessionAlreadyOpenError } from "./settings-startup-HXQLSUWM.js";
|
|
6
6
|
import { SETTINGS_DEFAULTS } from "./p2-common-YLSYXMDQ.js";
|
|
7
7
|
import { isBuiltin } from "node:module";
|
|
8
8
|
import { lstat, mkdir, open, readFile, readdir, readlink, realpath, rename, rm, stat, unlink, utimes, writeFile } from "node:fs/promises";
|
|
@@ -32,11 +32,11 @@ import { EventEmitter } from "node:events";
|
|
|
32
32
|
import { createServer } from "node:net";
|
|
33
33
|
import { Readable, Writable } from "node:stream";
|
|
34
34
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
35
|
-
import { adapterOpenContext, loadStorageAdapter, resolveAdapterOptions } from "../core/storage/provider.js";
|
|
36
35
|
import { memoizeAsync } from "../utils/memoize-async.js";
|
|
37
36
|
import { isUtf8 } from "node:buffer";
|
|
38
37
|
import { isNativeError, isPromise } from "node:util/types";
|
|
39
38
|
import { BUNDLED_COMMAND_NAMES, CORE_COMMAND_NAMES } from "@bastani/atomic-tui/dist/builtin-command-names.js";
|
|
39
|
+
import { fileGenerationOf, legacyFileGenerationOf } from "../core/storage/creation-time.js";
|
|
40
40
|
import { monitorEventLoopDelay } from "node:perf_hooks";
|
|
41
41
|
// dist/core/thinking-levels.js
|
|
42
42
|
/**
|
|
@@ -1155,6 +1155,26 @@ function holdProcessDescendants(pid) {
|
|
|
1155
1155
|
const result = holdProcessDescendantsResult(pid);
|
|
1156
1156
|
return result.kind === "held" ? result.held : void 0;
|
|
1157
1157
|
}
|
|
1158
|
+
let nativeWatchUntilHostDies;
|
|
1159
|
+
function watchUntilHostDiesFunction() {
|
|
1160
|
+
if (NATIVE_WINDOWS_HOST) return null;
|
|
1161
|
+
if (nativeWatchUntilHostDies === void 0) try {
|
|
1162
|
+
nativeWatchUntilHostDies = createModuleRequire(__atomicDistModuleUrl$5)("@bastani/atomic-natives").watchProcessUntilHostDies ?? null;
|
|
1163
|
+
} catch {
|
|
1164
|
+
nativeWatchUntilHostDies = null;
|
|
1165
|
+
}
|
|
1166
|
+
return nativeWatchUntilHostDies;
|
|
1167
|
+
}
|
|
1168
|
+
function canWatchProcessUntilHostDies() {
|
|
1169
|
+
return watchUntilHostDiesFunction() !== null;
|
|
1170
|
+
}
|
|
1171
|
+
function watchProcessUntilHostDies(pid) {
|
|
1172
|
+
try {
|
|
1173
|
+
return watchUntilHostDiesFunction()?.(pid) ?? void 0;
|
|
1174
|
+
} catch {
|
|
1175
|
+
return;
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1158
1178
|
async function processTreeEnded(tree, timeoutMs) {
|
|
1159
1179
|
const deadline = Date.now() + timeoutMs;
|
|
1160
1180
|
for (;;) {
|
|
@@ -2025,9 +2045,9 @@ function getPiUserAgent(version) {
|
|
|
2025
2045
|
}
|
|
2026
2046
|
// dist/core/async-scope.js
|
|
2027
2047
|
const storeKey = Symbol.for("atomic.async-scopes.v1");
|
|
2028
|
-
const host = globalThis;
|
|
2029
|
-
host[storeKey] ??= new AsyncLocalStorage();
|
|
2030
|
-
const scopes$2 = host[storeKey];
|
|
2048
|
+
const host$1 = globalThis;
|
|
2049
|
+
host$1[storeKey] ??= new AsyncLocalStorage();
|
|
2050
|
+
const scopes$2 = host$1[storeKey];
|
|
2031
2051
|
/**
|
|
2032
2052
|
* A value bound to the current async context. Atomic's scopes all live in one shared store, keyed by the scope. On
|
|
2033
2053
|
* Node before 24, AsyncLocalStorage runs on promise hooks: every store that has run stays in a process-wide list, and
|
|
@@ -2295,6 +2315,138 @@ function attachSessionClaim(sessionId) {
|
|
|
2295
2315
|
claim.attached = true;
|
|
2296
2316
|
return () => dropClaimAsync(sessionId, claim);
|
|
2297
2317
|
}
|
|
2318
|
+
// dist/core/storage/session/fork-segments.js
|
|
2319
|
+
function segmentLength(segment) {
|
|
2320
|
+
return segment.toSeq - segment.fromSeq + 1;
|
|
2321
|
+
}
|
|
2322
|
+
/** The view seq after the segment's last one. */
|
|
2323
|
+
function segmentEnd(segment) {
|
|
2324
|
+
return segment.baseSeq + segmentLength(segment);
|
|
2325
|
+
}
|
|
2326
|
+
/**
|
|
2327
|
+
* Throws unless `segments` are well formed for the view of session `sessionId`, of `length` seqs: each non-empty, within
|
|
2328
|
+
* the view, of another session, with its source rows from seq 1 on, in view order and disjoint, and each source's rows
|
|
2329
|
+
* in increasing order, so no stored row is read at two seqs of the view.
|
|
2330
|
+
*/
|
|
2331
|
+
function assertForkSegments(sessionId, segments, length) {
|
|
2332
|
+
let end = 0;
|
|
2333
|
+
const sourceEnds = /* @__PURE__ */ new Map();
|
|
2334
|
+
for (const segment of segments) {
|
|
2335
|
+
const { sourceId, fromSeq, toSeq, baseSeq } = segment;
|
|
2336
|
+
if (sourceId === sessionId || !Number.isSafeInteger(fromSeq) || !Number.isSafeInteger(toSeq) || !Number.isSafeInteger(baseSeq) || fromSeq < 1 || toSeq < fromSeq || baseSeq < end || segmentEnd(segment) > length || fromSeq <= (sourceEnds.get(sourceId) ?? 0)) throw new RangeError(`Invalid fork segment ${JSON.stringify(segment)} in a view of ${length} entries`);
|
|
2337
|
+
end = segmentEnd(segment);
|
|
2338
|
+
sourceEnds.set(sourceId, toSeq);
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2341
|
+
/**
|
|
2342
|
+
* The view seqs `fromSeq` through `toSeq` of session `sessionId` as runs stored in one place each, in view order: what a
|
|
2343
|
+
* read of that range reads, one statement a piece.
|
|
2344
|
+
*/
|
|
2345
|
+
function forkPieces(sessionId, segments, fromSeq, toSeq) {
|
|
2346
|
+
const pieces = [];
|
|
2347
|
+
let seq = fromSeq;
|
|
2348
|
+
let index = segments.findIndex((segment) => segmentEnd(segment) >= seq);
|
|
2349
|
+
if (index < 0) index = segments.length;
|
|
2350
|
+
while (seq <= toSeq) {
|
|
2351
|
+
const segment = segments[index];
|
|
2352
|
+
if (segment === void 0 || seq <= segment.baseSeq) {
|
|
2353
|
+
const last = Math.min(toSeq, segment === void 0 ? toSeq : segment.baseSeq);
|
|
2354
|
+
pieces.push({
|
|
2355
|
+
sessionId,
|
|
2356
|
+
fromSeq: seq,
|
|
2357
|
+
toSeq: last,
|
|
2358
|
+
firstSeq: seq
|
|
2359
|
+
});
|
|
2360
|
+
seq = last + 1;
|
|
2361
|
+
continue;
|
|
2362
|
+
}
|
|
2363
|
+
const last = Math.min(toSeq, segmentEnd(segment));
|
|
2364
|
+
if (last < seq) throw new RangeError(`Fork segments out of order at view seq ${seq}`);
|
|
2365
|
+
const offset = segment.fromSeq - segment.baseSeq - 1;
|
|
2366
|
+
pieces.push({
|
|
2367
|
+
sessionId: segment.sourceId,
|
|
2368
|
+
fromSeq: seq + offset,
|
|
2369
|
+
toSeq: last + offset,
|
|
2370
|
+
firstSeq: seq
|
|
2371
|
+
});
|
|
2372
|
+
seq = last + 1;
|
|
2373
|
+
index++;
|
|
2374
|
+
}
|
|
2375
|
+
return pieces;
|
|
2376
|
+
}
|
|
2377
|
+
/**
|
|
2378
|
+
* The segments a fork of session `parentId`, whose view has `parentLength` seqs and inherits `parent`, keeps when it
|
|
2379
|
+
* takes the parent's view seqs `fromSeq` through `toSeq` as its own view seqs from `baseSeq + 1` on: the parent's own rows
|
|
2380
|
+
* as segments of the parent, and its inherited rows as segments of their sources, so no source of the result inherits
|
|
2381
|
+
* the rows it names. Throws when the range is not in the parent's view.
|
|
2382
|
+
*/
|
|
2383
|
+
function forkRunSegments(parentId, parent, parentLength, run) {
|
|
2384
|
+
if (run.fromSeq < 1 || run.toSeq < run.fromSeq || run.toSeq > parentLength) throw new RangeError(`Fork run ${JSON.stringify(run)} is outside a parent view of ${parentLength} entries`);
|
|
2385
|
+
return forkPieces(parentId, parent, run.fromSeq, run.toSeq).map((piece) => ({
|
|
2386
|
+
sourceId: piece.sessionId,
|
|
2387
|
+
fromSeq: piece.fromSeq,
|
|
2388
|
+
toSeq: piece.toSeq,
|
|
2389
|
+
baseSeq: run.baseSeq + (piece.firstSeq - run.fromSeq)
|
|
2390
|
+
}));
|
|
2391
|
+
}
|
|
2392
|
+
/**
|
|
2393
|
+
* `segments` with each segment that continues the one before it in both its source and its view joined to it: the same
|
|
2394
|
+
* view in fewer segments.
|
|
2395
|
+
*/
|
|
2396
|
+
function joinForkSegments(segments) {
|
|
2397
|
+
const joined = [];
|
|
2398
|
+
for (const segment of segments) {
|
|
2399
|
+
const last = joined.at(-1);
|
|
2400
|
+
if (last !== void 0 && last.sourceId === segment.sourceId && last.toSeq + 1 === segment.fromSeq && segmentEnd(last) === segment.baseSeq) joined[joined.length - 1] = {
|
|
2401
|
+
...last,
|
|
2402
|
+
toSeq: segment.toSeq
|
|
2403
|
+
};
|
|
2404
|
+
else joined.push(segment);
|
|
2405
|
+
}
|
|
2406
|
+
return joined;
|
|
2407
|
+
}
|
|
2408
|
+
/** The segments of a fork that keeps the first `cut` seqs of a parent's view, as a prefix of its own view. */
|
|
2409
|
+
function prefixForkSegments(parentId, parent, parentLength, cut) {
|
|
2410
|
+
if (!Number.isSafeInteger(cut) || cut < 0 || cut > parentLength) throw new RangeError(`Fork cut ${cut} is outside a parent view of ${parentLength} entries`);
|
|
2411
|
+
return cut === 0 ? [] : forkRunSegments(parentId, parent, parentLength, {
|
|
2412
|
+
fromSeq: 1,
|
|
2413
|
+
toSeq: cut,
|
|
2414
|
+
baseSeq: 0
|
|
2415
|
+
});
|
|
2416
|
+
}
|
|
2417
|
+
// dist/core/storage/session/fork-errors.js
|
|
2418
|
+
/**
|
|
2419
|
+
* A fork could not be given its own copy of rows it shares (#6560): the session that stores them lacks one of them, or
|
|
2420
|
+
* one of the chunks of a large entry, so a copy would be corrupt. Nothing was written; the fork keeps reading the rows
|
|
2421
|
+
* where they are.
|
|
2422
|
+
*/
|
|
2423
|
+
var ForkSourceIncompleteError = class extends Error {
|
|
2424
|
+
/** The fork the copy was for. */
|
|
2425
|
+
sessionId;
|
|
2426
|
+
/** The session storing the rows, and the first of its seqs whose entry is missing or lacks a chunk. */
|
|
2427
|
+
sourceId;
|
|
2428
|
+
sourceSeq;
|
|
2429
|
+
constructor(sessionId, sourceId, sourceSeq) {
|
|
2430
|
+
super(`Cannot copy the history session ${sessionId} shares: entry ${sourceSeq} of session ${sourceId} is missing or lacks a chunk`);
|
|
2431
|
+
this.name = "ForkSourceIncompleteError";
|
|
2432
|
+
this.sessionId = sessionId;
|
|
2433
|
+
this.sourceId = sourceId;
|
|
2434
|
+
this.sourceSeq = sourceSeq;
|
|
2435
|
+
}
|
|
2436
|
+
};
|
|
2437
|
+
// dist/core/storage/session/shared-history-switch.js
|
|
2438
|
+
/** How old a marker's heartbeat may be while its process counts as running: four of its 15-second refreshes. */
|
|
2439
|
+
const MARKER_HEARTBEAT_STALE_MS = 6e4;
|
|
2440
|
+
let host = {
|
|
2441
|
+
live: async (marker) => marker.ageMs <= MARKER_HEARTBEAT_STALE_MS,
|
|
2442
|
+
skipped: () => {}
|
|
2443
|
+
};
|
|
2444
|
+
function setSharedHistorySwitchHost(next) {
|
|
2445
|
+
host = next;
|
|
2446
|
+
}
|
|
2447
|
+
function sharedHistorySwitchHost() {
|
|
2448
|
+
return host;
|
|
2449
|
+
}
|
|
2298
2450
|
// dist/core/worktree-snapshot/shared-clock.js
|
|
2299
2451
|
/**
|
|
2300
2452
|
* One clock for files several hosts share (#5050). A lease or lock is judged stale by how long ago its holder last
|
|
@@ -7178,6 +7330,28 @@ function noteSnapshotGeneration(store, snapshot, load, row, key) {
|
|
|
7178
7330
|
nativeLoads.get(load)?.(store, snapshot, load, row, key);
|
|
7179
7331
|
return snapshot;
|
|
7180
7332
|
}
|
|
7333
|
+
// dist/core/storage/session/jsonl-file-epoch.js
|
|
7334
|
+
function headerHash(headerStamp) {
|
|
7335
|
+
return createHash("sha256").update(headerStamp).digest("hex").slice(0, 16);
|
|
7336
|
+
}
|
|
7337
|
+
/**
|
|
7338
|
+
* The epoch of a session file: its device and inode, its creation time where that stays put (see `creation-time.ts`),
|
|
7339
|
+
* and its header. It changes when the file is replaced, and not when only its times are set.
|
|
7340
|
+
*/
|
|
7341
|
+
function fileEpochOf(stats, headerStamp) {
|
|
7342
|
+
return `${fileGenerationOf(stats)}:${headerHash(headerStamp)}`;
|
|
7343
|
+
}
|
|
7344
|
+
/**
|
|
7345
|
+
* The epoch every build before 0.10.11 gave a session file, with its creation time in it on every platform, which
|
|
7346
|
+
* sidecars and chat records written by an older build hold. It is the current one wherever creation times stay put.
|
|
7347
|
+
*/
|
|
7348
|
+
function legacyFileEpochOf(stats, headerStamp) {
|
|
7349
|
+
return `${legacyFileGenerationOf(stats)}:${headerHash(headerStamp)}`;
|
|
7350
|
+
}
|
|
7351
|
+
/** Whether `epoch` holds a creation time, as every epoch an older build computes does. */
|
|
7352
|
+
function epochHasCreationTime(epoch) {
|
|
7353
|
+
return epoch.split(":").length === 4;
|
|
7354
|
+
}
|
|
7181
7355
|
// dist/core/tasks/transcript-origin.js
|
|
7182
7356
|
/** Provenance belongs to this page, not to an arbitrary SDK message reused in a different task. */
|
|
7183
7357
|
const origins$1 = /* @__PURE__ */ new WeakMap();
|
|
@@ -11459,23 +11633,6 @@ function originalHistoryNote(line) {
|
|
|
11459
11633
|
return;
|
|
11460
11634
|
}
|
|
11461
11635
|
}
|
|
11462
|
-
// dist/core/storage/session/session-transactions.js
|
|
11463
|
-
/**
|
|
11464
|
-
* A write to the rows of the session `sessionId` of the sessions table `sessions`: on Postgres it is the only writer of
|
|
11465
|
-
* that session, while writers of other sessions run beside it; SQLite runs every write alone anyway. Every writer of a
|
|
11466
|
-
* session's rows names this one domain, whatever table it writes (the session store, its chat records, its search
|
|
11467
|
-
* index), so the checks each makes against the session's row hold until it commits. A transient failure runs it again
|
|
11468
|
-
* (#4383).
|
|
11469
|
-
*/
|
|
11470
|
-
function sessionWriteTransaction(sessions, sessionId) {
|
|
11471
|
-
return {
|
|
11472
|
-
retryTransientFailures: true,
|
|
11473
|
-
concurrency: {
|
|
11474
|
-
kind: "serial",
|
|
11475
|
-
domain: `${sessions}:${sessionId}`
|
|
11476
|
-
}
|
|
11477
|
-
};
|
|
11478
|
-
}
|
|
11479
11636
|
// dist/core/tools/history-transcript.js
|
|
11480
11637
|
const LINE_WIDTH = 4e3;
|
|
11481
11638
|
/** Splits one line into parts of at most `LINE_WIDTH` characters, preferring a space, so no character is lost. */
|
|
@@ -14373,19 +14530,19 @@ const NO_QUEUED_MESSAGES = Object.freeze({
|
|
|
14373
14530
|
steering: Object.freeze([]),
|
|
14374
14531
|
followUp: Object.freeze([])
|
|
14375
14532
|
});
|
|
14376
|
-
const sessions = /* @__PURE__ */ new WeakMap();
|
|
14533
|
+
const sessions$1 = /* @__PURE__ */ new WeakMap();
|
|
14377
14534
|
const listedWith = /* @__PURE__ */ new WeakMap();
|
|
14378
14535
|
/** Every delivery under way, whichever session it belongs to. */
|
|
14379
14536
|
const underWay = /* @__PURE__ */ new WeakSet();
|
|
14380
14537
|
/** The turn took `text` out of `session`'s `lane` queue; its `message_start` has not reached the listeners yet. */
|
|
14381
14538
|
function beginQueuedMessageDelivery(session, lane, text, receipt) {
|
|
14382
|
-
let deliveries = sessions.get(session);
|
|
14539
|
+
let deliveries = sessions$1.get(session);
|
|
14383
14540
|
if (deliveries === void 0) {
|
|
14384
14541
|
deliveries = {
|
|
14385
14542
|
taken: 0,
|
|
14386
14543
|
underWay: /* @__PURE__ */ new Map()
|
|
14387
14544
|
};
|
|
14388
|
-
sessions.set(session, deliveries);
|
|
14545
|
+
sessions$1.set(session, deliveries);
|
|
14389
14546
|
}
|
|
14390
14547
|
const delivery = {
|
|
14391
14548
|
lane,
|
|
@@ -14404,16 +14561,16 @@ function beginQueuedMessageDelivery(session, lane, text, receipt) {
|
|
|
14404
14561
|
*/
|
|
14405
14562
|
function endQueuedMessageDelivery(session, delivery) {
|
|
14406
14563
|
if (delivery === void 0) return;
|
|
14407
|
-
const deliveries = sessions.get(session);
|
|
14564
|
+
const deliveries = sessions$1.get(session);
|
|
14408
14565
|
if (deliveries?.underWay.get(delivery.order) !== delivery) return;
|
|
14409
14566
|
deliveries.underWay.delete(delivery.order);
|
|
14410
14567
|
deliveries.lanes = void 0;
|
|
14411
14568
|
underWay.delete(delivery);
|
|
14412
|
-
if (deliveries.underWay.size === 0) sessions.delete(session);
|
|
14569
|
+
if (deliveries.underWay.size === 0) sessions$1.delete(session);
|
|
14413
14570
|
}
|
|
14414
14571
|
/** Record with `event`, a `queue_update` `session` is about to send, which deliveries are under way now. */
|
|
14415
14572
|
function noteQueueUpdateDeliveries(session, event) {
|
|
14416
|
-
const deliveries = sessions.get(session);
|
|
14573
|
+
const deliveries = sessions$1.get(session);
|
|
14417
14574
|
if (deliveries !== void 0) listedWith.set(event, {
|
|
14418
14575
|
session: deliveries,
|
|
14419
14576
|
through: deliveries.taken
|
|
@@ -14443,7 +14600,7 @@ function queuedReceiptsUnderWay(listed, lane) {
|
|
|
14443
14600
|
* ends; {@link NO_QUEUED_MESSAGES} when none is under way.
|
|
14444
14601
|
*/
|
|
14445
14602
|
function queuedMessagesUnderWay(session) {
|
|
14446
|
-
const deliveries = sessions.get(session);
|
|
14603
|
+
const deliveries = sessions$1.get(session);
|
|
14447
14604
|
if (deliveries === void 0) return NO_QUEUED_MESSAGES;
|
|
14448
14605
|
deliveries.lanes ??= lanesOf(deliveries.underWay.values());
|
|
14449
14606
|
return deliveries.lanes;
|
|
@@ -17901,23 +18058,6 @@ function notifySessionProviderRequestDispatched(session) {
|
|
|
17901
18058
|
listener();
|
|
17902
18059
|
} catch {}
|
|
17903
18060
|
}
|
|
17904
|
-
// dist/core/storage/adapter-open.js
|
|
17905
|
-
/**
|
|
17906
|
-
* Opening an adapter selection's database the way the storage provider does, for the checks that run before a
|
|
17907
|
-
* selection is trusted: `atomic storage join`, `atomic storage status` and a named export or import selection.
|
|
17908
|
-
*/
|
|
17909
|
-
/**
|
|
17910
|
-
* Open `selection` through `adapter.openDatabase` with its secrets resolved as the provider resolves them: the
|
|
17911
|
-
* adapter's `liveSecrets` through `context.secret`, read again on every call, the others in its options. Throws when
|
|
17912
|
-
* the adapter has no `openDatabase` hook.
|
|
17913
|
-
*/
|
|
17914
|
-
async function openAdapterSelectionDatabase(selection, context, adapter) {
|
|
17915
|
-
const loaded = adapter ?? await loadStorageAdapter(selection.module, context);
|
|
17916
|
-
if (loaded.openDatabase === void 0) throw new Error(`${selection.module} has no openDatabase hook`);
|
|
17917
|
-
const opening = adapterOpenContext(selection, context);
|
|
17918
|
-
const options = await resolveAdapterOptions(selection, opening, loaded.liveSecrets);
|
|
17919
|
-
return loaded.openDatabase(options, opening);
|
|
17920
|
-
}
|
|
17921
18061
|
// dist/core/interactive-quit.js
|
|
17922
18062
|
const interactiveQuits = /* @__PURE__ */ new WeakMap();
|
|
17923
18063
|
/**
|
|
@@ -19687,16 +19827,261 @@ function isWindowsInstallDirectoryLockError(output) {
|
|
|
19687
19827
|
if (!(lower.includes("code ebusy") || lower.includes("ebusy:") || lower.includes("errno -4082") || lower.includes("code eperm") || lower.includes("eperm:") || lower.includes("errno -4048"))) return false;
|
|
19688
19828
|
return lower.includes("syscall rename") || lower.includes("syscall unlink") || lower.includes("syscall rmdir") || lower.includes("syscall rm") || lower.includes("syscall copyfile") || lower.includes(", rename ") || lower.includes(", unlink ") || lower.includes(", rmdir ") || lower.includes(", rm ") || lower.includes(", copyfile ") || lower.includes("resource busy or locked");
|
|
19689
19829
|
}
|
|
19690
|
-
export { ActivityWatchdog, AgentSessionBusyError, BLUEPRINT_CONTEXT_TYPE, BUILTIN_HELP_TOOL_NAMES, BUILTIN_PATH_PREFIX, BUILTIN_SLASH_COMMANDS, BUNDLED_EXTENSION_SLASH_COMMANDS, BlueprintBuildFailedError, BlueprintError, BlueprintInvalidError, BlueprintStepFailedError, BlueprintStepTimedOutError, BlueprintUsesUnsupportedError, CACHE_WARMING_MODES, COMMAND_DETAIL_TAIL_BYTES, COMMAND_FOREGROUND_BUDGET_MS, CONTINUE_AFTER_FAILURE, CURRENT_SESSION_VERSION, CompactionCancelledError, CompactionConfigError, CompactionError, CompactionStateError, CompactorFailure, CountdownTimer, DEFAULT_BUILTIN_SELECTION_EXTRA_TOOLS, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, DEFAULT_MAX_RESULT_SIZE_CHARS, DEFAULT_REQUEST_TIMEOUT_MS, DEFAULT_THINKING_LEVEL, Diff, DynamicBorder, ENGINE_UNRESPONSIVE_MS, EditInputError, EditMatchError, EditTargetError, EditToolError, EngineSessionStats, EntryTypeReader, EventSourceError, ExtensionStartupError, FILE_KINDS, FILE_PATTERNS, FINISHED_TASK_RETENTION, FORKED_PACKAGE_NAMES, FORKED_PACKAGE_WORKSPACE_DIRS, FileToolAbortedError, FramedSelector, GIT_LOCAL_ENV_VARS, GIT_MINIMUM_VERSION, GitProvisionConfigError, GitProvisionError, GitProvisionTimeoutError, GitUnavailableError, HOST, HOST_NOTICE_TYPE, HostInputBridge, HostListenerFailures, INTERACTIVE_MODEL_REFRESH_TIMEOUT_MS, InteractiveEngineResourceReadinessError, IntercomPolicyError, JSON_RPC_ERROR_CODES, JsonTextChecker, LATEST_PROTOCOL_VERSION, LIVE_COMMAND_LIMIT_MESSAGE, LONG_LIVED_COMMANDS, LlamaServerError, LlamaServerRequestError, LlamaServerUnreachableError, MAX_INTERCOM_REACHABLE_GROUPS, MAX_PERSISTED_OUTPUT_BYTES, MAX_POSITION_LENGTH, MAX_TOOL_DETACHMENT_AFTER_MS, ManagedToolDownloadError, ManagedToolError, ManagedToolTimeoutError, McpAbortError, McpConnectionClosedError, McpError, McpTimeoutError, Minimatch, MissingSessionCwdError, NETWORK_TIMEOUT_MS, NON_SECRET_HTTP_HEADERS, NO_QUEUED_MESSAGES, NativeModuleUnavailableError, PERSISTED_OUTPUT_CLOSING_TAG, PERSISTED_OUTPUT_TAG, PERSISTED_OUTPUT_TRUNCATION_MARKER, PLAIN_SELECTOR_STYLE, POST_LOGOUT_AUTH_CHECK_TIMEOUT_MS, PREVIEW_SIZE_BYTES, QueuedDeliveryRelay, QueuedDeliveryView, RESOURCE_TYPES, RESTART_CANCELLED_MESSAGE, ROW_INTENT_META, RawStdoutWriteError, SESSION_HISTORY_TOOL_NAME, STALE_EXTENSION_CONTEXT_MARKER, STALE_EXTENSION_CONTEXT_MESSAGE, STARTUP_DECISION_TYPED_TEXT_NOTICE, SUPPORTED_PROTOCOL_VERSIONS, Selector, SelectorState, SessionIntercomPolicy, ShellTimeoutError, ShellToolError, SqliteSelectorConnection, Stop, SubscriptionChildUnavailableError, SubscriptionClosedError, SubscriptionConfigError, SubscriptionError, SubscriptionEventError, SubscriptionHandlerError, SubscriptionRecordError, SubscriptionSetupError, SubscriptionSubscriberUnavailableError, SubscriptionTimeoutError, TASK_MARKS, THINKING_LEVELS, TOOL_DEACTIVATION_ENTRY_TYPE, TOOL_RESULTS_SUBDIR, TYPEBOX_SUBPATHS, TaskCleanupAdmissionTimeoutError, TaskCleanupError, TaskEvictedError, TaskMessageError, TaskMessageTimeoutError, ToolDetachmentError, TrustDecisionSelector, VALID_THINKING_LEVELS, VERBATIM_COMPACTION_STRATEGY, VisualLinePreview, WriteSelectorError, abandonedToolResult, abortFailure, abortSymbol, activeToolExecutionStarts, addHistoryUsageToTotals, addUsageToTotals, allToolNames, announceBlueprintBuildWaiting, announceHistoryLoad, applyBashSessionEnvironment, applyExifOrientation, applySessionSummaryEntries, areExperimentalFeaturesEnabled, armToolAbortGraceTimer, assertSessionCwdExists, assertToolPairingInvariant, assignMissingToolCallIds, asyncScope, attachCleanupCause, attachGitCleanupFailure, attachJsonlLineReader, attachLineReader, attachSessionClaim, awaitBlueprintReady, backgroundTaskScope, beginQueuedMessageDelivery, belongsToSession, bindChatEpoch, bindChatReceipt, bindReleasedTaskOwner, bindSavedReadLines, bindSavedTaskOrigins, bindSavedTaskRowKey, bindTaskResumer, blueprintBuildPending, blueprintBuildSettled, blueprintBuildShared, blueprintBuildsRunning, blueprintBuildsSettled, blueprintDigest, boundedChatRecord, buildBoundaryText, buildBoundaryTextWithLocation, cancelHeldInput, cancelReasonText, canonicalEventBusFor, captureHerdrEnvironment, carryDroppedQueuedMessages, carryRowSource, chatEpoch, chatPosition, chatReceipt, chatReceiptWrite, chatRecordSavesSettled, claimPaneReporting, claimSession, classifiedWorkflowMetadata, cleanupWindowsSelfUpdateQuarantine, clearAssignmentIfClosed, clearFunctionList, clearLockHolder, clearLockHolderAsync, clearToolAbortGraceTimer, collectDeclaredDisplaySecrets, collectSecretsForMasking, combineMany, combineManyMut, combineUsage, compactTemplate, compactUrl, completeStartup, computeBoxDimensions, confinedIntercomChildGroup, containProcessTree, containProcessTreeAllowingBreakaway, conventionDirsForResource, convertBufferWithMarkit, convertFileWithMarkit, copyHostQuestionnaire, createBatchedCanonicalizePathAsync, createConversationRegion, createEventBus, createGitEnvironment, createOwnedAbortController, createSourceInfo, createStagedEventBus, createSyntheticSourceInfo, createTypeScriptSourceSpecifierTransform, createUsageTotals, createWakeDispatcher, customMessageExcludesContext, decodeChatOrder, decodeChatRecord, deduplicateDiagnostics, defaultModelPerProvider, defaultToolNamesFor, deferDeprecationWarnings, defineTool, deserializeSubscriptionError, deserializeToolDetachmentError, detectSupportedImageMimeTypeFromFile, displayTodoId, drainAgentMessageQueue, earlierHeldInputs, emitProgress, encodeChatOrder, endQueuedMessageDelivery, entryLines, expandSearchUrl, experimentalToolSamplingProperty, extractHeaderSecrets, fListSymbol, fetchWithRetry, fieldTone, filterSearchOutputByLineRange, final, finalSymbol, finalValue, findBlueprintError, findCompactionError, findGitProvisionError, findLegacyWorkflowFiles, findLlamaServerError, findMissingSessionCwdIssue, findMissingSessionCwdIssueAsync, findPreferredAvailableModel, findProviderDefaultModel, findSubscriptionError, findTaskEvictedError, findTaskMessageError, findToolDetachmentError, finishHeldInput, firstChatOrders, flushRawStdout, flushSymbol, flushable, forkScope, forkStoreRelation, forkedPackageExportAliases, formatCodexProviderError, formatMissingSessionCwdPrompt, formatNoApiKeyFoundMessage, formatNoModelSelectedMessage, formatNoModelsAvailableMessage, formatReadLineRange, formatSelectedLines, formatSize, formatTimeoutSeconds, formatTodoId, formatTokenCount, formatToolCallWithArgs, formatUnresolvedModelMessage, frozenClocks, getAllBuiltinPackageLocations, getBuiltinPackageLocations, getBuiltinPackagePaths, getDefaultCacheRetention, getDefaultSessionDir, getDefaultSessionDirAsync, getDefaultSessionDirPath, getEngineSessionStats, getErrnoCode, getFinalValue, getFunctionList, getHostQuestionnaire, getLockPath, getMandatoryBuiltinExtensionPaths, getManifestFromPackageJson, getManyValues, getMissingSessionCwdOptions, getPiUserAgent, getProviderLoginHelp, getResourcePathKey, getResourcePathKeyAsync, getSyntheticPathSource, getTextOutput, getTodoPath, getTodoStatus, getTodoTitle, getTodosDir, getTodosDirLabel, getToolExecutionStartedAt, getToolListError, handOverBuildTimings, handlePackageCommandParseOutcome, hasHeldInput, hasHistoryLoadObserver, hasNativeProcessHold, heldInputView, historySnapshotFor, holdDeprecationWarnings, holdProcessDescendants, holdProcessDescendantsResult, holdToolAbortGraceWhenObserved, holdToolsUntilBuilt, holdToolsUntilOwnerBuilt, holderRuns, hostInputError, hostNoticeForEvent, inheritForkScope, interactiveQuitOf, invalidArgText, invalidateNativeSearchCache, isAgentSessionBusyError, isBlueprintBuildFailedError, isBlueprintError, isBlueprintInvalidError, isBlueprintStepFailedError, isBlueprintStepTimedOutError, isBlueprintUsesUnsupportedError, isClassifiedWorkflowSession, isCodexTokenInvalidationError, isCompactionCancelledError, isCompactionConfigError, isCompactionError, isCompactionStateError, isCompactorFailure, isEditInputError, isEditMatchError, isEditTargetError, isEditToolError, isEventSourceError, isExtensionLoadError, isExtensionStartupFailure, isFileToolAbortedError, isFinalValue, isFlushable, isFunctionList, isGitProvisionConfigError, isGitProvisionError, isGitProvisionTimeoutError, isGitUnavailableError, isInstallTelemetryEnabled, isInteractiveEngineResourceReadinessError, isJsonRpcId, isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse, isLlamaServerError, isLlamaServerRequestError, isLlamaServerUnreachableError, isManagedToolDownloadError, isManagedToolError, isManagedToolTimeoutError, isMandatoryRuntimeTool, isMany, isMissingSessionCwdError, isObject, isPathInside, isReadResourceSelector, isReadableUrlPath, isRetryableCompactionError, isRetryableGitProvisionError, isRetryableLlamaServerError, isRetryableManagedToolError, isRetryableSubscriptionError, isRetryableTaskError, isRetryableTaskMessageError, isSensitiveKeyNameForMasking, isSerializedMissingSessionCwdError, isShellTimeoutError, isShellToolError, isSingleGenericAbortTextContent, isStaleExtensionContextError, isStdoutTakenOver, isStop, isSubscriptionChildUnavailableError, isSubscriptionClosedError, isSubscriptionConfigError, isSubscriptionError, isSubscriptionEventError, isSubscriptionHandlerError, isSubscriptionRecordError, isSubscriptionSetupError, isSubscriptionSubscriberUnavailableError, isSubscriptionTimeoutError, isSyntheticPath, isTaskCleanupAdmissionTimeoutError, isTaskCleanupError, isTaskEvictedError, isTaskMessageError, isTaskMessageTimeoutError, isTodoClosed, isToolDeactivationEntryData, isToolDetachmentError, isToolModifier, isTransientExtensionStartupFailure, isTrustDecision, isTrustedMandatoryRuntimeTool, isUnknownModel, isValidThinkingLevel, isWindowsInstallDirectoryLockError, isWriteSelectorError, keepDroppedQueuedMessages, keepsDroppedQueuedMessages, keptTaskHint, keptTaskId, leadingAndTrailingWs, leadingWs, legacyWorkflowFilePaths, legacyWorkflowFilePatterns, legacyWorkflowSection, linkPath, literalPathLike, loadConfig, loadNativeSearchBinding, loadShownDeprecationNotices, loadedConfig, lockShared, longestCommonPrefix, longestCommonSuffix, many, manySymbol, markEventLoopShutdown, markEventLoopStartupComplete, markTrustedMandatoryRuntimeExtension, materializeSessionSummaryMetadata, maximumOverlap, mergeReadRanges, mergeSessionTrustDecisions, minimatch, modelCallUsage, nativeForkReader, nativeModuleProblem, nativeModuleUnavailable, noOpUIContext, none, normalizeDisplayText, normalizeInterruptAbortMessage, normalizeMany, normalizePathLikeInput, normalizeTodoId, noteQueueUpdateDeliveries, noteQueuedMessagesDropped, noteRowSource, noteSavedSeq, noteSnapshotGeneration, noteUserMessageOrigin, notifySessionProviderRequestDispatched, observeArchiveLoad, observeHistoryLoads, observeReferenceCut, observeToolExecutionTiming, omitLegacyThinkingSections, onBlueprintBuildFinished, onBlueprintBuildWaiting, onSessionProviderRequestDispatched, openAdapterSelectionDatabase, operationSignal, originalHistoryNote, outputExtensionLoadErrors, parseJsonRpcMessage, parsePackageCommand, parseSerializedCompactionError, parseSlashCommand, parseTranscriptFrameLayout, pendingProjectResourcesTrusted, placeTranscriptFrame, prepareLockTakeover, prepareSessionClaim, priorityHoldCounts, processTreeEnded, projectTrustHandlerRegistered, projectTrustWarningVisible, projectTrustedBeforeExtensions, providerOfModelReference, quarantineWindowsNativeDependencies, queueUpdateDeliveries, queuedMessagesUnderWay, queuedReceiptsUnderWay, queuedTextsUnderWay, quitAsInteractiveApp, raceWithAbortSignal, rawStdoutWriteFailed, readLedger, readLines, readPiManifestFile, readTaskOutputTail, receiveChatReceipt, recordLockHolder, recordLockHolderAsync, recordStartupThinkingLevel, redactAuthorizationUrlForDisplay, redactCredentials, redactOAuthErrorText, redactOAuthErrorTextCapped, redactUrlForDisplay, redactUrlForTransportDisplay, redactWwwAuthenticateHeader, referenceMetadataRead, refreshConfig, registerArchiveLoad, registerCanonicalEventBus, registerForkScope, registerHeldInput, registerHistorySnapshot, registerStartupRollback, rehydrateBlueprintError, rehydrateCompactionError, rehydrateEditToolError, rehydrateGitProvisionError, rehydrateLlamaServerError, rehydrateMissingSessionCwdError, rehydrateShellToolError, rehydrateTaskCleanupError, rehydrateTaskEvictedError, rehydrateTaskMessageError, rehydrateWriteSelectorError, releaseDeprecationWarnings, releasePaneReporting, releaseRetiredPaneReporting, releaseToolAbortGraceTimers, releaseTurnPause, releaseUnownedPaneRegistration, removePrefix, removeSuffix, removedProviderMessage, renderBlueprintContext, renderBorderedBox, renderToolPath, repairCollapsedScheme, replacePrefix, replaceSuffix, replaceTabs, replacementAbortContent, reportContained, reportPaneActivity, repositoryKey, require_applyReviver, require_constants, require_debug, require_errors, require_identifiers, require_identity, require_ignore, require_line_counter, require_parse_options, require_parse_url, require_resolve_end, require_resolve_props, require_sha256, require_stringifyComment, require_stringifyNumber, require_util_contains_newline, resolveDecisionDeadlineMs, resolvePhysicalPath, resolvePhysicalPathAsync, resolveSchemaRef, resourceInternals, restoreStdout, retirePaneReporting, retryStatusUpdate, rollbackStartup, rootKey, rowSource, rowTone, safeTrustChoiceIndex, sanitizeMcpServers, sanitizeOpenAIResponsesPayload, saveChatRecord, savedConversationThinkingLevel, savedReadLines, savedRowKey, savedRowSpan, savedSeqOf, savedTaskRowKey, savedTaskRows, scopedBackgroundTasks, scrubFetchError, scrubPreCompactionAssistantUsage, scrubUnknownErrorData, searchPosition, segment, selectExactReadRanges, selectReadRanges, selectorHintEntries, sentinelsToAppend, serializeBlueprintError, serializeCompactionError, serializeConversationForCompaction, serializeFileToolError, serializeJsonLine, serializeMissingSessionCwdError, serializeRetainedTranscript, serializeSessionMutation, serializeSubscriptionError, sessionIntercomFacade, sessionTasks, sessionWaitsToRetry, sessionWriteTransaction, setDeprecationWarningSink, setFunctionList, setMarkitDiagnosticSink, settingsFileNoticeKey, settingsInternals, settleTurnPause, sha256Hex, shareBlueprintBuild, sharedClockNow, sharedWakeDispatcher, shortenPath, shouldRenderEngineDiagnosticAsChatError, shouldRunFirstTimeSetup, sleep, sliceHead, sliceTail, snapshotBashSessionEnvironment, sortTodos, spanElapsedMs, spawnContainedProcess, spawnHostProcess, splitLineRangeSelector, splitPathLikeGlob, splitReadLineSelector, splitTodosByAssignment, sqliteSessionResumeArgs, startEventLoopMonitor, startShellDeadline, startToolTimer, startupCleanupFailureMessage, startupProjectTrust, stop, stopBlueprintBuilds, stopErrorSymbol, stopWaiting, str, stringEntries, stripFenceMarkers, stripUrlUserinfoAndHash, styleFieldTone, summarizeSession, takeOverDeadHolder, takeOverDeadHolderAsync, takeOverStdout, takeQueuedDeliveryChange, takeQueuedMessagesDroppedAt, taskMark, taskOutcomeStatus, taskOutputText, taskResumer, taskSessionKey, taskStoppedForResume, themeSelectorStyle, thisProcess, timestamp, toError, toMany, toolAbortGraceMs, toolTimerText, trackChatRecordSave, trailingWs, transcriptHeaderLines, transcriptLayoutOf, truncateHead, truncateLine, truncateMiddle, truncateTail, truncateToVisualLines, uniquifyToolCallIds, updateLedger, usageCostBreakdown, userMessageOrigin, validQuestionnaire, validateGuidanceFields, validateIntercomSessionOptions, validateTimeoutOverride, validateTodoId, waitForEventLoopMonitorReady, waitForRawStdoutBackpressure, warnDeprecation, watchFirstProjectTrustHandler, watchReferenceCut, whenAborted, windowsTemporaryFiles, withCleanup, withFileMutationQueue, withInstallLock, withLegacyPackageNames, withProgress, withQueuedDeliveryChange, withResolvingFileMutationQueue, withToolAbortGrace, withinDecisionDeadline, workspaceKey, writeOutputFile, writeRawStdout, writeRawStdoutControl, writeRawStdoutOnce, yieldToEventLoop, yieldToEventLoopIfSlow, yieldToTimerTurn, yieldTurn };
|
|
19830
|
+
// dist/core/storage/session/stored-entries.js
|
|
19831
|
+
const PAGE_BITS = 8;
|
|
19832
|
+
/** The fewest seqs a page holds notes for: a short session's page grows as its seqs do. */
|
|
19833
|
+
const PAGE_MIN_SEQS = 8;
|
|
19834
|
+
/** Each session's notes, held weakly: the entries a read or write of them returned hold them. */
|
|
19835
|
+
const sessions = /* @__PURE__ */ new Map();
|
|
19836
|
+
/** The first entry of each read or write, holding the session's notes as long as it is held. */
|
|
19837
|
+
const holders = /* @__PURE__ */ new WeakMap();
|
|
19838
|
+
/** Batches whose fingerprints may still be to take, oldest first, from `next` on, and in the first, from `nextSeq`. */
|
|
19839
|
+
let unprinted = [];
|
|
19840
|
+
let next = 0;
|
|
19841
|
+
let nextSeq = 0;
|
|
19842
|
+
/** Whether a note was made since the background work last looked: the stores are not idle yet. */
|
|
19843
|
+
let notedSinceLook = false;
|
|
19844
|
+
let scheduled;
|
|
19845
|
+
/** The longest the background work holds the event loop at once. */
|
|
19846
|
+
const FINGERPRINT_SLICE_MS = 1;
|
|
19847
|
+
/** How long the stores must have noted nothing before fingerprints are taken: reads in a burst are not slowed. */
|
|
19848
|
+
const FINGERPRINT_IDLE_MS = 20;
|
|
19849
|
+
/** Batches waiting past which fingerprints are taken without waiting for the stores to go idle. */
|
|
19850
|
+
const FINGERPRINT_WAITING = 1e5;
|
|
19851
|
+
/** Characters fingerprinted between looks at the clock. */
|
|
19852
|
+
const FINGERPRINT_STRIDE = 16384;
|
|
19853
|
+
const OFFSET_A = -0x7ee3623b;
|
|
19854
|
+
const OFFSET_B = -0x61c88647;
|
|
19855
|
+
/** How far the fingerprint of the seq the background is in covers its JSON, and the fingerprint up to there. */
|
|
19856
|
+
let taken = 0;
|
|
19857
|
+
let takenA = OFFSET_A;
|
|
19858
|
+
let takenB = OFFSET_B;
|
|
19859
|
+
/**
|
|
19860
|
+
* Continues a 64-bit fingerprint, in two 32-bit halves, of `text` from `from` through `until`: not to keep anyone from
|
|
19861
|
+
* forging a match, only to tell an entry's JSON from another's. Each step of each half is a bijection of its state, so
|
|
19862
|
+
* an edit of one character always changes both; with the length, other JSON matches about once in 2^64.
|
|
19863
|
+
*/
|
|
19864
|
+
function fingerprintRange(text, a, b, from, until) {
|
|
19865
|
+
for (let index = from; index < until; index++) {
|
|
19866
|
+
const code = text.charCodeAt(index);
|
|
19867
|
+
a = Math.imul(a ^ code, 16777619);
|
|
19868
|
+
b = Math.imul(b ^ code, 0x5bd1e995);
|
|
19869
|
+
b = b << 13 | b >>> 19;
|
|
19870
|
+
}
|
|
19871
|
+
return [a, b];
|
|
19872
|
+
}
|
|
19873
|
+
function schedule(delayMs) {
|
|
19874
|
+
if (scheduled !== void 0) return;
|
|
19875
|
+
scheduled = setTimeout(takeFingerprints, delayMs);
|
|
19876
|
+
scheduled.unref?.();
|
|
19877
|
+
}
|
|
19878
|
+
function pageOf(notes, seq, make = false) {
|
|
19879
|
+
const index = seq >>> PAGE_BITS;
|
|
19880
|
+
let page = notes.pages[index];
|
|
19881
|
+
if (!make) return page;
|
|
19882
|
+
const slots = (seq & 255) + 1;
|
|
19883
|
+
if (page === void 0) {
|
|
19884
|
+
page = {
|
|
19885
|
+
prints: /* @__PURE__ */ new Int32Array(0),
|
|
19886
|
+
jsons: void 0,
|
|
19887
|
+
pending: 0
|
|
19888
|
+
};
|
|
19889
|
+
notes.pages[index] = page;
|
|
19890
|
+
}
|
|
19891
|
+
if (page.prints.length < slots * 3) {
|
|
19892
|
+
let size = Math.max(PAGE_MIN_SEQS, page.prints.length / 3);
|
|
19893
|
+
while (size < slots) size *= 2;
|
|
19894
|
+
const prints = new Int32Array(size * 3).fill(-1);
|
|
19895
|
+
prints.set(page.prints);
|
|
19896
|
+
page.prints = prints;
|
|
19897
|
+
}
|
|
19898
|
+
return page;
|
|
19899
|
+
}
|
|
19900
|
+
/** Takes the fingerprint of `seq` in `page` from `json`, `taken` characters of it done, as far as `until`. */
|
|
19901
|
+
function takeFingerprint(page, seq, json, until) {
|
|
19902
|
+
const end = Math.min(json.length, until);
|
|
19903
|
+
[takenA, takenB] = fingerprintRange(json, takenA, takenB, taken, end);
|
|
19904
|
+
taken = end;
|
|
19905
|
+
if (end < json.length) return;
|
|
19906
|
+
const slot = (seq & 255) * 3;
|
|
19907
|
+
page.prints[slot + 1] = takenA;
|
|
19908
|
+
page.prints[slot + 2] = takenB;
|
|
19909
|
+
page.jsons[seq & 255] = void 0;
|
|
19910
|
+
if (--page.pending === 0) page.jsons = void 0;
|
|
19911
|
+
taken = 0;
|
|
19912
|
+
takenA = OFFSET_A;
|
|
19913
|
+
takenB = OFFSET_B;
|
|
19914
|
+
}
|
|
19915
|
+
/** Takes the fingerprints waiting, one slice a turn, once the stores have been idle, or at once while too many wait. */
|
|
19916
|
+
function takeFingerprints() {
|
|
19917
|
+
scheduled = void 0;
|
|
19918
|
+
if (notedSinceLook && unprinted.length - next < FINGERPRINT_WAITING) {
|
|
19919
|
+
notedSinceLook = false;
|
|
19920
|
+
schedule(FINGERPRINT_IDLE_MS);
|
|
19921
|
+
return;
|
|
19922
|
+
}
|
|
19923
|
+
const until = performance.now() + FINGERPRINT_SLICE_MS;
|
|
19924
|
+
while (next < unprinted.length) {
|
|
19925
|
+
const batch = unprinted[next];
|
|
19926
|
+
const notes = batch.notes.deref();
|
|
19927
|
+
const seq = batch.seqs[nextSeq];
|
|
19928
|
+
const page = notes === void 0 || seq === void 0 ? void 0 : pageOf(notes, seq);
|
|
19929
|
+
const json = page?.jsons?.[seq & 255];
|
|
19930
|
+
if (json === void 0) {
|
|
19931
|
+
taken = 0;
|
|
19932
|
+
takenA = OFFSET_A;
|
|
19933
|
+
takenB = OFFSET_B;
|
|
19934
|
+
if (seq === void 0 || notes === void 0) {
|
|
19935
|
+
next++;
|
|
19936
|
+
nextSeq = 0;
|
|
19937
|
+
} else nextSeq++;
|
|
19938
|
+
continue;
|
|
19939
|
+
}
|
|
19940
|
+
takeFingerprint(page, seq, json, taken + FINGERPRINT_STRIDE);
|
|
19941
|
+
if (taken === 0) nextSeq++;
|
|
19942
|
+
if (performance.now() >= until) break;
|
|
19943
|
+
}
|
|
19944
|
+
if (next < unprinted.length) schedule(0);
|
|
19945
|
+
else {
|
|
19946
|
+
unprinted = [];
|
|
19947
|
+
next = 0;
|
|
19948
|
+
nextSeq = 0;
|
|
19949
|
+
for (const [sessionId, notes] of sessions) if (notes.deref() === void 0) sessions.delete(sessionId);
|
|
19950
|
+
}
|
|
19951
|
+
}
|
|
19952
|
+
/**
|
|
19953
|
+
* What notes the entries one read or write of store `owner` stores for session `sessionId` in generation `epoch`:
|
|
19954
|
+
* called with each entry, its seq and the JSON it was parsed from or encoded as.
|
|
19955
|
+
*/
|
|
19956
|
+
function storedEntryNotes(owner, sessionId, epoch) {
|
|
19957
|
+
let notes;
|
|
19958
|
+
let batch;
|
|
19959
|
+
return (entry, seq, json) => {
|
|
19960
|
+
if (notes === void 0) {
|
|
19961
|
+
notes = sessions.get(sessionId)?.deref();
|
|
19962
|
+
if (notes?.epoch !== epoch) {
|
|
19963
|
+
notes = {
|
|
19964
|
+
epoch,
|
|
19965
|
+
pages: []
|
|
19966
|
+
};
|
|
19967
|
+
sessions.set(sessionId, new WeakRef(notes));
|
|
19968
|
+
}
|
|
19969
|
+
holders.set(entry, notes);
|
|
19970
|
+
}
|
|
19971
|
+
const page = pageOf(notes, seq, true);
|
|
19972
|
+
const slot = seq & 255;
|
|
19973
|
+
if (page.prints[slot * 3] >= 0) return;
|
|
19974
|
+
page.prints[slot * 3] = json.length;
|
|
19975
|
+
page.jsons ??= [];
|
|
19976
|
+
page.jsons[slot] = json;
|
|
19977
|
+
page.pending++;
|
|
19978
|
+
if (batch === void 0) {
|
|
19979
|
+
batch = {
|
|
19980
|
+
owner,
|
|
19981
|
+
notes: new WeakRef(notes),
|
|
19982
|
+
seqs: []
|
|
19983
|
+
};
|
|
19984
|
+
unprinted.push(batch);
|
|
19985
|
+
notedSinceLook = true;
|
|
19986
|
+
schedule(unprinted.length - next >= FINGERPRINT_WAITING ? 0 : FINGERPRINT_IDLE_MS);
|
|
19987
|
+
}
|
|
19988
|
+
batch.seqs.push(seq);
|
|
19989
|
+
};
|
|
19990
|
+
}
|
|
19991
|
+
/** Drops the notes of store `owner` whose fingerprint is not taken yet, as it closes: their entries are copied. */
|
|
19992
|
+
function dropStoredNotes(owner) {
|
|
19993
|
+
for (let index = next; index < unprinted.length; index++) {
|
|
19994
|
+
const batch = unprinted[index];
|
|
19995
|
+
const notes = batch.owner === owner ? batch.notes.deref() : void 0;
|
|
19996
|
+
if (notes === void 0) continue;
|
|
19997
|
+
for (const seq of batch.seqs) {
|
|
19998
|
+
const page = pageOf(notes, seq);
|
|
19999
|
+
const slot = seq & 255;
|
|
20000
|
+
if (page?.jsons?.[slot] === void 0) continue;
|
|
20001
|
+
page.prints[slot * 3] = -1;
|
|
20002
|
+
page.jsons[slot] = void 0;
|
|
20003
|
+
if (--page.pending === 0) page.jsons = void 0;
|
|
20004
|
+
}
|
|
20005
|
+
}
|
|
20006
|
+
}
|
|
20007
|
+
/**
|
|
20008
|
+
* Where session `sessionId` stores entries in generation `epoch`, as far as this process read or wrote them: undefined
|
|
20009
|
+
* when it knows of none, so a fork with nothing to share looks at no entry.
|
|
20010
|
+
*/
|
|
20011
|
+
function storedRows(sessionId, epoch) {
|
|
20012
|
+
if (epoch === void 0) return void 0;
|
|
20013
|
+
const notes = sessions.get(sessionId)?.deref();
|
|
20014
|
+
return notes?.epoch === epoch ? new StoredRows(notes) : void 0;
|
|
20015
|
+
}
|
|
20016
|
+
/** See {@link storedRows}. */
|
|
20017
|
+
var StoredRows = class {
|
|
20018
|
+
notes;
|
|
20019
|
+
/** The seqs by the first half of their fingerprint, made when an entry is not where the one before it suggests. */
|
|
20020
|
+
bySeqPrint;
|
|
20021
|
+
constructor(notes) {
|
|
20022
|
+
this.notes = notes;
|
|
20023
|
+
}
|
|
20024
|
+
/**
|
|
20025
|
+
* The first seq after `after` at which the session stores `entry` unchanged, or undefined when it stores it at none
|
|
20026
|
+
* this process knows of. The seq right after `after` is looked at first: a fork carries its source's rows in order.
|
|
20027
|
+
*/
|
|
20028
|
+
seqOf(entry, after) {
|
|
20029
|
+
const json = JSON.stringify(entry);
|
|
20030
|
+
let print;
|
|
20031
|
+
const fingerprint = () => {
|
|
20032
|
+
print ??= fingerprintRange(json, OFFSET_A, OFFSET_B, 0, json.length);
|
|
20033
|
+
return print;
|
|
20034
|
+
};
|
|
20035
|
+
const at = (seq) => {
|
|
20036
|
+
const page = pageOf(this.notes, seq);
|
|
20037
|
+
if (page === void 0) return false;
|
|
20038
|
+
const slot = seq & 255;
|
|
20039
|
+
if (slot * 3 >= page.prints.length || page.prints[slot * 3] !== json.length) return false;
|
|
20040
|
+
const stored = page.jsons?.[slot];
|
|
20041
|
+
if (stored !== void 0) return stored === json;
|
|
20042
|
+
const [a, b] = fingerprint();
|
|
20043
|
+
return page.prints[slot * 3 + 1] === a && page.prints[slot * 3 + 2] === b;
|
|
20044
|
+
};
|
|
20045
|
+
if (at(after + 1)) return after + 1;
|
|
20046
|
+
const [a] = fingerprint();
|
|
20047
|
+
for (const seq of this.seqsByPrint().get(a) ?? []) if (seq > after && at(seq)) return seq;
|
|
20048
|
+
}
|
|
20049
|
+
/** {@link bySeqPrint}, every fingerprint of the session taken first. */
|
|
20050
|
+
seqsByPrint() {
|
|
20051
|
+
if (this.bySeqPrint !== void 0) return this.bySeqPrint;
|
|
20052
|
+
const index = /* @__PURE__ */ new Map();
|
|
20053
|
+
for (const [number, page] of this.notes.pages.entries()) {
|
|
20054
|
+
if (page === void 0) continue;
|
|
20055
|
+
for (let slot = 0; slot * 3 < page.prints.length; slot++) {
|
|
20056
|
+
if (page.prints[slot * 3] < 0) continue;
|
|
20057
|
+
const seq = (number << PAGE_BITS) + slot;
|
|
20058
|
+
const json = page.jsons?.[slot];
|
|
20059
|
+
if (json !== void 0) {
|
|
20060
|
+
taken = 0;
|
|
20061
|
+
takenA = OFFSET_A;
|
|
20062
|
+
takenB = OFFSET_B;
|
|
20063
|
+
takeFingerprint(page, seq, json, json.length);
|
|
20064
|
+
}
|
|
20065
|
+
const print = page.prints[slot * 3 + 1];
|
|
20066
|
+
const seqs = index.get(print);
|
|
20067
|
+
if (seqs === void 0) index.set(print, [seq]);
|
|
20068
|
+
else seqs.push(seq);
|
|
20069
|
+
}
|
|
20070
|
+
}
|
|
20071
|
+
this.bySeqPrint = index;
|
|
20072
|
+
return index;
|
|
20073
|
+
}
|
|
20074
|
+
};
|
|
20075
|
+
export { ActivityWatchdog, AgentSessionBusyError, BLUEPRINT_CONTEXT_TYPE, BUILTIN_HELP_TOOL_NAMES, BUILTIN_PATH_PREFIX, BUILTIN_SLASH_COMMANDS, BUNDLED_EXTENSION_SLASH_COMMANDS, BlueprintBuildFailedError, BlueprintError, BlueprintInvalidError, BlueprintStepFailedError, BlueprintStepTimedOutError, BlueprintUsesUnsupportedError, CACHE_WARMING_MODES, COMMAND_DETAIL_TAIL_BYTES, COMMAND_FOREGROUND_BUDGET_MS, CONTINUE_AFTER_FAILURE, CURRENT_SESSION_VERSION, CompactionCancelledError, CompactionConfigError, CompactionError, CompactionStateError, CompactorFailure, CountdownTimer, DEFAULT_BUILTIN_SELECTION_EXTRA_TOOLS, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, DEFAULT_MAX_RESULT_SIZE_CHARS, DEFAULT_REQUEST_TIMEOUT_MS, DEFAULT_THINKING_LEVEL, Diff, DynamicBorder, ENGINE_UNRESPONSIVE_MS, EditInputError, EditMatchError, EditTargetError, EditToolError, EngineSessionStats, EntryTypeReader, EventSourceError, ExtensionStartupError, FILE_KINDS, FILE_PATTERNS, FINISHED_TASK_RETENTION, FORKED_PACKAGE_NAMES, FORKED_PACKAGE_WORKSPACE_DIRS, FileToolAbortedError, ForkSourceIncompleteError, FramedSelector, GIT_LOCAL_ENV_VARS, GIT_MINIMUM_VERSION, GitProvisionConfigError, GitProvisionError, GitProvisionTimeoutError, GitUnavailableError, HOST, HOST_NOTICE_TYPE, HostInputBridge, HostListenerFailures, INTERACTIVE_MODEL_REFRESH_TIMEOUT_MS, InteractiveEngineResourceReadinessError, IntercomPolicyError, JSON_RPC_ERROR_CODES, JsonTextChecker, LATEST_PROTOCOL_VERSION, LIVE_COMMAND_LIMIT_MESSAGE, LONG_LIVED_COMMANDS, LlamaServerError, LlamaServerRequestError, LlamaServerUnreachableError, MAX_INTERCOM_REACHABLE_GROUPS, MAX_PERSISTED_OUTPUT_BYTES, MAX_POSITION_LENGTH, MAX_TOOL_DETACHMENT_AFTER_MS, ManagedToolDownloadError, ManagedToolError, ManagedToolTimeoutError, McpAbortError, McpConnectionClosedError, McpError, McpTimeoutError, Minimatch, MissingSessionCwdError, NETWORK_TIMEOUT_MS, NON_SECRET_HTTP_HEADERS, NO_QUEUED_MESSAGES, NativeModuleUnavailableError, PERSISTED_OUTPUT_CLOSING_TAG, PERSISTED_OUTPUT_TAG, PERSISTED_OUTPUT_TRUNCATION_MARKER, PLAIN_SELECTOR_STYLE, POST_LOGOUT_AUTH_CHECK_TIMEOUT_MS, PREVIEW_SIZE_BYTES, QueuedDeliveryRelay, QueuedDeliveryView, RESOURCE_TYPES, RESTART_CANCELLED_MESSAGE, ROW_INTENT_META, RawStdoutWriteError, SESSION_HISTORY_TOOL_NAME, STALE_EXTENSION_CONTEXT_MARKER, STALE_EXTENSION_CONTEXT_MESSAGE, STARTUP_DECISION_TYPED_TEXT_NOTICE, SUPPORTED_PROTOCOL_VERSIONS, Selector, SelectorState, SessionIntercomPolicy, ShellTimeoutError, ShellToolError, SqliteSelectorConnection, Stop, SubscriptionChildUnavailableError, SubscriptionClosedError, SubscriptionConfigError, SubscriptionError, SubscriptionEventError, SubscriptionHandlerError, SubscriptionRecordError, SubscriptionSetupError, SubscriptionSubscriberUnavailableError, SubscriptionTimeoutError, TASK_MARKS, THINKING_LEVELS, TOOL_DEACTIVATION_ENTRY_TYPE, TOOL_RESULTS_SUBDIR, TYPEBOX_SUBPATHS, TaskCleanupAdmissionTimeoutError, TaskCleanupError, TaskEvictedError, TaskMessageError, TaskMessageTimeoutError, ToolDetachmentError, TrustDecisionSelector, VALID_THINKING_LEVELS, VERBATIM_COMPACTION_STRATEGY, VisualLinePreview, WriteSelectorError, abandonedToolResult, abortFailure, abortSymbol, activeToolExecutionStarts, addHistoryUsageToTotals, addUsageToTotals, allToolNames, announceBlueprintBuildWaiting, announceHistoryLoad, applyBashSessionEnvironment, applyExifOrientation, applySessionSummaryEntries, areExperimentalFeaturesEnabled, armToolAbortGraceTimer, assertForkSegments, assertSessionCwdExists, assertToolPairingInvariant, assignMissingToolCallIds, asyncScope, attachCleanupCause, attachGitCleanupFailure, attachJsonlLineReader, attachLineReader, attachSessionClaim, awaitBlueprintReady, backgroundTaskScope, beginQueuedMessageDelivery, belongsToSession, bindChatEpoch, bindChatReceipt, bindReleasedTaskOwner, bindSavedReadLines, bindSavedTaskOrigins, bindSavedTaskRowKey, bindTaskResumer, blueprintBuildPending, blueprintBuildSettled, blueprintBuildShared, blueprintBuildsRunning, blueprintBuildsSettled, blueprintDigest, boundedChatRecord, buildBoundaryText, buildBoundaryTextWithLocation, canWatchProcessUntilHostDies, cancelHeldInput, cancelReasonText, canonicalEventBusFor, captureHerdrEnvironment, carryDroppedQueuedMessages, carryRowSource, chatEpoch, chatPosition, chatReceipt, chatReceiptWrite, chatRecordSavesSettled, claimPaneReporting, claimSession, classifiedWorkflowMetadata, cleanupWindowsSelfUpdateQuarantine, clearAssignmentIfClosed, clearFunctionList, clearLockHolder, clearLockHolderAsync, clearToolAbortGraceTimer, collectDeclaredDisplaySecrets, collectSecretsForMasking, combineMany, combineManyMut, combineUsage, compactTemplate, compactUrl, completeStartup, computeBoxDimensions, confinedIntercomChildGroup, containProcessTree, containProcessTreeAllowingBreakaway, conventionDirsForResource, convertBufferWithMarkit, convertFileWithMarkit, copyHostQuestionnaire, createBatchedCanonicalizePathAsync, createConversationRegion, createEventBus, createGitEnvironment, createOwnedAbortController, createSourceInfo, createStagedEventBus, createSyntheticSourceInfo, createTypeScriptSourceSpecifierTransform, createUsageTotals, createWakeDispatcher, customMessageExcludesContext, decodeChatOrder, decodeChatRecord, deduplicateDiagnostics, defaultModelPerProvider, defaultToolNamesFor, deferDeprecationWarnings, defineTool, deserializeSubscriptionError, deserializeToolDetachmentError, detectSupportedImageMimeTypeFromFile, displayTodoId, drainAgentMessageQueue, dropStoredNotes, earlierHeldInputs, emitProgress, encodeChatOrder, endQueuedMessageDelivery, entryLines, epochHasCreationTime, expandSearchUrl, experimentalToolSamplingProperty, extractHeaderSecrets, fListSymbol, fetchWithRetry, fieldTone, fileEpochOf, filterSearchOutputByLineRange, final, finalSymbol, finalValue, findBlueprintError, findCompactionError, findGitProvisionError, findLegacyWorkflowFiles, findLlamaServerError, findMissingSessionCwdIssue, findMissingSessionCwdIssueAsync, findPreferredAvailableModel, findProviderDefaultModel, findSubscriptionError, findTaskEvictedError, findTaskMessageError, findToolDetachmentError, finishHeldInput, firstChatOrders, flushRawStdout, flushSymbol, flushable, forkRunSegments, forkScope, forkStoreRelation, forkedPackageExportAliases, formatCodexProviderError, formatMissingSessionCwdPrompt, formatNoApiKeyFoundMessage, formatNoModelSelectedMessage, formatNoModelsAvailableMessage, formatReadLineRange, formatSelectedLines, formatSize, formatTimeoutSeconds, formatTodoId, formatTokenCount, formatToolCallWithArgs, formatUnresolvedModelMessage, frozenClocks, getAllBuiltinPackageLocations, getBuiltinPackageLocations, getBuiltinPackagePaths, getDefaultCacheRetention, getDefaultSessionDir, getDefaultSessionDirAsync, getDefaultSessionDirPath, getEngineSessionStats, getErrnoCode, getFinalValue, getFunctionList, getHostQuestionnaire, getLockPath, getMandatoryBuiltinExtensionPaths, getManifestFromPackageJson, getManyValues, getMissingSessionCwdOptions, getPiUserAgent, getProviderLoginHelp, getResourcePathKey, getResourcePathKeyAsync, getSyntheticPathSource, getTextOutput, getTodoPath, getTodoStatus, getTodoTitle, getTodosDir, getTodosDirLabel, getToolExecutionStartedAt, getToolListError, handOverBuildTimings, handlePackageCommandParseOutcome, hasHeldInput, hasHistoryLoadObserver, hasNativeProcessHold, heldInputView, historySnapshotFor, holdDeprecationWarnings, holdProcessDescendants, holdProcessDescendantsResult, holdToolAbortGraceWhenObserved, holdToolsUntilBuilt, holdToolsUntilOwnerBuilt, holderRuns, hostInputError, hostNoticeForEvent, inheritForkScope, interactiveQuitOf, invalidArgText, invalidateNativeSearchCache, isAgentSessionBusyError, isBlueprintBuildFailedError, isBlueprintError, isBlueprintInvalidError, isBlueprintStepFailedError, isBlueprintStepTimedOutError, isBlueprintUsesUnsupportedError, isClassifiedWorkflowSession, isCodexTokenInvalidationError, isCompactionCancelledError, isCompactionConfigError, isCompactionError, isCompactionStateError, isCompactorFailure, isEditInputError, isEditMatchError, isEditTargetError, isEditToolError, isEventSourceError, isExtensionLoadError, isExtensionStartupFailure, isFileToolAbortedError, isFinalValue, isFlushable, isFunctionList, isGitProvisionConfigError, isGitProvisionError, isGitProvisionTimeoutError, isGitUnavailableError, isInstallTelemetryEnabled, isInteractiveEngineResourceReadinessError, isJsonRpcId, isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse, isLlamaServerError, isLlamaServerRequestError, isLlamaServerUnreachableError, isManagedToolDownloadError, isManagedToolError, isManagedToolTimeoutError, isMandatoryRuntimeTool, isMany, isMissingSessionCwdError, isObject, isPathInside, isReadResourceSelector, isReadableUrlPath, isRetryableCompactionError, isRetryableGitProvisionError, isRetryableLlamaServerError, isRetryableManagedToolError, isRetryableSubscriptionError, isRetryableTaskError, isRetryableTaskMessageError, isSensitiveKeyNameForMasking, isSerializedMissingSessionCwdError, isShellTimeoutError, isShellToolError, isSingleGenericAbortTextContent, isStaleExtensionContextError, isStdoutTakenOver, isStop, isSubscriptionChildUnavailableError, isSubscriptionClosedError, isSubscriptionConfigError, isSubscriptionError, isSubscriptionEventError, isSubscriptionHandlerError, isSubscriptionRecordError, isSubscriptionSetupError, isSubscriptionSubscriberUnavailableError, isSubscriptionTimeoutError, isSyntheticPath, isTaskCleanupAdmissionTimeoutError, isTaskCleanupError, isTaskEvictedError, isTaskMessageError, isTaskMessageTimeoutError, isTodoClosed, isToolDeactivationEntryData, isToolDetachmentError, isToolModifier, isTransientExtensionStartupFailure, isTrustDecision, isTrustedMandatoryRuntimeTool, isUnknownModel, isValidThinkingLevel, isWindowsInstallDirectoryLockError, isWriteSelectorError, joinForkSegments, keepDroppedQueuedMessages, keepsDroppedQueuedMessages, keptTaskHint, keptTaskId, leadingAndTrailingWs, leadingWs, legacyFileEpochOf, legacyWorkflowFilePaths, legacyWorkflowFilePatterns, legacyWorkflowSection, linkPath, literalPathLike, loadConfig, loadNativeSearchBinding, loadShownDeprecationNotices, loadedConfig, lockShared, longestCommonPrefix, longestCommonSuffix, many, manySymbol, markEventLoopShutdown, markEventLoopStartupComplete, markTrustedMandatoryRuntimeExtension, materializeSessionSummaryMetadata, maximumOverlap, mergeReadRanges, mergeSessionTrustDecisions, minimatch, modelCallUsage, nativeForkReader, nativeModuleProblem, nativeModuleUnavailable, noOpUIContext, none, normalizeDisplayText, normalizeInterruptAbortMessage, normalizeMany, normalizePathLikeInput, normalizeTodoId, noteQueueUpdateDeliveries, noteQueuedMessagesDropped, noteRowSource, noteSavedSeq, noteSnapshotGeneration, noteUserMessageOrigin, notifySessionProviderRequestDispatched, observeArchiveLoad, observeHistoryLoads, observeReferenceCut, observeToolExecutionTiming, omitLegacyThinkingSections, onBlueprintBuildFinished, onBlueprintBuildWaiting, onSessionProviderRequestDispatched, operationSignal, originalHistoryNote, outputExtensionLoadErrors, parseJsonRpcMessage, parsePackageCommand, parseSerializedCompactionError, parseSlashCommand, parseTranscriptFrameLayout, pendingProjectResourcesTrusted, placeTranscriptFrame, prefixForkSegments, prepareLockTakeover, prepareSessionClaim, priorityHoldCounts, processTreeEnded, projectTrustHandlerRegistered, projectTrustWarningVisible, projectTrustedBeforeExtensions, providerOfModelReference, quarantineWindowsNativeDependencies, queueUpdateDeliveries, queuedMessagesUnderWay, queuedReceiptsUnderWay, queuedTextsUnderWay, quitAsInteractiveApp, raceWithAbortSignal, rawStdoutWriteFailed, readLedger, readLines, readPiManifestFile, readTaskOutputTail, receiveChatReceipt, recordLockHolder, recordLockHolderAsync, recordStartupThinkingLevel, redactAuthorizationUrlForDisplay, redactCredentials, redactOAuthErrorText, redactOAuthErrorTextCapped, redactUrlForDisplay, redactUrlForTransportDisplay, redactWwwAuthenticateHeader, referenceMetadataRead, refreshConfig, registerArchiveLoad, registerCanonicalEventBus, registerForkScope, registerHeldInput, registerHistorySnapshot, registerStartupRollback, rehydrateBlueprintError, rehydrateCompactionError, rehydrateEditToolError, rehydrateGitProvisionError, rehydrateLlamaServerError, rehydrateMissingSessionCwdError, rehydrateShellToolError, rehydrateTaskCleanupError, rehydrateTaskEvictedError, rehydrateTaskMessageError, rehydrateWriteSelectorError, releaseDeprecationWarnings, releasePaneReporting, releaseRetiredPaneReporting, releaseToolAbortGraceTimers, releaseTurnPause, releaseUnownedPaneRegistration, removePrefix, removeSuffix, removedProviderMessage, renderBlueprintContext, renderBorderedBox, renderToolPath, repairCollapsedScheme, replacePrefix, replaceSuffix, replaceTabs, replacementAbortContent, reportContained, reportPaneActivity, repositoryKey, require_applyReviver, require_constants, require_debug, require_errors, require_identifiers, require_identity, require_ignore, require_line_counter, require_parse_options, require_parse_url, require_resolve_end, require_resolve_props, require_sha256, require_stringifyComment, require_stringifyNumber, require_util_contains_newline, resolveDecisionDeadlineMs, resolvePhysicalPath, resolvePhysicalPathAsync, resolveSchemaRef, resourceInternals, restoreStdout, retirePaneReporting, retryStatusUpdate, rollbackStartup, rootKey, rowSource, rowTone, safeTrustChoiceIndex, sanitizeMcpServers, sanitizeOpenAIResponsesPayload, saveChatRecord, savedConversationThinkingLevel, savedReadLines, savedRowKey, savedRowSpan, savedSeqOf, savedTaskRowKey, savedTaskRows, scopedBackgroundTasks, scrubFetchError, scrubPreCompactionAssistantUsage, scrubUnknownErrorData, searchPosition, segment, segmentLength, selectExactReadRanges, selectReadRanges, selectorHintEntries, sentinelsToAppend, serializeBlueprintError, serializeCompactionError, serializeConversationForCompaction, serializeFileToolError, serializeJsonLine, serializeMissingSessionCwdError, serializeRetainedTranscript, serializeSessionMutation, serializeSubscriptionError, sessionIntercomFacade, sessionTasks, sessionWaitsToRetry, setDeprecationWarningSink, setFunctionList, setMarkitDiagnosticSink, setSharedHistorySwitchHost, settingsFileNoticeKey, settingsInternals, settleTurnPause, sha256Hex, shareBlueprintBuild, sharedClockNow, sharedHistorySwitchHost, sharedWakeDispatcher, shortenPath, shouldRenderEngineDiagnosticAsChatError, shouldRunFirstTimeSetup, sleep, sliceHead, sliceTail, snapshotBashSessionEnvironment, sortTodos, spanElapsedMs, spawnContainedProcess, spawnHostProcess, splitLineRangeSelector, splitPathLikeGlob, splitReadLineSelector, splitTodosByAssignment, sqliteSessionResumeArgs, startEventLoopMonitor, startShellDeadline, startToolTimer, startupCleanupFailureMessage, startupProjectTrust, stop, stopBlueprintBuilds, stopErrorSymbol, stopWaiting, storedEntryNotes, storedRows, str, stringEntries, stripFenceMarkers, stripUrlUserinfoAndHash, styleFieldTone, summarizeSession, takeOverDeadHolder, takeOverDeadHolderAsync, takeOverStdout, takeQueuedDeliveryChange, takeQueuedMessagesDroppedAt, taskMark, taskOutcomeStatus, taskOutputText, taskResumer, taskSessionKey, taskStoppedForResume, themeSelectorStyle, thisProcess, timestamp, toError, toMany, toolAbortGraceMs, toolTimerText, trackChatRecordSave, trailingWs, transcriptHeaderLines, transcriptLayoutOf, truncateHead, truncateLine, truncateMiddle, truncateTail, truncateToVisualLines, uniquifyToolCallIds, updateLedger, usageCostBreakdown, userMessageOrigin, validQuestionnaire, validateGuidanceFields, validateIntercomSessionOptions, validateTimeoutOverride, validateTodoId, waitForEventLoopMonitorReady, waitForRawStdoutBackpressure, warnDeprecation, watchFirstProjectTrustHandler, watchProcessUntilHostDies, watchReferenceCut, whenAborted, windowsTemporaryFiles, withCleanup, withFileMutationQueue, withInstallLock, withLegacyPackageNames, withProgress, withQueuedDeliveryChange, withResolvingFileMutationQueue, withToolAbortGrace, withinDecisionDeadline, workspaceKey, writeOutputFile, writeRawStdout, writeRawStdoutControl, writeRawStdoutOnce, yieldToEventLoop, yieldToEventLoopIfSlow, yieldToTimerTurn, yieldTurn };
|
|
19691
20076
|
|
|
19692
|
-
//# sourceMappingURL=startup-0-0-
|
|
20077
|
+
//# sourceMappingURL=startup-0-0-EZUKEP4Q.js.map
|
|
19693
20078
|
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
19694
20079
|
// demand that fails in a process an in-place update left running says to restart.
|
|
19695
20080
|
function __atomicOnDemandFailed(error, feature) {
|
|
19696
20081
|
return (async () => {
|
|
19697
20082
|
const root = new URL("../", import.meta.url);
|
|
19698
20083
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
19699
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
20084
|
+
const key = `${root.href}#0.10.11-alpha.3`;
|
|
19700
20085
|
let release = releases.get(key);
|
|
19701
20086
|
if (release === undefined) {
|
|
19702
20087
|
const current = (async () => {
|
|
@@ -19724,7 +20109,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
19724
20109
|
} catch {
|
|
19725
20110
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
19726
20111
|
}
|
|
19727
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.
|
|
20112
|
+
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;
|
|
19728
20113
|
if (updatedTo === undefined) throw error;
|
|
19729
20114
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
19730
20115
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|