@bastani/atomic 0.9.38-alpha.1 → 0.9.38-alpha.11
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 +141 -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 +91 -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 +29515 -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 +63 -23
- 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/queued-input-admission.d.ts +20 -0
- package/dist/core/queued-input-admission.d.ts.map +1 -0
- package/dist/core/queued-input-admission.js +55 -0
- package/dist/core/queued-input-admission.js.map +1 -0
- 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/client/transports/streamable-http.js +9 -8
- package/dist/extensions/mcp/client/transports/streamable-http.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-actions.d.ts +4 -0
- package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-actions.js +104 -30
- package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-events.js +1 -0
- package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-state.d.ts +4 -0
- package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-state.js +4 -0
- package/dist/modes/interactive/components/chat-session-host-state.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 +14 -6
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +4 -0
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +6 -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-process-lifecycle.js +8 -2
- package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
- package/dist/modes/interactive/interactive-queueing.js +94 -70
- 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 +7 -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 +5 -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
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,147 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.38-alpha.11] - 2026-10-17
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed MCP Streamable HTTP servers that keep closing their GET event stream without sending event IDs causing endless reconnects. Only a new event ID or a stream that stays open resets the reconnect budget, so `reconnect.maxRetries` now bounds these reconnects ([#3729](https://github.com/bastani-inc/atomic/issues/3729)).
|
|
10
|
+
- Fixed queued steering and follow-up messages being reordered when an extension's async `input` hook takes longer for an earlier message than a later one. Each queue now keeps submission order. Extension commands, extension-sent messages, and messages sent from inside an `input` hook are still delivered immediately ([#3590](https://github.com/bastani-inc/atomic/issues/3590)).
|
|
11
|
+
- Fixed messages queued during compaction coming back out of order when the first one fails to send. The failed message stays at the front of the queue, followed by the rest of its batch and then anything you typed afterwards, both for **ALT+Up** retrieval and when they are sent again. This also applies to workflow stage chats ([#3664](https://github.com/bastani-inc/atomic/issues/3664)).
|
|
12
|
+
|
|
13
|
+
## [0.9.38-alpha.10] - 2026-10-17
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Fixed `/resume` and `--resume` filling up with "(no messages)" sessions. The picker now hides sessions that have no messages, name, or summary, including ones already saved by earlier versions. Opening such a session by ID still works.
|
|
18
|
+
|
|
19
|
+
## [0.9.38-alpha.9] - 2026-10-17
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Fixed slow interactive startup on machines with many sessions saved before the SQLite default, a follow-up to [#3721](https://github.com/bastani-inc/atomic/pull/3721). Opening a session by its exact ID, which the interactive engine does at launch, now looks up only that session instead of scanning `~/.atomic/agent/sessions`. `/resume`, `--resume`, and `--continue` list unconverted sessions larger than 32 KiB from their first message and most recent entries rather than parsing every file, so their message count is a lower bound and `/resume` search sees only that text until you open one, which still converts it in full.
|
|
24
|
+
|
|
25
|
+
## [0.9.38-alpha.8] - 2026-10-17
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- Subagent parallel task limits can now be raised above 50 with `parallel.maxTasks`. Configure `parallel.concurrency` and the new `parallel.runningCapacity` together to run more than four child turns per parent; defaults remain 50 tasks, concurrency 3, and running capacity 4.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- Fixed sessions saved before the SQLite default disappearing from `/resume` and failing to open with `--continue`, `--session`, or `--fork`. With the default store, sessions in `~/.atomic/agent/sessions`, including workflow stage sessions and early 0.9.38 alpha sessions that use a `timestamp` header, are listed alongside newer ones and copied into the database only when you open one, so startup does no extra work. Original files are left untouched, deleted sessions stay deleted, and explicitly selected stores do not show them.
|
|
34
|
+
|
|
35
|
+
## [0.9.38-alpha.7] - 2026-10-17
|
|
36
|
+
|
|
37
|
+
### Breaking Changes
|
|
38
|
+
|
|
39
|
+
- `RunOpts.journal.database` now takes an async `SqliteDatabase` facade, not a raw `node:sqlite` connection; use `wrapNodeSqliteDatabase` for an existing connection. Journal configuration failures now use `StorageConfigError` with `source`, `field`, and `reason` instead of `JournalConfigurationError`.
|
|
40
|
+
- Workflow stage forks now take `forkFromSessionId`, and stage resume, retained chat, and subagent forks resolve IDs within the selected session store. File paths are not session identities. Embedded chat hosts must use `await host.loadSession(store, sessionId)` instead of `loadSessionFile(path)`.
|
|
41
|
+
- Sessions now default to the local SQLite database shared with workflow runs, rather than JSONL files. JSONL must be selected explicitly. Removed the `sessionDir` setting without an alias; use `sessions.storage.dir` instead.
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- Added user-installed journal adapter modules, environment/file secret references, shared `storage` defaults, and `StorageProvider` for explicit session/journal opens with shared database lifetime. `RunOpts.journal.database` accepts an async SQLite facade; invalid selections raise `StorageConfigError` without falling back to memory.
|
|
46
|
+
- Added `sessions.storage` and SDK `sessionStore` to select SQLite, explicit JSONL or memory, a caller-owned database, or a user-installed adapter. Shared `storage` settings now configure sessions too; SDK, CLI and environment overrides take precedence without merging selections. Store-open failures raise typed errors rather than falling back to memory.
|
|
47
|
+
- Added `--session-store <path>` and `--session-prefix <prefix>` to select a SQLite session database from the CLI. SQLite resume hints and Herdr commands always include `--session-store` and include `--session-prefix` when non-default.
|
|
48
|
+
- Added a Models Configuration reference generated from the `models.json` schema, listing provider, model, model override, and compatibility fields ([#10790](https://github.com/earendil-works/pi/issues/10790)).
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- Changed the default NVIDIA model to `nvidia/nemotron-3.5-super-vl-120b-a12b` ([#10910](https://github.com/earendil-works/pi/pull/10910) by [@cv](https://github.com/cv)).
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- Session shutdown and replacement now wait for already-admitted extension session entries to finish saving before releasing their resources.
|
|
57
|
+
- Storage providers now preserve domain-adapter prefixes, make returned stores safe to close repeatedly, and retain typed opening errors when cleanup also fails.
|
|
58
|
+
- Fixed sessions written before format 4 disappearing from `/resume` and failing to open with `--continue`, `--session`, or `--fork`. Older supported sessions now upgrade automatically when opened; listing leaves their files unchanged.
|
|
59
|
+
- Fixed session stores closing during conversation replacement or remaining open after CLI shutdown and failed startup. Project storage settings now take effect on first trust approval, JSONL resume commands retain their directory, and SQLite sessions keep full URL-read artifacts.
|
|
60
|
+
- Fixed stopping a codemode script or reaching its deadline waiting for a non-interruptible built-in to return in the standalone binary ([#10748](https://github.com/earendil-works/pi/issues/10748)).
|
|
61
|
+
- Fixed repeated codemode timeouts or aborts accumulating surviving workers. At most two codemode workers may be alive across all sessions, and a cancelled worker counts against that limit until it actually exits ([#10748](https://github.com/earendil-works/pi/issues/10748)).
|
|
62
|
+
- Fixed sessions in symlinked project directories, including macOS temporary directories, being omitted from session lookup or mistaken for sessions from another project.
|
|
63
|
+
- Fixed compaction fallback and branch summaries failing with "generation hit the token cap" when reasoning used most of a fixed output budget. The provider now sizes summary output, and `compaction.reserveTokens` only controls when automatic compaction starts ([#9512](https://github.com/earendil-works/pi/issues/9512), [#9075](https://github.com/earendil-works/pi/issues/9075)).
|
|
64
|
+
- Fixed `models.schema.json` missing descriptions for provider and model fields, so editors now show hints for them ([#10790](https://github.com/earendil-works/pi/issues/10790)).
|
|
65
|
+
|
|
66
|
+
## [0.9.38-alpha.6] - 2026-10-16
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
|
|
70
|
+
- The storage adapter conformance suite now checks call-time binary binding inside transactions.
|
|
71
|
+
- Node SQLite facade transactions opened on the same file now queue asynchronously within a process, including when paths use symlinks, instead of stalling the event loop and failing with a locked database.
|
|
72
|
+
|
|
73
|
+
### Breaking Changes
|
|
74
|
+
|
|
75
|
+
- Removed the workflow `durability` option, `WorkflowDurability`, and `WorkflowDurabilityRequiredError`. Use `RunOpts.journal` to select storage or isolate runs, and handle typed journal errors when storage is unavailable.
|
|
76
|
+
- Removed `InMemoryDurableBackend` and `createInMemoryTestBackend`. Use `JournalDurableBackend` over `MemoryRunJournal` for an explicitly in-memory backend. Removed the `legacyRecovery` workflow-tool argument and remaining `workflows.durability` settings.
|
|
77
|
+
- Removed the `@bastani/workflows` import alias; import workflow APIs from `@bastani/atomic/workflows`.
|
|
78
|
+
- Custom `RunJournal` implementations must provide atomic `deleteOwnedRun(lease)`, and invocation records require `invocationFingerprint`.
|
|
79
|
+
- `SessionManager.create`, `open`, `continueRecent`, `forkFrom`, and mutations now return promises. Await session writes, branch changes, labels, names, and model/thinking changes before reading their results or continuing dependent work. Extension `pi.appendEntry`, `pi.setSessionName`, `pi.setLabel`, and `pi.setThinkingLevel` must also be awaited. Persistent session creation writes its header immediately, and setup entries commit without waiting for the first message. A failed write rejects that call with its typed storage error without publishing the failed entry; there is no `flush` API. Explicit in-memory sessions remain available synchronously through `SessionManager.inMemory()`.
|
|
80
|
+
- Session headers use the format-4 fields `createdAt` and `parentSessionId`, including the header returned by `SessionManager.getHeader()`. The `timestamp` and `parentSession` header fields are removed.
|
|
81
|
+
- Extension provider registration and removal now return promises too: await `pi.registerProvider`, `pi.registerProviderAlias`, and `pi.unregisterProvider` before dependent model or session work.
|
|
82
|
+
- Workflow SQLite journals now use `SqlRunJournal` with async initialization and `wf_` table names. Use `await openSqlRunJournal(pathOrDatabase?)` or `await SqlRunJournal.open(database, { prefix })`, and await `resolveRunJournal`. Earlier unreleased bare tables are not read or migrated. Workflow `StorageUnavailableError` now provides `adapter`, `location`, and `cause` instead of `path`.
|
|
83
|
+
- Session selection now uses IDs instead of file paths: `--session` and `--fork` accept exact IDs or unique eight-hex UUID prefixes; use `--import <file>` for format-4 JSONL exports. Extension `switchSession` takes an ID, lifecycle events use `previousSessionId` and `targetSessionId`, and RPC `switch_session` takes `sessionId`. RPC state reports `sessionLocation` for optional display instead of `sessionFile`. Shell tools no longer expose `ATOMIC_SESSION_FILE` or `PI_SESSION_FILE`; use `ATOMIC_SESSION_ID` or `PI_SESSION_ID`.
|
|
84
|
+
|
|
85
|
+
### Added
|
|
86
|
+
|
|
87
|
+
- Added the `workflows.journal.path` and `workflows.journal.memory` settings, plus SDK `RunOpts.journal` for a file, caller-owned SQLite connection, explicit memory journal, or supplied journal. TUI, CLI, background, and SDK runs use the selected journal. Relative settings paths resolve against the Atomic home directory.
|
|
88
|
+
- Added `ctx.sessionSignal` so extension commands can close long-running resources when reload or shutdown begins, before admitted work is drained. Custom UI is now dismissed automatically at that boundary while preserving caller-signal cancellation.
|
|
89
|
+
- Added `wrapNodeSqliteDatabase(connection)` for caller-owned connections and facade-backed workflow journals that can share a database with the session store or use a user-supplied SQLite-compatible driver.
|
|
90
|
+
|
|
91
|
+
### Fixed
|
|
92
|
+
|
|
93
|
+
- Fixed overlapping prompts duplicating deferred shell results in session history, and retries replaying results that were already saved.
|
|
94
|
+
- Fixed new and branched sessions becoming unwritable when a resumed session uses a different destination session directory.
|
|
95
|
+
- Fixed tree label edits appearing saved before persistence completed. Failed saves now display the error and keep the editor open for retry.
|
|
96
|
+
- Fixed failed custom-message writes dropping accepted pending and next-turn messages. Retries now retain the uncommitted messages in order, and overlapping drains do not duplicate saved messages.
|
|
97
|
+
- Fixed overlapping model, thinking-level and session-name changes losing later choices. Model and thinking cycles now advance once per request, and saved defaults retain the last choice.
|
|
98
|
+
- Fixed history refresh failures after a turn escaping error handling. The interactive engine now displays the failure without an unhandled rejection, and label edits await their saved history before reporting success.
|
|
99
|
+
- Renaming the active session in the selector writes through its active manager, so later session writes retain the correct sequence.
|
|
100
|
+
- Session pickers keep selection and rename bound to the selected project's store when IDs repeat across projects. Imported empty session IDs remain persistent across resume and restart instead of starting a new conversation.
|
|
101
|
+
- Fixed Alt+Y restoring stale text and moving the cursor before the start of the scoped-model search after clearing it with Ctrl+C ([#3668](https://github.com/bastani-inc/atomic/issues/3668)).
|
|
102
|
+
- Fixed MCP tools with colliding generated names overwriting another tool's owner. Generated names now avoid names already in use or reserved by other tools ([#3667](https://github.com/bastani-inc/atomic/issues/3667)).
|
|
103
|
+
- Fixed extension input dialogs ignoring the supplied placeholder. The hint now appears while the input is empty without becoming submitted text ([#3672](https://github.com/bastani-inc/atomic/issues/3672)).
|
|
104
|
+
|
|
105
|
+
## [0.9.38-alpha.4] - 2026-10-16
|
|
106
|
+
|
|
107
|
+
### Breaking Changes
|
|
108
|
+
|
|
109
|
+
- Workflow discovery now uses only `.atomic` default roots, and discovered modules use `@bastani/atomic/workflows` with `typebox`. Removed deprecated workflow API stubs, separate reasoning authoring fields, old stage-target and X10 mouse input formats, and replay without current topology, replay keys, or child exit tags. Use model strings such as `provider/model:high` for reasoning effort. Workflow results, inspection details and status summaries always include their tool collections. Queued stage delivery requires persisted admission order.
|
|
110
|
+
- Workflow heartbeat records require their original launch cadence instead of inheriting the current definition when cadence is missing. Configuration load results always include their global and project source fields, using `null` for absent or invalid sources.
|
|
111
|
+
- Workflow run snapshots require `toolNodes`, and inline forms require injected keybindings without obsolete submit-choice state. Removed the ignored workflow text-truncation `preserveAnsi` argument; ANSI-aware rendering is unchanged.
|
|
112
|
+
- Workflow runs now persist only in the local SQLite journal. Journal initialization failures throw `StorageUnavailableError` instead of continuing without durable storage. Postgres connection settings (`workflows.durability.systemDatabaseUrl` and `workflows.durability.poolSize`) and `DBOS_SYSTEM_DATABASE_URL`, `ATOMIC_POSTGRES_*`, and `PG*` environment variables no longer configure workflow storage.
|
|
113
|
+
- Removed automatic session-format migrations and the `migrateSessionEntries` export. Reading session files no longer appends missing newlines.
|
|
114
|
+
|
|
115
|
+
### Added
|
|
116
|
+
|
|
117
|
+
- Added the async SQLite facade and node adapter through `@bastani/atomic/storage`, with typed storage errors, prefix and schema-version helpers, and an adapter conformance suite in `@bastani/atomic/storage/testing`. String bindings containing NUL are rejected with `StorageInvalidTextError`; zero bytes remain supported in binary values.
|
|
118
|
+
- Added the `workflows.journal.path` and `workflows.journal.memory` settings schema, plus SDK `RunOpts.journal` types for a file, caller-owned SQLite connection, explicit memory journal, or supplied journal. Journal selection is exposed through `resolveRunJournal`; runtime wiring is deferred.
|
|
119
|
+
|
|
120
|
+
### Fixed
|
|
121
|
+
|
|
122
|
+
- Fixed Xiaomi MiMo and all regional Token Plan providers defaulting to a deprecated model omitted from the generated catalog. They now select MiMo V2.6 Pro (`mimo-v2.6-pro`) by default.
|
|
123
|
+
- Fixed failed prompts sent after compaction dropping messages queued while the prompt was pending. Later steering, follow-up, and compaction messages now survive recovery without duplicating the original batch ([#3654](https://github.com/bastani-inc/atomic/issues/3654)).
|
|
124
|
+
- Fixed compaction file lists omitting hashline edits, including multi-file edits and nested tool calls. Edited files now appear under modified files rather than read-only files ([#3656](https://github.com/bastani-inc/atomic/issues/3656)).
|
|
125
|
+
- Fixed reordering filtered scoped models crashing or selecting a different model instead of saving the new order ([#3657](https://github.com/bastani-inc/atomic/issues/3657)).
|
|
126
|
+
|
|
127
|
+
### Removed
|
|
128
|
+
|
|
129
|
+
- Removed DBOS, embedded Postgres, their bundled runtimes and native process ownership, and the non-durable storage fallback. Server-specific admission, recovery, outage handling, and deferred persistence queues are gone; workflow pause, resume, quit, answer, and checkpoint replay remain supported.
|
|
130
|
+
|
|
131
|
+
## [0.9.38-alpha.3] - 2026-10-15
|
|
132
|
+
|
|
133
|
+
### Fixed
|
|
134
|
+
|
|
135
|
+
- Fixed the OSC 7501 terminal program status showing `working` instead of `blocked` while the main chat waits on an `ask_user_question` prompt. It now reports `blocked` (`kind=question`) while the questionnaire is open and returns to `working` after you answer, matching workflow-stage prompts ([#3616](https://github.com/bastani-inc/atomic/issues/3616)).
|
|
136
|
+
- Fixed workflow approval gates (a run-level `ctx.ui.confirm`) reporting OSC 7501 `blocked` with `kind=question`. They now report `kind=permission`, so terminals can tell an approval apart from a typed question ([#3618](https://github.com/bastani-inc/atomic/issues/3618)).
|
|
137
|
+
- Fixed paused and cancelled workflow runs reporting OSC 7501 `done`. A paused or cancelled run now reports `idle`, and `done` is reserved for a successful completion ([#3617](https://github.com/bastani-inc/atomic/issues/3617)).
|
|
138
|
+
- Fixed the OSC 7501 status disappearing mid-run in terminals that drop it when transcript rendering emits a prompt mark. The reporter now re-sends its current status after the workflow graph and stage-chat overlay render, restoring the status during a run ([#3615](https://github.com/bastani-inc/atomic/issues/3615)).
|
|
139
|
+
|
|
140
|
+
## [0.9.38-alpha.2] - 2026-10-15
|
|
141
|
+
|
|
142
|
+
### Fixed
|
|
143
|
+
|
|
144
|
+
- Fixed running sessions retaining stale `auth.json` credentials and login status after another window signs in, logs out, or refreshes a token, including extension OAuth providers. Chat requests rejected for invalid credentials reread the store and retry once when newer credentials are available ([#3620](https://github.com/bastani-inc/atomic/issues/3620)).
|
|
145
|
+
|
|
5
146
|
## [0.9.38-alpha.1] - 2026-10-15
|
|
6
147
|
|
|
7
148
|
### Added
|
package/README.md
CHANGED
|
@@ -244,10 +244,11 @@ Sessions auto-save to `~/.atomic/agent/sessions/` organized by working directory
|
|
|
244
244
|
atomic -c # Continue most recent session
|
|
245
245
|
atomic -r # Browse and select from past sessions
|
|
246
246
|
atomic --no-session # Ephemeral mode (don't save)
|
|
247
|
-
atomic --session <
|
|
247
|
+
atomic --session <id|prefix> # Use an exact ID or unique 8-hex UUID prefix
|
|
248
|
+
atomic --import <file> # Import a format-4 JSONL export into session storage
|
|
248
249
|
atomic --session-id <id> # Use/create an exact project-local session ID
|
|
249
250
|
atomic --name "Refactor" # Set the session display name
|
|
250
|
-
atomic --fork <
|
|
251
|
+
atomic --fork <id|prefix> # Fork an exact ID or unique 8-hex UUID prefix
|
|
251
252
|
```
|
|
252
253
|
|
|
253
254
|
Use `/session` in interactive mode to see the current session ID before reusing it with `--session <id>`, `--session-id <id>`, or `--fork <id>`.
|
|
@@ -266,7 +267,7 @@ Use `/session` in interactive mode to see the current session ID before reusing
|
|
|
266
267
|
|
|
267
268
|
**`/clone`** - Duplicate the current active branch into a new session file at the current position. The new session keeps the full active-path history and opens with an empty editor.
|
|
268
269
|
|
|
269
|
-
**`--fork <
|
|
270
|
+
**`--fork <id|prefix>`** copies the selected session into a new session in the current project. Use an exact session ID or a unique eight-character hexadecimal UUID prefix.
|
|
270
271
|
|
|
271
272
|
### Compaction
|
|
272
273
|
|
|
@@ -591,9 +592,10 @@ cat README.md | atomic -p "Summarize this text"
|
|
|
591
592
|
|--------|-------------|
|
|
592
593
|
| `-c`, `--continue` | Continue most recent session |
|
|
593
594
|
| `-r`, `--resume` | Browse and select session |
|
|
594
|
-
| `--session <
|
|
595
|
+
| `--session <id\|prefix>` | Use an exact ID or unique 8-hex UUID prefix |
|
|
596
|
+
| `--import <file>` | Import a format-4 JSONL export into session storage |
|
|
595
597
|
| `--session-id <id>` | Use an exact project session ID; warn and create it when missing |
|
|
596
|
-
| `--fork <
|
|
598
|
+
| `--fork <id\|prefix>` | Fork an exact ID or unique 8-hex UUID prefix |
|
|
597
599
|
| `--session-dir <dir>` | Custom session storage directory |
|
|
598
600
|
| `--name <name>`, `-n <name>` | Set the session display name |
|
|
599
601
|
| `--no-session` | Ephemeral mode (don't save) |
|
|
@@ -707,7 +709,7 @@ atomic --thinking high "Solve this complex problem"
|
|
|
707
709
|
| `PI_CACHE_RETENTION` | Provider/upstream-specific prompt-cache retention knob; set to `long` where supported. This is not an `ATOMIC_*` alias and has no Atomic-prefixed equivalent. |
|
|
708
710
|
| `VISUAL`, `EDITOR` | External editor for CTRL+G |
|
|
709
711
|
|
|
710
|
-
Bash and PowerShell commands
|
|
712
|
+
Bash and PowerShell commands receive an execution-time session snapshot through `ATOMIC_SESSION_ID`, `ATOMIC_PROVIDER`, `ATOMIC_MODEL`, and `ATOMIC_REASONING_LEVEL`. The `PI_SESSION_ID`, `PI_PROVIDER`, `PI_MODEL`, and `PI_REASONING_LEVEL` aliases carry identical values. Session file variables are not exposed. Unrelated inherited or caller-supplied environment variables are preserved.
|
|
711
713
|
|
|
712
714
|
---
|
|
713
715
|
|
|
@@ -4,6 +4,21 @@ All notable changes to the `pi-intercom` extension will be documented in this fi
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.38-alpha.6] - 2026-10-16
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Intercom tools now await session records before reporting success or clearing pending replies. Failed commits reach the existing error handling, including local subagent relay diagnostics.
|
|
12
|
+
- Session-list and compose overlays now close when reload or shutdown begins instead of keeping their commands pending.
|
|
13
|
+
- Compose sends already in progress now finish delivery and save exactly one sent-message record even when reload or shutdown dismisses the overlay.
|
|
14
|
+
- Fixed retries of answered Intercom asks reopening pending reply routes and allowing a second distinct reply ([#3666](https://github.com/bastani-inc/atomic/issues/3666)).
|
|
15
|
+
|
|
16
|
+
## [0.9.38-alpha.5] - 2026-10-16
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- Fixed queued workflow instructions being blocked by broker warm-up during model fallback. Stored instructions are admitted before connecting, including sticky messages for replacement sessions ([#3628](https://github.com/bastani-inc/atomic/issues/3628)).
|
|
21
|
+
|
|
7
22
|
## [0.9.28] - 2026-10-08
|
|
8
23
|
|
|
9
24
|
### Fixed
|
|
@@ -974,7 +974,8 @@ class IntercomBroker {
|
|
|
974
974
|
});
|
|
975
975
|
return;
|
|
976
976
|
}
|
|
977
|
-
this.
|
|
977
|
+
if (!this.deliveredMessages.isQuestionAnswered(pending.messageId))
|
|
978
|
+
this.pendingQuestions.record(from.info.id, target.info.id, pending.messageId);
|
|
978
979
|
if (pending.resolveReplyTarget === true && pending.attemptId !== undefined)
|
|
979
980
|
writeMessageIfOpen(pending.senderSocket, { type: "question_target", messageId: pending.messageId, attemptId: pending.attemptId, sessionId: target.info.id });
|
|
980
981
|
}
|
|
@@ -1028,7 +1029,8 @@ class IntercomBroker {
|
|
|
1028
1029
|
});
|
|
1029
1030
|
return;
|
|
1030
1031
|
}
|
|
1031
|
-
this.
|
|
1032
|
+
if (!this.deliveredMessages.isQuestionAnswered(pending.messageId))
|
|
1033
|
+
this.pendingQuestions.record(from.info.id, target.info.id, pending.messageId);
|
|
1032
1034
|
if (pending.resolveReplyTarget === true && pending.attemptId !== undefined)
|
|
1033
1035
|
writeMessageIfOpen(pending.senderSocket, { type: "question_target", messageId: pending.messageId, attemptId: pending.attemptId, sessionId: target.info.id });
|
|
1034
1036
|
}
|
|
@@ -1091,8 +1093,8 @@ class IntercomBroker {
|
|
|
1091
1093
|
if (pending.message.expectsReply === true) {
|
|
1092
1094
|
this.pendingQuestions.record(from.info.id, target.info.id, pending.messageId);
|
|
1093
1095
|
}
|
|
1094
|
-
if (pending.message.replyTo !== undefined) {
|
|
1095
|
-
this.
|
|
1096
|
+
if (pending.message.replyTo !== undefined && this.pendingQuestions.clearReply(from.info.id, target.info.id, pending.message.replyTo)) {
|
|
1097
|
+
this.deliveredMessages.settleQuestion(pending.message.replyTo);
|
|
1096
1098
|
}
|
|
1097
1099
|
writeMessageIfOpen(pending.senderSocket, {
|
|
1098
1100
|
type: "delivered",
|
|
@@ -33,6 +33,7 @@ interface DeliveredMessage {
|
|
|
33
33
|
signature: string;
|
|
34
34
|
targetIdentity?: string;
|
|
35
35
|
questionRoute?: DeliveredQuestionRoute;
|
|
36
|
+
questionAnswered?: boolean;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
interface SqliteStatement {
|
|
@@ -69,7 +70,8 @@ function parseStoredMessage(row: Record<string, unknown> | undefined): Delivered
|
|
|
69
70
|
typeof row.delivered_at !== "number" ||
|
|
70
71
|
!Number.isSafeInteger(row.delivered_at) ||
|
|
71
72
|
row.delivered_at < 0 ||
|
|
72
|
-
(row.target_identity !== null && !validStoredString(row.target_identity))
|
|
73
|
+
(row.target_identity !== null && !validStoredString(row.target_identity)) ||
|
|
74
|
+
(row.question_answered !== 0 && row.question_answered !== 1)
|
|
73
75
|
) {
|
|
74
76
|
return "invalid";
|
|
75
77
|
}
|
|
@@ -80,6 +82,7 @@ function parseStoredMessage(row: Record<string, unknown> | undefined): Delivered
|
|
|
80
82
|
state: row.state,
|
|
81
83
|
deliveredAt: row.delivered_at,
|
|
82
84
|
signature: row.signature,
|
|
85
|
+
questionAnswered: row.question_answered === 1,
|
|
83
86
|
...(typeof row.target_identity === "string" ? { targetIdentity: row.target_identity } : {}),
|
|
84
87
|
...(hasQuestionRoute
|
|
85
88
|
? {
|
|
@@ -170,6 +173,17 @@ export class DeliveredMessageCache {
|
|
|
170
173
|
database.exec("PRAGMA journal_mode = WAL");
|
|
171
174
|
database.exec("PRAGMA synchronous = FULL");
|
|
172
175
|
database.exec("PRAGMA trusted_schema = OFF");
|
|
176
|
+
database.exec("BEGIN IMMEDIATE");
|
|
177
|
+
const layout = database
|
|
178
|
+
.prepare(`
|
|
179
|
+
SELECT
|
|
180
|
+
(SELECT count(*) FROM pragma_table_info('delivered_messages')) AS columns,
|
|
181
|
+
(SELECT count(*) FROM pragma_table_info('delivered_messages') WHERE name = 'question_answered') AS answered
|
|
182
|
+
`)
|
|
183
|
+
.get() as { columns: number; answered: number } | undefined;
|
|
184
|
+
if (layout !== undefined && layout.columns > 0 && layout.answered === 0) {
|
|
185
|
+
database.exec("DROP TABLE delivered_messages");
|
|
186
|
+
}
|
|
173
187
|
database.exec(`
|
|
174
188
|
CREATE TABLE IF NOT EXISTS delivered_messages (
|
|
175
189
|
state TEXT NOT NULL CHECK (state IN ('reserved', 'accepted')),
|
|
@@ -178,12 +192,16 @@ export class DeliveredMessageCache {
|
|
|
178
192
|
delivered_at INTEGER NOT NULL,
|
|
179
193
|
target_identity TEXT,
|
|
180
194
|
question_target_session_id TEXT,
|
|
181
|
-
question_sender_group_identity TEXT
|
|
195
|
+
question_sender_group_identity TEXT,
|
|
196
|
+
question_answered INTEGER NOT NULL DEFAULT 0 CHECK (question_answered IN (0, 1))
|
|
182
197
|
) STRICT;
|
|
183
198
|
CREATE INDEX IF NOT EXISTS delivered_messages_age
|
|
184
199
|
ON delivered_messages(delivered_at);
|
|
185
200
|
`);
|
|
186
|
-
database.
|
|
201
|
+
database.exec("COMMIT");
|
|
202
|
+
database
|
|
203
|
+
.prepare("SELECT state, signature, delivered_at, target_identity, question_answered FROM delivered_messages LIMIT 0")
|
|
204
|
+
.get();
|
|
187
205
|
restrictExistingAuthorityArtifacts(storagePath, getDeliveredMessageAuthorityKeyPath(storagePath));
|
|
188
206
|
} catch {
|
|
189
207
|
database?.close();
|
|
@@ -236,6 +254,34 @@ export class DeliveredMessageCache {
|
|
|
236
254
|
return delivered.questionRoute.targetSessionId;
|
|
237
255
|
}
|
|
238
256
|
|
|
257
|
+
isQuestionAnswered(messageId: string): boolean {
|
|
258
|
+
if (this.storageInvalid) return true;
|
|
259
|
+
const delivered = this.read(messageId);
|
|
260
|
+
return delivered === "invalid" || delivered?.questionAnswered === true;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
settleQuestion(messageId: string): void {
|
|
264
|
+
try {
|
|
265
|
+
const delivered = this.read(messageId);
|
|
266
|
+
if (
|
|
267
|
+
delivered === undefined ||
|
|
268
|
+
delivered === "invalid" ||
|
|
269
|
+
delivered.state !== "accepted" ||
|
|
270
|
+
delivered.questionRoute === undefined
|
|
271
|
+
) return;
|
|
272
|
+
if (this.database === undefined) {
|
|
273
|
+
delivered.questionAnswered = true;
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
this.database
|
|
277
|
+
.prepare("UPDATE delivered_messages SET question_answered = 1 WHERE message_id = ?")
|
|
278
|
+
.run(messageId);
|
|
279
|
+
this.restrictArtifacts();
|
|
280
|
+
} catch {
|
|
281
|
+
this.storageInvalid = true;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
239
285
|
record(
|
|
240
286
|
messageId: string,
|
|
241
287
|
signature: string,
|
|
@@ -470,7 +516,7 @@ export class DeliveredMessageCache {
|
|
|
470
516
|
const row = this.database
|
|
471
517
|
?.prepare(`
|
|
472
518
|
SELECT state, signature, delivered_at, target_identity,
|
|
473
|
-
question_target_session_id, question_sender_group_identity
|
|
519
|
+
question_target_session_id, question_sender_group_identity, question_answered
|
|
474
520
|
FROM delivered_messages WHERE message_id = ?
|
|
475
521
|
`)
|
|
476
522
|
.get(messageId);
|
|
@@ -400,7 +400,8 @@ export function handleBrokerSend(
|
|
|
400
400
|
});
|
|
401
401
|
return;
|
|
402
402
|
}
|
|
403
|
-
|
|
403
|
+
if (!deliveredMessages.isQuestionAnswered(message.id))
|
|
404
|
+
pendingQuestions.record(fromSession.info.id, target.info.id, message.id);
|
|
404
405
|
if (clientMessage.resolveReplyTarget === true && attemptId !== undefined)
|
|
405
406
|
write(socket, { type: "question_target", messageId: message.id, attemptId, sessionId: target.info.id });
|
|
406
407
|
}
|
|
@@ -493,7 +494,8 @@ export function handleBrokerSend(
|
|
|
493
494
|
});
|
|
494
495
|
return;
|
|
495
496
|
}
|
|
496
|
-
if (message.expectsReply === true
|
|
497
|
+
if (message.expectsReply === true && !deliveredMessages.isQuestionAnswered(message.id))
|
|
498
|
+
pendingQuestions.record(fromSession.info.id, target.info.id, message.id);
|
|
497
499
|
if (message.expectsReply === true && clientMessage.resolveReplyTarget === true && attemptId !== undefined)
|
|
498
500
|
write(socket, { type: "question_target", messageId: message.id, attemptId, sessionId: target.info.id });
|
|
499
501
|
write(socket, { type: "delivered", messageId: message.id, attemptId });
|
|
@@ -552,8 +554,8 @@ export function handleBrokerSend(
|
|
|
552
554
|
if (message.expectsReply === true) {
|
|
553
555
|
pendingQuestions.record(fromSession.info.id, target.info.id, message.id);
|
|
554
556
|
}
|
|
555
|
-
if (message.replyTo !== undefined) {
|
|
556
|
-
|
|
557
|
+
if (message.replyTo !== undefined && pendingQuestions.clearReply(fromSession.info.id, target.info.id, message.replyTo)) {
|
|
558
|
+
deliveredMessages.settleQuestion(message.replyTo);
|
|
557
559
|
}
|
|
558
560
|
if (supervisorSend) supervisorCache.record(message.id, fromSession.info.id, target.info.id);
|
|
559
561
|
write(socket, { type: "delivered", messageId: message.id, attemptId });
|