@bastani/atomic 0.10.9 → 0.10.10-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 +57 -0
- package/README.md +211 -155
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +27 -12
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
- package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
- package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +5 -5
- package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
- package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
- package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
- package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
- package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
- package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
- package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +145 -58
- package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
- package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
- package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
- package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
- package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
- package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
- package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
- package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
- package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
- package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
- package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
- package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
- package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
- package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/README.md +85 -114
- package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
- package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
- package/dist/builtin/intercom/group.ts +7 -3
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/README.md +37 -27
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +8 -0
- package/dist/builtin/subagents/README.md +71 -138
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
- package/dist/builtin/web-access/CHANGELOG.md +9 -0
- package/dist/builtin/web-access/README.md +60 -87
- package/dist/builtin/web-access/index.bundle.mjs +387 -351
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +4 -4
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +2 -2
- 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 +2 -2
- 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-methods.d.ts +4 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/compaction/compactor.d.ts +20 -14
- package/dist/core/compaction/errors.d.ts +120 -0
- package/dist/core/compaction/index.d.ts +1 -0
- package/dist/core/compaction/model-resolver.d.ts +2 -2
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- 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/api-types.d.ts +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +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 +1 -1
- package/dist/core/extensions/provider-types.d.ts +18 -6
- package/dist/core/extensions/provider-types.js.map +1 -1
- package/dist/core/extensions/runner-context.js +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-config.d.ts +40 -0
- package/dist/core/model-registry.js +1 -1
- package/dist/core/model-resolver-scope.d.ts +4 -4
- package/dist/core/model-runtime.d.ts +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/provider-composer-internal.d.ts +11 -2
- 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.js +5 -5
- 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 +1 -1
- 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-basic-accessors.d.ts +6 -2
- 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/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 +3 -3
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- 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 +3 -3
- 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.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.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- 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/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 +1 -1
- 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 +2 -2
- 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-extensions.d.ts +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +7 -7
- 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/settings-selector-types.d.ts +1 -0
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- 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.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/modes/interactive/theme/color-utils.d.ts +5 -5
- package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
- package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
- package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
- package/dist/modes/rpc/rpc-types.d.ts +29 -2
- package/dist/package-manager-cli.code.js +5 -5
- 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/5.js +1 -1
- package/dist/startup-stages/7.js +1 -1
- package/dist/startup-stages/8.js +1 -2
- package/dist/startup-stages/9.js +2 -1
- package/dist/utils/native-module.d.ts +44 -0
- 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/background-tasks.md +235 -243
- package/docs/build.md +12 -11
- package/docs/codemode.md +60 -51
- package/docs/compaction/reference.md +61 -24
- package/docs/compaction.md +117 -65
- package/docs/computer-use.md +179 -146
- package/docs/containerization.md +79 -33
- package/docs/custom-provider/api-reference.md +148 -11
- package/docs/custom-provider/oauth.md +44 -27
- package/docs/custom-provider/override.md +14 -7
- package/docs/custom-provider/registration.md +75 -65
- package/docs/custom-provider/streaming.md +42 -19
- package/docs/custom-provider.md +25 -61
- package/docs/development.md +47 -43
- package/docs/docs.json +33 -33
- package/docs/environment-variables.md +83 -57
- package/docs/extensions/api-reference.md +323 -734
- package/docs/extensions/authoring.md +186 -269
- package/docs/extensions/events.md +308 -375
- package/docs/extensions/examples.md +122 -74
- package/docs/extensions/ui.md +217 -197
- package/docs/extensions.md +152 -259
- package/docs/getting-started/authentication.md +27 -14
- package/docs/getting-started/first-session.md +25 -26
- package/docs/getting-started/installation.md +62 -84
- package/docs/getting-started/project-instructions.md +39 -14
- package/docs/guides/configuration.md +42 -20
- package/docs/guides/intercom.md +17 -13
- package/docs/guides/non-interactive.md +29 -16
- package/docs/guides/orchestration.md +16 -10
- package/docs/guides/resume-on-any-machine.md +54 -49
- package/docs/guides/subagents.md +22 -14
- package/docs/guides/team-setup.md +37 -26
- package/docs/guides.md +22 -21
- package/docs/herdr.md +21 -16
- package/docs/index.md +16 -17
- package/docs/intercom/operations.md +68 -66
- package/docs/intercom/reference.md +196 -191
- package/docs/intercom.md +103 -92
- package/docs/json.md +71 -71
- package/docs/keybindings.md +63 -50
- package/docs/libraries/agent-core.md +49 -8
- package/docs/libraries/ai.md +21 -12
- package/docs/libraries/codemode.md +28 -6
- package/docs/libraries/schema.md +7 -7
- package/docs/libraries/telemetry.md +7 -7
- package/docs/libraries/tui.md +74 -94
- package/docs/libraries.md +5 -5
- package/docs/llama-cpp.md +38 -33
- package/docs/mcp-servers.md +96 -90
- package/docs/models/reference.md +46 -33
- package/docs/models-configuration.md +12 -6
- package/docs/models.md +93 -88
- package/docs/orchestration/migrating-workflows.md +21 -19
- package/docs/orchestration/patterns.md +35 -20
- package/docs/orchestration.md +22 -21
- package/docs/packages/authoring.md +28 -19
- package/docs/packages/reference.md +75 -16
- package/docs/packages.md +31 -33
- package/docs/programmatic.md +22 -21
- package/docs/prompt-templates.md +63 -41
- package/docs/providers/reference.md +35 -19
- package/docs/providers.md +61 -71
- package/docs/quickstart.md +32 -46
- package/docs/reference/cli.md +249 -252
- package/docs/reference.md +23 -20
- package/docs/rpc/examples.md +74 -17
- package/docs/rpc/extension-ui.md +79 -62
- package/docs/rpc/protocol.md +816 -358
- package/docs/rpc.md +75 -151
- package/docs/sdk/reference.md +175 -45
- package/docs/sdk/structured-decisions.md +92 -62
- package/docs/sdk/web-server.md +79 -46
- package/docs/sdk.md +237 -195
- package/docs/security.md +106 -43
- package/docs/session-format.md +96 -59
- package/docs/sessions.md +149 -113
- package/docs/settings.md +289 -204
- package/docs/shell-aliases.md +15 -6
- package/docs/skills/authoring.md +17 -9
- package/docs/skills/reference.md +23 -21
- package/docs/skills.md +104 -97
- package/docs/storage.md +140 -242
- package/docs/subagents/authoring.md +147 -16
- package/docs/subagents/reference.md +100 -30
- package/docs/subagents.md +220 -252
- package/docs/terminal-setup.md +97 -69
- package/docs/termux.md +51 -85
- package/docs/themes/reference.md +51 -37
- package/docs/themes.md +49 -54
- package/docs/tmux.md +38 -21
- package/docs/tools.md +198 -147
- package/docs/tui/reference.md +64 -32
- package/docs/tui.md +38 -66
- package/docs/usage.md +76 -78
- package/docs/verification.md +25 -25
- package/docs/web-access.md +72 -55
- package/docs/windows.md +53 -58
- package/docs/worktree-snapshots.md +62 -65
- package/package.json +8 -8
- package/schemas/models.schema.json +51 -0
- package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
- package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
- package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
- package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
- package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __commonJSMin, __require } from "./rolldown-runtime-BGM3D5V3.js";
|
|
2
2
|
import { APP_NAME, ENV_SESSION_DIR, VERSION, createChildProcessEnvironment, createModuleRequire, findHelperExecutable, findHelperExecutableAsync, getAgentDir, getBinDir, getProjectConfigDirs, isBunBinary, isBundledBuild, isPathWithin, loadOnDemand, markLifecycleTiming, normalizePath, processLaunch, processLaunchAsync, releaseRetainedWindowsProcessExitHandle, resolutionBaseUrl, resolvePath, resolveSafeWindowsKillCwdLexical, resolveSafeWindowsWorkingDirectoryAsync, retainWindowsProcessExitHandle, spawnLaunchedProcess, spawnLaunchedProcessSync, stripBom } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
-
import { ActivityWatchdog, Diff, JSON_RPC_ERROR_CODES, MAX_TOOL_DETACHMENT_AFTER_MS, McpAbortError, McpConnectionClosedError, NON_SECRET_HTTP_HEADERS, ROW_INTENT_META, STARTUP_DECISION_TYPED_TEXT_NOTICE, TASK_MARKS, TaskCleanupAdmissionTimeoutError, TaskEvictedError, TrustDecisionSelector, VisualLinePreview, asyncScope, chatEpoch, collectSecretsForMasking, combineUsage, computeBoxDimensions, createSourceInfo, createTypeScriptSourceSpecifierTransform, defaultModelPerProvider, defineTool, fetchWithRetry, fieldTone, flushable, formatSize, getErrnoCode, getFunctionList, getPiUserAgent, getSyntheticPathSource, getTextOutput, holdProcessDescendants, holdProcessDescendantsResult, invalidArgText, isFlushable, isFunctionList, isJsonRpcRequest, isJsonRpcResponse, isStdoutTakenOver, isStop, isSyntheticPath, isTrustDecision, isValidThinkingLevel, linkPath, many, none, parseJsonRpcMessage, redactCredentials, redactOAuthErrorText, redactOAuthErrorTextCapped, redactWwwAuthenticateHeader, removedProviderMessage, renderBorderedBox, require_applyReviver, require_constants, require_debug, require_identifiers, require_identity, require_parse_options, require_parse_url, resolveDecisionDeadlineMs, resourceInternals, safeTrustChoiceIndex, scrubFetchError, scrubUnknownErrorData, setFunctionList, spanElapsedMs, spawnContainedProcess, str, styleFieldTone, toError, validateTimeoutOverride } from "./startup-0-0-
|
|
4
|
-
import { AgentRehydrateError, AgentReleaseConfigError, EMPTY_OUTPUT_TEXT, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, LlamaClient, MULTI_SUBMIT_LABEL, MarkdownContentCache, NestedToolCallRunner, RESERVED_LABELS, SESSION_STORAGE_JOIN, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, StorageSelectionSchema, StringEnum as StringEnum$1, TransportEvents, WorkspaceConfigError, WrappingSelect, acceptsForkReplay, cancelReceiptStatus, chatAnswerIntent, chatNumberingFor, cleanupFailureSummary, computeFocusedOptionHasPreview, currentResourceAdmission, diffLines, discoverChatFile, errorMessage, flush, formatAnswerScalar, formatTokenSegment, genBridge, getBuiltinExtensionEntryLabel, getCommandEnv, getGitShellEnvironmentAsync, getLoaderAgentDirs, getVirtualModules, lifecycleScopeForOwner, llamaInferenceUrl, messageIsLlmVisible, next, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelReference, normalizeProviderKeys, parseInteractiveEngineMessage, presentTaskError, readFileChatRecords, readInlineCaret, require_from_url, require_re, require_toJS, require_visit, resizeImageInProcess, resolveInlineDraftValue, runCallback, runSynchronousCallback, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, sessionLifecycleCreation, stopIndex, streamCutDurationMs, tokenize, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, userLikeContentBlockIsLlmVisible, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, withInlineDraft, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner } from "./startup-0-1-
|
|
3
|
+
import { ActivityWatchdog, CompactionCancelledError, CompactorFailure, Diff, JSON_RPC_ERROR_CODES, MAX_TOOL_DETACHMENT_AFTER_MS, McpAbortError, McpConnectionClosedError, NON_SECRET_HTTP_HEADERS, ROW_INTENT_META, STARTUP_DECISION_TYPED_TEXT_NOTICE, TASK_MARKS, TaskCleanupAdmissionTimeoutError, TaskEvictedError, TrustDecisionSelector, VisualLinePreview, asyncScope, chatEpoch, collectSecretsForMasking, combineUsage, computeBoxDimensions, createSourceInfo, createTypeScriptSourceSpecifierTransform, defaultModelPerProvider, defineTool, fetchWithRetry, fieldTone, flushable, formatSize, getErrnoCode, getFunctionList, getPiUserAgent, getSyntheticPathSource, getTextOutput, holdProcessDescendants, holdProcessDescendantsResult, invalidArgText, isFlushable, isFunctionList, isJsonRpcRequest, isJsonRpcResponse, isStdoutTakenOver, isStop, isSyntheticPath, isTrustDecision, isValidThinkingLevel, linkPath, many, none, parseJsonRpcMessage, redactCredentials, redactOAuthErrorText, redactOAuthErrorTextCapped, redactWwwAuthenticateHeader, removedProviderMessage, renderBorderedBox, require_applyReviver, require_constants, require_debug, require_identifiers, require_identity, require_parse_options, require_parse_url, resolveDecisionDeadlineMs, resourceInternals, safeTrustChoiceIndex, scrubFetchError, scrubUnknownErrorData, setFunctionList, spanElapsedMs, spawnContainedProcess, str, styleFieldTone, toError, validateTimeoutOverride } from "./startup-0-0-4VG2G44V.js";
|
|
4
|
+
import { AgentRehydrateError, AgentReleaseConfigError, EMPTY_OUTPUT_TEXT, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, LlamaClient, MULTI_SUBMIT_LABEL, MarkdownContentCache, NestedToolCallRunner, RESERVED_LABELS, SESSION_STORAGE_JOIN, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, StorageSelectionSchema, StringEnum as StringEnum$1, TransportEvents, WorkspaceConfigError, WrappingSelect, acceptsForkReplay, cancelReceiptStatus, chatAnswerIntent, chatNumberingFor, cleanupFailureSummary, computeFocusedOptionHasPreview, currentResourceAdmission, diffLines, discoverChatFile, errorMessage, flush, formatAnswerScalar, formatTokenSegment, genBridge, getBuiltinExtensionEntryLabel, getCommandEnv, getGitShellEnvironmentAsync, getLoaderAgentDirs, getVirtualModules, lifecycleScopeForOwner, llamaInferenceUrl, messageIsLlmVisible, next, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelReference, normalizeProviderKeys, parseInteractiveEngineMessage, presentTaskError, readFileChatRecords, readInlineCaret, require_from_url, require_re, require_toJS, require_visit, resizeImageInProcess, resolveInlineDraftValue, runCallback, runSynchronousCallback, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, sessionLifecycleCreation, stopIndex, streamCutDurationMs, tokenize, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, userLikeContentBlockIsLlmVisible, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, withInlineDraft, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner } from "./startup-0-1-XTIL65D4.js";
|
|
5
5
|
import { KeybindingsManager as KeybindingsManager$1, clickableHintText, clickableKeyTextHint, detectTerminalThemeForAuto, graphemeAt, initTheme, keepStartupDialogDraft, parenthesizedKeyHint, setTheme, singleLineDisplayText, terminalDisplayCursor, terminalDisplayText, theme, withEarlyInputHeldForStartupDialog } from "./p2-shell-main-B2WIALFD.js";
|
|
6
6
|
import { stripJsonComments } from "./p1-shared-RG5I5LJ6.js";
|
|
7
7
|
import { findInCauseChain, guardLockRemoval, nativeProcessCreationTime, nativeTerminateProcess, redactCredentialShapes, rehydrateErrorCause, releaseLock, releaseLockSync, renameReplacing, renameReplacingAsync, serializeErrorCause, waitForLock, waitForLockSync } from "./p1b-elig-ENCUPKKJ.js";
|
|
@@ -1434,7 +1434,7 @@ function formatDimensionNote(result) {
|
|
|
1434
1434
|
// dist/core/model-resolver-patterns.js
|
|
1435
1435
|
function splitThinkingSuffix(text) {
|
|
1436
1436
|
const colonIndex = text.lastIndexOf(":");
|
|
1437
|
-
const suffix = text.substring(colonIndex + 1);
|
|
1437
|
+
const suffix = text.substring(colonIndex + 1).toLowerCase();
|
|
1438
1438
|
if (colonIndex <= 0 || !isValidThinkingLevel(suffix)) return void 0;
|
|
1439
1439
|
return {
|
|
1440
1440
|
base: text.substring(0, colonIndex),
|
|
@@ -10135,6 +10135,16 @@ const SamplingParamsByThinkingLevelSchema = Type$1.Object({
|
|
|
10135
10135
|
max: Type$1.Optional(SamplingParamsSchema)
|
|
10136
10136
|
}, { description: "samplingParams per thinking level, merged over samplingParams." });
|
|
10137
10137
|
const SamplingParamsFieldSchema = Type$1.Record(Type$1.String(), Type$1.Unknown(), { description: "Fields merged into every request body. Applies only to OpenAI-compatible APIs." });
|
|
10138
|
+
const CompactionParamsFieldSchema = Type$1.Record(Type$1.String(), Type$1.Unknown(), { description: "API-specific request-body parameters merged into { messages, query, model } for compactor requests. Omit to let the remote API use its own defaults. Applies only to compactor models." });
|
|
10139
|
+
const EndpointPathFieldSchema = Type$1.String({ description: "Endpoint path appended to baseUrl for compactor requests (default \"/compact\"). Set to \"\" to POST directly to baseUrl. Applies only to compactor models." });
|
|
10140
|
+
const CompactorTimeoutFieldSchema = Type$1.Number({
|
|
10141
|
+
exclusiveMinimum: 0,
|
|
10142
|
+
description: "Wall-clock timeout in milliseconds for one compactor request (default 120000). Applies only to compactor models."
|
|
10143
|
+
});
|
|
10144
|
+
const ModelTypeFieldSchema = Type$1.Union([Type$1.Literal("chat"), Type$1.Literal("compactor")], {
|
|
10145
|
+
default: "chat",
|
|
10146
|
+
description: "Model kind: \"chat\" (default) or \"compactor\" for a dedicated remote compaction endpoint."
|
|
10147
|
+
});
|
|
10138
10148
|
const HeadersSchema = Type$1.Record(Type$1.String(), Type$1.String(), { description: "Request headers. Values resolve like apiKey." });
|
|
10139
10149
|
const ModelFieldDescriptions = {
|
|
10140
10150
|
name: "Display name, also matched by --model patterns.",
|
|
@@ -10159,6 +10169,7 @@ const ModelDefinitionSchema = Type$1.Object({
|
|
|
10159
10169
|
minLength: 1,
|
|
10160
10170
|
description: ModelFieldDescriptions.name
|
|
10161
10171
|
})),
|
|
10172
|
+
type: Type$1.Optional(ModelTypeFieldSchema),
|
|
10162
10173
|
api: Type$1.Optional(Type$1.String({
|
|
10163
10174
|
minLength: 1,
|
|
10164
10175
|
description: "Overrides the provider api."
|
|
@@ -10167,6 +10178,7 @@ const ModelDefinitionSchema = Type$1.Object({
|
|
|
10167
10178
|
minLength: 1,
|
|
10168
10179
|
description: "Overrides the provider baseUrl."
|
|
10169
10180
|
})),
|
|
10181
|
+
endpointPath: Type$1.Optional(EndpointPathFieldSchema),
|
|
10170
10182
|
reasoning: Type$1.Optional(Type$1.Boolean({
|
|
10171
10183
|
default: false,
|
|
10172
10184
|
description: ModelFieldDescriptions.reasoning
|
|
@@ -10186,8 +10198,10 @@ const ModelDefinitionSchema = Type$1.Object({
|
|
|
10186
10198
|
default: 16384,
|
|
10187
10199
|
description: ModelFieldDescriptions.maxTokens
|
|
10188
10200
|
})),
|
|
10201
|
+
timeoutMs: Type$1.Optional(CompactorTimeoutFieldSchema),
|
|
10189
10202
|
samplingParams: Type$1.Optional(SamplingParamsFieldSchema),
|
|
10190
10203
|
samplingParamsByThinkingLevel: Type$1.Optional(SamplingParamsByThinkingLevelSchema),
|
|
10204
|
+
compactionParams: Type$1.Optional(CompactionParamsFieldSchema),
|
|
10191
10205
|
headers: Type$1.Optional(HeadersSchema),
|
|
10192
10206
|
compat: Type$1.Optional(ModelsJsonCompatSchema)
|
|
10193
10207
|
});
|
|
@@ -10196,6 +10210,11 @@ const ModelOverrideSchema = Type$1.Object({
|
|
|
10196
10210
|
minLength: 1,
|
|
10197
10211
|
description: ModelFieldDescriptions.name
|
|
10198
10212
|
})),
|
|
10213
|
+
baseUrl: Type$1.Optional(Type$1.String({
|
|
10214
|
+
minLength: 1,
|
|
10215
|
+
description: "Overrides the model baseUrl."
|
|
10216
|
+
})),
|
|
10217
|
+
endpointPath: Type$1.Optional(EndpointPathFieldSchema),
|
|
10199
10218
|
reasoning: Type$1.Optional(Type$1.Boolean({ description: ModelFieldDescriptions.reasoning })),
|
|
10200
10219
|
thinkingLevelMap: Type$1.Optional(ThinkingLevelMapSchema),
|
|
10201
10220
|
input: Type$1.Optional(Type$1.Array(ModelInputModalitySchema)),
|
|
@@ -10210,8 +10229,10 @@ const ModelOverrideSchema = Type$1.Object({
|
|
|
10210
10229
|
exclusiveMinimum: 0,
|
|
10211
10230
|
description: ModelFieldDescriptions.maxTokens
|
|
10212
10231
|
})),
|
|
10232
|
+
timeoutMs: Type$1.Optional(CompactorTimeoutFieldSchema),
|
|
10213
10233
|
samplingParams: Type$1.Optional(SamplingParamsFieldSchema),
|
|
10214
10234
|
samplingParamsByThinkingLevel: Type$1.Optional(SamplingParamsByThinkingLevelSchema),
|
|
10235
|
+
compactionParams: Type$1.Optional(CompactionParamsFieldSchema),
|
|
10215
10236
|
headers: Type$1.Optional(HeadersSchema),
|
|
10216
10237
|
compat: Type$1.Optional(ModelsJsonCompatSchema)
|
|
10217
10238
|
});
|
|
@@ -11181,26 +11202,23 @@ function estimateTokens(message) {
|
|
|
11181
11202
|
return 0;
|
|
11182
11203
|
}
|
|
11183
11204
|
// dist/core/compaction/compactor.js
|
|
11184
|
-
/**
|
|
11185
|
-
const COMPACTOR_COMPRESSION_RATIO = .5;
|
|
11186
|
-
/** Wall-clock bound on one compactor request; past it the context is cleared instead. */
|
|
11205
|
+
/** Default wall-clock bound on one compactor request unless overridden by model `timeoutMs`; past it the context is cleared instead. */
|
|
11187
11206
|
const COMPACTOR_REQUEST_TIMEOUT_MS = 12e4;
|
|
11188
11207
|
/** Lines longer than this are wrapped before they are sent, so the compactor can keep or drop parts of them. */
|
|
11189
11208
|
const COMPACTOR_LINE_WIDTH = 2e3;
|
|
11190
|
-
/**
|
|
11209
|
+
/** Default upper bound on compacted text, in estimated tokens, unless overridden by model `maxTokens`. Longer output is a failure and the context is cleared. */
|
|
11191
11210
|
const COMPACTED_OUTPUT_MAX_TOKENS = 32e3;
|
|
11192
11211
|
/** Compacted text never fills more than this share of the context the automatic trigger allows. */
|
|
11193
11212
|
const COMPACTED_OUTPUT_MAX_TRIGGER_SHARE = .5;
|
|
11194
|
-
const
|
|
11213
|
+
const DEFAULT_COMPACTOR_ENDPOINT_PATH = "/compact";
|
|
11195
11214
|
const HTTP_ERROR_EXCERPT_MAX_CHARS = 500;
|
|
11196
11215
|
const HTTP_ERROR_BODY_MAX_BYTES = 8192;
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
|
|
11202
|
-
|
|
11203
|
-
};
|
|
11216
|
+
const SENSITIVE_HEADER_NAMES = /* @__PURE__ */ new Set([
|
|
11217
|
+
"authorization",
|
|
11218
|
+
"proxy-authorization",
|
|
11219
|
+
"x-api-key",
|
|
11220
|
+
"api-key"
|
|
11221
|
+
]);
|
|
11204
11222
|
/** Splits every line longer than `width` characters into parts of at most `width` characters. */
|
|
11205
11223
|
function wrapLongLines(text, width = COMPACTOR_LINE_WIDTH) {
|
|
11206
11224
|
return text.split(/\r?\n/u).flatMap((line) => {
|
|
@@ -11266,8 +11284,8 @@ function buildCompactorMessages(messages, isBoundary) {
|
|
|
11266
11284
|
return [...boundaries, ...rest].flatMap((message) => messageIsLlmVisible(message) ? compactorMessage(message, isBoundary) ?? [] : []);
|
|
11267
11285
|
}
|
|
11268
11286
|
/** Largest compacted text, in estimated tokens, for a model whose automatic trigger fires above `triggerTokens`. */
|
|
11269
|
-
function compactedOutputTokenCap(triggerTokens) {
|
|
11270
|
-
return Math.max(0, Math.min(COMPACTED_OUTPUT_MAX_TOKENS, Math.floor(triggerTokens * COMPACTED_OUTPUT_MAX_TRIGGER_SHARE)));
|
|
11287
|
+
function compactedOutputTokenCap(triggerTokens, maxOutputTokens = COMPACTED_OUTPUT_MAX_TOKENS) {
|
|
11288
|
+
return Math.max(0, Math.min(Number.isFinite(maxOutputTokens) && maxOutputTokens > 0 ? maxOutputTokens : COMPACTED_OUTPUT_MAX_TOKENS, Math.floor(triggerTokens * COMPACTED_OUTPUT_MAX_TRIGGER_SHARE)));
|
|
11271
11289
|
}
|
|
11272
11290
|
/** A conservative token estimate for text: four characters per token, one per character outside ASCII. */
|
|
11273
11291
|
function estimateTextTokens(text) {
|
|
@@ -11275,8 +11293,26 @@ function estimateTextTokens(text) {
|
|
|
11275
11293
|
for (let index = 0; index < text.length; index++) if (text.charCodeAt(index) > 127) dense++;
|
|
11276
11294
|
return Math.ceil((text.length - dense) / 4) + dense;
|
|
11277
11295
|
}
|
|
11278
|
-
function
|
|
11279
|
-
|
|
11296
|
+
function collectSecrets(apiKey, headers) {
|
|
11297
|
+
const secrets = [];
|
|
11298
|
+
if (apiKey) secrets.push(apiKey);
|
|
11299
|
+
if (headers) for (const [name, value] of Object.entries(headers)) {
|
|
11300
|
+
if (!value) continue;
|
|
11301
|
+
if (SENSITIVE_HEADER_NAMES.has(name.toLowerCase())) {
|
|
11302
|
+
secrets.push(value);
|
|
11303
|
+
const trimmed = value.trim();
|
|
11304
|
+
if (trimmed.slice(0, 7).toLowerCase() === "bearer ") {
|
|
11305
|
+
const token = trimmed.slice(7).trim();
|
|
11306
|
+
if (token) secrets.push(token);
|
|
11307
|
+
}
|
|
11308
|
+
}
|
|
11309
|
+
}
|
|
11310
|
+
return [...new Set(secrets)].sort((a, b) => b.length - a.length);
|
|
11311
|
+
}
|
|
11312
|
+
function redact(text, secrets) {
|
|
11313
|
+
let cleaned = text;
|
|
11314
|
+
for (const secret of secrets) if (secret) cleaned = cleaned.replaceAll(secret, "[redacted]");
|
|
11315
|
+
return redactCredentialShapes(cleaned);
|
|
11280
11316
|
}
|
|
11281
11317
|
async function readHttpErrorBody(response) {
|
|
11282
11318
|
if (!response.body) return "";
|
|
@@ -11301,8 +11337,8 @@ async function readHttpErrorBody(response) {
|
|
|
11301
11337
|
reader.releaseLock();
|
|
11302
11338
|
}
|
|
11303
11339
|
}
|
|
11304
|
-
async function httpErrorMessage(response,
|
|
11305
|
-
const excerpt = redact(await readHttpErrorBody(response),
|
|
11340
|
+
async function httpErrorMessage(response, secrets) {
|
|
11341
|
+
const excerpt = redact(await readHttpErrorBody(response), secrets).replace(/[\x00-\x1f\x7f-\x9f]/g, " ").replace(/\s+/g, " ").trim().slice(0, HTTP_ERROR_EXCERPT_MAX_CHARS);
|
|
11306
11342
|
return `HTTP ${response.status}${excerpt ? `: ${excerpt}` : ""}`;
|
|
11307
11343
|
}
|
|
11308
11344
|
function compactorUsage(usage) {
|
|
@@ -11333,63 +11369,114 @@ function trimTrailingSlashes(url) {
|
|
|
11333
11369
|
while (end > 0 && url.charCodeAt(end - 1) === 47) end--;
|
|
11334
11370
|
return url.slice(0, end);
|
|
11335
11371
|
}
|
|
11372
|
+
function resolveCompactorUrl(baseUrl, endpointPath) {
|
|
11373
|
+
const base = trimTrailingSlashes(baseUrl);
|
|
11374
|
+
const path = endpointPath === void 0 ? DEFAULT_COMPACTOR_ENDPOINT_PATH : endpointPath.trim();
|
|
11375
|
+
if (!path) return base;
|
|
11376
|
+
return path.startsWith("/") ? `${base}${path}` : `${base}/${path}`;
|
|
11377
|
+
}
|
|
11378
|
+
function hasHeaderCaseInsensitive(headers, target) {
|
|
11379
|
+
const lower = target.toLowerCase();
|
|
11380
|
+
return Object.keys(headers).some((key) => key.toLowerCase() === lower);
|
|
11381
|
+
}
|
|
11382
|
+
function buildCompactorPayload(request) {
|
|
11383
|
+
const payload = {};
|
|
11384
|
+
if (request.params) {
|
|
11385
|
+
for (const [key, value] of Object.entries(request.params)) if (value !== void 0) payload[key] = value;
|
|
11386
|
+
}
|
|
11387
|
+
payload.messages = request.messages;
|
|
11388
|
+
payload.query = request.query;
|
|
11389
|
+
payload.model = request.modelId;
|
|
11390
|
+
return payload;
|
|
11391
|
+
}
|
|
11336
11392
|
/**
|
|
11337
|
-
* Send the framed conversation to a compactor endpoint and return its text. Throws
|
|
11338
|
-
* reason for every failure (no credentials, HTTP error, malformed
|
|
11339
|
-
* when `signal` aborts.
|
|
11393
|
+
* Send the framed conversation to a compactor endpoint and return its text. Throws {@link CompactorFailure} (a
|
|
11394
|
+
* {@link CompactionError}) naming the reason for every failure (missing baseUrl, no credentials, HTTP error, malformed
|
|
11395
|
+
* or empty output, timeout), and {@link CompactionCancelledError} when `signal` aborts. Credentials never appear in a
|
|
11396
|
+
* thrown message.
|
|
11340
11397
|
*/
|
|
11341
11398
|
async function requestCompactorOutput(request) {
|
|
11342
|
-
if (request.signal.aborted) throw new
|
|
11399
|
+
if (request.signal.aborted) throw new CompactionCancelledError({ reason: "aborted" });
|
|
11400
|
+
const baseUrl = request.baseUrl?.trim();
|
|
11401
|
+
if (!baseUrl) throw new CompactorFailure("no baseUrl configured for compactor model", {
|
|
11402
|
+
code: "missing-base-url",
|
|
11403
|
+
model: request.modelId
|
|
11404
|
+
});
|
|
11343
11405
|
const apiKey = request.apiKey;
|
|
11344
|
-
|
|
11345
|
-
const
|
|
11406
|
+
const customHeaders = request.headers;
|
|
11407
|
+
const hasCustomHeaders = customHeaders !== void 0 && Object.keys(customHeaders).length > 0;
|
|
11408
|
+
if (!apiKey && !hasCustomHeaders) throw new CompactorFailure("no credentials (use /login or the provider's API key variable)", {
|
|
11409
|
+
code: "missing-credentials",
|
|
11410
|
+
model: request.modelId
|
|
11411
|
+
});
|
|
11412
|
+
const secrets = collectSecrets(apiKey, customHeaders);
|
|
11413
|
+
const timeoutMs = request.timeoutMs !== void 0 && Number.isFinite(request.timeoutMs) && request.timeoutMs > 0 ? request.timeoutMs : COMPACTOR_REQUEST_TIMEOUT_MS;
|
|
11346
11414
|
const timeout = AbortSignal.timeout(timeoutMs);
|
|
11347
11415
|
const signal = AbortSignal.any([
|
|
11348
11416
|
request.signal,
|
|
11349
11417
|
timeout,
|
|
11350
11418
|
...request.stop ? [request.stop] : []
|
|
11351
11419
|
]);
|
|
11352
|
-
const failure = (error) => {
|
|
11353
|
-
if (request.signal.aborted) throw new
|
|
11354
|
-
if (request.stop?.aborted) throw new CompactorFailure("request aborted"
|
|
11355
|
-
|
|
11356
|
-
|
|
11420
|
+
const failure = (error, options) => {
|
|
11421
|
+
if (request.signal.aborted) throw new CompactionCancelledError({ reason: "aborted" });
|
|
11422
|
+
if (request.stop?.aborted) throw new CompactorFailure("request aborted", {
|
|
11423
|
+
code: "request-aborted",
|
|
11424
|
+
model: request.modelId
|
|
11425
|
+
});
|
|
11426
|
+
if (timeout.aborted) throw new CompactorFailure(`timed out after ${timeoutMs} ms`, {
|
|
11427
|
+
code: "timeout",
|
|
11428
|
+
timeoutMs,
|
|
11429
|
+
model: request.modelId
|
|
11430
|
+
});
|
|
11431
|
+
const message = typeof error === "string" ? error : error.message || error.name;
|
|
11432
|
+
throw new CompactorFailure(redact(message, secrets), {
|
|
11433
|
+
code: options?.code ?? "network-error",
|
|
11434
|
+
...options?.status !== void 0 ? { status: options.status } : {},
|
|
11435
|
+
model: request.modelId
|
|
11436
|
+
});
|
|
11437
|
+
};
|
|
11438
|
+
const url = resolveCompactorUrl(baseUrl, request.endpointPath);
|
|
11439
|
+
const headers = {
|
|
11440
|
+
"Content-Type": "application/json",
|
|
11441
|
+
...customHeaders
|
|
11357
11442
|
};
|
|
11358
|
-
|
|
11443
|
+
if (apiKey && !hasHeaderCaseInsensitive(headers, "authorization")) headers.Authorization = `Bearer ${apiKey}`;
|
|
11359
11444
|
let response;
|
|
11360
11445
|
try {
|
|
11361
|
-
response = await (request.fetchFn ?? fetch)(
|
|
11446
|
+
response = await (request.fetchFn ?? fetch)(url, {
|
|
11362
11447
|
method: "POST",
|
|
11363
|
-
headers
|
|
11364
|
-
|
|
11365
|
-
"Content-Type": "application/json"
|
|
11366
|
-
},
|
|
11367
|
-
body: JSON.stringify({
|
|
11368
|
-
messages: request.messages,
|
|
11369
|
-
query: request.query,
|
|
11370
|
-
compression_ratio: COMPACTOR_COMPRESSION_RATIO,
|
|
11371
|
-
preserve_recent: 0,
|
|
11372
|
-
include_markers: true,
|
|
11373
|
-
include_line_ranges: false,
|
|
11374
|
-
model: request.modelId
|
|
11375
|
-
}),
|
|
11448
|
+
headers,
|
|
11449
|
+
body: JSON.stringify(buildCompactorPayload(request)),
|
|
11376
11450
|
signal
|
|
11377
11451
|
});
|
|
11378
11452
|
} catch (error) {
|
|
11379
|
-
return failure(error instanceof Error ? error : String(error));
|
|
11453
|
+
return failure(error instanceof Error ? error : String(error), { code: "network-error" });
|
|
11380
11454
|
}
|
|
11381
|
-
if (!response.ok) return failure(await httpErrorMessage(response,
|
|
11455
|
+
if (!response.ok) return failure(await httpErrorMessage(response, secrets), {
|
|
11456
|
+
code: "http-error",
|
|
11457
|
+
status: response.status
|
|
11458
|
+
});
|
|
11382
11459
|
let body;
|
|
11383
11460
|
try {
|
|
11384
11461
|
body = await response.json();
|
|
11385
11462
|
} catch (error) {
|
|
11386
11463
|
if (request.signal.aborted || timeout.aborted) return failure(error instanceof Error ? error : String(error));
|
|
11387
|
-
throw new CompactorFailure("malformed response"
|
|
11464
|
+
throw new CompactorFailure("malformed response", {
|
|
11465
|
+
code: "malformed-response",
|
|
11466
|
+
model: request.modelId
|
|
11467
|
+
});
|
|
11388
11468
|
}
|
|
11389
|
-
if (request.signal.aborted) throw new
|
|
11390
|
-
if (typeof body !== "object" || body === null) throw new CompactorFailure("malformed response"
|
|
11391
|
-
|
|
11392
|
-
|
|
11469
|
+
if (request.signal.aborted) throw new CompactionCancelledError({ reason: "aborted" });
|
|
11470
|
+
if (typeof body !== "object" || body === null) throw new CompactorFailure("malformed response", {
|
|
11471
|
+
code: "malformed-response",
|
|
11472
|
+
model: request.modelId
|
|
11473
|
+
});
|
|
11474
|
+
let text = responseText(body);
|
|
11475
|
+
for (const secret of secrets) if (secret) text = text.replaceAll(secret, "[redacted]");
|
|
11476
|
+
if (!text) throw new CompactorFailure("empty output", {
|
|
11477
|
+
code: "empty-output",
|
|
11478
|
+
model: request.modelId
|
|
11479
|
+
});
|
|
11393
11480
|
const usage = compactorUsage(body.usage);
|
|
11394
11481
|
return {
|
|
11395
11482
|
text,
|
|
@@ -12122,16 +12209,16 @@ var RpcTerminalDrain = class {
|
|
|
12122
12209
|
return this.generation === generation && this.settlement ? this.settlement : Promise.resolve();
|
|
12123
12210
|
}
|
|
12124
12211
|
};
|
|
12125
|
-
export { AgentTokenMeter, AgentWakeDispatcher, COMPACTED_OUTPUT_MAX_TOKENS,
|
|
12212
|
+
export { AgentTokenMeter, AgentWakeDispatcher, COMPACTED_OUTPUT_MAX_TOKENS, COMPACTED_OUTPUT_MAX_TRIGGER_SHARE, COMPACTOR_LINE_WIDTH, COMPACTOR_REQUEST_TIMEOUT_MS, ChatRowView, DEFAULT_AGENT_WAIT_BUDGET_MS, DEFAULT_COMPACTION_SETTINGS, DialogView, FILE_HEADERS_ONLY, FileAuthStorageBackend, InMemoryAuthStorageBackend, InteractiveEngineMonitor, JsonRpcLineReader, LLAMA_PROVIDER_ID, LONG_STREAM_CUT_ADVICE, LONG_STREAM_CUT_MS, MAX_LONG_STREAM_CUT_RETRIES, McpAuthRequiredError, McpHttpError, McpSessionExpiredError, MessageAdmissionBoundary, ModelConfig, OptionListView, PreviewBlockRenderer, QuestionnairePropsAdapter, ResumeCatalogTimeoutError, ResumeCatalogUnavailableError, ResumeError, ResumeNotFoundError, ResumePreconditionError, RpcTerminalDrain, SESSIONS_STORAGE_ENV, STORAGE_ENV, STRUCTURED_OUTPUT_TOOL_NAME, SessionWorkUnsettledError, StartupDialogInputGuard, StreamableHttpTransport, TaskSupervisor, TempDirRefusedError, TodoParams, WorkingRunMeter, abortSessionWork, acquireProtectedPaths, addShellOutputPreview, agentTokenTotal, agentWakeDispatcher, applyExtensionSourceInfo, applyProviderRateLimitObservation, armSessionQuitStops, assertPrivateDirectory, assertPrivateDirectoryAsync, assertSessionOpen, assertWorkspace, asyncAuthStorageReads, automaticWaitBudgetMs, bindTaskChatPage, buildCompactorMessages, buildFallbackModel, buildQuestionnaireResponse, buildToolResult, calculateContextTokens, captureChatSnapshot, captureTaskChatFile, chatPageRequest, classifyRepository, clearNestedToolCalls, compactedOutputTokenCap, compactionMeta, configureProviderRequestBudget, createLlamaProvider, createStructuredOutputCapture, createStructuredOutputTool, createToolDefinitionFromAgentTool, createTwoFilesPatch, detectStartupTheme, discoverAppendSystemPromptFile, discoverSystemPromptFile, drainSessionReload, drainSessionWork, drainSessionWorkWithin, dropWrongTypedSettings, ensurePrivateTempDir, ensurePrivateTempDirAsync, ensureSessionTempDirAsync, ensureTempDirAsync, estimateContextTokens, estimateDirectBranchContextTokens, estimateProjectedContextTokens, estimateTextTokens, estimateTokens, executeNestedToolCall, findExactModelReferenceMatch, findResumeError, findSourceInfoForPath, formatDimensionNote, formatKillCall, formatPatch, formatTruncationNotice, formatWorkingElapsed, formatWorkingMeta, fun, gen, getCallableTools, getDefaultSourceInfoForPath, getLastAssistantUsage, getNativeMcpToolIdentity, getPowerShellConfig, getPowerShellConfigAsync, getShellConfig, getShellConfigAsync, getShellEnvAsync, getTempRootDir, hasCallingSessionWork, hasProcessStorageSelection, hasSessionReload, importAfterEvaluation, installHostModuleBridge, invalidSettingMessage, isLongStreamCut, isPowerShellAvailable, isPowerShellAvailableAsync, isProtectedSessionTempDir, isProviderLimitFailure, isProviderRateLimit, isResumeCatalogTimeoutError, isResumeCatalogUnavailableError, isResumeError, isResumeNotFoundError, isResumePreconditionError, isRetryableResumeError, isSelectedNativeMcpTool, isTodoOperationError, isWorkspace, killChildProcessTree, killProcessTree, killSupervisedProcessTrees, killTrackedDetachedChildren, limitQuitShutdownHandlers, loadTaskOwnTranscriptEntries, loadTaskOwnTranscriptHistory, markDetachedChildExited, markNativeMcpToolDefinition, markProviderRateLimitObserved, matchesMcpDirectToolSelection, modelIdForModel, nextRetryDecision, normalizeDerivedSessionEntries, normalizeWorkingRunSnapshot, observeAccountCatalog, observeProviderRateLimits, observedTaskChatWrite, onSessionQuit, ownedSessionManagerStores, ownedSessionPermits, ownedSessionStores, prepareSourceEntries, prepareSourceEntry, previewProcessStorageSelection, previewSessionSettingSelection, processSharedStorageSelection, processSharedStorageSelectionAsync, processStorageEnvironment, processStorageEnvironmentAsync, providerAdmissionTurn, providerCooldownMs, providerIdForModel, providerLimitScope, providerRateLimitObservations, providerRateLimitSnapshot, providerRequestGate, providerRetryHint, providerUnavailableMs, rebuildKillResult, rebuildShellWaitResult, recordNestedToolCalls, recordProviderRateLimit, recordProviderRetryHint, recordProviderSuccess, recordedRepo, reduce, registerSessionRetirement, registerSessionWorkOwner, registerSourceBuiltinLoad, rehydrateResumeError, renewSessionWork, repeatsLongStreamCut, requestCompactorOutput, require_Node, require_anchors, require_directives, require_lib, require_semver, resizeImage, resolveModelReference, resolveSessionTempDirPath, restoreAnthropicReplayThinkingBlocks, retireSessionReloadGeneration, runCommand, runCommandCapture, runCommandSync, runInProgress, runWithConcurrency, sanitizeTempPathComponent, selectChatRowProps, selectDialogProps, selectMultiSelectProps, selectOptionListProps, selectPreviewPaneProps, selectProcessStorage, selectProcessStorageAsync, selectProcessStorageSteps, selectSubmitPickerProps, selectTabBarProps, serializeResumeError, sessionGenerationClosing, sessionLifetime, sessionQuitSignal, setActiveSessionTempId, setCliStorageSelection, setProviderRequestGate, shouldCompact, showFirstTimeSetup, showStartupInput, showStartupSelector, shutdownDeadline, spawnShellProcess, startParentProcessGuardian, structuredPatch, summarizeQuestions, taskChatPage, taskExtensionStatuses, taskOwnTranscriptEntries, taskTranscriptSource, trackDetachedChildPid, trackDetachedChildProcess, trackSessionReload, trackSessionWork, transformTemplate, tryAdmitProviderRequest, untilShutdownHandlerDeadline, untrackDetachedChildPid, validateProcessStorageAsync, validateQuestionnaire, wakeKeyNamespace, watchTaskExtensionStatuses, watchTaskTranscriptBindings, withBuiltinDiagnostics, withDiscoveredModels, withPersonalizedCatalog, withRemoteCatalog, withTaskChatRows, workspace, wrapLongLines, wrapToolDefinition };
|
|
12126
12213
|
|
|
12127
|
-
//# sourceMappingURL=startup-0-2-
|
|
12214
|
+
//# sourceMappingURL=startup-0-2-27OWFHV6.js.map
|
|
12128
12215
|
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
12129
12216
|
// demand that fails in a process an in-place update left running says to restart.
|
|
12130
12217
|
function __atomicOnDemandFailed(error, feature) {
|
|
12131
12218
|
return (async () => {
|
|
12132
12219
|
const root = new URL("../", import.meta.url);
|
|
12133
12220
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
12134
|
-
const key = `${root.href}#0.10.
|
|
12221
|
+
const key = `${root.href}#0.10.10-alpha.1`;
|
|
12135
12222
|
let release = releases.get(key);
|
|
12136
12223
|
if (release === undefined) {
|
|
12137
12224
|
const current = (async () => {
|
|
@@ -12159,7 +12246,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
12159
12246
|
} catch {
|
|
12160
12247
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
12161
12248
|
}
|
|
12162
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.
|
|
12249
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.10-alpha.1" ? installed : running !== undefined && running.version !== "0.10.10-alpha.1" ? "0.10.10-alpha.1" : undefined;
|
|
12163
12250
|
if (updatedTo === undefined) throw error;
|
|
12164
12251
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
12165
12252
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|