@bastani/atomic 0.10.11-alpha.2 → 0.10.11-alpha.3
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 +99 -0
- package/README.md +5 -8
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +6 -6
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +5 -5
- package/dist/_shared/mode-shared-2QJSCUM6.js +6 -6
- package/dist/_shared/p0-cli-BB45ZQY6.js +46 -67
- package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +7 -8
- package/dist/_shared/p1a-prewarm-XIU57JHF.js.map +1 -1
- package/dist/_shared/{p1b-elig-ENCUPKKJ.js → p1b-elig-TVB5CBLL.js} +14 -2
- package/dist/_shared/{p1b-elig-ENCUPKKJ.js.map → p1b-elig-TVB5CBLL.js.map} +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +3 -3
- package/dist/_shared/{sdk-IQMULKFU.js → sdk-B5LEWGGI.js} +340 -163
- package/dist/_shared/sdk-B5LEWGGI.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/{startup-0-0-3IXNMFM2.js → startup-0-0-EZUKEP4Q.js} +48 -40
- package/dist/_shared/startup-0-0-EZUKEP4Q.js.map +1 -0
- package/dist/_shared/{startup-0-1-7T2IAE7J.js → startup-0-1-RTOHJFDJ.js} +195 -42
- package/dist/_shared/startup-0-1-RTOHJFDJ.js.map +1 -0
- package/dist/_shared/startup-0-2-5QHPCEON.js +33 -43
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +1 -1
- package/dist/_shared/startup-0-3-4ZYBYQNM.js +5 -5
- package/dist/_shared/startup-0-4-ZMJV547D.js +12 -7
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -1
- package/dist/_shared/startup-0-5-YDW47QX6.js +7 -7
- package/dist/_shared/startup-0-5-YDW47QX6.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +6 -6
- package/dist/_shared/startup-12-0-55AAXBJZ.js +2 -2
- package/dist/_shared/startup-14-0-MLX36RBG.js +4 -5
- package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
- package/dist/_shared/startup-15-1-4S7FLMNG.js +19 -27
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +39 -23
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/{startup-8-1-X32CYSXB.js → startup-8-1-LZFXSD3Z.js} +90 -1176
- package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +186 -35
- package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
- package/dist/_shared/storage-status-K7PX2RXA.js +557 -0
- package/dist/_shared/storage-status-K7PX2RXA.js.map +1 -0
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/team-DOQKICG2.js +376 -0
- package/dist/_shared/team-DOQKICG2.js.map +1 -0
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +23 -0
- package/dist/builtin/intercom/README.md +2 -2
- package/dist/builtin/intercom/broker/broker.bundle.mjs +913 -289
- package/dist/builtin/intercom/broker/database-wake-up-bus.ts +243 -64
- package/dist/builtin/intercom/broker/multinode-router.ts +154 -22
- package/dist/builtin/intercom/broker/multinode-state-store.ts +30 -3
- package/dist/builtin/intercom/broker/open-broker-state.ts +14 -0
- package/dist/builtin/intercom/broker/sql-add-column.ts +29 -5
- package/dist/builtin/intercom/broker/sql-ended-child-queue-store.ts +3 -2
- package/dist/builtin/intercom/broker/sql-held-send-store.ts +2 -2
- package/dist/builtin/intercom/broker/sql-known-session-store.ts +43 -19
- package/dist/builtin/intercom/broker/sql-lease-store.ts +170 -74
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +298 -47
- package/dist/builtin/intercom/broker/sql-pending-ask-store.ts +8 -5
- package/dist/builtin/intercom/broker/sql-released-ask-store.ts +12 -5
- package/dist/builtin/intercom/broker/sql-restoring-reservation-store.ts +24 -7
- package/dist/builtin/intercom/broker/sql-retention.ts +141 -0
- package/dist/builtin/intercom/broker/sql-schema.ts +136 -19
- package/dist/builtin/intercom/broker/sql-sent-message-authority.ts +74 -19
- package/dist/builtin/intercom/broker/wake-up-bus.ts +6 -0
- package/dist/builtin/intercom/index.bundle.mjs +2 -3
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/index.bundle.mjs +2 -10
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/bun/bundled-sqlite.js +41 -0
- package/dist/bun/bundled-sqlite.js.map +1 -0
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +4 -4
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +3 -3
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +3 -3
- package/dist/cli/intercom-command.code.js.map +1 -1
- 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 +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +3 -3
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.code.js +19 -113
- package/dist/cli/team-command.code.js.map +1 -1
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +5 -18
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-rehydrate-errors.d.ts +4 -9
- package/dist/core/compaction/compactor.d.ts +3 -3
- 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.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.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 +1 -1
- package/dist/core/extensions/runner-context.js +2 -2
- package/dist/core/intercom-broker-control-host.code.js +2 -2
- 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/package-manager-storage-adapters.code.js +1 -1
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/process-start-token.d.ts +8 -0
- package/dist/core/process-tree-containment.d.ts +16 -0
- package/dist/core/sdk-types.d.ts +1 -2
- package/dist/core/sdk-types.js.map +1 -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 +5 -5
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.code.js +1 -1
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.code.js +1 -1
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/settings-schema.d.ts +0 -3
- package/dist/core/storage/added-exports-0-10-11.js +19 -0
- package/dist/core/storage/added-exports-0-10-11.js.map +1 -0
- package/dist/core/storage/creation-time.js +105 -0
- package/dist/core/storage/creation-time.js.map +1 -0
- package/dist/core/storage/database.d.ts +19 -5
- package/dist/core/storage/database.js.map +1 -1
- package/dist/core/storage/dialect.d.ts +1 -1
- package/dist/core/storage/dialect.js +1 -1
- package/dist/core/storage/dialect.js.map +1 -1
- package/dist/core/storage/errors.d.ts +13 -13
- package/dist/core/storage/errors.js +10 -16
- package/dist/core/storage/errors.js.map +1 -1
- package/dist/core/storage/fenced-paths.d.ts +11 -0
- package/dist/core/storage/fenced-paths.js +11 -0
- package/dist/core/storage/fenced-paths.js.map +1 -1
- package/dist/core/storage/file-identity.d.ts +2 -0
- package/dist/core/storage/file-identity.js +24 -8
- package/dist/core/storage/file-identity.js.map +1 -1
- package/dist/core/storage/index.d.ts +3 -2
- package/dist/core/storage/index.js +5 -3
- package/dist/core/storage/index.js.map +1 -1
- package/dist/core/storage/libsql-removed.d.ts +71 -0
- package/dist/core/storage/libsql-removed.js +123 -0
- package/dist/core/storage/libsql-removed.js.map +1 -0
- package/dist/core/storage/migrations.d.ts +78 -14
- package/dist/core/storage/migrations.js +375 -49
- package/dist/core/storage/migrations.js.map +1 -1
- package/dist/core/storage/node-sqlite-file-gate.js +0 -15
- package/dist/core/storage/node-sqlite-file-gate.js.map +1 -1
- package/dist/core/storage/node-sqlite-thread.js +8 -13
- package/dist/core/storage/node-sqlite-thread.js.map +1 -1
- package/dist/core/storage/node-sqlite.js +51 -3
- package/dist/core/storage/node-sqlite.js.map +1 -1
- 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.d.ts +1 -1
- package/dist/core/storage/prefix.js +9 -2
- package/dist/core/storage/prefix.js.map +1 -1
- package/dist/core/storage/process-selection.d.ts +5 -5
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/schema-catalog.d.ts +7 -8
- package/dist/core/storage/schema-catalog.js +8 -8
- package/dist/core/storage/schema-catalog.js.map +1 -1
- package/dist/core/storage/selection.d.ts +7 -82
- package/dist/core/storage/selection.js +20 -235
- package/dist/core/storage/selection.js.map +1 -1
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +3 -3
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +4 -7
- package/dist/core/storage/session/fork-staging.code.js.map +1 -1
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +3 -3
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.d.ts +5 -1
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +3 -3
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/session-search-index.d.ts +43 -4
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +3 -3
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.d.ts +48 -11
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/sqlite-facade.d.ts +6 -1
- package/dist/core/storage/sqlite-facade.js +1 -0
- package/dist/core/storage/sqlite-facade.js.map +1 -1
- package/dist/core/storage/storage-status.code.js +1 -1
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.code.js +1 -1
- package/dist/core/storage/team.d.ts +26 -115
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.code.js +1 -1
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +3 -3
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +4 -4
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.code.js +1 -1
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/history-tasks.d.ts +3 -2
- package/dist/core/tools/read-url.code.js +4 -4
- 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.d.ts +40 -3
- package/dist/core/worktree-snapshot/blob-store.js +414 -21
- package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
- package/dist/core/worktree-snapshot/errors.code.js +2 -2
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/fork-blob-guard.js +81 -0
- package/dist/core/worktree-snapshot/fork-blob-guard.js.map +1 -0
- package/dist/core/worktree-snapshot/fork-snapshot-index.js +79 -38
- package/dist/core/worktree-snapshot/fork-snapshot-index.js.map +1 -1
- package/dist/core/worktree-snapshot/session-index-reset.code.js +4 -0
- package/dist/core/worktree-snapshot/session-index-reset.code.js.map +1 -1
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.code.js +1 -1
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.code.js +2 -2
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +3 -3
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -5
- package/dist/main-first-time-setup.code.js +1 -1
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/main.js +1 -1
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/modes/interactive/startup-shell-eligibility.js +1 -1
- package/dist/modes/interactive-engine/engine-prewarm.d.ts +1 -1
- package/dist/modes/print-mode.js +1 -1
- package/dist/package-manager-cli.code.js +6 -6
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/rpc-entry.js +1 -1
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/10.js +1 -1
- package/dist/startup-stages/11.js +1 -1
- package/dist/startup-stages/12.js +1 -1
- package/dist/startup-stages/2.js +2 -4
- package/dist/startup-stages/3.js +1 -3
- package/dist/startup-stages/4.js +1 -2
- package/dist/startup-stages/5.js +1 -1
- package/dist/startup-stages/6.js +5 -7
- package/dist/startup-stages/7.js +3 -10
- package/dist/startup-stages/8.js +7 -2
- package/dist/startup-stages/9.js +1 -7
- package/dist/startup-stages/stages.json +1 -1
- package/dist/utils/compile-cache-deferral.js +8 -13
- package/dist/utils/compile-cache-deferral.js.map +1 -1
- package/dist/utils/compile-cache-warmup-host.js +3 -4
- package/dist/utils/compile-cache-warmup-host.js.map +1 -1
- package/dist/utils/compile-cache.js +12 -100
- package/dist/utils/compile-cache.js.map +1 -1
- package/dist/utils/startup-database-spare.code.js +2 -2
- 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/worker-threads.js +2 -15
- package/dist/utils/worker-threads.js.map +1 -1
- package/docs/build.md +3 -3
- package/docs/changelog.mdx +1421 -69
- package/docs/compaction/reference.md +5 -5
- package/docs/compaction.md +7 -9
- package/docs/containerization.md +2 -2
- package/docs/custom-provider/api-reference.md +1 -1
- package/docs/docs.json +37 -10
- package/docs/environment-variables.md +0 -2
- package/docs/extensions/api-reference.md +4 -4
- package/docs/getting-started/installation.md +3 -0
- package/docs/guides/configuration.md +1 -1
- package/docs/guides/non-interactive.md +1 -1
- package/docs/guides/resume-on-any-machine.md +14 -22
- package/docs/guides/team-setup.md +56 -83
- package/docs/guides.md +2 -4
- package/docs/herdr.md +1 -1
- package/docs/index.md +1 -1
- package/docs/intercom/operations.md +26 -21
- package/docs/intercom/reference.md +2 -2
- package/docs/intercom.md +1 -1
- package/docs/libraries/storage-postgres.md +9 -9
- package/docs/libraries.md +2 -3
- package/docs/models-configuration.md +2 -2
- package/docs/models.md +2 -3
- package/docs/packages/authoring.md +7 -7
- package/docs/packages.md +1 -1
- package/docs/programmatic.md +2 -2
- package/docs/quickstart.md +1 -1
- package/docs/reference/cli.md +6 -11
- package/docs/reference.md +2 -2
- package/docs/rpc/extension-ui.md +2 -2
- package/docs/sdk/reference.md +5 -4
- package/docs/sdk/storage.md +8 -92
- package/docs/sdk/structured-decisions.md +1 -1
- package/docs/sdk/web-server.md +3 -3
- package/docs/sdk.md +14 -4
- package/docs/security.md +1 -1
- package/docs/session-format.md +5 -5
- package/docs/sessions.md +29 -49
- package/docs/settings.md +7 -8
- package/docs/storage/custom-adapters.md +255 -0
- package/docs/storage/jsonl.md +117 -0
- package/docs/{guides/postgres-pgbouncer.md → storage/postgres/pgbouncer.md} +66 -68
- package/docs/storage/postgres/tuning.md +337 -0
- package/docs/storage/postgres.md +556 -0
- package/docs/storage/sqlite.md +99 -0
- package/docs/storage.md +326 -990
- package/docs/subagents/authoring.md +1 -1
- package/docs/subagents.md +2 -2
- package/docs/tools.md +1 -1
- package/docs/worktree-snapshots.md +2 -2
- package/package.json +9 -9
- package/schemas/models.schema.json +2 -2
- package/schemas/settings.schema.json +0 -14
- package/dist/_shared/sdk-IQMULKFU.js.map +0 -1
- package/dist/_shared/startup-0-0-3IXNMFM2.js.map +0 -1
- package/dist/_shared/startup-0-1-7T2IAE7J.js.map +0 -1
- package/dist/_shared/startup-8-1-X32CYSXB.js.map +0 -1
- package/dist/core/intercom-broker-control.d.ts +0 -129
- package/dist/startup-stages/13.js +0 -1
- package/docs/guides/postgres-tuning.md +0 -311
- package/docs/libraries/storage-libsql.md +0 -97
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __name } from "./rolldown-runtime-BGM3D5V3.js";
|
|
2
2
|
import { createSessionCwdMatcher, normalizePath, resolvePath } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
-
import { CURRENT_SESSION_VERSION, EntryTypeReader, JsonTextChecker, applySessionSummaryEntries, bindChatEpoch, boundedChatRecord, decodeChatRecord, firstChatOrders, getErrnoCode, historySnapshotFor, inheritForkScope, isClassifiedWorkflowSession, materializeSessionSummaryMetadata, noteSnapshotGeneration, observeReferenceCut, readLines, referenceMetadataRead, registerArchiveLoad, registerForkScope, require_sha256, sha256Hex, summarizeSession, yieldTurn } from "./startup-0-0-
|
|
4
|
-
import { AgentRehydrateError, AgentReleaseConfigError, SessionKeyDigests, appendFileChatRecord, deleteFileChatRecords, hasFileChatRecords, latestLegacyMessageTime, legacyCompletionTarget, readFileChatOrders, readFileChatRecords, rememberEarlierCompletion, summarizeLegacySession } from "./startup-0-1-
|
|
3
|
+
import { CURRENT_SESSION_VERSION, EntryTypeReader, JsonTextChecker, applySessionSummaryEntries, bindChatEpoch, boundedChatRecord, decodeChatRecord, epochHasCreationTime, fileEpochOf, firstChatOrders, getErrnoCode, historySnapshotFor, inheritForkScope, isClassifiedWorkflowSession, legacyFileEpochOf, materializeSessionSummaryMetadata, noteSnapshotGeneration, observeReferenceCut, readLines, referenceMetadataRead, registerArchiveLoad, registerForkScope, require_sha256, sha256Hex, summarizeSession, yieldTurn } from "./startup-0-0-EZUKEP4Q.js";
|
|
4
|
+
import { AgentRehydrateError, AgentReleaseConfigError, SessionKeyDigests, appendFileChatRecord, deleteFileChatRecords, hasFileChatRecords, latestLegacyMessageTime, legacyCompletionTarget, readFileChatOrders, readFileChatRecords, rememberEarlierCompletion, summarizeLegacySession } from "./startup-0-1-RTOHJFDJ.js";
|
|
5
5
|
import { agentWakeDispatcher } from "./startup-0-2-5QHPCEON.js";
|
|
6
6
|
import { SESSION_HISTORY_CHUNK_BYTES, SESSION_HISTORY_PAGE_BYTES, SESSION_HISTORY_SCAN_ENTRIES, SessionIdError, entrySizeLimit, matchesSessionIdPrefix, onlySeqs, yieldSessionTurn } from "./settings-startup-HXQLSUWM.js";
|
|
7
7
|
import { access, copyFile, link, mkdir, open, readFile, readdir, rename, stat, truncate, unlink, writeFile } from "node:fs/promises";
|
|
@@ -19,6 +19,7 @@ import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
|
19
19
|
import { randomUUID as randomUUID$1 } from "crypto";
|
|
20
20
|
import { SessionConflictError, SessionExistsError, SessionFormatVersionError, SessionFormatVersionError as SessionFormatVersionError$1, SessionIdMismatchError, SessionInvalidTextError, SessionInvalidTimestampError, SessionNotFoundError, StorageUnavailableError as StorageUnavailableError$1, StoreClosedError as StoreClosedError$1 } from "../core/storage/session/errors.js";
|
|
21
21
|
import { isProxy } from "node:util/types";
|
|
22
|
+
import { learnCreationTime } from "../core/storage/creation-time.js";
|
|
22
23
|
import { openNodeSqliteDatabase } from "../core/storage/node-sqlite.js";
|
|
23
24
|
import { StringDecoder } from "string_decoder";
|
|
24
25
|
// dist/core/storage/session/validation.js
|
|
@@ -3114,7 +3115,13 @@ function appendedForkIndex(cached, entries) {
|
|
|
3114
3115
|
catalog: catalog ?? previous.catalog
|
|
3115
3116
|
} : previous;
|
|
3116
3117
|
}
|
|
3117
|
-
|
|
3118
|
+
/** The sidecar version an older build reads, whose epochs all hold the file's creation time. */
|
|
3119
|
+
const BIRTHTIME_INDEX_VERSION = 2;
|
|
3120
|
+
/**
|
|
3121
|
+
* The newest sidecar version. A sidecar whose epoch leaves out the creation time is written as version 3, so an older
|
|
3122
|
+
* build, which compares it with an epoch that has one, indexes the file again rather than read it. Both are read.
|
|
3123
|
+
*/
|
|
3124
|
+
const JSONL_INDEX_VERSION = 3;
|
|
3118
3125
|
const SIDECAR_SUFFIX = ".idx";
|
|
3119
3126
|
const SIDECAR_REFRESH_BYTES = 1048576;
|
|
3120
3127
|
const INDEX_BATCH_ENTRIES = 512;
|
|
@@ -3693,7 +3700,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
3693
3700
|
record = boundedChatRecord(record);
|
|
3694
3701
|
return this.run(async () => {
|
|
3695
3702
|
const held = await this.locate(owner.id);
|
|
3696
|
-
if (held && held.stats.birthtimeNs > 0n && held.path === owner.file &&
|
|
3703
|
+
if (held && held.stats.birthtimeNs > 0n && held.path === owner.file && fileEpochOf(held.stats, JSON.stringify(held.header)) === owner.epoch) await appendFileChatRecord(owner, anchor, record);
|
|
3697
3704
|
});
|
|
3698
3705
|
}
|
|
3699
3706
|
};
|
|
@@ -3729,6 +3736,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
3729
3736
|
const create = options?.createDirectory !== false;
|
|
3730
3737
|
if (options?.scanExisting === false) {
|
|
3731
3738
|
if (create) await store.run(() => mkdir(store.directory, { recursive: true }).then(() => {}), false);
|
|
3739
|
+
await learnCreationTime(store.directory);
|
|
3732
3740
|
return store;
|
|
3733
3741
|
}
|
|
3734
3742
|
const paths = await store.run(async () => {
|
|
@@ -3740,6 +3748,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
3740
3748
|
return [];
|
|
3741
3749
|
}
|
|
3742
3750
|
}, false);
|
|
3751
|
+
await learnCreationTime(store.directory);
|
|
3743
3752
|
const unread = await store.run(async () => {
|
|
3744
3753
|
const changed = /* @__PURE__ */ new Set();
|
|
3745
3754
|
const all = paths ?? [];
|
|
@@ -3818,7 +3827,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
3818
3827
|
};
|
|
3819
3828
|
return {
|
|
3820
3829
|
lastSeq: entries.length,
|
|
3821
|
-
epoch:
|
|
3830
|
+
epoch: fileEpochOf(stats, state.headerStamp)
|
|
3822
3831
|
};
|
|
3823
3832
|
}, true);
|
|
3824
3833
|
}
|
|
@@ -3909,7 +3918,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
3909
3918
|
witness,
|
|
3910
3919
|
summaryState: summary
|
|
3911
3920
|
});
|
|
3912
|
-
const epoch =
|
|
3921
|
+
const epoch = fileEpochOf(stats, headerStamp);
|
|
3913
3922
|
await this.keepIndex(path, {
|
|
3914
3923
|
identity: `${stats.dev}:${stats.ino}`,
|
|
3915
3924
|
birthtimeNs: String(stats.birthtimeNs),
|
|
@@ -3997,7 +4006,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
3997
4006
|
sessionId,
|
|
3998
4007
|
path,
|
|
3999
4008
|
identity: state.identity,
|
|
4000
|
-
epoch:
|
|
4009
|
+
epoch: fileEpochOf(stats, JSON.stringify(header)),
|
|
4001
4010
|
before: state,
|
|
4002
4011
|
entries: [],
|
|
4003
4012
|
lines: [],
|
|
@@ -4134,7 +4143,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
4134
4143
|
});
|
|
4135
4144
|
return {
|
|
4136
4145
|
lastSeq: state.lastSeq,
|
|
4137
|
-
epoch:
|
|
4146
|
+
epoch: fileEpochOf(stats, headerStamp)
|
|
4138
4147
|
};
|
|
4139
4148
|
} finally {
|
|
4140
4149
|
await unlink(temporary).catch((cause) => {
|
|
@@ -4157,7 +4166,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
4157
4166
|
});
|
|
4158
4167
|
}
|
|
4159
4168
|
const state = this.contentState(header, entries, payload);
|
|
4160
|
-
return
|
|
4169
|
+
return fileEpochOf(await this.remember(path, state), state.headerStamp);
|
|
4161
4170
|
}
|
|
4162
4171
|
load(sessionId) {
|
|
4163
4172
|
return this.run(async () => {
|
|
@@ -4508,7 +4517,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
4508
4517
|
legacy: isCurrentSessionHeader(stored) ? void 0 : stored
|
|
4509
4518
|
};
|
|
4510
4519
|
const headerStamp = JSON.stringify(header);
|
|
4511
|
-
const topology = await this.foldFile(path,
|
|
4520
|
+
const topology = await this.foldFile(path, fileEpochOf(stats, headerStamp), () => true, input);
|
|
4512
4521
|
const jsonl = await this.buildIndex(path, headerStamp, stats, input, {
|
|
4513
4522
|
topology,
|
|
4514
4523
|
branch: false
|
|
@@ -4718,11 +4727,21 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
4718
4727
|
async indexFor(path, header, stats) {
|
|
4719
4728
|
const identity = `${stats.dev}:${stats.ino}`;
|
|
4720
4729
|
const headerStamp = JSON.stringify(header);
|
|
4721
|
-
const
|
|
4722
|
-
|
|
4730
|
+
const epoch = fileEpochOf(stats, headerStamp);
|
|
4731
|
+
let cached = this.indexes.get(path) ?? await readSidecar(path);
|
|
4732
|
+
const older = cached !== void 0 && cached.index.epoch !== epoch && cached.index.epoch === legacyFileEpochOf(stats, headerStamp);
|
|
4733
|
+
if (cached !== void 0 && older) cached = {
|
|
4734
|
+
...cached,
|
|
4735
|
+
index: {
|
|
4736
|
+
...cached.index,
|
|
4737
|
+
epoch
|
|
4738
|
+
}
|
|
4739
|
+
};
|
|
4740
|
+
if (cached !== void 0 && cached.identity === identity && cached.birthtimeNs === String(stats.birthtimeNs) && cached.headerStamp === headerStamp && cached.index.epoch === epoch) {
|
|
4723
4741
|
const fileSize = Number(stats.size);
|
|
4724
4742
|
const kept = this.keptFor(path, identity);
|
|
4725
4743
|
if (cached.fileSize === fileSize && cached.mtimeNs === String(stats.mtimeNs) && await witnessHolds(path, cached, kept)) {
|
|
4744
|
+
if (older) return this.keepIndex(path, cached);
|
|
4726
4745
|
this.indexes.set(path, cached);
|
|
4727
4746
|
return cached;
|
|
4728
4747
|
}
|
|
@@ -4762,7 +4781,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
4762
4781
|
}
|
|
4763
4782
|
}
|
|
4764
4783
|
const birthtimeNs = String(stats.birthtimeNs);
|
|
4765
|
-
const epoch =
|
|
4784
|
+
const epoch = fileEpochOf(stats, headerStamp);
|
|
4766
4785
|
const topology = folded?.topology ?? await this.foldFile(path, epoch, () => true, input);
|
|
4767
4786
|
const ranges = folded?.branch === false || topology.index.jumps.length === 0 ? void 0 : branchRanges(topology.index, topology.index.leafSeq);
|
|
4768
4787
|
const active = ranges === void 0 ? topology : await this.foldFile(path, epoch, (seq) => ranges.some(([low, high]) => seq >= low && seq <= high), input);
|
|
@@ -5091,7 +5110,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
5091
5110
|
const owner = {
|
|
5092
5111
|
file: located.path,
|
|
5093
5112
|
id: sessionId,
|
|
5094
|
-
epoch:
|
|
5113
|
+
epoch: fileEpochOf(located.stats, JSON.stringify(located.header))
|
|
5095
5114
|
};
|
|
5096
5115
|
await this.closeKept(located.path);
|
|
5097
5116
|
await unlink(located.path);
|
|
@@ -5520,7 +5539,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
5520
5539
|
torn,
|
|
5521
5540
|
summaryState: applySessionSummaryEntries(void 0, entries).state
|
|
5522
5541
|
}, torn ? size : void 0);
|
|
5523
|
-
bindChatEpoch(header,
|
|
5542
|
+
bindChatEpoch(header, fileEpochOf(stats, JSON.stringify(header)));
|
|
5524
5543
|
return {
|
|
5525
5544
|
header,
|
|
5526
5545
|
entries,
|
|
@@ -5679,7 +5698,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
5679
5698
|
this.keepFileState(path, state);
|
|
5680
5699
|
}
|
|
5681
5700
|
}
|
|
5682
|
-
if (state.lastSeq !== options.expectSeq || options.epoch !== void 0 &&
|
|
5701
|
+
if (state.lastSeq !== options.expectSeq || options.epoch !== void 0 && fileEpochOf(stats, JSON.stringify(header)) !== options.epoch) throw new SessionConflictError(sessionId, options.expectSeq, state.lastSeq);
|
|
5683
5702
|
return {
|
|
5684
5703
|
path,
|
|
5685
5704
|
state,
|
|
@@ -5737,9 +5756,6 @@ function decodeIdHashes(text) {
|
|
|
5737
5756
|
for (let offset = 0; offset < bytes.length; offset += 4) hashes.push(bytes.readUInt32LE(offset));
|
|
5738
5757
|
return hashes;
|
|
5739
5758
|
}
|
|
5740
|
-
function epochOf(stats, headerStamp) {
|
|
5741
|
-
return `${stats.dev}:${stats.ino}:${stats.birthtimeNs}:${createHash("sha256").update(headerStamp).digest("hex").slice(0, 16)}`;
|
|
5742
|
-
}
|
|
5743
5759
|
async function readFrom(file, position, length) {
|
|
5744
5760
|
const bytes = Buffer.alloc(Math.max(0, length));
|
|
5745
5761
|
for (let read = 0; read < bytes.length;) {
|
|
@@ -5811,7 +5827,7 @@ function decodeDeltas(text) {
|
|
|
5811
5827
|
}
|
|
5812
5828
|
async function writeSidecar(path, jsonl) {
|
|
5813
5829
|
const body = JSON.stringify({
|
|
5814
|
-
version:
|
|
5830
|
+
version: epochHasCreationTime(jsonl.index.epoch) ? BIRTHTIME_INDEX_VERSION : 3,
|
|
5815
5831
|
identity: jsonl.identity,
|
|
5816
5832
|
birthtimeNs: jsonl.birthtimeNs,
|
|
5817
5833
|
headerStamp: jsonl.headerStamp,
|
|
@@ -5860,7 +5876,7 @@ async function readSidecar(path) {
|
|
|
5860
5876
|
} catch {
|
|
5861
5877
|
return;
|
|
5862
5878
|
}
|
|
5863
|
-
if (stored.version !==
|
|
5879
|
+
if (stored.version !== 3 && stored.version !== BIRTHTIME_INDEX_VERSION || typeof stored.identity !== "string" || typeof stored.birthtimeNs !== "string" || typeof stored.headerStamp !== "string" || typeof stored.fileSize !== "number" || typeof stored.mtimeNs !== "string" || typeof stored.size !== "number" || typeof stored.witness !== "string" || typeof stored.terminated !== "boolean" || typeof stored.torn !== "boolean" || typeof stored.spans !== "string" || typeof stored.ids !== "string") return void 0;
|
|
5864
5880
|
const spans = decodeDeltas(stored.spans);
|
|
5865
5881
|
const ids = decodeIdHashes(stored.ids);
|
|
5866
5882
|
if (spans.length % 2 !== 0 || ids?.length !== spans.length / 2 || !isSessionResumeIndex(stored.index, spans.length / 2)) return void 0;
|
|
@@ -8360,7 +8376,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
8360
8376
|
return (async () => {
|
|
8361
8377
|
const root = new URL("../", import.meta.url);
|
|
8362
8378
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
8363
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
8379
|
+
const key = `${root.href}#0.10.11-alpha.3`;
|
|
8364
8380
|
let release = releases.get(key);
|
|
8365
8381
|
if (release === undefined) {
|
|
8366
8382
|
const current = (async () => {
|
|
@@ -8388,7 +8404,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
8388
8404
|
} catch {
|
|
8389
8405
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
8390
8406
|
}
|
|
8391
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.
|
|
8407
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.3" ? installed : running !== undefined && running.version !== "0.10.11-alpha.3" ? "0.10.11-alpha.3" : undefined;
|
|
8392
8408
|
if (updatedTo === undefined) throw error;
|
|
8393
8409
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
8394
8410
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|