@bastani/atomic 0.9.20-alpha.5 → 0.9.20-alpha.7
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 +73 -0
- package/README.md +37 -0
- package/dist/builtin/intercom/CHANGELOG.md +10 -0
- package/dist/builtin/intercom/broker/broker.ts +110 -39
- package/dist/builtin/intercom/broker/client.ts +8 -1
- package/dist/builtin/intercom/index.bundle.mjs +61 -2
- package/dist/builtin/intercom/live-route-refusal.ts +69 -0
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/intercom/recoverable-disconnect.ts +16 -4
- package/dist/builtin/intercom/skills/intercom/SKILL.md +11 -11
- package/dist/builtin/intercom/types.ts +3 -1
- package/dist/builtin/mcp/package.json +2 -2
- package/dist/builtin/subagents/CHANGELOG.md +12 -0
- package/dist/builtin/subagents/package.json +3 -3
- package/dist/builtin/subagents/skills/cua-driver/BROWSER.md +494 -0
- package/dist/builtin/subagents/skills/cua-driver/EMBEDDING.md +578 -0
- package/dist/builtin/subagents/skills/cua-driver/LINUX.md +364 -0
- package/dist/builtin/subagents/skills/cua-driver/MACOS.md +509 -0
- package/dist/builtin/subagents/skills/cua-driver/README.md +113 -0
- package/dist/builtin/subagents/skills/cua-driver/RECORDING.md +162 -0
- package/dist/builtin/subagents/skills/cua-driver/SKILL.md +1105 -0
- package/dist/builtin/subagents/skills/cua-driver/WINDOWS.md +866 -0
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +18 -8
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +34 -0
- package/dist/builtin/workflows/README.md +5 -19
- package/dist/builtin/workflows/builtin/adversarial-verification.js +3 -3
- package/dist/builtin/workflows/builtin/{chunk-7f381xnq.js → chunk-2hzrv5y8.js} +140 -21
- package/dist/builtin/workflows/builtin/{chunk-e83tc6nr.js → chunk-3tx8ry44.js} +3 -2
- package/dist/builtin/workflows/builtin/{chunk-00ywx588.js → chunk-5724b0cf.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-zj5162bh.js → chunk-7bzcersz.js} +33 -22
- package/dist/builtin/workflows/builtin/{chunk-ne6vh5ct.js → chunk-7n51c5gh.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-x2nftpgj.js → chunk-9z3ztr2a.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-7h7s5xdj.js → chunk-dxjxtgmp.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-tvcydq13.js → chunk-ffdrv23t.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-pfm1kgqz.js → chunk-hmt5w62g.js} +12 -4
- package/dist/builtin/workflows/builtin/{chunk-tdqvdrg1.js → chunk-jngsbbpm.js} +3 -3
- package/dist/builtin/workflows/builtin/{chunk-55p5dxjk.js → chunk-njmf5ze7.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-evfb0312.js → chunk-vn0wb31x.js} +1 -1
- package/dist/builtin/workflows/builtin/classify-and-act.js +3 -3
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize.js +3 -3
- package/dist/builtin/workflows/builtin/generate-and-filter.js +3 -3
- package/dist/builtin/workflows/builtin/goal.js +4 -4
- package/dist/builtin/workflows/builtin/index.js +12 -12
- package/dist/builtin/workflows/builtin/loop-until-done.js +3 -3
- package/dist/builtin/workflows/builtin/open-claude-design.js +3 -3
- package/dist/builtin/workflows/builtin/ralph.js +4 -4
- package/dist/builtin/workflows/builtin/steering-context.js +1 -1
- package/dist/builtin/workflows/builtin/tournament.js +3 -3
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/skills/prompt-engineer/SKILL.md +10 -9
- package/dist/builtin/workflows/skills/prompt-engineer/references/advanced_patterns.md +4 -4
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_fable_5.md +96 -23
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_fable_5_1.md +75 -27
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_opus_4_8.md +72 -26
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_opus_5.md +58 -22
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_opus_5_5.md +118 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_sonnet_5.md +70 -29
- package/dist/builtin/workflows/skills/prompt-engineer/references/core_prompting.md +1 -1
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_5_5.md +95 -32
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_5_6.md +79 -30
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6.md +139 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/quality_improvement.md +4 -4
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +446 -639
- package/dist/builtin/workflows/src/index.js +1434 -1277
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +15 -4
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/file-processor.d.ts +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-auto-compaction.js +40 -12
- package/dist/core/agent-session-auto-compaction.js.map +1 -1
- package/dist/core/agent-session-bash.d.ts.map +1 -1
- package/dist/core/agent-session-bash.js +9 -8
- package/dist/core/agent-session-bash.js.map +1 -1
- package/dist/core/agent-session-boundaries.d.ts +68 -0
- package/dist/core/agent-session-boundaries.d.ts.map +1 -0
- package/dist/core/agent-session-boundaries.js +334 -0
- package/dist/core/agent-session-boundaries.js.map +1 -0
- package/dist/core/agent-session-compaction.js +1 -1
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-events.d.ts.map +1 -1
- package/dist/core/agent-session-events.js +27 -13
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-export.d.ts.map +1 -1
- package/dist/core/agent-session-export.js +16 -20
- package/dist/core/agent-session-export.js.map +1 -1
- package/dist/core/agent-session-message-queue.d.ts.map +1 -1
- package/dist/core/agent-session-message-queue.js +6 -3
- package/dist/core/agent-session-message-queue.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +33 -4
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-persistent-custom-messages.d.ts.map +1 -1
- package/dist/core/agent-session-persistent-custom-messages.js +2 -1
- package/dist/core/agent-session-persistent-custom-messages.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +93 -25
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-retry.d.ts.map +1 -1
- package/dist/core/agent-session-retry.js +4 -9
- package/dist/core/agent-session-retry.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +4 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +7 -1
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-tasks.d.ts +9 -0
- package/dist/core/agent-session-tasks.d.ts.map +1 -1
- package/dist/core/agent-session-tasks.js +68 -16
- package/dist/core/agent-session-tasks.js.map +1 -1
- package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
- package/dist/core/agent-session-tool-hooks.js +15 -5
- package/dist/core/agent-session-tool-hooks.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +9 -21
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session-tree.d.ts.map +1 -1
- package/dist/core/agent-session-tree.js +2 -3
- package/dist/core/agent-session-tree.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +8 -0
- package/dist/core/agent-session-types.d.ts.map +1 -1
- package/dist/core/agent-session-types.js.map +1 -1
- package/dist/core/agent-session.d.ts +18 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +22 -3
- package/dist/core/agent-session.js.map +1 -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/compaction/compaction-boundary.d.ts.map +1 -1
- package/dist/core/compaction/compaction-boundary.js +11 -6
- package/dist/core/compaction/compaction-boundary.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +3 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +37 -0
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/crash-log.d.ts +6 -0
- package/dist/core/crash-log.d.ts.map +1 -0
- package/dist/core/crash-log.js +69 -0
- package/dist/core/crash-log.js.map +1 -0
- package/dist/core/execution-model-router.d.ts +15 -0
- package/dist/core/execution-model-router.d.ts.map +1 -1
- package/dist/core/execution-model-router.js +82 -33
- package/dist/core/execution-model-router.js.map +1 -1
- package/dist/core/export-html/template-js/tree-filter-render.js +6 -1
- package/dist/core/export-html/template.js +6 -1
- package/dist/core/extensions/agent-events.d.ts +69 -3
- 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 +5 -3
- package/dist/core/extensions/api-types.d.ts.map +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/event-results.d.ts +3 -0
- package/dist/core/extensions/event-results.d.ts.map +1 -1
- package/dist/core/extensions/event-results.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/provider-types.d.ts +2 -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-events.d.ts +16 -2
- package/dist/core/extensions/runner-events.d.ts.map +1 -1
- package/dist/core/extensions/runner-events.js +98 -5
- package/dist/core/extensions/runner-events.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +3 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +4 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/fast-model-variants.d.ts +16 -0
- package/dist/core/fast-model-variants.d.ts.map +1 -1
- package/dist/core/fast-model-variants.js +27 -0
- package/dist/core/fast-model-variants.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/messages.d.ts +10 -0
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +57 -0
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-config.d.ts +52 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +16 -0
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver-defaults.d.ts.map +1 -1
- package/dist/core/model-resolver-defaults.js +2 -1
- package/dist/core/model-resolver-defaults.js.map +1 -1
- package/dist/core/model-runtime.d.ts +13 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +16 -1
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/prompt-templates-async.d.ts +2 -2
- package/dist/core/prompt-templates-async.d.ts.map +1 -1
- package/dist/core/prompt-templates-async.js +57 -29
- package/dist/core/prompt-templates-async.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +6 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +61 -35
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-composer-internal.d.ts +1 -0
- package/dist/core/provider-composer-internal.d.ts.map +1 -1
- package/dist/core/provider-composer-internal.js +19 -0
- package/dist/core/provider-composer-internal.js.map +1 -1
- package/dist/core/resource-loader-assets.d.ts.map +1 -1
- package/dist/core/resource-loader-assets.js +6 -6
- package/dist/core/resource-loader-assets.js.map +1 -1
- package/dist/core/sdk-types.d.ts +5 -0
- package/dist/core/sdk-types.d.ts.map +1 -1
- package/dist/core/sdk-types.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +7 -2
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +10 -3
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +65 -7
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-entries.d.ts +4 -1
- package/dist/core/session-manager-entries.d.ts.map +1 -1
- package/dist/core/session-manager-entries.js +8 -0
- package/dist/core/session-manager-entries.js.map +1 -1
- package/dist/core/session-manager-history.d.ts +16 -1
- package/dist/core/session-manager-history.d.ts.map +1 -1
- package/dist/core/session-manager-history.js +105 -42
- package/dist/core/session-manager-history.js.map +1 -1
- package/dist/core/session-manager-types.d.ts +30 -3
- 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 +2 -2
- 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-types.js.map +1 -1
- package/dist/core/structured-output/index.d.ts +1 -1
- package/dist/core/structured-output/index.d.ts.map +1 -1
- package/dist/core/structured-output/index.js +37 -41
- package/dist/core/structured-output/index.js.map +1 -1
- package/dist/core/structured-output/jev-client.d.ts +13 -8
- package/dist/core/structured-output/jev-client.d.ts.map +1 -1
- package/dist/core/structured-output/jev-client.js +90 -32
- package/dist/core/structured-output/jev-client.js.map +1 -1
- package/dist/core/structured-output/jev.d.ts.map +1 -1
- package/dist/core/structured-output/jev.js +38 -64
- package/dist/core/structured-output/jev.js.map +1 -1
- package/dist/core/structured-output/resolver.d.ts +32 -24
- package/dist/core/structured-output/resolver.d.ts.map +1 -1
- package/dist/core/structured-output/resolver.js +57 -9
- package/dist/core/structured-output/resolver.js.map +1 -1
- package/dist/core/structured-output/types.d.ts +8 -6
- package/dist/core/structured-output/types.d.ts.map +1 -1
- package/dist/core/structured-output/types.js.map +1 -1
- package/dist/core/system-prompt.js +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tasks/child-command-owner.d.ts +34 -0
- package/dist/core/tasks/child-command-owner.d.ts.map +1 -0
- package/dist/core/tasks/child-command-owner.js +70 -0
- package/dist/core/tasks/child-command-owner.js.map +1 -0
- package/dist/core/tools/bash-pty-native.d.ts +5 -1
- package/dist/core/tools/bash-pty-native.d.ts.map +1 -1
- package/dist/core/tools/bash-pty-native.js +15 -7
- package/dist/core/tools/bash-pty-native.js.map +1 -1
- package/dist/core/tools/kill.d.ts +2 -2
- package/dist/core/tools/kill.d.ts.map +1 -1
- package/dist/core/tools/kill.js +3 -4
- package/dist/core/tools/kill.js.map +1 -1
- package/dist/core/tools/read.d.ts +4 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +5 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/index-extensions.d.ts +1 -1
- package/dist/index-extensions.d.ts.map +1 -1
- package/dist/index-extensions.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/main-app-mode.d.ts +1 -1
- package/dist/main-app-mode.d.ts.map +1 -1
- package/dist/main-app-mode.js +3 -2
- package/dist/main-app-mode.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-content.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-content.js +6 -0
- package/dist/modes/interactive/components/tree-selector-content.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-model.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-model.js +1 -0
- package/dist/modes/interactive/components/tree-selector-model.js.map +1 -1
- package/dist/modes/interactive/interactive-agent-events.js +17 -1
- package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.js +2 -4
- package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode-helpers.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.js +16 -0
- package/dist/modes/interactive/interactive-mode-helpers.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +1 -0
- 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-process-lifecycle.js +13 -1
- package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
- package/dist/modes/interactive/interactive-session-runtime.js +5 -1
- package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
- package/dist/modes/interactive-engine/isolated-auth.d.ts +16 -0
- package/dist/modes/interactive-engine/isolated-auth.d.ts.map +1 -1
- package/dist/modes/interactive-engine/isolated-auth.js +27 -0
- package/dist/modes/interactive-engine/isolated-auth.js.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +4 -0
- package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.js +4 -1
- package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +2 -1
- package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-api.js +7 -2
- package/dist/modes/rpc/rpc-client-api.js.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.js +3 -1
- package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
- package/dist/modes/rpc/rpc-provider-auth.d.ts +2 -1
- package/dist/modes/rpc/rpc-provider-auth.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-provider-auth.js +2 -2
- package/dist/modes/rpc/rpc-provider-auth.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +2 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/utils/mime.js +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/tool-result-images.d.ts +3 -1
- package/dist/utils/tool-result-images.d.ts.map +1 -1
- package/dist/utils/tool-result-images.js +4 -1
- package/dist/utils/tool-result-images.js.map +1 -1
- package/docs/background-tasks.md +11 -2
- package/docs/compaction.md +5 -1
- package/docs/computer-use.md +105 -56
- package/docs/environment-variables.md +1 -1
- package/docs/extensions/events.md +75 -7
- package/docs/extensions.md +6 -2
- package/docs/getting-started/first-session.md +3 -2
- package/docs/intercom/operations.md +13 -1
- package/docs/intercom.md +1 -1
- package/docs/llama-cpp.md +2 -2
- package/docs/models/evals.md +108 -118
- package/docs/models/reference.md +31 -3
- package/docs/packages.md +2 -0
- package/docs/prompt-templates.md +1 -0
- package/docs/providers.md +19 -6
- package/docs/reference/cli.md +2 -2
- package/docs/rpc/examples.md +2 -0
- package/docs/sdk/reference.md +2 -3
- package/docs/sdk/structured-decisions.md +25 -18
- package/docs/sdk.md +13 -2
- package/docs/session-format.md +17 -2
- package/docs/settings.md +8 -8
- package/docs/skills.md +8 -2
- package/docs/subagents/reference.md +4 -4
- package/docs/subagents.md +2 -2
- package/docs/workflows/api-reference.md +7 -34
- package/docs/workflows/authoring.md +191 -0
- package/docs/workflows/builtins.md +1 -1
- package/docs/workflows/operations.md +18 -78
- package/docs/workflows/reliable-design.md +14 -29
- package/docs/workflows/verification.md +21 -8
- package/docs/workflows.md +8 -7
- package/examples/rpc-client.ts +38 -0
- package/examples/rpc-extension-ui.ts +19 -5
- package/examples/sdk/README.md +1 -1
- package/npm-shrinkwrap.json +69 -69
- package/package.json +8 -8
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6_astra.md +0 -58
|
@@ -12575,6 +12575,7 @@ function currentModelFullId(model) {
|
|
|
12575
12575
|
|
|
12576
12576
|
// dist/builtin/subagents/src/runs/shared/model-router.ts
|
|
12577
12577
|
import {
|
|
12578
|
+
AutoRoutingInferenceError,
|
|
12578
12579
|
parseModelConstraints as parseModelConstraints2,
|
|
12579
12580
|
routeExecutionModel
|
|
12580
12581
|
} from "@bastani/atomic";
|
|
@@ -12582,13 +12583,22 @@ async function routeSubagentModel(input) {
|
|
|
12582
12583
|
const { ctx, agent } = input;
|
|
12583
12584
|
const constraints = structuredClone([parseModelConstraints2(agent.modelConstraints), parseModelConstraints2(input.modelConstraints)].filter((c) => c !== undefined));
|
|
12584
12585
|
const effortOverride = agent.source === "builtin" && agent.thinking !== "" ? agent.thinking : undefined;
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12586
|
+
let route;
|
|
12587
|
+
try {
|
|
12588
|
+
route = await routeExecutionModel({
|
|
12589
|
+
ctx,
|
|
12590
|
+
task: input.task?.trim() ? input.task : agent.systemPrompt,
|
|
12591
|
+
agent: { name: agent.name, description: agent.description },
|
|
12592
|
+
constraints: effortOverride === undefined ? constraints : [...constraints, { allowedEfforts: [effortOverride] }],
|
|
12593
|
+
signal: input.signal
|
|
12594
|
+
});
|
|
12595
|
+
} catch (error) {
|
|
12596
|
+
input.signal?.throwIfAborted();
|
|
12597
|
+
if (!(error instanceof AutoRoutingInferenceError) || error.currentModelRoute === undefined)
|
|
12598
|
+
throw error;
|
|
12599
|
+
route = error.currentModelRoute;
|
|
12600
|
+
console.warn(`Subagent auto routing failed; running "${agent.name}" on the current chat model ${route.modelOverride}.`);
|
|
12601
|
+
}
|
|
12592
12602
|
const fallbackRoute = effortOverride === undefined ? route : await routeExecutionModel({
|
|
12593
12603
|
ctx,
|
|
12594
12604
|
task: input.task?.trim() ? input.task : agent.systemPrompt,
|
|
@@ -17326,7 +17336,7 @@ function parseSubagentNotifyContent(content) {
|
|
|
17326
17336
|
// dist/builtin/subagents/src/extension/prompt-guidance.ts
|
|
17327
17337
|
var DEFAULT_PROMPT_GUIDANCE = [
|
|
17328
17338
|
`**Subagent orchestration**: Use subagents for focused specialist work inside workflows or as bounded delegation when a workflow would be unnecessary overhead.
|
|
17329
|
-
- When workflow is available,
|
|
17339
|
+
- When the workflow tool is available, decide yourself whether a workflow fits. Prefer one for well-defined work that benefits from durable stages, review loops, recovery or approval gates, and let its stages delegate specialists; work inline for discussion, unclear goals, simple bounded work, or when the user asks to work inline or quickly. Launch with workflow run using the registered workflow name and inputs matching its contract.
|
|
17330
17340
|
- Honor the user's task-scoped execution preferences without hidden/nested workflows or pressure to reapprove. Preserve appropriate testing, review and evidence inline, and unrelated safety and authorization constraints.
|
|
17331
17341
|
- On a switch from an active workflow to inline, notify the controlling session to safely hold/stop the affected run, reconcile completed work and in-flight side effects, then continue inline without duplicate execution. Do not claim completed work was undone.
|
|
17332
17342
|
- Use a single subagent for a focused specialty or parallel tasks for independent work. Keep substantial-overlap tasks together rather than duplicating investigation across agents.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/web-access",
|
|
3
|
-
"version": "0.9.20-alpha.
|
|
3
|
+
"version": "0.9.20-alpha.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
|
|
6
6
|
"contributors": [
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@bastani/atomic": "*",
|
|
34
|
-
"@earendil-works/pi-tui": "^0.
|
|
34
|
+
"@earendil-works/pi-tui": "^0.87.1"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
37
|
"@bastani/atomic": {
|
|
@@ -6,6 +6,40 @@ 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.20-alpha.7] - 2026-09-22
|
|
10
|
+
|
|
11
|
+
### Breaking Changes
|
|
12
|
+
|
|
13
|
+
- Removed the `workflow` tool's `route` action and its router classifier. The agent now decides itself whether a workflow fits and launches with `workflow({ action: "run", workflow: "<name>", inputs, budget? })`. The `workflowId` reservation, `state` parameter, `routerDecision`, `estimatedDuration` labels, and `needs_input`/`not_launched`/`reserved` statuses are gone; `run` validates inputs and fails without launching when they are invalid. Runs launched through the model tool still belong to the launching session.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Generalized the prompt-engineering GPT-6 guide (`references/gpt_6.md`, formerly `gpt_6_astra.md`) to cover GPT-6 Sol and Luna, and replaced its paraphrased snippets with OpenAI's official GPT-6 prompt templates for follow-through, approval timing, skill-instruction priority, writing style, delegation, and verification.
|
|
18
|
+
- Focused every prompt-engineering model guide on prompts: removed API request settings such as beta headers, output-token limits, sampling parameters, tool-choice values, API paths, and pricing, while keeping prompt-ordering and caching guidance.
|
|
19
|
+
- Added source-attributed Claude Opus 5.5 guidance to the prompt-engineering skill, covering effort calibration, always-on thinking, progress visibility, bounded unattended completion, and API migration checks.
|
|
20
|
+
- Reworked all nine prompt-engineering model guides around observed behaviors, practical prompt adjustments, adaptable examples, and caveats, with API details kept secondary.
|
|
21
|
+
- `/new`, `/fork`, and `/resume` now quit running workflows instead of leaving them detached from the session that launched them, where their next stage would later fail. When workflows are running, Atomic first asks "Quit N running workflows and …?" and explains that each stops at its last checkpoint and can be resumed with `/workflow resume`; declining cancels the command and the runs keep going. Without an interactive UI the switch proceeds and the runs are quit the same way. `/reload` still keeps runs executing ([#3203](https://github.com/bastani-inc/atomic/issues/3203)).
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- A workflow run that stays in flight across a preserving host `/reload` can now create stages after the reload. Stage session creation and the stage model catalog resolve the newest live extension generation instead of the retired launch `pi` and command ctx, so the next stage no longer fails with `This extension ctx is stale after session replacement or reload` and no longer falls back to `workflows: model catalog unavailable` ([#3201](https://github.com/bastani-inc/atomic/issues/3201)).
|
|
26
|
+
- A Goal run with `create_pr=true` could never be resumed after its `pull-request` stage failed with a recoverable error. Every resume failed with `insufficient_state: replay topology mismatch for stage "pull-request"` yet still reported `resumable: true`. On resume, Goal reloads its persisted ledger, which already recorded the approving review round as `complete`, so the turn loop was skipped and `pull-request` ran without its reviewer parents. Goal now replays the turns recorded in a reloaded ledger from their durable checkpoints, so the resume re-executes only the failed stage ([#3207](https://github.com/bastani-inc/atomic/issues/3207)).
|
|
27
|
+
- Resuming a Goal run no longer duplicates its ledger history. A replayed turn (one the reloaded ledger already recorded) appended another reducer decision, lifecycle events, a convergence record and reverification entries for the same turn, so the ledger and the final PR report showed repeated history after a resume. Replayed turns are now read-only for the ledger; only live turns append and persist new outcomes ([#3207](https://github.com/bastani-inc/atomic/issues/3207)).
|
|
28
|
+
- A workflow stage with `model: "auto"` no longer fails when routing inference fails completely (Jev and the chat structured-output fallback both). The stage now runs on the current chat model with a recorded warning, on fresh runs and resumes alike, when that model is available and satisfies every routing constraint; validation, eligibility, credential-screening failures and cancellation still fail the stage ([#3206](https://github.com/bastani-inc/atomic/issues/3206)).
|
|
29
|
+
|
|
30
|
+
## [0.9.20-alpha.6] - 2026-09-22
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- Goal and Ralph end-to-end verification guidance and the workflow-authoring guidance now direct desktop, simulator, and emulator verification to Cua Driver: builtin stages load the bundled `cua-driver` skill and drive the exact window with `cua-driver call <tool>` under `CUA_DRIVER_RS_TELEMETRY_ENABLED=false`, save `get_window_state` JSON and `screenshot_out_file` images as evidence, and report a missing permission, session, or refused install as `blocked`/`needs_human` with exact remediation; custom workflows run code-owned scenarios with the `@trycua/cua-driver` SDK inside `ctx.tool` with `timeoutMs` and `signal`, after a preflight `ctx.tool` that exits `blocked` on missing permissions. The OpenAI CUA sample-app reference was removed ([#3181](https://github.com/bastani-inc/atomic/issues/3181)).
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- Docker fallback Postgres is no longer treated as ready when the published port accepts TCP during `initdb`. Atomic waits for a PostgreSQL query using the endpoint, credentials and TLS settings DBOS will use, retries transient startup resets and refusals (including a connection that terminates while the container is still starting), and shuts down a failed DBOS executor before continuing with the in-memory backend. Invalid readiness ports now fail before connecting rather than leaving a delayed process-crashing error.
|
|
39
|
+
- Failed DBOS executor cleanup no longer permits a second launch or an in-memory fallback with unconfirmed executor ownership; startup reports the initialization and cleanup errors instead.
|
|
40
|
+
- New Docker fallback containers now publish on the configured `PGPORT`, matching the readiness probe and DBOS connection instead of always binding host port 5432.
|
|
41
|
+
- A schema-backed workflow stage whose prompt resolves without any assistant message is no longer recorded as a successful model attempt and pushed into `structured_output` correction prompts. The empty completion is now classified as a transient provider failure at the execution layer: it is retried on the same model using the configured `settings.retry` budget, then advances to the next configured fallback, and its attempt record carries `Model turn ended without an assistant message after the prompt (empty completion)` instead of the structured-output contract error. Genuine cancellation during such a turn stops both the retries and the fallback chain, and corrective prompts remain reserved for turns that actually answered without calling the tool ([#3164](https://github.com/bastani-inc/atomic/issues/3164)).
|
|
42
|
+
|
|
9
43
|
## [0.9.20-alpha.5] - 2026-09-20
|
|
10
44
|
|
|
11
45
|
### Breaking Changes
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
An open-source Atomic workflow extension: install it, author workflows in TypeScript, run them from chat.
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The agent decides whether a workflow fits. Well-defined, authorized work that benefits from durable stages, checkpoints, dependencies, recovery, review loops or approval gates runs as a workflow; brainstorming, discussion, unclear goals, simple bounded work, or an explicit request to work inline, quickly or without a workflow stays inline. To launch, inspect the input contract with `workflow inputs`, then call `workflow run` with the registered workflow name and inputs. Ask only for genuinely missing information.
|
|
9
9
|
|
|
10
10
|
Atomic can author custom TypeScript `workflow({...})` definitions inline, import reusable project/package workflows or builtins from `@bastani/atomic/workflows/builtin`, and nest them with `ctx.workflow(...)`. Imported children may nest further workflows within `maxDepth`, so compose proven research, implementation, design, verification, and approval graphs rather than copying them. Custom parents can also use runtime classification, dynamic fan-out and synthesis, adversarial verification, candidate tournaments, HIL gates, and bounded convergence.
|
|
11
11
|
|
|
@@ -689,26 +689,12 @@ Raw stage-chat prompt answer replay is live-memory only. `StageSnapshot.promptAn
|
|
|
689
689
|
|
|
690
690
|
### `workflow` tool (LLM-callable)
|
|
691
691
|
|
|
692
|
-
The route-then-run contract above applies to model-tool launches:
|
|
693
|
-
|
|
694
692
|
```ts
|
|
695
|
-
workflow({
|
|
696
|
-
|
|
697
|
-
state: {
|
|
698
|
-
task: "Map session persistence by subsystem and synthesize cited findings. Do not change code.",
|
|
699
|
-
conversation: [{ role: "user", text: "Read-only research; cite concrete repository paths." }],
|
|
700
|
-
documents: [{ source: "research brief", content: "Reconcile conflicting findings in the synthesis." }],
|
|
701
|
-
},
|
|
702
|
-
})
|
|
703
|
-
// After inspecting the returned inputSchema, use its workflowId:
|
|
704
|
-
workflow({ action: "run", workflowId: "returned-execution-id", inputs: { prompt: "Map session persistence" } })
|
|
693
|
+
workflow({ action: "inputs", workflow: "deep-research-codebase" })
|
|
694
|
+
workflow({ action: "run", workflow: "deep-research-codebase", inputs: { prompt: "Map session persistence" } })
|
|
705
695
|
```
|
|
706
696
|
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
Run resolves only the registered selection, without another routing/extraction call. Invalid inputs return `needs_input`, the same ID and exact `inputContract`; correct inputs and retry. IDs bind their owner/session, definition/schema and constraints. Unknown/foreign/stale IDs, name overrides, omitted actions and legacy run state are rejected. Reservations expire with their owning tool/session and invalidate on registry changes. They are not executing runs. Use the same UUID as lifecycle `runId`; duplicate/concurrent requests cannot create a second instance. Resume continues checkpoints under that identity. Terminal IDs remain inspectable but cannot relaunch; distinct route IDs can execute independently.
|
|
710
|
-
|
|
711
|
-
Both Jev native questions and other models' structured output use the same public contract. Report canonical 15-minute duration labels directly: `15min`, `30min`, `45min`, `1hr`, `1hr15min`, through `23hr45min`, `1d`, plus `>1d`. Positive estimates round up; exactly 24 elapsed hours is `1d`, anything greater is `>1d`. The router gives its best estimate from available context. Wall-clock estimates include overhead and estimable human waits, including inline work. Granularity is not accuracy, and estimates are neither guarantees nor budgets. Supply `state.userBudget` only for explicit user limits with exact provenance. Omission inherits; zero disables only its field. Preserve approval gates and existing authorization.
|
|
697
|
+
Run starts the named workflow and returns its `runId`; invalid inputs fail without launching. Pass `budget` only for limits the user stated; omission inherits and zero disables only its field.
|
|
712
698
|
|
|
713
699
|
User `/workflow` commands launch directly and authored `ctx.workflow(...)` remains internal composition. Discovery (`list`, `get`, `inputs`, `models`), inspection (`status`, `stages`, `stage`, `transcript`), controls (`answer`, `pause`, `resume`, `quit`) and `reload` remain available. See [operations](../coding-agent/docs/workflows/operations.md) for parameters and lifecycle details.
|
|
714
700
|
|
|
@@ -765,7 +751,7 @@ export default workflow({
|
|
|
765
751
|
});
|
|
766
752
|
```
|
|
767
753
|
|
|
768
|
-
The `workflow` tool accepts
|
|
754
|
+
The `workflow` tool accepts direct workflow execution (`run` with workflow name and `inputs`), discovery, inspection, pending-prompt answers, run control, and reload. Author stage graphs with `ctx.task`, `ctx.chain`, and `ctx.parallel` inside workflow definitions.
|
|
769
755
|
|
|
770
756
|
For large handoffs, prefer artifact paths over prompt injection: write stage output to `output`, set `outputMode: "file-only"` when the parent only needs the path, pass paths with `reads`, and instruct downstream agents explicitly with wording like `Read the file at <path>...`. Reserve `previous`/`{previous}` for compact summaries; avoid passing full session histories, all prior stage outputs, or every review round directly into the next model prompt. In review loops, save JSON review artifacts and pass only the latest review-round artifact, with a ledger or index file linking older rounds when needed.
|
|
771
757
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
adversarial_verification_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-dxjxtgmp.js";
|
|
4
4
|
import"./chunk-2377r57g.js";
|
|
5
5
|
import"./chunk-n1910xc4.js";
|
|
6
|
-
import"./chunk-
|
|
7
|
-
import"./chunk-
|
|
6
|
+
import"./chunk-5724b0cf.js";
|
|
7
|
+
import"./chunk-3tx8ry44.js";
|
|
8
8
|
export {
|
|
9
9
|
adversarial_verification_default as default
|
|
10
10
|
};
|
|
@@ -5125,6 +5125,36 @@ function getDbosProcessOwner() {
|
|
|
5125
5125
|
// dist/builtin/workflows/src/durable/dbos-sdk-handle.ts
|
|
5126
5126
|
var ATOMIC_EXECUTOR_ID = `atomic-${process.pid.toString(36)}-${crypto.randomUUID().slice(0, 8)}`;
|
|
5127
5127
|
|
|
5128
|
+
// ../../node_modules/pg/esm/index.mjs
|
|
5129
|
+
var import_lib = __toESM(require_lib2(), 1);
|
|
5130
|
+
var Client = import_lib.default.Client;
|
|
5131
|
+
var Pool = import_lib.default.Pool;
|
|
5132
|
+
var Connection = import_lib.default.Connection;
|
|
5133
|
+
var types = import_lib.default.types;
|
|
5134
|
+
var Query = import_lib.default.Query;
|
|
5135
|
+
var DatabaseError = import_lib.default.DatabaseError;
|
|
5136
|
+
var escapeIdentifier = import_lib.default.escapeIdentifier;
|
|
5137
|
+
var escapeLiteral = import_lib.default.escapeLiteral;
|
|
5138
|
+
var Result = import_lib.default.Result;
|
|
5139
|
+
var TypeOverrides = import_lib.default.TypeOverrides;
|
|
5140
|
+
var defaults = import_lib.default.defaults;
|
|
5141
|
+
|
|
5142
|
+
// dist/builtin/workflows/src/durable/dbos-default-postgres-url.ts
|
|
5143
|
+
function defaultPostgresUrl(database, host = process.env.PGHOST || "localhost", port = process.env.PGPORT || "5432") {
|
|
5144
|
+
const url = new URL("postgresql://localhost");
|
|
5145
|
+
url.pathname = `/${database}`;
|
|
5146
|
+
if (host.startsWith("/") || host.includes(":"))
|
|
5147
|
+
url.searchParams.set("host", host);
|
|
5148
|
+
else
|
|
5149
|
+
url.hostname = host;
|
|
5150
|
+
url.port = port;
|
|
5151
|
+
url.username = encodeURIComponent(process.env.PGUSER || "postgres");
|
|
5152
|
+
url.password = encodeURIComponent(process.env.PGPASSWORD || "dbos");
|
|
5153
|
+
url.searchParams.set("connect_timeout", process.env.PGCONNECT_TIMEOUT || "10");
|
|
5154
|
+
url.searchParams.set("sslmode", process.env.PGSSLMODE || (host === "localhost" ? "disable" : "allow"));
|
|
5155
|
+
return url.toString();
|
|
5156
|
+
}
|
|
5157
|
+
|
|
5128
5158
|
// dist/builtin/workflows/src/durable/dbos-embedded-postgres.ts
|
|
5129
5159
|
import {
|
|
5130
5160
|
chmodSync,
|
|
@@ -5844,20 +5874,6 @@ import { createServer } from "node:net";
|
|
|
5844
5874
|
import { endianness } from "node:os";
|
|
5845
5875
|
import { join as join3 } from "node:path";
|
|
5846
5876
|
|
|
5847
|
-
// ../../node_modules/pg/esm/index.mjs
|
|
5848
|
-
var import_lib = __toESM(require_lib2(), 1);
|
|
5849
|
-
var Client = import_lib.default.Client;
|
|
5850
|
-
var Pool = import_lib.default.Pool;
|
|
5851
|
-
var Connection = import_lib.default.Connection;
|
|
5852
|
-
var types = import_lib.default.types;
|
|
5853
|
-
var Query = import_lib.default.Query;
|
|
5854
|
-
var DatabaseError = import_lib.default.DatabaseError;
|
|
5855
|
-
var escapeIdentifier = import_lib.default.escapeIdentifier;
|
|
5856
|
-
var escapeLiteral = import_lib.default.escapeLiteral;
|
|
5857
|
-
var Result = import_lib.default.Result;
|
|
5858
|
-
var TypeOverrides = import_lib.default.TypeOverrides;
|
|
5859
|
-
var defaults = import_lib.default.defaults;
|
|
5860
|
-
|
|
5861
5877
|
// dist/builtin/workflows/src/durable/dbos-postgres-ownership.ts
|
|
5862
5878
|
import { randomUUID } from "node:crypto";
|
|
5863
5879
|
import {
|
|
@@ -6953,6 +6969,16 @@ var DOCKER_CONTAINER = "dbos-db";
|
|
|
6953
6969
|
var DOCKER_IMAGE = "pgvector/pgvector:pg16";
|
|
6954
6970
|
var DOCKER_READY_ATTEMPTS = 60;
|
|
6955
6971
|
var DOCKER_READY_DELAY_MS = 500;
|
|
6972
|
+
var DOCKER_READY_QUERY_TIMEOUT_MS = 1000;
|
|
6973
|
+
var TRANSIENT_STARTUP_CODES = new Set([
|
|
6974
|
+
"ECONNREFUSED",
|
|
6975
|
+
"ECONNRESET",
|
|
6976
|
+
"ETIMEDOUT",
|
|
6977
|
+
"EPIPE",
|
|
6978
|
+
"57P01",
|
|
6979
|
+
"57P02",
|
|
6980
|
+
"57P03"
|
|
6981
|
+
]);
|
|
6956
6982
|
var resolution;
|
|
6957
6983
|
var resolvedProvider;
|
|
6958
6984
|
var embeddedProvider = ensureEmbeddedDbosPostgres;
|
|
@@ -7042,6 +7068,103 @@ function shutdownResolvedLocalDbos() {
|
|
|
7042
7068
|
});
|
|
7043
7069
|
return embeddedShutdown;
|
|
7044
7070
|
}
|
|
7071
|
+
function postgresReadinessPort(value) {
|
|
7072
|
+
const port = Number(value);
|
|
7073
|
+
const validFormat = typeof value !== "string" || /^\d+$/.test(value);
|
|
7074
|
+
const validPort = Number.isInteger(port) && port >= 1 && port <= 65535;
|
|
7075
|
+
if (!validFormat || !validPort)
|
|
7076
|
+
throw new Error("PostgreSQL readiness port (PGPORT) must be an integer between 1 and 65535.");
|
|
7077
|
+
return port;
|
|
7078
|
+
}
|
|
7079
|
+
function dockerFallbackEndpoint() {
|
|
7080
|
+
return {
|
|
7081
|
+
host: process.env.PGHOST || "localhost",
|
|
7082
|
+
port: postgresReadinessPort(process.env.PGPORT || "5432"),
|
|
7083
|
+
user: process.env.PGUSER || "postgres",
|
|
7084
|
+
password: process.env.PGPASSWORD || "dbos"
|
|
7085
|
+
};
|
|
7086
|
+
}
|
|
7087
|
+
async function waitForPostgresProtocolReadiness(options) {
|
|
7088
|
+
postgresReadinessPort(options.port);
|
|
7089
|
+
const attempts = options.attempts ?? DOCKER_READY_ATTEMPTS;
|
|
7090
|
+
const delayMs = options.delayMs ?? DOCKER_READY_DELAY_MS;
|
|
7091
|
+
const wait = options.wait ?? delay;
|
|
7092
|
+
const isReady = options.isReady ?? dockerPostgresQueryReady;
|
|
7093
|
+
const deadline = performance.now() + attempts * delayMs;
|
|
7094
|
+
for (let attempt = 0;attempt < attempts && performance.now() < deadline; attempt += 1) {
|
|
7095
|
+
try {
|
|
7096
|
+
if (await isReady(options.host, options.port))
|
|
7097
|
+
return;
|
|
7098
|
+
} catch (error) {
|
|
7099
|
+
if (!isTransientStartupError(readStartupFailure(error)))
|
|
7100
|
+
throw error;
|
|
7101
|
+
}
|
|
7102
|
+
if (attempt + 1 < attempts && performance.now() < deadline)
|
|
7103
|
+
await wait(delayMs);
|
|
7104
|
+
}
|
|
7105
|
+
throw new Error(`The DBOS Postgres container started but did not become ready within ${attempts * delayMs / 1000} seconds.`);
|
|
7106
|
+
}
|
|
7107
|
+
function readStartupFailure(value) {
|
|
7108
|
+
if (!(value instanceof Error))
|
|
7109
|
+
return { message: String(value) };
|
|
7110
|
+
const cause = value.cause;
|
|
7111
|
+
return {
|
|
7112
|
+
message: value.message,
|
|
7113
|
+
code: "code" in value && typeof value.code === "string" ? value.code : undefined,
|
|
7114
|
+
cause: cause === undefined ? undefined : cause instanceof Error ? cause : String(cause),
|
|
7115
|
+
source: value
|
|
7116
|
+
};
|
|
7117
|
+
}
|
|
7118
|
+
function isTransientStartupError(error) {
|
|
7119
|
+
const seen = new Set;
|
|
7120
|
+
let current = error;
|
|
7121
|
+
while (current !== undefined) {
|
|
7122
|
+
const { code, message, source, cause } = current;
|
|
7123
|
+
if (typeof code === "string" && TRANSIENT_STARTUP_CODES.has(code))
|
|
7124
|
+
return true;
|
|
7125
|
+
if (typeof code === "string" && /^[0-9A-Z]{5}$/.test(code))
|
|
7126
|
+
return false;
|
|
7127
|
+
if (/\b(?:ECONNRESET|ECONNREFUSED|ETIMEDOUT|EPIPE)\b|^connection (?:refused|terminated(?: unexpectedly| due to connection timeout)?)(?:\s|$)|^connect(?:ion)? (?:timeout|timed out)(?:\s|$)|^timeout (?:expired|exceeded when trying to connect)$/i.test(message))
|
|
7128
|
+
return true;
|
|
7129
|
+
if (source === undefined || seen.has(source))
|
|
7130
|
+
return false;
|
|
7131
|
+
seen.add(source);
|
|
7132
|
+
current = cause === undefined ? undefined : readStartupFailure(cause);
|
|
7133
|
+
}
|
|
7134
|
+
return false;
|
|
7135
|
+
}
|
|
7136
|
+
async function dockerPostgresQueryReady(host, port) {
|
|
7137
|
+
const client = new Client({
|
|
7138
|
+
connectionString: defaultPostgresUrl("postgres", host, String(port)),
|
|
7139
|
+
connectionTimeoutMillis: DOCKER_READY_QUERY_TIMEOUT_MS,
|
|
7140
|
+
query_timeout: DOCKER_READY_QUERY_TIMEOUT_MS,
|
|
7141
|
+
statement_timeout: DOCKER_READY_QUERY_TIMEOUT_MS
|
|
7142
|
+
});
|
|
7143
|
+
client.on("error", () => {});
|
|
7144
|
+
let timer;
|
|
7145
|
+
try {
|
|
7146
|
+
await Promise.race([
|
|
7147
|
+
(async () => {
|
|
7148
|
+
await client.connect();
|
|
7149
|
+
await client.query("SELECT 1");
|
|
7150
|
+
})(),
|
|
7151
|
+
new Promise((_, reject) => {
|
|
7152
|
+
timer = setTimeout(() => reject(new Error("timeout expired")), DOCKER_READY_QUERY_TIMEOUT_MS);
|
|
7153
|
+
})
|
|
7154
|
+
]);
|
|
7155
|
+
return true;
|
|
7156
|
+
} catch (error) {
|
|
7157
|
+
if (isTransientStartupError(readStartupFailure(error)))
|
|
7158
|
+
return false;
|
|
7159
|
+
throw error;
|
|
7160
|
+
} finally {
|
|
7161
|
+
if (timer !== undefined)
|
|
7162
|
+
clearTimeout(timer);
|
|
7163
|
+
client.end().catch(() => {
|
|
7164
|
+
return;
|
|
7165
|
+
});
|
|
7166
|
+
}
|
|
7167
|
+
}
|
|
7045
7168
|
async function resolve() {
|
|
7046
7169
|
const explicit = process.env.DBOS_SYSTEM_DATABASE_URL?.trim();
|
|
7047
7170
|
if (explicit)
|
|
@@ -7067,6 +7190,7 @@ async function resolve() {
|
|
|
7067
7190
|
}
|
|
7068
7191
|
}
|
|
7069
7192
|
async function ensureDockerDbosPostgres() {
|
|
7193
|
+
const endpoint = dockerFallbackEndpoint();
|
|
7070
7194
|
const docker = await runLocalCommand("docker", ["version", "--format", "{{.Server.Version}}"]).catch(() => {
|
|
7071
7195
|
return;
|
|
7072
7196
|
});
|
|
@@ -7089,18 +7213,13 @@ async function ensureDockerDbosPostgres() {
|
|
|
7089
7213
|
"-e",
|
|
7090
7214
|
"PGDATA=/var/lib/postgresql/data",
|
|
7091
7215
|
"-p",
|
|
7092
|
-
|
|
7216
|
+
`127.0.0.1:${endpoint.port}:5432`,
|
|
7093
7217
|
"-v",
|
|
7094
7218
|
"dbos-db-data:/var/lib/postgresql/data",
|
|
7095
7219
|
DOCKER_IMAGE
|
|
7096
7220
|
]);
|
|
7097
7221
|
}
|
|
7098
|
-
|
|
7099
|
-
if (await tcpReachable("127.0.0.1", 5432))
|
|
7100
|
-
return;
|
|
7101
|
-
await delay(DOCKER_READY_DELAY_MS);
|
|
7102
|
-
}
|
|
7103
|
-
throw new Error("The DBOS Postgres container started but did not become ready within 30 seconds.");
|
|
7222
|
+
await waitForPostgresProtocolReadiness({ host: endpoint.host, port: endpoint.port });
|
|
7104
7223
|
}
|
|
7105
7224
|
async function requireDockerSuccess(action, args) {
|
|
7106
7225
|
const result = await runLocalCommand("docker", args);
|
|
@@ -63,9 +63,9 @@ var WORKER_PREFLIGHT_CONTRACT = [
|
|
|
63
63
|
`);
|
|
64
64
|
var E2E_VERIFICATION_GUIDANCE = [
|
|
65
65
|
"Verify correctness end-to-end whenever practical for user-visible behavior; an executable scenario is stronger proof than code inspection, unit tests, or stage summaries alone.",
|
|
66
|
-
'For web or frontend flows, including frontend changes whose correctness depends on backend/API behavior, use the agent-browser skill or delegate with `skill: "agent-browser"`; capture snapshot, screenshot, DOM, or network evidence suited to the objective.',
|
|
66
|
+
'For web or frontend flows, including frontend changes whose correctness depends on backend/API behavior, use the agent-browser skill or delegate with `skill: "agent-browser"`; capture snapshot, screenshot, DOM, or network evidence suited to the objective. Prefer agent-browser for what its skill covers (websites and web apps in Chrome/Chromium, Electron desktop apps, Slack, cloud browsers); use Cua Driver for anything else, including iOS simulators, Android emulators, OS dialogs, and non-Chromium browsers, and whenever agent-browser hits a limitation.',
|
|
67
67
|
"For TUI/terminal automation/testing, prefer the herdr skill on macOS, Linux and Windows. Install Herdr if missing when network access and permissions permit; fall back to the tmux skill or native Windows psmux if installation or use is not possible. Preserve the pinned herdr skill's explicit-request and HERDR_ENV=1 requirements; never control a focused session from outside Herdr. Check installed help: psmux uses tmux-style commands, while herdr has its own CLI, not interchangeable flags. Exercise the actual interactive flow and retain pane/text or terminal recording evidence.",
|
|
68
|
-
"For desktop and accessible simulator/emulator windows, use
|
|
68
|
+
"For desktop and accessible simulator/emulator windows, use Cua Driver: when a model chooses the next action, as in this stage, use the `cua-driver` CLI; when workflow TypeScript code owns the sequence and the postcondition, the @trycua/cua-driver TypeScript SDK inside `ctx.tool` is the face instead. Here, load the cua-driver skill and drive the exact window with one-shot `cua-driver call <tool>` commands, following the skill's snapshot -> act -> fresh snapshot -> verify loop. Before the first action, ensure the executable (`cua-driver --version`; if missing, one bounded attempt with upstream's one-line installer, reporting its side effects; never `cua-driver skills install`), telemetry off (run every command with CUA_DRIVER_RS_TELEMETRY_ENABLED=false, and `cua-driver telemetry disable` once after an executable install), and readiness (`cua-driver status`, `cua-driver doctor`, `cua-driver call list_apps`; on macOS also `cua-driver permissions status`, starting a stopped daemon with `open -n -g -a CuaDriver --args serve`) with bounded attempts per docs/computer-use.md. Save each `get_window_state` JSON result and `screenshot_out_file` image to the artifacts directory as evidence. Report a missing macOS Accessibility or Screen Recording grant, a non-interactive Windows session, no graphical Linux session, or a refused/failed install as the stage's blocked/needs_human finding with the exact fix (for macOS: `cua-driver permissions grant`, then toggle CuaDriver on under System Settings -> Privacy & Security -> Accessibility and Screen & System Audio Recording, then relaunch the daemon; for an install: the exact installer command), and re-run the readiness check on resume. Use a dedicated desktop/session and controlled fixtures, inspect snapshots for other windows, and stop before destructive actions. Do not automate an arbitrary physical iPhone without an accessible simulator/emulator/mirroring or native automation setup, or label browser recordings as terminal/iOS proof.",
|
|
69
69
|
"Choose tools from observed environment capabilities. Prefer installed/cached tools; install missing tools, runtimes or plugins when online access and permissions permit. Known offline/restricted installation is sufficient evidence not to attempt prohibited downloads; otherwise check capabilities or make one bounded setup attempt. Do not loop on blocked downloads, require production credentials, or take unsafe actions.",
|
|
70
70
|
"When execution or installation is unavailable, continue available authoritative repository checks and retain useful local evidence. Report the constraint or attempted command with observed output, what could not run, and the narrower validation performed. For non-UI tasks, use relevant executable checks rather than manufacturing a UI scenario. An unavailable optional mechanism is not itself failed implementation or permission to relax required project checks."
|
|
71
71
|
].join(`
|
|
@@ -79,6 +79,7 @@ var CODE_QUALITY_VERIFICATION_GUIDANCE = [
|
|
|
79
79
|
`);
|
|
80
80
|
var MEDIA_PUBLICATION_GUIDANCE = [
|
|
81
81
|
"Detect the repository provider and authorized PR/MR/issue/comment target before publishing media. Inspect and redact screenshots/video for secrets, personal information and unrelated windows; tie evidence to the verified commit and scenario. Local evidence collection does not authorize uploads.",
|
|
82
|
+
"When creating the PR/MR, gather the image and video evidence the verification stages produced and attach it to the PR body when the provider supports uploads: cua-driver `screenshot_out_file` before/after PNGs from `get_window_state`, agent-browser `screenshot` PNGs and `record` recordings, and any QA proof video. Reference each file in the body next to the scenario it proves (a before/after pair per verified postcondition, one recording per interaction) and keep the window-state JSON as a local artifact the body cites by name. On supported GitHub, pass them at creation: gh pr create --body-file <body.md> --attach 'before.png#State before the action' --attach 'after.png#State after the action' --attach flow.webm; use gh pr edit/comment --attach for evidence produced later.",
|
|
82
83
|
"On GitHub, check gh --version and the chosen command's --help. GitHub CLI >=2.99.0 supports repeatable --attach on gh issue create/edit/comment and gh pr create/edit/comment. Use native attachments when supported, for example gh pr comment <number> --repo <owner/repo> --body-file <body.md> --attach <proof.mp4>. Attach each file once. Body-local path references are rewritten to hosted URLs; otherwise attachments append in flag order. Image path#alt text is supported; video alt text is not. A standalone  paragraph becomes an embedded player.",
|
|
83
84
|
"Check current GitHub limits: PNG/JPEG/GIF/WebP/SVG images and MP4/MOV/WebM videos; images/GIFs up to 10 MB, video 10 MB on Free or 100 MB paid. Native attachment upload requires repository write access and supported OAuth/classic PAT auth; GitHub Enterprise Server is unsupported in this release. See https://docs.github.com/en/github-cli/github-cli/attaching-files-with-github-cli.",
|
|
84
85
|
"Read back the returned PR/issue/comment and confirm usable GitHub-hosted links before claiming attachment success. Unsupported CLI versions, hosts, providers, auth or sizes require a truthful fallback: retain the local artifact and explain authorized manual attachment or supported provider options. Never claim file:// links are uploaded evidence, expose secrets, or upload automatically to unrelated third-party hosts."
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
workflow,
|
|
3
3
|
withBuiltinContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5724b0cf.js";
|
|
5
5
|
import {
|
|
6
6
|
keepContext,
|
|
7
7
|
REVIEWER_CALIBRATION_RULES,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
EVIDENCE_CLOSURE_POLICY,
|
|
25
25
|
WORKTREE_DISCIPLINE_CONTRACT,
|
|
26
26
|
REVIEW_CODE_DELTA_CONTRACT
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-3tx8ry44.js";
|
|
28
28
|
import {
|
|
29
29
|
workflowArtifactDirectoryPath,
|
|
30
30
|
ensureWorkflowArtifactDirectory,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
reviewerFailureText,
|
|
37
37
|
summarizeReviewConvergence,
|
|
38
38
|
reverify_consolidated_batch
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-2hzrv5y8.js";
|
|
40
40
|
import {
|
|
41
41
|
VERIFICATION_SCALE
|
|
42
42
|
} from "./chunk-n1910xc4.js";
|
|
@@ -810,9 +810,13 @@ async function runGoalWorkflow(ctx, options) {
|
|
|
810
810
|
let latestReviewReportPath;
|
|
811
811
|
let terminalRemainingWork;
|
|
812
812
|
let previousOrchestratorSessionFile;
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
813
|
+
const recordedTurns = ledger.turns;
|
|
814
|
+
for (let turn = 1;turn <= maxTurns && (ledger.status === "active" || turn <= recordedTurns); turn += 1) {
|
|
815
|
+
const replayingRecordedTurn = turn <= recordedTurns;
|
|
816
|
+
if (!replayingRecordedTurn) {
|
|
817
|
+
appendLifecycleEvent(ledger, "work_turn_started", "Orchestrator started.", turn);
|
|
818
|
+
await writeGoalLedger(ledgerPath, ledger);
|
|
819
|
+
}
|
|
816
820
|
const orchestratorReceiptPath = join3(artifactDir, "orchestrator-receipt.md");
|
|
817
821
|
const orchestratorForkOptions = forkContinuationOptions(previousOrchestratorSessionFile);
|
|
818
822
|
const orchestratorPrompt = orchestratorForkOptions.forkFromSessionFile === undefined ? renderGoalOrchestratorPrompt({
|
|
@@ -841,7 +845,7 @@ async function runGoalWorkflow(ctx, options) {
|
|
|
841
845
|
latestReviews = [];
|
|
842
846
|
latestReviewArtifactPaths = [];
|
|
843
847
|
latestReviewReportPath = undefined;
|
|
844
|
-
ledger.turns = turn;
|
|
848
|
+
ledger.turns = Math.max(ledger.turns, turn);
|
|
845
849
|
ledger.status = "needs_human";
|
|
846
850
|
ledger.decisions.push({
|
|
847
851
|
turn,
|
|
@@ -861,18 +865,20 @@ async function runGoalWorkflow(ctx, options) {
|
|
|
861
865
|
break;
|
|
862
866
|
}
|
|
863
867
|
previousOrchestratorSessionFile = orchestrator.sessionFile;
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
868
|
+
if (!replayingRecordedTurn) {
|
|
869
|
+
ledger.turns = turn;
|
|
870
|
+
const receiptAlreadyRecorded = ledger.receipts.some((receipt) => receipt.turn === turn && receipt.artifact_path === orchestratorReceiptPath);
|
|
871
|
+
if (!receiptAlreadyRecorded) {
|
|
872
|
+
ledger.receipts.push({
|
|
873
|
+
turn,
|
|
874
|
+
stage: orchestrator.name ?? orchestrator.stageName,
|
|
875
|
+
artifact_path: orchestratorReceiptPath,
|
|
876
|
+
summary: `Orchestrator receipt artifact: ${orchestratorReceiptPath}`
|
|
877
|
+
});
|
|
878
|
+
appendLifecycleEvent(ledger, "receipt_recorded", "Orchestrator receipt recorded.", turn);
|
|
879
|
+
}
|
|
880
|
+
await writeGoalLedger(ledgerPath, ledger);
|
|
874
881
|
}
|
|
875
|
-
await writeGoalLedger(ledgerPath, ledger);
|
|
876
882
|
const reviewerStep = (name, reviewerRole, focus) => ({
|
|
877
883
|
name,
|
|
878
884
|
task: renderReviewerPrompt({
|
|
@@ -957,14 +963,14 @@ async function runGoalWorkflow(ctx, options) {
|
|
|
957
963
|
}
|
|
958
964
|
});
|
|
959
965
|
latestReviewReportPath = await writeReviewRoundArtifact(artifactDir, latestReviews, reverified.batch, reverified.audits);
|
|
960
|
-
if (reverified.audits.length > 0) {
|
|
966
|
+
if (!replayingRecordedTurn && reverified.audits.length > 0) {
|
|
961
967
|
ledger.reverification ??= [];
|
|
962
968
|
ledger.reverification.push(...reverified.audits);
|
|
963
969
|
}
|
|
964
970
|
const findings = latestReviews.flatMap((review) => review.findings);
|
|
965
971
|
const traceability = latestReviews.flatMap((review) => review.requirements_traceability);
|
|
966
972
|
ledger.convergence ??= [];
|
|
967
|
-
if (!reviewerBatchFailed && roundProducedDecisions) {
|
|
973
|
+
if (!replayingRecordedTurn && !reviewerBatchFailed && roundProducedDecisions) {
|
|
968
974
|
ledger.convergence.push(record_convergence({
|
|
969
975
|
unresolvedBlockingCount: reverified.batch.filter((entry) => entry.blocking).length,
|
|
970
976
|
meanFindingConfidence: findings.length === 0 ? null : findings.reduce((total, finding) => total + finding.confidence_score, 0) / findings.length,
|
|
@@ -974,9 +980,12 @@ async function runGoalWorkflow(ctx, options) {
|
|
|
974
980
|
}));
|
|
975
981
|
}
|
|
976
982
|
const newReviews = latestReviews.filter((review) => !ledger.reviews.some((recorded) => recorded.turn === review.turn && recorded.reviewer === review.reviewer));
|
|
977
|
-
|
|
983
|
+
if (!replayingRecordedTurn)
|
|
984
|
+
ledger.reviews.push(...newReviews);
|
|
978
985
|
latestReviewArtifactPaths = [latestReviewReportPath, ...latestReviews.map((review) => review.artifact_path)];
|
|
979
|
-
|
|
986
|
+
if (!replayingRecordedTurn) {
|
|
987
|
+
appendLifecycleEvent(ledger, "reviews_recorded", `Recorded ${latestReviews.length} reviewer decisions.`, turn);
|
|
988
|
+
}
|
|
980
989
|
if (reviewerBatchFailed) {
|
|
981
990
|
terminalRemainingWork = collectRemainingWork(latestReviews);
|
|
982
991
|
const reason = `Reviewer execution failed before quorum could be established. Remaining work: ${terminalRemainingWork}`;
|
|
@@ -993,6 +1002,8 @@ async function runGoalWorkflow(ctx, options) {
|
|
|
993
1002
|
await writeGoalLedger(ledgerPath, ledger);
|
|
994
1003
|
break;
|
|
995
1004
|
}
|
|
1005
|
+
if (replayingRecordedTurn)
|
|
1006
|
+
continue;
|
|
996
1007
|
const reducerOutcome = reduceGoalDecision(ledger, latestReviews, {
|
|
997
1008
|
turn,
|
|
998
1009
|
maxTurns,
|