@bastani/atomic 0.10.19 → 0.10.20-alpha.1
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 +37 -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 +439 -217
- package/dist/_shared/mode-interactive-sdk-JXBZ3H27.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +19 -11
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/mode-shared-2QJSCUM6.js +9 -9
- package/dist/_shared/p0-cli-BB45ZQY6.js +2 -2
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/runtime-O4KCSG4C.js +5 -5
- package/dist/_shared/{sdk-BHX35EPK.js → sdk-5ZFNDXUJ.js} +119 -40
- package/dist/_shared/sdk-5ZFNDXUJ.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +5 -4
- 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.map +1 -1
- package/dist/_shared/{startup-0-0-4EDVBK5P.js → startup-0-0-FPPQF42L.js} +69 -26
- package/dist/_shared/startup-0-0-FPPQF42L.js.map +1 -0
- package/dist/_shared/{startup-0-1-H5IXVRXQ.js → startup-0-1-Q7GBLBEL.js} +158 -37
- package/dist/_shared/startup-0-1-Q7GBLBEL.js.map +1 -0
- package/dist/_shared/{startup-0-2-YZZOC22D.js → startup-0-2-JNYN24UI.js} +40 -6
- package/dist/_shared/startup-0-2-JNYN24UI.js.map +1 -0
- package/dist/_shared/startup-0-3-DE2NCS6A.js +26 -41
- package/dist/_shared/startup-0-3-DE2NCS6A.js.map +1 -1
- package/dist/_shared/{startup-0-4-ZMJV547D.js → startup-0-4-ZZXFKE55.js} +85 -19
- package/dist/_shared/startup-0-4-ZZXFKE55.js.map +1 -0
- package/dist/_shared/{startup-0-5-HZX3ZPTP.js → startup-0-5-WN2IYA25.js} +112 -15
- package/dist/_shared/startup-0-5-WN2IYA25.js.map +1 -0
- package/dist/_shared/{startup-10-0-TDQNBDDL.js → startup-10-0-O6DAT7U4.js} +65 -117
- package/dist/_shared/startup-10-0-O6DAT7U4.js.map +1 -0
- package/dist/_shared/startup-12-0-55AAXBJZ.js +2 -2
- package/dist/_shared/startup-14-0-MLX36RBG.js +8 -5
- package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
- package/dist/_shared/{startup-15-0-YUKGAC63.js → startup-15-0-E7RYG5YF.js} +8 -8
- 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 +73 -28
- package/dist/_shared/startup-15-1-WQZBOTMZ.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +31 -21
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/startup-8-1-QZMXUGHI.js +34 -24
- package/dist/_shared/startup-8-1-QZMXUGHI.js.map +1 -1
- package/dist/_shared/storage-command-7MGXLJGZ.js +9 -5
- package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
- package/dist/_shared/{storage-status-K7PX2RXA.js → storage-status-T6FUXRIM.js} +7 -23
- 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 +3 -2
- package/dist/_shared/team-DOQKICG2.js.map +1 -1
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/binary-self-update.js +3 -3
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +5 -5
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +3 -3
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +3 -3
- package/dist/cli/intercom-command.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 +2 -2
- 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 +2 -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 +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 +44 -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 +12 -25
- 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 +17 -1
- 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.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/sdk.code.js +3 -3
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.d.ts +4 -0
- package/dist/core/session-manager-core.js +46 -18
- package/dist/core/session-manager-core.js.map +1 -1
- 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.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/settings-manager.js +1 -1
- 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/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +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 +2 -2
- 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 +5 -4
- 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.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +3 -3
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +3 -3
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.d.ts +3 -17
- 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 +2 -0
- 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 +4 -4
- 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.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/read-url.code.js +2 -2
- 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 +2 -2
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +3 -3
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/main-first-time-setup.code.js +2 -2
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.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 +1 -0
- package/dist/modes/interactive-engine/protocol.d.ts +4 -0
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +5 -0
- package/dist/package-manager-cli.code.js +6 -6
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/rpc-entry.js +1 -1
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/10.js +1 -1
- package/dist/startup-stages/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/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/changelog.mdx +23 -0
- package/docs/extensions/api-reference.md +6 -0
- package/docs/guides/subscription-usage.md +28 -82
- package/docs/reference/cli.md +3 -1
- package/docs/rpc/protocol.md +30 -2
- package/docs/sdk/reference.md +26 -1
- package/docs/sessions.md +3 -1
- package/docs/slash-commands.md +1 -1
- 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
|
@@ -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, keyHint, loadThemeFromContent, resolveColorMode, singleLineDisplayText, terminalDisplayText } from "./p2-shell-main-B2WIALFD.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-FPPQF42L.js";
|
|
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, subscriptionBearer, timeRestorePhase, toResolvedPaths, trackAdmittedAgentTask, trackTranspileCacheWrite, unreadablePathError, unwritablePathError, usageObservationStore, waitResultTail, withInlineDraft } from "./startup-0-1-Q7GBLBEL.js";
|
|
5
|
+
import { TerminalTextSanitizer, getTerminalTheme, graphemeAt, initTheme, keyHint, loadThemeFromContent, 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-JNYN24UI.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
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-
|
|
10
|
+
import { AuthStorage, 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 } from "./startup-0-4-ZZXFKE55.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";
|
|
@@ -26086,6 +26086,19 @@ var RuntimeCredentials = class {
|
|
|
26086
26086
|
};
|
|
26087
26087
|
return this.store.read(providerId, options);
|
|
26088
26088
|
}
|
|
26089
|
+
async usageAccountKey(provider, kind, signal, token) {
|
|
26090
|
+
if (this.overrides.has(provider)) return void 0;
|
|
26091
|
+
const matches = (credential) => isUsageCredential(kind, credential) && (token === void 0 || usageCredentialToken(credential) === token);
|
|
26092
|
+
const current = await this.store.read(provider, { signal });
|
|
26093
|
+
if (!matches(current)) return void 0;
|
|
26094
|
+
const key = usageAccountKey(kind, current);
|
|
26095
|
+
if (key || !(this.store instanceof AuthStorage)) return key;
|
|
26096
|
+
const stamped = await this.store.modify(provider, async (latest) => matches(latest) && !usageAccountKey(kind, latest) ? {
|
|
26097
|
+
...latest,
|
|
26098
|
+
usageObservationId: randomUUID()
|
|
26099
|
+
} : void 0, { signal });
|
|
26100
|
+
return matches(stamped) ? usageAccountKey(kind, stamped) : void 0;
|
|
26101
|
+
}
|
|
26089
26102
|
async list(options) {
|
|
26090
26103
|
const entries = new Map((await this.store.list(options)).map((entry) => [entry.providerId, entry]));
|
|
26091
26104
|
for (const providerId of this.overrides.keys()) entries.set(providerId, {
|
|
@@ -26294,12 +26307,14 @@ var ModelRuntimeStreaming = class {
|
|
|
26294
26307
|
ownsExtensionTransport;
|
|
26295
26308
|
transportModel;
|
|
26296
26309
|
reloadCredentials;
|
|
26297
|
-
|
|
26310
|
+
usagePublisher;
|
|
26311
|
+
constructor(models, resolveAuth, ownsExtensionTransport, transportModel = (model) => model, reloadCredentials = async () => {}, usagePublisher) {
|
|
26298
26312
|
this.models = models;
|
|
26299
26313
|
this.resolveAuth = resolveAuth;
|
|
26300
26314
|
this.ownsExtensionTransport = ownsExtensionTransport;
|
|
26301
26315
|
this.transportModel = transportModel;
|
|
26302
26316
|
this.reloadCredentials = reloadCredentials;
|
|
26317
|
+
this.usagePublisher = usagePublisher;
|
|
26303
26318
|
}
|
|
26304
26319
|
/**
|
|
26305
26320
|
* Attach the first-party ChatGPT Codex routing identity to a prepared request.
|
|
@@ -26342,11 +26357,16 @@ var ModelRuntimeStreaming = class {
|
|
|
26342
26357
|
} : void 0;
|
|
26343
26358
|
const apiKey = providerOptions.apiKey ?? resolution.auth.apiKey;
|
|
26344
26359
|
const credentialHeaderNames = new Set(Object.keys(resolution.auth.headers ?? {}).map((name) => name.toLowerCase()));
|
|
26345
|
-
if (!this.ownsExtensionTransport(model)) {
|
|
26360
|
+
if (!this.ownsExtensionTransport(model) && (model.api === "openai-responses" || model.api === "openai-codex-responses" || model.api === "anthropic-messages")) {
|
|
26361
|
+
const usageToken = subscriptionBearer({
|
|
26362
|
+
apiKey,
|
|
26363
|
+
headers
|
|
26364
|
+
});
|
|
26365
|
+
const publishUsage = usageToken ? this.usagePublisher?.(model.provider, usageToken) : void 0;
|
|
26346
26366
|
const directUsage = model.api === "openai-responses" && resolution.source === "OAuth" && this.transportModel(model).provider === "openai" ? openAiDirectUsageObserver(requestModel, {
|
|
26347
26367
|
apiKey,
|
|
26348
26368
|
headers
|
|
26349
|
-
}) : void 0;
|
|
26369
|
+
}, publishUsage) : void 0;
|
|
26350
26370
|
if (directUsage || model.api === "openai-codex-responses" || model.api === "anthropic-messages") {
|
|
26351
26371
|
const onResponse = providerOptions.onResponse;
|
|
26352
26372
|
providerOptions.onResponse = (response, target) => {
|
|
@@ -26354,7 +26374,7 @@ var ModelRuntimeStreaming = class {
|
|
|
26354
26374
|
else observeSubscriptionUsage(requestModel, {
|
|
26355
26375
|
apiKey,
|
|
26356
26376
|
headers
|
|
26357
|
-
}, response.headers);
|
|
26377
|
+
}, response.headers, publishUsage);
|
|
26358
26378
|
return onResponse?.(response, target);
|
|
26359
26379
|
};
|
|
26360
26380
|
}
|
|
@@ -26675,7 +26695,18 @@ var ModelRuntime = class ModelRuntime {
|
|
|
26675
26695
|
...model,
|
|
26676
26696
|
provider: source
|
|
26677
26697
|
} : model;
|
|
26678
|
-
}, () => this.credentials.reload())
|
|
26698
|
+
}, () => this.credentials.reload(), (provider, token) => {
|
|
26699
|
+
const store = usageObservationStore(this);
|
|
26700
|
+
if (!store || !this.getBuiltinAccountProvider(provider)) return void 0;
|
|
26701
|
+
const credential = this.credentials.peek(provider);
|
|
26702
|
+
return (kind, observation) => {
|
|
26703
|
+
const captured = isUsageCredential(kind, credential) && usageCredentialToken(credential) === token ? usageAccountKey(kind, credential) : void 0;
|
|
26704
|
+
store.enqueue(captured ?? provider, async () => {
|
|
26705
|
+
const key = captured ?? await this[readUsageAccountKey](provider, kind, AbortSignal.timeout(500), token);
|
|
26706
|
+
return key ? [key, observation] : void 0;
|
|
26707
|
+
});
|
|
26708
|
+
};
|
|
26709
|
+
});
|
|
26679
26710
|
this.rebuildProviders();
|
|
26680
26711
|
}
|
|
26681
26712
|
static async create(options = {}) {
|
|
@@ -27167,6 +27198,9 @@ var ModelRuntime = class ModelRuntime {
|
|
|
27167
27198
|
[readSubscriptionCredential](provider, signal) {
|
|
27168
27199
|
return this.credentials.read(provider, { signal });
|
|
27169
27200
|
}
|
|
27201
|
+
[readUsageAccountKey](provider, kind, signal, token) {
|
|
27202
|
+
return this.credentials.usageAccountKey(provider, kind, signal, token);
|
|
27203
|
+
}
|
|
27170
27204
|
/** Return stored credential metadata synchronously without refreshing auth. */
|
|
27171
27205
|
getCredentialSnapshot(providerId) {
|
|
27172
27206
|
return this.credentials.peek(normalizeProviderId(providerId));
|
|
@@ -27352,7 +27386,8 @@ var ModelRuntime = class ModelRuntime {
|
|
|
27352
27386
|
const refreshCatalog = options.refreshCatalog ?? true;
|
|
27353
27387
|
const signal = operationSignal(void 0);
|
|
27354
27388
|
await this.enqueueCredentialOperation(providerId, signal, async () => {
|
|
27355
|
-
|
|
27389
|
+
const { usageObservationId: _oldUsageId, ...login } = credential;
|
|
27390
|
+
await this.credentials.modify(providerId, async () => login);
|
|
27356
27391
|
this.markCatalogInputsChanged();
|
|
27357
27392
|
await this.synchronizeCredentialState(providerId, "saveCredential", credential, async () => {
|
|
27358
27393
|
if (!refreshCatalog) {
|
|
@@ -28353,6 +28388,68 @@ async function resolveDeferredStartupModel(input) {
|
|
|
28353
28388
|
modelRuntime
|
|
28354
28389
|
})).model;
|
|
28355
28390
|
}
|
|
28391
|
+
// dist/cli/startup-progress.js
|
|
28392
|
+
/** Owns one temporary line, never the input or modes the startup capture will hand to the TUI. */
|
|
28393
|
+
function createStartupProgress(terminal, themeSetting) {
|
|
28394
|
+
let working = false;
|
|
28395
|
+
let finished = false;
|
|
28396
|
+
let lastLine = "";
|
|
28397
|
+
let measuredWidth = 0;
|
|
28398
|
+
let writable = true;
|
|
28399
|
+
const signals = [];
|
|
28400
|
+
const paint = () => {
|
|
28401
|
+
if (!writable) return;
|
|
28402
|
+
const width = terminal.columns;
|
|
28403
|
+
if (!width) return;
|
|
28404
|
+
const row = status.render(width - 1)[0] ?? "";
|
|
28405
|
+
if (row === lastLine && width === measuredWidth) return;
|
|
28406
|
+
if (row || lastLine) {
|
|
28407
|
+
const frame = `\r${width < measuredWidth && width <= visibleWidth(lastLine) ? "\x1B[J" : "\x1B[K"}${row}\r`;
|
|
28408
|
+
try {
|
|
28409
|
+
terminal.write(frame);
|
|
28410
|
+
} catch {
|
|
28411
|
+
writable = false;
|
|
28412
|
+
}
|
|
28413
|
+
}
|
|
28414
|
+
lastLine = row;
|
|
28415
|
+
measuredWidth = width;
|
|
28416
|
+
};
|
|
28417
|
+
const status = new SessionLoadingStatus(paint);
|
|
28418
|
+
const pause = () => {
|
|
28419
|
+
if (!working) return;
|
|
28420
|
+
working = false;
|
|
28421
|
+
terminal.off("resize", paint);
|
|
28422
|
+
process.off("exit", pause);
|
|
28423
|
+
for (const signal of signals.splice(0)) process.off(signal, pause);
|
|
28424
|
+
status.done();
|
|
28425
|
+
};
|
|
28426
|
+
return {
|
|
28427
|
+
phase(message) {
|
|
28428
|
+
if (finished || !writable) return;
|
|
28429
|
+
if (!working) {
|
|
28430
|
+
working = true;
|
|
28431
|
+
terminal.on("resize", paint);
|
|
28432
|
+
process.once("exit", pause);
|
|
28433
|
+
for (const signal of [
|
|
28434
|
+
"SIGINT",
|
|
28435
|
+
"SIGTERM",
|
|
28436
|
+
"SIGHUP"
|
|
28437
|
+
]) {
|
|
28438
|
+
if (process.listenerCount(signal) === 0) continue;
|
|
28439
|
+
signals.push(signal);
|
|
28440
|
+
process.prependOnceListener(signal, pause);
|
|
28441
|
+
}
|
|
28442
|
+
status.begin(() => initTheme(resolveThemeSetting(themeSetting, getTerminalTheme())));
|
|
28443
|
+
}
|
|
28444
|
+
status.phase(message);
|
|
28445
|
+
},
|
|
28446
|
+
pause,
|
|
28447
|
+
done() {
|
|
28448
|
+
finished = true;
|
|
28449
|
+
pause();
|
|
28450
|
+
}
|
|
28451
|
+
};
|
|
28452
|
+
}
|
|
28356
28453
|
// dist/main-session-options.js
|
|
28357
28454
|
/**
|
|
28358
28455
|
* A model named with --model runs as named: it falls back only to the models
|
|
@@ -28576,16 +28673,16 @@ function assertRpcSuccess(response) {
|
|
|
28576
28673
|
if (response.errorCode === "missing_session_cwd" && isSerializedMissingSessionCwdError(response.errorDetails)) throw rehydrateMissingSessionCwdError(response.errorDetails);
|
|
28577
28674
|
throw new Error(response.error);
|
|
28578
28675
|
}
|
|
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 };
|
|
28676
|
+
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, 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
28677
|
|
|
28581
|
-
//# sourceMappingURL=startup-0-5-
|
|
28678
|
+
//# sourceMappingURL=startup-0-5-WN2IYA25.js.map
|
|
28582
28679
|
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
28583
28680
|
// demand that fails in a process an in-place update left running says to restart.
|
|
28584
28681
|
function __atomicOnDemandFailed(error, feature) {
|
|
28585
28682
|
return (async () => {
|
|
28586
28683
|
const root = new URL("../", import.meta.url);
|
|
28587
28684
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
28588
|
-
const key = `${root.href}#0.10.
|
|
28685
|
+
const key = `${root.href}#0.10.20-alpha.1`;
|
|
28589
28686
|
let release = releases.get(key);
|
|
28590
28687
|
if (release === undefined) {
|
|
28591
28688
|
const current = (async () => {
|
|
@@ -28613,7 +28710,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
28613
28710
|
} catch {
|
|
28614
28711
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
28615
28712
|
}
|
|
28616
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.
|
|
28713
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.1" ? installed : running !== undefined && running.version !== "0.10.20-alpha.1" ? "0.10.20-alpha.1" : undefined;
|
|
28617
28714
|
if (updatedTo === undefined) throw error;
|
|
28618
28715
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
28619
28716
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|