@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,13 +1,13 @@
|
|
|
1
1
|
import { __commonJSMin, __name, __require, __toESM } from "./rolldown-runtime-BGM3D5V3.js";
|
|
2
2
|
import { APP_NAME, BLUEPRINT_FILE_NAME, CONFIG_DIR_NAME, ENV_MODEL_CATALOG_URL, canonicalizePath as canonicalizePath$1, canonicalizePathAsync as canonicalizePathAsync$1, createChildProcessEnvironment, createModuleRequire, findHelperExecutableAsync, getAgentDir, getAgentDirs, getBinDir, getDocsPath, getEnvValue, getExamplesPath, getExtensionTranspileCacheDir, getPathComparisonKey, getProjectConfigDirs, getReadmePath, getUserConfigPaths, isBunBinary, isBundledBuild, isLocalPath, isPathWithin, markPathIgnoredByCloudSync, moduleDirFromMetaUrl, normalizePath, pathsEqual, processLaunch, processLaunchAsync, rehydrateDebugError, resolutionBaseUrl, resolvePath, resolveSafeWindowsWorkingDirectoryAsync, spawnLaunchedProcess, spawnLaunchedProcessSync, stripBom, updatedInstallError } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
-
import { BUILTIN_PATH_PREFIX, BlueprintInvalidError, COMMAND_DETAIL_TAIL_BYTES, DEFAULT_THINKING_LEVEL, FILE_KINDS, FILE_PATTERNS, FORKED_PACKAGE_WORKSPACE_DIRS, GitUnavailableError, HOST, NETWORK_TIMEOUT_MS, POST_LOGOUT_AUTH_CHECK_TIMEOUT_MS, RESOURCE_TYPES, ROW_INTENT_META, THINKING_LEVELS, TYPEBOX_SUBPATHS, TaskCleanupError, VisualLinePreview, asyncScope, bindSavedReadLines, canWatchProcessUntilHostDies, cancelReasonText, containProcessTree, conventionDirsForResource, createBatchedCanonicalizePathAsync, createGitEnvironment, createSyntheticSourceInfo, createTypeScriptSourceSpecifierTransform, emitProgress, experimentalToolSamplingProperty, findPreferredAvailableModel, forkedPackageExportAliases, formatNoApiKeyFoundMessage, formatSize, formatTimeoutSeconds, formatToolCallWithArgs, getDefaultSessionDirPath, getHostQuestionnaire, getManifestFromPackageJson, getResourcePathKey, getTextOutput, holdProcessDescendants, holdProcessDescendantsResult, holderRuns as holderRuns$1, isCodexTokenInvalidationError, isGitProvisionError, isGitUnavailableError, isSerializedMissingSessionCwdError, isStaleExtensionContextError, isStdoutTakenOver, isSyntheticPath, legacyWorkflowFilePaths, legacyWorkflowFilePatterns, loadConfig, loadedConfig, lockNamesLocalHolder, lockShared, normalizeWaitPolicy, operationSignal, parseSerializedCompactionError, parseSlashCommand, raceWithAbortSignal, readSubscriptionCredential, readTaskOutputTail, redactCredentials, redactOAuthErrorText, rehydrateCompactionError, rehydrateMissingSessionCwdError, removedProviderMessage, replaceTabs, require_applyReviver, require_constants, require_debug, require_errors, require_identifiers, require_identity, require_ignore, require_line_counter, require_parse_options, require_resolve_end, require_resolve_props, require_stringifyComment, require_util_contains_newline, resolvePhysicalPath, resolvePhysicalPathAsync, resolveSchemaRef, resourceInternals, sanitizeMcpServers, sentinelsToAppend, serializeSessionMutation, sharedClockNow, sleep, spanElapsedMs, spawnContainedProcess, spawnHostProcess, startShellDeadline, takeOverDeadHolderAsync, taskOutcomeStatus, taskOutputText, taskStoppedForResume, thisProcess, truncateMiddle, validateGuidanceFields, watchProcessUntilHostDies, windowsTemporaryFiles, withInstallLock, withLegacyPackageNames, withProgress, writeOutputFile, yieldToEventLoopIfSlow } from "./startup-0-0-
|
|
4
|
-
import { NestedGitignore, NoUsableModelError, QuestionParamsSchema, STORAGE_JOIN_COMMAND, TaskToolError, WorkspaceBindingError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceGitError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, addResource, attachCleanupCause, cancelPausedOwnerTasks, computeFocusedOptionHasPreview, createAccumulator, createProviderAlias, deferRestorePhase, failedProviderAccount, formatAnswerScalar, getBuiltinExtensionEntryLabel, getCommandEnv, getLoaderAgentDirs, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasLazyBuiltinSpec, isContentFilterRefusal, isNativeBuiltinExtensionPath, isOfflineModeEnabled, isProviderCredentialRejection, isRetryableModelFailure, isRetryableSameModelFailure, isSafetyRefusalFailure, isSourceBuiltinExtensionPath, isUnrecognizedModelFailure, isWorkspaceBindingError, isWorkspaceError, isWorkspaceGitError, isWorkspaceRestoreError, isWorkspaceSnapshotError, loadVirtualModules, lockSharedWithHolder, normalizeModelFailureSignal, normalizeModelProvider, normalizeProviderKeys, noteRestoreFetch, observeSubscriptionUsage, openAiDirectUsageObserver, prewarmModelApi, providerAccount, readInlineCaret, readInlineDraft, registerLazyBuiltin, reportWorktreeLockProgress, requestedThinkingLevelForModelSwitch, require_int as require_int$1, require_int$1 as require_int, require_log, require_re, require_timestamp, require_toJS, require_trim_comparator_whitespace, require_util_flow_indent_check, require_util_map_includes, require_visit, resolveResourcePath, routeKey, runCallback, sessionLifecycleCreation, settingsWriteOwner, skillUri, startupRegistrationTokens, subagentsLazyBuiltinSpec, timeRestorePhase, toResolvedPaths, trackAdmittedAgentTask, trackTranspileCacheWrite, unreadablePathError, unwritablePathError, waitResultTail, withInlineDraft } from "./startup-0-1-
|
|
5
|
-
import { TerminalTextSanitizer, graphemeAt,
|
|
3
|
+
import { BUILTIN_PATH_PREFIX, BlueprintInvalidError, COMMAND_DETAIL_TAIL_BYTES, DEFAULT_THINKING_LEVEL, FILE_KINDS, FILE_PATTERNS, FORKED_PACKAGE_WORKSPACE_DIRS, GitUnavailableError, HOST, NETWORK_TIMEOUT_MS, POST_LOGOUT_AUTH_CHECK_TIMEOUT_MS, RESOURCE_TYPES, ROW_INTENT_META, THINKING_LEVELS, TYPEBOX_SUBPATHS, TaskCleanupError, VisualLinePreview, asyncScope, bindSavedReadLines, canWatchProcessUntilHostDies, cancelReasonText, containProcessTree, conventionDirsForResource, createBatchedCanonicalizePathAsync, createGitEnvironment, createSyntheticSourceInfo, createTypeScriptSourceSpecifierTransform, emitProgress, experimentalToolSamplingProperty, findPreferredAvailableModel, forkedPackageExportAliases, formatNoApiKeyFoundMessage, formatSize, formatTimeoutSeconds, formatToolCallWithArgs, getDefaultSessionDirPath, getHostQuestionnaire, getManifestFromPackageJson, getResourcePathKey, getTextOutput, holdProcessDescendants, holdProcessDescendantsResult, holderRuns as holderRuns$1, isCodexTokenInvalidationError, isGitProvisionError, isGitUnavailableError, isSerializedMissingSessionCwdError, isStaleExtensionContextError, isStdoutTakenOver, isSyntheticPath, legacyWorkflowFilePaths, legacyWorkflowFilePatterns, loadConfig, loadedConfig, lockNamesLocalHolder, lockShared, normalizeWaitPolicy, operationSignal, parseSerializedCompactionError, parseSlashCommand, raceWithAbortSignal, readSubscriptionCredential, readTaskOutputTail, redactCredentials, redactOAuthErrorText, rehydrateCompactionError, rehydrateMissingSessionCwdError, removedProviderMessage, replaceTabs, require_applyReviver, require_constants, require_debug, require_errors, require_identifiers, require_identity, require_ignore, require_line_counter, require_parse_options, require_resolve_end, require_resolve_props, require_stringifyComment, require_util_contains_newline, resolvePhysicalPath, resolvePhysicalPathAsync, resolveSchemaRef, resourceInternals, sanitizeMcpServers, sentinelsToAppend, serializeSessionMutation, sharedClockNow, sleep, spanElapsedMs, spawnContainedProcess, spawnHostProcess, startShellDeadline, takeOverDeadHolderAsync, taskOutcomeStatus, taskOutputText, taskStoppedForResume, thisProcess, truncateMiddle, validateGuidanceFields, watchProcessUntilHostDies, windowsTemporaryFiles, withInstallLock, withLegacyPackageNames, withProgress, writeOutputFile, yieldToEventLoopIfSlow } from "./startup-0-0-OWBJIX35.js";
|
|
4
|
+
import { NestedGitignore, NoUsableModelError, QuestionParamsSchema, STORAGE_JOIN_COMMAND, SessionDuplicateEntryError, SessionInvalidParentError, TaskToolError, WorkspaceBindingError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceGitError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, addResource, attachCleanupCause, cancelPausedOwnerTasks, computeFocusedOptionHasPreview, createAccumulator, createProviderAlias, deferRestorePhase, failedProviderAccount, formatAnswerScalar, getBuiltinExtensionEntryLabel, getCommandEnv, getLoaderAgentDirs, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasLazyBuiltinSpec, isContentFilterRefusal, isNativeBuiltinExtensionPath, isOfflineModeEnabled, isProviderCredentialRejection, isRetryableModelFailure, isRetryableSameModelFailure, isSafetyRefusalFailure, isSourceBuiltinExtensionPath, isUnrecognizedModelFailure, isWorkspaceBindingError, isWorkspaceError, isWorkspaceGitError, isWorkspaceRestoreError, isWorkspaceSnapshotError, loadVirtualModules, lockSharedWithHolder, normalizeModelFailureSignal, normalizeModelProvider, normalizeProviderKeys, noteRestoreFetch, observeSubscriptionUsage, openAiDirectUsageObserver, prewarmModelApi, providerAccount, readInlineCaret, readInlineDraft, registerLazyBuiltin, reportWorktreeLockProgress, requestedThinkingLevelForModelSwitch, require_int as require_int$1, require_int$1 as require_int, require_log, require_re, require_timestamp, require_toJS, require_trim_comparator_whitespace, require_util_flow_indent_check, require_util_map_includes, require_visit, resolveResourcePath, routeKey, runCallback, sessionLifecycleCreation, settingsWriteOwner, skillUri, startupRegistrationTokens, subagentsLazyBuiltinSpec, subscriptionBearer, timeRestorePhase, toResolvedPaths, trackAdmittedAgentTask, trackTranspileCacheWrite, unreadablePathError, unwritablePathError, usageObservationStore, waitResultTail, withInlineDraft } from "./startup-0-1-DZYE4E5Z.js";
|
|
5
|
+
import { TerminalTextSanitizer, getTerminalTheme, graphemeAt, initTheme, loadThemeFromContent, parenthesizedKeyHint, resolveColorMode, resolveThemeSetting, singleLineDisplayText, terminalDisplayText } from "./p2-shell-main-B2WIALFD.js";
|
|
6
6
|
import { failureDebugFields, lockHolderAsync, processMayRunAsync, processStartTokenAsync, redactUrlCredentials, releaseLock, renameReplacingAsync, renameWithRetry, reportDebugAsync, takeTakeoverMutexAsync } from "./p1b-elig-BY2G5BUE.js";
|
|
7
|
-
import { LONG_STREAM_CUT_ADVICE, ModelConfig, ResumePreconditionError, TaskSupervisor, assertSessionOpen, assertWorkspace, automaticWaitBudgetMs, buildFallbackModel, buildQuestionnaireResponse, buildToolResult, classifyRepository, findSourceInfoForPath, getCallableTools, getDefaultSourceInfoForPath, getShellConfigAsync, getShellEnvAsync, hasBlockingAccountLimit, importAfterEvaluation, installHostModuleBridge, isLongStreamCut, isWorkspace, nextRetryDecision, observeAccountCatalog, overCapServerRetryDelay, prepareSourceEntries, prepareSourceEntry, providerCooldownMs, providerUnavailableMs, recordedRepo, reduce, registerSourceBuiltinLoad, repeatsLongStreamCut, require_Node, require_anchors, require_directives, require_semver as require_semver$1, runCommand, runCommandCapture, runCommandSync, runWithConcurrency, sessionGenerationClosing, sessionLifetime, summarizeQuestions, taskOwnTranscriptEntries, trackSessionWork, transformTemplate, validateQuestionnaire, withDiscoveredModels, withPersonalizedCatalog, withRemoteCatalog } from "./startup-0-2-
|
|
7
|
+
import { LONG_STREAM_CUT_ADVICE, ModelConfig, ResumePreconditionError, TaskSupervisor, assertSessionOpen, assertWorkspace, automaticWaitBudgetMs, buildFallbackModel, buildQuestionnaireResponse, buildToolResult, classifyRepository, findSourceInfoForPath, getCallableTools, getDefaultSourceInfoForPath, getShellConfigAsync, getShellEnvAsync, hasBlockingAccountLimit, importAfterEvaluation, installHostModuleBridge, isLongStreamCut, isUsageCredential, isWorkspace, nextRetryDecision, observeAccountCatalog, overCapServerRetryDelay, prepareSourceEntries, prepareSourceEntry, providerCooldownMs, providerUnavailableMs, readUsageAccountKey, recordedRepo, reduce, registerSourceBuiltinLoad, repeatsLongStreamCut, require_Node, require_anchors, require_directives, require_semver as require_semver$1, runCommand, runCommandCapture, runCommandSync, runWithConcurrency, sessionGenerationClosing, sessionLifetime, summarizeQuestions, taskOwnTranscriptEntries, trackSessionWork, transformTemplate, usageAccountKey, usageCredentialToken, validateQuestionnaire, withDiscoveredModels, withPersonalizedCatalog, withRemoteCatalog } from "./startup-0-2-WFLTE4SC.js";
|
|
8
8
|
import { DEFAULT_WORKTREE_SNAPSHOT_SETTINGS, FileModelsStore, InMemoryCodingAgentModelsStore, admitProviderStream, completeUtf8PrefixLength, computeEnvironmentHash, fallbackKey, getBaseDirForScope, getBaseDirsForScope, getConfigValueEnvVarNames, getGitInstallPath, getGitInstallRoot, getHomeDir, getInstalledGitInstallPath, getNpmInstallRoot, isCommandConfigValue, isConfigValueConfigured, llamaExtension, parseGitUrl, require_Alias, require_Scalar, require_compare, require_compare_build, require_inc, require_major, require_minor, require_parse, require_patch, resolveCliModel, resolveConfigValue, resolveFallbackModel as resolveFallbackModel$1, resolveFallbackModelWithoutCredentials, resolveHeadersOrThrow, resolveHeadersOrThrowAsync, resolveManagerPath, resolvePathFromBase, resolveWorktreeSnapshotSettings, sha256Hex as sha256Hex$1, snapshotBlob, splitFallbackModel, waitFor } from "./startup-0-3-DE2NCS6A.js";
|
|
9
|
-
import { SESSION_HISTORY_PAGE_BYTES } from "./settings-startup-HXQLSUWM.js";
|
|
10
|
-
import { AuthStorage, OutputAccumulator, ReadOnlyAuthStorage, TOOL_BLOCK_LIMITS, ToolBlock, ToolBlockMarkdown, ToolBlockRecords, accountSnapshotVersion, applyAutoloadDisabledNamePatterns, applyAutoloadDisabledPatterns, applyCompactorModelOverride, applyExtension, applyModelOverride, applyModelsJson, applyNamePatterns, applyPatterns, assertRestorePathBudget, assertWorkspaceGitAvailable, buildQuestionnaire, canonicalizeWorktreePathAsync, captureIndexPath, checkoutStoreIdOf, codemode_default, collapseToolBlockLines, composeApiKeyAuth, composeOAuthAuth, configuredApiKey, configuredHeaders, containsAuthConfig, containsCredential, containsCredentialValue, defaultWorktreeSnapshotStoreDir, formatModelLabel, formatModelReferenceLabel, gitOutput, hasGlobPattern, isEnabledByOverrides, isOverridePattern, jsonParser, pathExists as pathExists$1, rawModelHeaders, repositoryIdOf, repositoryIdsOf, require_bool as require_bool$1, require_bool$1 as require_bool, require_clean, require_coerce, require_compare_loose, require_createNode, require_diff, require_eq, require_float as require_float$1, require_float$1 as require_float, require_gt, require_gte, require_lt, require_lte, require_merge, require_neq, require_null, require_prerelease, require_rcompare, require_resolve_block_scalar, require_resolve_flow_scalar, require_rsort, require_sort, require_stringifyString, require_truncate, require_valid as require_valid$1, runWorkspaceGit, sameRemote, sharedRepositoryIdOf, sharedRepositoryIdsOf, splitPatterns, stagingWorktreeName, toLlmContent, toPosixPath as toPosixPath$2 } from "./startup-0-4-
|
|
9
|
+
import { SESSION_HISTORY_PAGE_BYTES, SessionAlreadyOpenError } from "./settings-startup-HXQLSUWM.js";
|
|
10
|
+
import { AuthStorage, DETAIL_FIRST_PREFIX, DETAIL_PREFIX, OutputAccumulator, ReadOnlyAuthStorage, SessionLoadingStatus, TOOL_BLOCK_LIMITS, ToolBlock, ToolBlockMarkdown, ToolBlockRecords, accountSnapshotVersion, applyAutoloadDisabledNamePatterns, applyAutoloadDisabledPatterns, applyCompactorModelOverride, applyExtension, applyModelOverride, applyModelsJson, applyNamePatterns, applyPatterns, assertRestorePathBudget, assertWorkspaceGitAvailable, buildQuestionnaire, canonicalizeWorktreePathAsync, captureIndexPath, checkoutStoreIdOf, codemode_default, collapseToolBlockLines, composeApiKeyAuth, composeOAuthAuth, configuredApiKey, configuredHeaders, containsAuthConfig, containsCredential, containsCredentialValue, defaultWorktreeSnapshotStoreDir, formatModelLabel, formatModelReferenceLabel, gitOutput, hasGlobPattern, isEnabledByOverrides, isOverridePattern, jsonParser, pathExists as pathExists$1, rawModelHeaders, repositoryIdOf, repositoryIdsOf, require_bool as require_bool$1, require_bool$1 as require_bool, require_clean, require_coerce, require_compare_loose, require_createNode, require_diff, require_eq, require_float as require_float$1, require_float$1 as require_float, require_gt, require_gte, require_lt, require_lte, require_merge, require_neq, require_null, require_prerelease, require_rcompare, require_resolve_block_scalar, require_resolve_flow_scalar, require_rsort, require_sort, require_stringifyString, require_truncate, require_valid as require_valid$1, runWorkspaceGit, sameRemote, sharedRepositoryIdOf, sharedRepositoryIdsOf, splitPatterns, stagingWorktreeName, toLlmContent, toPosixPath as toPosixPath$2, toolBlockExpandHint, toolBlockPreviewLine } from "./startup-0-4-6XXL4JMZ.js";
|
|
11
11
|
import { SETTINGS_DEFAULTS } from "./p2-common-YLSYXMDQ.js";
|
|
12
12
|
import { CODEX_FAST_ROUTE_HEADER, CODEX_FAST_ROUTE_ORIGINATOR, clearCodexFastRouteRequestMarker, installCodexFastRouteWebSocketIdentity, isFirstPartyCodexBaseUrl, markCodexFastRouteRequest, wrapCodexFastRouteFetch } from "./http-YFAPTIZD.js";
|
|
13
13
|
import { createRequire, isBuiltin } from "node:module";
|
|
@@ -2360,21 +2360,19 @@ async function locateDestination(target) {
|
|
|
2360
2360
|
}
|
|
2361
2361
|
async function createFence(file, fence) {
|
|
2362
2362
|
const directory = dirname$1(file);
|
|
2363
|
-
for (let attempt = 1;; attempt++) {
|
|
2363
|
+
for (let attempt = 1;; attempt++) try {
|
|
2364
2364
|
await mkdir(directory, {
|
|
2365
2365
|
recursive: true,
|
|
2366
2366
|
mode: 448
|
|
2367
2367
|
});
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
if (attempt === 4 || error.code !== "ENOENT") throw error;
|
|
2377
|
-
}
|
|
2368
|
+
if (!(await lstat(directory)).isDirectory()) throw new Error(`not a publication fence directory: ${directory}`);
|
|
2369
|
+
await writeFile(file, JSON.stringify(fence), {
|
|
2370
|
+
flag: "wx",
|
|
2371
|
+
mode: 384
|
|
2372
|
+
});
|
|
2373
|
+
return;
|
|
2374
|
+
} catch (error) {
|
|
2375
|
+
if (attempt === 4 || error.code !== "ENOENT") throw error;
|
|
2378
2376
|
}
|
|
2379
2377
|
}
|
|
2380
2378
|
async function removeFence(file) {
|
|
@@ -12687,14 +12685,99 @@ const agentSessionRetryMethods = {
|
|
|
12687
12685
|
waitForRetry,
|
|
12688
12686
|
setAutoRetryEnabled
|
|
12689
12687
|
};
|
|
12688
|
+
// dist/modes/interactive/components/intercom-wake-notice.js
|
|
12689
|
+
const SUBAGENT_TARGET = /^subagent-(.+)-([0-9a-f]{6,})-(\d+)$/i;
|
|
12690
|
+
const UNNAMED_CHAT_ALIAS = /^subagent-chat-([0-9a-f]{8})(?:-[0-9a-f-]+)?$/i;
|
|
12691
|
+
const SESSION_ID = /^([0-9a-f]{8})-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
12692
|
+
const LEGACY_WAKE = /^Resuming subagent `([^`]+)`(?:\s+\(([^)]+)\))?\s+for an Intercom message from ([^.]+)\./;
|
|
12693
|
+
function clean(value) {
|
|
12694
|
+
return typeof value === "string" ? singleLineDisplayText(value).trim() : "";
|
|
12695
|
+
}
|
|
12696
|
+
function shortParticipant(name) {
|
|
12697
|
+
const alias = UNNAMED_CHAT_ALIAS.exec(name);
|
|
12698
|
+
if (alias) return `session ${alias[1].toLowerCase()}`;
|
|
12699
|
+
const child = SUBAGENT_TARGET.exec(name);
|
|
12700
|
+
if (child) return `subagent-${child[1]}-…-${child[3]}`;
|
|
12701
|
+
const session = SESSION_ID.exec(name);
|
|
12702
|
+
if (session) return session[1].toLowerCase();
|
|
12703
|
+
return truncateToWidth(name, 36, "…");
|
|
12704
|
+
}
|
|
12705
|
+
/** Shared by the dormant, light and active Intercom registrations. */
|
|
12706
|
+
const renderIntercomWakeMessage = (message, { expanded, outputPad }, theme) => {
|
|
12707
|
+
const raw = typeof message.content === "string" ? message.content : message.content.flatMap((part) => part?.type === "text" ? [part.text] : []).join("\n");
|
|
12708
|
+
const record = message.details && typeof message.details === "object" ? message.details : void 0;
|
|
12709
|
+
const namedChild = clean(record?.childName);
|
|
12710
|
+
const legacy = namedChild ? void 0 : LEGACY_WAKE.exec(clean(raw));
|
|
12711
|
+
const child = namedChild || clean(legacy?.[1]);
|
|
12712
|
+
const childId = clean(record?.childId) || clean(legacy?.[2]);
|
|
12713
|
+
const senderId = clean(record?.from?.id);
|
|
12714
|
+
const senderName = clean(record?.from?.name) || clean(legacy?.[3]);
|
|
12715
|
+
const sender = senderName || senderId || "unknown";
|
|
12716
|
+
const shortChild = shortParticipant(child);
|
|
12717
|
+
const shortSender = shortParticipant(sender);
|
|
12718
|
+
const depth = typeof record?.depth === "number" && Number.isFinite(record.depth) ? Math.floor(record.depth) : 0;
|
|
12719
|
+
const body = typeof record?.message === "string" ? terminalDisplayText(record.message).replaceAll(" ", " ").trim() : "";
|
|
12720
|
+
const fallback = terminalDisplayText(raw).replaceAll(" ", " ").trim();
|
|
12721
|
+
const fallbackTitle = clean(fallback) || "Woke subagent for an Intercom message";
|
|
12722
|
+
const wakeTitle = (connector) => `${theme.fg("muted", "Woke")} ${theme.fg("toolTitle", theme.bold(shortChild))} ${theme.fg("muted", connector)} ${theme.fg("text", shortSender)}`;
|
|
12723
|
+
const title = child ? wakeTitle("for a message from") : theme.fg("text", fallbackTitle);
|
|
12724
|
+
const meta = child ? theme.fg("dim", " · result arrives here") : "";
|
|
12725
|
+
const firstBreak = body.indexOf("\n");
|
|
12726
|
+
const firstMessageLine = firstBreak === -1 ? body : body.slice(0, firstBreak);
|
|
12727
|
+
const previewMessage = firstMessageLine ? `${theme.fg("dim", " · ")}${theme.fg("text", firstMessageLine)}${firstBreak === -1 ? "" : "…"}` : "";
|
|
12728
|
+
const fullHeader = title + meta + previewMessage;
|
|
12729
|
+
const fullHeaderWidth = visibleWidth(fullHeader);
|
|
12730
|
+
const titleWidth = visibleWidth(title);
|
|
12731
|
+
const hasFields = Boolean(childId || senderName && senderId && senderId !== senderName || depth > 1 || shortChild !== child || shortSender !== sender);
|
|
12732
|
+
return {
|
|
12733
|
+
historyReplayable: true,
|
|
12734
|
+
invalidate() {},
|
|
12735
|
+
render(width) {
|
|
12736
|
+
if (width < 1) return [];
|
|
12737
|
+
const pad = Math.max(0, Math.min(Math.floor(outputPad ?? 1), Math.floor(width) - 1));
|
|
12738
|
+
const contentWidth = Math.max(1, Math.floor(width) - pad);
|
|
12739
|
+
const finish = (row) => {
|
|
12740
|
+
const padded = `${" ".repeat(pad)}${row}`;
|
|
12741
|
+
return process.env.NO_COLOR === void 0 ? padded : stripTerminalSequences(padded);
|
|
12742
|
+
};
|
|
12743
|
+
const glyph = theme.fg("accent", "↻");
|
|
12744
|
+
if (contentWidth < 2) return [finish(glyph)];
|
|
12745
|
+
const room = contentWidth - 2;
|
|
12746
|
+
if (!(child ? hasFields || firstBreak !== -1 || fullHeaderWidth > room : Boolean(fallback) && (titleWidth > room || fallback.includes("\n")))) return [finish(`${glyph} ${truncateToWidth(fullHeader, room, "…")}`)];
|
|
12747
|
+
const hint = expanded ? "" : toolBlockExpandHint();
|
|
12748
|
+
const hintWidth = visibleWidth(hint);
|
|
12749
|
+
const titleRoom = hintWidth > 0 && hintWidth + 1 < room ? room - hintWidth - 1 : room;
|
|
12750
|
+
const fittedTitle = child && titleWidth > titleRoom ? wakeTitle("for") : title;
|
|
12751
|
+
const hasRoomForMeta = child && visibleWidth(fittedTitle + meta) <= titleRoom;
|
|
12752
|
+
const preview = !expanded && previewMessage && visibleWidth(fittedTitle) + 6 <= titleRoom ? fittedTitle + previewMessage : `${fittedTitle}${hasRoomForMeta ? meta : ""}`;
|
|
12753
|
+
const rows = [finish(`${glyph} ${expanded ? truncateToWidth(preview, room, "…") : toolBlockPreviewLine(preview, room, true)}`)];
|
|
12754
|
+
if (!expanded) return rows;
|
|
12755
|
+
const details = [];
|
|
12756
|
+
const fact = (label, value) => theme.fg("dim", label) + theme.fg("muted", value);
|
|
12757
|
+
if (child) {
|
|
12758
|
+
details.push(fact("Subagent ", childId ? `${child} · ${childId}` : child), fact("From ", sender));
|
|
12759
|
+
if (senderName && senderId && senderId !== senderName) details.push(fact("Sender ID ", senderId));
|
|
12760
|
+
if (depth > 1) details.push(fact("Depth ", String(depth)));
|
|
12761
|
+
if (body) {
|
|
12762
|
+
details.push(fact("Message ", firstMessageLine));
|
|
12763
|
+
if (firstBreak !== -1) for (const line of body.slice(firstBreak + 1).split("\n")) details.push(theme.fg("muted", line));
|
|
12764
|
+
}
|
|
12765
|
+
details.push(theme.fg("dim", "Result stays with this session and arrives here."));
|
|
12766
|
+
} else details.push(...fallback.split("\n").map((line) => theme.fg("muted", line)));
|
|
12767
|
+
const canFitPrefix = contentWidth > DETAIL_PREFIX.length;
|
|
12768
|
+
const detailWidth = canFitPrefix ? contentWidth - DETAIL_PREFIX.length : contentWidth;
|
|
12769
|
+
for (const line of details) {
|
|
12770
|
+
const wrappedLines = wrapTextWithAnsi(line, detailWidth);
|
|
12771
|
+
for (const wrapped of wrappedLines.length ? wrappedLines : [""]) {
|
|
12772
|
+
const prefix = !canFitPrefix ? "" : rows.length === 1 ? theme.fg("dim", DETAIL_FIRST_PREFIX) : DETAIL_PREFIX;
|
|
12773
|
+
rows.push(finish(truncateToWidth(`${prefix}${wrapped}`, contentWidth, "…")));
|
|
12774
|
+
}
|
|
12775
|
+
}
|
|
12776
|
+
return rows;
|
|
12777
|
+
}
|
|
12778
|
+
};
|
|
12779
|
+
};
|
|
12690
12780
|
// dist/modes/interactive/components/dormant-builtin-messages.js
|
|
12691
|
-
const WAKE_GLYPH = "↻";
|
|
12692
|
-
const DETAIL_FIRST_PREFIX = " ⎿ ";
|
|
12693
|
-
const DETAIL_PREFIX = " ";
|
|
12694
|
-
const SUBAGENT_TARGET_RE = /^subagent-(.+)-([0-9a-f]{6,})-(\d+)$/i;
|
|
12695
|
-
const UNNAMED_CHAT_ALIAS_RE = /^subagent-chat-([0-9a-f]{8})(?:-[0-9a-f-]+)?$/i;
|
|
12696
|
-
const UUID_RE = /^([0-9a-f]{8})-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
12697
|
-
const LEGACY_WAKE_RE = /^Resuming subagent `([^`]+)`(?:\s+\(([^)]+)\))?\s+for an Intercom message from ([^.]+)\./;
|
|
12698
12781
|
const CONTENT_READY_RE = /^Content fetched for (\d+)\/(\d+) URLs \[([^\]]+)\]/;
|
|
12699
12782
|
const CONTENT_ERROR_RE = /^Content fetch failed \[([^\]]+)\]:\s*([\s\S]+)$/;
|
|
12700
12783
|
function cleanOneLine(value) {
|
|
@@ -12752,126 +12835,6 @@ var ReplayableBlock = class {
|
|
|
12752
12835
|
return this.inner.render(width);
|
|
12753
12836
|
}
|
|
12754
12837
|
};
|
|
12755
|
-
function formatWakeParticipant(rawName, rawId) {
|
|
12756
|
-
const name = rawName ? cleanOneLine(rawName) : "";
|
|
12757
|
-
const id = rawId ? cleanOneLine(rawId) : "";
|
|
12758
|
-
const candidate = name || id;
|
|
12759
|
-
if (!candidate) return "unknown";
|
|
12760
|
-
const aliasMatch = UNNAMED_CHAT_ALIAS_RE.exec(candidate);
|
|
12761
|
-
if (aliasMatch) return `session ${aliasMatch[1].toLowerCase()}`;
|
|
12762
|
-
const subagentMatch = SUBAGENT_TARGET_RE.exec(candidate);
|
|
12763
|
-
if (subagentMatch) return `subagent-${subagentMatch[1]}-…-${subagentMatch[3]}`;
|
|
12764
|
-
const uuidMatch = UUID_RE.exec(candidate);
|
|
12765
|
-
if (uuidMatch) return uuidMatch[1].toLowerCase();
|
|
12766
|
-
return visibleWidth(candidate) > 36 ? truncateToWidth(candidate, 36, "…") : candidate;
|
|
12767
|
-
}
|
|
12768
|
-
function parseWake(content, details) {
|
|
12769
|
-
const record = details && typeof details === "object" ? details : void 0;
|
|
12770
|
-
const rawChildName = typeof record?.childName === "string" ? cleanOneLine(record.childName) : "";
|
|
12771
|
-
if (rawChildName) {
|
|
12772
|
-
const rawChildId = typeof record?.childId === "string" ? cleanOneLine(record.childId) : "";
|
|
12773
|
-
const fromRecord = record?.from && typeof record.from === "object" ? record.from : void 0;
|
|
12774
|
-
const rawFromName = typeof fromRecord?.name === "string" ? cleanOneLine(fromRecord.name) : "";
|
|
12775
|
-
const rawFromId = typeof fromRecord?.id === "string" ? cleanOneLine(fromRecord.id) : "";
|
|
12776
|
-
const rawDepth = typeof record?.depth === "number" && Number.isFinite(record.depth) ? Math.floor(record.depth) : void 0;
|
|
12777
|
-
return {
|
|
12778
|
-
childName: rawChildName,
|
|
12779
|
-
...rawChildId ? { childId: rawChildId } : {},
|
|
12780
|
-
...rawFromName ? { fromName: rawFromName } : {},
|
|
12781
|
-
...rawFromId ? { fromId: rawFromId } : {},
|
|
12782
|
-
...rawDepth !== void 0 && rawDepth >= 1 ? { depth: rawDepth } : {}
|
|
12783
|
-
};
|
|
12784
|
-
}
|
|
12785
|
-
const text = cleanOneLine(messageText(content));
|
|
12786
|
-
const legacy = LEGACY_WAKE_RE.exec(text);
|
|
12787
|
-
if (!legacy) return void 0;
|
|
12788
|
-
const childName = cleanOneLine(legacy[1] ?? "");
|
|
12789
|
-
if (!childName) return void 0;
|
|
12790
|
-
const childId = legacy[2] ? cleanOneLine(legacy[2]) : void 0;
|
|
12791
|
-
const sender = legacy[3] ? cleanOneLine(legacy[3]) : void 0;
|
|
12792
|
-
return {
|
|
12793
|
-
childName,
|
|
12794
|
-
...childId ? { childId } : {},
|
|
12795
|
-
...sender ? { fromName: sender } : {}
|
|
12796
|
-
};
|
|
12797
|
-
}
|
|
12798
|
-
var DormantWakeNoticeComponent = class {
|
|
12799
|
-
historyReplayable = true;
|
|
12800
|
-
parsed;
|
|
12801
|
-
fallbackText;
|
|
12802
|
-
fallbackMultiline;
|
|
12803
|
-
expanded;
|
|
12804
|
-
outputPad;
|
|
12805
|
-
theme;
|
|
12806
|
-
constructor(parsed, fallbackText, fallbackMultiline, expanded, outputPad, theme) {
|
|
12807
|
-
this.parsed = parsed;
|
|
12808
|
-
this.fallbackText = fallbackText;
|
|
12809
|
-
this.fallbackMultiline = fallbackMultiline;
|
|
12810
|
-
this.expanded = expanded;
|
|
12811
|
-
this.outputPad = outputPad;
|
|
12812
|
-
this.theme = theme;
|
|
12813
|
-
}
|
|
12814
|
-
invalidate() {}
|
|
12815
|
-
render(width) {
|
|
12816
|
-
if (width < 1) return [];
|
|
12817
|
-
const safeWidth = Math.floor(width);
|
|
12818
|
-
const pad = Math.max(0, Math.min(Math.floor(this.outputPad), safeWidth - 1));
|
|
12819
|
-
const contentWidth = Math.max(1, safeWidth - pad);
|
|
12820
|
-
const noColor = process.env.NO_COLOR !== void 0;
|
|
12821
|
-
const finish = (row) => {
|
|
12822
|
-
const padded = `${" ".repeat(pad)}${row}`;
|
|
12823
|
-
return noColor ? stripTerminalSequences(padded) : padded;
|
|
12824
|
-
};
|
|
12825
|
-
const glyph = this.theme.fg("accent", WAKE_GLYPH);
|
|
12826
|
-
if (contentWidth < 2) return [finish(truncateToWidth(glyph, contentWidth, ""))];
|
|
12827
|
-
const parsed = this.parsed;
|
|
12828
|
-
let header;
|
|
12829
|
-
if (parsed) {
|
|
12830
|
-
const shortChild = formatWakeParticipant(parsed.childName, void 0);
|
|
12831
|
-
const shortSender = formatWakeParticipant(parsed.fromName, parsed.fromId);
|
|
12832
|
-
const title = `${this.theme.fg("muted", "Woke")} ${this.theme.fg("toolTitle", this.theme.bold(shortChild))} ${this.theme.fg("muted", "for a message from")} ${this.theme.fg("text", shortSender)}`;
|
|
12833
|
-
const metaPlain = " · result arrives here";
|
|
12834
|
-
const titleWidth = visibleWidth(title);
|
|
12835
|
-
const metaWidth = visibleWidth(metaPlain);
|
|
12836
|
-
if (2 + titleWidth + metaWidth <= contentWidth) header = `${glyph} ${title}${this.theme.fg("dim", metaPlain)}`;
|
|
12837
|
-
else if (2 + titleWidth <= contentWidth) header = `${glyph} ${title}`;
|
|
12838
|
-
else header = `${glyph} ${truncateToWidth(title, contentWidth - 2, "…")}`;
|
|
12839
|
-
} else {
|
|
12840
|
-
const label = this.fallbackText || "Woke subagent for an Intercom message";
|
|
12841
|
-
header = `${glyph} ${truncateToWidth(this.theme.fg("text", label), contentWidth - 2, "…")}`;
|
|
12842
|
-
}
|
|
12843
|
-
if (!this.expanded) return [finish(header)];
|
|
12844
|
-
const details = [];
|
|
12845
|
-
if (parsed) {
|
|
12846
|
-
const childLine = parsed.childId ? `${parsed.childName} · ${parsed.childId}` : parsed.childName;
|
|
12847
|
-
details.push(`${this.theme.fg("dim", "Subagent ")}${this.theme.fg("muted", childLine)}`);
|
|
12848
|
-
const fromDisplay = parsed.fromName ?? parsed.fromId ?? "unknown";
|
|
12849
|
-
details.push(`${this.theme.fg("dim", "From ")}${this.theme.fg("muted", fromDisplay)}`);
|
|
12850
|
-
if (parsed.fromName && parsed.fromId && parsed.fromId !== parsed.fromName) details.push(`${this.theme.fg("dim", "Sender ID ")}${this.theme.fg("dim", parsed.fromId)}`);
|
|
12851
|
-
if (parsed.depth !== void 0 && parsed.depth > 1) details.push(`${this.theme.fg("dim", "Depth ")}${this.theme.fg("muted", String(parsed.depth))}`);
|
|
12852
|
-
details.push(this.theme.fg("dim", "Result stays with this session and arrives here."));
|
|
12853
|
-
} else if (this.fallbackMultiline) for (const line of this.fallbackMultiline.split("\n")) details.push(this.theme.fg("muted", line));
|
|
12854
|
-
const detailWidth = contentWidth > 5 ? contentWidth - 5 : contentWidth;
|
|
12855
|
-
const rows = [header];
|
|
12856
|
-
let firstRow = true;
|
|
12857
|
-
for (const line of details) {
|
|
12858
|
-
const wrappedLines = wrapTextWithAnsi(line, Math.max(1, detailWidth));
|
|
12859
|
-
for (const wrapped of wrappedLines) {
|
|
12860
|
-
if (contentWidth > 5) {
|
|
12861
|
-
const prefix = firstRow ? this.theme.fg("dim", DETAIL_FIRST_PREFIX) : DETAIL_PREFIX;
|
|
12862
|
-
rows.push(`${prefix}${wrapped}`);
|
|
12863
|
-
} else rows.push(truncateToWidth(wrapped, contentWidth, "…"));
|
|
12864
|
-
firstRow = false;
|
|
12865
|
-
}
|
|
12866
|
-
}
|
|
12867
|
-
return rows.map(finish);
|
|
12868
|
-
}
|
|
12869
|
-
};
|
|
12870
|
-
/** Dormant renderer for `intercom_subagent_wake`, matching `packages/intercom/ui/wake-notice.ts` before activation. */
|
|
12871
|
-
const renderDormantIntercomWakeMessage = (message, options, theme) => {
|
|
12872
|
-
const raw = messageText(message.content);
|
|
12873
|
-
return new DormantWakeNoticeComponent(parseWake(message.content, message.details), cleanOneLine(raw), cleanMultiline(raw), options.expanded, options.outputPad ?? 1, theme);
|
|
12874
|
-
};
|
|
12875
12838
|
/** Dormant renderer for `curator-config`, matching `packages/web-access/message-renderers.ts` before activation. */
|
|
12876
12839
|
const renderDormantCuratorConfigMessage = (message, options, theme) => {
|
|
12877
12840
|
const details = message.details && typeof message.details === "object" ? message.details : void 0;
|
|
@@ -13570,7 +13533,7 @@ const intercomLazyBuiltinSpec = {
|
|
|
13570
13533
|
atomic.registerMessageRenderer(ENDED_CHILD_WAKE_MESSAGE_TYPE, (message, options, theme) => {
|
|
13571
13534
|
const loaded = controller.active?.captured.messageRenderers.get(ENDED_CHILD_WAKE_MESSAGE_TYPE);
|
|
13572
13535
|
if (loaded) return loaded(message, options, theme);
|
|
13573
|
-
return
|
|
13536
|
+
return renderIntercomWakeMessage(message, options, theme);
|
|
13574
13537
|
});
|
|
13575
13538
|
atomic.registerMessageRenderer("intercom_message", (message, options, theme) => {
|
|
13576
13539
|
const loaded = controller.active?.captured.messageRenderers.get("intercom_message");
|
|
@@ -14993,6 +14956,7 @@ const childFields = {
|
|
|
14993
14956
|
owner: "owner"
|
|
14994
14957
|
};
|
|
14995
14958
|
const customFields = {
|
|
14959
|
+
"atomic.tool-output": { hash: "hash" },
|
|
14996
14960
|
"subagent-child": "child",
|
|
14997
14961
|
"atomic-pooled-delivery-op": { op: "op" },
|
|
14998
14962
|
intercom_session_identity: {
|
|
@@ -15604,6 +15568,7 @@ async function chunkedTreeOutline(seq, chunks) {
|
|
|
15604
15568
|
customType: "short",
|
|
15605
15569
|
targetId: "string",
|
|
15606
15570
|
label: "labelPreview",
|
|
15571
|
+
data: { hash: "hash" },
|
|
15607
15572
|
message: {
|
|
15608
15573
|
role: "short",
|
|
15609
15574
|
stopReason: "short",
|
|
@@ -15613,6 +15578,7 @@ async function chunkedTreeOutline(seq, chunks) {
|
|
|
15613
15578
|
})()));
|
|
15614
15579
|
const m = object(e.message);
|
|
15615
15580
|
const content = object(m.content);
|
|
15581
|
+
const hash = object(e.data).hash;
|
|
15616
15582
|
return {
|
|
15617
15583
|
seq,
|
|
15618
15584
|
id: String(e.id),
|
|
@@ -15626,6 +15592,7 @@ async function chunkedTreeOutline(seq, chunks) {
|
|
|
15626
15592
|
} : {},
|
|
15627
15593
|
...e.type === "custom" && e.customType === "atomic.leaf" ? { leafMove: true } : {},
|
|
15628
15594
|
...e.type === "custom" && e.customType === "subagent-child" ? { childRecord: true } : {},
|
|
15595
|
+
...e.type === "custom" && e.customType === "atomic.tool-output" && typeof hash === "string" && /^[0-9a-f]{64}$/.test(hash) ? { toolOutputHash: hash } : {},
|
|
15629
15596
|
...e.type === "label" ? {
|
|
15630
15597
|
labelTarget: String(e.targetId),
|
|
15631
15598
|
label: typeof e.label === "string" ? e.label : void 0
|
|
@@ -18740,7 +18707,7 @@ function createMcpToolRenderers(label) {
|
|
|
18740
18707
|
text: styled,
|
|
18741
18708
|
maxVisualLines: OUTPUT_PREVIEW_LINES,
|
|
18742
18709
|
keep: "start",
|
|
18743
|
-
formatHint: (hidden) =>
|
|
18710
|
+
formatHint: (hidden) => `… ${parenthesizedKeyHint("app.tools.expand", "to expand", `${hidden} more line${hidden === 1 ? "" : "s"}`)}`
|
|
18744
18711
|
}));
|
|
18745
18712
|
const fullOutputPath = result.details?.fullOutputPath;
|
|
18746
18713
|
if (fullOutputPath) component.addChild(new Text(theme.fg("muted", `Full output: ${fullOutputPath}`), 0, 0));
|
|
@@ -26086,6 +26053,19 @@ var RuntimeCredentials = class {
|
|
|
26086
26053
|
};
|
|
26087
26054
|
return this.store.read(providerId, options);
|
|
26088
26055
|
}
|
|
26056
|
+
async usageAccountKey(provider, kind, signal, token) {
|
|
26057
|
+
if (this.overrides.has(provider)) return void 0;
|
|
26058
|
+
const matches = (credential) => isUsageCredential(kind, credential) && (token === void 0 || usageCredentialToken(credential) === token);
|
|
26059
|
+
const current = await this.store.read(provider, { signal });
|
|
26060
|
+
if (!matches(current)) return void 0;
|
|
26061
|
+
const key = usageAccountKey(kind, current);
|
|
26062
|
+
if (key || !(this.store instanceof AuthStorage)) return key;
|
|
26063
|
+
const stamped = await this.store.modify(provider, async (latest) => matches(latest) && !usageAccountKey(kind, latest) ? {
|
|
26064
|
+
...latest,
|
|
26065
|
+
usageObservationId: randomUUID()
|
|
26066
|
+
} : void 0, { signal });
|
|
26067
|
+
return matches(stamped) ? usageAccountKey(kind, stamped) : void 0;
|
|
26068
|
+
}
|
|
26089
26069
|
async list(options) {
|
|
26090
26070
|
const entries = new Map((await this.store.list(options)).map((entry) => [entry.providerId, entry]));
|
|
26091
26071
|
for (const providerId of this.overrides.keys()) entries.set(providerId, {
|
|
@@ -26294,12 +26274,14 @@ var ModelRuntimeStreaming = class {
|
|
|
26294
26274
|
ownsExtensionTransport;
|
|
26295
26275
|
transportModel;
|
|
26296
26276
|
reloadCredentials;
|
|
26297
|
-
|
|
26277
|
+
usagePublisher;
|
|
26278
|
+
constructor(models, resolveAuth, ownsExtensionTransport, transportModel = (model) => model, reloadCredentials = async () => {}, usagePublisher) {
|
|
26298
26279
|
this.models = models;
|
|
26299
26280
|
this.resolveAuth = resolveAuth;
|
|
26300
26281
|
this.ownsExtensionTransport = ownsExtensionTransport;
|
|
26301
26282
|
this.transportModel = transportModel;
|
|
26302
26283
|
this.reloadCredentials = reloadCredentials;
|
|
26284
|
+
this.usagePublisher = usagePublisher;
|
|
26303
26285
|
}
|
|
26304
26286
|
/**
|
|
26305
26287
|
* Attach the first-party ChatGPT Codex routing identity to a prepared request.
|
|
@@ -26342,11 +26324,16 @@ var ModelRuntimeStreaming = class {
|
|
|
26342
26324
|
} : void 0;
|
|
26343
26325
|
const apiKey = providerOptions.apiKey ?? resolution.auth.apiKey;
|
|
26344
26326
|
const credentialHeaderNames = new Set(Object.keys(resolution.auth.headers ?? {}).map((name) => name.toLowerCase()));
|
|
26345
|
-
if (!this.ownsExtensionTransport(model)) {
|
|
26327
|
+
if (!this.ownsExtensionTransport(model) && (model.api === "openai-responses" || model.api === "openai-codex-responses" || model.api === "anthropic-messages")) {
|
|
26328
|
+
const usageToken = subscriptionBearer({
|
|
26329
|
+
apiKey,
|
|
26330
|
+
headers
|
|
26331
|
+
});
|
|
26332
|
+
const publishUsage = usageToken ? this.usagePublisher?.(model.provider, usageToken) : void 0;
|
|
26346
26333
|
const directUsage = model.api === "openai-responses" && resolution.source === "OAuth" && this.transportModel(model).provider === "openai" ? openAiDirectUsageObserver(requestModel, {
|
|
26347
26334
|
apiKey,
|
|
26348
26335
|
headers
|
|
26349
|
-
}) : void 0;
|
|
26336
|
+
}, publishUsage) : void 0;
|
|
26350
26337
|
if (directUsage || model.api === "openai-codex-responses" || model.api === "anthropic-messages") {
|
|
26351
26338
|
const onResponse = providerOptions.onResponse;
|
|
26352
26339
|
providerOptions.onResponse = (response, target) => {
|
|
@@ -26354,7 +26341,7 @@ var ModelRuntimeStreaming = class {
|
|
|
26354
26341
|
else observeSubscriptionUsage(requestModel, {
|
|
26355
26342
|
apiKey,
|
|
26356
26343
|
headers
|
|
26357
|
-
}, response.headers);
|
|
26344
|
+
}, response.headers, publishUsage);
|
|
26358
26345
|
return onResponse?.(response, target);
|
|
26359
26346
|
};
|
|
26360
26347
|
}
|
|
@@ -26675,7 +26662,18 @@ var ModelRuntime = class ModelRuntime {
|
|
|
26675
26662
|
...model,
|
|
26676
26663
|
provider: source
|
|
26677
26664
|
} : model;
|
|
26678
|
-
}, () => this.credentials.reload())
|
|
26665
|
+
}, () => this.credentials.reload(), (provider, token) => {
|
|
26666
|
+
const store = usageObservationStore(this);
|
|
26667
|
+
if (!store || !this.getBuiltinAccountProvider(provider)) return void 0;
|
|
26668
|
+
const credential = this.credentials.peek(provider);
|
|
26669
|
+
return (kind, observation) => {
|
|
26670
|
+
const captured = isUsageCredential(kind, credential) && usageCredentialToken(credential) === token ? usageAccountKey(kind, credential) : void 0;
|
|
26671
|
+
store.enqueue(captured ?? provider, async () => {
|
|
26672
|
+
const key = captured ?? await this[readUsageAccountKey](provider, kind, AbortSignal.timeout(500), token);
|
|
26673
|
+
return key ? [key, observation] : void 0;
|
|
26674
|
+
});
|
|
26675
|
+
};
|
|
26676
|
+
});
|
|
26679
26677
|
this.rebuildProviders();
|
|
26680
26678
|
}
|
|
26681
26679
|
static async create(options = {}) {
|
|
@@ -27167,6 +27165,9 @@ var ModelRuntime = class ModelRuntime {
|
|
|
27167
27165
|
[readSubscriptionCredential](provider, signal) {
|
|
27168
27166
|
return this.credentials.read(provider, { signal });
|
|
27169
27167
|
}
|
|
27168
|
+
[readUsageAccountKey](provider, kind, signal, token) {
|
|
27169
|
+
return this.credentials.usageAccountKey(provider, kind, signal, token);
|
|
27170
|
+
}
|
|
27170
27171
|
/** Return stored credential metadata synchronously without refreshing auth. */
|
|
27171
27172
|
getCredentialSnapshot(providerId) {
|
|
27172
27173
|
return this.credentials.peek(normalizeProviderId(providerId));
|
|
@@ -27352,7 +27353,8 @@ var ModelRuntime = class ModelRuntime {
|
|
|
27352
27353
|
const refreshCatalog = options.refreshCatalog ?? true;
|
|
27353
27354
|
const signal = operationSignal(void 0);
|
|
27354
27355
|
await this.enqueueCredentialOperation(providerId, signal, async () => {
|
|
27355
|
-
|
|
27356
|
+
const { usageObservationId: _oldUsageId, ...login } = credential;
|
|
27357
|
+
await this.credentials.modify(providerId, async () => login);
|
|
27356
27358
|
this.markCatalogInputsChanged();
|
|
27357
27359
|
await this.synchronizeCredentialState(providerId, "saveCredential", credential, async () => {
|
|
27358
27360
|
if (!refreshCatalog) {
|
|
@@ -28353,6 +28355,68 @@ async function resolveDeferredStartupModel(input) {
|
|
|
28353
28355
|
modelRuntime
|
|
28354
28356
|
})).model;
|
|
28355
28357
|
}
|
|
28358
|
+
// dist/cli/startup-progress.js
|
|
28359
|
+
/** Owns one temporary line, never the input or modes the startup capture will hand to the TUI. */
|
|
28360
|
+
function createStartupProgress(terminal, themeSetting) {
|
|
28361
|
+
let working = false;
|
|
28362
|
+
let finished = false;
|
|
28363
|
+
let lastLine = "";
|
|
28364
|
+
let measuredWidth = 0;
|
|
28365
|
+
let writable = true;
|
|
28366
|
+
const signals = [];
|
|
28367
|
+
const paint = () => {
|
|
28368
|
+
if (!writable) return;
|
|
28369
|
+
const width = terminal.columns;
|
|
28370
|
+
if (!width) return;
|
|
28371
|
+
const row = status.render(width - 1)[0] ?? "";
|
|
28372
|
+
if (row === lastLine && width === measuredWidth) return;
|
|
28373
|
+
if (row || lastLine) {
|
|
28374
|
+
const frame = `\r${width < measuredWidth && width <= visibleWidth(lastLine) ? "\x1B[J" : "\x1B[K"}${row}\r`;
|
|
28375
|
+
try {
|
|
28376
|
+
terminal.write(frame);
|
|
28377
|
+
} catch {
|
|
28378
|
+
writable = false;
|
|
28379
|
+
}
|
|
28380
|
+
}
|
|
28381
|
+
lastLine = row;
|
|
28382
|
+
measuredWidth = width;
|
|
28383
|
+
};
|
|
28384
|
+
const status = new SessionLoadingStatus(paint);
|
|
28385
|
+
const pause = () => {
|
|
28386
|
+
if (!working) return;
|
|
28387
|
+
working = false;
|
|
28388
|
+
terminal.off("resize", paint);
|
|
28389
|
+
process.off("exit", pause);
|
|
28390
|
+
for (const signal of signals.splice(0)) process.off(signal, pause);
|
|
28391
|
+
status.done();
|
|
28392
|
+
};
|
|
28393
|
+
return {
|
|
28394
|
+
phase(message) {
|
|
28395
|
+
if (finished || !writable) return;
|
|
28396
|
+
if (!working) {
|
|
28397
|
+
working = true;
|
|
28398
|
+
terminal.on("resize", paint);
|
|
28399
|
+
process.once("exit", pause);
|
|
28400
|
+
for (const signal of [
|
|
28401
|
+
"SIGINT",
|
|
28402
|
+
"SIGTERM",
|
|
28403
|
+
"SIGHUP"
|
|
28404
|
+
]) {
|
|
28405
|
+
if (process.listenerCount(signal) === 0) continue;
|
|
28406
|
+
signals.push(signal);
|
|
28407
|
+
process.prependOnceListener(signal, pause);
|
|
28408
|
+
}
|
|
28409
|
+
status.begin(() => initTheme(resolveThemeSetting(themeSetting, getTerminalTheme())));
|
|
28410
|
+
}
|
|
28411
|
+
status.phase(message);
|
|
28412
|
+
},
|
|
28413
|
+
pause,
|
|
28414
|
+
done() {
|
|
28415
|
+
finished = true;
|
|
28416
|
+
pause();
|
|
28417
|
+
}
|
|
28418
|
+
};
|
|
28419
|
+
}
|
|
28356
28420
|
// dist/main-session-options.js
|
|
28357
28421
|
/**
|
|
28358
28422
|
* A model named with --model runs as named: it falls back only to the models
|
|
@@ -28573,19 +28637,28 @@ function assertRpcSuccess(response) {
|
|
|
28573
28637
|
}
|
|
28574
28638
|
if (response.errorCode === "debug_error") throw rehydrateDebugError(response.errorDetails);
|
|
28575
28639
|
if (response.errorCode === "credential_synchronization" && response.errorDetails) throw new CredentialSynchronizationError(response.errorDetails.providerId, response.errorDetails.operation, void 0, { cause: new Error(response.error) });
|
|
28640
|
+
if (response.errorCode === "damaged_parent_link" && response.errorDetails) {
|
|
28641
|
+
const { entryId, parentId, reason } = response.errorDetails;
|
|
28642
|
+
if (typeof entryId === "string" && typeof parentId === "string" && (reason === "self" || reason === "later" || reason === "absent")) throw new SessionInvalidParentError(entryId, parentId, reason);
|
|
28643
|
+
}
|
|
28644
|
+
if (response.errorCode === "duplicate_history_entry" && typeof response.errorDetails?.entryId === "string") throw new SessionDuplicateEntryError(response.errorDetails.entryId);
|
|
28645
|
+
if (response.errorCode === "session_already_open") {
|
|
28646
|
+
const details = response.errorDetails;
|
|
28647
|
+
if (typeof details?.sessionId === "string" && typeof details.pid === "number" && typeof details.host === "string") throw new SessionAlreadyOpenError(details.sessionId, details);
|
|
28648
|
+
}
|
|
28576
28649
|
if (response.errorCode === "missing_session_cwd" && isSerializedMissingSessionCwdError(response.errorDetails)) throw rehydrateMissingSessionCwdError(response.errorDetails);
|
|
28577
28650
|
throw new Error(response.error);
|
|
28578
28651
|
}
|
|
28579
|
-
export { ANTHROPIC_FAST_MODE_MODEL_IDS, AgentTaskHost, BLUEPRINT_RULES, Bm25Ranker, CredentialSynchronizationError, DEFAULT_TASK_HEARTBEAT_MS, DefaultPackageManager, FAST_MODEL_ID_SUFFIX, FAST_MODEL_SERVICE_TIER, FAST_MODEL_SPEED, LIST_MCP_RESOURCES_TOOL, LIST_MCP_RESOURCE_TEMPLATES_TOOL, MIN_TASK_HEARTBEAT_MS, ModelRuntime, OAuthLoginTransactionError, QuestionnaireSession, READ_MCP_RESOURCE_TOOL, SNAPSHOT_DENY_PATTERNS, SNAPSHOT_IGNORE_FILE, SNAPSHOT_KEY_FILE_PATTERNS, TASK_COMPLETION_MESSAGE_TYPE, TASK_HEARTBEAT_MESSAGE_TYPE, TOOL_SEARCH_TOOL_NAME, TaskCompletionOutbox, WORKSPACE_BINDING_ENTRY_TYPE, WORKSPACE_WRITE_TOOL_NAMES, abortTurnRetries, acquireWorkspaceWriterLease, activatesOnRegistration, admitPooledWorktree, adoptPrebuiltSeed, agentSessionModelsMethods, agentSessionRetryMethods, applyToolLoadout, assertRpcSuccess, assertSessionManagerInWorktreeAsync, authForStream, bindSessionWorkspace, bindingOf, blueprintPlatformOf, buildItemsForQuestion, buildSessionMemoryGuideline, buildSessionOptions, buildSkillCatalog, buildSkillCatalogAsync, buildSkillCatalogWith, buildSystemPrompt, buildSystemPromptSections, cancelFirstPromptModel, captureLocatedCheckout, captureWorktreeSnapshot, carryOverDegradedWork, checkResumeStoragePreconditions, childOfAttempt, chunkedAnswerContent, chunkedAnswerHeader, chunkedBranchState, chunkedChildHeading, chunkedEntryHasId, chunkedForkLink, chunkedPrefixFields, chunkedResumeProjection, chunkedTaskDetailFields, chunkedToolResult, chunkedToolResultEntry, chunkedTreeOutline, claimIdleWorktree, clearExtensionCache, commandOutputExcerpt, completionTitleDescription, completionTitleText, computeDeferExtensions, computeInteractiveEngineResourceDeferral, computeStartupInputCaptureEnabled, computeStartupTrustPromptPossible, confirmPooledWorktreeLease, copilotAdvertisedFastModelIds, createAskUserQuestionToolDefinition, createAuthInteraction, createHostModuleJiti, createLoadedAskUserQuestionToolDefinition, createMcpResourceToolDefinitions, createMcpToolDefinition, createMcpToolName, createMcpToolRenderers, createToolNameMatcher, createToolSearchDocument, createToolSearchExtension, createToolSearchToolDefinition, defaultBuiltinExtensions, defaultResumePreflightIo, deferFirstPromptModel, deriveFastModelVariants, diffSystemPromptSections, discardPooledWorktree, emitProjectTrustEvent, emptySkillCatalog, enablePrintModelSelection, engineExtensionsCanDecide, ensureDefaultLazyBuiltinsRegistered, ensureRetryPromise, evictIdleWorktrees, executeNativePty, executeSupervisedCommand, expandPromptTemplate, expandSkillCommand, extensionLoaderTestHooks, extensionsCanDecideProjectTrust, fastModelId, findInitialModel, finishedSubagentResumeText, firstSubagentAttempt, forkSeedFields, formatScopedModelList, formatSkillsForPrompt, formatTaskHeartbeatDuration, formatTaskHeartbeatStatus, getExistingGitInstallPathAsync, getManagedNpmInstallPath, getModelFastRoute, getSkillCatalog, gitText, gitUnavailableProblem, hasPrintModelSelection, holdRestoredWorktree, holdsSessionSnapshotRef, hostPlatform, inheritWorkspace, insideThroughDirectories, isBoundWorkspace, isDegradableRestoreFailure, isDeniedSnapshotPath, isHeadOnlyAdvance, isMcpToolName, isNativeFastRouteApi, isOAuthLoginCancelled, isRecoverableRestoreFailure, isRegisteredToolAllowed, isResumableStop, isRetiredToolName, isToolActivatable, isToolDeclarationHidden, keepSessionSnapshotCommit, latestSubagentAttempt, latestSubagentAttempts, loadExtensionModule, loadPromptsStageAsync, loadSkills, loadSkillsFromDir, loadSkillsStageAsync, loadSnapshotPathPolicy, loadThemesStageAsync, locateCheckout, loginIsolatedApiKeyProvider, loginIsolatedOAuthProvider, loginRuntimeOAuthProvider, lookupOwnedTask, markRuntimeStreamFunction, mergeHeaders, messageHeadIn, messageRoleIn, namesSessionFolderInGuidelines, nextCaptureTick, normalizeBuildSystemPromptOptions, normalizeOAuthLoginError, nulFields, objectStorePath, openWorkspaceRepository, parseBlueprint, parseFrontmatter, parseSource, pendingLfsDownload, pendingTaskCompletionIntents, pooledWorktreeHolder, prepareExtensionEntries, preparePromptsCommitAsync, prepareSkillsCommitAsync, prepareThemesCommitAsync, presentQuestionnaire, projectForkMetadata, projectToolLoadout, ranOnModelLine, rateLimitGuidance, read, readChunkedWorkflowRunId, readExtensionGraphManifest, readRepositoryConfig, readValue, recordPooledWorktreeState, recordSessionWorkspace, recordWorktreeCapture, releaseRestoredWorktree, releaseSessionSnapshotRefs, releasedWaitingOn, removeRestoredWorktree, require_dist, require_semver, resolveDeferredStartupModel, resolveRestoredModelReference, resolveToolNames, resolveUpstreamModelId, resolveWorkspace, restoreBestWorktree, restoreDegradedWorktree, restoreDegradedWorktreeAt, restoreWorkspace, restoreWorktree, restoreWorktreeAt, restoreWorktreeSnapshot, resumableSubagentResult, retireSessionSnapshotRefs, retryIsCurrent, runBeforeAgentStartHandlers, runBeforeProviderRequestHandlers, runBoundaryHandlers, runContextHandlers, runGenericHandlers, runGit, runInputHandlers, runMessageEndHandlers, runResourcesDiscoverHandlers, runSessionRecoveryHandlers, runToolCallHandlers, runToolResultHandlers, runUserBashHandlers, seedDirectory, seedManifestPath, seedPathSegments, selectDocument, selectedToolNames, sessionAccountCheckpoint, setAsideWorktree, setWorktreeSnapshotGit, settledTaskResumeId, skip, snapshotEventHandlers, snapshotRestoreWarnings, startupErrorHandlerTokens, storagePreconditionProblems, storeCheckoutHead, streamWithFastRoute, stringValue, stripFrontmatter, subagentResumeId, supersededSettledAttempts, taskCompletionMessage, taskHeartbeatKindLabel, taskNoticeLine, uncachedCopilotModelHint, unresolvedFallbackModelDiagnostics, unrestoredRecord, updatePromptsFromPathsAsync, updateSkillsFromPathsAsync, updateThemesFromPathsAsync, useExtensionCacheCwd, usesAnthropicFastMode, usesChatGptCodexTransport, usesFirstPartyCodexRouting, usesOpenAIFastServiceTier, usesXaiFastServiceTier, validateBashWait, validateTaskHeartbeatMs, verifyWorktree$1 as verifyWorktree, waitForSupervisedCommand, waitingReleasedShells, waitingReleasedTools, withCodexFastRouteHeaders, withDefaultBuiltinExtensions, withFastModelVariants, withFastRouteStreamOptions, withScratchDirectory, withSeedLock, withoutSupersededAttempts, workspaceSandboxDenial, workspaceSessionCwd, workspaceSessionCwdAsync, worktreeSetAside, writeSeedManifest, writeWorkingTree };
|
|
28652
|
+
export { ANTHROPIC_FAST_MODE_MODEL_IDS, AgentTaskHost, BLUEPRINT_RULES, Bm25Ranker, CredentialSynchronizationError, DEFAULT_TASK_HEARTBEAT_MS, DefaultPackageManager, FAST_MODEL_ID_SUFFIX, FAST_MODEL_SERVICE_TIER, FAST_MODEL_SPEED, LIST_MCP_RESOURCES_TOOL, LIST_MCP_RESOURCE_TEMPLATES_TOOL, MIN_TASK_HEARTBEAT_MS, ModelRuntime, OAuthLoginTransactionError, QuestionnaireSession, READ_MCP_RESOURCE_TOOL, SNAPSHOT_DENY_PATTERNS, SNAPSHOT_IGNORE_FILE, SNAPSHOT_KEY_FILE_PATTERNS, TASK_COMPLETION_MESSAGE_TYPE, TASK_HEARTBEAT_MESSAGE_TYPE, TOOL_SEARCH_TOOL_NAME, TaskCompletionOutbox, WORKSPACE_BINDING_ENTRY_TYPE, WORKSPACE_WRITE_TOOL_NAMES, abortTurnRetries, acquireWorkspaceWriterLease, activatesOnRegistration, admitPooledWorktree, adoptPrebuiltSeed, agentSessionModelsMethods, agentSessionRetryMethods, applyToolLoadout, assertRpcSuccess, assertSessionManagerInWorktreeAsync, authForStream, bindSessionWorkspace, bindingOf, blueprintPlatformOf, buildItemsForQuestion, buildSessionMemoryGuideline, buildSessionOptions, buildSkillCatalog, buildSkillCatalogAsync, buildSkillCatalogWith, buildSystemPrompt, buildSystemPromptSections, cancelFirstPromptModel, captureLocatedCheckout, captureWorktreeSnapshot, carryOverDegradedWork, checkResumeStoragePreconditions, childOfAttempt, chunkedAnswerContent, chunkedAnswerHeader, chunkedBranchState, chunkedChildHeading, chunkedEntryHasId, chunkedForkLink, chunkedPrefixFields, chunkedResumeProjection, chunkedTaskDetailFields, chunkedToolResult, chunkedToolResultEntry, chunkedTreeOutline, claimIdleWorktree, clearExtensionCache, commandOutputExcerpt, completionTitleDescription, completionTitleText, computeDeferExtensions, computeInteractiveEngineResourceDeferral, computeStartupInputCaptureEnabled, computeStartupTrustPromptPossible, confirmPooledWorktreeLease, copilotAdvertisedFastModelIds, createAskUserQuestionToolDefinition, createAuthInteraction, createHostModuleJiti, createLoadedAskUserQuestionToolDefinition, createMcpResourceToolDefinitions, createMcpToolDefinition, createMcpToolName, createMcpToolRenderers, createStartupProgress, createToolNameMatcher, createToolSearchDocument, createToolSearchExtension, createToolSearchToolDefinition, defaultBuiltinExtensions, defaultResumePreflightIo, deferFirstPromptModel, deriveFastModelVariants, diffSystemPromptSections, discardPooledWorktree, emitProjectTrustEvent, emptySkillCatalog, enablePrintModelSelection, engineExtensionsCanDecide, ensureDefaultLazyBuiltinsRegistered, ensureRetryPromise, evictIdleWorktrees, executeNativePty, executeSupervisedCommand, expandPromptTemplate, expandSkillCommand, extensionLoaderTestHooks, extensionsCanDecideProjectTrust, fastModelId, findInitialModel, finishedSubagentResumeText, firstSubagentAttempt, forkSeedFields, formatScopedModelList, formatSkillsForPrompt, formatTaskHeartbeatDuration, formatTaskHeartbeatStatus, getExistingGitInstallPathAsync, getManagedNpmInstallPath, getModelFastRoute, getSkillCatalog, gitText, gitUnavailableProblem, hasPrintModelSelection, holdRestoredWorktree, holdsSessionSnapshotRef, hostPlatform, inheritWorkspace, insideThroughDirectories, isBoundWorkspace, isDegradableRestoreFailure, isDeniedSnapshotPath, isHeadOnlyAdvance, isMcpToolName, isNativeFastRouteApi, isOAuthLoginCancelled, isRecoverableRestoreFailure, isRegisteredToolAllowed, isResumableStop, isRetiredToolName, isToolActivatable, isToolDeclarationHidden, keepSessionSnapshotCommit, latestSubagentAttempt, latestSubagentAttempts, loadExtensionModule, loadPromptsStageAsync, loadSkills, loadSkillsFromDir, loadSkillsStageAsync, loadSnapshotPathPolicy, loadThemesStageAsync, locateCheckout, loginIsolatedApiKeyProvider, loginIsolatedOAuthProvider, loginRuntimeOAuthProvider, lookupOwnedTask, markRuntimeStreamFunction, mergeHeaders, messageHeadIn, messageRoleIn, namesSessionFolderInGuidelines, nextCaptureTick, normalizeBuildSystemPromptOptions, normalizeOAuthLoginError, nulFields, objectStorePath, openWorkspaceRepository, parseBlueprint, parseFrontmatter, parseSource, pendingLfsDownload, pendingTaskCompletionIntents, pooledWorktreeHolder, prepareExtensionEntries, preparePromptsCommitAsync, prepareSkillsCommitAsync, prepareThemesCommitAsync, presentQuestionnaire, projectForkMetadata, projectToolLoadout, ranOnModelLine, rateLimitGuidance, read, readChunkedWorkflowRunId, readExtensionGraphManifest, readRepositoryConfig, readValue, recordPooledWorktreeState, recordSessionWorkspace, recordWorktreeCapture, releaseRestoredWorktree, releaseSessionSnapshotRefs, releasedWaitingOn, removeRestoredWorktree, renderIntercomWakeMessage, require_dist, require_semver, resolveDeferredStartupModel, resolveRestoredModelReference, resolveToolNames, resolveUpstreamModelId, resolveWorkspace, restoreBestWorktree, restoreDegradedWorktree, restoreDegradedWorktreeAt, restoreWorkspace, restoreWorktree, restoreWorktreeAt, restoreWorktreeSnapshot, resumableSubagentResult, retireSessionSnapshotRefs, retryIsCurrent, runBeforeAgentStartHandlers, runBeforeProviderRequestHandlers, runBoundaryHandlers, runContextHandlers, runGenericHandlers, runGit, runInputHandlers, runMessageEndHandlers, runResourcesDiscoverHandlers, runSessionRecoveryHandlers, runToolCallHandlers, runToolResultHandlers, runUserBashHandlers, seedDirectory, seedManifestPath, seedPathSegments, selectDocument, selectedToolNames, sessionAccountCheckpoint, setAsideWorktree, setWorktreeSnapshotGit, settledTaskResumeId, skip, snapshotEventHandlers, snapshotRestoreWarnings, startupErrorHandlerTokens, storagePreconditionProblems, storeCheckoutHead, streamWithFastRoute, stringValue, stripFrontmatter, subagentResumeId, supersededSettledAttempts, taskCompletionMessage, taskHeartbeatKindLabel, taskNoticeLine, uncachedCopilotModelHint, unresolvedFallbackModelDiagnostics, unrestoredRecord, updatePromptsFromPathsAsync, updateSkillsFromPathsAsync, updateThemesFromPathsAsync, useExtensionCacheCwd, usesAnthropicFastMode, usesChatGptCodexTransport, usesFirstPartyCodexRouting, usesOpenAIFastServiceTier, usesXaiFastServiceTier, validateBashWait, validateTaskHeartbeatMs, verifyWorktree$1 as verifyWorktree, waitForSupervisedCommand, waitingReleasedShells, waitingReleasedTools, withCodexFastRouteHeaders, withDefaultBuiltinExtensions, withFastModelVariants, withFastRouteStreamOptions, withScratchDirectory, withSeedLock, withoutSupersededAttempts, workspaceSandboxDenial, workspaceSessionCwd, workspaceSessionCwdAsync, worktreeSetAside, writeSeedManifest, writeWorkingTree };
|
|
28580
28653
|
|
|
28581
|
-
//# sourceMappingURL=startup-0-5-
|
|
28654
|
+
//# sourceMappingURL=startup-0-5-DNS6FYS7.js.map
|
|
28582
28655
|
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
28583
28656
|
// demand that fails in a process an in-place update left running says to restart.
|
|
28584
28657
|
function __atomicOnDemandFailed(error, feature) {
|
|
28585
28658
|
return (async () => {
|
|
28586
28659
|
const root = new URL("../", import.meta.url);
|
|
28587
28660
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
28588
|
-
const key = `${root.href}#0.10.
|
|
28661
|
+
const key = `${root.href}#0.10.20-alpha.2`;
|
|
28589
28662
|
let release = releases.get(key);
|
|
28590
28663
|
if (release === undefined) {
|
|
28591
28664
|
const current = (async () => {
|
|
@@ -28613,7 +28686,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
28613
28686
|
} catch {
|
|
28614
28687
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
28615
28688
|
}
|
|
28616
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.
|
|
28689
|
+
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;
|
|
28617
28690
|
if (updatedTo === undefined) throw error;
|
|
28618
28691
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
28619
28692
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|