@bastani/atomic 0.10.15 → 0.10.16
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 +100 -0
- package/dist/__atomic_timers/index.js +112 -0
- package/dist/__atomic_timers/index.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/http-YFAPTIZD.js +20 -22
- package/dist/_shared/http-YFAPTIZD.js.map +1 -1
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +55 -25
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +13 -14
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/mode-shared-2QJSCUM6.js +16 -17
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
- package/dist/_shared/p0-cli-BB45ZQY6.js +23 -37
- package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +6 -5
- package/dist/_shared/p1a-prewarm-XIU57JHF.js.map +1 -1
- package/dist/_shared/{p1b-elig-TVB5CBLL.js → p1b-elig-BY2G5BUE.js} +28 -36
- package/dist/_shared/p1b-elig-BY2G5BUE.js.map +1 -0
- package/dist/_shared/runtime-O4KCSG4C.js +4 -4
- package/dist/_shared/sdk-OHKMDJ74.js +382 -45
- package/dist/_shared/sdk-OHKMDJ74.js.map +1 -1
- package/dist/_shared/session-data-AHTU7IS6.js +3 -3
- 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-Q3MWKUK4.js → startup-0-0-ERMIDHQT.js} +296 -382
- package/dist/_shared/startup-0-0-ERMIDHQT.js.map +1 -0
- package/dist/_shared/{startup-0-1-M6OWAYHH.js → startup-0-1-RTASI3HG.js} +430 -102
- package/dist/_shared/startup-0-1-RTASI3HG.js.map +1 -0
- package/dist/_shared/{startup-0-2-2HUMCPKX.js → startup-0-2-YZZOC22D.js} +8109 -7962
- package/dist/_shared/startup-0-2-YZZOC22D.js.map +1 -0
- package/dist/_shared/{startup-0-3-4ZYBYQNM.js → startup-0-3-DE2NCS6A.js} +130 -83
- package/dist/_shared/startup-0-3-DE2NCS6A.js.map +1 -0
- package/dist/_shared/startup-0-4-ZMJV547D.js +7 -7
- package/dist/_shared/{startup-0-5-YDW47QX6.js → startup-0-5-HZX3ZPTP.js} +411 -85
- package/dist/_shared/startup-0-5-HZX3ZPTP.js.map +1 -0
- package/dist/_shared/startup-10-0-TDQNBDDL.js +42 -29
- package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
- package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +11 -10
- package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +9 -8
- package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +24 -16
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +40 -19
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/startup-8-1-LZFXSD3Z.js +129 -92
- package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +1 -1
- package/dist/_shared/storage-command-7MGXLJGZ.js +6 -4
- package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
- package/dist/_shared/storage-status-K7PX2RXA.js +7 -6
- package/dist/_shared/storage-status-K7PX2RXA.js.map +1 -1
- package/dist/_shared/task-reference-stream-JWMUZSJX.js +1 -1
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/team-DOQKICG2.js +4 -3
- package/dist/_shared/team-DOQKICG2.js.map +1 -1
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/index.bundle.mjs +1 -2
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +12 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +102 -42
- package/dist/builtin/web-access/index.bundle.mjs +1 -2
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +6 -6
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +7 -6
- package/dist/cli/blueprint-command.code.js.map +1 -1
- 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 +2 -2
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +2 -2
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +2 -2
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +1 -1
- 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.d.ts +1 -0
- package/dist/core/debug.code.js +1 -1
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.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 +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.code.js +1 -1
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.code.js +1 -1
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/extensions/loader-virtual-modules.js +2 -2
- package/dist/core/extensions/runner-context.js +1 -1
- package/dist/core/http-dispatcher.d.ts +2 -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/lock-takeover.d.ts +2 -0
- package/dist/core/model-config.d.ts +28 -0
- package/dist/core/model-registry.js +1 -1
- package/dist/core/model-runtime-streaming.d.ts +3 -2
- 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-rate-limits.d.ts +17 -10
- package/dist/core/provider-request-admission.d.ts +16 -0
- package/dist/core/resume/blueprint/barrier.d.ts +6 -6
- package/dist/core/resume/blueprint/build.d.ts +3 -1
- package/dist/core/resume/blueprint/ledger.d.ts +3 -2
- package/dist/core/resume/blueprint/resume.d.ts +2 -1
- package/dist/core/retry-policy.d.ts +3 -1
- 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 +6 -6
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager-types.d.ts +1 -1
- 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-open-markers.js +1 -1
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/settings-duration.d.ts +3 -0
- package/dist/core/settings-manager-resource-accessors.d.ts +2 -1
- package/dist/core/settings-schema.d.ts +1 -0
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-file-gate.js +7 -6
- package/dist/core/storage/node-sqlite-file-gate.js.map +1 -1
- 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 +3 -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 +24 -7
- package/dist/core/storage/session/child-reader.code.js.map +1 -1
- 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 +1 -1
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +4 -4
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.d.ts +2 -2
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.d.ts +2 -2
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +4 -4
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.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 +4 -4
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.d.ts +13 -4
- 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 +20 -2
- package/dist/core/storage/sqlite-facade.js +14 -13
- package/dist/core/storage/sqlite-facade.js.map +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.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/heartbeat.d.ts +1 -0
- 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 +3 -3
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/ask-user-question/ask-user-question.d.ts +1 -1
- package/dist/core/tools/history-session.d.ts +2 -0
- package/dist/core/tools/read-url.code.js +3 -3
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.js +5 -6
- package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
- package/dist/core/worktree-snapshot/errors.code.js +3 -3
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/git.d.ts +2 -0
- 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 +6 -5
- package/dist/extensions/codemode/execute.code.js.map +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 +1 -1
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +8 -4
- package/dist/extensions/mcp/cli.code.js.map +1 -1
- 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.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index.js +6 -6
- 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 +3 -3
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.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/startup-shell-eligibility.js +1 -1
- package/dist/package-manager-cli.code.js +7 -7
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/rpc-entry.js +1 -1
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/10.js +1 -1
- package/dist/startup-stages/11.js +1 -1
- package/dist/startup-stages/12.js +1 -1
- package/dist/startup-stages/13.js +1 -0
- package/dist/startup-stages/2.js +2 -6
- package/dist/startup-stages/3.js +6 -1
- package/dist/startup-stages/4.js +1 -1
- package/dist/startup-stages/5.js +12 -1
- package/dist/startup-stages/6.js +8 -4
- package/dist/startup-stages/7.js +4 -3
- package/dist/startup-stages/8.js +1 -5
- package/dist/startup-stages/9.js +5 -1
- package/dist/startup-stages/stages.json +1 -1
- package/dist/utils/startup-database-spare.code.js +3 -3
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.code.js +1 -1
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/dist/utils/windows-cwd.js +3 -3
- package/dist/utils/windows-cwd.js.map +1 -1
- package/docs/changelog.mdx +20 -5
- package/docs/codemode.md +5 -2
- package/docs/compaction/branch-summaries.md +1 -1
- package/docs/compaction/custom-compactors.md +1 -1
- package/docs/custom-provider/api-reference.md +1 -1
- package/docs/custom-provider/registration.md +3 -0
- package/docs/custom-provider/streaming.md +1 -1
- package/docs/environment-variables.md +2 -2
- package/docs/guides/resume-on-any-machine.md +1 -0
- package/docs/libraries/ai.md +4 -2
- package/docs/libraries/codemode.md +1 -1
- package/docs/models/choose-a-model.md +1 -1
- package/docs/models-configuration.md +5 -2
- package/docs/models.md +32 -0
- package/docs/providers.md +33 -1
- package/docs/sdk/structured-decisions.md +4 -2
- package/docs/sessions.md +1 -1
- package/docs/settings.md +78 -16
- package/docs/storage/postgres/tuning.md +1 -0
- package/docs/subagents/reference.md +2 -1
- package/docs/tools.md +4 -3
- package/docs/worktree-snapshots/reference.md +2 -0
- package/docs/worktree-snapshots.md +4 -0
- package/package.json +9 -9
- package/schemas/models.schema.json +21 -0
- package/schemas/settings.schema.json +14 -1
- package/dist/_shared/p1b-elig-TVB5CBLL.js.map +0 -1
- package/dist/_shared/startup-0-0-Q3MWKUK4.js.map +0 -1
- package/dist/_shared/startup-0-1-M6OWAYHH.js.map +0 -1
- package/dist/_shared/startup-0-2-2HUMCPKX.js.map +0 -1
- package/dist/_shared/startup-0-3-4ZYBYQNM.js.map +0 -1
- package/dist/_shared/startup-0-5-YDW47QX6.js.map +0 -1
|
@@ -7,9 +7,10 @@ export interface ProviderRateLimitSnapshot {
|
|
|
7
7
|
readonly rateLimitCount: number;
|
|
8
8
|
readonly cooldownUntil: number;
|
|
9
9
|
}
|
|
10
|
-
/** The limit a failure was recorded against: the whole
|
|
10
|
+
/** The limit a failure was recorded against: the whole account or one of its models. */
|
|
11
11
|
export interface ProviderLimitScope {
|
|
12
12
|
readonly key: string;
|
|
13
|
+
readonly account?: string;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Resolves once a request to `provider`'s `model` may start under a limit kept outside this process, such as a worker
|
|
@@ -24,10 +25,14 @@ export type ProviderRequestGate = (provider: string, model: string, signal?: Abo
|
|
|
24
25
|
export interface ProviderRateLimitObservation {
|
|
25
26
|
readonly provider: string;
|
|
26
27
|
readonly model?: string;
|
|
28
|
+
/** Hash of the endpoint and credential, when known. */
|
|
29
|
+
readonly account?: string;
|
|
27
30
|
/** `cooldown` holds requests back; `unavailable` (an exhausted quota) makes the fallback walk skip the account. */
|
|
28
31
|
readonly kind: "cooldown" | "unavailable";
|
|
29
32
|
readonly untilEpochMs: number;
|
|
30
33
|
}
|
|
34
|
+
/** A short cooldown is handled at request admission, not by rejecting a fallback candidate. */
|
|
35
|
+
export declare function hasBlockingAccountLimit(retryCapMs: () => number, now?: number): boolean;
|
|
31
36
|
export declare function configureProviderRequestBudget(provider: string, budget: ProviderRequestBudget | undefined): void;
|
|
32
37
|
export declare function providerRateLimitSnapshot(provider: string): ProviderRateLimitSnapshot | undefined;
|
|
33
38
|
export declare function providerIdForModel(model: string | object | undefined): string | undefined;
|
|
@@ -37,11 +42,11 @@ export declare function modelIdForModel(model: string | object | undefined): str
|
|
|
37
42
|
* Time until requests to the provider (and, when given, this model) are admitted again. Pass `now` to compare
|
|
38
43
|
* several limits against one clock reading.
|
|
39
44
|
*/
|
|
40
|
-
export declare function providerCooldownMs(provider: string | undefined, model?: string, now?: number): number;
|
|
45
|
+
export declare function providerCooldownMs(provider: string | undefined, model?: string, now?: number, account?: string | null): number;
|
|
41
46
|
/** Time until an exhausted quota on the provider (and, when given, this model) resets. */
|
|
42
|
-
export declare function providerUnavailableMs(provider: string | undefined, model?: string, now?: number): number;
|
|
43
|
-
export declare function providerAdmissionDelayMs(provider: string, model?: string): number;
|
|
44
|
-
export declare function tryAdmitProviderRequest(provider: string, model?: string): number;
|
|
47
|
+
export declare function providerUnavailableMs(provider: string | undefined, model?: string, now?: number, account?: string | null): number;
|
|
48
|
+
export declare function providerAdmissionDelayMs(provider: string, model?: string, account?: string): number;
|
|
49
|
+
export declare function tryAdmitProviderRequest(provider: string, model?: string, account?: string): number;
|
|
45
50
|
/**
|
|
46
51
|
* A queued caller with a signal gives due aborts the rest of the timer pass. Reserve its place before yielding:
|
|
47
52
|
* later arrivals join the same turn, whose waiters try the slot in order. If a caller aborts, the next one gets
|
|
@@ -60,9 +65,11 @@ export declare function markProviderRateLimitObserved(error: object, scope: Prov
|
|
|
60
65
|
* Record a rate limit or exhausted quota and return how long the account stays limited. The limit covers
|
|
61
66
|
* only `model` when the failure names that model, and the whole provider otherwise.
|
|
62
67
|
*/
|
|
63
|
-
export declare function recordProviderRateLimit(provider: string | undefined, error: unknown, model?: string): number | undefined;
|
|
64
|
-
/** The limit a failure belongs to: its model when the failure names that model, else the whole
|
|
65
|
-
export declare function providerLimitScope(provider: string, error: unknown, model?: string): ProviderLimitScope;
|
|
68
|
+
export declare function recordProviderRateLimit(provider: string | undefined, error: unknown, model?: string, account?: string): number | undefined;
|
|
69
|
+
/** The limit a failure belongs to: its model when the failure names that model, else the whole account. */
|
|
70
|
+
export declare function providerLimitScope(provider: string, error: unknown, model?: string, account?: string): ProviderLimitScope;
|
|
71
|
+
/** Hold requests for an explicit wait after a server error, without counting the error as throttling. */
|
|
72
|
+
export declare function recordProviderServerRetryHint(provider: string, error: unknown, account?: string, status?: number | undefined): boolean;
|
|
66
73
|
/**
|
|
67
74
|
* Merge a limit another process observed. It only ever extends the limit of the same provider or model
|
|
68
75
|
* scope, ignores limits that already ended, and counts no failure here. Returns whether the limit grew.
|
|
@@ -73,7 +80,7 @@ export declare function applyProviderRateLimitObservation(observation: ProviderR
|
|
|
73
80
|
export declare function providerRateLimitObservations(): ProviderRateLimitObservation[];
|
|
74
81
|
/**
|
|
75
82
|
* Be told each time this process records or extends a limit, but not when it applies another process's
|
|
76
|
-
* observation.
|
|
83
|
+
* observation. Rate limits, exhausted quotas and server errors with retry advice notify, not ordinary requests.
|
|
77
84
|
*/
|
|
78
85
|
export declare function observeProviderRateLimits(observer: (observation: ProviderRateLimitObservation) => void): () => void;
|
|
79
86
|
/**
|
|
@@ -81,7 +88,7 @@ export declare function observeProviderRateLimits(observer: (observation: Provid
|
|
|
81
88
|
* again. A limit only ever grows, so a guess made before the hint was known cannot shorten it.
|
|
82
89
|
*/
|
|
83
90
|
export declare function recordProviderRetryHint(provider: string | undefined, error: unknown, scope: ProviderLimitScope): void;
|
|
84
|
-
export declare function recordProviderSuccess(provider: string, model?: string): void;
|
|
91
|
+
export declare function recordProviderSuccess(provider: string, model?: string, account?: string): void;
|
|
85
92
|
export declare function providerRetryHint(error: unknown): {
|
|
86
93
|
retryAfterMs?: number;
|
|
87
94
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Api, AssistantMessage, Model, StreamOptions } from "@bastani/atomic-ai";
|
|
2
|
+
/** The stream being admitted is itself a retry of an assistant call, even if SDK retries are disabled. */
|
|
3
|
+
export declare const assistantRetryAttempt: unique symbol;
|
|
4
|
+
/** Admission has a separate clock: a slow queue must not spend the HTTP request's own timeout. */
|
|
5
|
+
export declare const providerAdmissionTimeout: unique symbol;
|
|
6
|
+
export interface ProviderAdmissionOptions {
|
|
7
|
+
[assistantRetryAttempt]?: boolean;
|
|
8
|
+
[providerAdmissionTimeout]?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function admitProviderStream(model: Model<Api>, options: StreamOptions & ProviderAdmissionOptions, ownsTransport: boolean): Promise<{
|
|
11
|
+
options: StreamOptions;
|
|
12
|
+
run<T>(invoke: () => T): T;
|
|
13
|
+
observeFailure(error: AssistantMessage): void;
|
|
14
|
+
observeSuccess(): void;
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=provider-request-admission.d.ts.map
|
|
@@ -23,10 +23,10 @@ export interface BlueprintBuildFinished {
|
|
|
23
23
|
/** The warnings it earned; empty when it finished cleanly. */
|
|
24
24
|
readonly notices: readonly BlueprintBuildNotice[];
|
|
25
25
|
}
|
|
26
|
-
/** A resume
|
|
26
|
+
/** A resume waiting for another process's blueprint build or an update to the blueprint ledger. */
|
|
27
27
|
export interface BlueprintBuildWaiting {
|
|
28
28
|
readonly type: "blueprint_build_waiting";
|
|
29
|
-
/** The worktree whose
|
|
29
|
+
/** The worktree whose build is waiting. */
|
|
30
30
|
readonly root: string;
|
|
31
31
|
readonly message: string;
|
|
32
32
|
}
|
|
@@ -56,13 +56,13 @@ export declare function holdToolsUntilBuilt(sessionId: string, build: Promise<st
|
|
|
56
56
|
*/
|
|
57
57
|
export declare function onBlueprintBuildFinished(listener: (finished: BlueprintBuildFinished) => void): () => void;
|
|
58
58
|
/**
|
|
59
|
-
* Tells the user, through the listeners of {@link onBlueprintBuildWaiting}, that
|
|
60
|
-
* build
|
|
59
|
+
* Tells the user, through the listeners of {@link onBlueprintBuildWaiting}, that the build of `root` waits for another
|
|
60
|
+
* blueprint build, the leftovers of an interrupted build, or an update to the blueprint ledger.
|
|
61
61
|
*/
|
|
62
62
|
export declare function announceBlueprintBuildWaiting(root: string, message: string): void;
|
|
63
63
|
/**
|
|
64
|
-
* Tells `listener` each time a
|
|
65
|
-
*
|
|
64
|
+
* Tells `listener` each time a resumed worktree's blueprint build starts waiting, and at once of waits that started
|
|
65
|
+
* before anyone listened. Returns the unsubscribe.
|
|
66
66
|
*/
|
|
67
67
|
export declare function onBlueprintBuildWaiting(listener: (waiting: BlueprintBuildWaiting) => void): () => void;
|
|
68
68
|
/** Whether tool calls of `subject` wait for a blueprint build, or the agent has not yet been told how it ended. */
|
|
@@ -37,6 +37,8 @@ export interface BlueprintBuildConfig {
|
|
|
37
37
|
readonly environment?: NodeJS.ProcessEnv;
|
|
38
38
|
readonly fetchAction?: ActionFetcher;
|
|
39
39
|
}
|
|
40
|
+
/** Reports a wait to write the ledger, with the first worktree this build is setting up. */
|
|
41
|
+
export type BlueprintLedgerWait = (root: string, message: string) => void;
|
|
40
42
|
/** A blueprint that did not complete: which one, which step, and where its log is. */
|
|
41
43
|
export interface BlueprintFailure {
|
|
42
44
|
readonly scope: BlueprintScope;
|
|
@@ -100,7 +102,7 @@ export declare function describeBlueprints(repositories: readonly BlueprintRepos
|
|
|
100
102
|
* `post-build`. A step that fails stops the rest of its blueprint, never the other blueprints, and never the resume:
|
|
101
103
|
* the failure is in the outcome. Only `signal` aborting rejects, with its reason. Untrusted repositories run nothing.
|
|
102
104
|
*/
|
|
103
|
-
export declare function runBlueprintBuild(repositories: readonly BlueprintRepository[], config: BlueprintBuildConfig, signal?: AbortSignal): Promise<BlueprintBuildOutcome>;
|
|
105
|
+
export declare function runBlueprintBuild(repositories: readonly BlueprintRepository[], config: BlueprintBuildConfig, signal?: AbortSignal, onLedgerWait?: BlueprintLedgerWait): Promise<BlueprintBuildOutcome>;
|
|
104
106
|
/**
|
|
105
107
|
* Whether the worktree at `root`, restored by Atomic, still needs a build: its last build failed or never finished, or
|
|
106
108
|
* the ledger has no record of one (the worktree was never built, or a build died before it could write one).
|
|
@@ -46,7 +46,8 @@ export declare function readLedger(storeDir: string): Promise<BlueprintLedger>;
|
|
|
46
46
|
/**
|
|
47
47
|
* Applies `update` to the ledger as it is now and writes the result atomically. Updates are serialized, within this
|
|
48
48
|
* process by a queue and across processes by a lock file, so builds that finish at about the same time keep each
|
|
49
|
-
* other's entries. A lock that cannot be taken within its retries rejects with
|
|
49
|
+
* other's entries. Reports contention through `onWait`. A lock that cannot be taken within its retries rejects with
|
|
50
|
+
* the lock's error.
|
|
50
51
|
*/
|
|
51
|
-
export declare function updateLedger(storeDir: string, update: (ledger: BlueprintLedger) => BlueprintLedger): Promise<BlueprintLedger>;
|
|
52
|
+
export declare function updateLedger(storeDir: string, update: (ledger: BlueprintLedger) => BlueprintLedger, onWait?: (message: string) => void): Promise<BlueprintLedger>;
|
|
52
53
|
//# sourceMappingURL=ledger.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionManager } from "../../session-manager.ts";
|
|
2
|
-
import { type BlueprintBuildConfig, type BlueprintBuildOutcome, type BlueprintLayer, type BlueprintRepository } from "./build.ts";
|
|
2
|
+
import { type BlueprintBuildConfig, type BlueprintBuildOutcome, type BlueprintLayer, type BlueprintLedgerWait, type BlueprintRepository } from "./build.ts";
|
|
3
3
|
import { BlueprintBuildFailedError } from "./errors.ts";
|
|
4
4
|
import { type BlueprintNotice } from "./notices.ts";
|
|
5
5
|
/** A checkout of a session's repository on this node, with the remotes its snapshot recorded. */
|
|
@@ -44,6 +44,7 @@ export interface SetUpBlueprintsOptions {
|
|
|
44
44
|
readonly earlier?: readonly BlueprintCheckout[];
|
|
45
45
|
readonly config: BlueprintBuildConfig;
|
|
46
46
|
readonly signal?: AbortSignal;
|
|
47
|
+
readonly onLedgerWait?: BlueprintLedgerWait;
|
|
47
48
|
}
|
|
48
49
|
/**
|
|
49
50
|
* What a resumed session's first turn carries while the blueprint build runs behind it (`resume.waitForBlueprint:
|
|
@@ -19,7 +19,7 @@ export interface RetryPolicySettings {
|
|
|
19
19
|
export interface RetryDecision {
|
|
20
20
|
/** 1-based number of the retry this decision authorizes. */
|
|
21
21
|
readonly attempt: number;
|
|
22
|
-
/**
|
|
22
|
+
/** The full eligible server retry hint, or else Atomic's own backoff. */
|
|
23
23
|
readonly delayMs: number;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
@@ -38,6 +38,8 @@ export declare function isLongStreamCut(failure: unknown): boolean;
|
|
|
38
38
|
export declare function repeatsLongStreamCut(failure: unknown, longStreamCutRetriesSpent: number): boolean;
|
|
39
39
|
/** What to do when the same model keeps being cut after long attempts and is no longer retried. */
|
|
40
40
|
export declare const LONG_STREAM_CUT_ADVICE = "Atomic stopped retrying this model after its stream was cut again after 5 minutes or more, because another attempt is likely to be cut too. Split the work into smaller steps, lower the thinking effort, or switch to another model; the fallbackModels setting switches models automatically.";
|
|
41
|
+
/** The server's requested wait when it is too long to retry this target. A zero cap is disabled. */
|
|
42
|
+
export declare function overCapServerRetryDelay(failure: Pick<AssistantMessage, "retryAfterMs">, capMs?: number): number | undefined;
|
|
41
43
|
/**
|
|
42
44
|
* Decide whether one more attempt against the same target is allowed.
|
|
43
45
|
*
|
package/dist/core/sdk.code.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
import { withFileMutationQueue } from "../_shared/startup-0-0-
|
|
3
|
-
import { isPowerShellToolResult, withResourceAdmission } from "../_shared/startup-0-1-
|
|
4
|
-
import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputCapture, createStructuredOutputTool, getPowerShellConfig } from "../_shared/startup-0-2-
|
|
2
|
+
import { withFileMutationQueue } from "../_shared/startup-0-0-ERMIDHQT.js";
|
|
3
|
+
import { isPowerShellToolResult, withResourceAdmission } from "../_shared/startup-0-1-RTASI3HG.js";
|
|
4
|
+
import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputCapture, createStructuredOutputTool, getPowerShellConfig } from "../_shared/startup-0-2-YZZOC22D.js";
|
|
5
5
|
import { BASH_SHELL_PRESENTATION, createBashTool, createCodingTools, createEditTool, createFindTool, createKillTool, createLocalPowerShellOperations, createLsTool, createPowerShellTool, createPowerShellToolDefinition, createReadOnlyTools, createReadTool, createSearchTool, createWriteTool } from "../_shared/startup-8-1-LZFXSD3Z.js";
|
|
6
6
|
import { AgentSessionRuntime, HOST_STARTED_SESSION, SessionImportFileNotFoundError, createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createUnstartedAgentSession } from "../_shared/startup-15-1-4S7FLMNG.js";
|
|
7
7
|
export { AgentSessionRuntime, BASH_SHELL_PRESENTATION, HOST_STARTED_SESSION, STRUCTURED_OUTPUT_TOOL_NAME, SessionImportFileNotFoundError, createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createBashTool, createCodingTools, createEditTool, createFindTool, createKillTool, createLocalPowerShellOperations, createLsTool, createPowerShellTool, createPowerShellToolDefinition, createReadOnlyTools, createReadTool, createSearchTool, createStructuredOutputCapture, createStructuredOutputTool, createUnstartedAgentSession, createWriteTool, getPowerShellConfig, isPowerShellToolResult, withFileMutationQueue, withResourceAdmission };
|
package/dist/core/sdk.impl.js
CHANGED
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.16`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.16") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
package/dist/core/sdk.js
CHANGED
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.16`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.16") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -5,16 +5,16 @@ import { isProxy } from "node:util/types";
|
|
|
5
5
|
import { getCurrentSystemMessage } from "@bastani/atomic-ai";
|
|
6
6
|
import { recordsStrictToolLimits } from "@bastani/atomic-ai/api/strict-tool-limits";
|
|
7
7
|
import { createSessionCwdMatcherAsync, getAgentDir, normalizePath, pathsEqual, resolvePath } from "../_shared/p0-cli-BB45ZQY6.js";
|
|
8
|
-
import { SessionAppendRecovery, TOOL_DEACTIVATION_ENTRY_TYPE, chatEpoch, classifiedWorkflowMetadata, forkScope, forkStoreRelation, getDefaultSessionDirPath, postgresAppendConnectionFailure, storedRows, yieldToEventLoop } from "../_shared/startup-0-0-
|
|
9
|
-
import { ChildCatalog, SessionKeyDigests, TOOL_OUTPUT_ENTRY_TYPE, WorkspaceConfigError, assertSessionBlobStore, carriedTransformedPrompt, carryCompletionEvidence, convertToLlm, copySessionBlobs, sessionBlobHashes, shareCompletionEvidence, storeInlineToolOutputs, storeSessionBlobs, takeInlineToolOutput, takeInlineToolOutputEntry, writeChunksAtomically } from "../_shared/startup-0-1-
|
|
10
|
-
import { LEAF_MOVE_ENTRY_TYPE, applyContextEdit, assertSessionNotOpenElsewhere, buildContextEntries, buildSessionIndex, buildSessionProjection, buildSessionTree, collectContextEdits, getBranchPath, getLatestCompactionBoundaryEntry, holdSessionOpenMarker, isLeafMoveEntry } from "../_shared/startup-0-3-
|
|
8
|
+
import { SessionAppendRecovery, TOOL_DEACTIVATION_ENTRY_TYPE, chatEpoch, classifiedWorkflowMetadata, forkScope, forkStoreRelation, getDefaultSessionDirPath, postgresAppendConnectionFailure, storedRows, yieldToEventLoop } from "../_shared/startup-0-0-ERMIDHQT.js";
|
|
9
|
+
import { ChildCatalog, SessionKeyDigests, TOOL_OUTPUT_ENTRY_TYPE, WorkspaceConfigError, assertSessionBlobStore, carriedTransformedPrompt, carryCompletionEvidence, convertToLlm, copySessionBlobs, sessionBlobHashes, shareCompletionEvidence, storeInlineToolOutputs, storeSessionBlobs, takeInlineToolOutput, takeInlineToolOutputEntry, writeChunksAtomically } from "../_shared/startup-0-1-RTASI3HG.js";
|
|
10
|
+
import { LEAF_MOVE_ENTRY_TYPE, applyContextEdit, assertSessionNotOpenElsewhere, buildContextEntries, buildSessionIndex, buildSessionProjection, buildSessionTree, collectContextEdits, getBranchPath, getLatestCompactionBoundaryEntry, holdSessionOpenMarker, isLeafMoveEntry } from "../_shared/startup-0-3-DE2NCS6A.js";
|
|
11
11
|
import { SessionConflictError, SessionFormatVersionError, SessionIdMismatchError, SessionNotFoundError, StorageUnavailableError } from "./storage/session/errors.js";
|
|
12
12
|
import { EMPTY_SESSION_HISTORY_TOTALS, JsonlSessionStore, MemorySessionStore, addEntryToHistoryTotals, appendFailureWroteNothing, archivedAnswerAt, assertValidSessionId, bindSessionFile, createBranchSummaryEntry, createCompactionEntry, createContextEditEntry, createCustomEntry, createCustomMessageEntry, createLabelEntry, createMessageEntry, createModelChangeEntry, createSessionFilePath, createSessionHeader, createSessionId, createSessionInfoEntry, createSessionSummaryEntry, createThinkingLevelChangeEntry, createWorktreeSnapshotEntry, earlierTranscriptCursor, findInSessionHistory, findWorktreeSnapshotRecords, firstHistoryCursor, generateId, getEntriesWithoutHeader, getLatestSessionName, historyChunks, historyPages, isExtensionCustomState, lastBranchAnswer, markPrivateMemorySessionStore, readSessionRange, recoveryWitnessesOf, savedWindowAnswer, sessionResumeOf, storeSnapshotIndex, updateWorkflowStarts, validateSessionEntryStructure, validateSessionFileEntries, withForkFileWindow, witnessedIn, worktreeSnapshotPages } from "../_shared/startup-8-0-34CBHPZH.js";
|
|
13
13
|
import { SESSION_HISTORY_SCAN_ENTRIES, SessionDeletedError, SessionEntryError } from "../_shared/settings-startup-HXQLSUWM.js";
|
|
14
14
|
import { listProjectSessions, resolveParentSessionPaths } from "../_shared/session-manager-list-2BLEEZVG.js";
|
|
15
15
|
import { adoptInlineSnapshotBlobs, deleteSessionWithSnapshotRefs } from "../_shared/startup-8-1-LZFXSD3Z.js";
|
|
16
16
|
import { SessionBlobError, StorageRollbackError, isStorageTransientError } from "./storage/errors.js";
|
|
17
|
-
import "../_shared/startup-0-2-
|
|
17
|
+
import "../_shared/startup-0-2-YZZOC22D.js";
|
|
18
18
|
// dist/core/fork-context-path.js
|
|
19
19
|
const forkSettings = /* @__PURE__ */ new Set([
|
|
20
20
|
"workspace_binding",
|
|
@@ -2877,7 +2877,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
2877
2877
|
return (async () => {
|
|
2878
2878
|
const root = new URL("../", import.meta.url);
|
|
2879
2879
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
2880
|
-
const key = `${root.href}#0.10.
|
|
2880
|
+
const key = `${root.href}#0.10.16`;
|
|
2881
2881
|
let release = releases.get(key);
|
|
2882
2882
|
if (release === undefined) {
|
|
2883
2883
|
const current = (async () => {
|
|
@@ -2905,7 +2905,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
2905
2905
|
} catch {
|
|
2906
2906
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
2907
2907
|
}
|
|
2908
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.
|
|
2908
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.16" ? installed : running !== undefined && running.version !== "0.10.16" ? "0.10.16" : undefined;
|
|
2909
2909
|
if (updatedTo === undefined) throw error;
|
|
2910
2910
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
2911
2911
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.16`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.16") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.16`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.16") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -69,7 +69,7 @@ export interface ModelFallbackRecord {
|
|
|
69
69
|
skipped?: {
|
|
70
70
|
model: string;
|
|
71
71
|
provider: string;
|
|
72
|
-
reason: "no-credentials" | "auth-failed";
|
|
72
|
+
reason: "no-credentials" | "auth-failed" | "rate-limited" | "quota-exhausted";
|
|
73
73
|
}[];
|
|
74
74
|
}
|
|
75
75
|
export interface ModelChangeEntry extends SessionEntryBase {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
import { CURRENT_SESSION_VERSION, getDefaultSessionDir, getDefaultSessionDirPath } from "../_shared/startup-0-0-
|
|
3
|
-
import { buildContextEntries, buildSessionContext, buildSessionProjection, getLatestCompactionBoundaryEntry, getSessionLeafId, sessionEntryToContextMessages } from "../_shared/startup-0-3-
|
|
2
|
+
import { CURRENT_SESSION_VERSION, getDefaultSessionDir, getDefaultSessionDirPath } from "../_shared/startup-0-0-ERMIDHQT.js";
|
|
3
|
+
import { buildContextEntries, buildSessionContext, buildSessionProjection, getLatestCompactionBoundaryEntry, getSessionLeafId, sessionEntryToContextMessages } from "../_shared/startup-0-3-DE2NCS6A.js";
|
|
4
4
|
import { SESSION_ALREADY_OPEN_EXIT_CODE, SessionAlreadyOpenError, SessionDeletedError, SessionEntryError, SessionHistoryNotLoadedError, SessionIdError, SessionOpenElsewhereError } from "../_shared/settings-startup-HXQLSUWM.js";
|
|
5
5
|
import { assertValidSessionId, findMostRecentSession, isInternalHeader, loadEntriesFromFile, parseSessionEntries } from "../_shared/startup-8-0-34CBHPZH.js";
|
|
6
6
|
import { SessionManager } from "../_shared/startup-10-0-TDQNBDDL.js";
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.16`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.16") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.16`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.16") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
export { assertSessionNotOpenElsewhere, findSessionOpenHolder, holdSessionOpenMarker, prepareSessionOpenMarkers, sessionOpenMarkerRuns } from "../_shared/startup-0-3-
|
|
2
|
+
export { assertSessionNotOpenElsewhere, findSessionOpenHolder, holdSessionOpenMarker, prepareSessionOpenMarkers, sessionOpenMarkerRuns } from "../_shared/startup-0-3-DE2NCS6A.js";
|
|
3
3
|
//# sourceMappingURL=session-open-markers.js.map
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.16`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.16") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.16`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.16") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { DefaultProjectTrust, PackageSource, QuietStartup, ThinkingBudgetsSettings } from "./settings-types.ts";
|
|
1
|
+
import type { DefaultProjectTrust, PackageSource, QuietStartup, Settings, ThinkingBudgetsSettings } from "./settings-types.ts";
|
|
2
2
|
interface SettingsManagerResourceAccessors {
|
|
3
3
|
getHideThinkingBlock(): boolean;
|
|
4
|
+
getAnthropicThinkingDisplay(): Settings["anthropicThinkingDisplay"];
|
|
4
5
|
getExternalEditorCommand(): string | undefined;
|
|
5
6
|
setHideThinkingBlock(hide: boolean): void;
|
|
6
7
|
getShellPath(): string | undefined;
|
|
@@ -229,6 +229,7 @@ export declare const SettingsSchema: Type.TObject<{
|
|
|
229
229
|
maxDelayMs: Type.TOptional<Type.TNumber>;
|
|
230
230
|
}>>;
|
|
231
231
|
hideThinkingBlock: Type.TOptional<Type.TBoolean>;
|
|
232
|
+
anthropicThinkingDisplay: Type.TOptional<Type.TUnion<[Type.TLiteral<"updates">, Type.TLiteral<"summarized">]>>;
|
|
232
233
|
externalEditor: Type.TOptional<Type.TString>;
|
|
233
234
|
shellPath: Type.TOptional<Type.TString>;
|
|
234
235
|
quietStartup: Type.TOptional<Type.TUnion<[Type.TBoolean, Type.TLiteral<"header">]>>;
|
|
@@ -42,7 +42,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
42
42
|
return (async () => {
|
|
43
43
|
const root = new URL("../../", import.meta.url);
|
|
44
44
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
45
|
-
const key = `${root.href}#0.10.
|
|
45
|
+
const key = `${root.href}#0.10.16`;
|
|
46
46
|
let release = releases.get(key);
|
|
47
47
|
if (release === undefined) {
|
|
48
48
|
const current = (async () => {
|
|
@@ -70,7 +70,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
70
70
|
} catch {
|
|
71
71
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
72
72
|
}
|
|
73
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.
|
|
73
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.16" ? installed : running !== undefined && running.version !== "0.10.16" ? "0.10.16" : undefined;
|
|
74
74
|
if (updatedTo === undefined) throw error;
|
|
75
75
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
76
76
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
|
+
import { setLongTimeoutAt } from "../../__atomic_timers/index.js";
|
|
3
4
|
/**
|
|
4
5
|
* What the process's connections to one file are doing with its write lock, in one `Int32` they all share: `FREE`, a
|
|
5
6
|
* statement of the calling thread running (`CALLER`), or a connection on a thread of its own taking it (`tag * 4 + 2`)
|
|
@@ -172,7 +173,7 @@ function runNextWaiter(file, gate) {
|
|
|
172
173
|
return;
|
|
173
174
|
}
|
|
174
175
|
gate.waiters.shift();
|
|
175
|
-
|
|
176
|
+
waiter.timer?.clear();
|
|
176
177
|
ranThisTurn(file, gate);
|
|
177
178
|
}
|
|
178
179
|
/**
|
|
@@ -184,7 +185,7 @@ function failOverdue(file, gate) {
|
|
|
184
185
|
const overdue = gate.waiters.filter((waiting) => now >= waiting.deadline);
|
|
185
186
|
for (const waiter of overdue) {
|
|
186
187
|
gate.waiters.splice(gate.waiters.indexOf(waiter), 1);
|
|
187
|
-
|
|
188
|
+
waiter.timer?.clear();
|
|
188
189
|
waiter.fail();
|
|
189
190
|
}
|
|
190
191
|
// The calls behind them get their turn.
|
|
@@ -289,7 +290,7 @@ function armWhenFree(file, gate, waiter, state, timeoutMs, run, resolve, reject,
|
|
|
289
290
|
// a timer runs ahead of. At its deadline it fails if the word is taken. While the word is free it keeps its place:
|
|
290
291
|
// a free lock is never reported busy, and its turn comes (see `runNextWaiter`), so its busy timeout bounds how long
|
|
291
292
|
// it waits for the lock, not for its turn.
|
|
292
|
-
waiter.timer =
|
|
293
|
+
waiter.timer = setLongTimeoutAt(() => setImmediate(() => {
|
|
293
294
|
const index = gate.waiters.indexOf(waiter);
|
|
294
295
|
if (index === -1 || Atomics.load(state, 0) === FREE)
|
|
295
296
|
return;
|
|
@@ -297,7 +298,7 @@ function armWhenFree(file, gate, waiter, state, timeoutMs, run, resolve, reject,
|
|
|
297
298
|
waiter.fail();
|
|
298
299
|
ranThisTurn(file, gate);
|
|
299
300
|
forgetIfIdle(file, gate);
|
|
300
|
-
}),
|
|
301
|
+
}), waiter.deadline);
|
|
301
302
|
waiter.tryRun = () => {
|
|
302
303
|
const ran = runAdmitted(state, run);
|
|
303
304
|
if (ran === undefined)
|
|
@@ -841,7 +842,7 @@ function armTry(file, gate, waiter, database, timeoutMs, attempt, asBefore, refu
|
|
|
841
842
|
waiter.deadline = performance.now() + timeoutMs;
|
|
842
843
|
// At its deadline it is tried once more if it is the oldest; refused, or behind others while the lock is taken, it
|
|
843
844
|
// fails with the refusal. Behind others while the lock is free, it keeps its place.
|
|
844
|
-
waiter.timer =
|
|
845
|
+
waiter.timer = setLongTimeoutAt(() => setImmediate(() => {
|
|
845
846
|
const index = gate.waiters.indexOf(waiter);
|
|
846
847
|
if (index === -1)
|
|
847
848
|
return;
|
|
@@ -855,7 +856,7 @@ function armTry(file, gate, waiter, database, timeoutMs, attempt, asBefore, refu
|
|
|
855
856
|
ranThisTurn(file, gate);
|
|
856
857
|
}
|
|
857
858
|
forgetIfIdle(file, gate);
|
|
858
|
-
}),
|
|
859
|
+
}), waiter.deadline);
|
|
859
860
|
waiter.tryRun = () => settle(attemptOnce(database, timeoutMs, attempt));
|
|
860
861
|
// Refused at its last try, it fails with that refusal; never tried, with SQLITE_BUSY as the runtime reports it.
|
|
861
862
|
waiter.fail = () => reject(lastRefusal ?? busy());
|