@bastani/atomic 0.9.2 → 0.9.3-alpha.2
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 +66 -0
- package/README.md +2 -2
- package/dist/builtin/cursor/CHANGELOG.md +15 -0
- package/dist/builtin/cursor/README.md +2 -1
- package/dist/builtin/cursor/package.json +2 -2
- package/dist/builtin/cursor/src/cursor-models-raw.json +2 -9
- package/dist/builtin/cursor/src/model-mapper.ts +14 -3
- package/dist/builtin/cursor/src/proto/protobuf-codec-base64.ts +22 -0
- package/dist/builtin/cursor/src/proto/protobuf-codec-request.ts +53 -13
- package/dist/builtin/cursor/src/proto/protobuf-codec-wire.ts +24 -7
- package/dist/builtin/cursor/src/proto/protobuf-codec.ts +3 -2
- package/dist/builtin/cursor/src/stream.ts +5 -11
- package/dist/builtin/cursor/src/transport-types.ts +3 -0
- package/dist/builtin/cursor/src/transport.ts +1 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/CHANGELOG.md +6 -0
- package/dist/builtin/mcp/direct-tools.ts +4 -2
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/mcp/proxy-call.ts +3 -1
- package/dist/builtin/mcp/utils.ts +18 -7
- package/dist/builtin/subagents/CHANGELOG.md +20 -0
- package/dist/builtin/subagents/README.md +6 -6
- package/dist/builtin/subagents/agents/code-simplifier.md +7 -6
- package/dist/builtin/subagents/agents/codebase-analyzer.md +5 -4
- package/dist/builtin/subagents/agents/codebase-locator.md +3 -3
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +10 -10
- package/dist/builtin/subagents/agents/codebase-pattern-finder.md +4 -4
- package/dist/builtin/subagents/agents/codebase-research-analyzer.md +3 -3
- package/dist/builtin/subagents/agents/codebase-research-locator.md +4 -4
- package/dist/builtin/subagents/agents/debugger.md +5 -5
- package/dist/builtin/subagents/agents/worker.md +56 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/skills/subagent/SKILL.md +11 -11
- package/dist/builtin/subagents/src/agents/agent-loaders.ts +3 -5
- package/dist/builtin/subagents/src/agents/agent-management-helpers.ts +3 -3
- package/dist/builtin/subagents/src/extension/fanout-child.ts +1 -0
- package/dist/builtin/subagents/src/extension/index.ts +6 -3
- package/dist/builtin/subagents/src/extension/schemas.ts +2 -7
- package/dist/builtin/subagents/src/intercom/result-intercom.ts +4 -3
- package/dist/builtin/subagents/src/runs/background/async-job-tracker.ts +1 -4
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-single.ts +15 -1
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor.ts +35 -1
- package/dist/builtin/subagents/src/runs/shared/mcp-direct-tool-allowlist.ts +1 -1
- package/dist/builtin/subagents/src/runs/shared/nested-render.ts +2 -2
- package/dist/builtin/subagents/src/runs/shared/pi-args.ts +2 -1
- package/dist/builtin/subagents/src/runs/shared/subagent-prompt-runtime.ts +4 -2
- package/dist/builtin/subagents/src/shared/types-async.ts +1 -0
- package/dist/builtin/subagents/src/shared/types-depth.ts +5 -5
- package/dist/builtin/subagents/src/shared/types-runtime.ts +2 -1
- package/dist/builtin/subagents/src/slash/prompt-template-bridge.ts +27 -5
- package/dist/builtin/subagents/src/tui/render-event-formatting.ts +2 -2
- package/dist/builtin/subagents/src/tui/render-layout.ts +27 -4
- package/dist/builtin/subagents/src/tui/render-result-animation.ts +22 -31
- package/dist/builtin/subagents/src/tui/render-result-compact.ts +6 -6
- package/dist/builtin/subagents/src/tui/render-result.ts +20 -19
- package/dist/builtin/subagents/src/tui/render-status-progress.ts +3 -3
- package/dist/builtin/subagents/src/tui/render-widget.ts +46 -7
- package/dist/builtin/subagents/src/tui/render.ts +2 -2
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +56 -0
- package/dist/builtin/workflows/README.md +3 -3
- package/dist/builtin/workflows/builtin/goal-artifacts.ts +11 -6
- package/dist/builtin/workflows/builtin/goal-ledger.ts +33 -1
- package/dist/builtin/workflows/builtin/goal-prompts.ts +23 -28
- package/dist/builtin/workflows/builtin/goal-reducer.ts +2 -2
- package/dist/builtin/workflows/builtin/goal-reports.ts +2 -5
- package/dist/builtin/workflows/builtin/goal-review.ts +1 -1
- package/dist/builtin/workflows/builtin/goal-runner.ts +10 -17
- package/dist/builtin/workflows/builtin/open-claude-design-feedback.ts +3 -3
- package/dist/builtin/workflows/builtin/open-claude-design-phases.ts +1 -3
- package/dist/builtin/workflows/builtin/open-claude-design-setup.ts +1 -1
- package/dist/builtin/workflows/builtin/ralph-core.ts +7 -17
- package/dist/builtin/workflows/builtin/ralph-runner.ts +11 -18
- package/dist/builtin/workflows/builtin/shared-prompts.ts +1 -1
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/authoring.d.ts +1 -1
- package/dist/builtin/workflows/src/durable/backend.ts +343 -0
- package/dist/builtin/workflows/src/durable/child-primitive.ts +79 -0
- package/dist/builtin/workflows/src/durable/dbos-backend.ts +421 -0
- package/dist/builtin/workflows/src/durable/dbos-envelope.ts +171 -0
- package/dist/builtin/workflows/src/durable/factory.ts +96 -0
- package/dist/builtin/workflows/src/durable/file-backend.ts +433 -0
- package/dist/builtin/workflows/src/durable/index.ts +73 -0
- package/dist/builtin/workflows/src/durable/resume-catalog.ts +217 -0
- package/dist/builtin/workflows/src/durable/resume-runtime.ts +299 -0
- package/dist/builtin/workflows/src/durable/scoped-backend.ts +171 -0
- package/dist/builtin/workflows/src/durable/stage-primitive.ts +284 -0
- package/dist/builtin/workflows/src/durable/tool-primitive.ts +180 -0
- package/dist/builtin/workflows/src/durable/types.ts +168 -0
- package/dist/builtin/workflows/src/durable/ui-primitive.ts +96 -0
- package/dist/builtin/workflows/src/engine/options.ts +3 -0
- package/dist/builtin/workflows/src/engine/primitives/parallel.ts +2 -2
- package/dist/builtin/workflows/src/engine/primitives/task.ts +4 -4
- package/dist/builtin/workflows/src/engine/primitives/ui.ts +22 -8
- package/dist/builtin/workflows/src/engine/primitives/workflow.ts +8 -0
- package/dist/builtin/workflows/src/engine/run-durable-finalize.ts +69 -0
- package/dist/builtin/workflows/src/engine/run-durable-stage-session.ts +31 -0
- package/dist/builtin/workflows/src/engine/run.ts +148 -6
- package/dist/builtin/workflows/src/engine/runtime.ts +8 -2
- package/dist/builtin/workflows/src/extension/config-loader.ts +35 -15
- package/dist/builtin/workflows/src/extension/discovery.ts +20 -8
- package/dist/builtin/workflows/src/extension/extension-factory.ts +6 -12
- package/dist/builtin/workflows/src/extension/extension-lifecycle.ts +5 -1
- package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +4 -2
- package/dist/builtin/workflows/src/extension/runtime.ts +48 -9
- package/dist/builtin/workflows/src/extension/wiring.ts +1 -1
- package/dist/builtin/workflows/src/extension/workflow-run-control-command.ts +143 -4
- package/dist/builtin/workflows/src/runs/background/quit.ts +61 -0
- package/dist/builtin/workflows/src/runs/background/status.ts +1 -0
- package/dist/builtin/workflows/src/runs/foreground/executor-direct-helpers.ts +5 -5
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-call.ts +74 -33
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-context.ts +20 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-factory.ts +8 -7
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-replay.ts +1 -0
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-types.ts +1 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-types.ts +19 -2
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-context.ts +4 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-controller.ts +10 -10
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-options.ts +5 -1
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-send-user-message.ts +25 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-types.ts +3 -0
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +16 -0
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.ts +20 -0
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +23 -1
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.ts +30 -1
- package/dist/builtin/workflows/src/shared/store-public-types.ts +6 -2
- package/dist/builtin/workflows/src/shared/store-run-methods.ts +12 -6
- package/dist/builtin/workflows/src/shared/types.ts +55 -0
- package/dist/builtin/workflows/src/tui/dispatch-confirm.ts +11 -10
- package/dist/builtin/workflows/src/tui/graph-view-constants.ts +1 -1
- package/dist/builtin/workflows/src/tui/graph-view-graph-render.ts +41 -0
- package/dist/builtin/workflows/src/tui/graph-view-input.ts +82 -24
- package/dist/builtin/workflows/src/tui/graph-view-render.ts +7 -0
- package/dist/builtin/workflows/src/tui/graph-view-state.ts +22 -2
- package/dist/builtin/workflows/src/tui/graph-view-types.ts +4 -5
- package/dist/builtin/workflows/src/tui/overlay-adapter.ts +9 -11
- package/dist/builtin/workflows/src/tui/stage-chat-view-footer-status.ts +9 -3
- package/dist/builtin/workflows/src/tui/stage-chat-view-input.ts +11 -2
- package/dist/builtin/workflows/src/tui/stage-chat-view-live-events.ts +35 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +51 -17
- package/dist/builtin/workflows/src/tui/stage-chat-view-status.ts +36 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view-types.ts +5 -1
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +3 -1
- package/dist/builtin/workflows/src/tui/status-list.ts +14 -2
- package/dist/builtin/workflows/src/tui/widget.ts +23 -8
- package/dist/builtin/workflows/src/tui/workflow-attach-pane-types.ts +5 -4
- package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +8 -8
- package/dist/builtin/workflows/src/tui/workflow-resume-selector.ts +151 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +9 -9
- package/dist/cli/args.js.map +1 -1
- package/dist/config-self-update.d.ts.map +1 -1
- package/dist/config-self-update.js +3 -4
- package/dist/config-self-update.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +4 -5
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-bash.d.ts +1 -0
- package/dist/core/agent-session-bash.d.ts.map +1 -1
- package/dist/core/agent-session-bash.js +1 -0
- package/dist/core/agent-session-bash.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +23 -0
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/bash-executor.d.ts +2 -0
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +1 -0
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +29 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +36 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/context-compaction-metrics.d.ts +14 -2
- package/dist/core/compaction/context-compaction-metrics.d.ts.map +1 -1
- package/dist/core/compaction/context-compaction-metrics.js +50 -1
- package/dist/core/compaction/context-compaction-metrics.js.map +1 -1
- package/dist/core/compaction/context-compaction-prompt.d.ts.map +1 -1
- package/dist/core/compaction/context-compaction-prompt.js +2 -0
- package/dist/core/compaction/context-compaction-prompt.js.map +1 -1
- package/dist/core/compaction/context-compaction-runner.d.ts.map +1 -1
- package/dist/core/compaction/context-compaction-runner.js +1 -1
- package/dist/core/compaction/context-compaction-runner.js.map +1 -1
- package/dist/core/compaction/context-deletion-application.d.ts.map +1 -1
- package/dist/core/compaction/context-deletion-application.js +5 -5
- package/dist/core/compaction/context-deletion-application.js.map +1 -1
- package/dist/core/compaction/context-deletion-targets.d.ts +2 -0
- package/dist/core/compaction/context-deletion-targets.d.ts.map +1 -1
- package/dist/core/compaction/context-deletion-targets.js +23 -3
- package/dist/core/compaction/context-deletion-targets.js.map +1 -1
- package/dist/core/compaction/context-deletion-tool-definitions.d.ts +6 -0
- package/dist/core/compaction/context-deletion-tool-definitions.d.ts.map +1 -1
- package/dist/core/compaction/context-deletion-tool-definitions.js.map +1 -1
- package/dist/core/compaction/context-deletion-tools.d.ts.map +1 -1
- package/dist/core/compaction/context-deletion-tools.js +18 -10
- package/dist/core/compaction/context-deletion-tools.js.map +1 -1
- package/dist/core/compaction/context-transcript-analysis.d.ts.map +1 -1
- package/dist/core/compaction/context-transcript-analysis.js +2 -4
- package/dist/core/compaction/context-transcript-analysis.js.map +1 -1
- package/dist/core/copilot-gemini-tool-arguments.d.ts.map +1 -1
- package/dist/core/copilot-gemini-tool-arguments.js +2 -60
- package/dist/core/copilot-gemini-tool-arguments.js.map +1 -1
- package/dist/core/extensions/context-types.d.ts +2 -0
- package/dist/core/extensions/context-types.d.ts.map +1 -1
- package/dist/core/extensions/context-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +2 -2
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.js +57 -32
- package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
- package/dist/core/extensions/runner-context.d.ts.map +1 -1
- package/dist/core/extensions/runner-context.js +11 -0
- package/dist/core/extensions/runner-context.js.map +1 -1
- package/dist/core/extensions/tool-events.d.ts +13 -13
- package/dist/core/extensions/tool-events.d.ts.map +1 -1
- package/dist/core/extensions/tool-events.js +3 -3
- package/dist/core/extensions/tool-events.js.map +1 -1
- package/dist/core/extensions/types.d.ts +1 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/flattened-tool-arguments.d.ts +18 -0
- package/dist/core/flattened-tool-arguments.d.ts.map +1 -1
- package/dist/core/flattened-tool-arguments.js +104 -0
- package/dist/core/flattened-tool-arguments.js.map +1 -1
- package/dist/core/messages.d.ts +1 -0
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +46 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/sdk-exports.d.ts +1 -1
- package/dist/core/sdk-exports.d.ts.map +1 -1
- package/dist/core/sdk-exports.js +1 -1
- package/dist/core/sdk-exports.js.map +1 -1
- package/dist/core/sdk-types.d.ts +2 -2
- 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 +12 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +15 -7
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +20 -9
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-entries.d.ts +2 -2
- package/dist/core/session-manager-entries.d.ts.map +1 -1
- package/dist/core/session-manager-entries.js +9 -3
- package/dist/core/session-manager-entries.js.map +1 -1
- package/dist/core/session-manager-history.d.ts.map +1 -1
- package/dist/core/session-manager-history.js +2 -1
- package/dist/core/session-manager-history.js.map +1 -1
- package/dist/core/session-manager-list.d.ts +3 -3
- package/dist/core/session-manager-list.d.ts.map +1 -1
- package/dist/core/session-manager-list.js +27 -8
- package/dist/core/session-manager-list.js.map +1 -1
- package/dist/core/session-manager-storage.d.ts +3 -1
- package/dist/core/session-manager-storage.d.ts.map +1 -1
- package/dist/core/session-manager-storage.js +55 -12
- package/dist/core/session-manager-storage.js.map +1 -1
- package/dist/core/session-manager-tool-dependencies.d.ts +10 -0
- package/dist/core/session-manager-tool-dependencies.d.ts.map +1 -0
- package/dist/core/session-manager-tool-dependencies.js +133 -0
- package/dist/core/session-manager-tool-dependencies.js.map +1 -0
- package/dist/core/session-manager-types.d.ts +22 -0
- package/dist/core/session-manager-types.d.ts.map +1 -1
- package/dist/core/session-manager-types.js.map +1 -1
- package/dist/core/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-manager-basic-accessors.d.ts +4 -0
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js +18 -0
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/settings-manager-resource-accessors.d.ts +4 -0
- package/dist/core/settings-manager-resource-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-resource-accessors.js +15 -0
- package/dist/core/settings-manager-resource-accessors.js.map +1 -1
- package/dist/core/settings-types.d.ts +11 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/system-prompt.d.ts +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +3 -2
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/artifact-protocol.d.ts +11 -0
- package/dist/core/tools/artifact-protocol.d.ts.map +1 -0
- package/dist/core/tools/artifact-protocol.js +76 -0
- package/dist/core/tools/artifact-protocol.js.map +1 -0
- package/dist/core/tools/artifacts.d.ts +18 -0
- package/dist/core/tools/artifacts.d.ts.map +1 -0
- package/dist/core/tools/artifacts.js +90 -0
- package/dist/core/tools/artifacts.js.map +1 -0
- package/dist/core/tools/bash-async-jobs.d.ts +20 -0
- package/dist/core/tools/bash-async-jobs.d.ts.map +1 -0
- package/dist/core/tools/bash-async-jobs.js +59 -0
- package/dist/core/tools/bash-async-jobs.js.map +1 -0
- package/dist/core/tools/bash-async-output.d.ts +10 -0
- package/dist/core/tools/bash-async-output.d.ts.map +1 -0
- package/dist/core/tools/bash-async-output.js +80 -0
- package/dist/core/tools/bash-async-output.js.map +1 -0
- package/dist/core/tools/bash-interceptor.d.ts +10 -0
- package/dist/core/tools/bash-interceptor.d.ts.map +1 -0
- package/dist/core/tools/bash-interceptor.js +39 -0
- package/dist/core/tools/bash-interceptor.js.map +1 -0
- package/dist/core/tools/bash-leading-cd.d.ts +7 -0
- package/dist/core/tools/bash-leading-cd.d.ts.map +1 -0
- package/dist/core/tools/bash-leading-cd.js +59 -0
- package/dist/core/tools/bash-leading-cd.js.map +1 -0
- package/dist/core/tools/bash-pty-native.d.ts +14 -0
- package/dist/core/tools/bash-pty-native.d.ts.map +1 -0
- package/dist/core/tools/bash-pty-native.js +71 -0
- package/dist/core/tools/bash-pty-native.js.map +1 -0
- package/dist/core/tools/bash.d.ts +28 -17
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +152 -35
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/block-resolver.d.ts +16 -0
- package/dist/core/tools/block-resolver.d.ts.map +1 -0
- package/dist/core/tools/block-resolver.js +74 -0
- package/dist/core/tools/block-resolver.js.map +1 -0
- package/dist/core/tools/conflict-registry.d.ts +16 -0
- package/dist/core/tools/conflict-registry.d.ts.map +1 -0
- package/dist/core/tools/conflict-registry.js +44 -0
- package/dist/core/tools/conflict-registry.js.map +1 -0
- package/dist/core/tools/directory-tree.d.ts +13 -0
- package/dist/core/tools/directory-tree.d.ts.map +1 -0
- package/dist/core/tools/directory-tree.js +81 -0
- package/dist/core/tools/directory-tree.js.map +1 -0
- package/dist/core/tools/edit.d.ts +4 -29
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +136 -228
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/fetch-url.d.ts +74 -0
- package/dist/core/tools/fetch-url.d.ts.map +1 -0
- package/dist/core/tools/fetch-url.js +518 -0
- package/dist/core/tools/fetch-url.js.map +1 -0
- package/dist/core/tools/find.d.ts +27 -9
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +400 -176
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/glob-path-utils.d.ts +8 -0
- package/dist/core/tools/glob-path-utils.d.ts.map +1 -0
- package/dist/core/tools/glob-path-utils.js +26 -0
- package/dist/core/tools/glob-path-utils.js.map +1 -0
- package/dist/core/tools/grep.d.ts +12 -0
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +141 -17
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/hashline-engine/apply.d.ts +11 -0
- package/dist/core/tools/hashline-engine/apply.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/apply.js +752 -0
- package/dist/core/tools/hashline-engine/apply.js.map +1 -0
- package/dist/core/tools/hashline-engine/block.d.ts +40 -0
- package/dist/core/tools/hashline-engine/block.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/block.js +117 -0
- package/dist/core/tools/hashline-engine/block.js.map +1 -0
- package/dist/core/tools/hashline-engine/diff-preview.d.ts +15 -0
- package/dist/core/tools/hashline-engine/diff-preview.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/diff-preview.js +98 -0
- package/dist/core/tools/hashline-engine/diff-preview.js.map +1 -0
- package/dist/core/tools/hashline-engine/format.d.ts +71 -0
- package/dist/core/tools/hashline-engine/format.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/format.js +178 -0
- package/dist/core/tools/hashline-engine/format.js.map +1 -0
- package/dist/core/tools/hashline-engine/fs.d.ts +81 -0
- package/dist/core/tools/hashline-engine/fs.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/fs.js +143 -0
- package/dist/core/tools/hashline-engine/fs.js.map +1 -0
- package/dist/core/tools/hashline-engine/index.d.ts +18 -0
- package/dist/core/tools/hashline-engine/index.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/index.js +20 -0
- package/dist/core/tools/hashline-engine/index.js.map +1 -0
- package/dist/core/tools/hashline-engine/input.d.ts +101 -0
- package/dist/core/tools/hashline-engine/input.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/input.js +398 -0
- package/dist/core/tools/hashline-engine/input.js.map +1 -0
- package/dist/core/tools/hashline-engine/messages.d.ts +99 -0
- package/dist/core/tools/hashline-engine/messages.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/messages.js +144 -0
- package/dist/core/tools/hashline-engine/messages.js.map +1 -0
- package/dist/core/tools/hashline-engine/mismatch.d.ts +45 -0
- package/dist/core/tools/hashline-engine/mismatch.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/mismatch.js +90 -0
- package/dist/core/tools/hashline-engine/mismatch.js.map +1 -0
- package/dist/core/tools/hashline-engine/normalize.d.ts +21 -0
- package/dist/core/tools/hashline-engine/normalize.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/normalize.js +33 -0
- package/dist/core/tools/hashline-engine/normalize.js.map +1 -0
- package/dist/core/tools/hashline-engine/parser.d.ts +24 -0
- package/dist/core/tools/hashline-engine/parser.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/parser.js +381 -0
- package/dist/core/tools/hashline-engine/parser.js.map +1 -0
- package/dist/core/tools/hashline-engine/patcher.d.ts +118 -0
- package/dist/core/tools/hashline-engine/patcher.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/patcher.js +341 -0
- package/dist/core/tools/hashline-engine/patcher.js.map +1 -0
- package/dist/core/tools/hashline-engine/prefixes.d.ts +43 -0
- package/dist/core/tools/hashline-engine/prefixes.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/prefixes.js +135 -0
- package/dist/core/tools/hashline-engine/prefixes.js.map +1 -0
- package/dist/core/tools/hashline-engine/recovery.d.ts +41 -0
- package/dist/core/tools/hashline-engine/recovery.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/recovery.js +168 -0
- package/dist/core/tools/hashline-engine/recovery.js.map +1 -0
- package/dist/core/tools/hashline-engine/snapshots.d.ts +65 -0
- package/dist/core/tools/hashline-engine/snapshots.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/snapshots.js +108 -0
- package/dist/core/tools/hashline-engine/snapshots.js.map +1 -0
- package/dist/core/tools/hashline-engine/stream.d.ts +3 -0
- package/dist/core/tools/hashline-engine/stream.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/stream.js +111 -0
- package/dist/core/tools/hashline-engine/stream.js.map +1 -0
- package/dist/core/tools/hashline-engine/tokenizer.d.ts +69 -0
- package/dist/core/tools/hashline-engine/tokenizer.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/tokenizer.js +430 -0
- package/dist/core/tools/hashline-engine/tokenizer.js.map +1 -0
- package/dist/core/tools/hashline-engine/types.d.ts +166 -0
- package/dist/core/tools/hashline-engine/types.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/types.js +9 -0
- package/dist/core/tools/hashline-engine/types.js.map +1 -0
- package/dist/core/tools/hashline.d.ts +29 -0
- package/dist/core/tools/hashline.d.ts.map +1 -0
- package/dist/core/tools/hashline.js +110 -0
- package/dist/core/tools/hashline.js.map +1 -0
- package/dist/core/tools/index.d.ts +6 -4
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +52 -35
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/notebook.d.ts +38 -0
- package/dist/core/tools/notebook.d.ts.map +1 -0
- package/dist/core/tools/notebook.js +125 -0
- package/dist/core/tools/notebook.js.map +1 -0
- package/dist/core/tools/read-document-extract.d.ts +9 -0
- package/dist/core/tools/read-document-extract.d.ts.map +1 -0
- package/dist/core/tools/read-document-extract.js +212 -0
- package/dist/core/tools/read-document-extract.js.map +1 -0
- package/dist/core/tools/read-selectors.d.ts +24 -0
- package/dist/core/tools/read-selectors.d.ts.map +1 -0
- package/dist/core/tools/read-selectors.js +277 -0
- package/dist/core/tools/read-selectors.js.map +1 -0
- package/dist/core/tools/read-url.d.ts +37 -0
- package/dist/core/tools/read-url.d.ts.map +1 -0
- package/dist/core/tools/read-url.js +39 -0
- package/dist/core/tools/read-url.js.map +1 -0
- package/dist/core/tools/read.d.ts +11 -11
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +224 -94
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/resource-selectors.d.ts +44 -0
- package/dist/core/tools/resource-selectors.d.ts.map +1 -0
- package/dist/core/tools/resource-selectors.js +808 -0
- package/dist/core/tools/resource-selectors.js.map +1 -0
- package/dist/core/tools/search-details.d.ts +26 -0
- package/dist/core/tools/search-details.d.ts.map +1 -0
- package/dist/core/tools/search-details.js +24 -0
- package/dist/core/tools/search-details.js.map +1 -0
- package/dist/core/tools/search-line-ranges.d.ts +11 -0
- package/dist/core/tools/search-line-ranges.d.ts.map +1 -0
- package/dist/core/tools/search-line-ranges.js +65 -0
- package/dist/core/tools/search-line-ranges.js.map +1 -0
- package/dist/core/tools/search-native.d.ts +97 -0
- package/dist/core/tools/search-native.d.ts.map +1 -0
- package/dist/core/tools/search-native.js +27 -0
- package/dist/core/tools/search-native.js.map +1 -0
- package/dist/core/tools/search.d.ts +24 -0
- package/dist/core/tools/search.d.ts.map +1 -0
- package/dist/core/tools/search.js +573 -0
- package/dist/core/tools/search.js.map +1 -0
- package/dist/core/tools/truncate.d.ts +4 -4
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +3 -3
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/url-ip-guards.d.ts +4 -0
- package/dist/core/tools/url-ip-guards.d.ts.map +1 -0
- package/dist/core/tools/url-ip-guards.js +126 -0
- package/dist/core/tools/url-ip-guards.js.map +1 -0
- package/dist/core/tools/write.d.ts +12 -2
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +166 -14
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +2 -3
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/index-extensions.d.ts +2 -2
- package/dist/index-extensions.d.ts.map +1 -1
- package/dist/index-extensions.js +1 -1
- package/dist/index-extensions.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-runtime.d.ts +1 -0
- package/dist/modes/interactive/components/chat-session-host-runtime.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-runtime.js +12 -0
- package/dist/modes/interactive/components/chat-session-host-runtime.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-terminal-cleanup.d.ts +4 -0
- package/dist/modes/interactive/components/chat-session-host-terminal-cleanup.d.ts.map +1 -0
- package/dist/modes/interactive/components/chat-session-host-terminal-cleanup.js +131 -0
- package/dist/modes/interactive/components/chat-session-host-terminal-cleanup.js.map +1 -0
- package/dist/modes/interactive/components/chat-session-host.d.ts +2 -0
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +7 -1
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/chat-transcript.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-transcript.js +15 -4
- package/dist/modes/interactive/components/chat-transcript.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +1 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +9 -2
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.js +3 -0
- package/dist/modes/interactive/components/settings-selector-handlers.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.js +7 -0
- package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts +2 -0
- package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +3 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +26 -0
- package/dist/modes/interactive/components/tool-execution.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 +0 -5
- package/dist/modes/interactive/components/tree-selector-content.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.js +1 -0
- package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
- package/dist/modes/interactive/interactive-autocomplete.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-autocomplete.js +80 -2
- package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
- package/dist/modes/interactive/interactive-hotkeys-debug.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-hotkeys-debug.js +3 -0
- package/dist/modes/interactive/interactive-hotkeys-debug.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +51 -0
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +5 -0
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +5 -0
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +12 -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-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.js +4 -1
- package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-onboarding.d.ts +11 -0
- package/dist/modes/interactive/interactive-onboarding.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-onboarding.js +220 -0
- package/dist/modes/interactive/interactive-onboarding.js.map +1 -0
- package/dist/modes/interactive/interactive-selectors.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +4 -0
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.js +6 -0
- package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +9 -4
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +28 -0
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +21 -1
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/markit.d.ts +8 -0
- package/dist/utils/markit.d.ts.map +1 -0
- package/dist/utils/markit.js +53 -0
- package/dist/utils/markit.js.map +1 -0
- package/dist/utils/paths.d.ts +2 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +14 -1
- package/dist/utils/paths.js.map +1 -1
- package/docs/compaction.md +18 -1
- package/docs/containerization.md +1 -1
- package/docs/docs.json +1 -0
- package/docs/extensions.md +25 -36
- package/docs/models.md +1 -1
- package/docs/providers.md +2 -1
- package/docs/quickstart.md +11 -6
- package/docs/sdk.md +5 -5
- package/docs/session-format.md +6 -0
- package/docs/sessions.md +6 -0
- package/docs/settings.md +7 -0
- package/docs/subagents.md +3 -2
- package/docs/tools.md +49 -0
- package/docs/usage.md +3 -3
- package/docs/workflows.md +112 -8
- package/examples/extensions/subagent/README.md +5 -5
- package/examples/extensions/subagent/agents/planner.md +1 -1
- package/examples/extensions/subagent/agents/reviewer.md +1 -1
- package/examples/extensions/subagent/agents/scout.md +2 -2
- package/examples/extensions/subagent/display.ts +3 -3
- package/examples/sdk/05-tools.ts +3 -3
- package/examples/sdk/README.md +1 -1
- package/package.json +5 -3
|
@@ -5,10 +5,10 @@ import type { AgentProgress, AsyncJobStep, Details } from "../shared/types.ts";
|
|
|
5
5
|
import { formatDuration, formatTokens, formatUsage, shortenPath } from "../shared/formatters.ts";
|
|
6
6
|
import { getSingleResultOutput } from "../shared/utils.ts";
|
|
7
7
|
import { getTermWidth, truncLine, type Theme } from "./render-layout.ts";
|
|
8
|
-
import {
|
|
8
|
+
import { advanceResultPulseFrame, clearResultAnimationTimer, type ResultAnimationContext } from "./render-result-animation.ts";
|
|
9
9
|
import { renderMultiCompact, renderSingleCompact } from "./render-result-compact.ts";
|
|
10
10
|
import { buildChainRenderEntries, buildMultiProgressLabel, resultRowLabel, workflowGraphHasStatus, type ChainRenderEntry } from "./render-chain-graph.ts";
|
|
11
|
-
import {
|
|
11
|
+
import { subagentResultRenderKey } from "./render-stable-output.ts";
|
|
12
12
|
import { modelThinkingBadge, widgetStepStatus } from "./render-event-formatting.ts";
|
|
13
13
|
import {
|
|
14
14
|
buildLiveStatusLine,
|
|
@@ -28,26 +28,27 @@ export function renderLiveSubagentResult(
|
|
|
28
28
|
): Component {
|
|
29
29
|
const nextKey = subagentResultRenderKey(result, options);
|
|
30
30
|
if (context.state.subagentResultSnapshotKey !== nextKey) {
|
|
31
|
-
const frameNow = Date.now();
|
|
32
31
|
context.state.subagentResultSnapshotKey = nextKey;
|
|
33
|
-
context.state.subagentResultSnapshotNow =
|
|
34
|
-
|
|
32
|
+
context.state.subagentResultSnapshotNow = Date.now();
|
|
33
|
+
// Advance the activity pulse exactly once per real progress update.
|
|
34
|
+
// Foreground subagent results render into chat scrollback, which can sit
|
|
35
|
+
// above the viewport fold. Animating on a timer there forces pi-tui into a
|
|
36
|
+
// destructive full-screen/scrollback clear on every tick (the flicker that
|
|
37
|
+
// scaled with widget height). Driving the pulse off genuine updates keeps
|
|
38
|
+
// the only line diffs tied to content that actually changed, so the
|
|
39
|
+
// differential renderer repaints exactly as it would for any progress
|
|
40
|
+
// update — no extra above-fold churn between updates.
|
|
41
|
+
context.state.subagentResultPulseFrame = advanceResultPulseFrame(context.state.subagentResultPulseFrame);
|
|
35
42
|
}
|
|
36
43
|
context.state.subagentResultSnapshotNow ??= Date.now();
|
|
37
|
-
context.state.
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
// of updating elapsed/tool/activity text and causing broad chatbox churn.
|
|
42
|
-
if (options.isPartial && isRunningSubagentResult(result)) {
|
|
43
|
-
ensureResultAnimation(context);
|
|
44
|
-
} else {
|
|
45
|
-
clearResultAnimationTimer(context);
|
|
46
|
-
}
|
|
44
|
+
context.state.subagentResultPulseFrame ??= 0;
|
|
45
|
+
// Never schedule timer-driven re-renders for scrollback content; clear any
|
|
46
|
+
// stale timer a previous version may have installed for this render slot.
|
|
47
|
+
clearResultAnimationTimer(context);
|
|
47
48
|
return renderSubagentResult(result, {
|
|
48
49
|
...options,
|
|
49
50
|
now: context.state.subagentResultSnapshotNow,
|
|
50
|
-
|
|
51
|
+
pulseFrame: context.state.subagentResultPulseFrame,
|
|
51
52
|
}, theme);
|
|
52
53
|
}
|
|
53
54
|
|
|
@@ -56,7 +57,7 @@ export function renderLiveSubagentResult(
|
|
|
56
57
|
*/
|
|
57
58
|
export function renderSubagentResult(
|
|
58
59
|
result: AgentToolResult<Details>,
|
|
59
|
-
options: { expanded: boolean; now?: number;
|
|
60
|
+
options: { expanded: boolean; now?: number; pulseFrame?: number },
|
|
60
61
|
theme: Theme,
|
|
61
62
|
): Component {
|
|
62
63
|
const d = result.details;
|
|
@@ -72,7 +73,7 @@ export function renderSubagentResult(
|
|
|
72
73
|
|
|
73
74
|
if (d.mode === "single" && d.results.length === 1) {
|
|
74
75
|
const r = d.results[0];
|
|
75
|
-
if (!expanded) return renderSingleCompact(d, r, theme, options.now, options.
|
|
76
|
+
if (!expanded) return renderSingleCompact(d, r, theme, options.now, options.pulseFrame);
|
|
76
77
|
const isRunning = r.progress?.status === "running";
|
|
77
78
|
const icon = isRunning
|
|
78
79
|
? theme.fg("warning", "running")
|
|
@@ -166,7 +167,7 @@ export function renderSubagentResult(
|
|
|
166
167
|
return c;
|
|
167
168
|
}
|
|
168
169
|
|
|
169
|
-
if (!expanded) return renderMultiCompact(d, theme, options.now, options.
|
|
170
|
+
if (!expanded) return renderMultiCompact(d, theme, options.now, options.pulseFrame);
|
|
170
171
|
|
|
171
172
|
const hasRunning = d.progress?.some((p) => p.status === "running")
|
|
172
173
|
|| d.results.some((r) => r.progress?.status === "running")
|
|
@@ -2,7 +2,7 @@ import type { AgentProgress, Details } from "../shared/types.ts";
|
|
|
2
2
|
import { formatDuration, formatTokens, formatToolCall } from "../shared/formatters.ts";
|
|
3
3
|
import { getDisplayItems } from "../shared/utils.ts";
|
|
4
4
|
import { formatActivityLabel } from "../shared/status-format.ts";
|
|
5
|
-
import { getTermWidth,
|
|
5
|
+
import { getTermWidth, pulseGlyph, type Theme } from "./render-layout.ts";
|
|
6
6
|
|
|
7
7
|
export function extractOutputTarget(task: string): string | undefined {
|
|
8
8
|
const writeToMatch = task.match(/\[Write to:\s*([^\]\n]+)\]/i);
|
|
@@ -118,8 +118,8 @@ export function resultStatusLine(result: Details["results"][number], output: str
|
|
|
118
118
|
return "Done";
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
export function resultGlyph(result: Details["results"][number], output: string, theme: Theme, running = result.progress?.status === "running",
|
|
122
|
-
if (running) return theme.fg("accent",
|
|
121
|
+
export function resultGlyph(result: Details["results"][number], output: string, theme: Theme, running = result.progress?.status === "running", pulseFrame?: number): string {
|
|
122
|
+
if (running) return theme.fg("accent", pulseGlyph(pulseFrame));
|
|
123
123
|
if (result.detached) return theme.fg("warning", "■");
|
|
124
124
|
if (result.interrupted) return theme.fg("warning", "■");
|
|
125
125
|
if (result.exitCode !== 0) return theme.fg("error", "✗");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ExtensionContext } from "@bastani/atomic";
|
|
2
2
|
import { Container, Text, type Component } from "@earendil-works/pi-tui";
|
|
3
|
+
import * as path from "node:path";
|
|
3
4
|
import { MAX_WIDGET_JOBS, WIDGET_KEY, type AsyncJobState } from "../shared/types.ts";
|
|
4
5
|
import { getTermWidth, RUNNING_ANIMATION_MS, runningGlyph, truncLine, type Theme } from "./render-layout.ts";
|
|
5
6
|
import { themeBold } from "./render-status-progress.ts";
|
|
@@ -64,6 +65,7 @@ let latestWidgetJobs: AsyncJobState[] = [];
|
|
|
64
65
|
let latestWidgetFrameNow = 0;
|
|
65
66
|
let widgetTimer: ReturnType<typeof setInterval> | undefined;
|
|
66
67
|
let mountedWidgetCtx: ExtensionContext | undefined;
|
|
68
|
+
let mountedWidgetOwnerKey: string | undefined;
|
|
67
69
|
let widgetMounted = false;
|
|
68
70
|
|
|
69
71
|
function getLatestWidgetJobs(): AsyncJobState[] {
|
|
@@ -87,9 +89,38 @@ function clearLatestWidgetState(): void {
|
|
|
87
89
|
latestWidgetJobs = [];
|
|
88
90
|
latestWidgetFrameNow = 0;
|
|
89
91
|
mountedWidgetCtx = undefined;
|
|
92
|
+
mountedWidgetOwnerKey = undefined;
|
|
90
93
|
widgetMounted = false;
|
|
91
94
|
}
|
|
92
95
|
|
|
96
|
+
function getWidgetOwnerKey(ctx: ExtensionContext): string {
|
|
97
|
+
const resolvedCwd = ctx.cwd ? path.resolve(ctx.cwd) : undefined;
|
|
98
|
+
const cwdOwner = resolvedCwd ?? "cwd:unknown";
|
|
99
|
+
let sessionOwner = "session:unknown";
|
|
100
|
+
try {
|
|
101
|
+
const sessionFile = ctx.sessionManager.getSessionFile?.();
|
|
102
|
+
if (sessionFile) {
|
|
103
|
+
const resolvedSessionFile = resolvedCwd
|
|
104
|
+
? path.resolve(resolvedCwd, sessionFile)
|
|
105
|
+
: path.resolve(sessionFile);
|
|
106
|
+
sessionOwner = `sessionFile:${resolvedSessionFile}`;
|
|
107
|
+
}
|
|
108
|
+
} catch {
|
|
109
|
+
// Fall through to the session id fallback below.
|
|
110
|
+
}
|
|
111
|
+
if (sessionOwner === "session:unknown") {
|
|
112
|
+
try {
|
|
113
|
+
const sessionId = ctx.sessionManager.getSessionId?.();
|
|
114
|
+
if (sessionId) sessionOwner = `sessionId:${sessionId}`;
|
|
115
|
+
} catch {
|
|
116
|
+
// Keep the unknown marker; cwd still scopes ownership.
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// If no session identifier is available, cwd is the best available owner
|
|
120
|
+
// boundary and may intentionally coalesce concurrent sessions in one folder.
|
|
121
|
+
return `${sessionOwner}|cwd:${cwdOwner}`;
|
|
122
|
+
}
|
|
123
|
+
|
|
93
124
|
function requestWidgetRender(ctx: ExtensionContext): void {
|
|
94
125
|
(ctx as RenderRequestingContext).ui.requestRender?.();
|
|
95
126
|
}
|
|
@@ -226,10 +257,12 @@ export function buildWidgetLines(jobs: AsyncJobState[], theme: Theme, width = ge
|
|
|
226
257
|
* Render the async jobs widget
|
|
227
258
|
*/
|
|
228
259
|
export function renderWidget(ctx: ExtensionContext, jobs: AsyncJobState[]): void {
|
|
260
|
+
const ownerKey = getWidgetOwnerKey(ctx);
|
|
229
261
|
if (jobs.length === 0) {
|
|
230
|
-
if (widgetMounted &&
|
|
231
|
-
//
|
|
232
|
-
//
|
|
262
|
+
if (widgetMounted && mountedWidgetOwnerKey !== ownerKey) {
|
|
263
|
+
// With no visible job frame, stale-owner empty updates and newly-active
|
|
264
|
+
// empty owners are indistinguishable here. Preserve active-widget safety;
|
|
265
|
+
// host session disposal owns cross-owner empty-session teardown.
|
|
233
266
|
return;
|
|
234
267
|
}
|
|
235
268
|
stopWidgetAnimation();
|
|
@@ -242,11 +275,12 @@ export function renderWidget(ctx: ExtensionContext, jobs: AsyncJobState[]): void
|
|
|
242
275
|
latestWidgetCtx = ctx;
|
|
243
276
|
latestWidgetJobs = [...jobs];
|
|
244
277
|
latestWidgetFrameNow = Date.now();
|
|
245
|
-
if (widgetMounted &&
|
|
246
|
-
//
|
|
247
|
-
// old mount before installing the singleton widget on the new context.
|
|
278
|
+
if (widgetMounted && mountedWidgetOwnerKey !== ownerKey) {
|
|
279
|
+
// Session rebinding can leave the previous host UI alive briefly; clear the
|
|
280
|
+
// old mount before installing the singleton widget on the new owner/context.
|
|
248
281
|
unmountWidgetBestEffort(mountedWidgetCtx);
|
|
249
282
|
mountedWidgetCtx = undefined;
|
|
283
|
+
mountedWidgetOwnerKey = undefined;
|
|
250
284
|
widgetMounted = false;
|
|
251
285
|
}
|
|
252
286
|
if (!widgetMounted) {
|
|
@@ -260,10 +294,15 @@ export function renderWidget(ctx: ExtensionContext, jobs: AsyncJobState[]): void
|
|
|
260
294
|
placement: "belowEditor",
|
|
261
295
|
});
|
|
262
296
|
mountedWidgetCtx = ctx;
|
|
297
|
+
mountedWidgetOwnerKey = ownerKey;
|
|
263
298
|
widgetMounted = true;
|
|
264
299
|
} else {
|
|
265
300
|
// The mounted widget reads latestWidgetJobs via getLatestWidgetJobs(), so a
|
|
266
|
-
// visible->visible update only needs to ask the host to render in place.
|
|
301
|
+
// visible->visible update only needs to ask the host to render in place. Keep
|
|
302
|
+
// teardown pointed at the freshest same-owner wrapper because older wrappers
|
|
303
|
+
// can go stale after host session/context rebinding.
|
|
304
|
+
mountedWidgetCtx = ctx;
|
|
305
|
+
mountedWidgetOwnerKey = ownerKey;
|
|
267
306
|
requestWidgetRender(ctx);
|
|
268
307
|
}
|
|
269
308
|
// Keep the just-rendered ctx/jobs as the last-rendered state; only the ticker
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* rendering responsibility across sibling modules.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
export { RUNNING_ANIMATION_MS, currentRunningFrame } from "./render-layout.ts";
|
|
8
|
+
export { PULSE_FRAMES, RUNNING_ANIMATION_MS, RUNNING_FRAMES, currentRunningFrame, pulseGlyph } from "./render-layout.ts";
|
|
9
9
|
export {
|
|
10
|
+
advanceResultPulseFrame,
|
|
10
11
|
clearLegacyResultAnimationTimer,
|
|
11
12
|
clearResultAnimationTimer,
|
|
12
|
-
ensureResultAnimation,
|
|
13
13
|
stopResultAnimations,
|
|
14
14
|
} from "./render-result-animation.ts";
|
|
15
15
|
export type { SubagentResultRenderState } from "./render-result-animation.ts";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/web-access",
|
|
3
|
-
"version": "0.9.2",
|
|
3
|
+
"version": "0.9.3-alpha.2",
|
|
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,62 @@ 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.3-alpha.2] - 2026-06-27
|
|
10
|
+
|
|
11
|
+
### Breaking Changes
|
|
12
|
+
|
|
13
|
+
- Workflow durability is now enabled by default with the zero-infrastructure per-workflow file backend rooted under `~/.atomic/workflow-durable`; the previous process-local in-memory default and `ATOMIC_WORKFLOW_DURABLE_DIR` opt-in path were removed. In-memory durability remains available for explicit test/custom backend overrides and for the privacy opt-out `ATOMIC_WORKFLOW_DURABLE=0`/`false`/`off`/`memory`. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Added `StageContext.sendUserMessage(content, { deliverAs? })` so workflow authors can inject a normal follow-on user turn into a stage session after `prompt()` resolves. Idle sessions start immediately, streaming sessions queue as follow-up by default (or steering with `deliverAs: "steer"`), schema-backed stages can continue after their one allowed structured `prompt()` without tripping the one-shot prompt guard, follow-on turns preserve the stage MCP allow/deny scope, and native stage sessions accept the same string or text/image block content as `AgentSession.sendUserMessage()`. Durable replayed cached stages now reject this live-session operation instead of silently ignoring it. ([#1520](https://github.com/bastani-inc/atomic/issues/1520))
|
|
18
|
+
- Added cross-session workflow resumability via a durable workflow backend seam (`packages/workflows/src/durable/`). Workflows now persist `ctx.*` operation checkpoints (tool, ui, stage) to a durable backend so a new Atomic session can resume a workflow started in a prior session from the last completed checkpoint, without re-running completed work. Cross-session persistence is enabled by default through a lock-protected per-workflow file backend at `~/.atomic/workflow-durable`; no environment variable is required. When `DBOS_SYSTEM_DATABASE_URL` is set, Atomic lazily initializes DBOS with Postgres-backed workflow/control records and falls back to the file backend if DBOS is unavailable. Top-level workflow metadata is mirrored as `workflow.durable.checkpoint` session entries for `/workflow resume` discovery. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
19
|
+
- Introduced `ctx.tool(name, args, fn, options?)` — a durable cached tool execution primitive that runs arbitrary TypeScript code and caches the result so completed side effects are not repeated on resume. Supports optional retry with exponential backoff via `retriesAllowed`, `maxAttempts`, `intervalMs`, and `backoffRate` options. Only `ctx.*` blocks produce durable checkpoints. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
20
|
+
- Added durable `ctx.ui` checkpointing: completed `ctx.ui.input` / `confirm` / `select` / `editor` / `custom` responses are cached by prompt identity that includes method, label/message, options, and call order, so repeated prompts do not collide and a resumed workflow does not re-ask already-answered prompts. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
21
|
+
- Added durable `ctx.stage` / `ctx.task` / `ctx.chain` / `ctx.parallel` / child `ctx.workflow` checkpointing: completed stage-like outputs are recorded with stable ordinal replay keys and replayed on resume, skipping re-execution while avoiding checkpoint id collisions after redispatch. Chain and parallel items reuse durable task checkpoints, and child workflow calls checkpoint the completed child result at the parent boundary. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
22
|
+
- Wired `/workflow resume` into the TUI command surface to fall back to the cross-session durable resume catalog when a target id is not a live run, and to surface durable root workflow history in fresh sessions. It lists resumable workflows by top-level id and resumes via DBOS-style replay (re-dispatch with the original workflow id so completed checkpoints are skipped), mirroring `/resume` ergonomics. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
23
|
+
- Added `@dbos-inc/dbos-sdk` as an optional dependency of `@bastani/atomic` so DBOS-backed durable execution is available without a separate install when the SDK resolves. The workflows package remains dependency-free at runtime; the DBOS adapter is loaded lazily only when `DBOS_SYSTEM_DATABASE_URL` is set. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
24
|
+
- Added a cross-session resume catalog (`scanResumableWorkflows`) that scans session JSONL files for durable checkpoint entries to build the `/workflow resume` selector list, displaying root workflow name, status, completed checkpoint count, and pending prompts. The scanner understands Atomic's actual extension custom-entry JSONL shape (`type: "custom"`, `customType: "workflow.durable.checkpoint"`) as well as legacy direct checkpoint rows.
|
|
25
|
+
- Added cancellation, failure, and retry semantics for durable workflows: killed/cancelled workflows are marked `cancelled` and excluded from automatic resume; recoverable failures remain in the resumable list; non-recoverable failures are filtered out; `ctx.tool` retries with exponential backoff; pending `ctx.ui` prompts leave off on resume for the user to answer.
|
|
26
|
+
- Added DBOS read-side hydration: when `DBOS_SYSTEM_DATABASE_URL` is set, a fresh Atomic process now hydrates its in-memory checkpoint mirror from DBOS on `/workflow resume` so workflows persisted by a prior session can be discovered and replayed without prior in-process state. Checkpoint records are stored as structured envelopes (including kind, checkpoint id, args hash, prompt hash, and replay key) in DBOS so hydration fully reconstructs the original checkpoint metadata. Root workflow metadata is mirrored separately, so DBOS helper-workflow completion does not make Atomic roots appear completed; `ctx.tool`/`ctx.ui`/`ctx.task` await async DBOS checkpoint persistence before returning side-effect results. Legacy/simple DBOS step outputs without the envelope are handled gracefully as generic stage checkpoints. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- Added direct mouse-click activation for visible workflow graph nodes: clicking a node now focuses it and opens/attaches it through the same path as pressing Enter, with hit-testing based on the rendered node rectangles so overlay chrome/scroll geometry stays in sync while wheel scrolling and empty-space/chrome clicks remain safe no-ops. ([#1521](https://github.com/bastani-inc/atomic/issues/1521))
|
|
31
|
+
- Fixed attached workflow stage chats to capture mouse/trackpad wheel events by default and enable button-event SGR terminal reporting, keeping scroll gestures inside the active stage transcript or prompt instead of falling through to terminal/main-chat scrollback; `ctrl+t` now toggles true copy mode by disabling workflow-chat mouse reporting so terminal/tmux text selection works normally. ([#1519](https://github.com/bastani-inc/atomic/issues/1519))
|
|
32
|
+
- Routed idle `StageContext.sendUserMessage()` turns through the workflow stage guard so first-call injected turns record normal stage lifecycle and all idle injected turns observe abort/kill wiring, MCP scope, readiness handling, and the concurrency limiter. ([#1520](https://github.com/bastani-inc/atomic/issues/1520))
|
|
33
|
+
- Fixed attached workflow stage chats so stale terminal, paused, blocked, skipped, or otherwise no-longer-running live stage handles, terminal run/stage transitions before `agent_end`, reopened terminal chats, late post-terminal subagent tool updates, and partial subagent workflow-graph progress no longer keep the `Working...` spinner, animation tick, subagent renderer interval, renderer animation registry entry, or subagent progress spinner active, while genuine follow-up/prompt/resume `agent_start` work still shows progress on retained terminal stage chats. ([#1518](https://github.com/bastani-inc/atomic/issues/1518))
|
|
34
|
+
- Fixed `/workflow resume`'s interactive picker to reuse the same Atomic `/resume` session-selector tree chrome for live, paused, failed-resumable, and cross-session durable workflows, replacing the hand-rolled durable/combined picker so the selector is cosmetically consistent across resume flows. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
35
|
+
- Matched `/resume` empty-state behavior for interactive `/workflow resume` by opening the shared empty selector when no resumable workflow rows remain after filtering instead of printing an error. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
36
|
+
- Hid `/workflow resume` selector entries that only exist as stale session-cache metadata with no matching durable backend handle and hid durable `running`/`failed`/`blocked` rows whose workflow definition is no longer registered, filtering old pre-checkpoint-engine/test workflow runs instead of surfacing rows that can only fail as stale or missing-definition. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
37
|
+
- Persisted terminal non-resumable durable metadata during finalization so non-recoverable failed/blocked workflows do not remain visible in `/workflow resume` as resumable entries after they are completely finished. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
38
|
+
- Delayed durable `/workflow resume` discovery for `running`/`paused` workflows until the first durable checkpoint or pending checkpointable prompt exists, records resumable LM-stage session metadata as soon as a stage opens, and reopens that exact Atomic/Pi session file on durable resume so eligible stages continue mid-session while completed tool/UI/stage checkpoints still replay all-or-nothing. CLI/orchestrator quit now leaves durable-progress workflows resumable instead of treating panel close as an authoritative kill; `/workflow kill` remains the explicit non-resumable disposal path, and successful completion still marks the root workflow terminal and removes the row once the whole workflow terminates to the end. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
39
|
+
- Fixed repeated quit/resume durable LM-stage cycles by keeping in-progress stage-session metadata separate from completed stage-output checkpoints, persisting DBOS checkpoint records by checkpoint id rather than replay key, removing stale quit snapshots before reusing the original durable workflow id, and sending a single `Continue` continuation message to the recorded LM session instead of replaying the original workflow prompt. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
40
|
+
- Made `/workflow resume` list only inactive workflows: actively-running durable runs are hidden from the selector and refused on resume (in-session or cross-session) with an intuitive error pointing at `/workflow connect`/`/workflow kill`, while quitting the CLI/panel flips the durable handle from `running` to `paused` so it re-enters the resumable set. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
41
|
+
- Fixed DBOS durable metadata updates to use versioned metadata records with latest-timestamp hydration, removed invalid DBOS `duplicationPolicy` parameters, awaited completed stage checkpoint writes before returning to workflow code where practical, awaited DBOS initialization before first dispatch/list/resume in DBOS-configured runtimes, opened an interactive durable picker for no-arg `/workflow resume` when only durable entries exist (including sessions with only completed local runs), distinguished repeated same-name/same-args `ctx.tool` calls by stable ordinal identity, and made retry backoff observe cancellation before later attempts run. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
42
|
+
- Fixed durable stage lifecycle persistence so workflow completion waits for pending backend checkpoint writes (including DBOS async writes) and reports a failed run when those writes fail instead of acknowledging success before checkpoints are durable. Terminal durable status metadata is flushed before completed/failed/cancelled root runs return. Cached `ctx.task`, `ctx.chain`/`ctx.parallel` items, and child `ctx.workflow` replay now record completed replay nodes in the workflow graph/store, matching cached `ctx.stage` visibility. DBOS `recordCheckpointAsync()` updates the replay mirror only after DBOS accepts the checkpoint, so failed durable writes do not make the current process believe a side effect is safely replayable. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
43
|
+
- Fixed repeated `ctx.workflow(child)` calls to use a dedicated durable replay-key counter so cache-hit calls do not desync ordinal sequencing across resume; direct completed stages now checkpoint under the durable replay key used for lookup instead of the executor snapshot key; `ctx.exit` terminal states (`cancelled`, `blocked`, `skipped`) are now persisted to durable metadata and flushed; no-arg `/workflow resume` surfaces durable workflow history even when live local runs exist; and `durableBackend` is propagated into child workflow run options so custom backends are shared across parent and child instead of split-braining. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
44
|
+
- Fixed durable resume edge cases where workflows discovered only from session JSONL could be dropped before actual resume, schema-backed stage replay returned raw JSON text instead of structured values, parallel fail-fast skipped stages before async finalizers completed, retry backoff left abort listeners behind after normal sleeps, and durable stage checkpointing could ignore an explicit stage replay key. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
45
|
+
- Fixed durable replay robustness: child workflow internal `ctx.tool`/`ctx.ui`/`ctx.stage` side effects are now checkpointed under the parent/root durable workflow via a scoped backend keyed by the child boundary, so an interrupted child does not re-execute completed side effects on parent resume (previously child checkpoints were written under a fresh per-run UUID that was never recovered). `/workflow resume` now refuses cache-only entries as `stale` when a workflow has session-JSONL metadata but no durable checkpoint state in the backend, instead of silently re-running from scratch. Durable replay identities (`durableHash`) now use a SHA-256 digest instead of a 32-bit DJB2 hash that could collide across distinct tool/stage identities. `ctx.tool` re-checks cancellation after the tool function resolves and before recording/returning the side-effect result, so a side effect that completes concurrently with cancellation is not persisted as a replayable checkpoint. File-backed durability recovers from a stale lock directory left by a crashed process (backdated beyond a threshold) instead of wedging until the acquire timeout. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
46
|
+
- Fixed terminal durable cache suppression so stale session-JSONL entries cannot resurrect workflows the backend knows are completed/cancelled/non-resumable: the backend terminal state now takes precedence over older JSONL cache entries during listing and resume. Successful durable `/workflow resume <id>` now connects/opens the overlay to the resumed run, matching live resume ergonomics. No-arg `/workflow resume` now shows a combined selector (live runs + cross-session durable workflows) so durable workflows are directly selectable even when live runs exist, instead of only being printed as hints. Fixed `ScopedDurableBackend.listCheckpoints` to exclude sibling child scopes that shared a common id prefix (previously re-prefixing caused sibling checkpoints to leak into the wrong scope). Cleaned up a cosmetic merged import line in `run.ts`. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
47
|
+
- Fixed empty string stage outputs to be preserved durably as empty strings instead of being collapsed into status objects, so a stage completing with empty assistant text replays as empty rather than appearing to have no checkpoint. Schema-backed stage prompts with empty string results are now also checkpointed. Stage finalization failures (including durable checkpoint write errors) no longer leak the concurrency limiter/semaphore because each cleanup step is independently guarded. Mixed live+durable `/workflow resume` now uses async DBOS-hydrated durable listing (`prepareDurableResumable`) instead of a synchronous in-memory listing so cross-session entries discovered from Postgres are included in the combined selector. Replayed durable stages now register in the graph frontier tracker so parent/lineage topology is preserved for subsequent stages. Dismissing the combined resume picker returns to chat without opening a second live-only picker. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
48
|
+
- Fixed Ralph review regressions in durable resume: durable and combined pickers now settle selections before synchronous custom-UI disposal can dismiss them; headless no-arg durable resume prints the catalog instead of awaiting unavailable/no-op picker UI; failed live runs selected from the combined picker resume through the continuation path; durable resume dispatch forwards the interactive/non-interactive command policy; `ctx.ui.custom` replays cached void/`undefined` responses instead of treating them as cache misses; stage finalization errors are rethrown after releasing handles/limiters; and resume integration tests isolate the durable singleton so full integration runs remain deterministic. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
49
|
+
- Fixed default file-backed durability to write one JSON state file per root workflow instead of rewriting a shared `state.json` on every checkpoint, avoid all-files scans on point checkpoint lookups, prune completed/cancelled/non-resumable terminal workflow files while retaining running/paused/recoverable-failed files for crash recovery until resumed or killed, use restrictive `0700` durable directories and `0600` state/lock-owner files, fail closed to in-memory durability when no home directory is available, and reclaim stale locks only when their owner marker belongs to a dead process. Added `ATOMIC_WORKFLOW_DURABLE=0`/`false`/`off`/`memory` as a documented privacy opt-out for plaintext cross-session checkpoint persistence. ([#1498](https://github.com/bastani-inc/atomic/issues/1498))
|
|
50
|
+
|
|
51
|
+
## [0.9.3-alpha.1] - 2026-06-25
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- Workflow stage sessions are now marked as internal and excluded from the standard Atomic `/resume`, `atomic -r`, and `--continue` history, while remaining fully resumable/inspectable through `/workflow resume`, `/workflow attach`, and the `workflow` tool's `status`/`stages`/`stage`/`resume` actions via the run/stage store and its `sessionFile` links ([#1504](https://github.com/bastani-inc/atomic/issues/1504)).
|
|
56
|
+
- Revised the builtin `goal` worker/continuation prompts and the builtin `ralph` orchestrator prompts to emphasize implementing the requested task through full completion ("do not stop until the objective is complete") instead of preparing a partial implementation for incremental review.
|
|
57
|
+
- Removed model-visible current-iteration/turn/loop information from the builtin `goal`, `ralph`, and `open-claude-design` workflows so models are not biased by which iteration they are on. This drops the worker `Turn: N/M` banner, `Implement iteration N/M` / `Research iteration N/M` framing, "first iteration/worker turn" phrasing, and the live-preview `iteration N/M` label; switches model-relayed artifacts to stable non-ordinal names (`worker-receipt.md`, `review-<reviewer>.json`, `review-round-latest.json`, `orchestrator-report.md`); and strips turn fields from the model-facing goal ledger artifact. Internal UI stage names (e.g. `work-turn-2`, `orchestrator-2`) are unchanged, and the `max_turns`/`max_loops` inputs and `turns_completed`/`iterations_completed` outputs are retained.
|
|
58
|
+
- Raised workflow-stage subagent recursion to the shared five-level nesting budget so workflow stages match main-chat delegation depth.
|
|
59
|
+
|
|
60
|
+
### Fixed
|
|
61
|
+
|
|
62
|
+
- Fixed the builtin `open-claude-design` continuation loop so generator stages fork only from prior generator sessions and user-feedback stages fork only from prior feedback sessions; the first feedback stage now starts its own chain instead of inheriting generator context.
|
|
63
|
+
- Fixed workflow config loading and user-global discovery to honor `ATOMIC_CODING_AGENT_DIR` isolation instead of reading `~/.atomic/agent` when an isolated agent dir is configured.
|
|
64
|
+
|
|
9
65
|
## [0.9.2] - 2026-06-23
|
|
10
66
|
|
|
11
67
|
### Changed
|
|
@@ -320,7 +320,7 @@ const decision = await ctx.stage("review-gate", { schema: Decision }).prompt(
|
|
|
320
320
|
|
|
321
321
|
Atomic registers the canonical `structured_output` tool only for schema-enabled items and automatically adds it to explicit `tools` allowlists. The schema is used directly as the tool argument contract. A schema-backed `StageContext` supports one `prompt()` call because the final-answer tool is a single result contract; create another `ctx.stage(..., { schema })` for another structured prompt. If a turn completes without calling `structured_output`, or the tool call fails schema validation, Atomic sends up to three corrective follow-up prompts that include the exact contract/validation error before failing the item. `ctx.task`/`ctx.chain`/`ctx.parallel` results expose the captured value as `result.structured` and keep `result.text` as formatted JSON for handoffs.
|
|
322
322
|
|
|
323
|
-
`subagent` is available as a default workflow-stage tool with the same
|
|
323
|
+
`subagent` is available as a default workflow-stage tool with the same five-level nesting budget as main chat: a stage can launch recursively delegated subagents until the shared depth guard reaches five delegated levels, then deeper calls are blocked. `tools` allowlists apply to bundled extension tools as well as built-ins; if a stage sets `tools`, list every tool it should see. Workflow stages can explicitly list `subagent`, `web_search`, `fetch_content`, `intercom`, and other loaded extension tools, while `excludedTools` and `noTools: "all"` still win. Bundled `@bastani/subagents` agent definitions are available to the `subagent` tool in workflow stages, including workflows launched from a subagent child process.
|
|
324
324
|
|
|
325
325
|
### Model fallbacks
|
|
326
326
|
|
|
@@ -540,7 +540,7 @@ Tradeoff: `Type.Unsafe<T>()` does not deeply validate at runtime — it trusts t
|
|
|
540
540
|
|
|
541
541
|
Input overrides are bare `key=value` tokens (no leading `--`). Values are JSON-parsed when possible, so numbers, booleans, and quoted strings work as expected (e.g. `count=3`, `flag=true`, `prompt="multi word value"`). A whole-object override can be passed as a single JSON token (e.g. `{"prompt":"...","count":3}`). Runtime validation is strict: unknown input keys, missing required values, type mismatches, and invalid `select` choices fail before a named workflow run starts.
|
|
542
542
|
|
|
543
|
-
Workflows always run as **background tasks** in interactive sessions — the chat editor stays free while a run executes. Press **F2** (or `/workflow connect <run-id>`) to attach to the live graph viewer; HIL prompts (`ctx.ui.input/confirm/select/editor/custom`) appear as awaiting-input graph nodes. Press Enter on
|
|
543
|
+
Workflows always run as **background tasks** in interactive sessions — the chat editor stays free while a run executes. Press **F2** (or `/workflow connect <run-id>`) to attach to the live graph viewer; HIL prompts (`ctx.ui.input/confirm/select/editor/custom`) appear as awaiting-input graph nodes. Press Enter on a focused node, or click a visible graph node directly, to open that stage and answer locally, never as a modal dialog over the chat. Attached stage chats capture mouse/trackpad wheel events by default so scrolling stays inside the active stage transcript or prompt instead of falling through to terminal/main-chat scrollback. Press `ctrl+t` to toggle **copy mode**: copy mode disables workflow-chat mouse reporting so normal terminal/tmux text selection can work; press `ctrl+t` again to leave copy mode and restore workflow-chat scrolling. While copy mode is on, wheel/trackpad gestures are handled by the terminal/tmux and may scroll terminal scrollback, so leave copy mode before using the wheel again. Human input is detected when those runtime `ctx.ui.*` calls execute; workflows no longer have a declaration-time HIL flag.
|
|
544
544
|
|
|
545
545
|
Nested `ctx.workflow(...)` calls are displayed as an expanded graph within the top-level run. `/workflow status` and run pickers list only top-level user-launched workflows, not implementation-owned child runs. The `workflow` tool's `stages`, `stage`, `transcript`, `send`, `pause`, `interrupt`, and `resume` actions can still target visible child stage ids, prefixes, or names from the expanded graph; Atomic routes the control action to the owning nested run internally. (`stages`, `stage`, `transcript`, and `send` are `workflow` tool actions, not `/workflow` slash subcommands; the slash command exposes `connect`, `attach`, `pause`, `list`, `status`, `interrupt`, `kill`, `resume`, `reload`, and `inputs`.)
|
|
546
546
|
|
|
@@ -697,7 +697,7 @@ Child workflow outputs: `result`, `plan` (latest transformed research question),
|
|
|
697
697
|
|
|
698
698
|
### `open-claude-design`
|
|
699
699
|
|
|
700
|
-
Combined discovery/init → design-system/reference research → curated reference discovery with user preference check → forked generate
|
|
700
|
+
Combined discovery/init → design-system/reference research → curated reference discovery with user preference check → separate forked generate and user-feedback chains → export/handoff pipeline. The `discovery` stage asks for output type and references, then runs impeccable init in the same stage so PRODUCT.md/DESIGN.md are detected, created, or reconciled. `ds-*` stages handle user-provided URL/file reference extraction directly, then `reference-discovery` uses that context and asks which curated direction you prefer (or asks for a reference image/path/URL if none fit). Export is only `exporter` plus `final-display`.
|
|
701
701
|
|
|
702
702
|
```text
|
|
703
703
|
/workflow open-claude-design prompt="Design a kanban board component"
|
|
@@ -10,20 +10,25 @@ export function artifactSafeName(value: string): string {
|
|
|
10
10
|
return safe.length > 0 ? safe : "artifact";
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
function withoutTurn<T extends { readonly turn: number }>(value: T): Omit<T, "turn"> {
|
|
14
|
+
const copy = { ...value } as Omit<T, "turn"> & { turn?: number };
|
|
15
|
+
delete copy.turn;
|
|
16
|
+
return copy;
|
|
17
|
+
}
|
|
18
|
+
|
|
13
19
|
export async function writeReviewArtifact(
|
|
14
20
|
artifactDir: string,
|
|
15
|
-
turn: number,
|
|
16
21
|
reviewer: string,
|
|
17
22
|
decision: ReviewDecision,
|
|
18
23
|
rawText: string,
|
|
19
24
|
): Promise<string> {
|
|
20
25
|
const artifactPath = join(
|
|
21
26
|
artifactDir,
|
|
22
|
-
`review
|
|
27
|
+
`review-${artifactSafeName(reviewer)}.json`,
|
|
23
28
|
);
|
|
24
29
|
await writeFile(
|
|
25
30
|
artifactPath,
|
|
26
|
-
`${JSON.stringify({
|
|
31
|
+
`${JSON.stringify({ reviewer, decision, raw_text: rawText }, null, 2)}\n`,
|
|
27
32
|
{ encoding: "utf8" },
|
|
28
33
|
);
|
|
29
34
|
return artifactPath;
|
|
@@ -31,11 +36,11 @@ export async function writeReviewArtifact(
|
|
|
31
36
|
|
|
32
37
|
export async function writeReviewRoundArtifact(
|
|
33
38
|
artifactDir: string,
|
|
34
|
-
turn: number,
|
|
35
39
|
reviews: readonly ReviewRecord[],
|
|
36
40
|
): Promise<string> {
|
|
37
|
-
const artifactPath = join(artifactDir,
|
|
38
|
-
|
|
41
|
+
const artifactPath = join(artifactDir, "review-round-latest.json");
|
|
42
|
+
const visibleReviews = reviews.map(withoutTurn);
|
|
43
|
+
await writeFile(artifactPath, `${JSON.stringify({ reviews: visibleReviews }, null, 2)}\n`, {
|
|
39
44
|
encoding: "utf8",
|
|
40
45
|
});
|
|
41
46
|
return artifactPath;
|
|
@@ -4,6 +4,38 @@ import { tmpdir } from "node:os";
|
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { LEDGER_FILENAME, type GoalLedger, type GoalLifecycleEvent } from "./goal-types.js";
|
|
6
6
|
|
|
7
|
+
type ModelVisibleGoalLedger = Omit<
|
|
8
|
+
GoalLedger,
|
|
9
|
+
"turns" | "receipts" | "reviews" | "blockers" | "decisions" | "lifecycle"
|
|
10
|
+
> & {
|
|
11
|
+
readonly receipts: ReadonlyArray<Omit<GoalLedger["receipts"][number], "turn">>;
|
|
12
|
+
readonly reviews: ReadonlyArray<Omit<GoalLedger["reviews"][number], "turn">>;
|
|
13
|
+
readonly blockers: ReadonlyArray<Omit<GoalLedger["blockers"][number], "turn">>;
|
|
14
|
+
readonly decisions: ReadonlyArray<Omit<GoalLedger["decisions"][number], "turn">>;
|
|
15
|
+
readonly lifecycle: ReadonlyArray<Omit<GoalLedger["lifecycle"][number], "turn">>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
function withoutTurn<T extends { readonly turn: number }>(value: T): Omit<T, "turn"> {
|
|
19
|
+
const copy = { ...value } as Omit<T, "turn"> & { turn?: number };
|
|
20
|
+
delete copy.turn;
|
|
21
|
+
return copy;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function modelVisibleLedger(ledger: GoalLedger): ModelVisibleGoalLedger {
|
|
25
|
+
return {
|
|
26
|
+
goal_id: ledger.goal_id,
|
|
27
|
+
objective: ledger.objective,
|
|
28
|
+
status: ledger.status,
|
|
29
|
+
created_at: ledger.created_at,
|
|
30
|
+
updated_at: ledger.updated_at,
|
|
31
|
+
receipts: ledger.receipts.map(withoutTurn),
|
|
32
|
+
reviews: ledger.reviews.map(withoutTurn),
|
|
33
|
+
blockers: ledger.blockers.map(withoutTurn),
|
|
34
|
+
decisions: ledger.decisions.map(withoutTurn),
|
|
35
|
+
lifecycle: ledger.lifecycle.map(withoutTurn),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
7
39
|
export function appendLifecycleEvent(
|
|
8
40
|
ledger: GoalLedger,
|
|
9
41
|
event: GoalLifecycleEvent["event"],
|
|
@@ -48,7 +80,7 @@ export async function writeGoalLedger(
|
|
|
48
80
|
ledger: GoalLedger,
|
|
49
81
|
): Promise<void> {
|
|
50
82
|
ledger.updated_at = new Date().toISOString();
|
|
51
|
-
await writeFile(ledgerPath, `${JSON.stringify(ledger, null, 2)}\n`, {
|
|
83
|
+
await writeFile(ledgerPath, `${JSON.stringify(modelVisibleLedger(ledger), null, 2)}\n`, {
|
|
52
84
|
encoding: "utf8",
|
|
53
85
|
});
|
|
54
86
|
}
|
|
@@ -9,8 +9,9 @@ export { WORKER_PREFLIGHT_CONTRACT };
|
|
|
9
9
|
|
|
10
10
|
export const GOAL_CONTINUATION_REFERENCE = [
|
|
11
11
|
"Continuation behavior:",
|
|
12
|
-
"- This goal persists across
|
|
13
|
-
"- Keep the full objective intact
|
|
12
|
+
"- This goal persists across workflow continuations. A worker session ending does not require shrinking the objective to what fits immediately.",
|
|
13
|
+
"- Keep the full objective intact and do not stop until the objective is complete. Do not intentionally leave known required implementation, validation, documentation, or cleanup for a later worker session.",
|
|
14
|
+
"- If the full objective genuinely cannot be finished with available context/tools, make the most concrete progress toward the real requested end state, leave the goal active, and do not redefine success around a smaller or easier task.",
|
|
14
15
|
"- Temporary rough edges are acceptable while the work is moving in the right direction. Completion still requires the requested end state to be true and verified.",
|
|
15
16
|
"",
|
|
16
17
|
"Work from evidence:",
|
|
@@ -20,7 +21,7 @@ export const GOAL_CONTINUATION_REFERENCE = [
|
|
|
20
21
|
"If todo management is available and the next work is meaningfully multi-step, use it to show a concise plan tied to the real objective. Keep the plan current as steps complete or the next best action changes. Skip planning overhead for trivial one-step progress, and do not treat a todo update as a substitute for doing the work.",
|
|
21
22
|
"",
|
|
22
23
|
"Fidelity:",
|
|
23
|
-
"- Optimize
|
|
24
|
+
"- Optimize worker effort for full completion of the requested end state, not for the smallest stable-looking subset or easiest passing change.",
|
|
24
25
|
"- Do not substitute a narrower, safer, smaller, merely compatible, or easier-to-test solution because it is more likely to pass current tests.",
|
|
25
26
|
"- Treat alignment as movement toward the requested end state. An edit is aligned only if it makes the requested final state more true; useful-looking behavior that preserves a different end state is misaligned.",
|
|
26
27
|
"",
|
|
@@ -39,20 +40,21 @@ export const GOAL_CONTINUATION_REFERENCE = [
|
|
|
39
40
|
"",
|
|
40
41
|
"Blocked audit:",
|
|
41
42
|
"- Do not report blocked the first time a blocker appears.",
|
|
42
|
-
"- Only use blocked when the same blocking condition has repeated for the
|
|
43
|
+
"- Only use blocked when the same blocking condition has repeated often enough for the controller's blocker policy to identify a true impasse.",
|
|
43
44
|
"- Use blocked only when you are truly at an impasse and cannot make meaningful progress without user input or an external-state change.",
|
|
44
45
|
"- Once the blocked threshold is satisfied, do not keep reporting that you are still blocked while leaving the goal active; report blocked.",
|
|
45
46
|
"- Never use blocked merely because the work is hard, slow, uncertain, incomplete, or would benefit from clarification.",
|
|
46
47
|
"",
|
|
47
|
-
"Do not report the goal as done unless the goal is complete. Do not mark a goal complete merely because the
|
|
48
|
+
"Do not report the goal as done unless the goal is complete. Do not mark a goal complete merely because the worker session is ending.",
|
|
48
49
|
].join("\n");
|
|
49
50
|
|
|
50
51
|
export const WORKER_RECEIPT_CONTRACT = [
|
|
51
|
-
"
|
|
52
|
+
"Implement the requested objective completely before reporting. Do not stop until the objective is complete.",
|
|
52
53
|
"Inspect current files, commands, artifacts, and repository guidance before relying on prior summaries.",
|
|
53
54
|
"Improve, replace, or remove existing work as needed to satisfy the actual objective.",
|
|
54
55
|
"If todo management is available and the next work is meaningfully multi-step, use it to show a concise plan tied to the real objective. Keep the plan current as steps complete or the next best action changes. Skip planning overhead for trivial one-step progress, and do not treat todo updates as a substitute for doing the work.",
|
|
55
|
-
"If meaningful work remains,
|
|
56
|
+
"If meaningful work remains, keep working through implementation, validation, documentation, and cleanup instead of stopping at a reviewable partial state.",
|
|
57
|
+
"Only leave remaining work when it is blocked or impossible to complete with available context and tools; do not redefine success around a smaller task.",
|
|
56
58
|
"Before saying the goal is ready for review, derive concrete requirements from the objective and referenced files, plans, specifications, issues, or user instructions.",
|
|
57
59
|
"For every explicit requirement, numbered item, named artifact, command, test, gate, invariant, and deliverable, identify authoritative evidence from files, command output, test results, PR state, rendered artifacts, runtime behavior, or other current-state proof.",
|
|
58
60
|
"Classify evidence honestly: proves completion, contradicts completion, shows incomplete work, is too weak or indirect, is merely consistent with completion, or is missing.",
|
|
@@ -62,7 +64,7 @@ export const WORKER_RECEIPT_CONTRACT = [
|
|
|
62
64
|
].join("\n");
|
|
63
65
|
|
|
64
66
|
export const GOAL_METHOD_REFERENCE = [
|
|
65
|
-
"Maintain a concrete goal contract for the run: intent, verification oracle, work surface, execution
|
|
67
|
+
"Maintain a concrete goal contract for the run: intent, verification oracle, work surface, execution workflow, and proof.",
|
|
66
68
|
"Infer the owner outcome and a verifiable oracle from the user's task and repository evidence; do not ask the user unless the workflow is truly blocked.",
|
|
67
69
|
"Treat any user-supplied planning artifacts as supporting context, not as the primary success criterion.",
|
|
68
70
|
"Keep pressure on current evidence: the current worktree, artifacts, command output, tests, demos, generated files, and explicit human decisions are more authoritative than prior conversation summaries.",
|
|
@@ -135,23 +137,21 @@ export function renderReceiptHistory(ledger: GoalLedger): string {
|
|
|
135
137
|
if (ledger.receipts.length === 0) return "No prior work receipts.";
|
|
136
138
|
const latestReceipt = ledger.receipts.at(-1);
|
|
137
139
|
if (latestReceipt === undefined) return "No prior work receipts.";
|
|
138
|
-
return `Latest receipt
|
|
140
|
+
return `Latest receipt artifact: ${latestReceipt.artifact_path}. Read it if you need receipt details.`;
|
|
139
141
|
}
|
|
140
142
|
|
|
141
143
|
export function renderLatestReviewArtifacts(paths: readonly string[]): string {
|
|
142
|
-
if (paths.length === 0) return "No prior review artifacts
|
|
144
|
+
if (paths.length === 0) return "No prior review artifacts are available.";
|
|
143
145
|
return [
|
|
144
|
-
"Latest review artifacts
|
|
146
|
+
"Latest available review artifacts:",
|
|
145
147
|
...paths.map((path) => `- ${path}`),
|
|
146
|
-
"Read only the details needed for the next action; do not load
|
|
148
|
+
"Read only the details needed for the next action; do not load older review artifacts unless the latest artifacts explicitly refer to them.",
|
|
147
149
|
].join("\n");
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
export function renderGoalContinuationPrompt(
|
|
151
153
|
ledger: GoalLedger,
|
|
152
154
|
ledgerPath: string,
|
|
153
|
-
turn: number,
|
|
154
|
-
maxTurns: number,
|
|
155
155
|
blockerThreshold: number,
|
|
156
156
|
latestReviewArtifactPaths: readonly string[],
|
|
157
157
|
): string {
|
|
@@ -162,10 +162,9 @@ export function renderGoalContinuationPrompt(
|
|
|
162
162
|
"Continue working toward the active thread goal.",
|
|
163
163
|
"The goal ledger artifact is the authoritative state for the objective, status, receipts, latest reviewer decisions, blockers, reducer decisions, and lifecycle events.",
|
|
164
164
|
"",
|
|
165
|
-
"Workflow
|
|
166
|
-
`- Turn: ${turn}/${maxTurns}`,
|
|
165
|
+
"Workflow context:",
|
|
167
166
|
`- Goal ledger artifact: ${ledgerPath}`,
|
|
168
|
-
`- Blocked threshold: same blocker must repeat for at least ${blockerThreshold}
|
|
167
|
+
`- Blocked threshold: same blocker must repeat for at least ${blockerThreshold} controller observations before the controller can stop as blocked.`,
|
|
169
168
|
"- Completion transition: the worker may claim readiness, but reviewer quorum plus the deterministic reducer decides final workflow status.",
|
|
170
169
|
"",
|
|
171
170
|
renderReceiptHistory(ledger),
|
|
@@ -182,8 +181,6 @@ export function renderGoalContinuationPrompt(
|
|
|
182
181
|
export function renderForkedGoalWorkerPrompt(
|
|
183
182
|
ledger: GoalLedger,
|
|
184
183
|
ledgerPath: string,
|
|
185
|
-
turn: number,
|
|
186
|
-
maxTurns: number,
|
|
187
184
|
blockerThreshold: number,
|
|
188
185
|
latestReviewArtifactPaths: readonly string[],
|
|
189
186
|
): string {
|
|
@@ -191,14 +188,13 @@ export function renderForkedGoalWorkerPrompt(
|
|
|
191
188
|
[
|
|
192
189
|
"goal_context",
|
|
193
190
|
[
|
|
194
|
-
"Continue the same goal-runner worker thread from the previous
|
|
191
|
+
"Continue the same goal-runner worker thread from the previous worker session.",
|
|
195
192
|
"Reuse the goal invariants, project preflight, worker receipt contract, completion audit, and blocked audit.",
|
|
196
193
|
"Do not reinterpret, shrink, or weaken the original objective; the goal ledger remains authoritative.",
|
|
197
194
|
"",
|
|
198
|
-
"
|
|
199
|
-
`- Turn: ${turn}/${maxTurns}`,
|
|
195
|
+
"Workflow context:",
|
|
200
196
|
`- Goal ledger artifact: ${ledgerPath}`,
|
|
201
|
-
`- Blocked threshold: same blocker must repeat for at least ${blockerThreshold}
|
|
197
|
+
`- Blocked threshold: same blocker must repeat for at least ${blockerThreshold} controller observations before the controller can stop as blocked.`,
|
|
202
198
|
"- Completion transition: the worker may claim readiness, but reviewer quorum plus the deterministic reducer decides final workflow status.",
|
|
203
199
|
"",
|
|
204
200
|
renderReceiptHistory(ledger),
|
|
@@ -217,7 +213,6 @@ export function renderReviewerPrompt(args: {
|
|
|
217
213
|
readonly ledgerPath: string;
|
|
218
214
|
readonly workTurnPath: string;
|
|
219
215
|
readonly comparisonBaseBranch: string;
|
|
220
|
-
readonly turn: number;
|
|
221
216
|
readonly reviewQuorum: number;
|
|
222
217
|
readonly blockerThreshold: number;
|
|
223
218
|
}): string {
|
|
@@ -260,7 +255,7 @@ export function renderReviewerPrompt(args: {
|
|
|
260
255
|
"reference_branch",
|
|
261
256
|
[
|
|
262
257
|
`The baseline branch for comparison is \`${args.comparisonBaseBranch}\`.`,
|
|
263
|
-
"Compare the current working tree against this baseline branch, not against previous workflow reasoning or
|
|
258
|
+
"Compare the current working tree against this baseline branch, not against previous workflow reasoning or progress expectations.",
|
|
264
259
|
`Start with \`git status --short\`, then use working-tree-aware commands such as \`git diff ${args.comparisonBaseBranch}\` and \`git diff --cached ${args.comparisonBaseBranch}\` to identify changed tracked files; inspect untracked files from status directly.`,
|
|
265
260
|
].join("\n"),
|
|
266
261
|
],
|
|
@@ -327,8 +322,8 @@ export function renderReviewerPrompt(args: {
|
|
|
327
322
|
[
|
|
328
323
|
"The structured review decision is only valid after you inspect the actual repository state and compare it against the stated baseline branch.",
|
|
329
324
|
"Do not approve based solely on workflow stage summaries or prior agent reasoning.",
|
|
330
|
-
"Treat this review as the completion audit for the current goal
|
|
331
|
-
"Do not approve when proof only shows planning, discovery, task selection, helper documents, or a narrow slice while the broader requested outcome still has
|
|
325
|
+
"Treat this review as the completion audit for the current repository and goal state: approval means receipts and current evidence prove the original owner outcome against the full objective.",
|
|
326
|
+
"Do not approve when proof only shows planning, discovery, task selection, helper documents, or a narrow slice while the broader requested outcome still has required work remaining.",
|
|
332
327
|
"The tool call is the final verdict after review work, not a shortcut around review work.",
|
|
333
328
|
].join("\n"),
|
|
334
329
|
],
|
|
@@ -349,7 +344,7 @@ export function renderReviewerPrompt(args: {
|
|
|
349
344
|
[
|
|
350
345
|
`Reviewer quorum is ${args.reviewQuorum}; same blocker threshold is ${args.blockerThreshold}. You do not decide final workflow status. The reducer does.`,
|
|
351
346
|
"If the strict blocked audit is satisfied by current evidence, do not invent a finding. Set stop_review_loop=false, goal_oracle_satisfied=false, verification_remaining to the concise blocker, and reviewer_error.kind to dependency_unavailable or tool_failure with reviewer_error.message set to the same concise blocker.",
|
|
352
|
-
"When the same dependency or tool blocker from prior reviewer history is still present, echo the prior
|
|
347
|
+
"When the same dependency or tool blocker from prior reviewer history is still present, echo the prior blocker string in verification_remaining and reviewer_error.message instead of rephrasing it.",
|
|
353
348
|
"Use reviewer_error for a blocker only when there is a real impasse that prevents meaningful progress without user input or an external-state change; never for ordinary incomplete work, uncertainty, or useful work remaining.",
|
|
354
349
|
].join("\n"),
|
|
355
350
|
],
|