@bastani/atomic 0.8.28-alpha.1 → 0.8.28-alpha.3
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 +60 -0
- package/README.md +120 -118
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +26 -0
- package/dist/builtin/workflows/README.md +1 -1
- package/dist/builtin/workflows/builtin/open-claude-design.ts +150 -13
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/authoring.d.ts +5 -2
- package/dist/builtin/workflows/src/extension/dispatcher.ts +2 -0
- package/dist/builtin/workflows/src/extension/index.ts +8 -0
- package/dist/builtin/workflows/src/extension/render-result.ts +5 -2
- package/dist/builtin/workflows/src/extension/workflow-schema.ts +18 -0
- package/dist/builtin/workflows/src/runs/background/status.ts +4 -0
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +1251 -110
- package/dist/builtin/workflows/src/shared/authoring-contract.d.ts +34 -10
- package/dist/builtin/workflows/src/shared/expanded-workflow-graph.ts +10 -2
- package/dist/builtin/workflows/src/shared/persistence-restore.ts +28 -9
- package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +9 -3
- package/dist/builtin/workflows/src/shared/store-types.ts +10 -3
- package/dist/builtin/workflows/src/shared/store.ts +29 -7
- package/dist/builtin/workflows/src/shared/types.ts +12 -10
- package/dist/builtin/workflows/src/tui/chat-surface.ts +32 -33
- package/dist/builtin/workflows/src/tui/run-detail.ts +23 -4
- package/dist/builtin/workflows/src/tui/status-helpers.ts +4 -0
- package/dist/builtin/workflows/src/tui/status-list.ts +47 -3
- package/dist/builtin/workflows/src/tui/store-widget-installer.ts +1 -1
- package/dist/builtin/workflows/src/tui/widget.ts +12 -3
- package/dist/builtin/workflows/src/workflows/define-workflow.ts +3 -3
- package/dist/cli/args.d.ts +4 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +35 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/project-trust.d.ts +10 -0
- package/dist/cli/project-trust.d.ts.map +1 -0
- package/dist/cli/project-trust.js +36 -0
- package/dist/cli/project-trust.js.map +1 -0
- package/dist/cli/startup-ui.d.ts +7 -0
- package/dist/cli/startup-ui.d.ts.map +1 -0
- package/dist/cli/startup-ui.js +57 -0
- package/dist/cli/startup-ui.js.map +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +24 -3
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +3 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +1 -0
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +3 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +3 -2
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +9 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +70 -21
- package/dist/core/agent-session.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/compaction/branch-summarization.d.ts +3 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +9 -3
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +18 -24
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +1 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/experimental.d.ts +2 -0
- package/dist/core/experimental.d.ts.map +1 -0
- package/dist/core/experimental.js +5 -0
- package/dist/core/experimental.js.map +1 -0
- package/dist/core/export-html/template.js +19 -6
- 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.d.ts +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +6 -4
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +11 -4
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +53 -3
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +34 -4
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +2 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +27 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +64 -7
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -0
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/output-guard.d.ts +1 -0
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js +52 -22
- package/dist/core/output-guard.js.map +1 -1
- package/dist/core/package-manager.d.ts +1 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +20 -8
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/project-trust.d.ts +15 -0
- package/dist/core/project-trust.d.ts.map +1 -0
- package/dist/core/project-trust.js +58 -0
- package/dist/core/project-trust.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +5 -4
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +30 -29
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-attribution.d.ts +4 -0
- package/dist/core/provider-attribution.d.ts.map +1 -0
- package/dist/core/provider-attribution.js +73 -0
- package/dist/core/provider-attribution.js.map +1 -0
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +3 -0
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts +9 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js +134 -11
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts +12 -2
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +108 -18
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts +4 -2
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +13 -42
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +6 -7
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +99 -35
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +15 -2
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +69 -10
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- 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 +0 -3
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/inline-input.d.ts +28 -0
- package/dist/core/tools/ask-user-question/state/inline-input.d.ts.map +1 -0
- package/dist/core/tools/ask-user-question/state/inline-input.js +56 -0
- package/dist/core/tools/ask-user-question/state/inline-input.js.map +1 -0
- package/dist/core/tools/ask-user-question/state/key-router.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/key-router.js +30 -4
- package/dist/core/tools/ask-user-question/state/key-router.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/questionnaire-session.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/questionnaire-session.js +9 -8
- package/dist/core/tools/ask-user-question/state/questionnaire-session.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/row-intent.d.ts +3 -2
- package/dist/core/tools/ask-user-question/state/row-intent.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/row-intent.js +1 -1
- package/dist/core/tools/ask-user-question/state/row-intent.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/contract.d.ts +2 -0
- package/dist/core/tools/ask-user-question/state/selectors/contract.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/contract.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/projections.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/projections.js +2 -0
- package/dist/core/tools/ask-user-question/state/selectors/projections.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/state-reducer.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/state-reducer.js +36 -24
- package/dist/core/tools/ask-user-question/state/state-reducer.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/state.d.ts +8 -0
- package/dist/core/tools/ask-user-question/state/state.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/state.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.d.ts +6 -0
- package/dist/core/tools/ask-user-question/tool/format-answer.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.js +19 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts +3 -2
- package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/response-envelope.js +15 -3
- package/dist/core/tools/ask-user-question/tool/response-envelope.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/types.d.ts +2 -1
- package/dist/core/tools/ask-user-question/tool/types.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/types.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/chat-row-view.d.ts +5 -2
- package/dist/core/tools/ask-user-question/view/components/chat-row-view.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/chat-row-view.js +2 -0
- package/dist/core/tools/ask-user-question/view/components/chat-row-view.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/wrapping-select.d.ts +1 -0
- package/dist/core/tools/ask-user-question/view/components/wrapping-select.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/wrapping-select.js +2 -1
- package/dist/core/tools/ask-user-question/view/components/wrapping-select.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/props-adapter.d.ts +3 -3
- package/dist/core/tools/ask-user-question/view/props-adapter.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/props-adapter.js +11 -4
- package/dist/core/tools/ask-user-question/view/props-adapter.js.map +1 -1
- package/dist/core/tools/bash-policy.d.ts +62 -0
- package/dist/core/tools/bash-policy.d.ts.map +1 -0
- package/dist/core/tools/bash-policy.js +1069 -0
- package/dist/core/tools/bash-policy.js.map +1 -0
- package/dist/core/tools/bash.d.ts +5 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +9 -1
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +7 -10
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +1 -0
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +1 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/oversized-tool-result.d.ts +53 -0
- package/dist/core/tools/oversized-tool-result.d.ts.map +1 -0
- package/dist/core/tools/oversized-tool-result.js +206 -0
- package/dist/core/tools/oversized-tool-result.js.map +1 -0
- package/dist/core/tools/read.d.ts +12 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +99 -34
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +6 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +17 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +6 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js +2 -0
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/tool-limits.d.ts +25 -0
- package/dist/core/tools/tool-limits.d.ts.map +1 -0
- package/dist/core/tools/tool-limits.js +25 -0
- package/dist/core/tools/tool-limits.js.map +1 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +1 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts +31 -0
- package/dist/core/trust-manager.d.ts.map +1 -0
- package/dist/core/trust-manager.js +196 -0
- package/dist/core/trust-manager.js.map +1 -0
- package/dist/index.d.ts +11 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +142 -30
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts +3 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +325 -7
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +2 -2
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +6 -0
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +9 -16
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +22 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/trust-selector.js +85 -0
- package/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +1 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +9 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +130 -9
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +10 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +1 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +3 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +50 -6
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +23 -4
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +1 -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 +6 -2
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +104 -10
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/changelog.d.ts +1 -0
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +72 -0
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/deprecation.d.ts +4 -0
- package/dist/utils/deprecation.d.ts.map +1 -0
- package/dist/utils/deprecation.js +13 -0
- package/dist/utils/deprecation.js.map +1 -0
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +54 -22
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/json.d.ts +3 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +7 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/open-browser.d.ts +9 -0
- package/dist/utils/open-browser.d.ts.map +1 -0
- package/dist/utils/open-browser.js +22 -0
- package/dist/utils/open-browser.js.map +1 -0
- package/docs/containerization.md +111 -0
- package/docs/custom-provider.md +9 -9
- package/docs/development.md +1 -1
- package/docs/docs.json +2 -0
- package/docs/extensions.md +40 -4
- package/docs/index.md +2 -0
- package/docs/models.md +10 -10
- package/docs/packages.md +1 -1
- package/docs/prompt-templates.md +9 -2
- package/docs/providers.md +18 -5
- package/docs/quickstart.md +1 -0
- package/docs/rpc.md +3 -2
- package/docs/sdk.md +47 -0
- package/docs/security.md +58 -0
- package/docs/session-format.md +2 -2
- package/docs/sessions.md +8 -0
- package/docs/settings.md +21 -4
- package/docs/skills.md +1 -1
- package/docs/terminal-setup.md +44 -2
- package/docs/themes.md +1 -1
- package/docs/tmux.md +4 -2
- package/docs/tui.md +14 -5
- package/docs/usage.md +17 -3
- package/docs/workflows.md +127 -15
- package/examples/README.md +1 -1
- package/examples/extensions/README.md +8 -5
- package/examples/extensions/bash-spawn-hook.ts +1 -1
- package/examples/extensions/built-in-tool-renderer.ts +1 -1
- package/examples/extensions/claude-rules.ts +1 -1
- package/examples/extensions/commands.ts +1 -1
- package/examples/extensions/custom-header.ts +1 -1
- package/examples/extensions/custom-provider-anthropic/index.ts +3 -3
- package/examples/extensions/custom-provider-anthropic/package-lock.json +4 -4
- package/examples/extensions/custom-provider-anthropic/package.json +6 -6
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +55 -4
- package/examples/extensions/custom-provider-gitlab-duo/package.json +3 -3
- package/examples/extensions/doom-overlay/README.md +1 -1
- package/examples/extensions/doom-overlay/index.ts +2 -2
- package/examples/extensions/git-merge-and-resolve.ts +115 -0
- package/examples/extensions/gondolin/index.ts +523 -0
- package/examples/extensions/gondolin/package-lock.json +185 -0
- package/examples/extensions/gondolin/package.json +19 -0
- package/examples/extensions/handoff.ts +1 -1
- package/examples/extensions/hidden-thinking-label.ts +1 -1
- package/examples/extensions/inline-bash.ts +2 -2
- package/examples/extensions/input-transform-streaming.ts +39 -0
- package/examples/extensions/input-transform.ts +3 -3
- package/examples/extensions/interactive-shell.ts +2 -2
- package/examples/extensions/mac-system-theme.ts +2 -2
- package/examples/extensions/minimal-mode.ts +1 -1
- package/examples/extensions/modal-editor.ts +1 -1
- package/examples/extensions/model-status.ts +1 -1
- package/examples/extensions/overlay-qa-tests.ts +198 -179
- package/examples/extensions/overlay-test.ts +1 -1
- package/examples/extensions/pirate.ts +1 -1
- package/examples/extensions/preset.ts +14 -12
- package/examples/extensions/project-trust.ts +64 -0
- package/examples/extensions/prompt-customizer.ts +1 -1
- package/examples/extensions/qna.ts +1 -1
- package/examples/extensions/question.ts +1 -1
- package/examples/extensions/questionnaire.ts +1 -1
- package/examples/extensions/rainbow-editor.ts +1 -1
- package/examples/extensions/sandbox/index.ts +16 -14
- package/examples/extensions/sandbox/package-lock.json +90 -90
- package/examples/extensions/sandbox/package.json +17 -17
- package/examples/extensions/snake.ts +1 -1
- package/examples/extensions/space-invaders.ts +1 -1
- package/examples/extensions/ssh.ts +2 -2
- package/examples/extensions/subagent/README.md +13 -13
- package/examples/extensions/subagent/agents.ts +4 -2
- package/examples/extensions/subagent/index.ts +6 -6
- package/examples/extensions/summarize.ts +1 -1
- package/examples/extensions/tic-tac-toe.ts +1 -1
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/extensions/todo.ts +1 -1
- package/examples/extensions/tool-override.ts +1 -1
- package/examples/extensions/tools.ts +6 -1
- package/examples/extensions/with-deps/package-lock.json +4 -4
- package/examples/extensions/with-deps/package.json +7 -7
- package/examples/extensions/working-indicator.ts +4 -4
- package/examples/extensions/working-message-test.ts +1 -1
- package/examples/sdk/01-minimal.ts +1 -1
- package/examples/sdk/03-custom-prompt.ts +1 -1
- package/examples/sdk/04-skills.ts +1 -1
- package/examples/sdk/06-extensions.ts +2 -2
- package/examples/sdk/08-prompt-templates.ts +1 -1
- package/examples/sdk/09-api-keys-and-oauth.ts +2 -2
- package/examples/sdk/README.md +2 -2
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/web-access",
|
|
3
|
-
"version": "0.8.28-alpha.
|
|
3
|
+
"version": "0.8.28-alpha.3",
|
|
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,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.8.28-alpha.3] - 2026-06-11
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added workflow stage/task `bashPolicy` wiring so individual workflow stages can constrain the built-in `bash` tool with command-level allow/deny rules, command-string glob matching, escaped glob bracket-class literal preservation, reserved/compound-head rejection, leading-redirection and attached command-head redirection rejection, non-leading `>|` noclobber redirection handling, assignment-head rejection, invalid glob range handling through `invalid-policy`, unknown top-level policy key rejection, runtime invalid-policy validation, and default-allow no-rule compatibility.
|
|
14
|
+
- Added workflow authoring `ctx.exit(options?)` for intentional early terminal runs from any call depth. `ctx.exit` supports `completed`, `skipped`, `cancelled`, and `blocked` terminal statuses, optional persisted/displayed reasons (including in the default status list), and partial declared outputs while preserving strict validation for provided output keys. This widens public run/detail/child status unions with `skipped`, `cancelled`, and `blocked`; downstream exhaustive switches should add cases for those statuses, while `failed` remains for thrown errors and `killed` remains external run-control. Child workflow results are now discriminated by `exited`: `exited: false` has full declared outputs, while `exited: true` has partial outputs plus the child exit status/reason.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Fixed `ctx.exit(...)` cleanup races so the selected exit is a level-triggered gate: delayed `ctx.stage`/`ctx.task`/`ctx.chain`/`ctx.parallel`/`ctx.workflow`/graph-backed `ctx.ui.*` calls and retained `StageContext` session-control methods no longer create graph, control, or `AgentSession` artifacts after exit; queued `ctx.parallel` work stops after exit even with `failFast: false`; parent exits cancel already-linked hidden child workflows with a typed parent-exit abort reason while the child executor owns skipped child stage/prompt cleanup, live handle/session disposal, and non-resumable `cancelled` child run finalization; parent finalization waits for that child cleanup so child `workflow.stage.end` entries are written exactly once before child and parent `workflow.run.end`; and prompt-node abort handling preserves `workflow-exit` skipped reasons instead of overwriting them with `run-aborted`.
|
|
19
|
+
- Fixed terminal run-end reconciliation after `ctx.exit(...)` cleanup races. If an external kill or another terminal writer wins `Store.recordRunEnd(...)` while exit cleanup or exit-output validation is pending, the returned `RunResult` and `onRunEnd` callback now report the canonical store status/result/error/reason (for example `killed`) and only the winning run-end write is persisted.
|
|
20
|
+
- Fixed workflow-boundary child-edge metadata cleanup for `ctx.exit(...)` and continuation replay. Boundaries that finalize as `skipped` or `failed` now clear `workflowChild`/`workflowChildRun`, stage-end persistence only emits child replay metadata for completed boundary stages, restore ignores stale child metadata on skipped/failed stage-end entries, and expanded graph views no longer flatten stale child stages from non-completed boundaries.
|
|
21
|
+
- Fixed `ctx.exit({ outputs })` payload capture to snapshot outputs by value at the first selected exit call. Later `finally` mutations can no longer remove undeclared keys or change valid/invalid values before post-cleanup validation, and option/output getter or enumeration failures now run workflow-exit cleanup before finalizing as non-resumable authoring failures when that terminal write wins.
|
|
22
|
+
- Fixed `ctx.exit(...)` exposing mutable finalization state to author code. The thrown exit signal and its captured output snapshot are now deep-frozen, so a workflow that catches the exit signal in a broad `try`/`catch` and mutates it before rethrowing can no longer rewrite the terminal status, reason, or outputs (finalization recovers the same frozen object via the run abort reason or the rethrow).
|
|
23
|
+
- Fixed continuation replay races where replayed stage `prompt`/`complete` or prompt-node finalizers could complete after a concurrent `ctx.exit(...)`. Pending replay finalizers now register with workflow-exit cleanup and re-check the exit gate after their replay microtask, so resumed runs skip/suppress those stages instead of writing misleading completed stage-end entries.
|
|
24
|
+
- Fixed control-signal probing for arbitrary workflow-thrown values and abort reasons. `ctx.exit(...)`/parent-exit detection now uses non-throwing reads for private markers, `scope`, aggregate `errors`, `cause`, and `reason`; throwing or inaccessible author accessors are ignored for that probe branch so runs finalize as ordinary failures or kills instead of leaking accessor errors from the executor catch path.
|
|
25
|
+
- Fixed interactive `ctx.ui.*` handling so workflow runs degrade gracefully instead of crashing or emitting a confusing error. Partial/method-less UI adapters could previously surface a raw `TypeError: <method> is not a function` for `input`/`confirm`/`select`/`editor` (only `custom` was already guarded); every primitive is now guarded and rejects with a clear, actionable per-method error. Separately, headless/background (non-interactive) runs without a UI adapter now reject with an explicit "interactive ctx.ui.<primitive> is unavailable in headless (non-interactive) mode…" error that points to running interactively or removing the prompt, replacing the generic "Atomic runtime did not provide a UI adapter" wording for that path. Earlier completed stages remain completed, and interactive background runs keep brokering `ctx.ui.custom` through awaiting-input prompt nodes ([#1339](https://github.com/bastani-inc/atomic/issues/1339)).
|
|
26
|
+
|
|
27
|
+
## [0.8.28-alpha.2] - 2026-06-10
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- Fixed the builtin `open-claude-design` workflow not installing the browser skill's `browse` CLI before it is needed. The workflow now runs an initial deterministic, best-effort setup step that probes `PATH` (`which`/`where browse`) and installs the CLI with `npm install -g browse` when missing (skipped under automated tests); per-run bootstrap guidance is derived from the outcome and injected into every browser-using stage (assume-available when ensured, with concrete recovery steps surfaced when the install failed), the install outcome is exposed via a new `browse_cli_status` output, and the read-only `read`/`grep`/`ls` tools are granted to the refinement and pre-export decision gates so they can inspect `preview.html` without mutating it. The step never throws or blocks the run, so stages keep their graceful-degradation fallback ([#1327](https://github.com/bastani-inc/atomic/issues/1327)).
|
|
32
|
+
- Fixed paused workflow run detail cards to surface the natural `workflow resume` action hint while preserving the interrupt hint for non-paused active runs ([#1283](https://github.com/bastani-inc/atomic/issues/1283)).
|
|
33
|
+
- Fixed paused workflow runs being counted as running and displayed as pending/running in `/workflow status` and `/workflow status <id>`, with paused runs now shown separately as `❚❚ paused` ([#1283](https://github.com/bastani-inc/atomic/issues/1283)).
|
|
34
|
+
|
|
9
35
|
## [0.8.28-alpha.1] - 2026-06-09
|
|
10
36
|
|
|
11
37
|
### Added
|
|
@@ -522,7 +522,7 @@ Press **F2** while a workflow is running to open the DAG overlay for the active
|
|
|
522
522
|
|
|
523
523
|
For interactive use, run workflows through `/workflow <name> [key=value ...]` or let the LLM call the `workflow` tool. In non-interactive (`-p` / `--print` / `--mode json`) sessions, `/workflow <name> key=value` and LLM calls to the `workflow` tool remain available for deterministic workflows. The input picker and graph picker are disabled, top-level `ctx.ui.*` is unavailable, and stage child sessions exclude `ask_user_question`. Named workflow dispatch waits for the terminal run snapshot before returning.
|
|
524
524
|
|
|
525
|
-
Because human input is runtime-only and workflows no longer carry a declaration-time HIL marker, headless dispatch does not reject a workflow just because its source contains `ctx.ui.*`. If you copy the HIL example above into a non-interactive session, it can pass dispatch and then fail when execution reaches the prompt with an error such as `atomic-workflows:
|
|
525
|
+
Because human input is runtime-only and workflows no longer carry a declaration-time HIL marker, headless dispatch does not reject a workflow just because its source contains `ctx.ui.*`. If you copy the HIL example above into a non-interactive session, it can pass dispatch and then fail when execution reaches the prompt with an error such as `atomic-workflows: interactive ctx.ui.confirm is unavailable in headless (non-interactive) mode; run the workflow in interactive mode or remove the interactive prompt from this stage` (the primitive name varies, including `ctx.ui.custom`). Run those workflows interactively, or guard/remove runtime `ctx.ui.*` calls before using headless mode.
|
|
526
526
|
|
|
527
527
|
For library or package authoring, define reusable workflows with the builder and export the compiled definition. Hand-written objects with `__piWorkflow: true` are rejected by discovery and composition; `defineWorkflow(...).compile()` is the public authoring surface. Standalone TypeScript workflow packages can import `defineWorkflow` and `Type` from `@bastani/workflows` directly with no local `.d.ts` file or `declare module` shim. The former imperative `runWorkflow` object-form API is removed; use compiled workflow definitions with the exported `run()` / registry helpers for programmatic execution.
|
|
528
528
|
|
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
* a real HTML page on disk (`preview.html`). The workflow attempts to open it
|
|
24
24
|
* through the `browser` skill so the user can interactively review;
|
|
25
25
|
* when browser automation is unavailable, the file path is surfaced so the user
|
|
26
|
-
* can open it manually.
|
|
26
|
+
* can open it manually. Before any stage runs, an initial deterministic setup
|
|
27
|
+
* step ensures the browser skill's `browse` CLI is available (`which browse`,
|
|
28
|
+
* then `npm install -g browse` when missing); it is best-effort and never
|
|
29
|
+
* blocks the run. The final exporter produces a rich `spec.html` that
|
|
27
30
|
* embeds the agreed-upon design alongside the implementation handoff.
|
|
28
31
|
*/
|
|
29
32
|
|
|
@@ -33,6 +36,7 @@ import type {
|
|
|
33
36
|
WorkflowTaskResult,
|
|
34
37
|
WorkflowTaskStep,
|
|
35
38
|
} from "../src/shared/types.js";
|
|
39
|
+
import { spawnSync } from "node:child_process";
|
|
36
40
|
import { mkdirSync } from "node:fs";
|
|
37
41
|
import { tmpdir } from "node:os";
|
|
38
42
|
import { join } from "node:path";
|
|
@@ -49,6 +53,15 @@ type OutputType = (typeof OUTPUT_TYPES)[number];
|
|
|
49
53
|
const DEFAULT_OUTPUT_TYPE: OutputType = "prototype";
|
|
50
54
|
const DEFAULT_MAX_REFINEMENTS = 3;
|
|
51
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Read-only builtin tools granted to the structured-decision stages
|
|
58
|
+
* (user-feedback refinement gate and pre-export gate) so they can actually
|
|
59
|
+
* inspect the on-disk `preview.html` before emitting their decision. The
|
|
60
|
+
* artifact stays immutable here — writes/edits belong to apply-changes and
|
|
61
|
+
* forced-fix, so this list deliberately excludes write/edit/bash.
|
|
62
|
+
*/
|
|
63
|
+
const READ_ONLY_TOOLS = ["read", "grep", "ls"] as const;
|
|
64
|
+
|
|
52
65
|
type PromptSection = readonly [tag: string, content: string];
|
|
53
66
|
|
|
54
67
|
function taggedPrompt(sections: readonly PromptSection[]): string {
|
|
@@ -275,11 +288,126 @@ const ANTI_SLOP_RULES = [
|
|
|
275
288
|
"Commit to a specific aesthetic direction; do not hedge with generic SaaS defaults.",
|
|
276
289
|
].join("\n");
|
|
277
290
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
291
|
+
type BrowseCliStatus = {
|
|
292
|
+
/** Whether the `browse` CLI is expected to be available to downstream stages. */
|
|
293
|
+
readonly available: boolean;
|
|
294
|
+
/** True when the CLI was already on PATH and no install was attempted. */
|
|
295
|
+
readonly alreadyPresent: boolean;
|
|
296
|
+
/** True when this step installed the CLI via `npm install -g browse`. */
|
|
297
|
+
readonly installed: boolean;
|
|
298
|
+
/** Human-readable, single-line outcome surfaced as a workflow output. */
|
|
299
|
+
readonly summary: string;
|
|
300
|
+
/** Raw failure reason when the install could not complete; absent on success. */
|
|
301
|
+
readonly error?: string;
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Initial deterministic setup step (no LLM): ensure the browser skill's `browse`
|
|
306
|
+
* CLI is available before any design stage runs. Mirrors the browser skill's
|
|
307
|
+
* documented bootstrap (`which browse || npm install -g browse`) but performs it
|
|
308
|
+
* once, deterministically, instead of relying on each stage to probe/install it.
|
|
309
|
+
* The PATH probe always runs, but the actual global install is skipped under
|
|
310
|
+
* automated tests (`NODE_ENV=test`) to avoid slow, networked, environment-
|
|
311
|
+
* mutating side effects.
|
|
312
|
+
*
|
|
313
|
+
* Best-effort by contract: it never throws and never blocks the workflow. When
|
|
314
|
+
* the CLI cannot be located or installed, downstream stages keep their graceful
|
|
315
|
+
* degradation path (surface the manual preview path / URL).
|
|
316
|
+
*/
|
|
317
|
+
function ensureBrowseCli(): BrowseCliStatus {
|
|
318
|
+
const isWindows = process.platform === "win32";
|
|
319
|
+
const onPath = (): boolean => {
|
|
320
|
+
try {
|
|
321
|
+
const probe = spawnSync(isWindows ? "where" : "which", ["browse"], {
|
|
322
|
+
stdio: "ignore",
|
|
323
|
+
timeout: 15_000,
|
|
324
|
+
shell: isWindows,
|
|
325
|
+
});
|
|
326
|
+
return probe.status === 0;
|
|
327
|
+
} catch {
|
|
328
|
+
return false;
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
if (onPath()) {
|
|
333
|
+
return {
|
|
334
|
+
available: true,
|
|
335
|
+
alreadyPresent: true,
|
|
336
|
+
installed: false,
|
|
337
|
+
summary: "browse CLI already on PATH; skipped install.",
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// Never perform a real global `npm install` during automated tests: it is
|
|
342
|
+
// slow, network-dependent, and would mutate the test runner's global
|
|
343
|
+
// environment. The PATH probe above and the prompt guidance below are still
|
|
344
|
+
// exercised; only the install side effect is skipped.
|
|
345
|
+
if (process.env.NODE_ENV === "test") {
|
|
346
|
+
return {
|
|
347
|
+
available: false,
|
|
348
|
+
alreadyPresent: false,
|
|
349
|
+
installed: false,
|
|
350
|
+
summary:
|
|
351
|
+
"browse CLI not found; skipped global install under the test environment.",
|
|
352
|
+
error: "global install skipped during tests",
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
try {
|
|
357
|
+
const install = spawnSync("npm", ["install", "-g", "browse"], {
|
|
358
|
+
stdio: "ignore",
|
|
359
|
+
timeout: 180_000,
|
|
360
|
+
shell: isWindows,
|
|
361
|
+
});
|
|
362
|
+
if (install.status === 0) {
|
|
363
|
+
return {
|
|
364
|
+
available: true,
|
|
365
|
+
alreadyPresent: false,
|
|
366
|
+
installed: true,
|
|
367
|
+
summary: "Installed browse CLI via `npm install -g browse`.",
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
const reason =
|
|
371
|
+
install.error?.message ??
|
|
372
|
+
(typeof install.status === "number"
|
|
373
|
+
? `npm install -g browse exited with code ${install.status}`
|
|
374
|
+
: "npm install -g browse did not complete");
|
|
375
|
+
return {
|
|
376
|
+
available: false,
|
|
377
|
+
alreadyPresent: false,
|
|
378
|
+
installed: false,
|
|
379
|
+
summary: `Could not install browse CLI (${reason}); stages will degrade gracefully.`,
|
|
380
|
+
error: reason,
|
|
381
|
+
};
|
|
382
|
+
} catch (error) {
|
|
383
|
+
const reason =
|
|
384
|
+
error instanceof Error ? error.message : String(error);
|
|
385
|
+
return {
|
|
386
|
+
available: false,
|
|
387
|
+
alreadyPresent: false,
|
|
388
|
+
installed: false,
|
|
389
|
+
summary: `Could not install browse CLI (${reason}); stages will degrade gracefully.`,
|
|
390
|
+
error: reason,
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Build the per-run browser bootstrap guidance injected into stage prompts.
|
|
397
|
+
* When the deterministic setup step already ensured `browse` is installed, the
|
|
398
|
+
* guidance tells stages to assume availability and not waste turns reinstalling;
|
|
399
|
+
* otherwise it retains the original probe-and-install fallback.
|
|
400
|
+
*/
|
|
401
|
+
function buildBrowserBootstrapRules(status: BrowseCliStatus): string {
|
|
402
|
+
const probeRule = status.available
|
|
403
|
+
? "The workflow's deterministic setup step already ensured the browser skill's `browse` CLI is installed and on PATH; assume it is available and do NOT reinstall it. Only if a `browse` command reports the executable as missing should you re-probe with `which browse` and run `npm install -g browse` once before retrying. Do not add project dependencies."
|
|
404
|
+
: `The workflow's deterministic setup step attempted to install the browser skill's \`browse\` CLI but it FAILED with: "${status.error ?? "unknown error"}". Treat this as a known starting condition to work around, not a hard blocker. Probe with \`which browse\` and retry once with \`npm install -g browse\`; if it still fails, use the error above to diagnose a workaround (for example: EACCES/permission errors → retry with a user-writable global prefix; missing npm/Node → report it plainly; network/registry errors → surface them). If the CLI still cannot be made available, degrade gracefully and surface the manual file path / URL. Do not add project dependencies.`;
|
|
405
|
+
return [
|
|
406
|
+
probeRule,
|
|
407
|
+
"Use `browse open <url> --local --headed` when a generated local preview should be visible to the user, and use `browse snapshot` plus `browse screenshot --path <file>` for review evidence.",
|
|
408
|
+
"If `browse` is unavailable after three attempts or the browser runtime still fails, degrade gracefully and surface the manual file path / URL.",
|
|
409
|
+
].join("\n");
|
|
410
|
+
}
|
|
283
411
|
|
|
284
412
|
export default defineWorkflow("open-claude-design")
|
|
285
413
|
.description(
|
|
@@ -316,7 +444,15 @@ export default defineWorkflow("open-claude-design")
|
|
|
316
444
|
.output("preview_file_url", Type.Optional(Type.String({ description: "file:// URL for the generated preview.html file." })))
|
|
317
445
|
.output("spec_path", Type.Optional(Type.String({ description: "Absolute path to the generated spec.html file." })))
|
|
318
446
|
.output("spec_file_url", Type.Optional(Type.String({ description: "file:// URL for the generated spec.html file." })))
|
|
447
|
+
.output("browse_cli_status", Type.Optional(Type.String({ description: "Outcome of the initial deterministic step that ensures the browser skill's `browse` CLI is installed." })))
|
|
319
448
|
.run(async (ctx) => {
|
|
449
|
+
// Initial deterministic setup step (no LLM): ensure the browser skill's
|
|
450
|
+
// `browse` CLI is installed before any design stage runs. Best-effort —
|
|
451
|
+
// a failed install never blocks the workflow; downstream stages keep their
|
|
452
|
+
// graceful-degradation fallback (surface the manual preview path / URL).
|
|
453
|
+
const browseCli = ensureBrowseCli();
|
|
454
|
+
const browserBootstrapRules = buildBrowserBootstrapRules(browseCli);
|
|
455
|
+
|
|
320
456
|
const inputs = ctx.inputs;
|
|
321
457
|
|
|
322
458
|
const prompt = inputs.prompt;
|
|
@@ -344,12 +480,12 @@ export default defineWorkflow("open-claude-design")
|
|
|
344
480
|
};
|
|
345
481
|
const refinementDecisionConfig = {
|
|
346
482
|
...designModelConfig,
|
|
347
|
-
tools: [refinementDecisionTool.name],
|
|
483
|
+
tools: [...READ_ONLY_TOOLS, refinementDecisionTool.name],
|
|
348
484
|
customTools: [refinementDecisionTool],
|
|
349
485
|
};
|
|
350
486
|
const exportGateDecisionConfig = {
|
|
351
487
|
...designModelConfig,
|
|
352
|
-
tools: [exportGateDecisionTool.name],
|
|
488
|
+
tools: [...READ_ONLY_TOOLS, exportGateDecisionTool.name],
|
|
353
489
|
customTools: [exportGateDecisionTool],
|
|
354
490
|
};
|
|
355
491
|
|
|
@@ -551,7 +687,7 @@ export default defineWorkflow("open-claude-design")
|
|
|
551
687
|
`Capture transferable design intent from this reference for: ${prompt}. Apply the impeccable \`extract\` sub-skill to lift concrete, citable design traits from the reference URL. Use browser/screenshot tooling if available; never guess about visual traits without observable evidence.`,
|
|
552
688
|
],
|
|
553
689
|
["reference_url", reference],
|
|
554
|
-
["browser_use_guidelines",
|
|
690
|
+
["browser_use_guidelines", browserBootstrapRules],
|
|
555
691
|
[
|
|
556
692
|
"instructions",
|
|
557
693
|
[
|
|
@@ -671,7 +807,7 @@ export default defineWorkflow("open-claude-design")
|
|
|
671
807
|
],
|
|
672
808
|
["preview_path", previewPath],
|
|
673
809
|
["preview_file_url", previewFileUrl],
|
|
674
|
-
["browser_use_guidelines",
|
|
810
|
+
["browser_use_guidelines", browserBootstrapRules],
|
|
675
811
|
[
|
|
676
812
|
"instructions",
|
|
677
813
|
[
|
|
@@ -794,7 +930,7 @@ export default defineWorkflow("open-claude-design")
|
|
|
794
930
|
["current_design_and_feedback", "{previous}"],
|
|
795
931
|
[
|
|
796
932
|
"browser_use_guidelines",
|
|
797
|
-
|
|
933
|
+
browserBootstrapRules,
|
|
798
934
|
],
|
|
799
935
|
[
|
|
800
936
|
"instructions",
|
|
@@ -881,7 +1017,7 @@ export default defineWorkflow("open-claude-design")
|
|
|
881
1017
|
["preview_file_url", previewFileUrl],
|
|
882
1018
|
[
|
|
883
1019
|
"browser_use_bootstrap",
|
|
884
|
-
|
|
1020
|
+
browserBootstrapRules,
|
|
885
1021
|
],
|
|
886
1022
|
[
|
|
887
1023
|
"instructions",
|
|
@@ -1044,7 +1180,7 @@ export default defineWorkflow("open-claude-design")
|
|
|
1044
1180
|
["spec_file_url", specFileUrl],
|
|
1045
1181
|
["preview_path", previewPath],
|
|
1046
1182
|
["preview_file_url", previewFileUrl],
|
|
1047
|
-
["browser_use_guidelines",
|
|
1183
|
+
["browser_use_guidelines", browserBootstrapRules],
|
|
1048
1184
|
[
|
|
1049
1185
|
"instructions",
|
|
1050
1186
|
[
|
|
@@ -1078,6 +1214,7 @@ export default defineWorkflow("open-claude-design")
|
|
|
1078
1214
|
preview_file_url: previewFileUrl,
|
|
1079
1215
|
spec_path: specPath,
|
|
1080
1216
|
spec_file_url: specFileUrl,
|
|
1217
|
+
browse_cli_status: browseCli.summary,
|
|
1081
1218
|
};
|
|
1082
1219
|
})
|
|
1083
1220
|
.compile();
|
|
@@ -57,7 +57,7 @@ export declare const Type: Omit<typeof TypeboxType, "Any" | "Array" | "BigInt" |
|
|
|
57
57
|
Void(): TVoid;
|
|
58
58
|
};
|
|
59
59
|
export type { Static, TSchema } from "typebox";
|
|
60
|
-
export type { AgentSessionAdapter, CompleteAdapter, CompleteStageOpts, GitWorktreeSetupOptions, GitWorktreeSetupResult, PromptAdapter, PromptOptions, ResolvedInputs, RunResult, RunStatus, StageAdapters, StageStatus, StageOptions, StageContext, StageSnapshot, StageExecutionMeta, StageMcpOptions, StageOutputOptions, StagePromptOptions, StageSessionCreateOptions, StageSessionCreateResult, StageSessionRuntime, WorkflowAction, WorkflowArtifact, WorkflowChainOptions, WorkflowChainStep, WorkflowChildResult, WorkflowContextMode, WorkflowControlEvent, WorkflowCustomToolDefinition, WorkflowCustomUiComponent, WorkflowCustomUiFactory, WorkflowCustomUiKeybindings, WorkflowCustomUiOptions, WorkflowCustomUiOverlayHandle, WorkflowCustomUiOverlayOptions, WorkflowCustomUiTheme, WorkflowCustomUiTui, WorkflowDetails, WorkflowDetailsMode, WorkflowDetailsStatus, WorkflowDirectOptions, WorkflowDirectTaskItem, WorkflowExecutionMode, WorkflowExecutionPolicy, WorkflowInputBindings, WorkflowInputSchema, WorkflowInputSchemaMap, WorkflowInputValues, WorkflowIntercomSummary, WorkflowMaxOutput, WorkflowMcpPort, WorkflowModelAttempt, WorkflowModelCatalogPort, WorkflowModelFallbackFields, WorkflowModelInfo, WorkflowModelUsage, WorkflowModelValue, WorkflowOutputMode, WorkflowOutputSchema, WorkflowOutputSchemaMap, WorkflowOutputValues, WorkflowParallelChainStep, WorkflowParallelOptions, WorkflowPersistencePort, WorkflowProgressSummary, WorkflowRunChildOptions, WorkflowRunOutput, WorkflowRuntimeConfig, WorkflowSerializableObject, WorkflowSerializablePrimitive, WorkflowSerializableValue, WorkflowSharedTaskDefaults, WorkflowTaskContext, WorkflowTaskContextInput, WorkflowTaskOptions, WorkflowTaskResult, WorkflowTaskSessionFields, WorkflowTaskSessionOptions, WorkflowTaskStep, WorkflowThinkingLevel, WorkflowUIAdapter, WorkflowUIContext, WorkflowWorktreeInputBinding, } from "./shared/authoring-contract.js";
|
|
60
|
+
export type { AgentSessionAdapter, CompleteAdapter, CompleteStageOpts, GitWorktreeSetupOptions, GitWorktreeSetupResult, PromptAdapter, PromptOptions, ResolvedInputs, RunResult, RunStatus, StageAdapters, StageStatus, StageOptions, StageContext, StageSnapshot, StageExecutionMeta, StageMcpOptions, StageOutputOptions, StagePromptOptions, StageSessionCreateOptions, StageSessionCreateResult, StageSessionRuntime, WorkflowAction, WorkflowArtifact, WorkflowChainOptions, WorkflowChainStep, WorkflowChildResult, WorkflowContextMode, WorkflowControlEvent, WorkflowCustomToolDefinition, WorkflowCustomUiComponent, WorkflowCustomUiFactory, WorkflowCustomUiKeybindings, WorkflowCustomUiOptions, WorkflowCustomUiOverlayHandle, WorkflowCustomUiOverlayOptions, WorkflowCustomUiTheme, WorkflowCustomUiTui, WorkflowDetails, WorkflowDetailsMode, WorkflowDetailsStatus, WorkflowDirectOptions, WorkflowDirectTaskItem, WorkflowExecutionMode, WorkflowExecutionPolicy, WorkflowExitOptions, WorkflowExitStatus, WorkflowInputBindings, WorkflowInputSchema, WorkflowInputSchemaMap, WorkflowInputValues, WorkflowIntercomSummary, WorkflowMaxOutput, WorkflowMcpPort, WorkflowModelAttempt, WorkflowModelCatalogPort, WorkflowModelFallbackFields, WorkflowModelInfo, WorkflowModelUsage, WorkflowModelValue, WorkflowOutputMode, WorkflowOutputSchema, WorkflowOutputSchemaMap, WorkflowOutputValues, WorkflowParallelChainStep, WorkflowParallelOptions, WorkflowPersistencePort, WorkflowProgressSummary, WorkflowRunChildOptions, WorkflowRunOutput, WorkflowRuntimeConfig, WorkflowSerializableObject, WorkflowSerializablePrimitive, WorkflowSerializableValue, WorkflowSharedTaskDefaults, WorkflowTaskContext, WorkflowTaskContextInput, WorkflowTaskOptions, WorkflowTaskResult, WorkflowTaskSessionFields, WorkflowTaskSessionOptions, WorkflowTaskStep, WorkflowThinkingLevel, WorkflowUIAdapter, WorkflowUIContext, WorkflowWorktreeInputBinding, } from "./shared/authoring-contract.js";
|
|
61
61
|
import type * as AuthoringContract from "./shared/authoring-contract.js";
|
|
62
62
|
import type { GitWorktreeSetupOptions, GitWorktreeSetupResult, ResolvedInputs, RunResult, RunStatus, StageSnapshot, WorkflowDefinition as WorkflowContractDefinition, WorkflowDetails, WorkflowDirectOptions, WorkflowDirectTaskItem, WorkflowExecutionPolicy, WorkflowInputValues, WorkflowOutputValues, WorkflowSerializableObject, WorkflowChainStep } from "./shared/authoring-contract.js";
|
|
63
63
|
declare const workflowDefinitionBrand: unique symbol;
|
|
@@ -66,7 +66,7 @@ type WorkflowDefinitionBrand = {
|
|
|
66
66
|
};
|
|
67
67
|
export interface WorkflowDefinition<TInputs extends WorkflowInputValues = WorkflowInputValues, TOutputs extends WorkflowOutputValues = WorkflowOutputValues, TRunInputs extends WorkflowInputValues = TInputs, TDefinitionBrand extends object = WorkflowDefinitionBrand> extends WorkflowContractDefinition<TInputs, TOutputs, TRunInputs, TDefinitionBrand>, WorkflowDefinitionBrand {
|
|
68
68
|
}
|
|
69
|
-
export type WorkflowRunContext<TInputs extends WorkflowInputValues = WorkflowInputValues> = AuthoringContract.WorkflowRunContext<TInputs, WorkflowDefinitionBrand>;
|
|
69
|
+
export type WorkflowRunContext<TInputs extends WorkflowInputValues = WorkflowInputValues, TOutputs extends WorkflowOutputValues = WorkflowOutputValues> = AuthoringContract.WorkflowRunContext<TInputs, WorkflowDefinitionBrand, TOutputs>;
|
|
70
70
|
export type WorkflowRunFn<TInputs extends WorkflowInputValues = WorkflowInputValues, TOutputs extends WorkflowOutputValues = WorkflowOutputValues> = AuthoringContract.WorkflowRunFn<TInputs, TOutputs, WorkflowDefinitionBrand>;
|
|
71
71
|
export type AnyWorkflowDefinition = WorkflowDefinition<WorkflowInputValues, WorkflowOutputValues, WorkflowInputValues>;
|
|
72
72
|
export type WorkflowBuilder<TInputs extends WorkflowInputValues = {}, TOutputs extends WorkflowOutputValues = {}, TRunInputs extends WorkflowInputValues = TInputs> = AuthoringContract.WorkflowBuilder<TInputs, TOutputs, TRunInputs, WorkflowDefinitionBrand, WorkflowDefinition<TInputs, TOutputs, TRunInputs>>;
|
|
@@ -161,6 +161,9 @@ export interface RunSnapshot {
|
|
|
161
161
|
readonly durationMs?: number;
|
|
162
162
|
readonly result?: WorkflowOutputValues;
|
|
163
163
|
readonly error?: string;
|
|
164
|
+
/** True when the run reached its terminal status through ctx.exit(). */
|
|
165
|
+
readonly exited?: boolean;
|
|
166
|
+
readonly exitReason?: string;
|
|
164
167
|
readonly pendingPrompt?: PendingPrompt;
|
|
165
168
|
}
|
|
166
169
|
export interface StoreSnapshot {
|
|
@@ -201,6 +201,8 @@ export async function dispatch(
|
|
|
201
201
|
status: snapshot.status,
|
|
202
202
|
result: snapshot.result,
|
|
203
203
|
error: snapshot.error,
|
|
204
|
+
exited: snapshot.exited,
|
|
205
|
+
exitReason: snapshot.exitReason,
|
|
204
206
|
stages: snapshot.stages.map((stage) => structuredClone(stage)),
|
|
205
207
|
};
|
|
206
208
|
}
|
|
@@ -693,6 +693,7 @@ function renderStagesToolContent(
|
|
|
693
693
|
if (stage.transcriptPath) lines.push(`transcriptPath: ${stage.transcriptPath}`);
|
|
694
694
|
if (stage.transcriptPath) lines.push(`transcriptPathJson: ${JSON.stringify(stage.transcriptPath)}`);
|
|
695
695
|
if (stage.error) lines.push(`error: ${stage.error}`);
|
|
696
|
+
if (stage.skippedReason) lines.push(`skippedReason: ${stage.skippedReason}`);
|
|
696
697
|
if (stage.awaitingInputSince !== undefined) {
|
|
697
698
|
lines.push(`awaitingInputSince: ${stage.awaitingInputSince}`);
|
|
698
699
|
}
|
|
@@ -803,6 +804,7 @@ type WorkflowStageSummary = {
|
|
|
803
804
|
sessionFile?: string;
|
|
804
805
|
transcriptPath?: string;
|
|
805
806
|
error?: string;
|
|
807
|
+
skippedReason?: string;
|
|
806
808
|
awaitingInputSince?: number;
|
|
807
809
|
pendingPrompt?: StageSnapshot["pendingPrompt"];
|
|
808
810
|
inputRequest?: StageSnapshot["inputRequest"];
|
|
@@ -842,6 +844,7 @@ function summarizeStage(stage: StageSnapshot): WorkflowStageSummary {
|
|
|
842
844
|
sessionFile: stage.sessionFile,
|
|
843
845
|
transcriptPath: stage.sessionFile,
|
|
844
846
|
error: stage.error,
|
|
847
|
+
skippedReason: stage.skippedReason,
|
|
845
848
|
awaitingInputSince: stage.awaitingInputSince,
|
|
846
849
|
pendingPrompt: stage.pendingPrompt === undefined
|
|
847
850
|
? undefined
|
|
@@ -1201,6 +1204,9 @@ function isRunStatus(value: string): value is RunStatus {
|
|
|
1201
1204
|
case "running":
|
|
1202
1205
|
case "paused":
|
|
1203
1206
|
case "completed":
|
|
1207
|
+
case "skipped":
|
|
1208
|
+
case "cancelled":
|
|
1209
|
+
case "blocked":
|
|
1204
1210
|
case "failed":
|
|
1205
1211
|
case "killed":
|
|
1206
1212
|
return true;
|
|
@@ -1232,6 +1238,8 @@ function fallbackRunDetailFromResult(
|
|
|
1232
1238
|
stages,
|
|
1233
1239
|
result: result.result,
|
|
1234
1240
|
error: result.error,
|
|
1241
|
+
exited: result.exited,
|
|
1242
|
+
exitReason: result.exitReason,
|
|
1235
1243
|
};
|
|
1236
1244
|
}
|
|
1237
1245
|
|
|
@@ -91,6 +91,8 @@ type RunResult = {
|
|
|
91
91
|
result?: WorkflowOutputValues;
|
|
92
92
|
details?: WorkflowDetails;
|
|
93
93
|
error?: string;
|
|
94
|
+
exited?: boolean;
|
|
95
|
+
exitReason?: string;
|
|
94
96
|
stages?: StageSnapshot[];
|
|
95
97
|
/**
|
|
96
98
|
* Free-form message carried by the result. Carries the "started in
|
|
@@ -107,6 +109,7 @@ type StageListItem = {
|
|
|
107
109
|
sessionFile?: string;
|
|
108
110
|
transcriptPath?: string;
|
|
109
111
|
error?: string;
|
|
112
|
+
skippedReason?: string;
|
|
110
113
|
awaitingInputSince?: number;
|
|
111
114
|
pendingPrompt?: PendingPrompt;
|
|
112
115
|
inputRequest?: StageInputRequest;
|
|
@@ -330,7 +333,7 @@ export function renderResult(result: WorkflowToolResult, opts?: RenderResultOpts
|
|
|
330
333
|
const label = r.name ? ` (${r.name})` : "";
|
|
331
334
|
return renderNotice("WORKFLOW RUN", `${r.runId}${label}: ${r.details.mode} ${r.details.status}`, opts, themed);
|
|
332
335
|
}
|
|
333
|
-
if (r.status === "completed" || r.status === "killed") {
|
|
336
|
+
if (r.status === "completed" || r.status === "skipped" || r.status === "cancelled" || r.status === "blocked" || r.status === "killed") {
|
|
334
337
|
const label = r.name ? ` (${r.name})` : "";
|
|
335
338
|
return renderNotice("WORKFLOW RUN", `${r.runId}${label}: ${r.status}`, opts, themed);
|
|
336
339
|
}
|
|
@@ -357,7 +360,7 @@ export function renderResult(result: WorkflowToolResult, opts?: RenderResultOpts
|
|
|
357
360
|
case "stages": {
|
|
358
361
|
const r = result as StageListResult;
|
|
359
362
|
if (r.error) return renderNotice("WORKFLOW STAGES", `${r.runId || "(none)"}: ${r.error}`, opts, themed);
|
|
360
|
-
const counts = r.stages.map((s) => `${s.name} (${s.id.slice(0, 12)}): ${s.status}`).join("; ");
|
|
363
|
+
const counts = r.stages.map((s) => `${s.name} (${s.id.slice(0, 12)}): ${s.status}${s.skippedReason ? ` — ${s.skippedReason}` : ""}`).join("; ");
|
|
361
364
|
return renderNotice("WORKFLOW STAGES", `${r.runId}: ${r.filter} — ${counts || "no stages"}`, opts, themed);
|
|
362
365
|
}
|
|
363
366
|
|
|
@@ -37,6 +37,23 @@ const McpOptionsSchema = Type.Object({
|
|
|
37
37
|
deny: Type.Optional(Type.Array(Type.String())),
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
+
const BashCommandRuleSchema = Type.Union([
|
|
41
|
+
Type.String(),
|
|
42
|
+
Type.Object({ prefix: Type.String() }, { additionalProperties: false }),
|
|
43
|
+
Type.Object({ glob: Type.String() }, { additionalProperties: false }),
|
|
44
|
+
Type.Object({
|
|
45
|
+
regex: Type.String(),
|
|
46
|
+
flags: Type.Optional(Type.String()),
|
|
47
|
+
}, { additionalProperties: false }),
|
|
48
|
+
]);
|
|
49
|
+
|
|
50
|
+
const BashCommandPolicySchema = Type.Object({
|
|
51
|
+
default: Type.Optional(Type.Union([Type.Literal("allow"), Type.Literal("deny")])),
|
|
52
|
+
allow: Type.Optional(Type.Array(BashCommandRuleSchema)),
|
|
53
|
+
deny: Type.Optional(Type.Array(BashCommandRuleSchema)),
|
|
54
|
+
match: Type.Optional(Type.Union([Type.Literal("whole"), Type.Literal("segments")])),
|
|
55
|
+
}, { additionalProperties: false });
|
|
56
|
+
|
|
40
57
|
const StageSessionOptionProperties = {
|
|
41
58
|
cwd: Type.Optional(Type.String()),
|
|
42
59
|
agentDir: Type.Optional(Type.String()),
|
|
@@ -50,6 +67,7 @@ const StageSessionOptionProperties = {
|
|
|
50
67
|
})),
|
|
51
68
|
tools: Type.Optional(Type.Array(Type.String())),
|
|
52
69
|
customTools: Type.Optional(Type.Array(SdkSessionOptionArrayElementSchema("customTools"))),
|
|
70
|
+
bashPolicy: Type.Optional(BashCommandPolicySchema),
|
|
53
71
|
resourceLoader: Type.Optional(SdkSessionOptionSchema("resourceLoader")),
|
|
54
72
|
sessionManager: Type.Optional(SdkSessionOptionSchema("sessionManager")),
|
|
55
73
|
settingsManager: Type.Optional(SdkSessionOptionSchema("settingsManager")),
|
|
@@ -82,6 +82,8 @@ export interface RunDetail {
|
|
|
82
82
|
readonly stages: readonly RunSnapshot["stages"][number][];
|
|
83
83
|
readonly result?: WorkflowOutputValues;
|
|
84
84
|
readonly error?: string;
|
|
85
|
+
readonly exited?: boolean;
|
|
86
|
+
readonly exitReason?: string;
|
|
85
87
|
readonly failureKind?: RunSnapshot["failureKind"];
|
|
86
88
|
readonly failureCode?: RunSnapshot["failureCode"];
|
|
87
89
|
readonly failureRecoverability?: RunSnapshot["failureRecoverability"];
|
|
@@ -479,6 +481,8 @@ export function inspectRun(
|
|
|
479
481
|
stages: expandedStages.map((stage) => structuredClone(stage)),
|
|
480
482
|
result: copy.result,
|
|
481
483
|
error: copy.error,
|
|
484
|
+
exited: copy.exited,
|
|
485
|
+
exitReason: copy.exitReason,
|
|
482
486
|
failureKind: copy.failureKind,
|
|
483
487
|
failureCode: copy.failureCode,
|
|
484
488
|
failureRecoverability: copy.failureRecoverability,
|