@bastani/atomic 0.9.38-alpha.1 → 0.9.38-alpha.10
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 +133 -0
- package/README.md +8 -6
- package/dist/builtin/intercom/CHANGELOG.md +15 -0
- package/dist/builtin/intercom/broker/broker.ts +6 -4
- package/dist/builtin/intercom/broker/delivered-message-cache.ts +50 -4
- package/dist/builtin/intercom/broker/send-handler.ts +6 -4
- package/dist/builtin/intercom/index.bundle.mjs +89 -40
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +12 -0
- package/dist/builtin/subagents/README.md +9 -4
- package/dist/builtin/subagents/package.json +3 -3
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +163 -158
- package/dist/builtin/web-access/CHANGELOG.md +7 -0
- package/dist/builtin/web-access/index.bundle.mjs +53 -15
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +85 -0
- package/dist/builtin/workflows/README.md +5 -10
- package/dist/builtin/workflows/builtin/adversarial-verification.js +2 -2
- package/dist/builtin/workflows/builtin/{chunk-94f8zfz1.js → chunk-454hz1qt.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-wf876n16.js → chunk-4bwtzyjq.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-kb7s3gx2.js → chunk-5eh0brtd.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-nkj4qhj6.js → chunk-85mx6wcf.js} +7 -7
- package/dist/builtin/workflows/builtin/{chunk-3n2bnz64.js → chunk-8kkv04hz.js} +16 -16
- package/dist/builtin/workflows/builtin/chunk-8x61e0s7.js +3148 -0
- package/dist/builtin/workflows/builtin/{chunk-r97ndfvt.js → chunk-bjva9j5k.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-a1ar035d.js → chunk-qdd897wm.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-gyjck9z8.js → chunk-qjqn389g.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-632fxeb8.js → chunk-x0vvjyzg.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-ad83gc5p.js → chunk-y45tkftg.js} +11 -18
- package/dist/builtin/workflows/builtin/classify-and-act.js +2 -2
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize.js +2 -2
- package/dist/builtin/workflows/builtin/generate-and-filter.js +2 -2
- package/dist/builtin/workflows/builtin/goal.js +3 -3
- package/dist/builtin/workflows/builtin/index.js +11 -11
- package/dist/builtin/workflows/builtin/loop-until-done.js +2 -2
- package/dist/builtin/workflows/builtin/open-claude-design.js +2 -2
- package/dist/builtin/workflows/builtin/ralph.js +3 -3
- package/dist/builtin/workflows/builtin/tournament.js +2 -2
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/src/authoring.d.ts +9 -12
- package/dist/builtin/workflows/src/durable/journal/conformance.d.ts +12 -0
- package/dist/builtin/workflows/src/durable/journal/internal.d.ts +1 -0
- package/dist/builtin/workflows/src/durable/journal/lease-expiry.d.ts +2 -0
- package/dist/builtin/workflows/src/durable/journal/legacy-journal-tables.d.ts +42 -0
- package/dist/builtin/workflows/src/durable/journal/memory-run-journal.d.ts +35 -0
- package/dist/builtin/workflows/src/durable/journal/resolution.d.ts +32 -0
- package/dist/builtin/workflows/src/durable/journal/sql-run-journal.d.ts +48 -0
- package/dist/builtin/workflows/src/durable/journal/sqlite-run-journal.d.ts +7 -0
- package/dist/builtin/workflows/src/durable/journal/types.d.ts +95 -0
- package/dist/builtin/workflows/src/durable/journal/values.d.ts +5 -0
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +29510 -64826
- package/dist/builtin/workflows/src/index.js +10767 -45885
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +8 -14
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +4 -20
- package/dist/bun/split-loader.js +0 -13
- package/dist/bun/split-loader.js.map +1 -1
- package/dist/cli/args.d.ts +3 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +35 -5
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/session-picker.d.ts +2 -2
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +5 -5
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/core/agent-session-auto-compaction.d.ts +1 -1
- package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-auto-compaction.js +2 -2
- package/dist/core/agent-session-auto-compaction.js.map +1 -1
- package/dist/core/agent-session-bash.d.ts +2 -3
- package/dist/core/agent-session-bash.d.ts.map +1 -1
- package/dist/core/agent-session-bash.js +18 -10
- package/dist/core/agent-session-bash.js.map +1 -1
- package/dist/core/agent-session-boundaries.d.ts +6 -6
- package/dist/core/agent-session-boundaries.d.ts.map +1 -1
- package/dist/core/agent-session-boundaries.js +22 -22
- package/dist/core/agent-session-boundaries.js.map +1 -1
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +3 -2
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-custom-message-commit.d.ts.map +1 -1
- package/dist/core/agent-session-custom-message-commit.js +10 -12
- package/dist/core/agent-session-custom-message-commit.js.map +1 -1
- package/dist/core/agent-session-events.d.ts.map +1 -1
- package/dist/core/agent-session-events.js +26 -14
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-export.js +1 -1
- package/dist/core/agent-session-export.js.map +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts +2 -2
- package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
- package/dist/core/agent-session-extension-bindings.js +79 -59
- package/dist/core/agent-session-extension-bindings.js.map +1 -1
- package/dist/core/agent-session-message-queue.d.ts +2 -2
- package/dist/core/agent-session-message-queue.d.ts.map +1 -1
- package/dist/core/agent-session-message-queue.js +17 -8
- package/dist/core/agent-session-message-queue.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +15 -15
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-models.d.ts +2 -2
- package/dist/core/agent-session-models.d.ts.map +1 -1
- package/dist/core/agent-session-models.js +59 -42
- package/dist/core/agent-session-models.js.map +1 -1
- package/dist/core/agent-session-persistent-custom-messages.d.ts +4 -4
- package/dist/core/agent-session-persistent-custom-messages.d.ts.map +1 -1
- package/dist/core/agent-session-persistent-custom-messages.js +16 -17
- package/dist/core/agent-session-persistent-custom-messages.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +6 -8
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-retry.d.ts.map +1 -1
- package/dist/core/agent-session-retry.js +17 -15
- package/dist/core/agent-session-retry.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +7 -8
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +88 -100
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +2 -2
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session-summary.js +1 -1
- package/dist/core/agent-session-summary.js.map +1 -1
- package/dist/core/agent-session-tree.d.ts +1 -1
- package/dist/core/agent-session-tree.d.ts.map +1 -1
- package/dist/core/agent-session-tree.js +8 -7
- package/dist/core/agent-session-tree.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +2 -0
- package/dist/core/agent-session-types.d.ts.map +1 -1
- package/dist/core/agent-session-types.js.map +1 -1
- package/dist/core/auth-storage-backends.d.ts +2 -0
- package/dist/core/auth-storage-backends.d.ts.map +1 -1
- package/dist/core/auth-storage-backends.js +12 -0
- package/dist/core/auth-storage-backends.js.map +1 -1
- package/dist/core/auth-storage.d.ts +5 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +46 -12
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/cache-warmer.js +1 -1
- package/dist/core/cache-warmer.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +3 -5
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +6 -10
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction-runner.d.ts +1 -0
- package/dist/core/compaction/compaction-runner.d.ts.map +1 -1
- package/dist/core/compaction/compaction-runner.js +4 -1
- package/dist/core/compaction/compaction-runner.js.map +1 -1
- package/dist/core/compaction/pi-summary-fallback.d.ts +2 -1
- package/dist/core/compaction/pi-summary-fallback.d.ts.map +1 -1
- package/dist/core/compaction/pi-summary-fallback.js +6 -8
- package/dist/core/compaction/pi-summary-fallback.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +2 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +32 -7
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/export-html/index.js +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/template-js/entries-navigation.js +1 -1
- package/dist/core/export-html/template.js +1 -1
- package/dist/core/extensions/api-types.d.ts +12 -12
- package/dist/core/extensions/api-types.d.ts.map +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/context-types.d.ts +4 -2
- package/dist/core/extensions/context-types.d.ts.map +1 -1
- package/dist/core/extensions/context-types.js.map +1 -1
- package/dist/core/extensions/extension-work.d.ts +1 -0
- package/dist/core/extensions/extension-work.d.ts.map +1 -1
- package/dist/core/extensions/extension-work.js +5 -1
- package/dist/core/extensions/extension-work.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader-api.d.ts.map +1 -1
- package/dist/core/extensions/loader-api.js +40 -42
- package/dist/core/extensions/loader-api.js.map +1 -1
- package/dist/core/extensions/loader-host-modules.d.ts +1 -1
- package/dist/core/extensions/loader-host-modules.d.ts.map +1 -1
- package/dist/core/extensions/loader-host-modules.js +6 -2
- package/dist/core/extensions/loader-host-modules.js.map +1 -1
- package/dist/core/extensions/loader-rollback.d.ts.map +1 -1
- package/dist/core/extensions/loader-rollback.js +1 -0
- package/dist/core/extensions/loader-rollback.js.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.js +1 -0
- package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
- package/dist/core/extensions/runner-context.d.ts +1 -0
- package/dist/core/extensions/runner-context.d.ts.map +1 -1
- package/dist/core/extensions/runner-context.js +10 -3
- package/dist/core/extensions/runner-context.js.map +1 -1
- package/dist/core/extensions/runner-handlers.d.ts +1 -1
- package/dist/core/extensions/runner-handlers.d.ts.map +1 -1
- package/dist/core/extensions/runner-handlers.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +5 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +28 -12
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/runtime-types.d.ts +7 -7
- package/dist/core/extensions/runtime-types.d.ts.map +1 -1
- package/dist/core/extensions/runtime-types.js.map +1 -1
- package/dist/core/extensions/session-events.d.ts +5 -5
- package/dist/core/extensions/session-events.d.ts.map +1 -1
- package/dist/core/extensions/session-events.js.map +1 -1
- package/dist/core/extensions/workflow-events.d.ts +2 -0
- package/dist/core/extensions/workflow-events.d.ts.map +1 -1
- package/dist/core/extensions/workflow-events.js.map +1 -1
- package/dist/core/extensions/workflow-run-control.d.ts +3 -3
- package/dist/core/extensions/workflow-run-control.d.ts.map +1 -1
- package/dist/core/extensions/workflow-run-control.js +4 -4
- package/dist/core/extensions/workflow-run-control.js.map +1 -1
- package/dist/core/fast-model-routing.d.ts.map +1 -1
- package/dist/core/fast-model-routing.js +1 -0
- package/dist/core/fast-model-routing.js.map +1 -1
- package/dist/core/intercom-runtime-group.js +1 -1
- package/dist/core/intercom-runtime-group.js.map +1 -1
- package/dist/core/model-config.d.ts +765 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +46 -24
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver-defaults.js +5 -5
- package/dist/core/model-resolver-defaults.js.map +1 -1
- package/dist/core/model-runtime-streaming.d.ts +9 -2
- package/dist/core/model-runtime-streaming.d.ts.map +1 -1
- package/dist/core/model-runtime-streaming.js +121 -10
- package/dist/core/model-runtime-streaming.js.map +1 -1
- package/dist/core/model-runtime.d.ts +6 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +103 -2
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/provider-attribution.js +1 -1
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/resource-loader-reload.js +1 -1
- package/dist/core/resource-loader-reload.js.map +1 -1
- package/dist/core/resource-loader-types.d.ts +1 -1
- package/dist/core/resource-loader-types.d.ts.map +1 -1
- package/dist/core/resource-loader-types.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts +1 -0
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/runtime-credentials.js +3 -0
- package/dist/core/runtime-credentials.js.map +1 -1
- package/dist/core/sdk-types.d.ts +4 -0
- package/dist/core/sdk-types.d.ts.map +1 -1
- package/dist/core/sdk-types.js.map +1 -1
- package/dist/core/sdk.d.ts +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +145 -94
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-lifecycle-work.d.ts +3 -0
- package/dist/core/session-lifecycle-work.d.ts.map +1 -1
- package/dist/core/session-lifecycle-work.js +2 -0
- package/dist/core/session-lifecycle-work.js.map +1 -1
- package/dist/core/session-manager-archive.d.ts +2 -16
- package/dist/core/session-manager-archive.d.ts.map +1 -1
- package/dist/core/session-manager-archive.js +8 -109
- package/dist/core/session-manager-archive.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +53 -51
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +549 -315
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-entries.d.ts.map +1 -1
- package/dist/core/session-manager-entries.js +5 -10
- package/dist/core/session-manager-entries.js.map +1 -1
- package/dist/core/session-manager-errors.d.ts +10 -0
- package/dist/core/session-manager-errors.d.ts.map +1 -0
- package/dist/core/session-manager-errors.js +27 -0
- package/dist/core/session-manager-errors.js.map +1 -0
- package/dist/core/session-manager-list.d.ts +1 -0
- package/dist/core/session-manager-list.d.ts.map +1 -1
- package/dist/core/session-manager-list.js +23 -25
- package/dist/core/session-manager-list.js.map +1 -1
- package/dist/core/session-manager-storage.d.ts +3 -12
- package/dist/core/session-manager-storage.d.ts.map +1 -1
- package/dist/core/session-manager-storage.js +60 -77
- package/dist/core/session-manager-storage.js.map +1 -1
- package/dist/core/session-manager-types.d.ts +4 -12
- package/dist/core/session-manager-types.d.ts.map +1 -1
- package/dist/core/session-manager-types.js +2 -1
- package/dist/core/session-manager-types.js.map +1 -1
- package/dist/core/session-manager-validation.d.ts +3 -0
- package/dist/core/session-manager-validation.d.ts.map +1 -1
- package/dist/core/session-manager-validation.js +18 -1
- package/dist/core/session-manager-validation.js.map +1 -1
- package/dist/core/session-manager.d.ts +3 -3
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-mutation-queue.d.ts +3 -0
- package/dist/core/session-mutation-queue.d.ts.map +1 -0
- package/dist/core/session-mutation-queue.js +14 -0
- package/dist/core/session-mutation-queue.js.map +1 -0
- package/dist/core/session-resume-args.d.ts +4 -0
- package/dist/core/session-resume-args.d.ts.map +1 -0
- package/dist/core/session-resume-args.js +9 -0
- package/dist/core/session-resume-args.js.map +1 -0
- package/dist/core/session-storage.d.ts +26 -0
- package/dist/core/session-storage.d.ts.map +1 -0
- package/dist/core/session-storage.js +171 -0
- package/dist/core/session-storage.js.map +1 -0
- package/dist/core/session-store-list.d.ts +4 -0
- package/dist/core/session-store-list.d.ts.map +1 -0
- package/dist/core/session-store-list.js +28 -0
- package/dist/core/session-store-list.js.map +1 -0
- package/dist/core/settings-manager-basic-accessors.d.ts +0 -1
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js +0 -5
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/settings-merge.d.ts.map +1 -1
- package/dist/core/settings-merge.js +8 -2
- package/dist/core/settings-merge.js.map +1 -1
- package/dist/core/settings-schema.d.ts +76 -6
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +29 -20
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/storage/database.d.ts +21 -0
- package/dist/core/storage/database.d.ts.map +1 -0
- package/dist/core/storage/database.js +2 -0
- package/dist/core/storage/database.js.map +1 -0
- package/dist/core/storage/errors.d.ts +64 -0
- package/dist/core/storage/errors.d.ts.map +1 -0
- package/dist/core/storage/errors.js +103 -0
- package/dist/core/storage/errors.js.map +1 -0
- package/dist/core/storage/index.d.ts +10 -0
- package/dist/core/storage/index.d.ts.map +1 -0
- package/dist/core/storage/index.js +8 -0
- package/dist/core/storage/index.js.map +1 -0
- package/dist/core/storage/node-sqlite.d.ts +7 -0
- package/dist/core/storage/node-sqlite.d.ts.map +1 -0
- package/dist/core/storage/node-sqlite.js +202 -0
- package/dist/core/storage/node-sqlite.js.map +1 -0
- package/dist/core/storage/prefix.d.ts +5 -0
- package/dist/core/storage/prefix.d.ts.map +1 -0
- package/dist/core/storage/prefix.js +15 -0
- package/dist/core/storage/prefix.js.map +1 -0
- package/dist/core/storage/provider.d.ts +58 -0
- package/dist/core/storage/provider.d.ts.map +1 -0
- package/dist/core/storage/provider.js +243 -0
- package/dist/core/storage/provider.js.map +1 -0
- package/dist/core/storage/run-journal.d.ts +93 -0
- package/dist/core/storage/run-journal.d.ts.map +1 -0
- package/dist/core/storage/run-journal.js +15 -0
- package/dist/core/storage/run-journal.js.map +1 -0
- package/dist/core/storage/schema.d.ts +3 -0
- package/dist/core/storage/schema.d.ts.map +1 -0
- package/dist/core/storage/schema.js +6 -0
- package/dist/core/storage/schema.js.map +1 -0
- package/dist/core/storage/selection.d.ts +16 -0
- package/dist/core/storage/selection.d.ts.map +1 -0
- package/dist/core/storage/selection.js +87 -0
- package/dist/core/storage/selection.js.map +1 -0
- package/dist/core/storage/session/conformance.d.ts +12 -0
- package/dist/core/storage/session/conformance.d.ts.map +1 -0
- package/dist/core/storage/session/conformance.js +674 -0
- package/dist/core/storage/session/conformance.js.map +1 -0
- package/dist/core/storage/session/entry-structure.d.ts +4 -0
- package/dist/core/storage/session/entry-structure.d.ts.map +1 -0
- package/dist/core/storage/session/entry-structure.js +83 -0
- package/dist/core/storage/session/entry-structure.js.map +1 -0
- package/dist/core/storage/session/errors.d.ts +54 -0
- package/dist/core/storage/session/errors.d.ts.map +1 -0
- package/dist/core/storage/session/errors.js +95 -0
- package/dist/core/storage/session/errors.js.map +1 -0
- package/dist/core/storage/session/jsonl-session-store.d.ts +72 -0
- package/dist/core/storage/session/jsonl-session-store.d.ts.map +1 -0
- package/dist/core/storage/session/jsonl-session-store.js +564 -0
- package/dist/core/storage/session/jsonl-session-store.js.map +1 -0
- package/dist/core/storage/session/legacy-format.d.ts +20 -0
- package/dist/core/storage/session/legacy-format.d.ts.map +1 -0
- package/dist/core/storage/session/legacy-format.js +89 -0
- package/dist/core/storage/session/legacy-format.js.map +1 -0
- package/dist/core/storage/session/legacy-session-store.d.ts +63 -0
- package/dist/core/storage/session/legacy-session-store.d.ts.map +1 -0
- package/dist/core/storage/session/legacy-session-store.js +239 -0
- package/dist/core/storage/session/legacy-session-store.js.map +1 -0
- package/dist/core/storage/session/legacy-session-summary.d.ts +11 -0
- package/dist/core/storage/session/legacy-session-summary.d.ts.map +1 -0
- package/dist/core/storage/session/legacy-session-summary.js +103 -0
- package/dist/core/storage/session/legacy-session-summary.js.map +1 -0
- package/dist/core/storage/session/memory-session-store.d.ts +33 -0
- package/dist/core/storage/session/memory-session-store.d.ts.map +1 -0
- package/dist/core/storage/session/memory-session-store.js +120 -0
- package/dist/core/storage/session/memory-session-store.js.map +1 -0
- package/dist/core/storage/session/scratch-directory.d.ts +2 -0
- package/dist/core/storage/session/scratch-directory.d.ts.map +1 -0
- package/dist/core/storage/session/scratch-directory.js +5 -0
- package/dist/core/storage/session/scratch-directory.js.map +1 -0
- package/dist/core/storage/session/session-summary.d.ts +24 -0
- package/dist/core/storage/session/session-summary.d.ts.map +1 -0
- package/dist/core/storage/session/session-summary.js +79 -0
- package/dist/core/storage/session/session-summary.js.map +1 -0
- package/dist/core/storage/session/sql-session-store.d.ts +49 -0
- package/dist/core/storage/session/sql-session-store.d.ts.map +1 -0
- package/dist/core/storage/session/sql-session-store.js +246 -0
- package/dist/core/storage/session/sql-session-store.js.map +1 -0
- package/dist/core/storage/session/types.d.ts +72 -0
- package/dist/core/storage/session/types.d.ts.map +1 -0
- package/dist/core/storage/session/types.js +2 -0
- package/dist/core/storage/session/types.js.map +1 -0
- package/dist/core/storage/session/validation.d.ts +7 -0
- package/dist/core/storage/session/validation.d.ts.map +1 -0
- package/dist/core/storage/session/validation.js +47 -0
- package/dist/core/storage/session/validation.js.map +1 -0
- package/dist/core/storage/testing.d.ts +15 -0
- package/dist/core/storage/testing.d.ts.map +1 -0
- package/dist/core/storage/testing.js +309 -0
- package/dist/core/storage/testing.js.map +1 -0
- package/dist/core/tasks/completion.d.ts.map +1 -1
- package/dist/core/tasks/completion.js +2 -4
- package/dist/core/tasks/completion.js.map +1 -1
- package/dist/core/tools/bash-session-environment.d.ts.map +1 -1
- package/dist/core/tools/bash-session-environment.js +0 -2
- package/dist/core/tools/bash-session-environment.js.map +1 -1
- package/dist/core/tools/read-url.d.ts.map +1 -1
- package/dist/core/tools/read-url.js +6 -1
- package/dist/core/tools/read-url.js.map +1 -1
- package/dist/core/tools/todos-model.js +3 -3
- package/dist/core/tools/todos-model.js.map +1 -1
- package/dist/core/tools/todos-mutations.js +2 -2
- package/dist/core/tools/todos-mutations.js.map +1 -1
- package/dist/core/tools/todos-render.js +1 -1
- package/dist/core/tools/todos-render.js.map +1 -1
- package/dist/core/tools/todos-storage.js +2 -2
- package/dist/core/tools/todos-storage.js.map +1 -1
- package/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/dist/extensions/codemode/execute.js +14 -1
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +1 -1
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/herdr/index.d.ts.map +1 -1
- package/dist/extensions/herdr/index.js +6 -8
- package/dist/extensions/herdr/index.js.map +1 -1
- package/dist/extensions/mcp/index.js +1 -1
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/dist/extensions/mcp/tools.js +6 -1
- package/dist/extensions/mcp/tools.js.map +1 -1
- package/dist/index-extensions.d.ts +1 -1
- package/dist/index-extensions.d.ts.map +1 -1
- package/dist/index-extensions.js +1 -1
- package/dist/index-extensions.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/main-session.d.ts +12 -2
- package/dist/main-session.d.ts.map +1 -1
- package/dist/main-session.js +151 -53
- package/dist/main-session.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +97 -42
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts +3 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +18 -5
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +2 -2
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/host-session-picker.js +1 -1
- package/dist/modes/interactive/components/host-session-picker.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +9 -5
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-delete.d.ts +1 -1
- package/dist/modes/interactive/components/session-selector-delete.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-delete.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-list.d.ts +12 -9
- package/dist/modes/interactive/components/session-selector-list.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-list.js +27 -25
- package/dist/modes/interactive/components/session-selector-list.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +8 -4
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +31 -21
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-component.d.ts +5 -1
- package/dist/modes/interactive/components/tree-selector-component.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-component.js +20 -3
- package/dist/modes/interactive/components/tree-selector-component.js.map +1 -1
- package/dist/modes/interactive/interactive-bash-compact.js +1 -1
- package/dist/modes/interactive/interactive-bash-compact.js.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.js +2 -2
- package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-editor-actions.js +2 -2
- package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-runtime.js +2 -0
- package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +6 -4
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +2 -1
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.js +7 -3
- package/dist/modes/interactive/interactive-mode-helpers.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +5 -5
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.js +12 -7
- package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-queueing.js +8 -5
- package/dist/modes/interactive/interactive-queueing.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +2 -2
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.js +38 -14
- package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-session-runtime.js +6 -0
- package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +5 -3
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-tui.d.ts +1 -0
- package/dist/modes/interactive/interactive-tui.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-tui.js +9 -2
- package/dist/modes/interactive/interactive-tui.js.map +1 -1
- package/dist/modes/interactive/program-status-reporter.d.ts +4 -0
- package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -1
- package/dist/modes/interactive/program-status-reporter.js +45 -6
- package/dist/modes/interactive/program-status-reporter.js.map +1 -1
- package/dist/modes/interactive-engine/create-isolated-runtime.d.ts.map +1 -1
- package/dist/modes/interactive-engine/create-isolated-runtime.js +8 -1
- package/dist/modes/interactive-engine/create-isolated-runtime.js.map +1 -1
- package/dist/modes/interactive-engine/engine-args.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-args.js +11 -4
- package/dist/modes/interactive-engine/engine-args.js.map +1 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +2 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.js +9 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.js +99 -74
- package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
- package/dist/modes/interactive-engine/protocol.d.ts +4 -0
- package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
- package/dist/modes/interactive-engine/protocol.js +39 -1
- package/dist/modes/interactive-engine/protocol.js.map +1 -1
- package/dist/modes/rpc/rpc-bash-request-owners.js +1 -1
- package/dist/modes/rpc/rpc-bash-request-owners.js.map +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-api.js +2 -2
- package/dist/modes/rpc/rpc-client-api.js.map +1 -1
- package/dist/modes/rpc/rpc-client-process.d.ts +2 -2
- package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-process.js +20 -7
- package/dist/modes/rpc/rpc-client-process.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +4 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +6 -2
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.js +12 -9
- package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
- package/dist/modes/rpc/rpc-provider-auth.js +2 -2
- package/dist/modes/rpc/rpc-provider-auth.js.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.js +10 -0
- package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
- package/dist/modes/rpc/rpc-terminal-drain.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-terminal-drain.js +11 -2
- package/dist/modes/rpc/rpc-terminal-drain.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +6 -2
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/utils/canonical-path.d.ts +5 -0
- package/dist/utils/canonical-path.d.ts.map +1 -0
- package/dist/utils/canonical-path.js +26 -0
- package/dist/utils/canonical-path.js.map +1 -0
- package/dist/utils/paths.d.ts +1 -7
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +1 -15
- package/dist/utils/paths.js.map +1 -1
- package/docs/codemode.md +2 -0
- package/docs/compaction.md +2 -2
- package/docs/custom-provider/oauth.md +2 -2
- package/docs/custom-provider/override.md +3 -3
- package/docs/custom-provider/registration.md +7 -7
- package/docs/custom-provider/streaming.md +1 -1
- package/docs/custom-provider.md +5 -5
- package/docs/docs.json +7 -2
- package/docs/environment-variables.md +10 -2
- package/docs/extensions/api-reference.md +40 -19
- package/docs/extensions/authoring.md +1 -1
- package/docs/extensions/events.md +12 -8
- package/docs/extensions.md +2 -2
- package/docs/getting-started/installation.md +2 -4
- package/docs/json.md +1 -1
- package/docs/llama-cpp.md +94 -1
- package/docs/models/reference.md +2 -0
- package/docs/models-configuration.md +206 -0
- package/docs/models.md +11 -1
- package/docs/packages/authoring.md +1 -1
- package/docs/providers.md +9 -5
- package/docs/quickstart.md +2 -1
- package/docs/reference/cli.md +7 -3
- package/docs/rpc/protocol.md +10 -4
- package/docs/sdk/reference.md +16 -14
- package/docs/sdk/web-server.md +6 -7
- package/docs/sdk.md +67 -27
- package/docs/session-format.md +35 -34
- package/docs/sessions.md +52 -17
- package/docs/settings.md +35 -22
- package/docs/storage.md +387 -0
- package/docs/subagents.md +19 -6
- package/docs/usage.md +3 -2
- package/docs/workflows/api-reference.md +88 -62
- package/docs/workflows/authoring.md +2 -1
- package/docs/workflows/operations.md +32 -174
- package/docs/workflows/reliable-design.md +17 -17
- package/examples/extensions/bookmark.ts +2 -2
- package/examples/extensions/handoff.ts +2 -2
- package/examples/extensions/plan-mode/index.ts +15 -13
- package/examples/extensions/preset.ts +8 -8
- package/examples/extensions/session-name.ts +1 -1
- package/examples/extensions/snake.ts +3 -1
- package/examples/extensions/space-invaders.ts +3 -1
- package/examples/extensions/tic-tac-toe.ts +80 -80
- package/examples/sdk/11-sessions.ts +5 -5
- package/examples/sdk/13-session-runtime.ts +7 -7
- package/examples/sdk/README.md +1 -1
- package/npm-shrinkwrap.json +53 -469
- package/package.json +17 -9
- package/schemas/models.schema.json +62 -29
- package/schemas/settings.schema.json +138 -27
- package/dist/builtin/workflows/builtin/chunk-x6az1sxp.js +0 -8
- package/dist/builtin/workflows/builtin/chunk-ymwq372z.js +0 -11609
- package/dist/core/session-manager-migrations.d.ts +0 -11
- package/dist/core/session-manager-migrations.d.ts.map +0 -1
- package/dist/core/session-manager-migrations.js +0 -80
- package/dist/core/session-manager-migrations.js.map +0 -1
- package/docs/nvidia-rtx-llama-cpp.md +0 -101
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Models Configuration
|
|
3
|
+
sidebarTitle: "models.json fields"
|
|
4
|
+
description: Every provider, model, override, and compatibility field accepted in models.json, generated from the schema.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Models Configuration
|
|
8
|
+
|
|
9
|
+
{/* This file is generated from TypeScript source. Do not edit it manually; run npm run generate:references --workspace=@bastani/atomic. */}
|
|
10
|
+
|
|
11
|
+
This reference lists the fields of `models.json`. See [Custom Models](/models) for examples and the file location (normally `~/.atomic/agent/models.json`).
|
|
12
|
+
|
|
13
|
+
Add `"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/models.schema.json"` to `models.json` for editor validation and completion.
|
|
14
|
+
|
|
15
|
+
## Providers
|
|
16
|
+
|
|
17
|
+
Each key under `providers` is a provider ID. A built-in provider ID changes that provider. Any other ID adds a provider, which needs `baseUrl` and an `api` at provider or model level.
|
|
18
|
+
|
|
19
|
+
| Field | Type | Default | Description |
|
|
20
|
+
|---|---|---|---|
|
|
21
|
+
| `name` | string | | Display name. |
|
|
22
|
+
| `baseUrl` | string | | API base URL. Also applies to the provider's built-in models. |
|
|
23
|
+
| `apiKey` | string | | Literal key, "$NAME" environment interpolation, or "!command" output. |
|
|
24
|
+
| `api` | string | | API for the provider's models, such as "openai-completions", "openai-responses", "anthropic-messages", or "google-generative-ai". |
|
|
25
|
+
| `oauth` | `"radius"` | | OAuth login flow. Requires baseUrl. |
|
|
26
|
+
| `headers` | object | | Request headers. Values resolve like apiKey. |
|
|
27
|
+
| `compat` | [object](#compatibility) | | Provider and model compatibility overrides. |
|
|
28
|
+
| `authHeader` | boolean | `false` | Whether to send the resolved API key as Authorization: Bearer. |
|
|
29
|
+
| `models` | [`object[]`](#models) | | |
|
|
30
|
+
| `modelOverrides` | [object](#model-overrides) | | |
|
|
31
|
+
|
|
32
|
+
## Models
|
|
33
|
+
|
|
34
|
+
Each `models` entry adds a model to the provider. An entry whose `id` matches an existing model replaces it.
|
|
35
|
+
|
|
36
|
+
| Field | Type | Default | Description |
|
|
37
|
+
|---|---|---|---|
|
|
38
|
+
| `id` | string | | Required. Model ID sent to the API. |
|
|
39
|
+
| `name` | string | | Display name, also matched by --model patterns. |
|
|
40
|
+
| `api` | string | | Overrides the provider api. |
|
|
41
|
+
| `baseUrl` | string | | Overrides the provider baseUrl. |
|
|
42
|
+
| `reasoning` | boolean | `false` | Whether the model supports thinking. |
|
|
43
|
+
| `thinkingLevelMap` | object | | Provider value sent for each thinking level. null marks a level unsupported. Levels the model does not map use the provider's default value through high; xhigh and max are unsupported. |
|
|
44
|
+
| `input` | `("text" \| "image" \| "pdf")[]` | `["text"]` | |
|
|
45
|
+
| `inputLimits` | [object](#input-limits) | | |
|
|
46
|
+
| `cost` | object | | |
|
|
47
|
+
| `cost.input` | number | | Required. Input cost in USD per million tokens. |
|
|
48
|
+
| `cost.output` | number | | Required. Output cost in USD per million tokens. |
|
|
49
|
+
| `cost.cacheRead` | number | | Required. Cache-read cost in USD per million tokens. |
|
|
50
|
+
| `cost.cacheWrite` | number | | Required. Cache-write cost in USD per million tokens. |
|
|
51
|
+
| `cost.tiers` | `object[]` | | Request-wide pricing tiers. The highest matching input threshold applies to the full request. |
|
|
52
|
+
| `cost.tiers[].inputTokensAbove` | number | | Required. Use this tier when total request input exceeds this token count. |
|
|
53
|
+
| `cost.tiers[].input` | number | | Required. Input cost in USD per million tokens. |
|
|
54
|
+
| `cost.tiers[].output` | number | | Required. Output cost in USD per million tokens. |
|
|
55
|
+
| `cost.tiers[].cacheRead` | number | | Required. Cache-read cost in USD per million tokens. |
|
|
56
|
+
| `cost.tiers[].cacheWrite` | number | | Required. Cache-write cost in USD per million tokens. |
|
|
57
|
+
| `promptCache` | object | | Best-effort prompt cache lifetime in seconds for the short and long retention tiers. Atomic warms only tiers with a known lifetime. |
|
|
58
|
+
| `contextWindow` | number | `128000` | Context window in tokens. |
|
|
59
|
+
| `maxTokens` | number | `16384` | Maximum output tokens. |
|
|
60
|
+
| `samplingParams` | object | | Fields merged into every request body. Applies only to OpenAI-compatible APIs. |
|
|
61
|
+
| `samplingParamsByThinkingLevel` | object | | samplingParams per thinking level, merged over samplingParams. |
|
|
62
|
+
| `headers` | object | | Request headers. Values resolve like apiKey. |
|
|
63
|
+
| `compat` | [object](#compatibility) | | Provider and model compatibility overrides. |
|
|
64
|
+
|
|
65
|
+
## Model overrides
|
|
66
|
+
|
|
67
|
+
Each `modelOverrides` key is the ID of a built-in or extension model. Unknown IDs are ignored. Object fields, such as `cost`, merge with the model's value field by field; other fields replace it.
|
|
68
|
+
|
|
69
|
+
| Field | Type | Default | Description |
|
|
70
|
+
|---|---|---|---|
|
|
71
|
+
| `name` | string | | Display name, also matched by --model patterns. |
|
|
72
|
+
| `reasoning` | boolean | | Whether the model supports thinking. |
|
|
73
|
+
| `thinkingLevelMap` | object | | Provider value sent for each thinking level. null marks a level unsupported. Levels the model does not map use the provider's default value through high; xhigh and max are unsupported. |
|
|
74
|
+
| `input` | `("text" \| "image" \| "pdf")[]` | | |
|
|
75
|
+
| `inputLimits` | [object](#input-limits) | | |
|
|
76
|
+
| `cost` | object | | |
|
|
77
|
+
| `cost.input` | number | | Input cost in USD per million tokens. |
|
|
78
|
+
| `cost.output` | number | | Output cost in USD per million tokens. |
|
|
79
|
+
| `cost.cacheRead` | number | | Cache-read cost in USD per million tokens. |
|
|
80
|
+
| `cost.cacheWrite` | number | | Cache-write cost in USD per million tokens. |
|
|
81
|
+
| `cost.tiers` | `object[]` | | Request-wide pricing tiers. The highest matching input threshold applies to the full request. |
|
|
82
|
+
| `cost.tiers[].inputTokensAbove` | number | | Required. Use this tier when total request input exceeds this token count. |
|
|
83
|
+
| `cost.tiers[].input` | number | | Required. Input cost in USD per million tokens. |
|
|
84
|
+
| `cost.tiers[].output` | number | | Required. Output cost in USD per million tokens. |
|
|
85
|
+
| `cost.tiers[].cacheRead` | number | | Required. Cache-read cost in USD per million tokens. |
|
|
86
|
+
| `cost.tiers[].cacheWrite` | number | | Required. Cache-write cost in USD per million tokens. |
|
|
87
|
+
| `promptCache` | object | | Best-effort prompt cache lifetime in seconds for the short and long retention tiers. Atomic warms only tiers with a known lifetime. |
|
|
88
|
+
| `contextWindow` | number | | Context window in tokens. |
|
|
89
|
+
| `maxTokens` | number | | Maximum output tokens. |
|
|
90
|
+
| `samplingParams` | object | | Fields merged into every request body. Applies only to OpenAI-compatible APIs. |
|
|
91
|
+
| `samplingParamsByThinkingLevel` | object | | samplingParams per thinking level, merged over samplingParams. |
|
|
92
|
+
| `headers` | object | | Request headers. Values resolve like apiKey. |
|
|
93
|
+
| `compat` | [object](#compatibility) | | Provider and model compatibility overrides. |
|
|
94
|
+
|
|
95
|
+
## Input limits
|
|
96
|
+
|
|
97
|
+
See [Image Input Limits](/models/reference#image-input-limits).
|
|
98
|
+
|
|
99
|
+
| Field | Type | Default | Description |
|
|
100
|
+
|---|---|---|---|
|
|
101
|
+
| `maxRequestBytes` | integer | | Maximum serialized provider request size in bytes. |
|
|
102
|
+
| `images` | object | | |
|
|
103
|
+
| `images.resize` | object | | Cache-safe resize profile applied before a new image enters conversation history. |
|
|
104
|
+
| `images.resize.maxWidth` | integer | | |
|
|
105
|
+
| `images.resize.maxHeight` | integer | | |
|
|
106
|
+
| `images.resize.maxBytes` | integer | | Maximum base64-encoded payload size in bytes. |
|
|
107
|
+
| `images.resize.jpegQuality` | integer | | |
|
|
108
|
+
| `images.maxPerMessage` | integer | | Maximum images accepted in one provider message. |
|
|
109
|
+
| `images.maxPerRequest` | integer | | Maximum images accepted across one provider request. |
|
|
110
|
+
|
|
111
|
+
## Compatibility
|
|
112
|
+
|
|
113
|
+
`compat` describes verified differences from an API's standard request and response behavior. Model values override provider values per field. The fields that apply depend on the model's `api`.
|
|
114
|
+
|
|
115
|
+
### `openai-completions`
|
|
116
|
+
|
|
117
|
+
| Field | Type | Default | Description |
|
|
118
|
+
|---|---|---|---|
|
|
119
|
+
| `supportsStore` | boolean | | Whether the provider supports the store field. Default: auto-detected from URL. |
|
|
120
|
+
| `supportsDeveloperRole` | boolean | | Whether the provider supports the developer role instead of system. Default: auto-detected from URL. |
|
|
121
|
+
| `supportsReasoningEffort` | boolean | | Whether the provider supports reasoning_effort. Default: auto-detected from URL. |
|
|
122
|
+
| `supportsTemperature` | boolean | `true` | Whether the model accepts the temperature request field. When false, the provider omits temperature and also strips temperature, top_p, and top_k from samplingParams. |
|
|
123
|
+
| `supportsForcedToolChoice` | boolean | `true` | Whether the model accepts forced tool use (tool_choice "required" or a specific function). When false, the provider rejects a forced choice with an error instead of sending a request the model cannot honor. "auto" and "none" are never altered. |
|
|
124
|
+
| `supportsUsageInStreaming` | boolean | `true` | Whether the provider supports stream_options.include_usage for token usage in streaming responses. |
|
|
125
|
+
| `supportsFinishReason` | boolean | `true` | Whether streamed responses include finish_reason. When false, Atomic infers stop or toolUse when the stream ends. |
|
|
126
|
+
| `maxTokensField` | `"max_completion_tokens" \| "max_tokens"` | | Which field to use for max tokens. Default: auto-detected from URL. |
|
|
127
|
+
| `requiresToolResultName` | boolean | | Whether tool results require the name field. Default: auto-detected from URL. |
|
|
128
|
+
| `requiresAssistantAfterToolResult` | boolean | | Whether a user message after tool results requires an assistant message in between. Default: auto-detected from URL. |
|
|
129
|
+
| `requiresThinkingAsText` | boolean | | Whether thinking blocks must be converted to text blocks with <thinking> delimiters. Default: auto-detected from URL. |
|
|
130
|
+
| `requiresReasoningContentOnAssistantMessages` | boolean | | Whether all replayed assistant messages must include an empty reasoning_content field when reasoning is enabled. Default: auto-detected from URL. |
|
|
131
|
+
| `thinkingFormat` | `"openai" \| "openrouter" \| "deepseek" \| "together" \| "baseten" \| "zai" \| "qwen" \| "chat-template" \| "qwen-chat-template" \| "string-thinking" \| "ant-ling"` | | Format for reasoning or thinking parameters. When omitted, Atomic auto-detects the format from the provider URL. "openai" uses reasoning_effort, "openrouter" uses reasoning.effort, "deepseek" uses thinking.type plus reasoning_effort when supported, "together" uses reasoning.enabled plus reasoning_effort when supported, "baseten" uses configurable chat_template_args plus reasoning_effort when supported, "zai" uses thinking.type, "qwen" uses top-level enable_thinking, "qwen-chat-template" uses chat_template_kwargs.enable_thinking and preserve_thinking, "chat-template" uses configurable chat_template_kwargs, "string-thinking" uses top-level thinking, and "ant-ling" uses reasoning.effort only when the mapped effort is non-null. |
|
|
132
|
+
| `chatTemplateKwargs` | object | | Kwargs sent as chat_template_kwargs when thinkingFormat is "chat-template". Use $var with "thinking.enabled", "thinking.effort", or "thinking.budget" for Atomic-controlled values. |
|
|
133
|
+
| `chatTemplateArgs` | object | | Arguments sent as chat_template_args when thinkingFormat is "baseten". Use $var with "thinking.enabled", "thinking.effort", or "thinking.budget" for Atomic-controlled values. |
|
|
134
|
+
| `openRouterRouting` | object | | OpenRouter provider routing preferences. Controls which upstream providers OpenRouter routes requests to. Sent as the provider field in the OpenRouter API request body. See https://openrouter.ai/docs/guides/routing/provider-selection. |
|
|
135
|
+
| `vercelGatewayRouting` | object | | Vercel AI Gateway routing preferences. Controls which upstream providers the gateway routes requests to. See https://vercel.com/docs/ai-gateway/models-and-providers/provider-options. |
|
|
136
|
+
| `zaiToolStream` | boolean | `false` | Whether z.ai supports top-level tool_stream for streaming tool call deltas. |
|
|
137
|
+
| `thinkingTokenBudgetField` | `"thinking_token_budget" \| "thinking_budget" \| "thinking_budget_tokens"` | | Top-level request field used to cap reasoning tokens from thinkingBudgets. Reasoning and the answer share max_tokens on these endpoints. "thinking_token_budget" is vLLM, "thinking_budget" is Qwen, DashScope, or SGLang, and "thinking_budget_tokens" is llama.cpp. Off by default and not set on the generated catalog. |
|
|
138
|
+
| `supportsThinkingTokenBudget` | boolean | `false` | Alias for thinkingTokenBudgetField: "thinking_token_budget" (vLLM). Prefer thinkingTokenBudgetField. |
|
|
139
|
+
| `supportsOpenAIGrammarTools` | boolean | `false` | Whether the provider supports OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools. The generated catalog enables this for capable models. |
|
|
140
|
+
| `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system or developer messages after the conversation has started. When false, later system messages are folded into the leading system message. The generated catalog enables this for verified models. |
|
|
141
|
+
| `supportsMidConvoToolAdditions` | boolean | `false` | Whether system messages can introduce additional tools mid-conversation. Requires supportsMidConvoSystemMessages. The generated catalog enables this for capable models. |
|
|
142
|
+
| `supportsStrictMode` | boolean | `false` | Whether the provider supports the strict field in tool definitions. Generated capable models enable it explicitly. |
|
|
143
|
+
| `cacheControlFormat` | `"anthropic"` | | Cache control convention for prompt caching. Anthropic applies cache_control markers to the system prompt, last tool definition, and last user, assistant, or tool-result text content. |
|
|
144
|
+
| `sendSessionAffinityHeaders` | boolean | | Whether to send session-affinity data from options.sessionId. Default: true for OpenRouter endpoints, false otherwise. |
|
|
145
|
+
| `sessionAffinityFormat` | `"openai" \| "openai-nosession" \| "openrouter"` | | Session-affinity header format. openai sends session_id, x-client-request-id, and x-session-affinity; openai-nosession sends x-client-request-id and x-session-affinity; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected. |
|
|
146
|
+
| `supportsLongCacheRetention` | boolean | | Whether the provider supports long prompt cache retention (prompt_cache_retention: "24h" or Anthropic-style cache_control.ttl: "1h", depending on format). Default: auto-detected from provider and URL. |
|
|
147
|
+
| `vllmPriority` | number | | vLLM scheduler priority sent as the top-level priority request field. Lower values are handled earlier and the server default is 0. Only meaningful with --scheduling-policy priority. Off by default and not set on the generated catalog. |
|
|
148
|
+
|
|
149
|
+
### `openai-responses`
|
|
150
|
+
|
|
151
|
+
Also applies to `azure-openai-responses` and `openai-codex-responses`.
|
|
152
|
+
|
|
153
|
+
| Field | Type | Default | Description |
|
|
154
|
+
|---|---|---|---|
|
|
155
|
+
| `supportsDeveloperRole` | boolean | `true` | Whether the provider supports the developer role instead of system. |
|
|
156
|
+
| `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts developer or system messages after the conversation has started. When false, later system messages are folded into the leading system message. The generated catalog enables this for verified models. |
|
|
157
|
+
| `sessionAffinityFormat` | `"openai" \| "openai-nosession" \| "openrouter"` | | Session-affinity header format. openai sends session_id and x-client-request-id; openai-nosession sends x-client-request-id; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected. |
|
|
158
|
+
| `supportsLongCacheRetention` | boolean | `true` | Whether the provider supports long prompt cache retention. This uses prompt_cache_options.ttl: "30m" on GPT-5.6+ and prompt_cache_retention: "24h" on earlier models. |
|
|
159
|
+
| `supportsStrictMode` | boolean | | Whether the provider supports strict JSON-schema function tools. Defaults are API-specific; generated OpenAI models enable it explicitly. |
|
|
160
|
+
| `supportsOpenAIGrammarTools` | boolean | `false` | Whether to emit OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools. The generated catalog enables this for capable models. |
|
|
161
|
+
| `supportsAdditionalTools` | boolean | `false` | Whether the model supports message-anchored additional_tools input items. |
|
|
162
|
+
| `supportsToolSearch` | boolean | `false` | Whether the model supports client-executed tool search for transcript-anchored additions. |
|
|
163
|
+
| `supportsExplicitPromptCacheMode` | boolean | `false` | Whether the model accepts prompt_cache_options. Older OpenAI models reject the parameter. |
|
|
164
|
+
| `supportsMidConvoEffort` | boolean | `false` | Whether thinking level changes are sent as configuration_update input items instead of changing reasoning.effort, so a change keeps the prompt cache. Only used by the openai-responses API, and ignored with Sign in with ChatGPT on the openai provider. |
|
|
165
|
+
| `supportsMaxOutputTokens` | boolean | `true` | Whether the provider accepts max_output_tokens. Some Codex-protocol gateways reject it. |
|
|
166
|
+
|
|
167
|
+
### `anthropic-messages`
|
|
168
|
+
|
|
169
|
+
| Field | Type | Default | Description |
|
|
170
|
+
|---|---|---|---|
|
|
171
|
+
| `supportsEagerToolInputStreaming` | boolean | `true` | Whether the provider accepts per-tool eager_input_streaming. When false, the Anthropic provider omits tools[].eager_input_streaming and sends the legacy fine-grained-tool-streaming-2025-05-14 beta header for tool-enabled requests. |
|
|
172
|
+
| `supportsLongCacheRetention` | boolean | `true` | Whether the provider supports Anthropic long cache retention through cache_control.ttl. |
|
|
173
|
+
| `sendSessionAffinityHeaders` | boolean | | Whether to send x-session-affinity from options.sessionId when caching is enabled. Required for providers like Fireworks that use session affinity for prompt cache routing; requests to the same replica maximize cache hits. Default: true for OpenRouter endpoints, false otherwise. |
|
|
174
|
+
| `sessionAffinityFormat` | `"openrouter"` | | Session-affinity format. openrouter sends x-session-id; when unset, sends x-session-affinity. |
|
|
175
|
+
| `supportsCacheControlOnTools` | boolean | `true` | Whether the provider supports Anthropic-style cache_control markers on tool definitions. When false, cache_control is omitted from tool parameters. Some Anthropic-compatible providers, such as Fireworks, do not support this field on tools and may reject or ignore it. |
|
|
176
|
+
| `supportsTemperature` | boolean | `true` | Whether the model accepts the Anthropic temperature request field. Claude Opus 4.7+ rejects non-default values. |
|
|
177
|
+
| `forceAdaptiveThinking` | boolean | `false` | Whether to force adaptive thinking (thinking.type: adaptive plus output_config.effort) regardless of model ID. Built-in models that require adaptive thinking set this in generated metadata. Custom Anthropic-compatible providers can set this to true for any model whose upstream requires the adaptive format. Set false to opt out on overridden built-in models. |
|
|
178
|
+
| `allowEmptySignature` | boolean | `false` | Whether to replay empty thinking signatures instead of converting thinking to text. |
|
|
179
|
+
| `supportsStrictTools` | boolean | `false` | Whether the provider supports Anthropic strict tool schemas. Generated Anthropic models enable it explicitly. |
|
|
180
|
+
| `supportsMidConvoEffort` | boolean | `false` | Whether the exact model transport supports effort-only system messages and thinking binding controls. |
|
|
181
|
+
| `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system-role messages inside the conversation. When false, later system messages are folded into the top-level system prompt. |
|
|
182
|
+
| `supportsMidConvoToolChanges` | boolean | `false` | Whether the exact model accepts mid-conversation tool_addition and tool_removal blocks. Requires supportsMidConvoSystemMessages. |
|
|
183
|
+
| `allowedFallbackModels` | `object[]` | | Models Anthropic accepts for server-side refusal fallback, with local pricing metadata for returned fallback responses. When absent or empty, callers must omit fallbacks; Anthropic rejects the field for models with no permitted fallback targets. |
|
|
184
|
+
| `enforcesPreservedThinkingBinding` | boolean | `false` | Whether the model runs the Anthropic preserved-thinking conversation check, which rejects a request whose system prompt, tools, or earlier messages changed since a replayed thinking block was produced. When true, the provider sends the thinking-binding-controls-2026-08-01 beta header and thinking.block_binding.prefix_mismatch_behavior: "drop_block", so a changed prefix drops the affected thinking blocks instead of failing the request. |
|
|
185
|
+
| `delegatesThinkingModelBinding` | boolean | `false` | Whether the API adjudicates thinking-block model binding itself, always dropping a block the target model cannot read. When true, an assistant turn produced by a different model on the same provider and API replays its signed thinking and redacted_thinking blocks unchanged instead of being rewritten into plain text. |
|
|
186
|
+
| `supportsForcedToolChoice` | boolean | `true` | Whether the model accepts forced tool use (tool_choice "any" or a specific tool). When false, the provider rejects a forced choice with an error instead of sending a request the model is guaranteed to refuse. "auto" and "none" are never altered. |
|
|
187
|
+
|
|
188
|
+
### `bedrock-converse-stream`
|
|
189
|
+
|
|
190
|
+
| Field | Type | Default | Description |
|
|
191
|
+
|---|---|---|---|
|
|
192
|
+
| `supportsStrictMode` | boolean | `false` | Whether the model supports Bedrock strict tool schemas. |
|
|
193
|
+
| `supportsForcedToolChoice` | boolean | `true` | Whether the model accepts forced tool use (toolChoice "any" or a specific tool). When false, the provider rejects a forced choice with an error instead of sending a request that is guaranteed to fail. "auto" and "none" are never altered. |
|
|
194
|
+
| `supportsTemperature` | boolean | `true` | Whether the model accepts inferenceConfig.temperature. When false, the provider omits the field. |
|
|
195
|
+
|
|
196
|
+
### `mistral-conversations`
|
|
197
|
+
|
|
198
|
+
| Field | Type | Default | Description |
|
|
199
|
+
|---|---|---|---|
|
|
200
|
+
| `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system messages after the conversation has started. When false, later system messages are folded into the leading system message. |
|
|
201
|
+
|
|
202
|
+
### Atomic compatibility aliases
|
|
203
|
+
|
|
204
|
+
| Field | Type | Default | Description |
|
|
205
|
+
|---|---|---|---|
|
|
206
|
+
| `supportsGrammarTools` | boolean | | Atomic alias for supportsOpenAIGrammarTools. The canonical field wins if both are set. |
|
package/docs/models.md
CHANGED
|
@@ -19,7 +19,7 @@ For editor completion and validation of providers, models, and `compat` fields,
|
|
|
19
19
|
|
|
20
20
|
## Where to go next
|
|
21
21
|
|
|
22
|
-
This page shows minimal and full `models.json` examples you can copy.
|
|
22
|
+
This page shows minimal and full `models.json` examples you can copy. [Models Configuration](/models-configuration) lists every provider, model, override, and compatibility field directly from the schema. For extended examples, derived variants, and API behavior, see the [Model configuration guide](/models/reference).
|
|
23
23
|
|
|
24
24
|
For choosing which model to use rather than how to declare one, see [Model selection](/models/model-selection).
|
|
25
25
|
|
|
@@ -71,6 +71,16 @@ For local models (Ollama, LM Studio, vLLM), only `id` is required per model:
|
|
|
71
71
|
|
|
72
72
|
The `apiKey` is required but Ollama ignores it, so any value works.
|
|
73
73
|
|
|
74
|
+
To route a built-in provider through a proxy, set only its `baseUrl`. Its models and authentication stay unchanged:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"providers": {
|
|
79
|
+
"anthropic": { "baseUrl": "https://proxy.example.com/v1" }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
74
84
|
Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so Atomic sends the system prompt as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too.
|
|
75
85
|
|
|
76
86
|
You can set `compat` at the provider level to apply to all models, or at the model level to override a specific model. This commonly applies to Ollama, vLLM, SGLang, and similar OpenAI-compatible servers.
|
|
@@ -87,7 +87,7 @@ If no app manifest (`atomic`, or legacy `pi`) is present, Atomic auto-discovers
|
|
|
87
87
|
|
|
88
88
|
Workflow files import `workflow` from `@bastani/atomic/workflows`, import `Type` from `typebox`, and export the definition returned by `workflow({ ... })`. TypeScript resolves the published `@bastani/atomic/workflows` specifier through the `@bastani/atomic` package.
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
Workflow files support `typebox`, `typebox/compile`, and `typebox/value`. Use these current imports even when an extension in the same package uses the host's additional schema aliases. See [Programmatic usage](/workflows/api-reference#programmatic-usage).
|
|
91
91
|
|
|
92
92
|
When a package manifest exists, declared resource arrays normally define what loads. Workflows are the exception: if `atomic.workflows` / legacy `pi.workflows` is omitted, Atomic still checks conventional `workflows/` and `workflow/` directories.
|
|
93
93
|
|
package/docs/providers.md
CHANGED
|
@@ -53,6 +53,10 @@ Atomic refreshes a stored OAuth token when fewer than **five minutes** of validi
|
|
|
53
53
|
|
|
54
54
|
Concurrent sessions sharing `auth.json`, including workflow stages and subagents, coordinate token refresh rather than rotating the same credential independently.
|
|
55
55
|
|
|
56
|
+
Running sessions pick up changes to `auth.json` made by another Atomic window, `atomic auth`, or another process's token refresh without restarting. This applies to extension-provided OAuth too. Refresh runs automatically through the shared credential store; a failed refresh is reported as an OAuth error rather than starting a new login flow. Sign in again with `/login <provider>` if the provider has revoked access.
|
|
57
|
+
|
|
58
|
+
If a chat request is rejected with HTTP 401 or an invalid/revoked-token error before any response content arrives, Atomic rereads credentials and retries once only if the effective credential changed. It does not repeatedly retry the same rejected token or replay a partially delivered response. Explicit request credentials and runtime API-key overrides still take precedence over the auth file.
|
|
59
|
+
|
|
56
60
|
### Verify Readiness Before a Session
|
|
57
61
|
|
|
58
62
|
Run `atomic auth check --provider <provider>` to verify the effective credential a provider would use without starting a session. You can pass `--model <model>` instead, including a `provider/model` ID, when that is the value your automation already has. The command prints `ready`, `not_ready`, or `invalid`; `--json` adds the resolved provider when one is found, credential type, and reason for a non-ready result.
|
|
@@ -82,7 +86,7 @@ OpenAI's image models (`openai-images`, such as `openai-images/gpt-image-2.5-fla
|
|
|
82
86
|
- Requires ChatGPT Plus or Pro subscription
|
|
83
87
|
- Officially endorsed by OpenAI: [Codex for OSS](https://developers.openai.com/community/codex-for-oss)
|
|
84
88
|
|
|
85
|
-
If the Codex backend reports that an OAuth/auth token was invalidated or revoked,
|
|
89
|
+
If the Codex backend reports that an OAuth/auth token was invalidated or revoked, Atomic first checks for credentials saved elsewhere as described above. If the rejection persists, run `/logout` and select **OpenAI ChatGPT Plus/Pro**, then run `/login`, authenticate that subscription again, and retry the request. Atomic displays these recovery steps with the provider error; it does not automatically delete the stored credential.
|
|
86
90
|
|
|
87
91
|
For Codex requests, `models.json` headers or per-request SDK headers can override `originator` and `User-Agent`. The transport still supplies the authenticated bearer token and ChatGPT account ID.
|
|
88
92
|
|
|
@@ -385,10 +389,10 @@ The providers below have additional setup, need additional settings, or can use
|
|
|
385
389
|
|
|
386
390
|
### NVIDIA NIM
|
|
387
391
|
|
|
388
|
-
NVIDIA's built-in default is `nvidia/nemotron-3-
|
|
392
|
+
NVIDIA's built-in default is `nvidia/nemotron-3.5-super-vl-120b-a12b`. Saved and explicit model choices still take precedence. To select this model explicitly:
|
|
389
393
|
|
|
390
394
|
```bash
|
|
391
|
-
atomic --provider nvidia --model nvidia/nemotron-3-
|
|
395
|
+
atomic --provider nvidia --model nvidia/nemotron-3.5-super-vl-120b-a12b
|
|
392
396
|
```
|
|
393
397
|
|
|
394
398
|
Use `--list-models` or `/model` to check the current catalog and replace a missing saved model. A catalog listing does not verify account access or serving availability.
|
|
@@ -562,8 +566,8 @@ export default {
|
|
|
562
566
|
extensionFactories: [
|
|
563
567
|
{
|
|
564
568
|
name: "cloudflare-gateway-binding",
|
|
565
|
-
factory: (pi) => {
|
|
566
|
-
pi.registerProvider("cloudflare-ai-gateway", {
|
|
569
|
+
factory: async (pi) => {
|
|
570
|
+
await pi.registerProvider("cloudflare-ai-gateway", {
|
|
567
571
|
// Placeholder credential: it marks the provider configured and becomes
|
|
568
572
|
// `cf-aig-authorization: Bearer cloudflare-gateway-binding`. On the plain
|
|
569
573
|
// binding fetch path, Cloudflare's gateway recognizes and strips it.
|
package/docs/quickstart.md
CHANGED
|
@@ -154,7 +154,8 @@ Sessions are saved automatically:
|
|
|
154
154
|
atomic -c # Continue most recent session
|
|
155
155
|
atomic -r # Browse previous sessions
|
|
156
156
|
atomic --name "my task" # Set session display name at startup
|
|
157
|
-
atomic --session <
|
|
157
|
+
atomic --session <id|prefix> # Open an exact ID or unique 8-hex UUID prefix
|
|
158
|
+
atomic --import <file> # Import a format-4 JSONL export
|
|
158
159
|
```
|
|
159
160
|
|
|
160
161
|
Inside Atomic, use `/resume`, `/new`, `/tree`, `/fork`, and `/clone` to manage sessions.
|
package/docs/reference/cli.md
CHANGED
|
@@ -133,13 +133,18 @@ When a print-mode turn correctly finishes by calling an opt-in terminating struc
|
|
|
133
133
|
|--------|-------------|
|
|
134
134
|
| `-c`, `--continue` | Continue the most recent session |
|
|
135
135
|
| `-r`, `--resume` | Browse and select a session |
|
|
136
|
-
| `--session <
|
|
136
|
+
| `--session <id\|prefix>` | Use an exact ID or unique 8-hex UUID prefix |
|
|
137
|
+
| `--import <file>` | Import a format-4 JSONL export into session storage |
|
|
137
138
|
| `--session-id <id>` | Use an exact project session ID; warn and create it when missing |
|
|
138
|
-
| `--fork <
|
|
139
|
+
| `--fork <id\|prefix>` | Fork an exact ID or unique 8-hex UUID prefix into a new session |
|
|
139
140
|
| `--session-dir <dir>` | Custom session storage directory |
|
|
141
|
+
| `--session-store <path>` | Select a SQLite session database; relative paths resolve from the working directory |
|
|
142
|
+
| `--session-prefix <prefix>` | Use a non-default table prefix with `--session-store` |
|
|
140
143
|
| `--name <name>`, `-n <name>` | Set the session display name |
|
|
141
144
|
| `--no-session` | Ephemeral mode; do not save |
|
|
142
145
|
|
|
146
|
+
See [Choosing a store](/sessions#choosing-a-store) for precedence, prefix rules, and conflicts.
|
|
147
|
+
|
|
143
148
|
## Tool Options
|
|
144
149
|
|
|
145
150
|
| Option | Description |
|
|
@@ -261,7 +266,6 @@ Every bash execution receives one execution-time snapshot of the active session.
|
|
|
261
266
|
| Atomic variable | Exact compatibility alias | Value |
|
|
262
267
|
|-----------------|---------------------------|-------|
|
|
263
268
|
| `ATOMIC_SESSION_ID` | `PI_SESSION_ID` | Active session ID |
|
|
264
|
-
| `ATOMIC_SESSION_FILE` | `PI_SESSION_FILE` | Active session JSONL path; omitted for unsaved sessions |
|
|
265
269
|
| `ATOMIC_PROVIDER` | `PI_PROVIDER` | Active model provider; omitted when no model is selected |
|
|
266
270
|
| `ATOMIC_MODEL` | `PI_MODEL` | Active model ID; omitted when no model is selected |
|
|
267
271
|
| `ATOMIC_REASONING_LEVEL` | `PI_REASONING_LEVEL` | Active reasoning level |
|
package/docs/rpc/protocol.md
CHANGED
|
@@ -157,7 +157,7 @@ Start a fresh session. Can be cancelled by a `session_before_switch` extension e
|
|
|
157
157
|
|
|
158
158
|
With optional parent session tracking:
|
|
159
159
|
```json
|
|
160
|
-
{"type": "new_session", "parentSession": "
|
|
160
|
+
{"type": "new_session", "parentSession": "parent-session-id"}
|
|
161
161
|
```
|
|
162
162
|
|
|
163
163
|
Response:
|
|
@@ -193,7 +193,7 @@ Response:
|
|
|
193
193
|
"isCompacting": false,
|
|
194
194
|
"steeringMode": "all",
|
|
195
195
|
"followUpMode": "one-at-a-time",
|
|
196
|
-
"
|
|
196
|
+
"sessionLocation": "/path/to/session.jsonl",
|
|
197
197
|
"sessionId": "abc123",
|
|
198
198
|
"sessionName": "my-feature-work",
|
|
199
199
|
"autoCompactionEnabled": true,
|
|
@@ -744,10 +744,16 @@ Response:
|
|
|
744
744
|
|
|
745
745
|
#### switch_session
|
|
746
746
|
|
|
747
|
-
Load a different session
|
|
747
|
+
Load a different session by its exact ID. Can be cancelled by a `session_before_switch` extension event handler. `sessionLocation` in `get_state` is optional display text, not a switch target.
|
|
748
|
+
|
|
749
|
+
```json
|
|
750
|
+
{"type": "switch_session", "sessionId": "abc123"}
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
When choosing a session from another project's JSONL store, pass `sessionDirectory` to bind the ID lookup to that directory. IDs may repeat in different project stores; an explicitly selected directory never falls back to another store. `cwdOverride` changes the resumed working directory, not the store used for lookup.
|
|
748
754
|
|
|
749
755
|
```json
|
|
750
|
-
{"type": "switch_session", "
|
|
756
|
+
{"type": "switch_session", "sessionId": "abc123", "sessionDirectory": "/path/to/project-sessions"}
|
|
751
757
|
```
|
|
752
758
|
|
|
753
759
|
Response:
|
package/docs/sdk/reference.md
CHANGED
|
@@ -555,12 +555,12 @@ const { session } = await createAgentSession({
|
|
|
555
555
|
|
|
556
556
|
// New persistent session
|
|
557
557
|
const { session: persisted } = await createAgentSession({
|
|
558
|
-
sessionManager: SessionManager.create(process.cwd()),
|
|
558
|
+
sessionManager: await SessionManager.create(process.cwd()),
|
|
559
559
|
});
|
|
560
560
|
|
|
561
561
|
// Continue most recent
|
|
562
562
|
const { session: continued, modelFallbackMessage } = await createAgentSession({
|
|
563
|
-
sessionManager: SessionManager.continueRecent(process.cwd()),
|
|
563
|
+
sessionManager: await SessionManager.continueRecent(process.cwd()),
|
|
564
564
|
});
|
|
565
565
|
if (modelFallbackMessage) {
|
|
566
566
|
console.log("Note:", modelFallbackMessage);
|
|
@@ -568,7 +568,7 @@ if (modelFallbackMessage) {
|
|
|
568
568
|
|
|
569
569
|
// Open specific file
|
|
570
570
|
const { session: opened } = await createAgentSession({
|
|
571
|
-
sessionManager: SessionManager.open("/path/to/session.jsonl"),
|
|
571
|
+
sessionManager: await SessionManager.open("/path/to/session.jsonl"),
|
|
572
572
|
});
|
|
573
573
|
|
|
574
574
|
// List sessions
|
|
@@ -592,14 +592,14 @@ const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionMan
|
|
|
592
592
|
const runtime = await createAgentSessionRuntime(createRuntime, {
|
|
593
593
|
cwd: process.cwd(),
|
|
594
594
|
agentDir: getAgentDir(),
|
|
595
|
-
sessionManager: SessionManager.create(process.cwd()),
|
|
595
|
+
sessionManager: await SessionManager.create(process.cwd()),
|
|
596
596
|
});
|
|
597
597
|
|
|
598
598
|
// Replace the active session with a fresh one
|
|
599
599
|
await runtime.newSession();
|
|
600
600
|
|
|
601
601
|
// Replace the active session with another saved session
|
|
602
|
-
await runtime.switchSession("
|
|
602
|
+
await runtime.switchSession("session-id");
|
|
603
603
|
|
|
604
604
|
// Replace the active session with a fork from a specific user entry
|
|
605
605
|
await runtime.fork("entry-id");
|
|
@@ -608,10 +608,12 @@ await runtime.fork("entry-id");
|
|
|
608
608
|
await runtime.fork("entry-id", { position: "at" });
|
|
609
609
|
```
|
|
610
610
|
|
|
611
|
+
`SessionManager.create()`, `open()`, `continueRecent()`, `forkFrom()`, and mutations are asynchronous. `SessionManager.inMemory()` returns an explicitly memory-backed manager synchronously. Await a mutation before reading its result or starting dependent work. A resolved write is committed; a failed write rejects with the store's typed error and leaves the failed entry unpublished. New persistent sessions store their header during creation and commit setup entries immediately. There is no `flush` method. Reads remain synchronous.
|
|
612
|
+
|
|
611
613
|
**SessionManager tree API:**
|
|
612
614
|
|
|
613
615
|
```typescript
|
|
614
|
-
const sm = SessionManager.open("/path/to/session.jsonl");
|
|
616
|
+
const sm = await SessionManager.open("/path/to/session.jsonl");
|
|
615
617
|
|
|
616
618
|
// Session listing
|
|
617
619
|
const currentProjectSessions = await SessionManager.list(process.cwd());
|
|
@@ -627,12 +629,12 @@ const children = sm.getChildren(id); // Direct children of entry
|
|
|
627
629
|
|
|
628
630
|
// Labels
|
|
629
631
|
const label = sm.getLabel(id); // Get label for entry
|
|
630
|
-
sm.appendLabelChange(id, "checkpoint"); // Set label
|
|
632
|
+
await sm.appendLabelChange(id, "checkpoint"); // Set label
|
|
631
633
|
|
|
632
634
|
// Branching
|
|
633
|
-
sm.branch(entryId); // Move leaf to earlier entry
|
|
634
|
-
sm.branchWithSummary(id, "Summary..."); // Branch with context summary
|
|
635
|
-
sm.createBranchedSession(leafId); // Extract path to new file
|
|
635
|
+
await sm.branch(entryId); // Move leaf to earlier entry
|
|
636
|
+
await sm.branchWithSummary(id, "Summary..."); // Branch with context summary
|
|
637
|
+
await sm.createBranchedSession(leafId); // Extract path to new file
|
|
636
638
|
```
|
|
637
639
|
|
|
638
640
|
> See [examples/sdk/11-sessions.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/11-sessions.ts) and [Session Format](/session-format)
|
|
@@ -770,7 +772,7 @@ const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionMan
|
|
|
770
772
|
const runtime = await createAgentSessionRuntime(createRuntime, {
|
|
771
773
|
cwd: process.cwd(),
|
|
772
774
|
agentDir: getAgentDir(),
|
|
773
|
-
sessionManager: SessionManager.create(process.cwd()),
|
|
775
|
+
sessionManager: await SessionManager.create(process.cwd()),
|
|
774
776
|
});
|
|
775
777
|
|
|
776
778
|
const mode = new InteractiveMode(runtime, {
|
|
@@ -810,7 +812,7 @@ const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionMan
|
|
|
810
812
|
const runtime = await createAgentSessionRuntime(createRuntime, {
|
|
811
813
|
cwd: process.cwd(),
|
|
812
814
|
agentDir: getAgentDir(),
|
|
813
|
-
sessionManager: SessionManager.create(process.cwd()),
|
|
815
|
+
sessionManager: await SessionManager.create(process.cwd()),
|
|
814
816
|
});
|
|
815
817
|
|
|
816
818
|
await runPrintMode(runtime, {
|
|
@@ -847,7 +849,7 @@ const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionMan
|
|
|
847
849
|
const runtime = await createAgentSessionRuntime(createRuntime, {
|
|
848
850
|
cwd: process.cwd(),
|
|
849
851
|
agentDir: getAgentDir(),
|
|
850
|
-
sessionManager: SessionManager.create(process.cwd()),
|
|
852
|
+
sessionManager: await SessionManager.create(process.cwd()),
|
|
851
853
|
});
|
|
852
854
|
|
|
853
855
|
await runRpcMode(runtime);
|
|
@@ -922,7 +924,7 @@ WorkflowRunNotResumableError
|
|
|
922
924
|
WorkflowStageNotFoundError
|
|
923
925
|
WorkflowStageAmbiguousError
|
|
924
926
|
WorkflowStageResumeUnsupportedError
|
|
925
|
-
|
|
927
|
+
WorkflowRunStorageError
|
|
926
928
|
WorkflowRunControlUnavailableError
|
|
927
929
|
|
|
928
930
|
// Tool factories
|
package/docs/sdk/web-server.md
CHANGED
|
@@ -20,7 +20,7 @@ npm install @bastani/atomic
|
|
|
20
20
|
|
|
21
21
|
Atomic needs Node.js 22.19 or newer and does not require dependency install scripts.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Dependency install scripts are not required. If your package manager reports blocked scripts, you do not need to enable them for Atomic.
|
|
24
24
|
|
|
25
25
|
## Keep Atomic out of the server bundle
|
|
26
26
|
|
|
@@ -267,7 +267,7 @@ export async function POST(request: Request): Promise<Response> {
|
|
|
267
267
|
const result = await run(reviewWorkflow, { topic }, {
|
|
268
268
|
cwd: WORKSPACE,
|
|
269
269
|
signal: abort.signal,
|
|
270
|
-
|
|
270
|
+
journal: { memory: true },
|
|
271
271
|
adapters: {
|
|
272
272
|
agentSession: createAgentSessionAdapter({ cwd: WORKSPACE, tools: ["read", "find", "search"] }),
|
|
273
273
|
},
|
|
@@ -298,14 +298,13 @@ export async function POST(request: Request): Promise<Response> {
|
|
|
298
298
|
|
|
299
299
|
`onStageSessionEvent` receives every stage's session events tagged with its run and stage ids, including stages that switch to a fallback model and stages of nested workflows. Aborting `signal`, here when the client disconnects, cancels the run.
|
|
300
300
|
|
|
301
|
-
### Choose workflow
|
|
301
|
+
### Choose workflow storage
|
|
302
302
|
|
|
303
|
-
By default, `run()`
|
|
303
|
+
By default, `run()` persists workflow state in the local SQLite journal at `~/.atomic/workflows/journal.sqlite`. Keep it on durable local storage when your service needs restart recovery. If several replicas must inspect or resume each other's runs, have them share a remote SQLite-compatible database through an adapter. See [Sharing storage across hosts](/storage#sharing-storage-across-hosts).
|
|
304
304
|
|
|
305
|
-
|
|
306
|
-
- **`durability: { mode: "durable", systemDatabaseUrl }`** stores state in a Postgres database you run, such as a hosted one, and Atomic doesn't start its own. Use it in deployments that need runs to survive restarts. `DBOS_SYSTEM_DATABASE_URL`, when set, overrides the URL.
|
|
305
|
+
Use `journal: { path: "/var/lib/my-service/workflows.sqlite" }` to select a file for a run, or `journal: { memory: true }` for process-local state that cannot survive a restart. Supply a caller-owned async SQLite facade as `{ database, prefix? }`; Atomic does not close it. You can also supply a `RunJournal` instance or `{ adapter, options?, secrets?, prefix? }` for a user-installed driver module.
|
|
307
306
|
|
|
308
|
-
|
|
307
|
+
`RunOpts.journal` overrides a non-empty `ATOMIC_WORKFLOW_JOURNAL_PATH`, then `workflows.journal`, then shared top-level `storage`, then the default file. Nearer settings replace whole selections. Relative settings paths resolve against Atomic home. Configuration or storage failures stop the run instead of switching to memory. See [Choosing the durable backend](/workflows/api-reference#choosing-the-durable-backend).
|
|
309
308
|
|
|
310
309
|
## Secure the endpoint
|
|
311
310
|
|