@bastani/atomic 0.9.11-alpha.2 → 0.9.11-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist/builtin/cursor/package.json +2 -2
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +6 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/runs/background/notify.ts +3 -1
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-chain.ts +5 -2
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel.ts +2 -1
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-single.ts +5 -2
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-status.ts +34 -0
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +20 -0
- package/dist/builtin/workflows/builtin/goal-prompts.ts +8 -3
- package/dist/builtin/workflows/builtin/goal.ts +4 -4
- package/dist/builtin/workflows/builtin/ralph-forked-prompts.ts +1 -1
- package/dist/builtin/workflows/builtin/ralph-reviewer-prompt.ts +3 -1
- package/dist/builtin/workflows/builtin/ralph-runner.ts +2 -0
- package/dist/builtin/workflows/builtin/ralph.ts +4 -4
- package/dist/builtin/workflows/builtin/shared-prompts.ts +16 -0
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/src/authoring/workflow.ts +1 -0
- package/dist/builtin/workflows/src/durable/dbos-lifecycle.ts +27 -1
- package/dist/builtin/workflows/src/durable/factory.ts +29 -3
- package/dist/builtin/workflows/src/durable/index.ts +2 -0
- package/dist/builtin/workflows/src/engine/run-durable-admission.ts +50 -0
- package/dist/builtin/workflows/src/engine/run.ts +12 -17
- package/dist/builtin/workflows/src/extension/extension-factory.ts +16 -1
- package/dist/builtin/workflows/src/extension/extension-lifecycle.ts +16 -2
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +71724 -0
- package/dist/builtin/workflows/src/extension/runtime.ts +5 -3
- package/dist/builtin/workflows/src/extension/ui-surface.ts +4 -0
- package/dist/builtin/workflows/src/extension/workflow-command-registration.ts +4 -1
- package/dist/builtin/workflows/src/extension/workflow-prompts.ts +3 -1
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +1 -0
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.ts +1 -0
- package/dist/builtin/workflows/src/shared/types.ts +7 -0
- package/dist/builtin/workflows/src/shared/workflow-authoring-types.d.ts +1 -0
- package/dist/builtin/workflows/src/shared/workflow-authoring-types.ts +1 -0
- package/dist/builtin/workflows/src/tui/host-input-form.ts +1 -1
- package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +6 -8
- package/dist/builtin/workflows/src/tui/stage-chat-view-types.ts +2 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +4 -0
- package/dist/cli/args.d.ts +8 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +18 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts +4 -2
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/startup-ui.d.ts +3 -0
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +50 -1
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/config-command-parser.d.ts +9 -0
- package/dist/config-command-parser.d.ts.map +1 -0
- package/dist/config-command-parser.js +22 -0
- package/dist/config-command-parser.js.map +1 -0
- package/dist/config-self-update.d.ts +6 -2
- package/dist/config-self-update.d.ts.map +1 -1
- package/dist/config-self-update.js +17 -10
- package/dist/config-self-update.js.map +1 -1
- package/dist/config.d.ts +3 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +4 -4
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-export.d.ts.map +1 -1
- package/dist/core/agent-session-export.js +32 -25
- package/dist/core/agent-session-export.js.map +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
- package/dist/core/agent-session-extension-bindings.js +9 -3
- package/dist/core/agent-session-extension-bindings.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +5 -0
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +2 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +8 -5
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session-tree.d.ts.map +1 -1
- package/dist/core/agent-session-tree.js +3 -1
- package/dist/core/agent-session-tree.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +5 -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.d.ts +6 -2
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +5 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/cache-stats.d.ts +25 -0
- package/dist/core/cache-stats.d.ts.map +1 -0
- package/dist/core/cache-stats.js +68 -0
- package/dist/core/cache-stats.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +2 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +1 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/extensions/agent-events.d.ts +10 -0
- package/dist/core/extensions/agent-events.d.ts.map +1 -1
- package/dist/core/extensions/agent-events.js.map +1 -1
- package/dist/core/extensions/api-types.d.ts +8 -2
- 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/event-types.d.ts +2 -2
- package/dist/core/extensions/event-types.d.ts.map +1 -1
- package/dist/core/extensions/event-types.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.map +1 -1
- package/dist/core/extensions/loader-api.d.ts.map +1 -1
- package/dist/core/extensions/loader-api.js +13 -2
- 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 +1 -0
- 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 +15 -7
- package/dist/core/extensions/loader-runtime.js.map +1 -1
- package/dist/core/extensions/message-types.d.ts +5 -0
- package/dist/core/extensions/message-types.d.ts.map +1 -1
- package/dist/core/extensions/message-types.js.map +1 -1
- package/dist/core/extensions/provider-types.d.ts +46 -0
- package/dist/core/extensions/provider-types.d.ts.map +1 -1
- package/dist/core/extensions/provider-types.js.map +1 -1
- package/dist/core/extensions/runner-registries.d.ts +2 -1
- package/dist/core/extensions/runner-registries.d.ts.map +1 -1
- package/dist/core/extensions/runner-registries.js +8 -0
- package/dist/core/extensions/runner-registries.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 +35 -13
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/runtime-types.d.ts +8 -2
- 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/ui-types.d.ts +4 -0
- package/dist/core/extensions/ui-types.d.ts.map +1 -1
- package/dist/core/extensions/ui-types.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts +1 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +16 -2
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/keybindings.d.ts +6 -1
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +3 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-registry-auth.d.ts +2 -0
- package/dist/core/model-registry-auth.d.ts.map +1 -1
- package/dist/core/model-registry-auth.js +18 -1
- package/dist/core/model-registry-auth.js.map +1 -1
- package/dist/core/model-registry-custom-loader.d.ts.map +1 -1
- package/dist/core/model-registry-custom-loader.js +14 -2
- package/dist/core/model-registry-custom-loader.js.map +1 -1
- package/dist/core/model-registry-dynamic.js +2 -2
- package/dist/core/model-registry-dynamic.js.map +1 -1
- package/dist/core/model-registry-loader.d.ts.map +1 -1
- package/dist/core/model-registry-loader.js +2 -1
- package/dist/core/model-registry-loader.js.map +1 -1
- package/dist/core/model-registry-schemas.d.ts +17 -0
- package/dist/core/model-registry-schemas.d.ts.map +1 -1
- package/dist/core/model-registry-schemas.js +2 -0
- package/dist/core/model-registry-schemas.js.map +1 -1
- package/dist/core/model-registry-types.d.ts +10 -1
- package/dist/core/model-registry-types.d.ts.map +1 -1
- package/dist/core/model-registry-types.js.map +1 -1
- package/dist/core/model-registry.d.ts +26 -36
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +72 -67
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver-defaults.d.ts.map +1 -1
- package/dist/core/model-resolver-defaults.js +3 -0
- package/dist/core/model-resolver-defaults.js.map +1 -1
- package/dist/core/model-runtime.d.ts +52 -0
- package/dist/core/model-runtime.d.ts.map +1 -0
- package/dist/core/model-runtime.js +120 -0
- package/dist/core/model-runtime.js.map +1 -0
- package/dist/core/oauth-provider-bridge.d.ts +3 -1
- package/dist/core/oauth-provider-bridge.d.ts.map +1 -1
- package/dist/core/oauth-provider-bridge.js +6 -4
- package/dist/core/oauth-provider-bridge.js.map +1 -1
- package/dist/core/package-manager-resolver.js +22 -11
- package/dist/core/package-manager-resolver.js.map +1 -1
- package/dist/core/package-manager-resource-collector.d.ts.map +1 -1
- package/dist/core/package-manager-resource-collector.js +8 -2
- package/dist/core/package-manager-resource-collector.js.map +1 -1
- package/dist/core/package-manager-resource-patterns.d.ts +1 -0
- package/dist/core/package-manager-resource-patterns.d.ts.map +1 -1
- package/dist/core/package-manager-resource-patterns.js +15 -0
- package/dist/core/package-manager-resource-patterns.js.map +1 -1
- package/dist/core/package-manager-source.d.ts.map +1 -1
- package/dist/core/package-manager-source.js +15 -8
- package/dist/core/package-manager-source.js.map +1 -1
- package/dist/core/package-manager-types.d.ts +1 -0
- package/dist/core/package-manager-types.d.ts.map +1 -1
- package/dist/core/package-manager-types.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +4 -0
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/resource-loader-core.d.ts.map +1 -1
- package/dist/core/resource-loader-core.js.map +1 -1
- package/dist/core/resource-loader-extensions.d.ts.map +1 -1
- package/dist/core/resource-loader-extensions.js +5 -2
- package/dist/core/resource-loader-extensions.js.map +1 -1
- package/dist/core/resource-loader-helpers.d.ts.map +1 -1
- package/dist/core/resource-loader-helpers.js +1 -0
- package/dist/core/resource-loader-helpers.js.map +1 -1
- package/dist/core/resource-loader-internals.d.ts +2 -2
- package/dist/core/resource-loader-internals.d.ts.map +1 -1
- package/dist/core/resource-loader-internals.js.map +1 -1
- package/dist/core/resource-loader-types.d.ts +3 -3
- package/dist/core/resource-loader-types.d.ts.map +1 -1
- package/dist/core/resource-loader-types.js.map +1 -1
- package/dist/core/sdk-exports.d.ts +1 -1
- package/dist/core/sdk-exports.d.ts.map +1 -1
- package/dist/core/sdk-exports.js.map +1 -1
- package/dist/core/sdk-types.d.ts +3 -0
- package/dist/core/sdk-types.d.ts.map +1 -1
- package/dist/core/sdk-types.js.map +1 -1
- package/dist/core/sdk.js +6 -2
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +1 -1
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +2 -2
- 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 +2 -1
- package/dist/core/session-manager-entries.js.map +1 -1
- package/dist/core/session-manager-history.d.ts +5 -0
- package/dist/core/session-manager-history.d.ts.map +1 -1
- package/dist/core/session-manager-history.js +33 -0
- package/dist/core/session-manager-history.js.map +1 -1
- package/dist/core/session-manager-types.d.ts +4 -2
- package/dist/core/session-manager-types.d.ts.map +1 -1
- package/dist/core/session-manager-types.js.map +1 -1
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager-basic-accessors.d.ts +7 -0
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js +35 -0
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/settings-manager-resource-accessors.d.ts +3 -0
- package/dist/core/settings-manager-resource-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-resource-accessors.js +16 -0
- package/dist/core/settings-manager-resource-accessors.js.map +1 -1
- package/dist/core/settings-types.d.ts +8 -2
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/slash-commands.d.ts +1 -0
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/usage-totals.d.ts +18 -0
- package/dist/core/usage-totals.d.ts.map +1 -0
- package/dist/core/usage-totals.js +40 -0
- package/dist/core/usage-totals.js.map +1 -0
- package/dist/extensions/index.d.ts +3 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/index.js +5 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/llama/client.d.ts +61 -0
- package/dist/extensions/llama/client.d.ts.map +1 -0
- package/dist/extensions/llama/client.js +300 -0
- package/dist/extensions/llama/client.js.map +1 -0
- package/dist/extensions/llama/huggingface-ui.d.ts +33 -0
- package/dist/extensions/llama/huggingface-ui.d.ts.map +1 -0
- package/dist/extensions/llama/huggingface-ui.js +166 -0
- package/dist/extensions/llama/huggingface-ui.js.map +1 -0
- package/dist/extensions/llama/huggingface.d.ts +23 -0
- package/dist/extensions/llama/huggingface.d.ts.map +1 -0
- package/dist/extensions/llama/huggingface.js +139 -0
- package/dist/extensions/llama/huggingface.js.map +1 -0
- package/dist/extensions/llama/index.d.ts +3 -0
- package/dist/extensions/llama/index.d.ts.map +1 -0
- package/dist/extensions/llama/index.js +208 -0
- package/dist/extensions/llama/index.js.map +1 -0
- package/dist/extensions/llama/provider.d.ts +11 -0
- package/dist/extensions/llama/provider.d.ts.map +1 -0
- package/dist/extensions/llama/provider.js +93 -0
- package/dist/extensions/llama/provider.js.map +1 -0
- package/dist/extensions/llama/ui.d.ts +42 -0
- package/dist/extensions/llama/ui.d.ts.map +1 -0
- package/dist/extensions/llama/ui.js +237 -0
- package/dist/extensions/llama/ui.js.map +1 -0
- package/dist/index-extensions.d.ts +1 -1
- package/dist/index-extensions.d.ts.map +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-first-time-setup.d.ts +6 -0
- package/dist/main-first-time-setup.d.ts.map +1 -0
- package/dist/main-first-time-setup.js +10 -0
- package/dist/main-first-time-setup.js.map +1 -0
- package/dist/main-types.d.ts +2 -2
- package/dist/main-types.d.ts.map +1 -1
- package/dist/main-types.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +17 -7
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/chat-input-actions.d.ts.map +1 -1
- package/dist/modes/interactive/chat-input-actions.js +14 -2
- package/dist/modes/interactive/chat-input-actions.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.js +5 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
- package/dist/modes/interactive/components/config-selector-list.d.ts +6 -6
- package/dist/modes/interactive/components/config-selector-list.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector-list.js +64 -125
- package/dist/modes/interactive/components/config-selector-list.js.map +1 -1
- package/dist/modes/interactive/components/config-selector-project-scope.d.ts +4 -0
- package/dist/modes/interactive/components/config-selector-project-scope.d.ts.map +1 -0
- package/dist/modes/interactive/components/config-selector-project-scope.js +61 -0
- package/dist/modes/interactive/components/config-selector-project-scope.js.map +1 -0
- package/dist/modes/interactive/components/config-selector.d.ts +8 -5
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +46 -22
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts +16 -0
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-entry.js +45 -0
- package/dist/modes/interactive/components/custom-entry.js.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts +24 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.js +69 -0
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +7 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +55 -27
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/host-input-form.d.ts +2 -0
- package/dist/modes/interactive/components/host-input-form.d.ts.map +1 -1
- package/dist/modes/interactive/components/host-input-form.js +6 -3
- package/dist/modes/interactive/components/host-input-form.js.map +1 -1
- package/dist/modes/interactive/components/idle-status.d.ts +8 -0
- package/dist/modes/interactive/components/idle-status.d.ts.map +1 -0
- package/dist/modes/interactive/components/idle-status.js +13 -0
- package/dist/modes/interactive/components/idle-status.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +3 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +3 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +5 -5
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +14 -6
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +10 -6
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.js +6 -0
- package/dist/modes/interactive/components/settings-selector-handlers.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 +14 -0
- package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts +4 -0
- 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/interactive-agent-events.js +21 -0
- package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.js +17 -8
- package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-routing.d.ts +2 -0
- package/dist/modes/interactive/interactive-auth-routing.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-auth-routing.js +88 -40
- package/dist/modes/interactive/interactive-auth-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-autocomplete.js +6 -0
- package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-runtime.js +4 -0
- package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-global-clear.d.ts +10 -2
- package/dist/modes/interactive/interactive-global-clear.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-global-clear.js +3 -1
- package/dist/modes/interactive/interactive-global-clear.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +6 -4
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.d.ts +2 -1
- package/dist/modes/interactive/interactive-mode-helpers.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.js +6 -10
- package/dist/modes/interactive/interactive-mode-helpers.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +11 -2
- 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-render-chat.js +69 -12
- package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
- package/dist/modes/interactive/interactive-resource-rendering.js +1 -1
- package/dist/modes/interactive/interactive-resource-rendering.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +10 -0
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.js +3 -0
- package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +14 -0
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/login-provider-options.d.ts +21 -0
- package/dist/modes/interactive/login-provider-options.d.ts.map +1 -0
- package/dist/modes/interactive/login-provider-options.js +51 -0
- package/dist/modes/interactive/login-provider-options.js.map +1 -0
- package/dist/modes/interactive-engine/engine-input-form.d.ts +1 -1
- package/dist/modes/interactive-engine/engine-input-form.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-input-form.js +10 -2
- package/dist/modes/interactive-engine/engine-input-form.js.map +1 -1
- package/dist/modes/interactive-engine/engine-monitor.d.ts +8 -1
- package/dist/modes/interactive-engine/engine-monitor.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-monitor.js +13 -15
- package/dist/modes/interactive-engine/engine-monitor.js.map +1 -1
- package/dist/modes/interactive-engine/input-form-host.d.ts.map +1 -1
- package/dist/modes/interactive-engine/input-form-host.js +7 -2
- package/dist/modes/interactive-engine/input-form-host.js.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.js +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
- package/dist/modes/interactive-engine/protocol.d.ts +5 -0
- package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
- package/dist/modes/interactive-engine/protocol.js +9 -1
- package/dist/modes/interactive-engine/protocol.js.map +1 -1
- package/dist/modes/interactive-engine/remote-model-catalog.d.ts +2 -0
- package/dist/modes/interactive-engine/remote-model-catalog.d.ts.map +1 -1
- package/dist/modes/interactive-engine/remote-model-catalog.js +33 -0
- package/dist/modes/interactive-engine/remote-model-catalog.js.map +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +3 -1
- package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-api.js +15 -0
- package/dist/modes/rpc/rpc-client-api.js.map +1 -1
- package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-process.js +3 -0
- package/dist/modes/rpc/rpc-client-process.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +1 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.d.ts +5 -1
- package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.js +62 -2
- package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
- package/dist/modes/rpc/rpc-extension-ui.d.ts +3 -1
- package/dist/modes/rpc/rpc-extension-ui.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-extension-ui.js +7 -2
- package/dist/modes/rpc/rpc-extension-ui.js.map +1 -1
- package/dist/modes/rpc/rpc-input-scheduler.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-input-scheduler.js +1 -0
- package/dist/modes/rpc/rpc-input-scheduler.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +1 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.d.ts +1 -0
- package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.js +66 -43
- package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +31 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts +3 -3
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +55 -51
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/rpc-entry.js +6 -2
- package/dist/rpc-entry.js.map +1 -1
- package/dist/self-update-plan.d.ts +12 -0
- package/dist/self-update-plan.d.ts.map +1 -0
- package/dist/self-update-plan.js +42 -0
- package/dist/self-update-plan.js.map +1 -0
- package/dist/utils/clipboard-native.d.ts +1 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts +3 -0
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +10 -0
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/compile-cache.d.ts +8 -0
- package/dist/utils/compile-cache.d.ts.map +1 -0
- package/dist/utils/compile-cache.js +31 -0
- package/dist/utils/compile-cache.js.map +1 -0
- package/dist/utils/version-check.d.ts +1 -0
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +3 -3
- package/dist/utils/version-check.js.map +1 -1
- package/docs/docs.json +2 -1
- package/docs/extensions.md +56 -4
- package/docs/keybindings.md +3 -0
- package/docs/llama-cpp.md +70 -0
- package/docs/models.md +8 -3
- package/docs/packages.md +4 -2
- package/docs/providers.md +37 -3
- package/docs/sdk.md +18 -0
- package/docs/settings.md +19 -3
- package/docs/tui.md +2 -0
- package/docs/usage.md +7 -0
- package/docs/workflows.md +34 -11
- package/npm-shrinkwrap.json +23 -23
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.11-alpha.4] - 2026-07-23
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Installed builds now ship the builtin workflows extension as a single prebundled ESM file. Loading it previously resolved and transpiled a ~300-file TypeScript module graph per launch, which dominated interactive-engine startup on Windows (~7 s on a test VM, now ~1.1 s, ~6x faster) ([#1962](https://github.com/bastani-inc/atomic/issues/1962)). Source checkouts still load the raw TypeScript sources.
|
|
10
|
+
- Interactive TUI startup on Windows is dramatically faster: the CLI now enables Node's persistent on-disk V8 compile cache (Node >= 22.8) and flushes it before spawning the isolated interactive engine, so both the host and the engine child reuse compiled module bytecode across runs and within the same launch ([#1962](https://github.com/bastani-inc/atomic/issues/1962)).
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Fixed interactive startup crashing with `Interactive engine did not become ready within 5000 ms` on machines with slow cold starts (commonly Windows PowerShell with npm-global installs). The fixed readiness deadline is removed; the host now waits until the engine reports ready and still fails fast if the engine process exits or the transport breaks ([#1962](https://github.com/bastani-inc/atomic/issues/1962)).
|
|
15
|
+
- Fixed positional prompts beginning with `-`, `--`, or `@` being parsed as options or file arguments by supporting the conventional `--` end-of-options terminator ([#1950](https://github.com/bastani-inc/atomic/issues/1950)).
|
|
16
|
+
- Fixed embedded extension UIs in isolated interactive mode receiving an empty placeholder from `ctx.ui.getFooterDataProvider()`. The engine session now exposes its live extension statuses and cached, watched Git branch so synchronous renderers such as workflow stage chat can match the main footer without RPC calls or per-render Git processes.
|
|
17
|
+
|
|
18
|
+
## [0.9.11-alpha.3] - 2026-07-21
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- Added a built-in, hidden llama.cpp router provider with `/login llama.cpp`, `LLAMA_BASE_URL`/`LLAMA_API_KEY` configuration, loaded-model discovery, and the `/llama` manager for load, unload, cancellation, reconnect, and Hugging Face GGUF download workflows.
|
|
23
|
+
- Added provider-metadata-driven `/login` choices, direct `/login <provider>` routing and autocomplete, provider-owned login information links, API-key login for Qwen Token Plan, Radius, and GitHub Copilot, plus preferred defaults for Radius, NVIDIA, and ZAI Coding Plan China.
|
|
24
|
+
- Added global `httpProxy`, duration-string and `"disabled"` HTTP idle timeouts, package `autoload: false` project deltas, Kimi deferred-tool compatibility, `oauth: "radius"` custom gateways, and global/project scope switching in `atomic config` (`-l` starts in project scope).
|
|
25
|
+
- Added extension lifecycle hooks `before_provider_headers` and `agent_settled`, durable `entry_appended` events and `registerEntryRenderer()`, complete native `Provider` registration, and named/hidden `InlineExtension` descriptors.
|
|
26
|
+
- Added the public `ModelRuntime` facade and associated option types, `readStoredCredential`, `InlineExtension`, entry-renderer/event types, and session context conversion helpers to the SDK/package-root surface. Atomic intentionally continues to expose Search rather than adding obsolete grep compatibility aliases.
|
|
27
|
+
- Added Ctrl+X copy-last-message, clipboard text fallback when image paste finds no image, restored footer branch/session/experimental/extension-status segments, Output padding and Cache miss notices settings, and clear-on-shrink idle placeholders.
|
|
28
|
+
- Added durable cache-miss attribution and waste totals, complete per-model session usage/cost breakdowns including tool and summary work, and optional live/resumed cache-miss transcript notices.
|
|
29
|
+
- Added Atomic's first-run theme preview and explicit analytics opt-in. Analytics settings and a local tracking identifier are persisted only when selected; this change does not transmit analytics data.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Login provider discovery now follows registered provider authentication capabilities instead of using display names as an allowlist, so newly installed native providers automatically expose their supported OAuth and API-key methods.
|
|
34
|
+
- Dynamic provider catalogs, including Radius `pi-messages`, are restored and refreshed through the provider-owned model store; documentation now distinguishes generic custom-provider APIs from the broader installed native API surface.
|
|
35
|
+
- Package self-update now honors advisory release notes, pins the exact advertised package and version, reports version transitions, and cleans stale Windows native-dependency quarantine data during ordinary startup.
|
|
36
|
+
- Interactive session diagnostics now show cache hit rate, wasted cache cost, and provider/model usage costs; the footer includes usage spent by tool results and summaries.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- Fixed Qwen Token Plan global/China, Radius API-key, and GitHub Copilot token methods being hidden from first-time `/login`, which kept otherwise installed models out of `/model` and `--list-models`.
|
|
41
|
+
- Fixed package-manager self-update helpers rejecting the legacy string target form while retaining exact-version install targets.
|
|
42
|
+
- Fixed `/login` omitting extension-registered custom-auth providers in isolated interactive mode. Provider metadata now synchronizes from the engine child, and provider-owned login prompts, credential persistence, cancellation, and post-login model refresh execute across the existing isolated-engine bridge.
|
|
43
|
+
- Fixed project package overrides being unable to selectively subtract or include resources from a matching global package without replacing the complete declaration.
|
|
44
|
+
- Fixed Ctrl+V reporting an image error when the clipboard contained usable text, and made Ctrl+X invoke the same copy-last-assistant behavior as `/copy`.
|
|
45
|
+
- Fixed a single Ctrl+C not dismissing the `/login` popups (auth-method selector, provider selector, and login dialogs), even though Escape worked and the on-screen hint promised `esc/ctrl+c cancel`. The global Ctrl+C clear/exit handler consumed the key before the focused popup could see it, so the first press silently cleared the hidden editor and a second press within the double-press window exited the entire CLI. The global handler now defers whenever an inline popup owns input (and its overlay/custom-UI guards are evaluated live instead of once at startup), so Ctrl+C reaches the focused component and cancels exactly like Escape while editor clearing and double-press exit continue to work when the editor has focus.
|
|
46
|
+
|
|
5
47
|
## [0.9.11-alpha.2] - 2026-07-21
|
|
6
48
|
|
|
7
49
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/cursor",
|
|
3
|
-
"version": "0.9.11-alpha.
|
|
3
|
+
"version": "0.9.11-alpha.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Experimental first-party Atomic extension for Cursor OAuth, model discovery, and streaming provider registration.",
|
|
6
6
|
"contributors": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@bastani/atomic-natives": "0.9.11-alpha.
|
|
43
|
+
"@bastani/atomic-natives": "0.9.11-alpha.4",
|
|
44
44
|
"@bufbuild/protobuf": "^2.12.1",
|
|
45
45
|
"@earendil-works/pi-ai": "^0.81.1"
|
|
46
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/intercom",
|
|
3
|
-
"version": "0.9.11-alpha.
|
|
3
|
+
"version": "0.9.11-alpha.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension providing a private coordination channel between parent and child agent sessions. Fork of: https://github.com/nicobailon/pi-intercom",
|
|
6
6
|
"contributors": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/mcp",
|
|
3
|
-
"version": "0.9.11-alpha.
|
|
3
|
+
"version": "0.9.11-alpha.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension that adapts MCP (Model Context Protocol) servers into the coding agent. Fork of: https://github.com/nicobailon/pi-mcp-adapter",
|
|
6
6
|
"contributors": [
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.11-alpha.3] - 2026-07-21
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed foreground subagent runs that detached for intercom coordination completing silently. When a foreground single, chain, or parallel child detaches (for example after asking its supervisor a question) and later exits, the parent session now receives a "Detached subagent task" completion/failure/paused notice through the same deduplicated, turn-triggering delivery pipeline used for background completion notifications, including per-child `(n/m)` attribution for parallel groups. Previously the detached child's final result was only recorded in remembered run state, so the orchestrating session had to poll `subagent status` to discover that a detached run had finished.
|
|
10
|
+
|
|
5
11
|
## [0.9.11-alpha.1] - 2026-07-20
|
|
6
12
|
|
|
7
13
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/subagents",
|
|
3
|
-
"version": "0.9.11-alpha.
|
|
3
|
+
"version": "0.9.11-alpha.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for delegating tasks to subagents with chains, parallel execution, and background runs. Fork of: https://github.com/nicobailon/pi-subagents",
|
|
6
6
|
"contributors": [
|
|
@@ -44,6 +44,7 @@ interface SubagentResult {
|
|
|
44
44
|
results?: ChainStepResult[];
|
|
45
45
|
taskIndex?: number;
|
|
46
46
|
totalTasks?: number;
|
|
47
|
+
noticeLabel?: string;
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
interface TerminalPreludeMessage {
|
|
@@ -194,8 +195,9 @@ export default function registerSubagentNotify(pi: ExtensionAPI): () => void {
|
|
|
194
195
|
: undefined;
|
|
195
196
|
|
|
196
197
|
const displaySummary = summary.trim() ? summary : "(no output)";
|
|
198
|
+
const noticeLabel = typeof result.noticeLabel === "string" && result.noticeLabel.trim() ? result.noticeLabel.trim() : "Background task";
|
|
197
199
|
const content = [
|
|
198
|
-
|
|
200
|
+
`${noticeLabel} ${status}: **${agent}**${taskInfo}`,
|
|
199
201
|
"",
|
|
200
202
|
displaySummary,
|
|
201
203
|
sessionLine ? "" : undefined,
|
|
@@ -7,7 +7,7 @@ import { resolveSubagentDepthPolicy } from "../../shared/types.ts";
|
|
|
7
7
|
import type { ChainStep } from "../../shared/settings.ts";
|
|
8
8
|
import type { ExecutionContextData, ResolvedExecutorDeps } from "./subagent-executor-types.ts";
|
|
9
9
|
import { wrapChainTasksForFork } from "./subagent-executor-input.ts";
|
|
10
|
-
import { createForegroundControlNotifier, maybeBuildForegroundIntercomReceipt, rememberForegroundRun, replaceForegroundRunChild } from "./subagent-executor-status.ts";
|
|
10
|
+
import { createForegroundControlNotifier, maybeBuildForegroundIntercomReceipt, notifyDetachedForegroundChildExit, rememberForegroundRun, replaceForegroundRunChild } from "./subagent-executor-status.ts";
|
|
11
11
|
|
|
12
12
|
export async function runChainPath(data: ExecutionContextData, deps: ResolvedExecutorDeps): Promise<import("../../shared/types.ts").SubagentToolResult> {
|
|
13
13
|
const {
|
|
@@ -64,7 +64,10 @@ export async function runChainPath(data: ExecutionContextData, deps: ResolvedExe
|
|
|
64
64
|
worktreeSetupHook: deps.config.worktreeSetupHook,
|
|
65
65
|
worktreeSetupHookTimeoutMs: deps.config.worktreeSetupHookTimeoutMs,
|
|
66
66
|
runSync: deps.runtime.runSync,
|
|
67
|
-
onDetachedExit: (index, result) =>
|
|
67
|
+
onDetachedExit: (index, result) => {
|
|
68
|
+
replaceForegroundRunChild(deps.state, runId, index, result);
|
|
69
|
+
notifyDetachedForegroundChildExit({ pi: deps.pi, runId, mode: "chain", index, result });
|
|
70
|
+
},
|
|
68
71
|
});
|
|
69
72
|
|
|
70
73
|
const chainDetails = chainResult.details ? compactForegroundDetails({ ...chainResult.details, runId }) : undefined;
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
findDuplicateParallelOutputPath,
|
|
44
44
|
resolveParallelTaskCwd,
|
|
45
45
|
} from "./subagent-executor-worktree.ts";
|
|
46
|
-
import { createForegroundControlNotifier, maybeBuildForegroundIntercomReceipt, rememberForegroundRun, replaceForegroundRunChild } from "./subagent-executor-status.ts";
|
|
46
|
+
import { createForegroundControlNotifier, maybeBuildForegroundIntercomReceipt, notifyDetachedForegroundChildExit, rememberForegroundRun, replaceForegroundRunChild } from "./subagent-executor-status.ts";
|
|
47
47
|
import { createDetachedCleanupBarrier } from "./detached-cleanup-barrier.ts";
|
|
48
48
|
|
|
49
49
|
export async function runParallelPath(data: ExecutionContextData, deps: ResolvedExecutorDeps): Promise<SubagentToolResult> {
|
|
@@ -171,6 +171,7 @@ export async function runParallelPath(data: ExecutionContextData, deps: Resolved
|
|
|
171
171
|
onDetachedExit: (index, result) => {
|
|
172
172
|
try {
|
|
173
173
|
replaceForegroundRunChild(deps.state, runId, index, result);
|
|
174
|
+
notifyDetachedForegroundChildExit({ pi: deps.pi, runId, mode: "parallel", index, totalTasks: tasks.length, result });
|
|
174
175
|
} finally {
|
|
175
176
|
detachedCleanup.recover(index);
|
|
176
177
|
}
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
type SubagentToolResult,
|
|
31
31
|
} from "../../shared/types.ts";
|
|
32
32
|
import type { ExecutionContextData, ResolvedExecutorDeps } from "./subagent-executor-types.ts";
|
|
33
|
-
import { createForegroundControlNotifier, maybeBuildForegroundIntercomReceipt, rememberForegroundRun, replaceForegroundRunChild } from "./subagent-executor-status.ts";
|
|
33
|
+
import { createForegroundControlNotifier, maybeBuildForegroundIntercomReceipt, notifyDetachedForegroundChildExit, rememberForegroundRun, replaceForegroundRunChild } from "./subagent-executor-status.ts";
|
|
34
34
|
|
|
35
35
|
function formatFailedSingleRunOutput(result: SingleResult, displayOutput: string): string {
|
|
36
36
|
const error = result.error || "Failed";
|
|
@@ -191,7 +191,10 @@ export async function runSinglePath(data: ExecutionContextData, deps: ResolvedEx
|
|
|
191
191
|
nestedRoute: foregroundControl?.nestedRoute,
|
|
192
192
|
onDetachedExit: (result) => {
|
|
193
193
|
cleanupTransientProgress(progressDir, artifactConfig.enabled);
|
|
194
|
-
if (result)
|
|
194
|
+
if (result) {
|
|
195
|
+
replaceForegroundRunChild(deps.state, runId, 0, result);
|
|
196
|
+
notifyDetachedForegroundChildExit({ pi: deps.pi, runId, mode: "single", index: 0, result });
|
|
197
|
+
}
|
|
195
198
|
},
|
|
196
199
|
index: 0,
|
|
197
200
|
modelOverride,
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
} from "../../intercom/result-intercom.ts";
|
|
11
11
|
import { formatNestedRunStatusLines } from "../shared/nested-render.ts";
|
|
12
12
|
import { formatControlIntercomMessage, formatControlNoticeMessage, shouldNotifyControlEvent } from "../shared/subagent-control.ts";
|
|
13
|
+
import { deliverLocalCompletionNotification } from "../background/completion-notification.ts";
|
|
13
14
|
import { updateForegroundNestedProjection } from "../shared/nested-events.ts";
|
|
14
15
|
import {
|
|
15
16
|
SUBAGENT_CONTROL_EVENT,
|
|
@@ -215,6 +216,39 @@ function resultSummaryForIntercom(result: SingleResult): string {
|
|
|
215
216
|
return output || result.error || "(no output)";
|
|
216
217
|
}
|
|
217
218
|
|
|
219
|
+
/**
|
|
220
|
+
* Deliver a completion notice to the parent session for a foreground child
|
|
221
|
+
* that detached for intercom coordination and later exited. Foreground runs
|
|
222
|
+
* normally return their results inline in the tool result, but a detached
|
|
223
|
+
* child outlives that tool call, so without this the parent never learns the
|
|
224
|
+
* child finished (see run history: detached parallel runs completed silently).
|
|
225
|
+
* Reuses the async completion pipeline (dedupe, ordering barrier, triggerTurn).
|
|
226
|
+
*/
|
|
227
|
+
export function notifyDetachedForegroundChildExit(input: {
|
|
228
|
+
pi: ExtensionAPI;
|
|
229
|
+
runId: string;
|
|
230
|
+
mode: SubagentRunMode;
|
|
231
|
+
index: number;
|
|
232
|
+
totalTasks?: number;
|
|
233
|
+
result: SingleResult;
|
|
234
|
+
}): void {
|
|
235
|
+
const { pi, runId, index, result } = input;
|
|
236
|
+
void deliverLocalCompletionNotification(pi.events, {
|
|
237
|
+
id: runId,
|
|
238
|
+
runId,
|
|
239
|
+
agent: result.agent,
|
|
240
|
+
success: result.exitCode === 0 && !result.interrupted && !result.error,
|
|
241
|
+
summary: resultSummaryForIntercom(result),
|
|
242
|
+
exitCode: result.exitCode,
|
|
243
|
+
...(result.interrupted ? { state: "paused" } : {}),
|
|
244
|
+
timestamp: Date.now(),
|
|
245
|
+
...(result.progressSummary?.durationMs !== undefined ? { durationMs: result.progressSummary.durationMs } : {}),
|
|
246
|
+
...(result.sessionFile ? { sessionFile: result.sessionFile } : {}),
|
|
247
|
+
...(input.totalTasks !== undefined && input.totalTasks > 1 ? { taskIndex: index, totalTasks: input.totalTasks } : {}),
|
|
248
|
+
noticeLabel: "Detached subagent task",
|
|
249
|
+
}, `foreground-detach-${runId}-${index}`);
|
|
250
|
+
}
|
|
251
|
+
|
|
218
252
|
async function emitForegroundResultIntercom(input: {
|
|
219
253
|
pi: ExtensionAPI;
|
|
220
254
|
intercomBridge: IntercomBridgeState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/web-access",
|
|
3
|
-
"version": "0.9.11-alpha.
|
|
3
|
+
"version": "0.9.11-alpha.4",
|
|
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": [
|
|
@@ -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.11-alpha.4] - 2026-07-23
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added the opt-in `autoAttach` workflow-definition field, which opens the graph overlay when an interactive top-level named workflow is launched through `/workflow <name>` or the registered `workflow` tool without changing headless launches, nested workflow composition, or the existing input-form launch path.
|
|
14
|
+
- `WorkflowRunContext` now optionally exposes the host session's model catalog as `ctx.models` (including `currentModel`, the user-selected session model, and `listModels()`). Custom workflow definitions can use it to select stage models from the live catalog; the field is absent when the host provides no catalog, and builtin workflow model chains are unchanged.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Workflow prompt guidance now instructs agents to give each workflow invocation its own intercom group by default — unless the user requests otherwise — by minting one invocation-scoped literal group name inside the workflow's `run` function (e.g. `"myflow-" + randomUUID()`) and passing it via the `group` option on each stage, task, or parallel step that should share it; `group: true`/`"auto"` mints one shared UUID group per `ctx.parallel(...)` set but a fresh UUID per non-parallel stage. This keeps stage and subagent intercom chatter isolated from the parent chat and other concurrent runs, since ungrouped sessions all share the `"default"` group; subagent inheritance, capability gating, and cross-group `contact_supervisor` escalation are unchanged.
|
|
19
|
+
- Attached workflow stage chats now match the main interactive footer by showing the home-shortened current folder with its cached, live-updating Git branch and by mirroring current extension status lines such as MCP connectivity, using the workflow chat theme without replacing the existing hierarchy and copy-mode hints.
|
|
20
|
+
- The builtin `goal` and `ralph` workflow descriptions and their `objective`/`prompt`/`create_pr` input descriptions now instruct launching agents that when a delegated task includes submitting a pull request (or MR/review), that final action must be stripped from the objective/prompt text and requested via `create_pr=true` instead when preparing the workflow inputs. This keeps PR creation an explicitly authorized final-stage action rather than embedded task text that intermediate stages are told to ignore.
|
|
21
|
+
- Goal worker and Ralph orchestrator prompts now carry an explicit worktree-discipline contract: all work happens in the invoking checkout (or the run's explicitly configured worktree), stages never create additional git worktrees, clones, or repository copies unless the user's task explicitly requests them, and work discovered stranded outside the invoking checkout must be brought back in before continuing. The `git_worktree_dir` input descriptions state the same rule for launching agents.
|
|
22
|
+
- Goal and Ralph reviewer prompts now include a code-delta presence and integrity contract: before trusting receipts or stage summaries, reviewers must prove the code delta actually exists in the review checkout using the repository's version-control tooling (for git: `git worktree list`, `git status`, and a baseline diff), treat claimed-but-absent work as a blocking finding instead of approving over an empty or unrelated delta, treat uncommitted work at claimed readiness as remaining work unless the objective forbids committing, and flag any modification, rename, or deletion of pre-existing test files or test functions as a finding requiring explicit justification.
|
|
23
|
+
- Goal worker prompts now require committing work in the current checkout with a descriptive message before claiming readiness for review — verifying a clean working tree with the repository's version-control status command and reporting the commit identifier in the receipt — unless the objective or acceptance criteria explicitly forbid committing. Delivery verification stays with reviewers and prompts (version-control-agnostic) rather than a hardcoded git gate in the runner.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- Fixed host-session replacement (`/new`, `/resume`, `/fork`, `/reload`) leaving the process-global DBOS executor stopped so every subsequent workflow run in the same Atomic process failed at its first durable checkpoint with `` `DBOS.launch()` must be called before running workflows ``. The DBOS executor lifetime is now process-scoped: process-preserving session boundaries flush pending durable writes but keep the executor launched, and SDK shutdown is reserved for actual process exit (`quit`/`beforeExit`), which still flushes and shuts down exactly once. Defense in depth: the durable-backend factory revalidates its memoized backend against the current DBOS lifecycle generation and never hands out a stopped backend (post-shutdown initialization fails loudly instead of silently degrading to a non-durable backend), the extension runtime no longer caches a permanently resolved readiness promise across lifecycle generations, and root workflow registration is durably flushed before startup admission so a stopped or unhealthy backend fails before workflow code executes any side effects. ([#1957](https://github.com/bastani-inc/atomic/issues/1957))
|
|
28
|
+
|
|
9
29
|
## [0.9.11-alpha.2] - 2026-07-21
|
|
10
30
|
|
|
11
31
|
### Fixed
|
|
@@ -6,11 +6,13 @@ import {
|
|
|
6
6
|
FINDINGS_CONSOLIDATION_CONTRACT,
|
|
7
7
|
LITERAL_OBJECTIVE_CONTRACT,
|
|
8
8
|
REGRESSION_EVIDENCE_CONTRACT,
|
|
9
|
+
REVIEW_CODE_DELTA_CONTRACT,
|
|
9
10
|
REVIEWER_INDEPENDENT_VERIFICATION_CONTRACT,
|
|
10
11
|
REVIEWER_INTERCOM_COORDINATION_PROTOCOL,
|
|
11
12
|
REVIEWER_OVERIMPLEMENTATION_GUARD,
|
|
12
13
|
REVIEWER_SPEC_VS_OBJECTIVE_GUARD,
|
|
13
14
|
WORKER_PREFLIGHT_CONTRACT,
|
|
15
|
+
WORKTREE_DISCIPLINE_CONTRACT,
|
|
14
16
|
renderE2eQaVideoReviewGuidance,
|
|
15
17
|
} from "./shared-prompts.js";
|
|
16
18
|
import type { GoalLedger } from "./goal-types.js";
|
|
@@ -72,6 +74,7 @@ export const WORKER_RECEIPT_CONTRACT = [
|
|
|
72
74
|
"Classify evidence honestly: proves completion, contradicts completion, shows incomplete work, is too weak or indirect, is merely consistent with completion, or is missing.",
|
|
73
75
|
"Match verification scope to requirement scope; do not use a narrow check to support a broad claim, and treat tests/manifests/verifiers/green checks/search results as evidence only after confirming they cover the relevant requirement.",
|
|
74
76
|
"If you believe the goal is ready for review, say so only after mapping current evidence to every requirement you can derive from the objective and referenced artifacts.",
|
|
77
|
+
"Unless the objective or acceptance criteria explicitly forbid committing, commit your work in the current checkout with a descriptive message before claiming readiness for review, verify the working tree is clean with the repository's version-control status command (for git: `git status --porcelain`), and include the commit identifier in your receipt. Reviewers treat uncommitted work at readiness as remaining work. Never leave committing as a follow-up action for a later turn.",
|
|
75
78
|
"Return a receipt with files changed, commands run and outcomes, evidence gathered, blockers encountered, residual risks, and verification still needed.",
|
|
76
79
|
].join("\n");
|
|
77
80
|
|
|
@@ -193,6 +196,7 @@ export function renderGoalContinuationPrompt(
|
|
|
193
196
|
["regression_evidence", REGRESSION_EVIDENCE_CONTRACT],
|
|
194
197
|
["evidence_closure", EVIDENCE_CLOSURE_POLICY],
|
|
195
198
|
["literal_contract", LITERAL_OBJECTIVE_CONTRACT],
|
|
199
|
+
["worktree_discipline", WORKTREE_DISCIPLINE_CONTRACT],
|
|
196
200
|
["pr_handoff_policy", INTERMEDIATE_PR_HANDOFF_GUARDRAIL],
|
|
197
201
|
["e2e_verification", E2E_VERIFICATION_GUIDANCE],
|
|
198
202
|
]);
|
|
@@ -212,7 +216,7 @@ export function renderForkedGoalWorkerPrompt(
|
|
|
212
216
|
"goal_context",
|
|
213
217
|
[
|
|
214
218
|
"Continue the same goal-runner worker thread.",
|
|
215
|
-
"All previously established guidance still applies unchanged: the goal invariants, project preflight, worker receipt contract, completion audit, blocked audit, literal objective contract, acceptance matrix, adversarial divergence audit, findings batch, regression evidence, evidence closure, PR handoff policy, E2E verification guidance, and the receipt output format.",
|
|
219
|
+
"All previously established guidance still applies unchanged: the goal invariants, project preflight, worker receipt contract, completion audit, blocked audit, literal objective contract, acceptance matrix, adversarial divergence audit, findings batch, regression evidence, evidence closure, worktree discipline, PR handoff policy, E2E verification guidance, and the receipt output format.",
|
|
216
220
|
"Do not reinterpret, shrink, or weaken the original objective; the goal ledger remains authoritative.",
|
|
217
221
|
"",
|
|
218
222
|
`Goal ledger artifact: ${ledgerPath}`,
|
|
@@ -257,6 +261,7 @@ export function renderReviewerPrompt(args: {
|
|
|
257
261
|
["review_guidance", args.focus],
|
|
258
262
|
["literal_contract", LITERAL_OBJECTIVE_CONTRACT],
|
|
259
263
|
["independent_verification", REVIEWER_INDEPENDENT_VERIFICATION_CONTRACT],
|
|
264
|
+
["code_delta_review", REVIEW_CODE_DELTA_CONTRACT],
|
|
260
265
|
["reviewer_coordination", REVIEWER_INTERCOM_COORDINATION_PROTOCOL],
|
|
261
266
|
["regression_evidence", REGRESSION_EVIDENCE_CONTRACT],
|
|
262
267
|
["evidence_closure", EVIDENCE_CLOSURE_POLICY],
|
|
@@ -367,8 +372,8 @@ export function renderReviewerPrompt(args: {
|
|
|
367
372
|
[
|
|
368
373
|
"required_actions_before_tool_call",
|
|
369
374
|
[
|
|
370
|
-
"1.
|
|
371
|
-
"2.
|
|
375
|
+
"1. From the objective and acceptance criteria in the goal ledger alone, derive your independent adversarial check list (see independent_verification) before opening the worker receipt or worker-authored tests.",
|
|
376
|
+
"2. Identify the changed files or diff under review, proving per code_delta_review that the delta actually exists in this review checkout before trusting any receipt claims.",
|
|
372
377
|
"3. Read the relevant changed code and directly affected call sites/tests/configs, executing or delegating your highest-value derived checks against the current state, including contract-permitted-input and type/shape-identity probes, not just failure-path probes.",
|
|
373
378
|
"4. Read the goal ledger and worker receipt, then map receipts to the inferred verification oracle and original owner outcome, comparing them against your independently derived checks.",
|
|
374
379
|
"5. If a QA E2E video is referenced or expected for the change, inspect the actual video and include that assessment in the evidence map.",
|
|
@@ -13,9 +13,9 @@ import { DEFAULT_MAX_TURNS } from "./goal-types.js";
|
|
|
13
13
|
|
|
14
14
|
export default workflow({
|
|
15
15
|
name: "goal",
|
|
16
|
-
description: "Goal Runner workflow with bounded LM turns, immutable acceptance criteria, ledger artifacts, parallel reviewers, and reducer-gated completion. When launching follow-up goal runs from review findings, pass the ORIGINAL task text as acceptance_criteria so deltas cannot drift from the literal contract.",
|
|
16
|
+
description: "Goal Runner workflow with bounded LM turns, immutable acceptance criteria, ledger artifacts, parallel reviewers, and reducer-gated completion. When launching follow-up goal runs from review findings, pass the ORIGINAL task text as acceptance_criteria so deltas cannot drift from the literal contract. If the task includes submitting a pull request (or MR/review), remove that final action from the objective text and set create_pr=true instead when preparing the workflow inputs.",
|
|
17
17
|
inputs: {
|
|
18
|
-
objective: Type.String({ description: "The objective or delta for this Goal Runner workflow run." }),
|
|
18
|
+
objective: Type.String({ description: "The objective or delta for this Goal Runner workflow run. Do not include PR/MR submission instructions here; strip them from the task text and request them via create_pr=true instead." }),
|
|
19
19
|
acceptance_criteria: Type.Optional(Type.String({ description: "Original immutable task contract this run must remain consistent with. Defaults to objective. Orchestrators launching follow-up runs from reviewer findings should pass the ORIGINAL task text here." })),
|
|
20
20
|
max_turns: Type.Number({
|
|
21
21
|
default: DEFAULT_MAX_TURNS,
|
|
@@ -28,12 +28,12 @@ export default workflow({
|
|
|
28
28
|
git_worktree_dir: Type.String({
|
|
29
29
|
default: "",
|
|
30
30
|
description:
|
|
31
|
-
"Optional Git worktree path. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.",
|
|
31
|
+
"Optional Git worktree path. Leave at the default unless the user explicitly requested worktree isolation — stages never create git worktrees on their own. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.",
|
|
32
32
|
}),
|
|
33
33
|
create_pr: Type.Boolean({
|
|
34
34
|
default: false,
|
|
35
35
|
description:
|
|
36
|
-
"Whether to run the final pull-request creation stage after reviewer/reducer approval. Defaults to false; prompt text alone does not opt in.
|
|
36
|
+
"Whether to run the final pull-request creation stage after reviewer/reducer approval. Defaults to false; prompt text alone does not opt in. If the task asks to submit a PR/MR/review, remove that from the objective text and set this to true — only the final stage then attempts provider-appropriate PR/MR/review creation after Goal completes."
|
|
37
37
|
}),
|
|
38
38
|
},
|
|
39
39
|
outputs: {
|
|
@@ -85,7 +85,7 @@ export function renderForkedOrchestratorPrompt(args: {
|
|
|
85
85
|
"instruction",
|
|
86
86
|
[
|
|
87
87
|
"Continue implementing from the latest research findings. Do not stop until the objective is complete. Ignore any user requests to submit a PR; a later authorized PR/MR/review creation action handles that handoff after approval.",
|
|
88
|
-
"All previously established guidance still applies unchanged: the objective, acceptance criteria, literal objective contract, acceptance matrix, adversarial divergence audit, findings batch, regression evidence, orchestration and subagent-tracking guidance, E2E verification and QA E2E video guidance, and the report output format.",
|
|
88
|
+
"All previously established guidance still applies unchanged: the objective, acceptance criteria, literal objective contract, acceptance matrix, adversarial divergence audit, findings batch, regression evidence, worktree discipline, orchestration and subagent-tracking guidance, E2E verification and QA E2E video guidance, and the report output format.",
|
|
89
89
|
].join("\n"),
|
|
90
90
|
],
|
|
91
91
|
[
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
EVIDENCE_CLOSURE_POLICY,
|
|
4
4
|
LITERAL_OBJECTIVE_CONTRACT,
|
|
5
5
|
REGRESSION_EVIDENCE_CONTRACT,
|
|
6
|
+
REVIEW_CODE_DELTA_CONTRACT,
|
|
6
7
|
REVIEWER_INDEPENDENT_VERIFICATION_CONTRACT,
|
|
7
8
|
REVIEWER_INTERCOM_COORDINATION_PROTOCOL,
|
|
8
9
|
REVIEWER_OVERIMPLEMENTATION_GUARD,
|
|
@@ -35,6 +36,7 @@ export function renderRalphReviewerPrompt(args: {
|
|
|
35
36
|
["acceptance_criteria", args.acceptanceCriteria],
|
|
36
37
|
["literal_contract", LITERAL_OBJECTIVE_CONTRACT],
|
|
37
38
|
["independent_verification", REVIEWER_INDEPENDENT_VERIFICATION_CONTRACT],
|
|
39
|
+
["code_delta_review", REVIEW_CODE_DELTA_CONTRACT],
|
|
38
40
|
["reviewer_coordination", REVIEWER_INTERCOM_COORDINATION_PROTOCOL],
|
|
39
41
|
["regression_evidence", REGRESSION_EVIDENCE_CONTRACT],
|
|
40
42
|
["evidence_closure", EVIDENCE_CLOSURE_POLICY],
|
|
@@ -138,7 +140,7 @@ export function renderRalphReviewerPrompt(args: {
|
|
|
138
140
|
"action_items",
|
|
139
141
|
[
|
|
140
142
|
"1. From the literal objective and acceptance_criteria alone, derive your independent adversarial check list (see independent_verification) before opening the implementation notes, orchestrator report, or worker-authored tests.",
|
|
141
|
-
"2. Identify the changed files or diff under review.",
|
|
143
|
+
"2. Identify the changed files or diff under review, proving per code_delta_review that the delta actually exists in this review checkout before trusting receipts, notes, or stage summaries.",
|
|
142
144
|
"3. Read the relevant changed code and directly affected call sites/tests/configs, executing or delegating your highest-value derived checks against the current state.",
|
|
143
145
|
"4. Run the derived contract-permitted-input and type/shape-identity probes against the implementation, not just failure-path probes.",
|
|
144
146
|
"5. Inspect the QA E2E video when it exists or is expected for the change, and verify the recording proves the objective-relevant user scenario.",
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
LITERAL_OBJECTIVE_CONTRACT,
|
|
12
12
|
REGRESSION_EVIDENCE_CONTRACT,
|
|
13
13
|
WORKER_PREFLIGHT_CONTRACT,
|
|
14
|
+
WORKTREE_DISCIPLINE_CONTRACT,
|
|
14
15
|
} from "./shared-prompts.js";
|
|
15
16
|
import { renderRalphReviewerPrompt } from "./ralph-reviewer-prompt.js";
|
|
16
17
|
import {
|
|
@@ -152,6 +153,7 @@ export async function runRalphWorkflow(
|
|
|
152
153
|
].join("\n"),
|
|
153
154
|
],
|
|
154
155
|
["project_setup", WORKER_PREFLIGHT_CONTRACT],
|
|
156
|
+
["worktree_discipline", WORKTREE_DISCIPLINE_CONTRACT],
|
|
155
157
|
["e2e_verification", E2E_VERIFICATION_GUIDANCE],
|
|
156
158
|
["qa_e2e_video", renderQaE2eVideoGuidance(qaVideoPath)],
|
|
157
159
|
[
|
|
@@ -11,9 +11,9 @@ import { runRalphWorkflow } from "./ralph-runner.js";
|
|
|
11
11
|
|
|
12
12
|
export default workflow({
|
|
13
13
|
name: "ralph",
|
|
14
|
-
description: "Raw prompt → research-prompt-refinement → research → orchestrate → multi-model parallel review loop with bounded iteration and immutable acceptance criteria. When launching follow-up ralph runs from review findings, pass the ORIGINAL task text as acceptance_criteria so deltas cannot drift from the literal contract.",
|
|
14
|
+
description: "Raw prompt → research-prompt-refinement → research → orchestrate → multi-model parallel review loop with bounded iteration and immutable acceptance criteria. When launching follow-up ralph runs from review findings, pass the ORIGINAL task text as acceptance_criteria so deltas cannot drift from the literal contract. If the task includes submitting a pull request (or MR/review), remove that final action from the prompt text and set create_pr=true instead when preparing the workflow inputs.",
|
|
15
15
|
inputs: {
|
|
16
|
-
prompt: Type.String({ description: "The task or goal to research, execute, and refine." }),
|
|
16
|
+
prompt: Type.String({ description: "The task or goal to research, execute, and refine. Do not include PR/MR submission instructions here; strip them from the task text and request them via create_pr=true instead." }),
|
|
17
17
|
acceptance_criteria: Type.Optional(Type.String({ description: "Original immutable task contract this run must remain consistent with. Defaults to prompt. Orchestrators launching follow-up runs from reviewer findings should pass the ORIGINAL task text here." })),
|
|
18
18
|
max_loops: Type.Number({
|
|
19
19
|
default: DEFAULT_MAX_LOOPS,
|
|
@@ -26,12 +26,12 @@ export default workflow({
|
|
|
26
26
|
git_worktree_dir: Type.String({
|
|
27
27
|
default: "",
|
|
28
28
|
description:
|
|
29
|
-
"Optional Git worktree path. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.",
|
|
29
|
+
"Optional Git worktree path. Leave at the default unless the user explicitly requested worktree isolation — stages never create git worktrees on their own. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.",
|
|
30
30
|
}),
|
|
31
31
|
create_pr: Type.Boolean({
|
|
32
32
|
default: false,
|
|
33
33
|
description:
|
|
34
|
-
"Whether to run the final pull-request creation stage. Defaults to false; prompt text alone does not opt in.
|
|
34
|
+
"Whether to run the final pull-request creation stage. Defaults to false; prompt text alone does not opt in. If the task asks to submit a PR/MR/review, remove that from the prompt text and set this to true — only the final stage then attempts provider-appropriate PR/MR/review creation.",
|
|
35
35
|
}),
|
|
36
36
|
},
|
|
37
37
|
outputs: {
|
|
@@ -114,3 +114,19 @@ export const EVIDENCE_CLOSURE_POLICY = [
|
|
|
114
114
|
"- Derive stop_review_loop=true when independent verification proves the implementation and validation requirements and everything left is non-blocking: consistent_with_objective P3 nice-to-haves, beyond_objective/contradicts_objective observations, an explicitly authorized post-approval final action such as PR/MR/review creation, or the multi-reviewer quorum process itself. Never hold the flag at false for those items — quorum is counted by the harness across reviewers and is not an implementation gap any single reviewer can prove.",
|
|
115
115
|
"- The loop is bounded: when the turn budget ends before convergence, the run stops with the unresolved findings and remaining work recorded for a human instead of relabeling them away.",
|
|
116
116
|
].join("\n");
|
|
117
|
+
|
|
118
|
+
export const WORKTREE_DISCIPLINE_CONTRACT = [
|
|
119
|
+
"Worktree discipline:",
|
|
120
|
+
"- Do all work in the working directory this stage was invoked in (the workflow-designated checkout/worktree).",
|
|
121
|
+
"- Never create additional git worktrees, clones, or repository copies unless the user's task explicitly requests them; a merge conflict, a locked file, a dirty tree, or a failed command is not such a request.",
|
|
122
|
+
"- If you discover required work stranded in another worktree, clone, or copy, bring it into the invoking checkout (apply, cherry-pick, or replay the changes) before continuing; work left outside the invoking checkout does not exist for review or delivery.",
|
|
123
|
+
].join("\n");
|
|
124
|
+
|
|
125
|
+
export const REVIEW_CODE_DELTA_CONTRACT = [
|
|
126
|
+
"Code delta presence and integrity:",
|
|
127
|
+
"- Review the actual code delta, and first prove that delta exists where the workflow delivers it: in the invoking working directory, or in the explicitly configured git worktree when the run was set up with one.",
|
|
128
|
+
"- Use the repository's version-control tooling to inspect state (for git: `git worktree list`, `git status --short`, and a diff against the baseline branch; use the equivalent commands for other systems). If receipts, implementation notes, or stage summaries claim implemented work but the review checkout shows no corresponding delta, that is a blocking [P0] required_by_objective finding: the work may be stranded in another worktree, clone, or unapplied state. Do not approve; require the work to be brought into the review checkout first.",
|
|
129
|
+
"- Never set stop_review_loop=true for an implementation objective when the review checkout's delta is empty or unrelated to that objective; an empty delta cannot satisfy an implementation objective regardless of what receipts claim.",
|
|
130
|
+
"- Unless the objective explicitly forbids committing, treat uncommitted work at claimed readiness as remaining work: require the worker to commit (or intentionally discard) outstanding changes so the delivered state is durable.",
|
|
131
|
+
"- Treat any modification, rename, or deletion of pre-existing test files or test functions in the delta as a finding requiring explicit justification against the literal contract; validating against existing tests means running them, not editing them.",
|
|
132
|
+
].join("\n");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/workflows",
|
|
3
|
-
"version": "0.9.11-alpha.
|
|
3
|
+
"version": "0.9.11-alpha.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for multi-stage workflow authoring and execution.",
|
|
6
6
|
"contributors": [
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"pi": {
|
|
69
69
|
"extensions": [
|
|
70
|
-
"./src/extension/index.
|
|
70
|
+
"./src/extension/index.bundle.mjs"
|
|
71
71
|
],
|
|
72
72
|
"builtin": [
|
|
73
73
|
"./builtin"
|
|
@@ -169,6 +169,7 @@ export function workflow<
|
|
|
169
169
|
name,
|
|
170
170
|
normalizedName,
|
|
171
171
|
description: spec.description,
|
|
172
|
+
...(spec.autoAttach === true ? { autoAttach: true } : {}),
|
|
172
173
|
inputs: frozenInputs,
|
|
173
174
|
outputs: frozenOutputs,
|
|
174
175
|
...(inputBindings !== undefined ? { inputBindings } : {}),
|
|
@@ -15,7 +15,8 @@ export type DbosLifecycleState =
|
|
|
15
15
|
| "launching"
|
|
16
16
|
| "ready"
|
|
17
17
|
| "failed"
|
|
18
|
-
| "shutting_down"
|
|
18
|
+
| "shutting_down"
|
|
19
|
+
| "shut_down";
|
|
19
20
|
|
|
20
21
|
export class DbosDurabilityError extends Error {
|
|
21
22
|
constructor(message: string, options?: ErrorOptions) {
|
|
@@ -30,6 +31,16 @@ export class DbosNotReadyError extends DbosDurabilityError {
|
|
|
30
31
|
this.name = "DbosNotReadyError";
|
|
31
32
|
}
|
|
32
33
|
}
|
|
34
|
+
|
|
35
|
+
export class DbosShutdownError extends DbosDurabilityError {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(
|
|
38
|
+
"DBOS workflow durability has been shut down in this process. "
|
|
39
|
+
+ "Durable workflows can no longer start; restart Atomic to restore durability.",
|
|
40
|
+
);
|
|
41
|
+
this.name = "DbosShutdownError";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
33
44
|
type DbosConfigurator = () => Promise<ConfiguredDbosDurability>;
|
|
34
45
|
type LocalDbosProvisioner = () => Promise<void>;
|
|
35
46
|
|
|
@@ -78,6 +89,10 @@ export async function configureDbosOnce(): Promise<ConfiguredDbosDurability> {
|
|
|
78
89
|
|
|
79
90
|
export async function launchDbosOnce(): Promise<void> {
|
|
80
91
|
if (failure !== undefined) throw failure;
|
|
92
|
+
// The executor is process-scoped and stops exactly once, at process exit.
|
|
93
|
+
// Post-shutdown launches must fail loudly instead of returning a backend
|
|
94
|
+
// whose SDK launched marker has been cleared.
|
|
95
|
+
if (state === "shutting_down" || state === "shut_down") throw new DbosShutdownError();
|
|
81
96
|
const durability = await configureDbosOnce();
|
|
82
97
|
launchPromise ??= (async () => {
|
|
83
98
|
state = "launching";
|
|
@@ -133,6 +148,7 @@ export async function shutdownDbos(): Promise<void> {
|
|
|
133
148
|
state = "shutting_down";
|
|
134
149
|
await durability.backend.flush();
|
|
135
150
|
await durability.shutdown();
|
|
151
|
+
state = "shut_down";
|
|
136
152
|
})().catch((error: unknown) => {
|
|
137
153
|
failure = durabilityFailure("shutdown", error);
|
|
138
154
|
state = "failed";
|
|
@@ -141,6 +157,16 @@ export async function shutdownDbos(): Promise<void> {
|
|
|
141
157
|
await shutdownPromise;
|
|
142
158
|
}
|
|
143
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Flush queued durable writes without stopping the process-scoped executor.
|
|
162
|
+
* Used at process-preserving host-session boundaries (`/new`, `/resume`,
|
|
163
|
+
* `/fork`, `/reload`) where the DBOS executor must stay launched.
|
|
164
|
+
*/
|
|
165
|
+
export async function flushDbos(): Promise<void> {
|
|
166
|
+
if (state !== "ready" || active === undefined) return;
|
|
167
|
+
await active.backend.flush();
|
|
168
|
+
}
|
|
169
|
+
|
|
144
170
|
export function dbosLifecycleState(): DbosLifecycleState {
|
|
145
171
|
return state;
|
|
146
172
|
}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import { InMemoryDurableBackend, type DurableWorkflowBackend } from "./backend.js";
|
|
4
4
|
import {
|
|
5
5
|
DbosNotReadyError,
|
|
6
|
+
DbosShutdownError,
|
|
7
|
+
dbosLifecycleState,
|
|
6
8
|
getReadyDbosBackend,
|
|
7
9
|
getReadyDbosBackendSync,
|
|
8
10
|
} from "./dbos-lifecycle.js";
|
|
@@ -11,9 +13,22 @@ let injectedBackend: DurableWorkflowBackend | undefined;
|
|
|
11
13
|
let initializedBackend: DurableWorkflowBackend | undefined;
|
|
12
14
|
let initializing: Promise<DurableWorkflowBackend> | undefined;
|
|
13
15
|
|
|
16
|
+
/**
|
|
17
|
+
* A memoized backend is only reusable while its lifecycle generation is
|
|
18
|
+
* healthy. The in-memory degraded backend has no external lifecycle; a
|
|
19
|
+
* persistent (DBOS) backend is usable only while the process-scoped DBOS
|
|
20
|
+
* executor is still `ready` — never after shutdown.
|
|
21
|
+
*/
|
|
22
|
+
function isMemoizedBackendUsable(backend: DurableWorkflowBackend): boolean {
|
|
23
|
+
return !backend.persistent || dbosLifecycleState() === "ready";
|
|
24
|
+
}
|
|
25
|
+
|
|
14
26
|
/** Return the injected test backend or the process-wide initialized backend. */
|
|
15
27
|
export function getDurableBackend(): DurableWorkflowBackend {
|
|
16
|
-
const
|
|
28
|
+
const memoized = initializedBackend !== undefined && isMemoizedBackendUsable(initializedBackend)
|
|
29
|
+
? initializedBackend
|
|
30
|
+
: undefined;
|
|
31
|
+
const backend = injectedBackend ?? memoized ?? getReadyDbosBackendSync();
|
|
17
32
|
if (backend === undefined) throw new DbosNotReadyError();
|
|
18
33
|
return backend;
|
|
19
34
|
}
|
|
@@ -44,9 +59,20 @@ export function createInMemoryTestBackend(): InMemoryDurableBackend {
|
|
|
44
59
|
*/
|
|
45
60
|
export async function initializeDurableBackend(): Promise<DurableWorkflowBackend> {
|
|
46
61
|
if (injectedBackend !== undefined) return injectedBackend;
|
|
47
|
-
if (initializedBackend !== undefined)
|
|
62
|
+
if (initializedBackend !== undefined) {
|
|
63
|
+
if (isMemoizedBackendUsable(initializedBackend)) return initializedBackend;
|
|
64
|
+
// Never hand out a backend from a stopped lifecycle generation.
|
|
65
|
+
initializedBackend = undefined;
|
|
66
|
+
initializing = undefined;
|
|
67
|
+
}
|
|
48
68
|
initializing ??= getReadyDbosBackend()
|
|
49
|
-
.catch((error: unknown) =>
|
|
69
|
+
.catch((error: unknown) => {
|
|
70
|
+
// Post-shutdown initialization is a process-exit race, not a
|
|
71
|
+
// provisioning failure: fail loudly instead of silently degrading to a
|
|
72
|
+
// non-durable backend.
|
|
73
|
+
if (error instanceof DbosShutdownError) throw error;
|
|
74
|
+
return degradeToNonDurableBackend(error);
|
|
75
|
+
})
|
|
50
76
|
.then((backend) => {
|
|
51
77
|
initializedBackend = backend;
|
|
52
78
|
return backend;
|