@bastani/atomic 0.10.11-alpha.2 → 0.10.11-alpha.4
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 +150 -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} +36 -8
- package/dist/_shared/p1b-elig-TVB5CBLL.js.map +1 -0
- package/dist/_shared/p2-shell-main-B2WIALFD.js +6 -3
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +3 -3
- package/dist/_shared/{sdk-IQMULKFU.js → sdk-B5LEWGGI.js} +1218 -657
- 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-XJJDOIEC.js} +50 -48
- package/dist/_shared/startup-0-0-XJJDOIEC.js.map +1 -0
- package/dist/_shared/{startup-0-1-7T2IAE7J.js → startup-0-1-M6OWAYHH.js} +540 -136
- package/dist/_shared/startup-0-1-M6OWAYHH.js.map +1 -0
- package/dist/_shared/startup-0-2-5QHPCEON.js +47 -48
- 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 +2144 -249
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/{startup-8-1-X32CYSXB.js → startup-8-1-LZFXSD3Z.js} +98 -1184
- package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +188 -37
- 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 +42 -0
- package/dist/builtin/intercom/README.md +2 -2
- package/dist/builtin/intercom/broker/broker.bundle.mjs +1917 -381
- package/dist/builtin/intercom/broker/client.ts +8 -0
- package/dist/builtin/intercom/broker/database-wake-up-bus.ts +324 -68
- package/dist/builtin/intercom/broker/multinode-router.ts +256 -39
- package/dist/builtin/intercom/broker/multinode-state-store.ts +71 -5
- package/dist/builtin/intercom/broker/open-broker-state.ts +14 -0
- package/dist/builtin/intercom/broker/send-order-gate.ts +5 -2
- package/dist/builtin/intercom/broker/sql-add-column.ts +50 -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 +473 -121
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +821 -79
- 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 +256 -8
- package/dist/builtin/intercom/broker/sql-retention.ts +150 -0
- package/dist/builtin/intercom/broker/sql-schema.ts +175 -24
- 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 +14 -4
- 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/skills/skill-creator/eval-viewer/generate_review.py +8 -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 +4 -4
- package/dist/core/export-html/index.code.js.map +1 -1
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.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 +12 -3
- 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 +25 -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 +18 -6
- package/dist/core/storage/fenced-paths.js +18 -6
- 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 +215 -30
- package/dist/core/storage/node-sqlite-thread.js.map +1 -1
- package/dist/core/storage/node-sqlite.js +484 -72
- 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 +76 -15
- package/dist/core/storage/schema-catalog.js +359 -68
- 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-detach.d.ts +11 -1
- 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-sweep.js +31 -7
- package/dist/core/storage/session/fork-sweep.js.map +1 -1
- 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-lock.d.ts +100 -0
- package/dist/core/storage/session/jsonl-session-store.d.ts +46 -24
- 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 +9 -9
- package/dist/core/storage/session/released-history-files.code.js.map +1 -1
- 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 +52 -5
- 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 +99 -18
- 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 +12 -1
- package/dist/core/storage/sqlite-facade.js +310 -33
- package/dist/core/storage/sqlite-facade.js.map +1 -1
- package/dist/core/storage/sqlite-open-batch.js +10 -0
- package/dist/core/storage/sqlite-open-batch.js.map +1 -0
- package/dist/core/storage/storage-status.code.js +1 -1
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.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 +44 -5
- package/dist/core/worktree-snapshot/blob-store.js +553 -30
- 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 +208 -50
- 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 +1470 -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/p1b-elig-ENCUPKKJ.js.map +0 -1
- 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,10 +1,10 @@
|
|
|
1
1
|
import { __commonJSMin, __require } from "./rolldown-runtime-BGM3D5V3.js";
|
|
2
2
|
import { APP_NAME, ENV_SESSION_DIR, VERSION, createChildProcessEnvironment, createModuleRequire, findHelperExecutable, findHelperExecutableAsync, getAgentDir, getBinDir, getProjectConfigDirs, isBunBinary, isBundledBuild, isPathWithin, loadOnDemand, markLifecycleTiming, normalizePath, processLaunch, processLaunchAsync, releaseRetainedWindowsProcessExitHandle, resolutionBaseUrl, resolvePath, resolveSafeWindowsKillCwdLexical, resolveSafeWindowsWorkingDirectoryAsync, retainWindowsProcessExitHandle, spawnLaunchedProcess, spawnLaunchedProcessSync, stripBom } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
-
import { ActivityWatchdog, CompactionCancelledError, CompactorFailure, Diff, ForkSourceIncompleteError, JSON_RPC_ERROR_CODES, LIVE_COMMAND_LIMIT_MESSAGE, MAX_TOOL_DETACHMENT_AFTER_MS, McpAbortError, McpConnectionClosedError, NON_SECRET_HTTP_HEADERS, ROW_INTENT_META, STARTUP_DECISION_TYPED_TEXT_NOTICE, TASK_MARKS, TaskCleanupAdmissionTimeoutError, TaskEvictedError, TrustDecisionSelector, VisualLinePreview, asyncScope, chatEpoch, collectSecretsForMasking, combineUsage, computeBoxDimensions, createSourceInfo, createTypeScriptSourceSpecifierTransform, defineTool, fetchWithRetry, fieldTone, findProviderDefaultModel, flushable, formatSize, getErrnoCode, getFunctionList, getPiUserAgent, getSyntheticPathSource, getTextOutput, holdProcessDescendants, holdProcessDescendantsResult, invalidArgText, isFlushable, isFunctionList, isJsonRpcRequest, isJsonRpcResponse, isStdoutTakenOver, isStop, isSyntheticPath, isTrustDecision, isValidThinkingLevel, linkPath, many, none, parseJsonRpcMessage, redactCredentials, redactOAuthErrorText, redactOAuthErrorTextCapped, redactWwwAuthenticateHeader, removedProviderMessage, renderBorderedBox, require_applyReviver, require_constants, require_debug, require_identifiers, require_identity, require_parse_options, require_parse_url, resolveDecisionDeadlineMs, resourceInternals, safeTrustChoiceIndex, scrubFetchError, scrubUnknownErrorData, segmentLength, setFunctionList, spanElapsedMs, spawnContainedProcess, str, styleFieldTone, toError, validateTimeoutOverride } from "./startup-0-0-
|
|
4
|
-
import { AgentRehydrateError, AgentReleaseConfigError, EMPTY_OUTPUT_TEXT, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, LlamaClient, MULTI_SUBMIT_LABEL, MarkdownContentCache, NestedToolCallRunner, RESERVED_LABELS, SESSION_STORAGE_JOIN, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, StorageSelectionSchema, StringEnum as StringEnum$1, TransportEvents, WorkspaceConfigError, WrappingSelect, acceptsForkReplay, cancelReceiptStatus, chatAnswerIntent, chatNumberingFor, cleanupFailureSummary, computeFocusedOptionHasPreview, currentResourceAdmission, diffLines, discoverChatFile, errorMessage, flush, formatAnswerScalar, formatTokenSegment, genBridge, getBuiltinExtensionEntryLabel, getCommandEnv, getGitShellEnvironmentAsync, getLoaderAgentDirs, getVirtualModules, lifecycleScopeForOwner, llamaInferenceUrl, messageIsLlmVisible, next, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelReference, normalizeProviderKeys, parseInteractiveEngineMessage, presentTaskError, readFileChatRecords, readInlineCaret, reparentedSegments, require_from_url, require_re, require_toJS, require_visit, resizeImageInProcess, resolveInlineDraftValue, runCallback, runSynchronousCallback, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, sessionLifecycleCreation, splitSegment, stopIndex, streamCutDurationMs, tokenize, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, userLikeContentBlockIsLlmVisible, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, withInlineDraft, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner } from "./startup-0-1-
|
|
3
|
+
import { ActivityWatchdog, CompactionCancelledError, CompactorFailure, Diff, ForkSourceIncompleteError, JSON_RPC_ERROR_CODES, LIVE_COMMAND_LIMIT_MESSAGE, MAX_TOOL_DETACHMENT_AFTER_MS, McpAbortError, McpConnectionClosedError, NON_SECRET_HTTP_HEADERS, ROW_INTENT_META, STARTUP_DECISION_TYPED_TEXT_NOTICE, TASK_MARKS, TaskCleanupAdmissionTimeoutError, TaskEvictedError, TrustDecisionSelector, VisualLinePreview, asyncScope, chatEpoch, collectSecretsForMasking, combineUsage, computeBoxDimensions, createSourceInfo, createTypeScriptSourceSpecifierTransform, defineTool, fetchWithRetry, fieldTone, fileEpochOf, findProviderDefaultModel, flushable, formatSize, getErrnoCode, getFunctionList, getPiUserAgent, getSyntheticPathSource, getTextOutput, holdProcessDescendants, holdProcessDescendantsResult, invalidArgText, isFlushable, isFunctionList, isJsonRpcRequest, isJsonRpcResponse, isStdoutTakenOver, isStop, isSyntheticPath, isTrustDecision, isValidThinkingLevel, linkPath, many, none, parseJsonRpcMessage, redactCredentials, redactOAuthErrorText, redactOAuthErrorTextCapped, redactWwwAuthenticateHeader, removedProviderMessage, renderBorderedBox, require_applyReviver, require_constants, require_debug, require_identifiers, require_identity, require_parse_options, require_parse_url, resolveDecisionDeadlineMs, resourceInternals, safeTrustChoiceIndex, scrubFetchError, scrubUnknownErrorData, segmentLength, setFunctionList, spanElapsedMs, spawnContainedProcess, str, styleFieldTone, toError, validateTimeoutOverride } from "./startup-0-0-XJJDOIEC.js";
|
|
4
|
+
import { AgentRehydrateError, AgentReleaseConfigError, EMPTY_OUTPUT_TEXT, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, LlamaClient, MULTI_SUBMIT_LABEL, MarkdownContentCache, NestedToolCallRunner, RESERVED_LABELS, SESSION_STORAGE_JOIN, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, StorageSelectionSchema, StringEnum as StringEnum$1, TransportEvents, WorkspaceConfigError, WrappingSelect, acceptsForkReplay, cancelReceiptStatus, chatAnswerIntent, chatNumberingFor, cleanupFailureSummary, computeFocusedOptionHasPreview, currentResourceAdmission, diffLines, discoverChatFile, errorMessage, flush, formatAnswerScalar, formatTokenSegment, genBridge, getBuiltinExtensionEntryLabel, getCommandEnv, getGitShellEnvironmentAsync, getLoaderAgentDirs, getVirtualModules, lifecycleScopeForOwner, llamaInferenceUrl, messageIsLlmVisible, next, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelReference, normalizeProviderKeys, parseInteractiveEngineMessage, presentTaskError, readFileChatRecords, readInlineCaret, reparentedSegments, require_from_url, require_re, require_toJS, require_visit, resizeImageInProcess, resolveInlineDraftValue, runCallback, runSynchronousCallback, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, sessionLifecycleCreation, splitSegment, stopIndex, streamCutDurationMs, tokenize, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, userLikeContentBlockIsLlmVisible, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, withInlineDraft, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner } from "./startup-0-1-M6OWAYHH.js";
|
|
5
5
|
import { KeybindingsManager as KeybindingsManager$1, clickableHintText, clickableKeyTextHint, detectTerminalThemeForAuto, graphemeAt, initTheme, keepStartupDialogDraft, parenthesizedKeyHint, setTheme, singleLineDisplayText, terminalDisplayCursor, terminalDisplayText, theme, withEarlyInputHeldForStartupDialog } from "./p2-shell-main-B2WIALFD.js";
|
|
6
6
|
import { stripJsonComments } from "./p1-shared-RG5I5LJ6.js";
|
|
7
|
-
import { findInCauseChain, guardLockRemoval, nativeProcessCreationTime, nativeTerminateProcess, redactCredentialShapes, rehydrateErrorCause, releaseLock, releaseLockSync, renameReplacing, renameReplacingAsync, serializeErrorCause, waitForLock, waitForLockSync } from "./p1b-elig-
|
|
7
|
+
import { findInCauseChain, guardLockRemoval, nativeProcessCreationTime, nativeTerminateProcess, redactCredentialShapes, rehydrateErrorCause, releaseLock, releaseLockSync, renameReplacing, renameReplacingAsync, serializeErrorCause, waitForLock, waitForLockSync } from "./p1b-elig-TVB5CBLL.js";
|
|
8
8
|
import { rehydrateDecisionError } from "./settings-startup-HXQLSUWM.js";
|
|
9
9
|
import * as fs from "node:fs/promises";
|
|
10
10
|
import { chmod, lstat, mkdir, mkdtemp, readFile, rm, stat } from "node:fs/promises";
|
|
@@ -23,7 +23,7 @@ import { OAUTH_REFRESH_LOCK_HOLD_MS, OAUTH_REFRESH_TIMEOUT_MS, failureRetryDelay
|
|
|
23
23
|
import { Container, Input, ProcessTerminal, Spacer, Text, TuiMainScreen, decodePrintableKey, getKeybindings, setCapabilityOverrides, setKeybindings, truncateToWidth, visibleWidth } from "@bastani/atomic-tui";
|
|
24
24
|
import { StorageConfigError, StoragePrefixError } from "../core/storage/errors.js";
|
|
25
25
|
import { validateStoragePrefix } from "../core/storage/prefix.js";
|
|
26
|
-
import { chmod as chmod$1, mkdir as mkdir$
|
|
26
|
+
import { chmod as chmod$1, mkdir as mkdir$2, readFile as readFile$1, rm as rm$1, stat as stat$2, writeFile as writeFile$1 } from "fs/promises";
|
|
27
27
|
import { createHash } from "node:crypto";
|
|
28
28
|
import { isDeepStrictEqual, promisify } from "node:util";
|
|
29
29
|
import lockfile from "proper-lockfile";
|
|
@@ -32,6 +32,7 @@ import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
|
32
32
|
import { memoizeAsync } from "../utils/memoize-async.js";
|
|
33
33
|
import { runToolCall } from "@bastani/atomic-agent-core";
|
|
34
34
|
import { isProxy } from "node:util/types";
|
|
35
|
+
import { learnCreationTime } from "../core/storage/creation-time.js";
|
|
35
36
|
import { defaultSessionDatabasePathSteps, defaultSharedStoragePathSteps, runStorageSteps, runStorageStepsSync, storagePathBaseDirSteps, storageSettingsSteps } from "../core/storage/file-identity.js";
|
|
36
37
|
import { Type as Type$1 } from "@bastani/atomic-ai/utils/typebox/index";
|
|
37
38
|
import { llamaCppClassifyApi } from "@bastani/atomic-ai/api/llama-cpp-classify.lazy";
|
|
@@ -45,7 +46,8 @@ import { lookup } from "node:dns/promises";
|
|
|
45
46
|
import { anthropicAssistantReplayContent } from "@bastani/atomic-ai/api/anthropic-assistant-content";
|
|
46
47
|
import { isProducedByModel } from "@bastani/atomic-ai/api/transform-messages";
|
|
47
48
|
import { Value } from "@bastani/atomic-ai/utils/typebox/value";
|
|
48
|
-
import {
|
|
49
|
+
import { rejectRemovedTeamProfile } from "../core/storage/libsql-removed.js";
|
|
50
|
+
import { selectStorage, selectStorageSteps } from "../core/storage/selection.js";
|
|
49
51
|
// dist/cli/startup-ui.js
|
|
50
52
|
var StartupDialogInputGuard = class extends Container {
|
|
51
53
|
enterArmed;
|
|
@@ -1122,10 +1124,15 @@ async function detachForkChildren(host, parentId, options = {}) {
|
|
|
1122
1124
|
detached.push(...report.detached);
|
|
1123
1125
|
for (const id of report.reparented) reparented.add(id);
|
|
1124
1126
|
};
|
|
1125
|
-
const
|
|
1127
|
+
const readTransaction = (body, leading, leadingOnly) => host.forkReadTransaction === void 0 ? host.forkTransaction(body) : host.forkReadTransaction(body, leading, leadingOnly);
|
|
1128
|
+
const pendingQuery = {
|
|
1129
|
+
sql: `SELECT child_id FROM ${host.forkDetachTable} WHERE parent_id = ? ORDER BY child_id`,
|
|
1130
|
+
params: [parentId]
|
|
1131
|
+
};
|
|
1132
|
+
const pending = await readTransaction((tx) => tx.all(pendingQuery.sql, ...pendingQuery.params), [pendingQuery], true);
|
|
1126
1133
|
for (const { child_id } of pending) record(await detachFork(host, parentId, child_id, options));
|
|
1127
1134
|
for (;;) {
|
|
1128
|
-
const next = await
|
|
1135
|
+
const next = await readTransaction(async (tx) => {
|
|
1129
1136
|
let best;
|
|
1130
1137
|
for (const id of await host.forkChildren(tx, parentId)) {
|
|
1131
1138
|
const rows = (await host.forkSegments(tx, id)).filter((segment) => segment.sourceId === parentId).reduce((sum, segment) => sum + segmentLength(segment), 0);
|
|
@@ -1146,7 +1153,11 @@ async function detachForkChildren(host, parentId, options = {}) {
|
|
|
1146
1153
|
}
|
|
1147
1154
|
/** Finishes every detach a crash stopped, as each started. */
|
|
1148
1155
|
async function resumeForkDetaches(host) {
|
|
1149
|
-
const
|
|
1156
|
+
const query = {
|
|
1157
|
+
sql: `SELECT parent_id, child_id FROM ${host.forkDetachTable} ORDER BY parent_id, child_id`,
|
|
1158
|
+
params: []
|
|
1159
|
+
};
|
|
1160
|
+
const rows = await (host.forkReadTransaction === void 0 ? host.forkTransaction((tx) => tx.all(query.sql, ...query.params)) : host.forkReadTransaction((tx) => tx.all(query.sql, ...query.params), [query], true));
|
|
1150
1161
|
const detached = [];
|
|
1151
1162
|
const reparented = [];
|
|
1152
1163
|
for (const { parent_id, child_id } of rows) {
|
|
@@ -3571,10 +3582,8 @@ var TaskSupervisor = class {
|
|
|
3571
3582
|
if (state.commandStarts.get(operation) === start) state.commandStarts.delete(operation);
|
|
3572
3583
|
};
|
|
3573
3584
|
result.then((started) => {
|
|
3574
|
-
if (started.ok)
|
|
3575
|
-
|
|
3576
|
-
start.task = started.value;
|
|
3577
|
-
} else forget();
|
|
3585
|
+
if (started.ok) start.task = started.value;
|
|
3586
|
+
else forget();
|
|
3578
3587
|
}, forget);
|
|
3579
3588
|
return result;
|
|
3580
3589
|
}
|
|
@@ -4325,10 +4334,11 @@ const captureTaskChatFile = async (file, id) => {
|
|
|
4325
4334
|
inspectedFiles.set(view, discovery);
|
|
4326
4335
|
}
|
|
4327
4336
|
if (!await discovery.present) return void 0;
|
|
4337
|
+
await learnCreationTime(dirname$1(file));
|
|
4328
4338
|
return (raw, stats) => {
|
|
4329
4339
|
if (stats.birthtimeNs <= 0n) return;
|
|
4330
4340
|
const { type: _type, ...header } = raw;
|
|
4331
|
-
const epoch =
|
|
4341
|
+
const epoch = fileEpochOf(stats, JSON.stringify(header));
|
|
4332
4342
|
capture.scope = {
|
|
4333
4343
|
store: fileReader,
|
|
4334
4344
|
owner: {
|
|
@@ -10047,7 +10057,7 @@ var FileAuthStorageBackend = class {
|
|
|
10047
10057
|
}
|
|
10048
10058
|
async ensureParentDirAsync() {
|
|
10049
10059
|
const dir = dirname(this.authPath);
|
|
10050
|
-
if (!await pathExists(dir)) await mkdir$
|
|
10060
|
+
if (!await pathExists(dir)) await mkdir$2(dir, {
|
|
10051
10061
|
recursive: true,
|
|
10052
10062
|
mode: 448
|
|
10053
10063
|
});
|
|
@@ -10386,8 +10396,8 @@ const ModelFieldDescriptions = {
|
|
|
10386
10396
|
name: "Display name, also matched by --model patterns.",
|
|
10387
10397
|
reasoning: "Whether the model supports thinking. Applies only to chat models.",
|
|
10388
10398
|
contextWindow: "Context window in tokens. Applies only to chat models.",
|
|
10389
|
-
maxTokens: "Maximum output tokens. Defaults to 16384 for chat models.
|
|
10390
|
-
maxTokensOverride: "Maximum output tokens. On compactor models,
|
|
10399
|
+
maxTokens: "Maximum output tokens. Defaults to 16384 for chat models. On compactor models it has no default: when set, compacted output longer than this many estimated tokens clears the context instead; when omitted, output has no size limit.",
|
|
10400
|
+
maxTokensOverride: "Maximum output tokens. On compactor models, compacted output longer than this many estimated tokens clears the context instead; omit it for no size limit."
|
|
10391
10401
|
};
|
|
10392
10402
|
/** Everything pi-ai defines for compatibility, plus Atomic's alias for the grammar-tool capability. */
|
|
10393
10403
|
const ModelsJsonCompatSchema = Type$1.Object({
|
|
@@ -11443,9 +11453,9 @@ function estimateTokens(message) {
|
|
|
11443
11453
|
const COMPACTOR_REQUEST_TIMEOUT_MS = 12e4;
|
|
11444
11454
|
/** Lines longer than this are wrapped before they are sent, so the compactor can keep or drop parts of them. */
|
|
11445
11455
|
const COMPACTOR_LINE_WIDTH = 2e3;
|
|
11446
|
-
/**
|
|
11456
|
+
/** Upper bound, in estimated tokens, on compacted text an extension hook supplies; longer text clears the context. A compactor model's output has no bound. */
|
|
11447
11457
|
const COMPACTED_OUTPUT_MAX_TOKENS = 32e3;
|
|
11448
|
-
/** Compacted text never fills more than this share of the context the automatic trigger allows. */
|
|
11458
|
+
/** Compacted text an extension hook supplies never fills more than this share of the context the automatic trigger allows. */
|
|
11449
11459
|
const COMPACTED_OUTPUT_MAX_TRIGGER_SHARE = .5;
|
|
11450
11460
|
const DEFAULT_COMPACTOR_ENDPOINT_PATH = "/compact";
|
|
11451
11461
|
const HTTP_ERROR_EXCERPT_MAX_CHARS = 500;
|
|
@@ -11520,7 +11530,7 @@ function buildCompactorMessages(messages, isBoundary) {
|
|
|
11520
11530
|
const rest = messages.filter((message) => !(message.role === "custom" && isBoundary(message)));
|
|
11521
11531
|
return [...boundaries, ...rest].flatMap((message) => messageIsLlmVisible(message) ? compactorMessage(message, isBoundary) ?? [] : []);
|
|
11522
11532
|
}
|
|
11523
|
-
/** Largest compacted text, in estimated tokens, for a model whose automatic trigger fires above `triggerTokens`. */
|
|
11533
|
+
/** Largest compacted text an extension hook may supply, in estimated tokens, for a model whose automatic trigger fires above `triggerTokens`. */
|
|
11524
11534
|
function compactedOutputTokenCap(triggerTokens, maxOutputTokens = COMPACTED_OUTPUT_MAX_TOKENS) {
|
|
11525
11535
|
return Math.max(0, Math.min(Number.isFinite(maxOutputTokens) && maxOutputTokens > 0 ? maxOutputTokens : COMPACTED_OUTPUT_MAX_TOKENS, Math.floor(triggerTokens * COMPACTED_OUTPUT_MAX_TRIGGER_SHARE)));
|
|
11526
11536
|
}
|
|
@@ -12115,19 +12125,20 @@ function setCliStorageSelection(argument, cwd = process.cwd()) {
|
|
|
12115
12125
|
value: parseCliStorageArgument(argument, cwd)
|
|
12116
12126
|
};
|
|
12117
12127
|
}
|
|
12118
|
-
/**
|
|
12128
|
+
/**
|
|
12129
|
+
* Every set storage variable, parsed and checked even when another selection outranks it. A variable of the removed
|
|
12130
|
+
* `ATOMIC_PROFILE=ci` team profile is refused.
|
|
12131
|
+
*/
|
|
12119
12132
|
function environmentChoices(agentDir, env = process.env) {
|
|
12133
|
+
rejectRemovedTeamProfile(env);
|
|
12120
12134
|
const read = (field, schema) => {
|
|
12121
12135
|
const text = environmentValue(field, env);
|
|
12122
12136
|
if (text === void 0) return void 0;
|
|
12123
12137
|
return chooseAt(parseSelection(text, schema, "env", field), "env", field, agentDir);
|
|
12124
12138
|
};
|
|
12125
|
-
const team = environmentTeamProfileSelection(env);
|
|
12126
12139
|
return {
|
|
12127
12140
|
sessions: read(SESSIONS_STORAGE_ENV, SessionStorageSelectionSchema),
|
|
12128
|
-
shared: read(STORAGE_ENV, StorageSelectionSchema)
|
|
12129
|
-
team: team === void 0 ? void 0 : chooseAt(team, "env", TEAM_PROFILE_ENV, agentDir),
|
|
12130
|
-
teamValue: team
|
|
12141
|
+
shared: read(STORAGE_ENV, StorageSelectionSchema)
|
|
12131
12142
|
};
|
|
12132
12143
|
}
|
|
12133
12144
|
/**
|
|
@@ -12160,8 +12171,7 @@ function previewProcessStorageSelection(domain, options = {}) {
|
|
|
12160
12171
|
} catch {
|
|
12161
12172
|
throw new StorageConfigError("env", legacyField, "invalid-path");
|
|
12162
12173
|
}
|
|
12163
|
-
|
|
12164
|
-
return validated.team?.selection;
|
|
12174
|
+
return validated.shared?.selection;
|
|
12165
12175
|
}
|
|
12166
12176
|
/**
|
|
12167
12177
|
* Classify a `settings.json` session-storage value (`sessions.storage` or `storage`)
|
|
@@ -12177,11 +12187,10 @@ function previewSessionSettingSelection(value, field, agentDir) {
|
|
|
12177
12187
|
}
|
|
12178
12188
|
async function validateProcessStorageAsync(agentDir) {
|
|
12179
12189
|
environmentChoices(agentDir);
|
|
12180
|
-
await environmentTeamProfileAsync();
|
|
12181
12190
|
}
|
|
12182
12191
|
/**
|
|
12183
12192
|
* The process-level storage selection for one domain: `--storage`/`--storage-file`, then, for sessions, the domain
|
|
12184
|
-
* variable or its legacy path variable, then `ATOMIC_STORAGE
|
|
12193
|
+
* variable or its legacy path variable, then `ATOMIC_STORAGE`.
|
|
12185
12194
|
* `undefined` leaves the choice to settings.
|
|
12186
12195
|
* Every set storage variable is validated, whichever one applies.
|
|
12187
12196
|
*/
|
|
@@ -12232,39 +12241,29 @@ function* selectProcessStorageSteps(domain, agentDir, cwd) {
|
|
|
12232
12241
|
throw new StorageConfigError("env", legacyField, "invalid-path");
|
|
12233
12242
|
}
|
|
12234
12243
|
if (validated.shared !== void 0) return yield* resolveEnv(STORAGE_ENV, StorageSelectionSchema, sharedDefault);
|
|
12235
|
-
const team = validated.teamValue;
|
|
12236
|
-
return team === void 0 ? void 0 : yield* chooseSteps(team, "env", TEAM_PROFILE_ENV, baseDir, sharedDefault);
|
|
12237
12244
|
}
|
|
12238
12245
|
/** Whether the launching process selected this domain's storage, without validating the selection. */
|
|
12239
12246
|
function hasProcessStorageSelection(domain) {
|
|
12240
12247
|
return registry[CLI_SELECTION] !== void 0 || (domain === "sessions" ? [
|
|
12241
12248
|
"ATOMIC_SESSIONS_STORAGE",
|
|
12242
12249
|
ENV_SESSION_DIR,
|
|
12243
|
-
"ATOMIC_STORAGE"
|
|
12244
|
-
|
|
12245
|
-
] : ["ATOMIC_STORAGE", TEAM_PROFILE_ENV]).some((name) => environmentValue(name) !== void 0);
|
|
12250
|
+
"ATOMIC_STORAGE"
|
|
12251
|
+
] : ["ATOMIC_STORAGE"]).some((name) => environmentValue(name) !== void 0);
|
|
12246
12252
|
}
|
|
12247
12253
|
/**
|
|
12248
12254
|
* The shared `storage` selection this process was launched with, as the `ATOMIC_STORAGE` value a child process it
|
|
12249
|
-
* spawns should receive: `--storage`/`--storage-file`, then `ATOMIC_STORAGE
|
|
12250
|
-
*
|
|
12251
|
-
*
|
|
12255
|
+
* spawns should receive: `--storage`/`--storage-file`, then `ATOMIC_STORAGE`. `undefined` leaves the choice to
|
|
12256
|
+
* settings. A variable of the removed `ATOMIC_PROFILE=ci` team profile is refused, so a broker or Intercom session
|
|
12257
|
+
* never starts without the database it named.
|
|
12252
12258
|
*/
|
|
12253
12259
|
function processSharedStorageSelection() {
|
|
12260
|
+
rejectRemovedTeamProfile();
|
|
12254
12261
|
const cli = registry[CLI_SELECTION];
|
|
12255
12262
|
if (cli !== void 0) return JSON.stringify(cli.value);
|
|
12256
|
-
|
|
12257
|
-
if (shared !== void 0) return shared;
|
|
12258
|
-
const team = environmentTeamProfile();
|
|
12259
|
-
return team === void 0 ? void 0 : JSON.stringify(team);
|
|
12263
|
+
return environmentValue(STORAGE_ENV);
|
|
12260
12264
|
}
|
|
12261
12265
|
async function processSharedStorageSelectionAsync() {
|
|
12262
|
-
|
|
12263
|
-
if (cli !== void 0) return JSON.stringify(cli.value);
|
|
12264
|
-
const shared = environmentValue(STORAGE_ENV);
|
|
12265
|
-
if (shared !== void 0) return shared;
|
|
12266
|
-
const team = await environmentTeamProfileAsync();
|
|
12267
|
-
return team === void 0 ? void 0 : JSON.stringify(team);
|
|
12266
|
+
return processSharedStorageSelection();
|
|
12268
12267
|
}
|
|
12269
12268
|
/**
|
|
12270
12269
|
* `process.env` with `ATOMIC_STORAGE` set to {@link processSharedStorageSelection}, as the Intercom broker this
|
|
@@ -12502,7 +12501,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
12502
12501
|
return (async () => {
|
|
12503
12502
|
const root = new URL("../", import.meta.url);
|
|
12504
12503
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
12505
|
-
const key = `${root.href}#0.10.11-alpha.
|
|
12504
|
+
const key = `${root.href}#0.10.11-alpha.4`;
|
|
12506
12505
|
let release = releases.get(key);
|
|
12507
12506
|
if (release === undefined) {
|
|
12508
12507
|
const current = (async () => {
|
|
@@ -12530,7 +12529,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
12530
12529
|
} catch {
|
|
12531
12530
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
12532
12531
|
}
|
|
12533
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.
|
|
12532
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.4" ? installed : running !== undefined && running.version !== "0.10.11-alpha.4" ? "0.10.11-alpha.4" : undefined;
|
|
12534
12533
|
if (updatedTo === undefined) throw error;
|
|
12535
12534
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
12536
12535
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|