@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,11 +1,11 @@
|
|
|
1
1
|
import { __commonJSMin, __require } from "./rolldown-runtime-BGM3D5V3.js";
|
|
2
2
|
import { APP_NAME, ENV_SESSION_DIR, VERSION, createChildProcessEnvironment, createModuleRequire, findHelperExecutable, findHelperExecutableAsync, getAgentDir, getBinDir, getProjectConfigDirs, isBunBinary, isBundledBuild, isPathWithin, loadOnDemand, markLifecycleTiming, normalizePath, processLaunch, processLaunchAsync, releaseRetainedWindowsProcessExitHandle, resolutionBaseUrl, resolvePath, resolveSafeWindowsKillCwdLexical, resolveSafeWindowsWorkingDirectoryAsync, retainWindowsProcessExitHandle, spawnLaunchedProcess, spawnLaunchedProcessSync, stripBom } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
-
import { ActivityWatchdog, CompactionCancelledError, CompactorFailure, Diff, JSON_RPC_ERROR_CODES, LIVE_COMMAND_LIMIT_MESSAGE, MAX_TOOL_DETACHMENT_AFTER_MS, McpAbortError, McpConnectionClosedError, NON_SECRET_HTTP_HEADERS, ROW_INTENT_META, STARTUP_DECISION_TYPED_TEXT_NOTICE, TASK_MARKS, TaskCleanupAdmissionTimeoutError, TaskEvictedError, TrustDecisionSelector, VisualLinePreview, asyncScope, chatEpoch, collectSecretsForMasking, combineUsage, computeBoxDimensions, createSourceInfo, createTypeScriptSourceSpecifierTransform, defineTool, fetchWithRetry, fieldTone, findProviderDefaultModel, flushable, formatSize, getErrnoCode, getFunctionList, getPiUserAgent, getSyntheticPathSource, getTextOutput, holdProcessDescendants, holdProcessDescendantsResult, invalidArgText, isFlushable, isFunctionList, isJsonRpcRequest, isJsonRpcResponse, isStdoutTakenOver, isStop, isSyntheticPath, isTrustDecision, isValidThinkingLevel, linkPath, many, none, parseJsonRpcMessage, redactCredentials, redactOAuthErrorText, redactOAuthErrorTextCapped, redactWwwAuthenticateHeader, removedProviderMessage, renderBorderedBox, require_applyReviver, require_constants, require_debug, require_identifiers, require_identity, require_parse_options, require_parse_url, resolveDecisionDeadlineMs, resourceInternals, safeTrustChoiceIndex, scrubFetchError, scrubUnknownErrorData, setFunctionList, spanElapsedMs, spawnContainedProcess, str, styleFieldTone, toError, validateTimeoutOverride } from "./startup-0-0-
|
|
4
|
-
import { AgentRehydrateError, AgentReleaseConfigError, EMPTY_OUTPUT_TEXT, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, LlamaClient, MULTI_SUBMIT_LABEL, MarkdownContentCache, NestedToolCallRunner, RESERVED_LABELS, SESSION_STORAGE_JOIN, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, StorageSelectionSchema, StringEnum as StringEnum$1, TransportEvents, WorkspaceConfigError, WrappingSelect, acceptsForkReplay, cancelReceiptStatus, chatAnswerIntent, chatNumberingFor, cleanupFailureSummary, computeFocusedOptionHasPreview, currentResourceAdmission, diffLines, discoverChatFile, errorMessage, flush, formatAnswerScalar, formatTokenSegment, genBridge, getBuiltinExtensionEntryLabel, getCommandEnv, getGitShellEnvironmentAsync, getLoaderAgentDirs, getVirtualModules, lifecycleScopeForOwner, llamaInferenceUrl, messageIsLlmVisible, next, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelReference, normalizeProviderKeys, parseInteractiveEngineMessage, presentTaskError, readFileChatRecords, readInlineCaret, require_from_url, require_re, require_toJS, require_visit, resizeImageInProcess, resolveInlineDraftValue, runCallback, runSynchronousCallback, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, sessionLifecycleCreation, stopIndex, streamCutDurationMs, tokenize, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, userLikeContentBlockIsLlmVisible, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, withInlineDraft, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner } from "./startup-0-1-
|
|
3
|
+
import { ActivityWatchdog, CompactionCancelledError, CompactorFailure, Diff, ForkSourceIncompleteError, JSON_RPC_ERROR_CODES, LIVE_COMMAND_LIMIT_MESSAGE, MAX_TOOL_DETACHMENT_AFTER_MS, McpAbortError, McpConnectionClosedError, NON_SECRET_HTTP_HEADERS, ROW_INTENT_META, STARTUP_DECISION_TYPED_TEXT_NOTICE, TASK_MARKS, TaskCleanupAdmissionTimeoutError, TaskEvictedError, TrustDecisionSelector, VisualLinePreview, asyncScope, chatEpoch, collectSecretsForMasking, combineUsage, computeBoxDimensions, createSourceInfo, createTypeScriptSourceSpecifierTransform, defineTool, fetchWithRetry, fieldTone, fileEpochOf, findProviderDefaultModel, flushable, formatSize, getErrnoCode, getFunctionList, getPiUserAgent, getSyntheticPathSource, getTextOutput, holdProcessDescendants, holdProcessDescendantsResult, invalidArgText, isFlushable, isFunctionList, isJsonRpcRequest, isJsonRpcResponse, isStdoutTakenOver, isStop, isSyntheticPath, isTrustDecision, isValidThinkingLevel, linkPath, many, none, parseJsonRpcMessage, redactCredentials, redactOAuthErrorText, redactOAuthErrorTextCapped, redactWwwAuthenticateHeader, removedProviderMessage, renderBorderedBox, require_applyReviver, require_constants, require_debug, require_identifiers, require_identity, require_parse_options, require_parse_url, resolveDecisionDeadlineMs, resourceInternals, safeTrustChoiceIndex, scrubFetchError, scrubUnknownErrorData, segmentLength, setFunctionList, spanElapsedMs, spawnContainedProcess, str, styleFieldTone, toError, validateTimeoutOverride } from "./startup-0-0-EZUKEP4Q.js";
|
|
4
|
+
import { AgentRehydrateError, AgentReleaseConfigError, EMPTY_OUTPUT_TEXT, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, LlamaClient, MULTI_SUBMIT_LABEL, MarkdownContentCache, NestedToolCallRunner, RESERVED_LABELS, SESSION_STORAGE_JOIN, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, StorageSelectionSchema, StringEnum as StringEnum$1, TransportEvents, WorkspaceConfigError, WrappingSelect, acceptsForkReplay, cancelReceiptStatus, chatAnswerIntent, chatNumberingFor, cleanupFailureSummary, computeFocusedOptionHasPreview, currentResourceAdmission, diffLines, discoverChatFile, errorMessage, flush, formatAnswerScalar, formatTokenSegment, genBridge, getBuiltinExtensionEntryLabel, getCommandEnv, getGitShellEnvironmentAsync, getLoaderAgentDirs, getVirtualModules, lifecycleScopeForOwner, llamaInferenceUrl, messageIsLlmVisible, next, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelReference, normalizeProviderKeys, parseInteractiveEngineMessage, presentTaskError, readFileChatRecords, readInlineCaret, reparentedSegments, require_from_url, require_re, require_toJS, require_visit, resizeImageInProcess, resolveInlineDraftValue, runCallback, runSynchronousCallback, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, sessionLifecycleCreation, splitSegment, stopIndex, streamCutDurationMs, tokenize, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, userLikeContentBlockIsLlmVisible, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, withInlineDraft, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner } from "./startup-0-1-RTOHJFDJ.js";
|
|
5
5
|
import { KeybindingsManager as KeybindingsManager$1, clickableHintText, clickableKeyTextHint, detectTerminalThemeForAuto, graphemeAt, initTheme, keepStartupDialogDraft, parenthesizedKeyHint, setTheme, singleLineDisplayText, terminalDisplayCursor, terminalDisplayText, theme, withEarlyInputHeldForStartupDialog } from "./p2-shell-main-B2WIALFD.js";
|
|
6
6
|
import { stripJsonComments } from "./p1-shared-RG5I5LJ6.js";
|
|
7
|
-
import { findInCauseChain, guardLockRemoval, nativeProcessCreationTime, nativeTerminateProcess, redactCredentialShapes, rehydrateErrorCause, releaseLock, releaseLockSync, renameReplacing, renameReplacingAsync, serializeErrorCause, waitForLock, waitForLockSync } from "./p1b-elig-
|
|
8
|
-
import { rehydrateDecisionError } from "./settings-startup-
|
|
7
|
+
import { findInCauseChain, guardLockRemoval, nativeProcessCreationTime, nativeTerminateProcess, redactCredentialShapes, rehydrateErrorCause, releaseLock, releaseLockSync, renameReplacing, renameReplacingAsync, serializeErrorCause, waitForLock, waitForLockSync } from "./p1b-elig-TVB5CBLL.js";
|
|
8
|
+
import { rehydrateDecisionError } from "./settings-startup-HXQLSUWM.js";
|
|
9
9
|
import * as fs from "node:fs/promises";
|
|
10
10
|
import { chmod, lstat, mkdir, mkdtemp, readFile, rm, stat } from "node:fs/promises";
|
|
11
11
|
import { chmodSync, existsSync, mkdirSync, readFileSync, realpath as realpath$1, realpathSync, rmSync, statSync, writeFileSync } from "fs";
|
|
@@ -32,6 +32,7 @@ import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
|
32
32
|
import { memoizeAsync } from "../utils/memoize-async.js";
|
|
33
33
|
import { runToolCall } from "@bastani/atomic-agent-core";
|
|
34
34
|
import { isProxy } from "node:util/types";
|
|
35
|
+
import { learnCreationTime } from "../core/storage/creation-time.js";
|
|
35
36
|
import { defaultSessionDatabasePathSteps, defaultSharedStoragePathSteps, runStorageSteps, runStorageStepsSync, storagePathBaseDirSteps, storageSettingsSteps } from "../core/storage/file-identity.js";
|
|
36
37
|
import { Type as Type$1 } from "@bastani/atomic-ai/utils/typebox/index";
|
|
37
38
|
import { llamaCppClassifyApi } from "@bastani/atomic-ai/api/llama-cpp-classify.lazy";
|
|
@@ -45,7 +46,8 @@ import { lookup } from "node:dns/promises";
|
|
|
45
46
|
import { anthropicAssistantReplayContent } from "@bastani/atomic-ai/api/anthropic-assistant-content";
|
|
46
47
|
import { isProducedByModel } from "@bastani/atomic-ai/api/transform-messages";
|
|
47
48
|
import { Value } from "@bastani/atomic-ai/utils/typebox/value";
|
|
48
|
-
import {
|
|
49
|
+
import { rejectRemovedTeamProfile } from "../core/storage/libsql-removed.js";
|
|
50
|
+
import { selectStorage, selectStorageSteps } from "../core/storage/selection.js";
|
|
49
51
|
// dist/cli/startup-ui.js
|
|
50
52
|
var StartupDialogInputGuard = class extends Container {
|
|
51
53
|
enterArmed;
|
|
@@ -941,6 +943,224 @@ function killProcessTree(pid) {
|
|
|
941
943
|
}
|
|
942
944
|
}
|
|
943
945
|
}
|
|
946
|
+
// dist/core/storage/session/fork-detach.js
|
|
947
|
+
/**
|
|
948
|
+
* Detaching lazy forks from a session (Neon's detach_ancestor). A fork in a SQL store reads the rows it inherited
|
|
949
|
+
* through segments that point at the sessions owning them, which keep those rows while any segment points at them. To
|
|
950
|
+
* really delete or rewrite such a session, every fork still pointing at it first gets its own copy of those rows:
|
|
951
|
+
*
|
|
952
|
+
* 1. Block: the segments pin the parent's rows, and a progress row records the detach and the child's original map.
|
|
953
|
+
* 2. Copy: a page of the parent's rows moves into the child at the global seqs the segment gave them, and in the same
|
|
954
|
+
* transaction the segment shrinks past them, so every seq is covered by a segment or by a row of the child's own,
|
|
955
|
+
* never both, and the child reads the same at every commit.
|
|
956
|
+
* 3. Publish: each page commits; the segments are the progress, so a crash resumes with the segments that remain.
|
|
957
|
+
* 4-6. The last page also removes the child's last segment on the parent, re-points at the child's copy each other
|
|
958
|
+
* fork of the parent that reads only rows the child's prefix holds (its cut-off at or below the child's), and
|
|
959
|
+
* removes the progress row, in one transaction.
|
|
960
|
+
*
|
|
961
|
+
* A detach locks the sessions whose segments it changes for update, in ID order, and never the parent. The store's
|
|
962
|
+
* delete and replace lock a session for update before they list the references to it, and a fork locks every session
|
|
963
|
+
* its segments name for key share, so neither misses a reference another transaction is adding. Re-pointing a fork at
|
|
964
|
+
* the child adds a reference to the child, which the detach already holds for update. Locking the parent instead
|
|
965
|
+
* would deadlock against the parent's replace, which holds the parent's row while it waits for its forks' rows.
|
|
966
|
+
*/
|
|
967
|
+
/**
|
|
968
|
+
* Where a refused copy of shared rows is noted, for debugging: the application sets it once, to its debug log. A refusal
|
|
969
|
+
* also fails the write that needed the copy, so nothing is lost; the note says which fork and which source entry.
|
|
970
|
+
*/
|
|
971
|
+
let noteRefusedCopy = () => {};
|
|
972
|
+
function setForkCopyRefusalNote(note) {
|
|
973
|
+
noteRefusedCopy = note;
|
|
974
|
+
}
|
|
975
|
+
/** Notes `error` once when it is a refused copy of shared rows; resolves nothing and never throws. */
|
|
976
|
+
function noteForkCopyRefusal(error, operation) {
|
|
977
|
+
if (!(error instanceof ForkSourceIncompleteError)) return;
|
|
978
|
+
try {
|
|
979
|
+
noteRefusedCopy({
|
|
980
|
+
operation,
|
|
981
|
+
sessionId: error.sessionId,
|
|
982
|
+
sourceId: error.sourceId,
|
|
983
|
+
sourceSeq: error.sourceSeq
|
|
984
|
+
});
|
|
985
|
+
} catch {}
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* Locks `ids` for update, to change their segments, in ID order, the order every transaction that locks sessions
|
|
989
|
+
* takes them in. A detach never locks the parent: the parent's replace holds the parent's row while it waits for its
|
|
990
|
+
* forks' rows, and only that replace can change the parent's rows a fork reads, after it has detached the fork itself.
|
|
991
|
+
*/
|
|
992
|
+
async function lockForUpdate(host, tx, ids) {
|
|
993
|
+
await host.lockForkSources(tx, [...new Set(ids)].sort(), "update");
|
|
994
|
+
}
|
|
995
|
+
/** The forks whose segments name `sessionId`, after locking it for update. */
|
|
996
|
+
async function lockedReferrers(host, tx, sessionId) {
|
|
997
|
+
await host.lockForkSources(tx, [sessionId], "update");
|
|
998
|
+
return (await host.forkChildren(tx, sessionId)).filter((id) => id !== sessionId);
|
|
999
|
+
}
|
|
1000
|
+
/** Removes the rows a session stores and its tombstone: nothing names them, and the session is gone or replaced. */
|
|
1001
|
+
async function removeStoredRows(host, tx, sessionId) {
|
|
1002
|
+
const { pinTables: tables } = host;
|
|
1003
|
+
for (const table of [
|
|
1004
|
+
tables.blobChunks,
|
|
1005
|
+
tables.blobs,
|
|
1006
|
+
tables.entryChunks,
|
|
1007
|
+
tables.searchTexts,
|
|
1008
|
+
tables.entries
|
|
1009
|
+
]) await tx.run(`DELETE FROM ${table} WHERE session_id = ?`, sessionId);
|
|
1010
|
+
await tx.run(`DELETE FROM ${tables.tombstones} WHERE session_id = ?`, sessionId);
|
|
1011
|
+
}
|
|
1012
|
+
async function isTombstoned(host, tx, sessionId) {
|
|
1013
|
+
return await tx.get(`SELECT session_id FROM ${host.pinTables.tombstones} WHERE session_id = ?`, sessionId) !== void 0;
|
|
1014
|
+
}
|
|
1015
|
+
function parseProgress(row) {
|
|
1016
|
+
return {
|
|
1017
|
+
reparent: row.reparent !== 0,
|
|
1018
|
+
original: JSON.parse(row.original_segments),
|
|
1019
|
+
epochs: [row.parent_epoch ?? void 0, row.child_epoch ?? void 0]
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
/** The rewrite epochs of the parent and the child, read under their locks. */
|
|
1023
|
+
async function rewriteEpochs(host, tx, parentId, childId) {
|
|
1024
|
+
return [await host.forkRewriteEpoch(tx, parentId), await host.forkRewriteEpoch(tx, childId)];
|
|
1025
|
+
}
|
|
1026
|
+
/** Every session whose rows `sessionId` reads, directly or through the sessions it reads. */
|
|
1027
|
+
async function readSources(host, tx, sessionId) {
|
|
1028
|
+
const found = /* @__PURE__ */ new Set();
|
|
1029
|
+
const pending = [sessionId];
|
|
1030
|
+
for (let next = pending.pop(); next !== void 0; next = pending.pop()) for (const { sourceId } of await host.forkSegments(tx, next)) if (!found.has(sourceId)) {
|
|
1031
|
+
found.add(sourceId);
|
|
1032
|
+
pending.push(sourceId);
|
|
1033
|
+
}
|
|
1034
|
+
return found;
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Within `tx`, copies every row of `parentId` the child reads into the child and removes its segments on the parent,
|
|
1038
|
+
* as a caller about to rewrite the parent in the same transaction needs. With `reparent`, the parent's other forks are
|
|
1039
|
+
* re-pointed at the child's copy when it holds every row they read of the parent at the same seqs. `started` is how a detach a page at a time found
|
|
1040
|
+
* the child when it started; its map of the child's rows holds only while neither session was rewritten since, so
|
|
1041
|
+
* a rewrite of either skips the re-pointing, and the other forks keep reading the parent. Resolves with the forks
|
|
1042
|
+
* re-pointed.
|
|
1043
|
+
*/
|
|
1044
|
+
async function detachForkWithin(host, tx, parentId, childId, reparent, started) {
|
|
1045
|
+
const siblings = reparent ? (await host.forkChildren(tx, parentId)).filter((id) => id !== childId) : [];
|
|
1046
|
+
await lockForUpdate(host, tx, [childId, ...siblings]);
|
|
1047
|
+
const onParent = (await host.forkSegments(tx, childId)).filter((segment) => segment.sourceId === parentId);
|
|
1048
|
+
if (onParent.length > 0) await host.materializeForkSegments(tx, childId, onParent);
|
|
1049
|
+
if (siblings.length === 0) return [];
|
|
1050
|
+
let map = onParent;
|
|
1051
|
+
if (started !== void 0) {
|
|
1052
|
+
const [parentEpoch, childEpoch] = await rewriteEpochs(host, tx, parentId, childId);
|
|
1053
|
+
map = parentEpoch === started.epochs[0] && childEpoch === started.epochs[1] ? started.original : [];
|
|
1054
|
+
}
|
|
1055
|
+
const reparented = [];
|
|
1056
|
+
if (map.length === 0) return reparented;
|
|
1057
|
+
const readByChild = await readSources(host, tx, childId);
|
|
1058
|
+
for (const sibling of siblings) {
|
|
1059
|
+
if (readByChild.has(sibling)) continue;
|
|
1060
|
+
const before = await host.forkSegments(tx, sibling);
|
|
1061
|
+
const after = reparentedSegments(before, parentId, childId, map);
|
|
1062
|
+
if (after !== void 0) {
|
|
1063
|
+
await host.writeForkSegments(tx, sibling, after);
|
|
1064
|
+
reparented.push(sibling);
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
return reparented;
|
|
1068
|
+
}
|
|
1069
|
+
/**
|
|
1070
|
+
* Detaches `childId` from `parentId` a page at a time, each page its own transaction; see the module comment. A detach
|
|
1071
|
+
* a crash stopped resumes where it stopped when it runs again, with the options it started with.
|
|
1072
|
+
*/
|
|
1073
|
+
async function detachFork(host, parentId, childId, options = {}) {
|
|
1074
|
+
const table = host.forkDetachTable;
|
|
1075
|
+
const pageRows = Math.max(1, Math.floor(options.pageRows ?? 2e3));
|
|
1076
|
+
const progress = await host.forkTransaction(async (tx) => {
|
|
1077
|
+
const row = await tx.get(`SELECT parent_id, child_id, reparent, original_segments, parent_epoch, child_epoch FROM ${table} WHERE parent_id = ? AND child_id = ?`, parentId, childId);
|
|
1078
|
+
if (row !== void 0) return parseProgress(row);
|
|
1079
|
+
await lockForUpdate(host, tx, [childId]);
|
|
1080
|
+
const original = (await host.forkSegments(tx, childId)).filter((segment) => segment.sourceId === parentId);
|
|
1081
|
+
if (original.length === 0) return void 0;
|
|
1082
|
+
const started = {
|
|
1083
|
+
reparent: options.reparent ?? true,
|
|
1084
|
+
original,
|
|
1085
|
+
epochs: await rewriteEpochs(host, tx, parentId, childId)
|
|
1086
|
+
};
|
|
1087
|
+
await tx.run(`INSERT INTO ${table} (parent_id, child_id, reparent, original_segments, parent_epoch, child_epoch) VALUES (?, ?, ?, ?, ?, ?) ON CONFLICT DO NOTHING`, parentId, childId, started.reparent ? 1 : 0, JSON.stringify(original), started.epochs[0] ?? null, started.epochs[1] ?? null);
|
|
1088
|
+
return started;
|
|
1089
|
+
});
|
|
1090
|
+
if (progress === void 0) return {
|
|
1091
|
+
detached: [],
|
|
1092
|
+
reparented: []
|
|
1093
|
+
};
|
|
1094
|
+
for (;;) {
|
|
1095
|
+
const done = await host.forkTransaction(async (tx) => {
|
|
1096
|
+
await lockForUpdate(host, tx, [childId]);
|
|
1097
|
+
const onParent = (await host.forkSegments(tx, childId)).filter((segment) => segment.sourceId === parentId);
|
|
1098
|
+
if (onParent.reduce((rows, segment) => rows + segmentLength(segment), 0) > pageRows) {
|
|
1099
|
+
await host.materializeForkSegments(tx, childId, [splitSegment(onParent[0], pageRows).page]);
|
|
1100
|
+
return;
|
|
1101
|
+
}
|
|
1102
|
+
const reparented = await detachForkWithin(host, tx, parentId, childId, progress.reparent, progress);
|
|
1103
|
+
await tx.run(`DELETE FROM ${table} WHERE parent_id = ? AND child_id = ?`, parentId, childId);
|
|
1104
|
+
return reparented;
|
|
1105
|
+
}).catch(async (error) => {
|
|
1106
|
+
if (error instanceof ForkSourceIncompleteError) await host.forkTransaction((tx) => tx.run(`DELETE FROM ${table} WHERE parent_id = ? AND child_id = ?`, parentId, childId));
|
|
1107
|
+
throw error;
|
|
1108
|
+
});
|
|
1109
|
+
if (done !== void 0) return {
|
|
1110
|
+
detached: [childId],
|
|
1111
|
+
reparented: [...done]
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
/**
|
|
1116
|
+
* Detaches every fork still pointing at `parentId`, so the parent's rows can go: first the fork that holds most of the
|
|
1117
|
+
* parent's rows, re-pointing the others at its copy when it holds all they read, then any fork that still reads
|
|
1118
|
+
* rows only the parent has. Detaches a crash stopped are finished first.
|
|
1119
|
+
*/
|
|
1120
|
+
async function detachForkChildren(host, parentId, options = {}) {
|
|
1121
|
+
const detached = [];
|
|
1122
|
+
const reparented = /* @__PURE__ */ new Set();
|
|
1123
|
+
const record = (report) => {
|
|
1124
|
+
detached.push(...report.detached);
|
|
1125
|
+
for (const id of report.reparented) reparented.add(id);
|
|
1126
|
+
};
|
|
1127
|
+
const pending = await host.forkTransaction((tx) => tx.all(`SELECT child_id FROM ${host.forkDetachTable} WHERE parent_id = ? ORDER BY child_id`, parentId));
|
|
1128
|
+
for (const { child_id } of pending) record(await detachFork(host, parentId, child_id, options));
|
|
1129
|
+
for (;;) {
|
|
1130
|
+
const next = await host.forkTransaction(async (tx) => {
|
|
1131
|
+
let best;
|
|
1132
|
+
for (const id of await host.forkChildren(tx, parentId)) {
|
|
1133
|
+
const rows = (await host.forkSegments(tx, id)).filter((segment) => segment.sourceId === parentId).reduce((sum, segment) => sum + segmentLength(segment), 0);
|
|
1134
|
+
if (best === void 0 || rows > best.rows) best = {
|
|
1135
|
+
id,
|
|
1136
|
+
rows
|
|
1137
|
+
};
|
|
1138
|
+
}
|
|
1139
|
+
return best?.id;
|
|
1140
|
+
});
|
|
1141
|
+
if (next === void 0) break;
|
|
1142
|
+
record(await detachFork(host, parentId, next, options));
|
|
1143
|
+
}
|
|
1144
|
+
return {
|
|
1145
|
+
detached,
|
|
1146
|
+
reparented: [...reparented].filter((id) => !detached.includes(id))
|
|
1147
|
+
};
|
|
1148
|
+
}
|
|
1149
|
+
/** Finishes every detach a crash stopped, as each started. */
|
|
1150
|
+
async function resumeForkDetaches(host) {
|
|
1151
|
+
const rows = await host.forkTransaction((tx) => tx.all(`SELECT parent_id, child_id FROM ${host.forkDetachTable} ORDER BY parent_id, child_id`));
|
|
1152
|
+
const detached = [];
|
|
1153
|
+
const reparented = [];
|
|
1154
|
+
for (const { parent_id, child_id } of rows) {
|
|
1155
|
+
const report = await detachFork(host, parent_id, child_id);
|
|
1156
|
+
detached.push(...report.detached);
|
|
1157
|
+
reparented.push(...report.reparented);
|
|
1158
|
+
}
|
|
1159
|
+
return {
|
|
1160
|
+
detached,
|
|
1161
|
+
reparented
|
|
1162
|
+
};
|
|
1163
|
+
}
|
|
944
1164
|
// ../../node_modules/yaml/dist/doc/directives.js
|
|
945
1165
|
var require_directives = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
946
1166
|
var identity = require_identity();
|
|
@@ -3353,10 +3573,8 @@ var TaskSupervisor = class {
|
|
|
3353
3573
|
if (state.commandStarts.get(operation) === start) state.commandStarts.delete(operation);
|
|
3354
3574
|
};
|
|
3355
3575
|
result.then((started) => {
|
|
3356
|
-
if (started.ok)
|
|
3357
|
-
|
|
3358
|
-
start.task = started.value;
|
|
3359
|
-
} else forget();
|
|
3576
|
+
if (started.ok) start.task = started.value;
|
|
3577
|
+
else forget();
|
|
3360
3578
|
}, forget);
|
|
3361
3579
|
return result;
|
|
3362
3580
|
}
|
|
@@ -4107,10 +4325,11 @@ const captureTaskChatFile = async (file, id) => {
|
|
|
4107
4325
|
inspectedFiles.set(view, discovery);
|
|
4108
4326
|
}
|
|
4109
4327
|
if (!await discovery.present) return void 0;
|
|
4328
|
+
await learnCreationTime(dirname$1(file));
|
|
4110
4329
|
return (raw, stats) => {
|
|
4111
4330
|
if (stats.birthtimeNs <= 0n) return;
|
|
4112
4331
|
const { type: _type, ...header } = raw;
|
|
4113
|
-
const epoch =
|
|
4332
|
+
const epoch = fileEpochOf(stats, JSON.stringify(header));
|
|
4114
4333
|
capture.scope = {
|
|
4115
4334
|
store: fileReader,
|
|
4116
4335
|
owner: {
|
|
@@ -10168,8 +10387,8 @@ const ModelFieldDescriptions = {
|
|
|
10168
10387
|
name: "Display name, also matched by --model patterns.",
|
|
10169
10388
|
reasoning: "Whether the model supports thinking. Applies only to chat models.",
|
|
10170
10389
|
contextWindow: "Context window in tokens. Applies only to chat models.",
|
|
10171
|
-
maxTokens: "Maximum output tokens. Defaults to 16384 for chat models.
|
|
10172
|
-
maxTokensOverride: "Maximum output tokens. On compactor models,
|
|
10390
|
+
maxTokens: "Maximum output tokens. Defaults to 16384 for chat models. On compactor models it has no default: when set, compacted output longer than this many estimated tokens clears the context instead; when omitted, output has no size limit.",
|
|
10391
|
+
maxTokensOverride: "Maximum output tokens. On compactor models, compacted output longer than this many estimated tokens clears the context instead; omit it for no size limit."
|
|
10173
10392
|
};
|
|
10174
10393
|
/** Everything pi-ai defines for compatibility, plus Atomic's alias for the grammar-tool capability. */
|
|
10175
10394
|
const ModelsJsonCompatSchema = Type$1.Object({
|
|
@@ -11225,9 +11444,9 @@ function estimateTokens(message) {
|
|
|
11225
11444
|
const COMPACTOR_REQUEST_TIMEOUT_MS = 12e4;
|
|
11226
11445
|
/** Lines longer than this are wrapped before they are sent, so the compactor can keep or drop parts of them. */
|
|
11227
11446
|
const COMPACTOR_LINE_WIDTH = 2e3;
|
|
11228
|
-
/**
|
|
11447
|
+
/** Upper bound, in estimated tokens, on compacted text an extension hook supplies; longer text clears the context. A compactor model's output has no bound. */
|
|
11229
11448
|
const COMPACTED_OUTPUT_MAX_TOKENS = 32e3;
|
|
11230
|
-
/** Compacted text never fills more than this share of the context the automatic trigger allows. */
|
|
11449
|
+
/** Compacted text an extension hook supplies never fills more than this share of the context the automatic trigger allows. */
|
|
11231
11450
|
const COMPACTED_OUTPUT_MAX_TRIGGER_SHARE = .5;
|
|
11232
11451
|
const DEFAULT_COMPACTOR_ENDPOINT_PATH = "/compact";
|
|
11233
11452
|
const HTTP_ERROR_EXCERPT_MAX_CHARS = 500;
|
|
@@ -11302,7 +11521,7 @@ function buildCompactorMessages(messages, isBoundary) {
|
|
|
11302
11521
|
const rest = messages.filter((message) => !(message.role === "custom" && isBoundary(message)));
|
|
11303
11522
|
return [...boundaries, ...rest].flatMap((message) => messageIsLlmVisible(message) ? compactorMessage(message, isBoundary) ?? [] : []);
|
|
11304
11523
|
}
|
|
11305
|
-
/** Largest compacted text, in estimated tokens, for a model whose automatic trigger fires above `triggerTokens`. */
|
|
11524
|
+
/** Largest compacted text an extension hook may supply, in estimated tokens, for a model whose automatic trigger fires above `triggerTokens`. */
|
|
11306
11525
|
function compactedOutputTokenCap(triggerTokens, maxOutputTokens = COMPACTED_OUTPUT_MAX_TOKENS) {
|
|
11307
11526
|
return Math.max(0, Math.min(Number.isFinite(maxOutputTokens) && maxOutputTokens > 0 ? maxOutputTokens : COMPACTED_OUTPUT_MAX_TOKENS, Math.floor(triggerTokens * COMPACTED_OUTPUT_MAX_TRIGGER_SHARE)));
|
|
11308
11527
|
}
|
|
@@ -11897,19 +12116,20 @@ function setCliStorageSelection(argument, cwd = process.cwd()) {
|
|
|
11897
12116
|
value: parseCliStorageArgument(argument, cwd)
|
|
11898
12117
|
};
|
|
11899
12118
|
}
|
|
11900
|
-
/**
|
|
12119
|
+
/**
|
|
12120
|
+
* Every set storage variable, parsed and checked even when another selection outranks it. A variable of the removed
|
|
12121
|
+
* `ATOMIC_PROFILE=ci` team profile is refused.
|
|
12122
|
+
*/
|
|
11901
12123
|
function environmentChoices(agentDir, env = process.env) {
|
|
12124
|
+
rejectRemovedTeamProfile(env);
|
|
11902
12125
|
const read = (field, schema) => {
|
|
11903
12126
|
const text = environmentValue(field, env);
|
|
11904
12127
|
if (text === void 0) return void 0;
|
|
11905
12128
|
return chooseAt(parseSelection(text, schema, "env", field), "env", field, agentDir);
|
|
11906
12129
|
};
|
|
11907
|
-
const team = environmentTeamProfileSelection(env);
|
|
11908
12130
|
return {
|
|
11909
12131
|
sessions: read(SESSIONS_STORAGE_ENV, SessionStorageSelectionSchema),
|
|
11910
|
-
shared: read(STORAGE_ENV, StorageSelectionSchema)
|
|
11911
|
-
team: team === void 0 ? void 0 : chooseAt(team, "env", TEAM_PROFILE_ENV, agentDir),
|
|
11912
|
-
teamValue: team
|
|
12132
|
+
shared: read(STORAGE_ENV, StorageSelectionSchema)
|
|
11913
12133
|
};
|
|
11914
12134
|
}
|
|
11915
12135
|
/**
|
|
@@ -11942,8 +12162,7 @@ function previewProcessStorageSelection(domain, options = {}) {
|
|
|
11942
12162
|
} catch {
|
|
11943
12163
|
throw new StorageConfigError("env", legacyField, "invalid-path");
|
|
11944
12164
|
}
|
|
11945
|
-
|
|
11946
|
-
return validated.team?.selection;
|
|
12165
|
+
return validated.shared?.selection;
|
|
11947
12166
|
}
|
|
11948
12167
|
/**
|
|
11949
12168
|
* Classify a `settings.json` session-storage value (`sessions.storage` or `storage`)
|
|
@@ -11959,11 +12178,10 @@ function previewSessionSettingSelection(value, field, agentDir) {
|
|
|
11959
12178
|
}
|
|
11960
12179
|
async function validateProcessStorageAsync(agentDir) {
|
|
11961
12180
|
environmentChoices(agentDir);
|
|
11962
|
-
await environmentTeamProfileAsync();
|
|
11963
12181
|
}
|
|
11964
12182
|
/**
|
|
11965
12183
|
* The process-level storage selection for one domain: `--storage`/`--storage-file`, then, for sessions, the domain
|
|
11966
|
-
* variable or its legacy path variable, then `ATOMIC_STORAGE
|
|
12184
|
+
* variable or its legacy path variable, then `ATOMIC_STORAGE`.
|
|
11967
12185
|
* `undefined` leaves the choice to settings.
|
|
11968
12186
|
* Every set storage variable is validated, whichever one applies.
|
|
11969
12187
|
*/
|
|
@@ -12014,39 +12232,29 @@ function* selectProcessStorageSteps(domain, agentDir, cwd) {
|
|
|
12014
12232
|
throw new StorageConfigError("env", legacyField, "invalid-path");
|
|
12015
12233
|
}
|
|
12016
12234
|
if (validated.shared !== void 0) return yield* resolveEnv(STORAGE_ENV, StorageSelectionSchema, sharedDefault);
|
|
12017
|
-
const team = validated.teamValue;
|
|
12018
|
-
return team === void 0 ? void 0 : yield* chooseSteps(team, "env", TEAM_PROFILE_ENV, baseDir, sharedDefault);
|
|
12019
12235
|
}
|
|
12020
12236
|
/** Whether the launching process selected this domain's storage, without validating the selection. */
|
|
12021
12237
|
function hasProcessStorageSelection(domain) {
|
|
12022
12238
|
return registry[CLI_SELECTION] !== void 0 || (domain === "sessions" ? [
|
|
12023
12239
|
"ATOMIC_SESSIONS_STORAGE",
|
|
12024
12240
|
ENV_SESSION_DIR,
|
|
12025
|
-
"ATOMIC_STORAGE"
|
|
12026
|
-
|
|
12027
|
-
] : ["ATOMIC_STORAGE", TEAM_PROFILE_ENV]).some((name) => environmentValue(name) !== void 0);
|
|
12241
|
+
"ATOMIC_STORAGE"
|
|
12242
|
+
] : ["ATOMIC_STORAGE"]).some((name) => environmentValue(name) !== void 0);
|
|
12028
12243
|
}
|
|
12029
12244
|
/**
|
|
12030
12245
|
* The shared `storage` selection this process was launched with, as the `ATOMIC_STORAGE` value a child process it
|
|
12031
|
-
* spawns should receive: `--storage`/`--storage-file`, then `ATOMIC_STORAGE
|
|
12032
|
-
*
|
|
12033
|
-
*
|
|
12246
|
+
* spawns should receive: `--storage`/`--storage-file`, then `ATOMIC_STORAGE`. `undefined` leaves the choice to
|
|
12247
|
+
* settings. A variable of the removed `ATOMIC_PROFILE=ci` team profile is refused, so a broker or Intercom session
|
|
12248
|
+
* never starts without the database it named.
|
|
12034
12249
|
*/
|
|
12035
12250
|
function processSharedStorageSelection() {
|
|
12251
|
+
rejectRemovedTeamProfile();
|
|
12036
12252
|
const cli = registry[CLI_SELECTION];
|
|
12037
12253
|
if (cli !== void 0) return JSON.stringify(cli.value);
|
|
12038
|
-
|
|
12039
|
-
if (shared !== void 0) return shared;
|
|
12040
|
-
const team = environmentTeamProfile();
|
|
12041
|
-
return team === void 0 ? void 0 : JSON.stringify(team);
|
|
12254
|
+
return environmentValue(STORAGE_ENV);
|
|
12042
12255
|
}
|
|
12043
12256
|
async function processSharedStorageSelectionAsync() {
|
|
12044
|
-
|
|
12045
|
-
if (cli !== void 0) return JSON.stringify(cli.value);
|
|
12046
|
-
const shared = environmentValue(STORAGE_ENV);
|
|
12047
|
-
if (shared !== void 0) return shared;
|
|
12048
|
-
const team = await environmentTeamProfileAsync();
|
|
12049
|
-
return team === void 0 ? void 0 : JSON.stringify(team);
|
|
12257
|
+
return processSharedStorageSelection();
|
|
12050
12258
|
}
|
|
12051
12259
|
/**
|
|
12052
12260
|
* `process.env` with `ATOMIC_STORAGE` set to {@link processSharedStorageSelection}, as the Intercom broker this
|
|
@@ -12275,16 +12483,16 @@ var RpcTerminalDrain = class {
|
|
|
12275
12483
|
return this.generation === generation && this.settlement ? this.settlement : Promise.resolve();
|
|
12276
12484
|
}
|
|
12277
12485
|
};
|
|
12278
|
-
export { AgentTokenMeter, AgentWakeDispatcher, COMPACTED_OUTPUT_MAX_TOKENS, COMPACTED_OUTPUT_MAX_TRIGGER_SHARE, COMPACTOR_LINE_WIDTH, COMPACTOR_REQUEST_TIMEOUT_MS, ChatRowView, DEFAULT_AGENT_WAIT_BUDGET_MS, DEFAULT_COMPACTION_SETTINGS, DialogView, FILE_HEADERS_ONLY, FileAuthStorageBackend, InMemoryAuthStorageBackend, InteractiveEngineMonitor, JsonRpcLineReader, LLAMA_PROVIDER_ID, LONG_STREAM_CUT_ADVICE, LONG_STREAM_CUT_MS, MAX_LONG_STREAM_CUT_RETRIES, McpAuthRequiredError, McpHttpError, McpSessionExpiredError, MessageAdmissionBoundary, ModelConfig, OptionListView, PreviewBlockRenderer, QuestionnairePropsAdapter, ResumeCatalogTimeoutError, ResumeCatalogUnavailableError, ResumeError, ResumeNotFoundError, ResumePreconditionError, RpcTerminalDrain, SESSIONS_STORAGE_ENV, STORAGE_ENV, STRUCTURED_OUTPUT_TOOL_NAME, SessionWorkUnsettledError, StartupDialogInputGuard, StreamableHttpTransport, TaskSupervisor, TempDirRefusedError, TodoParams, WorkingRunMeter, abortSessionWork, acquireProtectedPaths, addShellOutputPreview, agentTokenTotal, agentWakeDispatcher, applyExtensionSourceInfo, applyProviderRateLimitObservation, armSessionQuitStops, assertPrivateDirectory, assertPrivateDirectoryAsync, assertSessionOpen, assertWorkspace, asyncAuthStorageReads, automaticWaitBudgetMs, bindTaskChatPage, buildCompactorMessages, buildFallbackModel, buildQuestionnaireResponse, buildToolResult, calculateContextTokens, captureChatSnapshot, captureTaskChatFile, chatPageRequest, classifyRepository, clearNestedToolCalls, compactedOutputTokenCap, compactionMeta, configureProviderRequestBudget, createLlamaProvider, createStructuredOutputCapture, createStructuredOutputTool, createToolDefinitionFromAgentTool, createTwoFilesPatch, detectStartupTheme, discoverAppendSystemPromptFile, discoverSystemPromptFile, drainSessionReload, drainSessionWork, drainSessionWorkWithin, dropWrongTypedSettings, ensurePrivateTempDir, ensurePrivateTempDirAsync, ensureSessionTempDirAsync, ensureTempDirAsync, estimateContextTokens, estimateDirectBranchContextTokens, estimateProjectedContextTokens, estimateTextTokens, estimateTokens, executeNestedToolCall, findExactModelReferenceMatch, findResumeError, findSourceInfoForPath, formatDimensionNote, formatKillCall, formatPatch, formatTruncationNotice, formatWorkingElapsed, formatWorkingMeta, fun, gen, getCallableTools, getDefaultSourceInfoForPath, getLastAssistantUsage, getNativeMcpToolIdentity, getPowerShellConfig, getPowerShellConfigAsync, getShellConfig, getShellConfigAsync, getShellEnvAsync, getTempRootDir, hasCallingSessionWork, hasProcessStorageSelection, hasSessionReload, importAfterEvaluation, installHostModuleBridge, invalidSettingMessage, isLongStreamCut, isPowerShellAvailable, isPowerShellAvailableAsync, isProtectedSessionTempDir, isProviderLimitFailure, isProviderRateLimit, isResumeCatalogTimeoutError, isResumeCatalogUnavailableError, isResumeError, isResumeNotFoundError, isResumePreconditionError, isRetryableResumeError, isSelectedNativeMcpTool, isTodoOperationError, isWorkspace, killChildProcessTree, killProcessTree, killSupervisedProcessTrees, killTrackedDetachedChildren, limitQuitShutdownHandlers, loadTaskOwnTranscriptEntries, loadTaskOwnTranscriptHistory, markDetachedChildExited, markNativeMcpToolDefinition, markProviderRateLimitObserved, matchesMcpDirectToolSelection, modelIdForModel, nextRetryDecision, normalizeDerivedSessionEntries, normalizeWorkingRunSnapshot, observeAccountCatalog, observeProviderRateLimits, observedTaskChatWrite, onSessionQuit, ownedSessionManagerStores, ownedSessionPermits, ownedSessionStores, prepareSourceEntries, prepareSourceEntry, previewProcessStorageSelection, previewSessionSettingSelection, processSharedStorageSelection, processSharedStorageSelectionAsync, processStorageEnvironment, processStorageEnvironmentAsync, providerAdmissionTurn, providerCooldownMs, providerIdForModel, providerLimitScope, providerRateLimitObservations, providerRateLimitSnapshot, providerRequestGate, providerRetryHint, providerUnavailableMs, rebuildKillResult, rebuildShellWaitResult, recordNestedToolCalls, recordProviderRateLimit, recordProviderRetryHint, recordProviderSuccess, recordedRepo, reduce, registerSessionRetirement, registerSessionWorkOwner, registerSourceBuiltinLoad, rehydrateResumeError, renewSessionWork, repeatsLongStreamCut, requestCompactorOutput, require_Node, require_anchors, require_directives, require_lib, require_semver, resizeImage, resolveModelReference, resolveSessionTempDirPath, restoreAnthropicReplayThinkingBlocks, retireSessionReloadGeneration, runCommand, runCommandCapture, runCommandSync, runInProgress, runWithConcurrency, sanitizeTempPathComponent, selectChatRowProps, selectDialogProps, selectMultiSelectProps, selectOptionListProps, selectPreviewPaneProps, selectProcessStorage, selectProcessStorageAsync, selectProcessStorageSteps, selectSubmitPickerProps, selectTabBarProps, serializeResumeError, sessionGenerationClosing, sessionLifetime, sessionQuitSignal, setActiveSessionTempId, setCliStorageSelection, setProviderRequestGate, shouldCompact, showFirstTimeSetup, showStartupInput, showStartupSelector, shutdownDeadline, spawnShellProcess, startParentProcessGuardian, structuredPatch, summarizeQuestions, taskChatPage, taskExtensionStatuses, taskOwnTranscriptEntries, taskTranscriptSource, trackDetachedChildPid, trackDetachedChildProcess, trackSessionReload, trackSessionWork, transformTemplate, tryAdmitProviderRequest, untilShutdownHandlerDeadline, untrackDetachedChildPid, validateProcessStorageAsync, validateQuestionnaire, wakeKeyNamespace, watchTaskExtensionStatuses, watchTaskTranscriptBindings, withBuiltinDiagnostics, withDiscoveredModels, withPersonalizedCatalog, withRemoteCatalog, withTaskChatRows, workspace, wrapLongLines, wrapToolDefinition };
|
|
12486
|
+
export { AgentTokenMeter, AgentWakeDispatcher, COMPACTED_OUTPUT_MAX_TOKENS, COMPACTED_OUTPUT_MAX_TRIGGER_SHARE, COMPACTOR_LINE_WIDTH, COMPACTOR_REQUEST_TIMEOUT_MS, ChatRowView, DEFAULT_AGENT_WAIT_BUDGET_MS, DEFAULT_COMPACTION_SETTINGS, DialogView, FILE_HEADERS_ONLY, FileAuthStorageBackend, InMemoryAuthStorageBackend, InteractiveEngineMonitor, JsonRpcLineReader, LLAMA_PROVIDER_ID, LONG_STREAM_CUT_ADVICE, LONG_STREAM_CUT_MS, MAX_LONG_STREAM_CUT_RETRIES, McpAuthRequiredError, McpHttpError, McpSessionExpiredError, MessageAdmissionBoundary, ModelConfig, OptionListView, PreviewBlockRenderer, QuestionnairePropsAdapter, ResumeCatalogTimeoutError, ResumeCatalogUnavailableError, ResumeError, ResumeNotFoundError, ResumePreconditionError, RpcTerminalDrain, SESSIONS_STORAGE_ENV, STORAGE_ENV, STRUCTURED_OUTPUT_TOOL_NAME, SessionWorkUnsettledError, StartupDialogInputGuard, StreamableHttpTransport, TaskSupervisor, TempDirRefusedError, TodoParams, WorkingRunMeter, abortSessionWork, acquireProtectedPaths, addShellOutputPreview, agentTokenTotal, agentWakeDispatcher, applyExtensionSourceInfo, applyProviderRateLimitObservation, armSessionQuitStops, assertPrivateDirectory, assertPrivateDirectoryAsync, assertSessionOpen, assertWorkspace, asyncAuthStorageReads, automaticWaitBudgetMs, bindTaskChatPage, buildCompactorMessages, buildFallbackModel, buildQuestionnaireResponse, buildToolResult, calculateContextTokens, captureChatSnapshot, captureTaskChatFile, chatPageRequest, classifyRepository, clearNestedToolCalls, compactedOutputTokenCap, compactionMeta, configureProviderRequestBudget, createLlamaProvider, createStructuredOutputCapture, createStructuredOutputTool, createToolDefinitionFromAgentTool, createTwoFilesPatch, detachForkChildren, detachForkWithin, detectStartupTheme, discoverAppendSystemPromptFile, discoverSystemPromptFile, drainSessionReload, drainSessionWork, drainSessionWorkWithin, dropWrongTypedSettings, ensurePrivateTempDir, ensurePrivateTempDirAsync, ensureSessionTempDirAsync, ensureTempDirAsync, estimateContextTokens, estimateDirectBranchContextTokens, estimateProjectedContextTokens, estimateTextTokens, estimateTokens, executeNestedToolCall, findExactModelReferenceMatch, findResumeError, findSourceInfoForPath, formatDimensionNote, formatKillCall, formatPatch, formatTruncationNotice, formatWorkingElapsed, formatWorkingMeta, fun, gen, getCallableTools, getDefaultSourceInfoForPath, getLastAssistantUsage, getNativeMcpToolIdentity, getPowerShellConfig, getPowerShellConfigAsync, getShellConfig, getShellConfigAsync, getShellEnvAsync, getTempRootDir, hasCallingSessionWork, hasProcessStorageSelection, hasSessionReload, importAfterEvaluation, installHostModuleBridge, invalidSettingMessage, isLongStreamCut, isPowerShellAvailable, isPowerShellAvailableAsync, isProtectedSessionTempDir, isProviderLimitFailure, isProviderRateLimit, isResumeCatalogTimeoutError, isResumeCatalogUnavailableError, isResumeError, isResumeNotFoundError, isResumePreconditionError, isRetryableResumeError, isSelectedNativeMcpTool, isTodoOperationError, isTombstoned, isWorkspace, killChildProcessTree, killProcessTree, killSupervisedProcessTrees, killTrackedDetachedChildren, limitQuitShutdownHandlers, loadTaskOwnTranscriptEntries, loadTaskOwnTranscriptHistory, lockedReferrers, markDetachedChildExited, markNativeMcpToolDefinition, markProviderRateLimitObserved, matchesMcpDirectToolSelection, modelIdForModel, nextRetryDecision, normalizeDerivedSessionEntries, normalizeWorkingRunSnapshot, noteForkCopyRefusal, observeAccountCatalog, observeProviderRateLimits, observedTaskChatWrite, onSessionQuit, ownedSessionManagerStores, ownedSessionPermits, ownedSessionStores, prepareSourceEntries, prepareSourceEntry, previewProcessStorageSelection, previewSessionSettingSelection, processSharedStorageSelection, processSharedStorageSelectionAsync, processStorageEnvironment, processStorageEnvironmentAsync, providerAdmissionTurn, providerCooldownMs, providerIdForModel, providerLimitScope, providerRateLimitObservations, providerRateLimitSnapshot, providerRequestGate, providerRetryHint, providerUnavailableMs, rebuildKillResult, rebuildShellWaitResult, recordNestedToolCalls, recordProviderRateLimit, recordProviderRetryHint, recordProviderSuccess, recordedRepo, reduce, registerSessionRetirement, registerSessionWorkOwner, registerSourceBuiltinLoad, rehydrateResumeError, removeStoredRows, renewSessionWork, repeatsLongStreamCut, requestCompactorOutput, require_Node, require_anchors, require_directives, require_lib, require_semver, resizeImage, resolveModelReference, resolveSessionTempDirPath, restoreAnthropicReplayThinkingBlocks, resumeForkDetaches, retireSessionReloadGeneration, runCommand, runCommandCapture, runCommandSync, runInProgress, runWithConcurrency, sanitizeTempPathComponent, selectChatRowProps, selectDialogProps, selectMultiSelectProps, selectOptionListProps, selectPreviewPaneProps, selectProcessStorage, selectProcessStorageAsync, selectProcessStorageSteps, selectSubmitPickerProps, selectTabBarProps, serializeResumeError, sessionGenerationClosing, sessionLifetime, sessionQuitSignal, setActiveSessionTempId, setCliStorageSelection, setForkCopyRefusalNote, setProviderRequestGate, shouldCompact, showFirstTimeSetup, showStartupInput, showStartupSelector, shutdownDeadline, spawnShellProcess, startParentProcessGuardian, structuredPatch, summarizeQuestions, taskChatPage, taskExtensionStatuses, taskOwnTranscriptEntries, taskTranscriptSource, trackDetachedChildPid, trackDetachedChildProcess, trackSessionReload, trackSessionWork, transformTemplate, tryAdmitProviderRequest, untilShutdownHandlerDeadline, untrackDetachedChildPid, validateProcessStorageAsync, validateQuestionnaire, wakeKeyNamespace, watchTaskExtensionStatuses, watchTaskTranscriptBindings, withBuiltinDiagnostics, withDiscoveredModels, withPersonalizedCatalog, withRemoteCatalog, withTaskChatRows, workspace, wrapLongLines, wrapToolDefinition };
|
|
12279
12487
|
|
|
12280
|
-
//# sourceMappingURL=startup-0-2-
|
|
12488
|
+
//# sourceMappingURL=startup-0-2-5QHPCEON.js.map
|
|
12281
12489
|
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
12282
12490
|
// demand that fails in a process an in-place update left running says to restart.
|
|
12283
12491
|
function __atomicOnDemandFailed(error, feature) {
|
|
12284
12492
|
return (async () => {
|
|
12285
12493
|
const root = new URL("../", import.meta.url);
|
|
12286
12494
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
12287
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
12495
|
+
const key = `${root.href}#0.10.11-alpha.3`;
|
|
12288
12496
|
let release = releases.get(key);
|
|
12289
12497
|
if (release === undefined) {
|
|
12290
12498
|
const current = (async () => {
|
|
@@ -12312,7 +12520,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
12312
12520
|
} catch {
|
|
12313
12521
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
12314
12522
|
}
|
|
12315
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.
|
|
12523
|
+
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;
|
|
12316
12524
|
if (updatedTo === undefined) throw error;
|
|
12317
12525
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
12318
12526
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|