@bastani/atomic 0.9.16-alpha.3 → 0.9.16-alpha.5
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 +62 -0
- package/README.md +11 -6
- package/dist/builtin/intercom/CHANGELOG.md +15 -0
- package/dist/builtin/intercom/README.md +6 -4
- package/dist/builtin/intercom/broker/broker.ts +34 -8
- package/dist/builtin/intercom/broker/client.ts +13 -0
- package/dist/builtin/intercom/broker/pending-question-index.ts +50 -0
- package/dist/builtin/intercom/broker/send-handler.ts +8 -0
- package/dist/builtin/intercom/index.bundle.mjs +2359 -1466
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/intercom/skills/intercom/SKILL.md +20 -19
- package/dist/builtin/mcp/index.bundle.mjs +2132 -1321
- package/dist/builtin/mcp/package.json +2 -2
- package/dist/builtin/subagents/CHANGELOG.md +11 -0
- package/dist/builtin/subagents/README.md +3 -3
- package/dist/builtin/subagents/package.json +3 -3
- package/dist/builtin/subagents/skills/subagent/SKILL.md +4 -4
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +3059 -1861
- package/dist/builtin/web-access/index.bundle.mjs +2113 -1302
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +20 -0
- package/dist/builtin/workflows/README.md +1 -1
- package/dist/builtin/workflows/builtin/goal-ledger.ts +54 -10
- package/dist/builtin/workflows/builtin/goal-runner.ts +57 -12
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +13948 -12304
- package/dist/builtin/workflows/src/index.bundle.mjs +2642 -1526
- package/dist/bun/split-loader.js +2 -1
- package/dist/bun/split-loader.js.map +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +6 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js +2 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/config-package-identity.d.ts +22 -0
- package/dist/config-package-identity.d.ts.map +1 -0
- package/dist/config-package-identity.js +74 -0
- package/dist/config-package-identity.js.map +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -11
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-auto-compaction.js +64 -28
- package/dist/core/agent-session-auto-compaction.js.map +1 -1
- package/dist/core/agent-session-compaction.d.ts +2 -0
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +25 -5
- 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 +12 -0
- 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 +2 -0
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-export.d.ts +3 -1
- package/dist/core/agent-session-export.d.ts.map +1 -1
- package/dist/core/agent-session-export.js +22 -2
- package/dist/core/agent-session-export.js.map +1 -1
- package/dist/core/agent-session-message-queue.d.ts +3 -0
- package/dist/core/agent-session-message-queue.d.ts.map +1 -1
- package/dist/core/agent-session-message-queue.js +10 -0
- package/dist/core/agent-session-message-queue.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +15 -9
- 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 +8 -13
- package/dist/core/agent-session-models.d.ts.map +1 -1
- package/dist/core/agent-session-models.js +53 -19
- package/dist/core/agent-session-models.js.map +1 -1
- package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-post-tool-compaction.js +12 -0
- package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +3 -1
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-tool-registry.js +3 -3
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session-transfer.d.ts.map +1 -1
- package/dist/core/agent-session-transfer.js +1 -0
- package/dist/core/agent-session-transfer.js.map +1 -1
- package/dist/core/agent-session-tree.d.ts.map +1 -1
- package/dist/core/agent-session-tree.js +1 -1
- package/dist/core/agent-session-tree.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +3 -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/agent-session.d.ts +2 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage-backends.d.ts.map +1 -1
- package/dist/core/auth-storage-backends.js +10 -6
- package/dist/core/auth-storage-backends.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +4 -3
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/builtin-packages.d.ts.map +1 -1
- package/dist/core/builtin-packages.js +2 -1
- package/dist/core/builtin-packages.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +6 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction-runner.d.ts +3 -1
- package/dist/core/compaction/compaction-runner.d.ts.map +1 -1
- package/dist/core/compaction/compaction-runner.js +30 -4
- package/dist/core/compaction/compaction-runner.js.map +1 -1
- package/dist/core/compaction/compaction-types.d.ts +3 -1
- package/dist/core/compaction/compaction-types.d.ts.map +1 -1
- package/dist/core/compaction/compaction-types.js.map +1 -1
- package/dist/core/compaction/range-planner.d.ts +3 -1
- package/dist/core/compaction/range-planner.d.ts.map +1 -1
- package/dist/core/compaction/range-planner.js +11 -1
- package/dist/core/compaction/range-planner.js.map +1 -1
- package/dist/core/compaction/session-summarization.d.ts.map +1 -1
- package/dist/core/compaction/session-summarization.js +6 -0
- package/dist/core/compaction/session-summarization.js.map +1 -1
- package/dist/core/extensions/api-types.d.ts +8 -3
- 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/index.d.ts +2 -2
- 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 +5 -1
- package/dist/core/extensions/loader-api.d.ts.map +1 -1
- package/dist/core/extensions/loader-api.js +124 -36
- package/dist/core/extensions/loader-api.js.map +1 -1
- package/dist/core/extensions/loader-core.d.ts.map +1 -1
- package/dist/core/extensions/loader-core.js +18 -4
- package/dist/core/extensions/loader-core.js.map +1 -1
- package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
- package/dist/core/extensions/loader-runtime.js +10 -2
- package/dist/core/extensions/loader-runtime.js.map +1 -1
- package/dist/core/extensions/session-events.d.ts +11 -2
- 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/tool-events.d.ts +13 -3
- package/dist/core/extensions/tool-events.d.ts.map +1 -1
- package/dist/core/extensions/tool-events.js +3 -0
- package/dist/core/extensions/tool-events.js.map +1 -1
- package/dist/core/extensions/types.d.ts +1 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/ui-types.d.ts +2 -2
- package/dist/core/extensions/ui-types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +1 -1
- package/dist/core/footer-data-provider.js +1 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/keybindings.d.ts +17 -16
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +23 -6
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +2 -1
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver-initial.d.ts +1 -0
- package/dist/core/model-resolver-initial.d.ts.map +1 -1
- package/dist/core/model-resolver-initial.js +9 -5
- package/dist/core/model-resolver-initial.js.map +1 -1
- package/dist/core/models-store.d.ts.map +1 -1
- package/dist/core/models-store.js +2 -1
- package/dist/core/models-store.js.map +1 -1
- package/dist/core/package-manager-git.d.ts.map +1 -1
- package/dist/core/package-manager-git.js +2 -1
- package/dist/core/package-manager-git.js.map +1 -1
- package/dist/core/package-manager-manifest.d.ts.map +1 -1
- package/dist/core/package-manager-manifest.js +2 -1
- package/dist/core/package-manager-manifest.js.map +1 -1
- package/dist/core/package-manager-npm.d.ts.map +1 -1
- package/dist/core/package-manager-npm.js +4 -3
- package/dist/core/package-manager-npm.js.map +1 -1
- package/dist/core/package-manager-operations.d.ts.map +1 -1
- package/dist/core/package-manager-operations.js +2 -1
- package/dist/core/package-manager-operations.js.map +1 -1
- package/dist/core/package-manager-resource-collector.d.ts.map +1 -1
- package/dist/core/package-manager-resource-collector.js +2 -1
- package/dist/core/package-manager-resource-collector.js.map +1 -1
- package/dist/core/package-manager-resource-files.d.ts.map +1 -1
- package/dist/core/package-manager-resource-files.js +7 -2
- package/dist/core/package-manager-resource-files.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +2 -1
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader-context-files.d.ts.map +1 -1
- package/dist/core/resource-loader-context-files.js +3 -2
- package/dist/core/resource-loader-context-files.js.map +1 -1
- package/dist/core/sdk-exports.d.ts +5 -3
- package/dist/core/sdk-exports.d.ts.map +1 -1
- package/dist/core/sdk-exports.js +4 -2
- package/dist/core/sdk-exports.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +7 -3
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +2 -2
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +4 -4
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-entries.d.ts +2 -2
- package/dist/core/session-manager-entries.d.ts.map +1 -1
- package/dist/core/session-manager-entries.js +4 -3
- package/dist/core/session-manager-entries.js.map +1 -1
- package/dist/core/session-manager-storage.d.ts.map +1 -1
- package/dist/core/session-manager-storage.js +4 -2
- package/dist/core/session-manager-storage.js.map +1 -1
- package/dist/core/session-manager-types.d.ts +2 -0
- package/dist/core/session-manager-types.d.ts.map +1 -1
- package/dist/core/session-manager-types.js.map +1 -1
- package/dist/core/settings-diagnostics.d.ts +4 -0
- package/dist/core/settings-diagnostics.d.ts.map +1 -0
- package/dist/core/settings-diagnostics.js +12 -0
- package/dist/core/settings-diagnostics.js.map +1 -0
- package/dist/core/settings-manager-basic-accessors.d.ts +4 -0
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js +23 -0
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/settings-manager-core.d.ts.map +1 -1
- package/dist/core/settings-manager-core.js +10 -2
- package/dist/core/settings-manager-core.js.map +1 -1
- package/dist/core/settings-storage.d.ts.map +1 -1
- package/dist/core/settings-storage.js +10 -3
- package/dist/core/settings-storage.js.map +1 -1
- package/dist/core/settings-types.d.ts +2 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +51 -33
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +3 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +11 -2
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/ask-user-question/config.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/config.js +2 -1
- package/dist/core/tools/ask-user-question/config.js.map +1 -1
- package/dist/core/tools/bash.d.ts +13 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +9 -5
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/index.d.ts +21 -5
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +45 -13
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/powershell.d.ts +83 -0
- package/dist/core/tools/powershell.d.ts.map +1 -0
- package/dist/core/tools/powershell.js +89 -0
- package/dist/core/tools/powershell.js.map +1 -0
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +2 -1
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/extensions/llama/client.d.ts +6 -0
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +12 -0
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/llama/index.d.ts.map +1 -1
- package/dist/extensions/llama/index.js +2 -0
- package/dist/extensions/llama/index.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts +3 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +25 -8
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/index-extensions.d.ts +2 -2
- 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 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/main-stdio.d.ts.map +1 -1
- package/dist/main-stdio.js +4 -2
- package/dist/main-stdio.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +10 -3
- package/dist/main.js.map +1 -1
- package/dist/migrations-config-values.d.ts.map +1 -1
- package/dist/migrations-config-values.js +2 -1
- package/dist/migrations-config-values.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +5 -4
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +2 -1
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +2 -2
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +27 -16
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.js +67 -14
- package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-submenus.d.ts +7 -1
- package/dist/modes/interactive/components/settings-selector-submenus.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-submenus.js +38 -3
- package/dist/modes/interactive/components/settings-selector-submenus.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts +5 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts +15 -6
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +65 -27
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +2 -1
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-agent-events.js +2 -0
- package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.d.ts +1 -1
- package/dist/modes/interactive/interactive-auth-login.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.js +9 -1
- package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
- package/dist/modes/interactive/interactive-autocomplete.js +9 -0
- package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.js +2 -0
- package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-editor-actions.js +11 -10
- package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +6 -0
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js +1 -0
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +7 -0
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js +0 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-types.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode-types.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-types.js.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.d.ts +16 -1
- package/dist/modes/interactive/interactive-model-routing.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.js +62 -3
- package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-render-chat.js +18 -0
- package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +10 -8
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +6 -5
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +9 -1
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/modes/interactive/theme/theme-parse.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-parse.js +2 -1
- package/dist/modes/interactive/theme/theme-parse.js.map +1 -1
- package/dist/modes/json-event.d.ts +15 -18
- package/dist/modes/json-event.d.ts.map +1 -1
- package/dist/modes/json-event.js +21 -17
- package/dist/modes/json-event.js.map +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +4 -0
- package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-api.js +3 -0
- package/dist/modes/rpc/rpc-client-api.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +2 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/management-http.d.ts +2 -0
- package/dist/utils/management-http.d.ts.map +1 -1
- package/dist/utils/management-http.js +11 -7
- package/dist/utils/management-http.js.map +1 -1
- package/dist/utils/shell.d.ts +3 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +41 -10
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +1 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +61 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/text.d.ts +8 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +9 -0
- package/dist/utils/text.js.map +1 -0
- package/docs/changelog.mdx +1 -1
- package/docs/compaction.md +16 -3
- package/docs/containerization.md +17 -0
- package/docs/custom-provider.md +1 -1
- package/docs/environment-variables.md +3 -3
- package/docs/extensions.md +22 -5
- package/docs/index.md +12 -10
- package/docs/intercom.md +5 -3
- package/docs/keybindings.md +1 -1
- package/docs/llama-cpp.md +1 -1
- package/docs/models.md +2 -0
- package/docs/quickstart.md +80 -9
- package/docs/rpc.md +24 -1
- package/docs/sdk.md +11 -0
- package/docs/settings.md +16 -7
- package/docs/skills.md +3 -2
- package/docs/subagents.md +7 -0
- package/docs/termux.md +1 -1
- package/docs/usage.md +4 -3
- package/docs/windows.md +33 -3
- package/docs/workflows.md +20 -10
- package/examples/extensions/border-status-editor.ts +1 -1
- package/examples/extensions/git-checkpoint.ts +1 -1
- package/examples/extensions/notify.ts +1 -1
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/rpc-extension-ui.ts +1 -1
- package/examples/sdk/README.md +1 -1
- package/npm-shrinkwrap.json +73 -65
- package/package.json +11 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/web-access",
|
|
3
|
-
"version": "0.9.16-alpha.
|
|
3
|
+
"version": "0.9.16-alpha.5",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
|
|
6
6
|
"contributors": [
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@bastani/atomic": "*",
|
|
34
|
-
"@earendil-works/pi-tui": "^0.84.
|
|
34
|
+
"@earendil-works/pi-tui": "^0.84.3"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
37
|
"@bastani/atomic": {
|
|
@@ -6,6 +6,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.9.16-alpha.5] - 2026-08-26
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Raised the public `workflow` tool request deadline from 30 seconds to two minutes. Timed-out requests still return `WORKFLOW_TIMEOUT` with `timeoutMs: 120000`, abort cancellable work, discard late settlement, and never retry. Mutating actions keep the unknown-outcome warning that tells callers to inspect workflow status before retrying ([#2654](https://github.com/bastani-inc/atomic/issues/2654)).
|
|
14
|
+
- Agent guidance now treats "no budget" as the default for workflow runs. A `budget` is passed on `run`/`resume` only when the operator asked for a limit, and only the fields they named; otherwise the field is omitted so the workflow declaration and config resolve normally.
|
|
15
|
+
- Agent guidance now assumes the existing 15-minute heartbeat cadence and does not shorten, lengthen, or disable it unless the operator asks. Heartbeats are documented as periodic alignment checks rather than failure signals, so a progressing run is not interrupted, re-capped, or polled in response to one.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Fixed running durable `ctx.tool` message blocks showing a trailing `●` after the tool call header; running and completed calls now use the same marker-free `$ <tool-name>` presentation while other tool-state markers remain unchanged.
|
|
20
|
+
- Fixed a completed `ctx.task` leaving the root raw `running` with no active stage or tool and no path to the next budget boundary. The durable task-result checkpoint now fails closed, duration is rechecked after that checkpoint, quit/interrupt can abort a never-settling persist, a checkpoint created after its signal is already aborted settles without an unobserved rejection, an active task-checkpoint control — including one owned by an expanded child run — is not diagnosed as a stranded root, bulk interrupt forwards an injected tool-control registry, cancellation settles the DBOS write queue, and a terminal-only stage checkpoint replays the complete `WorkflowTaskResult` — the exact persisted text including schema-backed `maxOutput` truncation, structured output including `null`, generated worktree artifacts, warnings, session, and model metadata — without rerunning the task. A workflow that catches a task-tail quit rejection and returns outputs still stays paused. Exact-id quit or interrupt of a nested task tail now quits the aggregate root so the parent snapshot and durable handle do not stay raw `running`. Exact `/workflow status <id>` uses the live tool-control registry so a task tail is not reported as stranded. Same-process DBOS hydration rejects unknown checkpoint history instead of replaying around it ([#2650](https://github.com/bastani-inc/atomic/issues/2650)).
|
|
21
|
+
- Fixed raised-budget resume of a blocked workflow when parallel stages shared a completed `ctx.tool` parent. Fresh-ID continuations translate tool parent identities during fail-closed topology validation, preserve cached root-level tool siblings without a false mismatch, reject a replayed tool whose restored parents disagree with the continuation graph or cannot be translated, and keep a blocked source retryable after that rejection without dropping recorded prompt answers, pending-prompt descriptors, or its BLOCKED notice. The local source kill remains process-only until settlement: a mismatch leaves no terminal session entry so the durable blocked row stays reload-recoverable, while a successful continuation durably retires the superseded source so reload cannot resurrect it ([#2639](https://github.com/bastani-inc/atomic/issues/2639)).
|
|
22
|
+
- Fresh-ID continuations reuse the source `ctx.tool` checkpoint, including `failureMode: "return"` success and `return_failure` outcomes. A later hop reuses that result when the intermediate run republishes it; that write is best-effort. To re-run a completed return-mode callback, start a new run or change the tool name or args ([#2639](https://github.com/bastani-inc/atomic/issues/2639)).
|
|
23
|
+
- Fixed ordinary in-process subagents stealing the parent session's workflow store binding. Subagent children retain bundled workflow definitions as resources without loading the workflows extension or exposing its tool, and the extension factory rejects admitted child sessions as a second boundary. Full `/reload` also recovers a live store displaced by an older generation, including stage, job, cancellation, tool-control, and prompt owners, merges retained parent history, and remounts the `BACKGROUND` panel. New session scopes remain isolated.
|
|
24
|
+
- Fixed simultaneous post-task budget exhaustion in `ctx.parallel(..., { failFast: false })` being replaced by a generic aggregate failure after every task had already persisted a complete result. Budget-only parallel failures now retain the engine-owned resumable `budget_exceeded` classification, select the earliest authored exhausted task as the deterministic completed resume frontier, and replay all completed task results under a raised budget without rerunning their models; mixed ordinary failures retain the existing aggregate-failure behavior.
|
|
25
|
+
- Fixed workflow name resolution racing past an in-flight `/workflow reload`: a run dispatched immediately after a reload could resolve against the pre-reload registry and execute the old module (observed live as reload generation N applying only after the run had started). Resolution now awaits any in-flight discovery before resolving names; a reload that fails while a registry already exists still surfaces through the reload's own caller, and resolution proceeds on the retained registry instead of throwing. ([#2667](https://github.com/bastani-inc/atomic/pull/2667) by [@uppifyagency](https://github.com/uppifyagency))
|
|
26
|
+
- Fixed Goal losing its ledger, orchestrator receipt, and review artifacts when a durable resume continued under a fresh run ID. Goal now checkpoints the complete artifact directory, reloads exact turn-bearing ledger state from a durable sidecar without truncating records or fabricating reducer turns, keeps the model-visible ledger free of internal turn numbers, avoids duplicating replayed receipts and reviews, and scopes artifact ownership to the run's own identity plus its continuation chain. Fresh-ID continuation chains retain and report the original referenced owner correctly, and retention pruning protects that owner while any continuation remains live without allowing incidental quoted paths to pin failed runs forever.
|
|
27
|
+
- Fixed a missing Goal reviewer `reads` artifact being reported as malformed structured reviewer output. Missing referenced files now remain explicit reviewer execution failures attributed to the `reads` contract, while completed unstructured reviewer responses continue to use the existing parse-failure path.
|
|
28
|
+
|
|
9
29
|
## [0.9.16-alpha.2] - 2026-08-23
|
|
10
30
|
|
|
11
31
|
### Added
|
|
@@ -677,7 +677,7 @@ Raw stage-chat prompt answer replay is live-memory only. `StageSnapshot.promptAn
|
|
|
677
677
|
```json
|
|
678
678
|
{
|
|
679
679
|
"name": "workflow",
|
|
680
|
-
"description": "Run named builtin, project, user, or package workflows; custom definitions may import reusable project/package workflows or builtin definitions from @bastani/workflows/builtin and nest them with ctx.workflow(...), including deeper composition within the configured maxDepth; when workflow execution fits but another shape would better achieve the task, author a custom TypeScript workflow({...}) inline with normal coding tools, reload it, and run it; after successfully creating and reloading a newly authored custom workflow, report the folder containing its generated code as 'Custom workflow created. You can inspect its code at: <workflow-folder-path>'; do this only for newly created custom workflows, never builtin or pre-existing workflows; discover with list/get/inputs/models, list session runs with status (no runId; statusFilter narrows the list), inspect status/stages/stage details, send prompt answers or steering only while the root workflow is nonterminal, pause/resume/interrupt/quit runs, and reload workflow resources. For action 'run' and 'resume', budget accepts per-field duration, token, cost, and warning overrides; fields resolve over the workflow declaration and config, and 0 disables a field. For primitive prompt answers, use booleans or the documented confirm labels, exact case-insensitive select labels or 1-based indexes, and text strings for input/editor; an invalid answer remains pending and returns guidance instead of choosing a default. For large stage handoffs, write context to files/artifacts, pass paths via reads, and prompt downstream agents to 'Read the file at <path>...' instead of injecting large previous text. Wrap critical parts of run inputs and steering messages in <keepContext>...</keepContext> so compaction preserves them verbatim in the stages that inherit them; tag role constraints, prohibitions, must-hold criteria, and identifiers, not background or bulk reference material. For transcripts, prefer status/stages/stage to get sessionFile/transcriptPath, quote the exact path without rewriting separators (Windows backslashes are valid), then search it with rg/grep and read small ranges; transcript is path-only by default when sessionFile/transcriptPath exists, explicit tail/limit returns bounded previews, and missing transcript paths fall back to a small preview. Use action 'models' to inspect models in the configured catalog; the result is a configured-auth snapshot showing what's present in the registry with configured authentication, not proof of credentials, entitlements, OAuth freshness, or live provider access. When authoring a workflow that should dynamically select a model, first call workflow({ action: 'models' }) to inspect the configured catalog, then select from the returned provider/id entries considering the isCurrent marker and available thinking levels.",
|
|
680
|
+
"description": "Run named builtin, project, user, or package workflows; custom definitions may import reusable project/package workflows or builtin definitions from @bastani/workflows/builtin and nest them with ctx.workflow(...), including deeper composition within the configured maxDepth; when workflow execution fits but another shape would better achieve the task, author a custom TypeScript workflow({...}) inline with normal coding tools, reload it, and run it; after successfully creating and reloading a newly authored custom workflow, report the folder containing its generated code as 'Custom workflow created. You can inspect its code at: <workflow-folder-path>'; do this only for newly created custom workflows, never builtin or pre-existing workflows; discover with list/get/inputs/models, list session runs with status (no runId; statusFilter narrows the list), inspect status/stages/stage details, send prompt answers or steering only while the root workflow is nonterminal, pause/resume/interrupt/quit runs, and reload workflow resources. For action 'run' and 'resume', budget accepts per-field duration, token, cost, and warning overrides; fields resolve over the workflow declaration and config, and 0 disables a field. Pass budget only when the user asked for a limit; otherwise omit it entirely and inherit the declaration and config rather than inventing a cap. For primitive prompt answers, use booleans or the documented confirm labels, exact case-insensitive select labels or 1-based indexes, and text strings for input/editor; an invalid answer remains pending and returns guidance instead of choosing a default. For large stage handoffs, write context to files/artifacts, pass paths via reads, and prompt downstream agents to 'Read the file at <path>...' instead of injecting large previous text. Wrap critical parts of run inputs and steering messages in <keepContext>...</keepContext> so compaction preserves them verbatim in the stages that inherit them; tag role constraints, prohibitions, must-hold criteria, and identifiers, not background or bulk reference material. For transcripts, prefer status/stages/stage to get sessionFile/transcriptPath, quote the exact path without rewriting separators (Windows backslashes are valid), then search it with rg/grep and read small ranges; transcript is path-only by default when sessionFile/transcriptPath exists, explicit tail/limit returns bounded previews, and missing transcript paths fall back to a small preview. Use action 'models' to inspect models in the configured catalog; the result is a configured-auth snapshot showing what's present in the registry with configured authentication, not proof of credentials, entitlements, OAuth freshness, or live provider access. When authoring a workflow that should dynamically select a model, first call workflow({ action: 'models' }) to inspect the configured catalog, then select from the returned provider/id entries considering the isCurrent marker and available thinking levels.",
|
|
681
681
|
"parameters": {
|
|
682
682
|
"workflow": "string (optional) — workflow ID or normalized name",
|
|
683
683
|
"inputs": "object (optional) — key/value map of workflow inputs",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { writeFile } from "node:fs/promises";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { createWorkflowArtifactDirectory } from "../src/shared/workflow-artifacts.js";
|
|
2
|
+
import { readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
5
4
|
import { LEDGER_FILENAME, type GoalLedger, type GoalLifecycleEvent } from "./goal-types.js";
|
|
6
5
|
|
|
6
|
+
const LEDGER_STATE_FILENAME = "goal-ledger-state.json";
|
|
7
|
+
|
|
7
8
|
type ModelVisibleGoalLedger = Omit<
|
|
8
9
|
GoalLedger,
|
|
9
10
|
"turns" | "receipts" | "reviews" | "blockers" | "decisions" | "lifecycle"
|
|
@@ -39,6 +40,10 @@ function modelVisibleLedger(ledger: GoalLedger): ModelVisibleGoalLedger {
|
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
function goalLedgerStatePath(ledgerPath: string): string {
|
|
44
|
+
return join(dirname(ledgerPath), LEDGER_STATE_FILENAME);
|
|
45
|
+
}
|
|
46
|
+
|
|
42
47
|
export function appendLifecycleEvent(
|
|
43
48
|
ledger: GoalLedger,
|
|
44
49
|
event: GoalLifecycleEvent["event"],
|
|
@@ -54,13 +59,40 @@ export function appendLifecycleEvent(
|
|
|
54
59
|
});
|
|
55
60
|
}
|
|
56
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Restore only lossless authoritative state. A model-visible legacy ledger has
|
|
64
|
+
* no turn fields, so treating it as fresh is safer than fabricating reducer state.
|
|
65
|
+
*
|
|
66
|
+
* A sidecar that cannot be parsed is treated as absent for the same reason: the
|
|
67
|
+
* authoritative file is published by atomic rename below, so unparsable content
|
|
68
|
+
* means a torn write from before that guarantee (or a foreign file). Starting
|
|
69
|
+
* fresh loses recorded turns; throwing here would instead make the whole
|
|
70
|
+
* continuation unable to start.
|
|
71
|
+
*/
|
|
72
|
+
async function readExistingGoalLedger(ledgerPath: string): Promise<GoalLedger | undefined> {
|
|
73
|
+
let contents: string;
|
|
74
|
+
try {
|
|
75
|
+
contents = await readFile(goalLedgerStatePath(ledgerPath), "utf8");
|
|
76
|
+
} catch (error) {
|
|
77
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") return undefined;
|
|
78
|
+
throw error;
|
|
79
|
+
}
|
|
80
|
+
try {
|
|
81
|
+
return JSON.parse(contents) as GoalLedger;
|
|
82
|
+
} catch {
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
57
86
|
export async function createGoalLedger(
|
|
58
87
|
objective: string,
|
|
59
|
-
acceptanceCriteria
|
|
60
|
-
|
|
88
|
+
acceptanceCriteria: string,
|
|
89
|
+
artifactDir: string,
|
|
61
90
|
): Promise<{ ledger: GoalLedger; ledgerPath: string; artifactDir: string }> {
|
|
91
|
+
const ledgerPath = join(artifactDir, LEDGER_FILENAME);
|
|
92
|
+
const existing = await readExistingGoalLedger(ledgerPath);
|
|
93
|
+
if (existing !== undefined) return { ledger: existing, ledgerPath, artifactDir };
|
|
94
|
+
|
|
62
95
|
const goalId = randomUUID();
|
|
63
|
-
const artifactDir = await createWorkflowArtifactDirectory(runId);
|
|
64
96
|
const now = new Date().toISOString();
|
|
65
97
|
const ledger: GoalLedger = {
|
|
66
98
|
goal_id: goalId,
|
|
@@ -79,7 +111,6 @@ export async function createGoalLedger(
|
|
|
79
111
|
convergence: [],
|
|
80
112
|
};
|
|
81
113
|
appendLifecycleEvent(ledger, "created", "Goal created.", 0);
|
|
82
|
-
const ledgerPath = join(artifactDir, LEDGER_FILENAME);
|
|
83
114
|
await writeGoalLedger(ledgerPath, ledger);
|
|
84
115
|
return { ledger, ledgerPath, artifactDir };
|
|
85
116
|
}
|
|
@@ -89,7 +120,20 @@ export async function writeGoalLedger(
|
|
|
89
120
|
ledger: GoalLedger,
|
|
90
121
|
): Promise<void> {
|
|
91
122
|
ledger.updated_at = new Date().toISOString();
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
123
|
+
const visibleContents = `${JSON.stringify(modelVisibleLedger(ledger), null, 2)}\n`;
|
|
124
|
+
const stateContents = `${JSON.stringify(ledger, null, 2)}\n`;
|
|
125
|
+
const statePath = goalLedgerStatePath(ledgerPath);
|
|
126
|
+
// The sidecar is the authoritative resume state, so it is published by a
|
|
127
|
+
// complete same-directory write followed by an atomic rename. Overwriting it
|
|
128
|
+
// in place leaves a partial file readable when a write is interrupted, and
|
|
129
|
+
// the next continuation would then start from nothing.
|
|
130
|
+
const pendingStatePath = `${statePath}.${randomUUID()}.tmp`;
|
|
131
|
+
await writeFile(pendingStatePath, stateContents, { encoding: "utf8" });
|
|
132
|
+
try {
|
|
133
|
+
await rename(pendingStatePath, statePath);
|
|
134
|
+
} catch (error) {
|
|
135
|
+
await rm(pendingStatePath, { force: true });
|
|
136
|
+
throw error;
|
|
137
|
+
}
|
|
138
|
+
await writeFile(ledgerPath, visibleContents, { encoding: "utf8" });
|
|
95
139
|
}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
WorkflowParallelOptions,
|
|
4
|
+
WorkflowTaskOptions,
|
|
5
|
+
WorkflowTaskResult,
|
|
6
|
+
WorkflowTaskStep,
|
|
7
|
+
WorkflowToolPrimitive,
|
|
8
|
+
} from "../src/shared/types.js";
|
|
9
|
+
import {
|
|
10
|
+
ensureWorkflowArtifactDirectory,
|
|
11
|
+
workflowArtifactDirectoryPath,
|
|
12
|
+
} from "../src/shared/workflow-artifacts.js";
|
|
3
13
|
import { fold_usage } from "./verification-usage.js";
|
|
4
14
|
import {
|
|
5
15
|
convergence_escalation_evidence,
|
|
@@ -26,6 +36,7 @@ import { formatReviewReport, renderFinalReport } from "./goal-reports.js";
|
|
|
26
36
|
import {
|
|
27
37
|
parsedReviewDecisionFromResult,
|
|
28
38
|
reviewDecisionToRecord,
|
|
39
|
+
reviewerErrorDecision,
|
|
29
40
|
} from "./goal-review.js";
|
|
30
41
|
import { reviewerFailureText } from "./review-convergence.js";
|
|
31
42
|
import { consolidateFindingsBatch } from "./review-convergence.js";
|
|
@@ -73,10 +84,22 @@ function normalizeBranchInput(
|
|
|
73
84
|
type GoalRunnerContext = {
|
|
74
85
|
readonly inputs: GoalWorkflowInputs;
|
|
75
86
|
readonly runId?: string;
|
|
87
|
+
readonly tool: WorkflowToolPrimitive;
|
|
76
88
|
task(name: string, options: WorkflowTaskOptions): Promise<WorkflowTaskResult>;
|
|
77
89
|
parallel(steps: readonly WorkflowTaskStep[], options: WorkflowParallelOptions): Promise<WorkflowTaskResult[]>;
|
|
78
90
|
};
|
|
79
91
|
|
|
92
|
+
type GoalArtifactContext = Pick<GoalRunnerContext, "runId" | "tool">;
|
|
93
|
+
|
|
94
|
+
export async function createGoalArtifactDirectory(ctx: GoalArtifactContext): Promise<string> {
|
|
95
|
+
const artifactDir = await ctx.tool(
|
|
96
|
+
"artifact-root",
|
|
97
|
+
{ workflow: "goal" },
|
|
98
|
+
async () => workflowArtifactDirectoryPath(ctx.runId),
|
|
99
|
+
);
|
|
100
|
+
return ensureWorkflowArtifactDirectory(artifactDir);
|
|
101
|
+
}
|
|
102
|
+
|
|
80
103
|
type GoalWorkflowOptions = {
|
|
81
104
|
readonly createPr: boolean;
|
|
82
105
|
readonly workflowStartCwd: string;
|
|
@@ -120,7 +143,8 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
|
|
|
120
143
|
const reviewQuorum = DEFAULT_REVIEW_QUORUM;
|
|
121
144
|
const blockerThreshold = Math.min(DEFAULT_BLOCKER_THRESHOLD, maxTurns);
|
|
122
145
|
const comparisonBaseBranch = normalizeBranchInput(inputs.base_branch, "origin/main");
|
|
123
|
-
const
|
|
146
|
+
const artifactDir = await createGoalArtifactDirectory(ctx);
|
|
147
|
+
const { ledger, ledgerPath } = await createGoalLedger(objective, acceptanceCriteria, artifactDir);
|
|
124
148
|
|
|
125
149
|
let latestReviews: ReviewRecord[] = [];
|
|
126
150
|
let latestReviewArtifactPaths: string[] = [];
|
|
@@ -188,13 +212,18 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
|
|
|
188
212
|
|
|
189
213
|
previousOrchestratorSessionFile = orchestrator.sessionFile;
|
|
190
214
|
ledger.turns = turn;
|
|
191
|
-
ledger.receipts.
|
|
192
|
-
turn,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
215
|
+
const receiptAlreadyRecorded = ledger.receipts.some(
|
|
216
|
+
(receipt) => receipt.turn === turn && receipt.artifact_path === orchestratorReceiptPath,
|
|
217
|
+
);
|
|
218
|
+
if (!receiptAlreadyRecorded) {
|
|
219
|
+
ledger.receipts.push({
|
|
220
|
+
turn,
|
|
221
|
+
stage: orchestrator.name ?? orchestrator.stageName,
|
|
222
|
+
artifact_path: orchestratorReceiptPath,
|
|
223
|
+
summary: `Orchestrator receipt artifact: ${orchestratorReceiptPath}`,
|
|
224
|
+
});
|
|
225
|
+
appendLifecycleEvent(ledger, "receipt_recorded", "Orchestrator receipt recorded.", turn);
|
|
226
|
+
}
|
|
198
227
|
await writeGoalLedger(ledgerPath, ledger);
|
|
199
228
|
|
|
200
229
|
const reviewerStep = (
|
|
@@ -238,6 +267,7 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
|
|
|
238
267
|
|
|
239
268
|
let reviewResults: WorkflowTaskResult[];
|
|
240
269
|
let reviewerBatchFailed = false;
|
|
270
|
+
let reviewerExecutionDiagnostic: string | undefined;
|
|
241
271
|
try {
|
|
242
272
|
reviewResults = await ctx.parallel(reviewerSteps, {
|
|
243
273
|
task: objective,
|
|
@@ -246,11 +276,15 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
|
|
|
246
276
|
});
|
|
247
277
|
} catch (err) {
|
|
248
278
|
reviewerBatchFailed = true;
|
|
279
|
+
const failure = reviewerFailureText(err);
|
|
280
|
+
reviewerExecutionDiagnostic = failure.includes("referenced artifact does not exist")
|
|
281
|
+
? `Reviewer execution failed while resolving its reads contract: ${failure}`
|
|
282
|
+
: `Reviewer execution failed before producing a decision: ${failure}`;
|
|
249
283
|
reviewResults = [
|
|
250
284
|
{
|
|
251
285
|
name: "reviewer-error",
|
|
252
286
|
stageName: "reviewer-error",
|
|
253
|
-
text:
|
|
287
|
+
text: failure,
|
|
254
288
|
},
|
|
255
289
|
];
|
|
256
290
|
}
|
|
@@ -258,7 +292,13 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
|
|
|
258
292
|
latestReviews = await Promise.all(reviewResults.map(async (result) => {
|
|
259
293
|
const reviewerName = result.name ?? result.stageName;
|
|
260
294
|
const normalizedReviewerName = reviewerName.replace(/-\d+$/u, "");
|
|
261
|
-
const parsed =
|
|
295
|
+
const parsed = reviewerBatchFailed
|
|
296
|
+
? {
|
|
297
|
+
decision: reviewerErrorDecision(reviewerExecutionDiagnostic ?? "Reviewer execution failed."),
|
|
298
|
+
parsed: false,
|
|
299
|
+
diagnostics: [reviewerExecutionDiagnostic ?? "Reviewer execution failed."],
|
|
300
|
+
}
|
|
301
|
+
: parsedReviewDecisionFromResult(result, reviewerName);
|
|
262
302
|
const reviewArtifactPath = join(
|
|
263
303
|
artifactDir,
|
|
264
304
|
`review-${artifactSafeName(normalizedReviewerName)}.json`,
|
|
@@ -332,7 +372,12 @@ export async function runGoalWorkflow(ctx: GoalRunnerContext, options: GoalWorkf
|
|
|
332
372
|
usage: fold_usage([orchestrator, ...reviewResults, ...reverifyResults]),
|
|
333
373
|
}));
|
|
334
374
|
}
|
|
335
|
-
|
|
375
|
+
const newReviews = latestReviews.filter(
|
|
376
|
+
(review) => !ledger.reviews.some(
|
|
377
|
+
(recorded) => recorded.turn === review.turn && recorded.reviewer === review.reviewer,
|
|
378
|
+
),
|
|
379
|
+
);
|
|
380
|
+
ledger.reviews.push(...newReviews);
|
|
336
381
|
// Consolidated round artifact leads so the next orchestrator turn plans the full findings batch first.
|
|
337
382
|
latestReviewArtifactPaths = [latestReviewReportPath, ...latestReviews.map((review) => review.artifact_path)];
|
|
338
383
|
appendLifecycleEvent(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/workflows",
|
|
3
|
-
"version": "0.9.16-alpha.
|
|
3
|
+
"version": "0.9.16-alpha.5",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for multi-stage workflow authoring and execution.",
|
|
6
6
|
"contributors": [
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@bastani/atomic": "*",
|
|
86
|
-
"@earendil-works/pi-tui": "^0.84.
|
|
86
|
+
"@earendil-works/pi-tui": "^0.84.3"
|
|
87
87
|
},
|
|
88
88
|
"peerDependenciesMeta": {
|
|
89
89
|
"@bastani/atomic": {
|