@bastani/atomic 0.10.15-alpha.2 → 0.10.16-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 +71 -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 +6 -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 +2 -2
- 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
|
@@ -5,7 +5,7 @@ import { type StorageDialect } from "../dialect.js";
|
|
|
5
5
|
import { type ForkDetachOptions, type ForkDetachReport } from "./fork-detach.js";
|
|
6
6
|
import { SqlSessionSearchIndex } from "./session-search-index.js";
|
|
7
7
|
import { type SqlSessionChatRecords } from "./sql-chat-records.js";
|
|
8
|
-
import type { ChildDisplayLaunch, ForkArchiveSource, OversizedSessionEntry, SessionBlob, SessionBranchPageCut, SessionCompactionPoint, SessionCwdMatcher, SessionEntriesPage, SessionEntriesQuery, SessionEntryRange, SessionEntrySizes, SessionForkSeed, SessionForkStream, SessionListQuery, SessionOpenMarker, SessionOpenMarkerAge, SessionOpenMarkerStore, SessionRecordHeader, SessionResume, SessionScanOptions, SessionScanPage, SessionSnapshot, SessionSnapshotCut, SessionStore, SessionStoredEntry, SessionSummary, SessionTail, SessionTaskReferenceDuplicatePage, SessionTaskReferenceDuplicateQuery, SessionTreeOutlineEntry, SessionWriteOptions, SessionWriteResult, StorageDescriptor } from "./types.js";
|
|
8
|
+
import type { ChildDisplayLaunch, ForkArchiveSource, OversizedSessionEntry, SessionBlob, SessionBranchPageCut, SessionBranchSnapshotMetadata, SessionCompactionPoint, SessionCwdMatcher, SessionEntriesPage, SessionEntriesQuery, SessionEntryRange, SessionEntrySizes, SessionForkSeed, SessionForkStream, SessionListQuery, SessionOpenMarker, SessionOpenMarkerAge, SessionOpenMarkerStore, SessionRecordHeader, SessionResume, SessionScanOptions, SessionScanPage, SessionSnapshot, SessionSnapshotCut, SessionStore, SessionStoredEntry, SessionSummary, SessionTail, SessionTaskReferenceDuplicatePage, SessionTaskReferenceDuplicateQuery, SessionTreeOutlineEntry, SessionWriteOptions, SessionWriteResult, StorageDescriptor } from "./types.js";
|
|
9
9
|
/**
|
|
10
10
|
* The newest sessions schema this build reads and writes. Version 2 stores long entries in chunks (#4954), which a build
|
|
11
11
|
* that knows only version 1 would read as stubs. A database stays at version 1, which older builds still open, until
|
|
@@ -129,6 +129,7 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
129
129
|
get chatRecords(): SqlSessionChatRecords | undefined;
|
|
130
130
|
private readonly entryByteLength;
|
|
131
131
|
private chunkRowids?;
|
|
132
|
+
private captureHeadings;
|
|
132
133
|
/** Session ids of each recently listed scope, valid while the store's change token is unchanged. */
|
|
133
134
|
private readonly scopes;
|
|
134
135
|
/** Listed summaries of sessions that still exist at the cached version; never more than the store holds. */
|
|
@@ -139,6 +140,8 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
139
140
|
*/
|
|
140
141
|
private listing;
|
|
141
142
|
private readonly resumeIndexes;
|
|
143
|
+
/** A just-opened session's exact prefix may be forked even if the source appended before the fork took its locks. */
|
|
144
|
+
private lastForkCut?;
|
|
142
145
|
private readonly forkStagingTable;
|
|
143
146
|
/** The generation each recently read session's row held at a revision: see `generation`. */
|
|
144
147
|
private readonly generations;
|
|
@@ -158,6 +161,7 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
158
161
|
readonly prefix?: string;
|
|
159
162
|
readonly cwdMatcher?: SessionCwdMatcher;
|
|
160
163
|
}): Promise<SqlSessionStore>;
|
|
164
|
+
static buildCaptureHeadingIndex(database: SqliteDatabase, prefix?: string): Promise<boolean>;
|
|
161
165
|
private static openWithCatalog;
|
|
162
166
|
/**
|
|
163
167
|
* Removes, in a bounded number of short transactions, the staged rows of clones that stopped mid-copy and whose lease
|
|
@@ -476,9 +480,8 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
476
480
|
*/
|
|
477
481
|
private sharedForkDonor;
|
|
478
482
|
/**
|
|
479
|
-
* A fork with shared history of
|
|
480
|
-
*
|
|
481
|
-
* the fork to read the donor's rows, when the donor's resume index does not cover its watermark.
|
|
483
|
+
* A fork with shared history of an exact complete-session cut (#6560): its segments, its lineage and its session
|
|
484
|
+
* row, whose summary is the donor's at the chosen cut in a generation of its own, and no row of any entry.
|
|
482
485
|
*/
|
|
483
486
|
private writeSharedPrefixFork;
|
|
484
487
|
/**
|
|
@@ -708,6 +711,9 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
708
711
|
readonly limit?: number;
|
|
709
712
|
readonly backward?: boolean;
|
|
710
713
|
}): Promise<{
|
|
714
|
+
items: never[];
|
|
715
|
+
} | {
|
|
716
|
+
lastSeq: number;
|
|
711
717
|
items: {
|
|
712
718
|
readonly seq: number;
|
|
713
719
|
readonly bytes: number;
|
|
@@ -716,8 +722,11 @@ export declare class SqlSessionStore implements SessionStore {
|
|
|
716
722
|
readonly epoch: string;
|
|
717
723
|
}[];
|
|
718
724
|
} | {
|
|
725
|
+
lastSeq: number;
|
|
719
726
|
items: SessionStoredEntry[];
|
|
720
727
|
}>;
|
|
728
|
+
/** Compare finished subagents' captures without opening or reading their conversations. */
|
|
729
|
+
readBranchSnapshotMetadata(sessionIds: readonly string[]): Promise<Map<string, SessionBranchSnapshotMetadata | null>>;
|
|
721
730
|
/**
|
|
722
731
|
* The snapshot entries of the session's resume index, read with the index and nothing else: no entry is read, and an
|
|
723
732
|
* index that does not cover the session as it stands is not rebuilt here (#5554).
|
|
@@ -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-alpha.1`;
|
|
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-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16-alpha.1 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-alpha.1`;
|
|
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-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16-alpha.1 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-alpha.1`;
|
|
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-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16-alpha.1 while this session was running; restart it to keep using /tree.", {
|
|
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-alpha.1`;
|
|
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-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16-alpha.1 while this session was running; restart it to keep using /tree.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
import { read, readValue, skip, stringValue } from "../../../_shared/startup-0-5-
|
|
2
|
+
import { read, readValue, skip, stringValue } from "../../../_shared/startup-0-5-HZX3ZPTP.js";
|
|
3
3
|
// dist/core/storage/session/tree-presentation.js
|
|
4
4
|
var FoldMatches = class FoldMatches {
|
|
5
5
|
tail = "";
|
|
@@ -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-alpha.1`;
|
|
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-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16-alpha.1 while this session was running; restart it to keep using /tree.", {
|
|
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-alpha.1`;
|
|
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-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.16-alpha.1 while this session was running; restart it to keep using /tree.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Usage } from "@bastani/atomic-ai/compat";
|
|
2
|
-
import type { CompactionEntry, LabelEntry, SessionEntry, SessionWorkflowMetadata } from "../../session-manager-types.ts";
|
|
2
|
+
import type { CompactionEntry, LabelEntry, SessionEntry, SessionWorkflowMetadata, WorktreeSnapshotEntry } from "../../session-manager-types.ts";
|
|
3
3
|
import type { SnapshotBlobStore } from "../../worktree-snapshot/types.ts";
|
|
4
4
|
export declare const SESSION_FORMAT_VERSION = 4;
|
|
5
5
|
/** Yield between archive pages, including in browser-backed custom stores. */
|
|
@@ -80,6 +80,10 @@ export interface SessionHistoryPage {
|
|
|
80
80
|
readonly current?: string;
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
+
/** A sparse page may also certify the current history watermark from the same read. */
|
|
84
|
+
export interface SessionSelectedPage extends SessionHistoryPage {
|
|
85
|
+
readonly lastSeq?: number;
|
|
86
|
+
}
|
|
83
87
|
export interface SessionHistoryReadOptions {
|
|
84
88
|
/** Order in which pages are visited. The entries within each page always remain chronological. */
|
|
85
89
|
readonly direction?: "forward" | "backward";
|
|
@@ -285,6 +289,14 @@ export interface SessionChildReadCut {
|
|
|
285
289
|
readonly seqs: readonly number[];
|
|
286
290
|
readonly aliases: Readonly<Record<string, SessionChildAliases>>;
|
|
287
291
|
}
|
|
292
|
+
export interface SessionBranchSnapshotMetadata {
|
|
293
|
+
readonly epoch: string;
|
|
294
|
+
readonly lastSeq: number;
|
|
295
|
+
readonly records: SessionSnapshotCut["records"];
|
|
296
|
+
readonly entries: readonly (Pick<WorktreeSnapshotEntry, "root" | "snapshotId" | "timestamp" | "restore"> & {
|
|
297
|
+
readonly capture: boolean;
|
|
298
|
+
})[];
|
|
299
|
+
}
|
|
288
300
|
/** Where a session's `worktree_snapshot` entries are, as the store's index of its history locates them (#5554). */
|
|
289
301
|
export interface SessionSnapshotCut {
|
|
290
302
|
readonly epoch: string;
|
|
@@ -626,6 +638,12 @@ export interface SessionStore {
|
|
|
626
638
|
deferChildRecords: true;
|
|
627
639
|
}): Promise<SessionResume>;
|
|
628
640
|
readChildCatalogCut?(sessionId: string): Promise<SessionChildReadCut>;
|
|
641
|
+
/**
|
|
642
|
+
* Active-branch restore mappings and capture candidates from one history cut per session, in branch order.
|
|
643
|
+
* A store can retain only the newest capture per recorded root (ties go to the later entry). A null value means
|
|
644
|
+
* the session does not exist; an omitted id requires the ordinary history reader.
|
|
645
|
+
*/
|
|
646
|
+
readBranchSnapshotMetadata?(sessionIds: readonly string[]): Promise<ReadonlyMap<string, SessionBranchSnapshotMetadata | null>>;
|
|
629
647
|
/**
|
|
630
648
|
* Where the session's snapshot entries are, from the index the store keeps of its history, without reading an entry:
|
|
631
649
|
* with `leafSeq`, only those on the branch from that sequence to the root. Undefined when that index does not cover
|
|
@@ -645,7 +663,7 @@ export interface SessionStore {
|
|
|
645
663
|
readSelectedPage?(sessionId: string, seqs: readonly number[], epoch: string, options?: {
|
|
646
664
|
readonly limit?: number;
|
|
647
665
|
readonly backward?: boolean;
|
|
648
|
-
}): Promise<
|
|
666
|
+
}): Promise<SessionSelectedPage>;
|
|
649
667
|
/** A local navigation from a stale manager may select a branch as of its original sequence watermark. */
|
|
650
668
|
/** Read the branch a forked child needs at its captured entry, with the current labels for copied targets. */
|
|
651
669
|
readForkWindow?(sessionId: string, entryId: string, options?: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { setLongTimeoutAt } from "../../__atomic_timers/index.js";
|
|
1
2
|
import { sqliteDialect } from "./dialect.js";
|
|
2
3
|
import { largestValueBytes, payloadTooLargeKind, StorageConfigError, StorageError, StorageInvalidTextError, StoragePayloadTooLargeError, StorageRollbackError, StorageTransactionClosedError, StorageTransientError, StorageUnavailableError, StoreClosedError, } from "./errors.js";
|
|
3
4
|
import { MAX_SEQUENCE_REQUEST_STATEMENTS, offerFinish, offerSequences, } from "./statement-sequence.js";
|
|
@@ -507,7 +508,7 @@ class LaneQueue {
|
|
|
507
508
|
normal = [];
|
|
508
509
|
priority = [];
|
|
509
510
|
running = false;
|
|
510
|
-
/** When the running operation started, as `
|
|
511
|
+
/** When the running operation started, as `performance.now()`. */
|
|
511
512
|
runningSince = 0;
|
|
512
513
|
idle = [];
|
|
513
514
|
watchdog;
|
|
@@ -544,10 +545,10 @@ class LaneQueue {
|
|
|
544
545
|
return;
|
|
545
546
|
}
|
|
546
547
|
this.running = true;
|
|
547
|
-
this.runningSince =
|
|
548
|
+
this.runningSince = performance.now();
|
|
548
549
|
// Started on a later microtask, as a promise chain starts it, never inside the call that queued it.
|
|
549
550
|
void operation.run().finally(() => {
|
|
550
|
-
|
|
551
|
+
this.watchdog?.clear();
|
|
551
552
|
this.watchdog = undefined;
|
|
552
553
|
this.watchdogBound = undefined;
|
|
553
554
|
this.running = false;
|
|
@@ -569,22 +570,22 @@ class LaneQueue {
|
|
|
569
570
|
// A priority call queued behind ordinary ones brings the planned check forward to its own, shorter bound.
|
|
570
571
|
if (bound === this.watchdogBound)
|
|
571
572
|
return;
|
|
572
|
-
|
|
573
|
+
this.watchdog?.clear();
|
|
573
574
|
this.watchdog = undefined;
|
|
574
575
|
this.watchdogBound = bound;
|
|
575
576
|
if (bound === undefined)
|
|
576
577
|
return;
|
|
577
|
-
this.watchdog =
|
|
578
|
+
this.watchdog = setLongTimeoutAt(() => {
|
|
578
579
|
this.watchdog = undefined;
|
|
579
580
|
this.watchdogBound = undefined;
|
|
580
|
-
const ran =
|
|
581
|
+
const ran = performance.now() - this.runningSince;
|
|
581
582
|
const failing = this.priority.splice(0);
|
|
582
583
|
if (ran >= STORAGE_QUEUED_CALL_MAX_WAIT_MS)
|
|
583
584
|
failing.push(...this.normal.splice(0));
|
|
584
585
|
for (const waiting of failing)
|
|
585
586
|
waiting.fail(this.stalled(ran));
|
|
586
587
|
this.watch();
|
|
587
|
-
},
|
|
588
|
+
}, this.runningSince + bound);
|
|
588
589
|
// A stuck operation ahead of the queue never keeps the process alive on its own.
|
|
589
590
|
this.watchdog.unref();
|
|
590
591
|
}
|
|
@@ -620,7 +621,7 @@ class ScopeQueue {
|
|
|
620
621
|
clock = 0;
|
|
621
622
|
idle = [];
|
|
622
623
|
watchdog;
|
|
623
|
-
/** When the planned check runs, as `
|
|
624
|
+
/** When the planned check runs, as `performance.now()`, or undefined when none is planned. */
|
|
624
625
|
watchdogAt;
|
|
625
626
|
stalled;
|
|
626
627
|
constructor(stalled, maxReads = Number.POSITIVE_INFINITY) {
|
|
@@ -678,7 +679,7 @@ class ScopeQueue {
|
|
|
678
679
|
if (call.started !== undefined || this.calls.some((other) => this.waitsFor(call, other)))
|
|
679
680
|
continue;
|
|
680
681
|
call.started = this.clock++;
|
|
681
|
-
call.runningSince =
|
|
682
|
+
call.runningSince = performance.now();
|
|
682
683
|
// Started on a later microtask, as a promise chain starts it, never inside the call that queued it.
|
|
683
684
|
void call.run().finally(() => {
|
|
684
685
|
this.calls.splice(this.calls.indexOf(call), 1);
|
|
@@ -720,15 +721,15 @@ class ScopeQueue {
|
|
|
720
721
|
at = Math.min(at ?? Number.POSITIVE_INFINITY, since + ScopeQueue.bound(call));
|
|
721
722
|
if (at === this.watchdogAt)
|
|
722
723
|
return;
|
|
723
|
-
|
|
724
|
+
this.watchdog?.clear();
|
|
724
725
|
this.watchdog = undefined;
|
|
725
726
|
this.watchdogAt = at;
|
|
726
727
|
if (at === undefined)
|
|
727
728
|
return;
|
|
728
|
-
this.watchdog =
|
|
729
|
+
this.watchdog = setLongTimeoutAt(() => {
|
|
729
730
|
this.watchdog = undefined;
|
|
730
731
|
this.watchdogAt = undefined;
|
|
731
|
-
const now =
|
|
732
|
+
const now = performance.now();
|
|
732
733
|
const failing = [];
|
|
733
734
|
for (const [call, since] of this.stuck())
|
|
734
735
|
if (now - since >= ScopeQueue.bound(call))
|
|
@@ -739,7 +740,7 @@ class ScopeQueue {
|
|
|
739
740
|
call.fail(this.stalled(ran));
|
|
740
741
|
this.next();
|
|
741
742
|
this.watch();
|
|
742
|
-
},
|
|
743
|
+
}, at);
|
|
743
744
|
// A stuck call ahead of the queue never keeps the process alive on its own.
|
|
744
745
|
this.watchdog.unref();
|
|
745
746
|
}
|