@bastani/atomic 0.10.19 → 0.10.20-alpha.2
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 +72 -0
- package/dist/_shared/adapter-open-DXXV6ATH.js +22 -0
- package/dist/_shared/adapter-open-DXXV6ATH.js.map +1 -0
- 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-JXBZ3H27.js +484 -229
- package/dist/_shared/mode-interactive-sdk-JXBZ3H27.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +63 -16
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/mode-shared-2QJSCUM6.js +61 -16
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
- package/dist/_shared/p0-cli-BB45ZQY6.js +2 -2
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/p1b-elig-BY2G5BUE.js +6 -3
- package/dist/_shared/p1b-elig-BY2G5BUE.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +5 -5
- package/dist/_shared/{sdk-BHX35EPK.js → sdk-5ZFNDXUJ.js} +319 -86
- package/dist/_shared/sdk-5ZFNDXUJ.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +15 -7
- package/dist/_shared/session-data-AHTU7IS6.js.map +1 -1
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/settings-startup-HXQLSUWM.js +2 -2
- package/dist/_shared/settings-startup-HXQLSUWM.js.map +1 -1
- package/dist/_shared/{startup-0-0-4EDVBK5P.js → startup-0-0-OWBJIX35.js} +162 -44
- package/dist/_shared/startup-0-0-OWBJIX35.js.map +1 -0
- package/dist/_shared/{startup-0-1-H5IXVRXQ.js → startup-0-1-DZYE4E5Z.js} +462 -37
- package/dist/_shared/startup-0-1-DZYE4E5Z.js.map +1 -0
- package/dist/_shared/{startup-0-2-YZZOC22D.js → startup-0-2-WFLTE4SC.js} +147 -6
- package/dist/_shared/startup-0-2-WFLTE4SC.js.map +1 -0
- package/dist/_shared/startup-0-3-DE2NCS6A.js +59 -50
- package/dist/_shared/startup-0-3-DE2NCS6A.js.map +1 -1
- package/dist/_shared/{startup-0-4-ZMJV547D.js → startup-0-4-6XXL4JMZ.js} +115 -25
- package/dist/_shared/startup-0-4-6XXL4JMZ.js.map +1 -0
- package/dist/_shared/{startup-0-5-HZX3ZPTP.js → startup-0-5-DNS6FYS7.js} +229 -156
- package/dist/_shared/startup-0-5-DNS6FYS7.js.map +1 -0
- package/dist/_shared/{startup-10-0-TDQNBDDL.js → startup-10-0-O6DAT7U4.js} +131 -162
- package/dist/_shared/startup-10-0-O6DAT7U4.js.map +1 -0
- package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +9 -6
- package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
- package/dist/_shared/{startup-15-0-YUKGAC63.js → startup-15-0-E7RYG5YF.js} +9 -9
- package/dist/_shared/{startup-15-0-YUKGAC63.js.map → startup-15-0-E7RYG5YF.js.map} +1 -1
- package/dist/_shared/startup-15-1-WQZBOTMZ.js +340 -128
- package/dist/_shared/startup-15-1-WQZBOTMZ.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +279 -151
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/{startup-8-1-QZMXUGHI.js → startup-8-1-VXBL37AI.js} +352 -27
- package/dist/_shared/startup-8-1-VXBL37AI.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +15 -273
- package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
- package/dist/_shared/{storage-status-K7PX2RXA.js → storage-status-T6FUXRIM.js} +8 -24
- package/dist/_shared/{storage-status-K7PX2RXA.js.map → storage-status-T6FUXRIM.js.map} +1 -1
- package/dist/_shared/task-reference-stream-JWMUZSJX.js +1 -1
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/team-DOQKICG2.js +4 -3
- package/dist/_shared/team-DOQKICG2.js.map +1 -1
- package/dist/_shared/tree-outline-MUEPK5B7.js +9 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js.map +1 -1
- package/dist/binary-self-update.js +3 -3
- package/dist/builtin/intercom/broker/broker.bundle.mjs +46 -8
- package/dist/builtin/intercom/broker/broker.ts +1 -0
- package/dist/builtin/intercom/broker/client.ts +5 -1
- package/dist/builtin/intercom/broker/departed-children.ts +12 -6
- package/dist/builtin/intercom/broker/ended-child-wakes.ts +2 -0
- package/dist/builtin/intercom/index.bundle.mjs +130 -264
- package/dist/builtin/intercom/message-display.ts +42 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/intercom/types.ts +1 -0
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +99 -20
- package/dist/builtin/web-access/index.bundle.mjs +15 -9
- package/dist/builtin/web-access/package.json +1 -1
- 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 +3 -3
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.code.js +3 -3
- 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 +3 -3
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +2 -2
- package/dist/core/agent-session-runtime.d.ts +16 -4
- package/dist/core/agent-session-types.d.ts +5 -1
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.code.js +74 -72
- package/dist/core/export-html/card-projection.code.js.map +1 -1
- 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 +52 -41
- package/dist/core/export-html/index.code.js.map +1 -1
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.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/template.js +27 -39
- package/dist/core/export-html/tool-renderer.code.js +1 -1
- 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/context-types.d.ts +3 -0
- package/dist/core/extensions/context-types.js.map +1 -1
- 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 +2 -2
- package/dist/core/extensions/runner-context.d.ts +1 -0
- package/dist/core/extensions/runner-context.js +18 -2
- package/dist/core/extensions/runner-context.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runtime-types.d.ts +1 -0
- package/dist/core/extensions/runtime-types.js.map +1 -1
- package/dist/core/intercom-broker-control-host.code.js +1 -1
- 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/model-registry.js +2 -2
- package/dist/core/model-runtime-streaming.d.ts +3 -1
- package/dist/core/model-runtime.d.ts +2 -0
- 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/resume/failure.d.ts +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-claims.d.ts +13 -2
- package/dist/core/session-load-events.d.ts +42 -0
- package/dist/core/session-manager-core.d.ts +17 -2
- package/dist/core/session-manager-core.js +234 -93
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-errors.d.ts +2 -2
- package/dist/core/session-manager-history.d.ts +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 +2 -2
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.code.js +1 -1
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/settings-manager.js +2 -2
- package/dist/core/storage/adapter-open.js +3 -0
- package/dist/core/storage/adapter-open.js.map +1 -0
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +2 -2
- package/dist/core/storage/node-sqlite.js +2 -2
- 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.js +1 -0
- package/dist/core/storage/prefix.js.map +1 -1
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/schema-catalog.d.ts +2 -1
- package/dist/core/storage/schema-catalog.js +25 -6
- package/dist/core/storage/schema-catalog.js.map +1 -1
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +17 -4
- 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 +7 -7
- package/dist/core/storage/session/child-reader.code.js.map +1 -1
- package/dist/core/storage/session/child-reader.d.ts +1 -0
- 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.code.js +1 -1
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +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-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +9 -5
- package/dist/core/storage/session/fork-staging.code.js.map +1 -1
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +29 -13
- package/dist/core/storage/session/fork-window.code.js.map +1 -1
- 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 +8 -4
- 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.d.ts +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/parent-links.d.ts +122 -0
- package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +3 -3
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/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 +5 -6
- package/dist/core/storage/session/snapshot-history.code.js.map +1 -1
- 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 +7 -20
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.code.js +1 -1
- 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 +11 -3
- package/dist/core/storage/session/usage-observations.d.ts +27 -0
- package/dist/core/storage/session/usage-observations.js +3 -0
- package/dist/core/storage/session/usage-observations.js.map +1 -0
- package/dist/core/storage/storage-status.code.js +1 -1
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.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/subscription-usage-identity.d.ts +9 -0
- package/dist/core/subscription-usage-observations.d.ts +15 -0
- package/dist/core/subscription-usage-storage.js +3 -0
- package/dist/core/subscription-usage-storage.js.map +1 -0
- package/dist/core/subscription-usage.d.ts +20 -3
- package/dist/core/tasks/task-completion-entry.code.js +1 -1
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +3 -3
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +5 -5
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.code.js +1 -1
- 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/read-url.code.js +3 -3
- 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.js +2 -2
- 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/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 +12 -7
- package/dist/extensions/codemode/renderer.code.js.map +1 -1
- 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 +6 -3
- package/dist/index.js +10 -10
- 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/index.d.ts +1 -1
- package/dist/modes/interactive/components/intercom-wake-notice.d.ts +4 -0
- package/dist/modes/interactive/components/notice-line.d.ts +1 -1
- package/dist/modes/interactive/components/stored-tree-view.code.js +6 -5
- package/dist/modes/interactive/components/stored-tree-view.code.js.map +1 -1
- 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/tool-block.d.ts +5 -1
- package/dist/modes/interactive/components/user-message-selector-archive.code.js +1 -1
- 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-engine/isolated-runtime.d.ts +4 -3
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +5 -0
- package/dist/modes/rpc/rpc-client.d.ts +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +26 -3
- 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/12.js +1 -1
- package/dist/startup-stages/13.js +2 -1
- package/dist/startup-stages/14.js +1 -0
- package/dist/startup-stages/4.js +1 -1
- package/dist/startup-stages/6.js +1 -1
- package/dist/startup-stages/7.js +1 -1
- package/dist/startup-stages/8.js +1 -1
- package/dist/startup-stages/stages.json +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/docs/.agents/context/DESIGN.md +30 -0
- package/docs/changelog.mdx +46 -0
- package/docs/docs.json +1 -1
- package/docs/extensions/api-reference.md +6 -0
- package/docs/guides/subscription-usage.md +28 -82
- package/docs/intercom.md +3 -1
- package/docs/json.md +3 -3
- package/docs/providers.md +2 -0
- package/docs/reference/cli.md +3 -1
- package/docs/rpc/protocol.md +31 -3
- package/docs/sdk/reference.md +26 -1
- package/docs/sdk.md +2 -0
- package/docs/sessions.md +38 -1
- package/docs/slash-commands.md +1 -1
- package/docs/subagents.md +2 -0
- package/docs/usage.md +1 -1
- package/package.json +8 -8
- package/dist/_shared/sdk-BHX35EPK.js.map +0 -1
- package/dist/_shared/startup-0-0-4EDVBK5P.js.map +0 -1
- package/dist/_shared/startup-0-1-H5IXVRXQ.js.map +0 -1
- package/dist/_shared/startup-0-2-YZZOC22D.js.map +0 -1
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +0 -1
- package/dist/_shared/startup-0-5-HZX3ZPTP.js.map +0 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js.map +0 -1
- package/dist/_shared/startup-8-1-QZMXUGHI.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __commonJSMin, __name, __require, __toESM } from "./rolldown-runtime-BGM3D5V3.js";
|
|
2
2
|
import { APP_NAME, BUILTIN_PACKAGE_DIR_NAMES, CONFIG_DIR_NAME, ENV_AGENT_DIR, ENV_DEBUG, ENV_OFFLINE, ENV_PACKAGE_DIR, ENV_SELF_UPDATE_COMMAND, ENV_SESSION_DIR, ENV_SHARE_VIEWER_URL, ENV_STDIN_TIMEOUT_MS, ENV_TELEMETRY, INSTALLED_EXTENSION_ENTRIES, SOURCE_EXTENSION_ENTRIES, VERSION, createChildProcessEnvironment, createModuleRequire, findHelperExecutableAsync, getAgentDir, getAgentDirs, getBinDir, getEnvValue, getPackageDir, helperLaunchAsync, isBunBinary, isBundledBuild, isChildProcessExitStatusUnknownError, missingHelperOptions, resolvePath, stripBom, waitForChildProcess } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
-
import { BUILTIN_HELP_TOOL_NAMES, BUILTIN_PATH_PREFIX, CountdownTimer, Diff, DynamicBorder, EventSourceError, FORKED_PACKAGE_NAMES, FileToolAbortedError, FramedSelector, GIT_MINIMUM_VERSION, GitProvisionConfigError, GitProvisionTimeoutError, GitUnavailableError, JSON_RPC_ERROR_CODES, LlamaServerRequestError, LlamaServerUnreachableError, MAX_POSITION_LENGTH, MAX_TOOL_DETACHMENT_AFTER_MS, ManagedToolDownloadError, ManagedToolTimeoutError, McpAbortError, McpConnectionClosedError, McpError, McpTimeoutError, ROW_INTENT_META, STALE_EXTENSION_CONTEXT_MESSAGE, SUPPORTED_PROTOCOL_VERSIONS, Stop, SubscriptionClosedError, SubscriptionConfigError, SubscriptionEventError, SubscriptionHandlerError, SubscriptionRecordError, TASK_MARKS, TaskCleanupError, TaskEvictedError, ToolDetachmentError, VALID_THINKING_LEVELS, abortSymbol, applyExifOrientation, applySessionSummaryEntries, asyncScope, attachCleanupCause as attachCleanupCause$1, attachGitCleanupFailure, canWatchProcessUntilHostDies, cancelReasonText, canonicalEventBusFor, captureHerdrEnvironment, clearLockHolderAsync, combineUsage, compactTemplate, compactUrl, createGitEnvironment, createOwnedAbortController, decodeChatOrder, decodeChatRecord, defaultToolNamesFor, deserializeToolDetachmentError, encodeChatOrder, fetchWithRetry, fieldTone, firstChatOrders, flushable, formatSize, formatTodoId, formatTokenCount, getBuiltinPackageLocations, getDefaultCacheRetention, getDefaultSessionDirPath, getFinalValue, getFunctionList, getManyValues, getPiUserAgent, getProviderLoginHelp, getResourcePathKeyAsync, getTodoStatus, getTodoTitle, getToolListError, holdProcessDescendants, isEventSourceError, isExtensionStartupFailure, isFinalValue, isFlushable, isFunctionList, isGitProvisionError, isGitUnavailableError, isInstallTelemetryEnabled, isJsonRpcId, isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse, isManagedToolError, isMandatoryRuntimeTool, isMany, isObject, isPathInside, isStop, isSyntheticPath, isTodoClosed, isTrustedMandatoryRuntimeTool, isValidThinkingLevel, joinForkSegments, leadingAndTrailingWs, leadingWs, lockNamesLocalHolder, lockShared, longestCommonPrefix, longestCommonSuffix, materializeSessionSummaryMetadata, maximumOverlap, mergeReadRanges, none, normalizeDisplayText, normalizeTodoId, normalizeVtText, parseTranscriptFrameLayout, recordLockHolderAsync, registerCanonicalEventBus, removePrefix, removeSuffix, renderToolPath, replacePrefix, replaceSuffix, replaceTabs, reportContained, requestRateLimitsFromHeaders, require_constants, require_debug, require_identity, require_ignore, require_parse_url, require_sha256, require_stringifyNumber, require_util_contains_newline, rowTone, segment, segmentLength, setFunctionList, sharedClockNow, sharedWakeDispatcher, sleep as sleep$1, spanElapsedMs, spawnHostProcess, splitTodosByAssignment, stop, str as str$1, stripFenceMarkers, styleFieldTone, summarizeSession, takeOverDeadHolderAsync, toError, trailingWs, uniquifyToolCallIds, usageWindowsFromCodexEvent, usageWindowsFromHeaders, validQuestionnaire, watchProcessUntilHostDies, withCleanup, withLegacyPackageNames, yieldToEventLoop, yieldTurn } from "./startup-0-0-
|
|
3
|
+
import { BUILTIN_HELP_TOOL_NAMES, BUILTIN_PATH_PREFIX, CountdownTimer, Diff, DynamicBorder, EventSourceError, FORKED_PACKAGE_NAMES, FileToolAbortedError, FramedSelector, GIT_MINIMUM_VERSION, GitProvisionConfigError, GitProvisionTimeoutError, GitUnavailableError, JSON_RPC_ERROR_CODES, LlamaServerRequestError, LlamaServerUnreachableError, MAX_POSITION_LENGTH, MAX_TOOL_DETACHMENT_AFTER_MS, ManagedToolDownloadError, ManagedToolTimeoutError, McpAbortError, McpConnectionClosedError, McpError, McpTimeoutError, ROW_INTENT_META, STALE_EXTENSION_CONTEXT_MESSAGE, SUPPORTED_PROTOCOL_VERSIONS, Stop, SubscriptionClosedError, SubscriptionConfigError, SubscriptionEventError, SubscriptionHandlerError, SubscriptionRecordError, TASK_MARKS, TaskCleanupError, TaskEvictedError, ToolDetachmentError, VALID_THINKING_LEVELS, abortSymbol, applyExifOrientation, applySessionSummaryEntries, asyncScope, attachCleanupCause as attachCleanupCause$1, attachGitCleanupFailure, canWatchProcessUntilHostDies, cancelReasonText, canonicalEventBusFor, captureHerdrEnvironment, clearLockHolderAsync, combineUsage, compactTemplate, compactUrl, createGitEnvironment, createOwnedAbortController, decodeChatOrder, decodeChatRecord, defaultToolNamesFor, deserializeToolDetachmentError, encodeChatOrder, fetchWithRetry, fieldTone, firstChatOrders, flushable, formatSize, formatTodoId, formatTokenCount, getBuiltinPackageLocations, getDefaultCacheRetention, getDefaultSessionDirPath, getFinalValue, getFunctionList, getManyValues, getPiUserAgent, getProviderLoginHelp, getResourcePathKeyAsync, getTodoStatus, getTodoTitle, getToolListError, holdProcessDescendants, isEventSourceError, isExtensionStartupFailure, isFinalValue, isFlushable, isFunctionList, isGitProvisionError, isGitUnavailableError, isInstallTelemetryEnabled, isJsonRpcId, isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse, isManagedToolError, isMandatoryRuntimeTool, isMany, isObject, isPathInside, isStop, isSyntheticPath, isTodoClosed, isTrustedMandatoryRuntimeTool, isValidThinkingLevel, joinForkSegments, leadingAndTrailingWs, leadingWs, lockNamesLocalHolder, lockShared, longestCommonPrefix, longestCommonSuffix, materializeSessionSummaryMetadata, maximumOverlap, mergeReadRanges, none, normalizeDisplayText, normalizeTodoId, normalizeVtText, parseTranscriptFrameLayout, raceWithAbortSignal, recordLockHolderAsync, registerCanonicalEventBus, removePrefix, removeSuffix, renderToolPath, replacePrefix, replaceSuffix, replaceTabs, reportContained, requestRateLimitsFromHeaders, require_constants, require_debug, require_identity, require_ignore, require_parse_url, require_sha256, require_stringifyNumber, require_util_contains_newline, rowTone, segment, segmentLength, setFunctionList, setHistoryLoadObserverLookup, sharedClockNow, sharedWakeDispatcher, sleep as sleep$1, spanElapsedMs, spawnHostProcess, splitTodosByAssignment, stop, str as str$1, stripFenceMarkers, styleFieldTone, summarizeSession, takeOverDeadHolderAsync, toError, trailingWs, uniquifyToolCallIds, usageWindowsFromCodexEvent, usageWindowsFromHeaders, validQuestionnaire, watchProcessUntilHostDies, withCleanup, withLegacyPackageNames, yieldToEventLoop, yieldTurn } from "./startup-0-0-OWBJIX35.js";
|
|
4
4
|
import { CodeHighlighter, OVERLAY_ACTIVE_ROW_MARKER, getLanguageFromPath, graphemeAt, highlightCode, keyHint, loadPhoton, navActionText, navFirstKeyText, parenthesizedKeyHint, rawKeyHint, renderNavHintLine, singleLineDisplayText, terminalDisplayCursor, terminalDisplayText, theme } from "./p2-shell-main-B2WIALFD.js";
|
|
5
5
|
import { extractBearerToken, failureDebugFields, findInCauseChain, hasErrorIdentity, lockHolderAsync, releaseLock, removeLeftoverHolderFilesAsync, reportDebugAsync, serializeErrorCause, takeTakeoverMutexAsync } from "./p1b-elig-BY2G5BUE.js";
|
|
6
6
|
import { windowsPowerShellEnvironment } from "./p1-elig-shell-WWRO3L2R.js";
|
|
@@ -44,7 +44,7 @@ import { storageSchemaCurrent, transactionFinisher } from "../core/storage/added
|
|
|
44
44
|
import { dialectOf } from "../core/storage/dialect.js";
|
|
45
45
|
import * as migrations from "../core/storage/migrations.js";
|
|
46
46
|
import { applyStorageMigrations, ensureStorageSchema, withShortSchemaLockWaits } from "../core/storage/migrations.js";
|
|
47
|
-
import { schemaCatalogOf } from "../core/storage/schema-catalog.js";
|
|
47
|
+
import { schemaCatalogOf, withStorageSchemaCatalog } from "../core/storage/schema-catalog.js";
|
|
48
48
|
import { queueSqliteSchemaSetup } from "../core/storage/sqlite-open-batch.js";
|
|
49
49
|
import { sequenceRunner } from "../core/storage/statement-sequence.js";
|
|
50
50
|
import { TextDecoder as TextDecoder$1 } from "util";
|
|
@@ -282,7 +282,7 @@ ${chalk.bold("Commands:")}
|
|
|
282
282
|
${APP_NAME} auth <command> Log in or out, print credentials, or check provider readiness
|
|
283
283
|
${APP_NAME} mcp <command> Configure MCP servers, check connections, and sign in
|
|
284
284
|
${APP_NAME} storage <command> Show storage selections and connectivity, or join a shared database
|
|
285
|
-
${APP_NAME} usage [--json] Show
|
|
285
|
+
${APP_NAME} usage [--json] Show usage for signed-in accounts
|
|
286
286
|
${APP_NAME} team <command> Show the storage layout in effect (individual, team, ci or custom)
|
|
287
287
|
${APP_NAME} intercom <command> Show or restart this machine's Intercom broker
|
|
288
288
|
${APP_NAME} blueprint cache-key Print cache keys and paths for a runner's cache action (actions/cache)
|
|
@@ -3190,6 +3190,310 @@ var SessionKeyDigests = class {
|
|
|
3190
3190
|
return this.packed().toString("base64");
|
|
3191
3191
|
}
|
|
3192
3192
|
};
|
|
3193
|
+
// dist/core/storage/session/parent-links.js
|
|
3194
|
+
/** An explicit root and a genuinely omitted receipt parent are not damage. */
|
|
3195
|
+
function parentLinkDisposition(entry, parentWasEarlier, parentIsKnown) {
|
|
3196
|
+
if (entry.parentId == null) return "root";
|
|
3197
|
+
if (entry.parentId === entry.id) return "broken";
|
|
3198
|
+
if (parentWasEarlier) return "earlier";
|
|
3199
|
+
return !parentIsKnown && isDetachedReceipt(entry) ? "detached" : "broken";
|
|
3200
|
+
}
|
|
3201
|
+
var SessionInvalidParentError = class extends Error {
|
|
3202
|
+
entryId;
|
|
3203
|
+
parentId;
|
|
3204
|
+
reason;
|
|
3205
|
+
constructor(entryId, parentId, reason) {
|
|
3206
|
+
const explanation = reason === "self" ? "an entry cannot be its own parent" : reason === "later" ? "the parent was recorded later" : "no entry with this ID exists in the session";
|
|
3207
|
+
super(`Damaged history link on entry ${JSON.stringify(entryId)}: parent ${JSON.stringify(parentId)}; ${explanation}.`);
|
|
3208
|
+
this.name = "SessionInvalidParentError";
|
|
3209
|
+
this.entryId = entryId;
|
|
3210
|
+
this.parentId = parentId;
|
|
3211
|
+
this.reason = reason;
|
|
3212
|
+
}
|
|
3213
|
+
};
|
|
3214
|
+
/** A trimmed fork may copy a tool-output receipt but leave its original parent behind. */
|
|
3215
|
+
function isDetachedReceipt(entry) {
|
|
3216
|
+
if (entry.type !== "custom" || entry.customType !== "atomic.tool-output") return false;
|
|
3217
|
+
const hash = entry.data?.hash;
|
|
3218
|
+
return typeof hash === "string" && /^[0-9a-f]{64}$/.test(hash);
|
|
3219
|
+
}
|
|
3220
|
+
function invalidSessionParent(entry, position, parentPosition) {
|
|
3221
|
+
const { id, parentId } = entry;
|
|
3222
|
+
if (parentId === null || parentLinkDisposition(entry, isEarlierSessionEntry(parentPosition, position), parentPosition !== void 0) !== "broken") return void 0;
|
|
3223
|
+
if (parentId === id) return new SessionInvalidParentError(id, parentId, "self");
|
|
3224
|
+
return new SessionInvalidParentError(id, parentId, parentPosition === void 0 ? "absent" : "later");
|
|
3225
|
+
}
|
|
3226
|
+
var SessionDuplicateEntryError = class extends Error {
|
|
3227
|
+
entryId;
|
|
3228
|
+
constructor(entryId) {
|
|
3229
|
+
super(`Duplicate history entry ID ${JSON.stringify(entryId)} in the same session.`);
|
|
3230
|
+
this.name = "SessionDuplicateEntryError";
|
|
3231
|
+
this.entryId = entryId;
|
|
3232
|
+
}
|
|
3233
|
+
};
|
|
3234
|
+
function describeSessionParentRepairs(repaired) {
|
|
3235
|
+
if (repaired.length === 0) return void 0;
|
|
3236
|
+
const changes = repaired.map((repair) => {
|
|
3237
|
+
const entry = `${repair.source === "file" ? "imported " : repair.source === "storage" ? "saved " : ""}${JSON.stringify(repair.sessionId)} entry ${JSON.stringify(repair.entryId)}`;
|
|
3238
|
+
if (repair.kind === "entry_id") return `${entry} (changed ID to ${JSON.stringify(repair.newEntryId)})`;
|
|
3239
|
+
return repair.newParentId === null ? `${entry} (removed broken parent ${JSON.stringify(repair.parentId)} from the first entry)` : `${entry} (reattached to ${JSON.stringify(repair.newParentId)} instead of ${JSON.stringify(repair.parentId)})`;
|
|
3240
|
+
});
|
|
3241
|
+
return `Repaired ${changes.length} history ${changes.length === 1 ? "problem" : "problems"}: ${changes.join(", ")}.`;
|
|
3242
|
+
}
|
|
3243
|
+
function newSessionEntryPositions(entries, after = 0) {
|
|
3244
|
+
const positions = /* @__PURE__ */ new Map();
|
|
3245
|
+
for (const { id } of entries) {
|
|
3246
|
+
if (positions.has(id)) throw new SessionDuplicateEntryError(id);
|
|
3247
|
+
positions.set(id, ++after);
|
|
3248
|
+
}
|
|
3249
|
+
return positions;
|
|
3250
|
+
}
|
|
3251
|
+
const noEntry = (_id) => void 0;
|
|
3252
|
+
const noDetachedParents = /* @__PURE__ */ new Map();
|
|
3253
|
+
function assertWriteParent(parentId) {
|
|
3254
|
+
if (parentId !== null && typeof parentId !== "string") throw new TypeError("Session entry parentId must be a string or null.");
|
|
3255
|
+
}
|
|
3256
|
+
/** Check a batch against its session's recorded cut, returning only the newly reserved IDs. */
|
|
3257
|
+
function validateSessionParentWrites(entries, after = 0, seqOf = noEntry, detachedParents = noDetachedParents) {
|
|
3258
|
+
const positions = newSessionEntryPositions(entries, after);
|
|
3259
|
+
for (const id of positions.keys()) {
|
|
3260
|
+
if (seqOf(id) !== void 0) throw new SessionDuplicateEntryError(id);
|
|
3261
|
+
const detached = detachedParents.get(id);
|
|
3262
|
+
if (detached !== void 0) throw new SessionInvalidParentError(detached, id, "later");
|
|
3263
|
+
}
|
|
3264
|
+
let reserved;
|
|
3265
|
+
for (const [index, entry] of entries.entries()) {
|
|
3266
|
+
const { id, parentId } = entry;
|
|
3267
|
+
assertWriteParent(parentId);
|
|
3268
|
+
if (parentId === null) continue;
|
|
3269
|
+
const parent = positions.get(parentId) ?? seqOf(parentId);
|
|
3270
|
+
const error = invalidSessionParent(entry, after + index + 1, parent);
|
|
3271
|
+
if (error !== void 0) throw error;
|
|
3272
|
+
if (parent === void 0) {
|
|
3273
|
+
reserved ??= /* @__PURE__ */ new Map();
|
|
3274
|
+
reserved.set(parentId, id);
|
|
3275
|
+
}
|
|
3276
|
+
}
|
|
3277
|
+
return reserved;
|
|
3278
|
+
}
|
|
3279
|
+
/** The facts a file-backed writer needs from the recorded rows, including ones an older client wrote. */
|
|
3280
|
+
var SessionParentIndex = class {
|
|
3281
|
+
positions = /* @__PURE__ */ new Map();
|
|
3282
|
+
detached = /* @__PURE__ */ new Map();
|
|
3283
|
+
constructor(entries = []) {
|
|
3284
|
+
for (const [index, entry] of entries.entries()) this.note(entry, index + 1);
|
|
3285
|
+
}
|
|
3286
|
+
note({ id, parentId }, seq, previous) {
|
|
3287
|
+
this.detached.delete(id);
|
|
3288
|
+
this.positions.set(id, seq);
|
|
3289
|
+
if (parentId != null && !this.positions.has(parentId) && !previous?.has(parentId)) this.detached.set(parentId, id);
|
|
3290
|
+
}
|
|
3291
|
+
};
|
|
3292
|
+
/** Resolve raw IDs in recorded order, before replacing them with their unique stored addresses. */
|
|
3293
|
+
var SessionParentRepairer = class {
|
|
3294
|
+
repaired = [];
|
|
3295
|
+
latest = /* @__PURE__ */ new Map();
|
|
3296
|
+
taken = /* @__PURE__ */ new Set();
|
|
3297
|
+
detached = /* @__PURE__ */ new Set();
|
|
3298
|
+
sessionId;
|
|
3299
|
+
seenBefore;
|
|
3300
|
+
previouslyDetached;
|
|
3301
|
+
incoming;
|
|
3302
|
+
reserved;
|
|
3303
|
+
previousId;
|
|
3304
|
+
constructor(sessionId, seqOf = noEntry, detached = noDetachedParents, incoming, reserved, previousId = null) {
|
|
3305
|
+
this.sessionId = sessionId;
|
|
3306
|
+
this.seenBefore = seqOf;
|
|
3307
|
+
this.previouslyDetached = detached;
|
|
3308
|
+
this.incoming = incoming;
|
|
3309
|
+
this.reserved = reserved;
|
|
3310
|
+
this.previousId = previousId;
|
|
3311
|
+
}
|
|
3312
|
+
repair(entry, seq, parentRecordedLater) {
|
|
3313
|
+
let { id, parentId } = entry;
|
|
3314
|
+
assertWriteParent(parentId);
|
|
3315
|
+
if (this.inUse(id)) {
|
|
3316
|
+
for (let attempt = 0;; attempt++) {
|
|
3317
|
+
const digest = (0, import_sha256.hash)(new TextEncoder().encode(JSON.stringify([
|
|
3318
|
+
id,
|
|
3319
|
+
seq,
|
|
3320
|
+
attempt
|
|
3321
|
+
])));
|
|
3322
|
+
const fresh = `repair-${Array.from(digest.subarray(0, 16), (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
|
|
3323
|
+
if (this.incoming?.has(fresh) || this.reserved?.has(fresh) || this.inUse(fresh)) continue;
|
|
3324
|
+
id = fresh;
|
|
3325
|
+
break;
|
|
3326
|
+
}
|
|
3327
|
+
this.repaired.push({
|
|
3328
|
+
kind: "entry_id",
|
|
3329
|
+
sessionId: this.sessionId,
|
|
3330
|
+
entryId: entry.id,
|
|
3331
|
+
newEntryId: id
|
|
3332
|
+
});
|
|
3333
|
+
}
|
|
3334
|
+
if (parentId !== null) {
|
|
3335
|
+
const parent = this.latest.get(parentId) ?? (this.seenBefore(parentId) === void 0 ? void 0 : parentId);
|
|
3336
|
+
switch (parentLinkDisposition(entry, parent !== void 0, parent !== void 0 || parentRecordedLater === true || this.incoming?.has(parentId) === true)) {
|
|
3337
|
+
case "detached":
|
|
3338
|
+
this.detached.add(parentId);
|
|
3339
|
+
break;
|
|
3340
|
+
case "earlier":
|
|
3341
|
+
parentId = parent;
|
|
3342
|
+
break;
|
|
3343
|
+
case "broken": parentId = this.previousId;
|
|
3344
|
+
}
|
|
3345
|
+
if (entry.parentId !== parentId) this.repaired.push({
|
|
3346
|
+
kind: "parent",
|
|
3347
|
+
sessionId: this.sessionId,
|
|
3348
|
+
entryId: id,
|
|
3349
|
+
parentId: entry.parentId,
|
|
3350
|
+
newParentId: parentId
|
|
3351
|
+
});
|
|
3352
|
+
}
|
|
3353
|
+
this.latest.set(entry.id, id);
|
|
3354
|
+
this.taken.add(id);
|
|
3355
|
+
this.previousId = id;
|
|
3356
|
+
return id === entry.id && parentId === entry.parentId ? entry : {
|
|
3357
|
+
...entry,
|
|
3358
|
+
id,
|
|
3359
|
+
parentId
|
|
3360
|
+
};
|
|
3361
|
+
}
|
|
3362
|
+
inUse(id) {
|
|
3363
|
+
return this.taken.has(id) || this.detached.has(id) || this.previouslyDetached.get(id) !== void 0 || this.seenBefore(id) !== void 0;
|
|
3364
|
+
}
|
|
3365
|
+
};
|
|
3366
|
+
function repairSessionParentWrites(sessionId, entries) {
|
|
3367
|
+
return repairParentBatch(sessionId, entries);
|
|
3368
|
+
}
|
|
3369
|
+
/** An append must supply its recorded prefix, including the predecessor of its first row. */
|
|
3370
|
+
function repairAppendedSessionParents(sessionId, entries, prefix) {
|
|
3371
|
+
return repairParentBatch(sessionId, entries, prefix);
|
|
3372
|
+
}
|
|
3373
|
+
function repairParentBatch(sessionId, entries, prefix) {
|
|
3374
|
+
const after = prefix?.lastSeq ?? 0;
|
|
3375
|
+
const seqOf = prefix?.seqOf ?? noEntry;
|
|
3376
|
+
const detachedParents = prefix?.detachedParents ?? noDetachedParents;
|
|
3377
|
+
try {
|
|
3378
|
+
validateSessionParentWrites(entries, after, seqOf, detachedParents);
|
|
3379
|
+
return {
|
|
3380
|
+
entries,
|
|
3381
|
+
repaired: []
|
|
3382
|
+
};
|
|
3383
|
+
} catch (error) {
|
|
3384
|
+
if (!(error instanceof SessionInvalidParentError || error instanceof SessionDuplicateEntryError)) throw error;
|
|
3385
|
+
}
|
|
3386
|
+
const repairer = new SessionParentRepairer(sessionId, seqOf, detachedParents, new Set(entries.map(({ id }) => id)), new Set(entries.flatMap(({ parentId }) => parentId === null ? [] : [parentId])), prefix === void 0 ? null : prefix.lastEntryId);
|
|
3387
|
+
return {
|
|
3388
|
+
entries: entries.map((entry, index) => repairer.repair(entry, after + index + 1)),
|
|
3389
|
+
repaired: repairer.repaired
|
|
3390
|
+
};
|
|
3391
|
+
}
|
|
3392
|
+
const prepareImportedSessionParents = repairSessionParentWrites;
|
|
3393
|
+
function repairedWriteResult(result) {
|
|
3394
|
+
return result.repaired.length === 0 ? {} : result;
|
|
3395
|
+
}
|
|
3396
|
+
/** A repair of copied bytes replaces their link fields, not their potentially oversized payload. */
|
|
3397
|
+
function pairedForkEntry(row, entry) {
|
|
3398
|
+
if (row.entry === entry) return row;
|
|
3399
|
+
return {
|
|
3400
|
+
...row,
|
|
3401
|
+
entry,
|
|
3402
|
+
stored: void 0,
|
|
3403
|
+
...row.reference === void 0 ? {} : { edits: {
|
|
3404
|
+
...row.edits,
|
|
3405
|
+
id: entry.id,
|
|
3406
|
+
parentId: entry.parentId
|
|
3407
|
+
} }
|
|
3408
|
+
};
|
|
3409
|
+
}
|
|
3410
|
+
/** Only an entry recorded before its child can be a parent. Zero is the position before the first entry. */
|
|
3411
|
+
function isEarlierSessionEntry(parent, child) {
|
|
3412
|
+
return parent !== void 0 && parent > 0 && parent < child;
|
|
3413
|
+
}
|
|
3414
|
+
/** Next address in a reverse scan. The scan itself can only match it on an earlier row. */
|
|
3415
|
+
function parentIdInEarlierRows(entry) {
|
|
3416
|
+
return entry.parentId !== entry.id ? entry.parentId ?? null : null;
|
|
3417
|
+
}
|
|
3418
|
+
/** Track receipts that are detached only if the rest of the recorded history never names their parent. */
|
|
3419
|
+
var LaterSessionParents = class {
|
|
3420
|
+
pending;
|
|
3421
|
+
note(parentId, seq) {
|
|
3422
|
+
this.pending ??= /* @__PURE__ */ new Map();
|
|
3423
|
+
const rows = this.pending.get(parentId);
|
|
3424
|
+
if (rows === void 0) this.pending.set(parentId, [seq]);
|
|
3425
|
+
else rows.push(seq);
|
|
3426
|
+
}
|
|
3427
|
+
found(id) {
|
|
3428
|
+
const rows = this.pending?.get(id);
|
|
3429
|
+
if (rows !== void 0) this.pending.delete(id);
|
|
3430
|
+
return rows;
|
|
3431
|
+
}
|
|
3432
|
+
};
|
|
3433
|
+
function sessionEntryPositions(entries) {
|
|
3434
|
+
const positions = /* @__PURE__ */ new Map();
|
|
3435
|
+
let position = 0;
|
|
3436
|
+
for (const { id } of entries) positions.set(id, ++position);
|
|
3437
|
+
return positions;
|
|
3438
|
+
}
|
|
3439
|
+
/** Each row records the latest matching row that has already occurred, never a duplicate later in the file. */
|
|
3440
|
+
function recordedSessionParents(entries) {
|
|
3441
|
+
const positions = /* @__PURE__ */ new Map();
|
|
3442
|
+
let allPositions;
|
|
3443
|
+
let damaged = false;
|
|
3444
|
+
const parents = [];
|
|
3445
|
+
for (const [index, entry] of entries.entries()) {
|
|
3446
|
+
const { id, parentId } = entry;
|
|
3447
|
+
const earlier = parentId == null ? void 0 : positions.get(parentId);
|
|
3448
|
+
let known = earlier !== void 0;
|
|
3449
|
+
if (!known && parentId != null && isDetachedReceipt(entry)) {
|
|
3450
|
+
allPositions ??= sessionEntryPositions(entries);
|
|
3451
|
+
known = allPositions.has(parentId);
|
|
3452
|
+
}
|
|
3453
|
+
const link = parentLinkDisposition(entry, earlier !== void 0, known);
|
|
3454
|
+
parents.push(link === "earlier" ? earlier : link === "broken" ? index : 0);
|
|
3455
|
+
damaged ||= link === "broken" || positions.has(id);
|
|
3456
|
+
positions.set(id, index + 1);
|
|
3457
|
+
}
|
|
3458
|
+
return {
|
|
3459
|
+
positions,
|
|
3460
|
+
parents,
|
|
3461
|
+
damaged
|
|
3462
|
+
};
|
|
3463
|
+
}
|
|
3464
|
+
function recordedSessionBranch(entries, leafId) {
|
|
3465
|
+
const { positions, parents } = recordedSessionParents(entries);
|
|
3466
|
+
const branch = [];
|
|
3467
|
+
for (let seq = positions.get(leafId) ?? 0; seq > 0; seq = parents[seq - 1]) branch.push(entries[seq - 1]);
|
|
3468
|
+
return branch.reverse();
|
|
3469
|
+
}
|
|
3470
|
+
function sessionParent(entry, getEntry, positionOf, link, entryAt) {
|
|
3471
|
+
const child = positionOf(entry.id);
|
|
3472
|
+
if (child === void 0) return void 0;
|
|
3473
|
+
const parent = entry.parentId == null ? void 0 : getEntry(entry.parentId);
|
|
3474
|
+
const disposition = parentLinkDisposition(entry, parent !== void 0 && isEarlierSessionEntry(positionOf(parent.id), child), parent !== void 0);
|
|
3475
|
+
if (disposition === "earlier") return parent;
|
|
3476
|
+
if (link !== void 0 && isEarlierSessionEntry(positionOf(link), child)) return getEntry(link);
|
|
3477
|
+
return disposition === "broken" ? entryAt?.(child - 1) : void 0;
|
|
3478
|
+
}
|
|
3479
|
+
/** The position decreases strictly on each step, so each recorded entry is visited at most once. */
|
|
3480
|
+
function* walkSessionParents(first, getEntry, positionOf, links, entryAt) {
|
|
3481
|
+
for (let entry = first; entry !== void 0; entry = sessionParent(entry, getEntry, positionOf, links?.get(entry.id), entryAt)) yield entry;
|
|
3482
|
+
}
|
|
3483
|
+
function hasDamagedHistoryLinks(entries) {
|
|
3484
|
+
return recordedSessionParents(entries).damaged;
|
|
3485
|
+
}
|
|
3486
|
+
function damagedHistoryWarning(sessionId) {
|
|
3487
|
+
return {
|
|
3488
|
+
type: "session_history_warning",
|
|
3489
|
+
code: "damaged_parent_links",
|
|
3490
|
+
sessionId,
|
|
3491
|
+
warningMessage: `Session ${sessionId} has damaged history links. Entries with broken links are shown after the entries recorded just before them.`
|
|
3492
|
+
};
|
|
3493
|
+
}
|
|
3494
|
+
function warnDamagedHistoryLinks(sessionId) {
|
|
3495
|
+
process.emitWarning(damagedHistoryWarning(sessionId).warningMessage, { code: "ATOMIC_SESSION_HISTORY_LINKS" });
|
|
3496
|
+
}
|
|
3193
3497
|
// dist/core/workspace/errors.js
|
|
3194
3498
|
/**
|
|
3195
3499
|
* The workspace error family: worktree snapshot capture, restore and drift (#4245), snapshot blob collection (#4355),
|
|
@@ -15863,6 +16167,18 @@ function openEventSubscription(input) {
|
|
|
15863
16167
|
}
|
|
15864
16168
|
};
|
|
15865
16169
|
}
|
|
16170
|
+
// dist/core/session-history-progress.js
|
|
16171
|
+
const observer = asyncScope();
|
|
16172
|
+
setHistoryLoadObserverLookup(() => observer.getStore()?.current);
|
|
16173
|
+
/** Keeps a foreground session load from displaying counts from concurrent background reads. */
|
|
16174
|
+
async function withHistoryLoadObserver(next, run) {
|
|
16175
|
+
const scope = { current: next };
|
|
16176
|
+
try {
|
|
16177
|
+
return await observer.run(scope, run);
|
|
16178
|
+
} finally {
|
|
16179
|
+
scope.current = void 0;
|
|
16180
|
+
}
|
|
16181
|
+
}
|
|
15866
16182
|
// dist/extensions/llama/client.js
|
|
15867
16183
|
function errorMessage(payload, fallback) {
|
|
15868
16184
|
if (typeof payload !== "object" || payload === null) return fallback;
|
|
@@ -17934,10 +18250,121 @@ function createProviderAlias(config, resolve) {
|
|
|
17934
18250
|
if (source.classify) alias.classify = async (model, context, options) => withProvider(await resolve().classify(sourceModel(model), context, aliasOptions(options, model)), config.id);
|
|
17935
18251
|
return alias;
|
|
17936
18252
|
}
|
|
18253
|
+
// dist/core/storage/session/usage-observations.js
|
|
18254
|
+
const WRITE_LOCK_WAIT_MS = 100;
|
|
18255
|
+
const CLOSE_DRAIN_MS = 500;
|
|
18256
|
+
const MAX_PENDING_ACCOUNTS = 64;
|
|
18257
|
+
const catalogCheck = migrations;
|
|
18258
|
+
/** Best-effort usage writes never enter the model request's promise chain. */
|
|
18259
|
+
var UsageObservationStore = class {
|
|
18260
|
+
initialized;
|
|
18261
|
+
pending = /* @__PURE__ */ new Map();
|
|
18262
|
+
writing;
|
|
18263
|
+
table;
|
|
18264
|
+
ledger;
|
|
18265
|
+
database;
|
|
18266
|
+
constructor(database, prefix) {
|
|
18267
|
+
this.database = database;
|
|
18268
|
+
validateStoragePrefix(prefix, dialectOf(database).name);
|
|
18269
|
+
this.table = renderStorageIdentifiers("sessions", { usage: "usage_observations" }, prefix).usage;
|
|
18270
|
+
this.ledger = storageMigrationTable(prefix);
|
|
18271
|
+
}
|
|
18272
|
+
initialize() {
|
|
18273
|
+
const dialect = dialectOf(this.database);
|
|
18274
|
+
const schema = {
|
|
18275
|
+
ledger: this.ledger,
|
|
18276
|
+
domain: "usage-observations",
|
|
18277
|
+
revision: 1
|
|
18278
|
+
};
|
|
18279
|
+
this.initialized ??= (async () => {
|
|
18280
|
+
if (catalogCheck.storageSchemaCurrent && await withStorageSchemaCatalog(this.database, this.ledger, () => catalogCheck.storageSchemaCurrent(this.database, schema))) return;
|
|
18281
|
+
await this.database.transaction((tx) => migrations.ensureStorageSchema(tx, dialect, schema, () => tx.exec(`CREATE TABLE IF NOT EXISTS ${this.table} (
|
|
18282
|
+
account_key ${dialect.types.text} PRIMARY KEY NOT NULL,
|
|
18283
|
+
observed_at ${dialect.types.int} NOT NULL,
|
|
18284
|
+
details ${dialect.types.text} NOT NULL
|
|
18285
|
+
)${dialect.withoutRowidTableOptions}`)), {
|
|
18286
|
+
lockWaitMs: WRITE_LOCK_WAIT_MS,
|
|
18287
|
+
concurrency: {
|
|
18288
|
+
kind: "serial",
|
|
18289
|
+
domain: this.table
|
|
18290
|
+
}
|
|
18291
|
+
});
|
|
18292
|
+
})().catch((error) => {
|
|
18293
|
+
this.initialized = void 0;
|
|
18294
|
+
throw error;
|
|
18295
|
+
});
|
|
18296
|
+
return this.initialized;
|
|
18297
|
+
}
|
|
18298
|
+
async read(key) {
|
|
18299
|
+
try {
|
|
18300
|
+
const row = await this.database.get(`SELECT observed_at, details FROM ${this.table} WHERE account_key = ?`, key);
|
|
18301
|
+
return row && {
|
|
18302
|
+
observedAt: Number(row.observed_at),
|
|
18303
|
+
details: JSON.parse(row.details)
|
|
18304
|
+
};
|
|
18305
|
+
} catch {
|
|
18306
|
+
return;
|
|
18307
|
+
}
|
|
18308
|
+
}
|
|
18309
|
+
/** Only a normalized observation and its non-secret account key leave this process. */
|
|
18310
|
+
async write(key, { observedAt, details }) {
|
|
18311
|
+
await this.initialize();
|
|
18312
|
+
const sql = `INSERT INTO ${this.table} (account_key, observed_at, details) VALUES (?, ?, ?)
|
|
18313
|
+
ON CONFLICT (account_key) DO UPDATE SET observed_at = excluded.observed_at, details = excluded.details
|
|
18314
|
+
WHERE excluded.observed_at > ${this.table}.observed_at`;
|
|
18315
|
+
const params = [
|
|
18316
|
+
key,
|
|
18317
|
+
observedAt,
|
|
18318
|
+
JSON.stringify(details)
|
|
18319
|
+
];
|
|
18320
|
+
if (this.database.batch) await this.database.batch([{
|
|
18321
|
+
sql,
|
|
18322
|
+
params
|
|
18323
|
+
}], { lockWaitMs: WRITE_LOCK_WAIT_MS });
|
|
18324
|
+
else await this.database.transaction((tx) => tx.run(sql, ...params), {
|
|
18325
|
+
lockWaitMs: WRITE_LOCK_WAIT_MS,
|
|
18326
|
+
concurrency: {
|
|
18327
|
+
kind: "serial",
|
|
18328
|
+
domain: this.table
|
|
18329
|
+
}
|
|
18330
|
+
});
|
|
18331
|
+
}
|
|
18332
|
+
async drain() {
|
|
18333
|
+
if (this.writing) await raceWithAbortSignal(this.writing, AbortSignal.timeout(CLOSE_DRAIN_MS)).catch(() => {});
|
|
18334
|
+
}
|
|
18335
|
+
enqueue(slot, observation) {
|
|
18336
|
+
if (!this.pending.has(slot) && this.pending.size >= MAX_PENDING_ACCOUNTS) return;
|
|
18337
|
+
this.pending.set(slot, observation);
|
|
18338
|
+
if (this.writing) return;
|
|
18339
|
+
this.writing = new Promise((resolve) => setImmediate(resolve)).then(async () => {
|
|
18340
|
+
while (this.pending.size) {
|
|
18341
|
+
const [slot, next] = this.pending.entries().next().value;
|
|
18342
|
+
this.pending.delete(slot);
|
|
18343
|
+
try {
|
|
18344
|
+
const row = await next();
|
|
18345
|
+
if (row) await this.write(...row);
|
|
18346
|
+
} catch {}
|
|
18347
|
+
}
|
|
18348
|
+
this.writing = void 0;
|
|
18349
|
+
});
|
|
18350
|
+
}
|
|
18351
|
+
};
|
|
18352
|
+
const observationStores = /* @__PURE__ */ new WeakMap();
|
|
18353
|
+
function usageObservationStore(owner) {
|
|
18354
|
+
return observationStores.get(owner);
|
|
18355
|
+
}
|
|
18356
|
+
function setUsageObservationStore(owner, store) {
|
|
18357
|
+
if (store) observationStores.set(owner, store);
|
|
18358
|
+
}
|
|
17937
18359
|
// dist/core/subscription-usage-observations.js
|
|
17938
|
-
const
|
|
18360
|
+
const MAX_LOCAL_OBSERVATIONS = 128;
|
|
17939
18361
|
const observations = /* @__PURE__ */ new Map();
|
|
17940
18362
|
const directObservations = /* @__PURE__ */ new Map();
|
|
18363
|
+
function record(map, key, observation) {
|
|
18364
|
+
map.delete(key);
|
|
18365
|
+
map.set(key, observation);
|
|
18366
|
+
if (map.size > MAX_LOCAL_OBSERVATIONS) map.delete(map.keys().next().value);
|
|
18367
|
+
}
|
|
17941
18368
|
function subscriptionCredentialKey(provider, token) {
|
|
17942
18369
|
return createHash("sha256").update(`${provider}\0${token}`).digest("hex");
|
|
17943
18370
|
}
|
|
@@ -17945,7 +18372,7 @@ function subscriptionBearer(auth) {
|
|
|
17945
18372
|
const authorization = Object.entries(auth.headers ?? {}).find(([name]) => name.toLowerCase() === "authorization")?.[1];
|
|
17946
18373
|
return authorization == null ? auth.apiKey : extractBearerToken(authorization);
|
|
17947
18374
|
}
|
|
17948
|
-
function observeSubscriptionUsage(model, auth, headers) {
|
|
18375
|
+
function observeSubscriptionUsage(model, auth, headers, publish) {
|
|
17949
18376
|
let origin;
|
|
17950
18377
|
try {
|
|
17951
18378
|
origin = new URL(model.baseUrl).origin;
|
|
@@ -17958,15 +18385,15 @@ function observeSubscriptionUsage(model, auth, headers) {
|
|
|
17958
18385
|
if (!token) return;
|
|
17959
18386
|
const windows = usageWindowsFromHeaders(provider, headers);
|
|
17960
18387
|
if (!windows.length) return;
|
|
17961
|
-
const
|
|
17962
|
-
|
|
17963
|
-
|
|
17964
|
-
|
|
17965
|
-
|
|
17966
|
-
|
|
18388
|
+
const observation = {
|
|
18389
|
+
observedAt: Date.now(),
|
|
18390
|
+
details: { windows }
|
|
18391
|
+
};
|
|
18392
|
+
record(observations, subscriptionCredentialKey(provider, token), observation);
|
|
18393
|
+
publish?.(provider, observation);
|
|
17967
18394
|
}
|
|
17968
|
-
/** The direct API grant has no usage endpoint. Keep only
|
|
17969
|
-
function openAiDirectUsageObserver(model, auth) {
|
|
18395
|
+
/** The direct API grant has no usage endpoint. Keep only normalized figures from ordinary model calls. */
|
|
18396
|
+
function openAiDirectUsageObserver(model, auth, publish) {
|
|
17970
18397
|
try {
|
|
17971
18398
|
if (new URL(model.baseUrl).origin !== "https://api.openai.com") return void 0;
|
|
17972
18399
|
} catch {
|
|
@@ -17975,41 +18402,39 @@ function openAiDirectUsageObserver(model, auth) {
|
|
|
17975
18402
|
const token = subscriptionBearer(auth);
|
|
17976
18403
|
if (!token) return void 0;
|
|
17977
18404
|
const key = subscriptionCredentialKey("openai-direct", token);
|
|
18405
|
+
const save = (observedAt, details) => {
|
|
18406
|
+
record(directObservations, model.provider, {
|
|
18407
|
+
key,
|
|
18408
|
+
observedAt,
|
|
18409
|
+
details
|
|
18410
|
+
});
|
|
18411
|
+
publish?.("openai-direct", {
|
|
18412
|
+
observedAt,
|
|
18413
|
+
details
|
|
18414
|
+
});
|
|
18415
|
+
};
|
|
17978
18416
|
return {
|
|
17979
18417
|
headers(headers) {
|
|
17980
18418
|
const observedAt = Date.now();
|
|
17981
18419
|
const windows = usageWindowsFromHeaders("codex", headers);
|
|
17982
18420
|
const rateLimits = windows.length ? [] : requestRateLimitsFromHeaders(headers, observedAt);
|
|
17983
|
-
if (windows.length || rateLimits.length)
|
|
17984
|
-
|
|
17985
|
-
|
|
17986
|
-
details: {
|
|
17987
|
-
windows,
|
|
17988
|
-
...rateLimits.length ? { rateLimits } : {}
|
|
17989
|
-
}
|
|
18421
|
+
if (windows.length || rateLimits.length) save(observedAt, {
|
|
18422
|
+
windows,
|
|
18423
|
+
...rateLimits.length ? { rateLimits } : {}
|
|
17990
18424
|
});
|
|
17991
18425
|
},
|
|
17992
18426
|
streamEvent(event) {
|
|
17993
18427
|
const windows = usageWindowsFromCodexEvent(event);
|
|
17994
|
-
if (windows.length)
|
|
17995
|
-
key,
|
|
17996
|
-
observedAt: Date.now(),
|
|
17997
|
-
details: { windows }
|
|
17998
|
-
});
|
|
18428
|
+
if (windows.length) save(Date.now(), { windows });
|
|
17999
18429
|
}
|
|
18000
18430
|
};
|
|
18001
18431
|
}
|
|
18002
18432
|
function observedOpenAiDirectUsage(provider, token) {
|
|
18003
18433
|
const entry = directObservations.get(provider);
|
|
18004
|
-
return entry?.key === subscriptionCredentialKey("openai-direct", token) ?
|
|
18005
|
-
observedAt: new Date(entry.observedAt).toISOString(),
|
|
18006
|
-
...structuredClone(entry.details)
|
|
18007
|
-
} : void 0;
|
|
18434
|
+
return entry?.key === subscriptionCredentialKey("openai-direct", token) ? entry : void 0;
|
|
18008
18435
|
}
|
|
18009
|
-
function observedSubscriptionUsage(key
|
|
18010
|
-
|
|
18011
|
-
if (!entry || entry.expires <= now) return [];
|
|
18012
|
-
return entry.windows.filter((window) => !window.resetsAt || Date.parse(window.resetsAt) > now);
|
|
18436
|
+
function observedSubscriptionUsage(key) {
|
|
18437
|
+
return observations.get(key);
|
|
18013
18438
|
}
|
|
18014
18439
|
// dist/core/compaction/model-resolver.js
|
|
18015
18440
|
function classifyCompactionModel(configured, models) {
|
|
@@ -20189,16 +20614,16 @@ var ChildCatalog = class ChildCatalog {
|
|
|
20189
20614
|
function sessionScratchDir(agentDir, cwd, _sessionId) {
|
|
20190
20615
|
return getDefaultSessionDirPath(cwd, agentDir);
|
|
20191
20616
|
}
|
|
20192
|
-
export { AgentRehydrateError, AgentReleaseConfigError, CacheWarmer, ChildCatalog, CommandDeliveries, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_SUBSCRIPTION_MAX_CONCURRENT, EMPTY_OUTPUT_TEXT, EngineHealthController, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, GIT_RELEASE, HistorySearchPositions, IMAGE_RESIZE_WORKER_RESPONSE_TYPE, LEGACY_AZURE_PROVIDER, LlamaClient, MAX_INDEXED_ENTRY_CHARS, MULTI_SUBMIT_LABEL, MarkdownContentCache, McpClient, MultiSelectView, NestedGitignore, NestedToolCallRunner, NoUsableModelError, QuestionParamsSchema, RESERVED_LABELS, RESUME_TIMINGS_TYPE, RemoteModelCatalog, RemoteQueuePause, ReopenedCompletionHeaders, ResumeTimingsRecorder, SEARCH_PART_CHARS, SESSIONS_TRANSFER_DIRECTORY, SESSION_STORAGE_JOIN, STORAGE_JOIN_COMMAND, SUMMARY_COMPACTION_PREFIX, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, SqlSessionSearchIndex, StorageImportIncompleteError, StorageSelectionSchema, StorageTransferError, StringEnum, TOOL_OUTPUT_ENTRY_TYPE, TRANSPILE_CACHE_WRITE_WAIT_MS, TaskElapsedClocks, TaskToolError, ToolExecutionScheduler, TransportEvents, UNORDERED_ADMISSION, VERBATIM_COMPACTION_PREFIX, VERIFICATION_PENDING_REASON, WorkspaceBindingError, WorkspaceCollectionError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceError, WorkspaceGitError, WorkspacePublicationError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, WrappingSelect, acceptsForkReplay, addResource, adoptCommandSession, appendFileChatRecords, assertSessionBlobStore, assertSettingsWrites, attachCleanupCause, bindRegistrationCallbacks, bindTaskClock, bindTaskClockSource, blueprintDigest, bodyWidths, buildDirectoryTree, buildDirectoryTreeFromOperations, buildToolStatusReport, cancelInitialBinding, cancelPausedOwnerTasks, cancelReceiptSentence, cancelReceiptStatus, captureForkReplayPair, captureRegistrationInvocation, carriedTransformedPrompt, carryCompletionEvidence, chatAnswerIntent, chatNumberingFor, childPresentationInput, claimInteractiveBind, classifyCompactionModel, cleanupFailureSummary, codexAccountId, collectAgentTasks, collectCommandDeliveries, collectExtensionPackageWarnings, collectFlags, collectMarkdownTransformers, collectPackageInstallWarnings, collectRegisteredTools, collectSettingsDiagnostics, columnWidths, compareCreated, compareFrozen, computeFocusedOptionHasPreview, conflictEntries, convertImageBytesToPng, convertToLlm, convertToLlmWithForkBoundaries, convertToPng, copyRegistrations, copySessionBlobs, createAccumulator, createBranchSummaryMessage, createCustomMessage, createInvocationBindings, createLazyBuiltinFactory, createManagedTaskClocks, createProviderAlias, createSessionHistoryToolDefinition, createSkillRouter, createVerbatimCompactionMessage, crossTabLeftWidthWithDonation, currentResourceAdmission, decideLayout, deferCommandTurn, deferMessagesInterleavedWithToolBatch, deferRestorePhase, deleteFileChatRecords, describeToolSelection, detectLinuxLibc, diffLines, diffWords, discoverChatFile, drainProcessStdio, drainWindowsDirectorySecurityReads, dropDeferredCommandTurn, ensurePngTranscoder, ensureTool, entryLines, errorMessage$1 as errorMessage, execCommand, extensionRefreshRejection, extensionSource, failedProviderAccount, filterSupersededHerdrIntegrationPaths, findEntryRenderer, findMessageRenderer, findToolDefinition, findWorkspaceError, fixUtf8Stream, flush, forkReplayFilter, forkToolDeclarations, formatAnswerScalar, formatBytes, formatNoUsableModelMessage, formatPackageInstallWarning, formatResumeTimings, formatTokenSegment, formatToolStatus, genBridge, getBuiltinExtensionEntryLabel, getClientIdentity, getCommandEnv, getGitDistributionTarget, getGitInstallDir, getGitReleaseMarker, getGitShellEnvironment, getGitShellEnvironmentAsync, getGitStatus, getGitStatusAsync, getLatestVersion, getLazyBuiltinSpec, getLoaderAgentDirs, getPromptCacheTtlMs, getStorageAdapterHostModules, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasExtensionHandlers, hasFileChatRecords, hasLazyBuiltinSpec, hasQuitStoppableCommands, hasRecordedTransformedPrompt, hasTaskPromptHost, hasTransformedPrompt, heldPromptInput, heldPrompts, initialBindScope, inlineToolOutput, insertForcedOptionsBeforeTerminator, invocationExtension, invocationRuntime, isAgentRehydrateError, isAgentReleaseConfigError, isBashToolResult, isContentFilterRefusal, isEditToolResult, isFindToolResult, isForkHeader, isHeldPromptInput, isInsideInputHook, isJsonValue, isLocalOnlySessionStorage, isLsToolResult, isNativeBuiltinExtensionPath, isOfflineModeEnabled, isPowerShellToolResult, isPresentationHostInput, isProviderCredentialRejection, isReadToolResult, isRetryableAgentRehydrateError, isRetryableModelFailure, isRetryableSameModelFailure, isRetryableWorkspaceError, isSafetyRefusalFailure, isSourceBuiltinExtensionPath, isStorageImportIncompleteError, isStorageTransferError, isTaskToolError, isToolCallEventType, isTruthyEnvFlag, isUnrecognizedModelFailure, isVerbatimCompactionMessage, isWorkspaceBindingError, isWorkspaceCollectionError, isWorkspaceConfigError, isWorkspaceDriftError, isWorkspaceError, isWorkspaceGitError, isWorkspacePublicationError, isWorkspaceRestoreError, isWorkspaceSandboxError, isWorkspaceSnapshotError, isWorkspaceTimeoutError, isWriteToolResult, joinCommandSend, joinCommandTurn, killQuitStoppableCommandsNow, latestLegacyMessageTime, latestResumeTimings, legacyCompletionTarget, lifecycleScopeForOwner, llamaInferenceUrl, loadVirtualModules, loaderHostModulesTestHooks, lockSharedWithHolder, mergeExtensionWarnings, mergeResourcePaths, messageIsLlmVisible, messageStartsLlmUserTurn, migrateCompactionModelSettings, modelFailureMessage, next, nextTransformedPromptRecord, normalizeAzureSettings, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelProvider, normalizeModelReference, normalizeProviderKeys, noteCommandAnswer, noteCommandTurnMessage, noteRestoreFetch, observeFailedProviderAccount, observeSubscriptionUsage, observedOpenAiDirectUsage, observedSubscriptionUsage, openAiDirectUsageObserver, openEventSubscription, originalRegistrationCallback, ownedSettingsManagers, parseArgs, parseConflictBytes, parseEngineExplicitQuitCommand, parseGitVersion, parseInteractiveEngineCommand, parseInteractiveEngineMessage, parseSkillUri, partitionByCredentials, plainStatMtimeMs, powershellCandidates, prepareRegistrationCallbacks, presentTaskError, presentationHostInput, prewarmModelApi, printHelp, projectTransformedPrompt, providerAccount, providerOfModelReference, publishEvent, readConflictUrl, readFileChatOrders, readFileChatRecords, readHostInputFormRequest, readInlineCaret, readInlineDraft, readLedger, readLocalFileChunks, readPipedStdin, readTransferDirectory, reconcileRegistration, recordBlueprintStep, recordClosedStart, recordResumeTimings, recordSettingsWrite, refreshConflictFile, registerConflictBlocks, registerFactoryStartupHandler, registerInitialBindings, registerLazyBuiltin, registrationFields, rehydrateAgentRehydrateError, rehydrateTaskToolError, rehydrateWorkspaceError, rejectMalformedToolArguments, rememberEarlierCompletion, renderTodoCall, renderTodoResult, reopenedCompletionName, repairOrphanToolResults, reparentedSegments, reportDiagnostics, reportWorktreeLockProgress, repositoryKey, requestedThinkingLevelForModelSwitch, requireTimerMs, require_from_url, require_int, require_int$1, require_log, require_re, require_timestamp, require_toJS, require_trim_comparator_whitespace, require_util_flow_indent_check, require_util_map_includes, require_visit, reserveQueuedInputAdmission, resetGitProvisionStateForTest, resizeImageInProcess, resolveCompactionModel, resolveGit, resolveGitSync, resolveInlineDraftValue, resolveInstalledGit, resolveInvocationRuntime, resolveRegisteredCommands, resolveResourcePath, resolveToolConcurrency, resolvesCompletionHeader, rootKey, routeKey, routeNamesPrompt, runCallback, runCommandHandler, runInputHook, runSynchronousCallback, runWithProgress, scheduleToolExecution, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, selectReadLinesFromChunks, selectReadLinesFromList, serializeAgentRehydrateError, serializeInteractiveEngineFrame, serializeInteractiveEngineMessage, serializeTodoForAgent, serializeTodoListForAgent, serializeWorkspaceError, sessionBlobHashes, sessionBlobOutput, sessionLifecycleCreation, sessionLifecycleScopes, sessionPosition, sessionScratchDir, setCallbackActivityReporter, settingsWriteOwner, shareCompletionEvidence, showLlamaUi, shownSpanMs, skillUri, splitSearchTextParts, splitSegment, startedAsFork, startupRegistrationTokens, startupSourceId, stopIndex, storeInlineToolOutputs, storeSessionBlobs, streamCutDurationMs, stripVerbatimCompactionPrefix, subagentsLazyBuiltinSpec, subscriptionBearer, subscriptionCredentialKey, summarizeLegacySession, takeInlineToolOutput, takeInlineToolOutputEntry, taskClockOf, taskClockRunning, taskClocksFor, taskElapsedMs, taskPromptHost, thinkingLevelForModelSwitch, timeCheckoutRestore, timeRestorePhase, timestamp, toResolvedPaths, tokenize, toolChangeSupport, toolOutputUrl, toolOutputUrlHash, trackAdmittedAgentTask, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, transcriptHeaderLines, transferFile, transformedPromptOwner, transpileCacheWritesSettled, unpackIds, unreadablePathError, unreadableTrustSettingsDiagnostics, unwritablePathError, updateLedger, userLikeContentBlockIsLlmVisible, validateEventSource, validateSubscriptionAdmission, verbatimRecallHint, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, watchHeldPromptAttention, withGitProvisionSettingsForTest, withImagesBlocked, withInlineDraft, withOwnResourceAdmission, withResourceAdmission, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner, withWorktreeLockProgress, withoutCarriedToolOutput, withoutSearchPosition, workspaceKey, writeChunksAtomically, writeLinesAtomically, writeRenderers };
|
|
20617
|
+
export { AgentRehydrateError, AgentReleaseConfigError, CacheWarmer, ChildCatalog, CommandDeliveries, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_SUBSCRIPTION_MAX_CONCURRENT, EMPTY_OUTPUT_TEXT, EngineHealthController, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, GIT_RELEASE, HistorySearchPositions, IMAGE_RESIZE_WORKER_RESPONSE_TYPE, LEGACY_AZURE_PROVIDER, LaterSessionParents, LlamaClient, MAX_INDEXED_ENTRY_CHARS, MULTI_SUBMIT_LABEL, MarkdownContentCache, McpClient, MultiSelectView, NestedGitignore, NestedToolCallRunner, NoUsableModelError, QuestionParamsSchema, RESERVED_LABELS, RESUME_TIMINGS_TYPE, RemoteModelCatalog, RemoteQueuePause, ReopenedCompletionHeaders, ResumeTimingsRecorder, SEARCH_PART_CHARS, SESSIONS_TRANSFER_DIRECTORY, SESSION_STORAGE_JOIN, STORAGE_JOIN_COMMAND, SUMMARY_COMPACTION_PREFIX, SessionDuplicateEntryError, SessionInvalidParentError, SessionKeyDigests, SessionParentIndex, SessionParentRepairer, SessionStorageSelectionSchema, SettingsSchema, SqlSessionSearchIndex, StorageImportIncompleteError, StorageSelectionSchema, StorageTransferError, StringEnum, TOOL_OUTPUT_ENTRY_TYPE, TRANSPILE_CACHE_WRITE_WAIT_MS, TaskElapsedClocks, TaskToolError, ToolExecutionScheduler, TransportEvents, UNORDERED_ADMISSION, UsageObservationStore, VERBATIM_COMPACTION_PREFIX, VERIFICATION_PENDING_REASON, WorkspaceBindingError, WorkspaceCollectionError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceError, WorkspaceGitError, WorkspacePublicationError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, WrappingSelect, acceptsForkReplay, addResource, adoptCommandSession, appendFileChatRecords, assertSessionBlobStore, assertSettingsWrites, attachCleanupCause, bindRegistrationCallbacks, bindTaskClock, bindTaskClockSource, blueprintDigest, bodyWidths, buildDirectoryTree, buildDirectoryTreeFromOperations, buildToolStatusReport, cancelInitialBinding, cancelPausedOwnerTasks, cancelReceiptSentence, cancelReceiptStatus, captureForkReplayPair, captureRegistrationInvocation, carriedTransformedPrompt, carryCompletionEvidence, chatAnswerIntent, chatNumberingFor, childPresentationInput, claimInteractiveBind, classifyCompactionModel, cleanupFailureSummary, codexAccountId, collectAgentTasks, collectCommandDeliveries, collectExtensionPackageWarnings, collectFlags, collectMarkdownTransformers, collectPackageInstallWarnings, collectRegisteredTools, collectSettingsDiagnostics, columnWidths, compareCreated, compareFrozen, computeFocusedOptionHasPreview, conflictEntries, convertImageBytesToPng, convertToLlm, convertToLlmWithForkBoundaries, convertToPng, copyRegistrations, copySessionBlobs, createAccumulator, createBranchSummaryMessage, createCustomMessage, createInvocationBindings, createLazyBuiltinFactory, createManagedTaskClocks, createProviderAlias, createSessionHistoryToolDefinition, createSkillRouter, createVerbatimCompactionMessage, crossTabLeftWidthWithDonation, currentResourceAdmission, damagedHistoryWarning, decideLayout, deferCommandTurn, deferMessagesInterleavedWithToolBatch, deferRestorePhase, deleteFileChatRecords, describeSessionParentRepairs, describeToolSelection, detectLinuxLibc, diffLines, diffWords, discoverChatFile, drainProcessStdio, drainWindowsDirectorySecurityReads, dropDeferredCommandTurn, ensurePngTranscoder, ensureTool, entryLines, errorMessage$1 as errorMessage, execCommand, extensionRefreshRejection, extensionSource, failedProviderAccount, filterSupersededHerdrIntegrationPaths, findEntryRenderer, findMessageRenderer, findToolDefinition, findWorkspaceError, fixUtf8Stream, flush, forkReplayFilter, forkToolDeclarations, formatAnswerScalar, formatBytes, formatNoUsableModelMessage, formatPackageInstallWarning, formatResumeTimings, formatTokenSegment, formatToolStatus, genBridge, getBuiltinExtensionEntryLabel, getClientIdentity, getCommandEnv, getGitDistributionTarget, getGitInstallDir, getGitReleaseMarker, getGitShellEnvironment, getGitShellEnvironmentAsync, getGitStatus, getGitStatusAsync, getLatestVersion, getLazyBuiltinSpec, getLoaderAgentDirs, getPromptCacheTtlMs, getStorageAdapterHostModules, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasDamagedHistoryLinks, hasExtensionHandlers, hasFileChatRecords, hasLazyBuiltinSpec, hasQuitStoppableCommands, hasRecordedTransformedPrompt, hasTaskPromptHost, hasTransformedPrompt, heldPromptInput, heldPrompts, initialBindScope, inlineToolOutput, insertForcedOptionsBeforeTerminator, invocationExtension, invocationRuntime, isAgentRehydrateError, isAgentReleaseConfigError, isBashToolResult, isContentFilterRefusal, isDetachedReceipt, isEarlierSessionEntry, isEditToolResult, isFindToolResult, isForkHeader, isHeldPromptInput, isInsideInputHook, isJsonValue, isLocalOnlySessionStorage, isLsToolResult, isNativeBuiltinExtensionPath, isOfflineModeEnabled, isPowerShellToolResult, isPresentationHostInput, isProviderCredentialRejection, isReadToolResult, isRetryableAgentRehydrateError, isRetryableModelFailure, isRetryableSameModelFailure, isRetryableWorkspaceError, isSafetyRefusalFailure, isSourceBuiltinExtensionPath, isStorageImportIncompleteError, isStorageTransferError, isTaskToolError, isToolCallEventType, isTruthyEnvFlag, isUnrecognizedModelFailure, isVerbatimCompactionMessage, isWorkspaceBindingError, isWorkspaceCollectionError, isWorkspaceConfigError, isWorkspaceDriftError, isWorkspaceError, isWorkspaceGitError, isWorkspacePublicationError, isWorkspaceRestoreError, isWorkspaceSandboxError, isWorkspaceSnapshotError, isWorkspaceTimeoutError, isWriteToolResult, joinCommandSend, joinCommandTurn, killQuitStoppableCommandsNow, latestLegacyMessageTime, latestResumeTimings, legacyCompletionTarget, lifecycleScopeForOwner, llamaInferenceUrl, loadVirtualModules, loaderHostModulesTestHooks, lockSharedWithHolder, mergeExtensionWarnings, mergeResourcePaths, messageIsLlmVisible, messageStartsLlmUserTurn, migrateCompactionModelSettings, modelFailureMessage, newSessionEntryPositions, next, nextTransformedPromptRecord, normalizeAzureSettings, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelProvider, normalizeModelReference, normalizeProviderKeys, noteCommandAnswer, noteCommandTurnMessage, noteRestoreFetch, observeFailedProviderAccount, observeSubscriptionUsage, observedOpenAiDirectUsage, observedSubscriptionUsage, openAiDirectUsageObserver, openEventSubscription, originalRegistrationCallback, ownedSettingsManagers, pairedForkEntry, parentIdInEarlierRows, parentLinkDisposition, parseArgs, parseConflictBytes, parseEngineExplicitQuitCommand, parseGitVersion, parseInteractiveEngineCommand, parseInteractiveEngineMessage, parseSkillUri, partitionByCredentials, plainStatMtimeMs, powershellCandidates, prepareImportedSessionParents, prepareRegistrationCallbacks, presentTaskError, presentationHostInput, prewarmModelApi, printHelp, projectTransformedPrompt, providerAccount, providerOfModelReference, publishEvent, readConflictUrl, readFileChatOrders, readFileChatRecords, readHostInputFormRequest, readInlineCaret, readInlineDraft, readLedger, readLocalFileChunks, readPipedStdin, readTransferDirectory, reconcileRegistration, recordBlueprintStep, recordClosedStart, recordResumeTimings, recordSettingsWrite, recordedSessionBranch, recordedSessionParents, refreshConflictFile, registerConflictBlocks, registerFactoryStartupHandler, registerInitialBindings, registerLazyBuiltin, registrationFields, rehydrateAgentRehydrateError, rehydrateTaskToolError, rehydrateWorkspaceError, rejectMalformedToolArguments, rememberEarlierCompletion, renderTodoCall, renderTodoResult, reopenedCompletionName, repairAppendedSessionParents, repairOrphanToolResults, repairSessionParentWrites, repairedWriteResult, reparentedSegments, reportDiagnostics, reportWorktreeLockProgress, repositoryKey, requestedThinkingLevelForModelSwitch, requireTimerMs, require_from_url, require_int, require_int$1, require_log, require_re, require_timestamp, require_toJS, require_trim_comparator_whitespace, require_util_flow_indent_check, require_util_map_includes, require_visit, reserveQueuedInputAdmission, resetGitProvisionStateForTest, resizeImageInProcess, resolveCompactionModel, resolveGit, resolveGitSync, resolveInlineDraftValue, resolveInstalledGit, resolveInvocationRuntime, resolveRegisteredCommands, resolveResourcePath, resolveToolConcurrency, resolvesCompletionHeader, rootKey, routeKey, routeNamesPrompt, runCallback, runCommandHandler, runInputHook, runSynchronousCallback, runWithProgress, scheduleToolExecution, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, selectReadLinesFromChunks, selectReadLinesFromList, serializeAgentRehydrateError, serializeInteractiveEngineFrame, serializeInteractiveEngineMessage, serializeTodoForAgent, serializeTodoListForAgent, serializeWorkspaceError, sessionBlobHashes, sessionBlobOutput, sessionEntryPositions, sessionLifecycleCreation, sessionLifecycleScopes, sessionParent, sessionPosition, sessionScratchDir, setCallbackActivityReporter, setUsageObservationStore, settingsWriteOwner, shareCompletionEvidence, showLlamaUi, shownSpanMs, skillUri, splitSearchTextParts, splitSegment, startedAsFork, startupRegistrationTokens, startupSourceId, stopIndex, storeInlineToolOutputs, storeSessionBlobs, streamCutDurationMs, stripVerbatimCompactionPrefix, subagentsLazyBuiltinSpec, subscriptionBearer, subscriptionCredentialKey, summarizeLegacySession, takeInlineToolOutput, takeInlineToolOutputEntry, taskClockOf, taskClockRunning, taskClocksFor, taskElapsedMs, taskPromptHost, thinkingLevelForModelSwitch, timeCheckoutRestore, timeRestorePhase, timestamp, toResolvedPaths, tokenize, toolChangeSupport, toolOutputUrl, toolOutputUrlHash, trackAdmittedAgentTask, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, transcriptHeaderLines, transferFile, transformedPromptOwner, transpileCacheWritesSettled, unpackIds, unreadablePathError, unreadableTrustSettingsDiagnostics, unwritablePathError, updateLedger, usageObservationStore, userLikeContentBlockIsLlmVisible, validateEventSource, validateSessionParentWrites, validateSubscriptionAdmission, verbatimRecallHint, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, walkSessionParents, warnDamagedHistoryLinks, watchHeldPromptAttention, withGitProvisionSettingsForTest, withHistoryLoadObserver, withImagesBlocked, withInlineDraft, withOwnResourceAdmission, withResourceAdmission, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner, withWorktreeLockProgress, withoutCarriedToolOutput, withoutSearchPosition, workspaceKey, writeChunksAtomically, writeLinesAtomically, writeRenderers };
|
|
20193
20618
|
|
|
20194
|
-
//# sourceMappingURL=startup-0-1-
|
|
20619
|
+
//# sourceMappingURL=startup-0-1-DZYE4E5Z.js.map
|
|
20195
20620
|
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
20196
20621
|
// demand that fails in a process an in-place update left running says to restart.
|
|
20197
20622
|
function __atomicOnDemandFailed(error, feature) {
|
|
20198
20623
|
return (async () => {
|
|
20199
20624
|
const root = new URL("../", import.meta.url);
|
|
20200
20625
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
20201
|
-
const key = `${root.href}#0.10.
|
|
20626
|
+
const key = `${root.href}#0.10.20-alpha.2`;
|
|
20202
20627
|
let release = releases.get(key);
|
|
20203
20628
|
if (release === undefined) {
|
|
20204
20629
|
const current = (async () => {
|
|
@@ -20226,7 +20651,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
20226
20651
|
} catch {
|
|
20227
20652
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
20228
20653
|
}
|
|
20229
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.
|
|
20654
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.2" ? installed : running !== undefined && running.version !== "0.10.20-alpha.2" ? "0.10.20-alpha.2" : undefined;
|
|
20230
20655
|
if (updatedTo === undefined) throw error;
|
|
20231
20656
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
20232
20657
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|