muonroi-cli 1.8.4 → 1.9.0
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/LICENSE +17 -5
- package/dist/packages/agent-harness-core/src/driver.d.ts +27 -1
- package/dist/packages/agent-harness-core/src/driver.js +46 -0
- package/dist/packages/agent-harness-core/src/event-filter.js +11 -0
- package/dist/packages/agent-harness-core/src/event-redact.js +7 -0
- package/dist/packages/agent-harness-core/src/event-tee.d.ts +64 -0
- package/dist/packages/agent-harness-core/src/event-tee.js +104 -0
- package/dist/packages/agent-harness-core/src/mcp-server.d.ts +25 -0
- package/dist/packages/agent-harness-core/src/mcp-server.js +169 -21
- package/dist/packages/agent-harness-core/src/predicate.d.ts +1 -1
- package/dist/packages/agent-harness-core/src/protocol.d.ts +90 -4
- package/dist/packages/agent-harness-core/src/protocol.js +15 -0
- package/dist/packages/agent-harness-core/src/visual-quality.d.ts +58 -0
- package/dist/packages/agent-harness-core/src/visual-quality.js +141 -0
- package/dist/packages/agent-harness-opentui/src/agent-mode.d.ts +6 -0
- package/dist/packages/agent-harness-opentui/src/agent-mode.js +14 -1
- package/dist/packages/agent-harness-opentui/src/input-bridge.d.ts +2 -10
- package/dist/packages/agent-harness-opentui/src/input-bridge.js +103 -16
- package/dist/packages/agent-harness-opentui/src/install.d.ts +8 -0
- package/dist/packages/agent-harness-opentui/src/install.js +10 -0
- package/dist/packages/agent-harness-opentui/src/semantic.js +12 -10
- package/dist/packages/agent-harness-opentui/src/visual-capture.d.ts +56 -0
- package/dist/packages/agent-harness-opentui/src/visual-capture.js +103 -0
- package/dist/src/agent-harness/mock-model.d.ts +38 -0
- package/dist/src/agent-harness/mock-model.js +69 -3
- package/dist/src/agent-harness/test-spawn.js +31 -0
- package/dist/src/chat/chat-keychain.d.ts +7 -12
- package/dist/src/chat/chat-keychain.js +19 -86
- package/dist/src/cli/config/screen-providers.js +1 -1
- package/dist/src/cli/cost-forensics.d.ts +10 -0
- package/dist/src/cli/cost-forensics.js +18 -3
- package/dist/src/cli/keys-bundle.d.ts +1 -1
- package/dist/src/cli/keys-bundle.js +1 -1
- package/dist/src/cli/keys.d.ts +10 -47
- package/dist/src/cli/keys.js +31 -399
- package/dist/src/council/clarifier.d.ts +31 -3
- package/dist/src/council/clarifier.js +220 -32
- package/dist/src/council/context.js +49 -15
- package/dist/src/council/debate-checkpoint.d.ts +129 -0
- package/dist/src/council/debate-checkpoint.js +176 -0
- package/dist/src/council/debate-planner.js +54 -5
- package/dist/src/council/debate-summary.d.ts +25 -0
- package/dist/src/council/debate-summary.js +85 -0
- package/dist/src/council/debate.d.ts +169 -2
- package/dist/src/council/debate.js +1265 -135
- package/dist/src/council/index.d.ts +108 -1
- package/dist/src/council/index.js +670 -197
- package/dist/src/council/leader.d.ts +26 -0
- package/dist/src/council/leader.js +150 -9
- package/dist/src/council/llm.d.ts +94 -0
- package/dist/src/council/llm.js +348 -55
- package/dist/src/council/panel-select.d.ts +30 -0
- package/dist/src/council/panel-select.js +82 -0
- package/dist/src/council/planner.js +40 -0
- package/dist/src/council/preflight.d.ts +17 -0
- package/dist/src/council/preflight.js +50 -2
- package/dist/src/council/prompts.d.ts +39 -4
- package/dist/src/council/prompts.js +256 -69
- package/dist/src/council/stance-recall.d.ts +42 -0
- package/dist/src/council/stance-recall.js +57 -0
- package/dist/src/council/strip-think.d.ts +17 -0
- package/dist/src/council/strip-think.js +33 -0
- package/dist/src/council/types.d.ts +138 -0
- package/dist/src/ee/artifact-cache.d.ts +16 -0
- package/dist/src/ee/artifact-cache.js +32 -0
- package/dist/src/ee/auth.d.ts +20 -0
- package/dist/src/ee/auth.js +54 -2
- package/dist/src/ee/bridge.d.ts +10 -0
- package/dist/src/ee/bridge.js +58 -0
- package/dist/src/ee/client.js +109 -21
- package/dist/src/ee/ee-onboarding.js +6 -26
- package/dist/src/ee/export-transcripts.d.ts +1 -0
- package/dist/src/ee/export-transcripts.js +8 -10
- package/dist/src/ee/extract-session.js +29 -0
- package/dist/src/ee/extract-style.d.ts +58 -0
- package/dist/src/ee/extract-style.js +270 -0
- package/dist/src/ee/recall-ledger.d.ts +9 -0
- package/dist/src/ee/recall-ledger.js +3 -0
- package/dist/src/ee/scope.d.ts +1 -0
- package/dist/src/ee/scope.js +26 -1
- package/dist/src/ee/search.d.ts +7 -0
- package/dist/src/ee/search.js +24 -0
- package/dist/src/ee/transcript-emit.js +2 -0
- package/dist/src/ee/types.d.ts +22 -0
- package/dist/src/ee/who-am-i-brain.d.ts +35 -0
- package/dist/src/ee/who-am-i-brain.js +220 -0
- package/dist/src/ee/who-am-i.d.ts +10 -3
- package/dist/src/ee/who-am-i.js +12 -0
- package/dist/src/ee/workflow-event.d.ts +48 -0
- package/dist/src/ee/workflow-event.js +81 -0
- package/dist/src/flow/compaction/compress.d.ts +3 -3
- package/dist/src/flow/compaction/compress.js +58 -8
- package/dist/src/flow/compaction/extract.d.ts +4 -7
- package/dist/src/flow/compaction/extract.js +50 -10
- package/dist/src/flow/compaction/index.d.ts +14 -1
- package/dist/src/flow/compaction/index.js +96 -3
- package/dist/src/flow/compaction/input-guard.d.ts +24 -0
- package/dist/src/flow/compaction/input-guard.js +43 -0
- package/dist/src/flow/compaction/progress.d.ts +35 -0
- package/dist/src/flow/compaction/progress.js +35 -0
- package/dist/src/flow/fold-planning.d.ts +36 -0
- package/dist/src/flow/fold-planning.js +83 -0
- package/dist/src/flow/hierarchy.d.ts +146 -0
- package/dist/src/flow/hierarchy.js +427 -0
- package/dist/src/flow/index.d.ts +1 -0
- package/dist/src/flow/index.js +2 -0
- package/dist/src/flow/run-artifacts.d.ts +102 -0
- package/dist/src/flow/run-artifacts.js +208 -0
- package/dist/src/generated/version.d.ts +1 -1
- package/dist/src/generated/version.js +1 -1
- package/dist/src/gsd/assessment-schema.d.ts +44 -0
- package/dist/src/gsd/assessment-schema.js +134 -0
- package/dist/src/gsd/capability-registry.d.ts +45 -0
- package/dist/src/gsd/capability-registry.js +337 -0
- package/dist/src/gsd/complexity-assessor.d.ts +39 -0
- package/dist/src/gsd/complexity-assessor.js +152 -0
- package/dist/src/gsd/config-bridge.d.ts +7 -0
- package/dist/src/gsd/config-bridge.js +114 -0
- package/dist/src/gsd/config-loader.d.ts +27 -0
- package/dist/src/gsd/config-loader.js +50 -0
- package/dist/src/gsd/council-context.d.ts +44 -0
- package/dist/src/gsd/council-context.js +114 -0
- package/dist/src/gsd/ee-closure.d.ts +28 -0
- package/dist/src/gsd/ee-closure.js +49 -0
- package/dist/src/gsd/flags.d.ts +66 -0
- package/dist/src/gsd/flags.js +102 -0
- package/dist/src/gsd/gsd-dispatch.d.ts +58 -0
- package/dist/src/gsd/gsd-dispatch.js +131 -0
- package/dist/src/gsd/gsd-runtime.d.ts +22 -0
- package/dist/src/gsd/gsd-runtime.js +37 -0
- package/dist/src/gsd/host-adapter.d.ts +11 -0
- package/dist/src/gsd/host-adapter.js +29 -0
- package/dist/src/gsd/index.d.ts +24 -1
- package/dist/src/gsd/index.js +27 -0
- package/dist/src/gsd/loop-host-contract.d.ts +21 -0
- package/dist/src/gsd/loop-host-contract.js +39 -0
- package/dist/src/gsd/loop-host.d.ts +69 -0
- package/dist/src/gsd/loop-host.js +245 -0
- package/dist/src/gsd/loop-resolver.d.ts +36 -0
- package/dist/src/gsd/loop-resolver.js +79 -0
- package/dist/src/gsd/model-tier.d.ts +13 -0
- package/dist/src/gsd/model-tier.js +45 -0
- package/dist/src/gsd/mutation-gate.d.ts +16 -0
- package/dist/src/gsd/mutation-gate.js +41 -0
- package/dist/src/gsd/native-roadmap.d.ts +89 -0
- package/dist/src/gsd/native-roadmap.js +343 -0
- package/dist/src/gsd/native-state.d.ts +47 -0
- package/dist/src/gsd/native-state.js +220 -0
- package/dist/src/gsd/paths.d.ts +23 -0
- package/dist/src/gsd/paths.js +66 -0
- package/dist/src/gsd/phase-dag.d.ts +12 -0
- package/dist/src/gsd/phase-dag.js +94 -0
- package/dist/src/gsd/phase-sync.d.ts +42 -0
- package/dist/src/gsd/phase-sync.js +321 -0
- package/dist/src/gsd/pil-gate-context.d.ts +13 -0
- package/dist/src/gsd/pil-gate-context.js +64 -0
- package/dist/src/gsd/pil-gate-critic.d.ts +19 -0
- package/dist/src/gsd/pil-gate-critic.js +74 -0
- package/dist/src/gsd/plan-council-prompts.d.ts +25 -0
- package/dist/src/gsd/plan-council-prompts.js +79 -0
- package/dist/src/gsd/plan-council.d.ts +44 -0
- package/dist/src/gsd/plan-council.js +283 -0
- package/dist/src/gsd/plan-gate-vocabulary.d.ts +40 -0
- package/dist/src/gsd/plan-gate-vocabulary.js +64 -0
- package/dist/src/gsd/product-workspace.d.ts +13 -0
- package/dist/src/gsd/product-workspace.js +124 -0
- package/dist/src/gsd/ship-bridge.d.ts +25 -0
- package/dist/src/gsd/ship-bridge.js +65 -0
- package/dist/src/gsd/state-document.d.ts +40 -0
- package/dist/src/gsd/state-document.js +163 -0
- package/dist/src/gsd/verdict-schema.d.ts +39 -0
- package/dist/src/gsd/verdict-schema.js +144 -0
- package/dist/src/gsd/verify-context.d.ts +22 -0
- package/dist/src/gsd/verify-context.js +27 -0
- package/dist/src/gsd/verify-council-prompts.d.ts +19 -0
- package/dist/src/gsd/verify-council-prompts.js +85 -0
- package/dist/src/gsd/verify-council.d.ts +25 -0
- package/dist/src/gsd/verify-council.js +119 -0
- package/dist/src/gsd/verify-gate-vocabulary.d.ts +25 -0
- package/dist/src/gsd/verify-gate-vocabulary.js +46 -0
- package/dist/src/gsd/workflow-engine.d.ts +60 -0
- package/dist/src/gsd/workflow-engine.js +207 -0
- package/dist/src/gsd/workflow-tools.d.ts +13 -0
- package/dist/src/gsd/workflow-tools.js +277 -0
- package/dist/src/headless/council-answers.js +4 -0
- package/dist/src/hooks/index.js +1 -1
- package/dist/src/index.js +172 -270
- package/dist/src/lsp/builtins.js +3 -1
- package/dist/src/lsp/manager.d.ts +5 -1
- package/dist/src/lsp/manager.js +249 -3
- package/dist/src/lsp/npm-cache.d.ts +11 -1
- package/dist/src/lsp/npm-cache.js +17 -1
- package/dist/src/lsp/runtime.d.ts +6 -1
- package/dist/src/lsp/runtime.js +17 -1
- package/dist/src/lsp/types.d.ts +83 -1
- package/dist/src/lsp/types.js +10 -0
- package/dist/src/maintain/pr-builder.js +23 -13
- package/dist/src/mcp/auto-setup.js +57 -32
- package/dist/src/mcp/client-pool.js +44 -16
- package/dist/src/mcp/lsp-tools.d.ts +5 -1
- package/dist/src/mcp/lsp-tools.js +93 -2
- package/dist/src/mcp/mcp-keychain.d.ts +3 -5
- package/dist/src/mcp/mcp-keychain.js +9 -49
- package/dist/src/mcp/research-onboarding.js +8 -7
- package/dist/src/mcp/runtime.js +34 -2
- package/dist/src/mcp/setup-guide-text.d.ts +1 -1
- package/dist/src/mcp/setup-guide-text.js +22 -2
- package/dist/src/mcp/tools-server.d.ts +10 -0
- package/dist/src/mcp/tools-server.js +10 -2
- package/dist/src/models/catalog-client.d.ts +87 -0
- package/dist/src/models/catalog-client.js +105 -38
- package/dist/src/models/catalog.json +528 -265
- package/dist/src/models/registry.d.ts +22 -7
- package/dist/src/models/registry.js +73 -10
- package/dist/src/ops/doctor.js +1 -1
- package/dist/src/orchestrator/ask-user.d.ts +61 -0
- package/dist/src/orchestrator/ask-user.js +65 -0
- package/dist/src/orchestrator/auto-commit.js +1 -1
- package/dist/src/orchestrator/batch-turn-runner.js +2 -2
- package/dist/src/orchestrator/cache-prefix.d.ts +67 -0
- package/dist/src/orchestrator/cache-prefix.js +83 -0
- package/dist/src/orchestrator/compact-request.d.ts +32 -0
- package/dist/src/orchestrator/compact-request.js +41 -0
- package/dist/src/orchestrator/compaction.d.ts +12 -3
- package/dist/src/orchestrator/compaction.js +35 -15
- package/dist/src/orchestrator/council-manager.d.ts +12 -3
- package/dist/src/orchestrator/council-manager.js +74 -32
- package/dist/src/orchestrator/council-request.d.ts +49 -0
- package/dist/src/orchestrator/council-request.js +62 -0
- package/dist/src/orchestrator/cross-turn-dedup.d.ts +6 -0
- package/dist/src/orchestrator/cross-turn-dedup.js +22 -1
- package/dist/src/orchestrator/error-utils.d.ts +29 -0
- package/dist/src/orchestrator/error-utils.js +132 -24
- package/dist/src/orchestrator/grounding-check.js +39 -1
- package/dist/src/orchestrator/interactive-pause.d.ts +26 -0
- package/dist/src/orchestrator/interactive-pause.js +36 -0
- package/dist/src/orchestrator/message-processor.d.ts +4 -0
- package/dist/src/orchestrator/message-processor.js +268 -41
- package/dist/src/orchestrator/orchestrator.d.ts +64 -3
- package/dist/src/orchestrator/orchestrator.js +823 -120
- package/dist/src/orchestrator/preprocessor.js +3 -3
- package/dist/src/orchestrator/proactive-compact-detector.d.ts +26 -0
- package/dist/src/orchestrator/proactive-compact-detector.js +36 -0
- package/dist/src/orchestrator/prompts.js +17 -17
- package/dist/src/orchestrator/reactive-delegation.d.ts +39 -0
- package/dist/src/orchestrator/reactive-delegation.js +59 -0
- package/dist/src/orchestrator/retry-classifier.d.ts +2 -1
- package/dist/src/orchestrator/retry-classifier.js +46 -2
- package/dist/src/orchestrator/safety-askcard.d.ts +1 -1
- package/dist/src/orchestrator/safety-askcard.js +5 -2
- package/dist/src/orchestrator/safety-intercept.d.ts +50 -0
- package/dist/src/orchestrator/safety-intercept.js +62 -0
- package/dist/src/orchestrator/scope-reminder.js +1 -1
- package/dist/src/orchestrator/session-experience.d.ts +2 -1
- package/dist/src/orchestrator/session-experience.js +2 -1
- package/dist/src/orchestrator/should-run-gate.d.ts +5 -0
- package/dist/src/orchestrator/should-run-gate.js +18 -0
- package/dist/src/orchestrator/stall-watchdog.d.ts +31 -3
- package/dist/src/orchestrator/stall-watchdog.js +65 -10
- package/dist/src/orchestrator/stream-runner.d.ts +13 -3
- package/dist/src/orchestrator/stream-runner.js +115 -49
- package/dist/src/orchestrator/sub-agent-cap.d.ts +13 -1
- package/dist/src/orchestrator/sub-agent-cap.js +16 -1
- package/dist/src/orchestrator/sub-agent-model-tier.d.ts +13 -1
- package/dist/src/orchestrator/sub-agent-model-tier.js +16 -2
- package/dist/src/orchestrator/subagent-compactor.d.ts +53 -1
- package/dist/src/orchestrator/subagent-compactor.js +126 -15
- package/dist/src/orchestrator/tool-engine.d.ts +41 -0
- package/dist/src/orchestrator/tool-engine.js +846 -66
- package/dist/src/orchestrator/tool-limit-auto-recover.d.ts +22 -0
- package/dist/src/orchestrator/tool-limit-auto-recover.js +30 -0
- package/dist/src/orchestrator/turn-runner-deps.d.ts +19 -0
- package/dist/src/orchestrator/turn-watchdog.d.ts +44 -0
- package/dist/src/orchestrator/turn-watchdog.js +84 -0
- package/dist/src/pil/agent-operating-contract.d.ts +1 -1
- package/dist/src/pil/agent-operating-contract.js +6 -4
- package/dist/src/pil/cheap-model-playbook.d.ts +1 -1
- package/dist/src/pil/cheap-model-playbook.js +5 -1
- package/dist/src/pil/cheap-model-workbooks.d.ts +1 -1
- package/dist/src/pil/cheap-model-workbooks.js +1 -1
- package/dist/src/pil/discovery-types.d.ts +1 -0
- package/dist/src/pil/discovery.d.ts +1 -1
- package/dist/src/pil/discovery.js +18 -13
- package/dist/src/pil/layer1-intent.d.ts +18 -6
- package/dist/src/pil/layer1-intent.js +66 -757
- package/dist/src/pil/layer15-context-scan.js +15 -1
- package/dist/src/pil/layer1_5-complexity-size.d.ts +7 -0
- package/dist/src/pil/layer1_5-complexity-size.js +31 -5
- package/dist/src/pil/layer3-ee-injection.js +23 -8
- package/dist/src/pil/layer4-gsd.js +69 -16
- package/dist/src/pil/layer5-context.js +7 -3
- package/dist/src/pil/layer6-output.d.ts +23 -0
- package/dist/src/pil/layer6-output.js +5 -1
- package/dist/src/pil/llm-classify.d.ts +111 -5
- package/dist/src/pil/llm-classify.js +421 -189
- package/dist/src/pil/native-capabilities-workbook.d.ts +1 -1
- package/dist/src/pil/native-capabilities-workbook.js +8 -0
- package/dist/src/pil/pipeline.js +36 -2
- package/dist/src/pil/repo-grounding-probe.d.ts +15 -0
- package/dist/src/pil/repo-grounding-probe.js +136 -0
- package/dist/src/pil/repo-structure-hints.d.ts +7 -0
- package/dist/src/pil/repo-structure-hints.js +45 -0
- package/dist/src/pil/response-tools.js +5 -3
- package/dist/src/pil/schema.d.ts +1 -0
- package/dist/src/pil/schema.js +2 -0
- package/dist/src/pil/types.d.ts +18 -0
- package/dist/src/playbook/directives.d.ts +4 -0
- package/dist/src/playbook/directives.js +17 -5
- package/dist/src/product-loop/artifact-io.js +4 -0
- package/dist/src/product-loop/backlog-builder.d.ts +14 -1
- package/dist/src/product-loop/backlog-builder.js +30 -6
- package/dist/src/product-loop/criteria-seed.d.ts +51 -0
- package/dist/src/product-loop/criteria-seed.js +200 -0
- package/dist/src/product-loop/discovery-context-format.js +3 -1
- package/dist/src/product-loop/discovery-ecosystem.js +4 -1
- package/dist/src/product-loop/discovery-interview.d.ts +9 -0
- package/dist/src/product-loop/discovery-interview.js +60 -12
- package/dist/src/product-loop/discovery-recommender.js +2 -1
- package/dist/src/product-loop/discovery-schema.js +19 -2
- package/dist/src/product-loop/discovery-triage.d.ts +23 -0
- package/dist/src/product-loop/discovery-triage.js +109 -0
- package/dist/src/product-loop/gather.js +150 -2
- package/dist/src/product-loop/ideal-trace.d.ts +7 -0
- package/dist/src/product-loop/ideal-trace.js +64 -0
- package/dist/src/product-loop/index.d.ts +13 -1
- package/dist/src/product-loop/index.js +340 -52
- package/dist/src/product-loop/loop-driver.d.ts +7 -0
- package/dist/src/product-loop/loop-driver.js +330 -106
- package/dist/src/product-loop/phase-plan.d.ts +21 -0
- package/dist/src/product-loop/phase-plan.js +81 -6
- package/dist/src/product-loop/phase-rituals.d.ts +3 -0
- package/dist/src/product-loop/phase-rituals.js +8 -3
- package/dist/src/product-loop/phase-runner.js +39 -12
- package/dist/src/product-loop/plan-adherence-review.d.ts +26 -0
- package/dist/src/product-loop/plan-adherence-review.js +144 -0
- package/dist/src/product-loop/sprint-runner.d.ts +173 -0
- package/dist/src/product-loop/sprint-runner.js +863 -19
- package/dist/src/product-loop/types.d.ts +61 -5
- package/dist/src/providers/adapter.d.ts +1 -1
- package/dist/src/providers/adapter.js +3 -4
- package/dist/src/providers/anthropic.d.ts +9 -8
- package/dist/src/providers/anthropic.js +13 -47
- package/dist/src/providers/auth/browser-flow.d.ts +1 -1
- package/dist/src/providers/auth/browser-flow.js +1 -1
- package/dist/src/providers/auth/grok-oauth.d.ts +1 -0
- package/dist/src/providers/auth/grok-oauth.js +30 -5
- package/dist/src/providers/auth/openai-oauth.d.ts +1 -0
- package/dist/src/providers/auth/openai-oauth.js +15 -1
- package/dist/src/providers/auth/registry.js +0 -34
- package/dist/src/providers/auth/token-store.d.ts +9 -9
- package/dist/src/providers/auth/token-store.js +8 -67
- package/dist/src/providers/auth/types.d.ts +9 -1
- package/dist/src/providers/auth/types.js +1 -1
- package/dist/src/providers/capabilities.d.ts +24 -5
- package/dist/src/providers/capabilities.js +42 -24
- package/dist/src/providers/endpoints.d.ts +2 -2
- package/dist/src/providers/endpoints.js +11 -10
- package/dist/src/providers/env-store.d.ts +17 -0
- package/dist/src/providers/env-store.js +228 -0
- package/dist/src/providers/keychain.d.ts +22 -18
- package/dist/src/providers/keychain.js +127 -140
- package/dist/src/providers/mcp-vision-bridge.js +56 -146
- package/dist/src/providers/openai-compatible.js +8 -1
- package/dist/src/providers/pricing.d.ts +2 -2
- package/dist/src/providers/pricing.js +3 -13
- package/dist/src/providers/runtime.d.ts +43 -3
- package/dist/src/providers/runtime.js +88 -14
- package/dist/src/providers/strategies/base.strategy.d.ts +16 -0
- package/dist/src/providers/strategies/base.strategy.js +24 -1
- package/dist/src/providers/strategies/{siliconflow.strategy.d.ts → opencode-go.strategy.d.ts} +3 -3
- package/dist/src/providers/strategies/opencode-go.strategy.js +83 -0
- package/dist/src/providers/strategies/registry.js +4 -4
- package/dist/src/providers/strategies/thinking-mode.d.ts +109 -0
- package/dist/src/providers/strategies/thinking-mode.js +288 -1
- package/dist/src/providers/strategies/xai.strategy.js +27 -0
- package/dist/src/providers/strategies/zai.strategy.d.ts +14 -0
- package/dist/src/providers/strategies/zai.strategy.js +44 -0
- package/dist/src/providers/types.d.ts +5 -6
- package/dist/src/providers/types.js +2 -2
- package/dist/src/providers/vision-backend.d.ts +47 -0
- package/dist/src/providers/vision-backend.js +258 -0
- package/dist/src/providers/vision-proxy.d.ts +22 -9
- package/dist/src/providers/vision-proxy.js +63 -132
- package/dist/src/providers/warm.d.ts +65 -0
- package/dist/src/providers/warm.js +145 -0
- package/dist/src/providers/wire-debug.js +95 -0
- package/dist/src/router/decide.d.ts +13 -0
- package/dist/src/router/decide.js +138 -36
- package/dist/src/router/peak-hour.d.ts +38 -0
- package/dist/src/router/peak-hour.js +107 -0
- package/dist/src/router/step-router.js +3 -2
- package/dist/src/router/warm.js +4 -5
- package/dist/src/scaffold/continuation-prompt.d.ts +11 -0
- package/dist/src/scaffold/continuation-prompt.js +26 -0
- package/dist/src/scaffold/point-to-existing.d.ts +21 -0
- package/dist/src/scaffold/point-to-existing.js +25 -0
- package/dist/src/self-qa/agentic-loop.js +6 -5
- package/dist/src/{ui/state → state}/active-run.d.ts +19 -0
- package/dist/src/{ui/state → state}/active-run.js +21 -0
- package/dist/src/{ui/status-bar/store.d.ts → state/status-bar-store.d.ts} +4 -1
- package/dist/src/{ui/status-bar/store.js → state/status-bar-store.js} +12 -9
- package/dist/src/state/turn-trace.d.ts +43 -0
- package/dist/src/state/turn-trace.js +32 -0
- package/dist/src/storage/db.js +2 -1
- package/dist/src/storage/index.d.ts +1 -1
- package/dist/src/storage/index.js +1 -1
- package/dist/src/storage/interaction-log.d.ts +1 -1
- package/dist/src/storage/migrations.js +71 -1
- package/dist/src/storage/sessions.d.ts +28 -10
- package/dist/src/storage/sessions.js +78 -21
- package/dist/src/storage/transcript-view.js +1 -1
- package/dist/src/storage/transcript.d.ts +51 -0
- package/dist/src/storage/transcript.js +340 -15
- package/dist/src/tools/file.d.ts +15 -0
- package/dist/src/tools/file.js +32 -0
- package/dist/src/tools/git-safety.d.ts +19 -0
- package/dist/src/tools/git-safety.js +168 -0
- package/dist/src/tools/native-tools.d.ts +1 -1
- package/dist/src/tools/native-tools.js +81 -1
- package/dist/src/tools/registry.d.ts +20 -0
- package/dist/src/tools/registry.js +576 -23
- package/dist/src/tools/research.d.ts +29 -0
- package/dist/src/tools/research.js +233 -0
- package/dist/src/types/index.d.ts +147 -4
- package/dist/src/ui/app.js +0 -0
- package/dist/src/ui/cards/product-status-card.js +1 -1
- package/dist/src/ui/components/agent-rail-activities.d.ts +26 -0
- package/dist/src/ui/components/agent-rail-activities.js +47 -0
- package/dist/src/ui/components/bubble-body-guard.d.ts +27 -0
- package/dist/src/ui/components/bubble-body-guard.js +50 -0
- package/dist/src/ui/components/compact-progress-card.d.ts +24 -0
- package/dist/src/ui/components/compact-progress-card.js +42 -0
- package/dist/src/ui/components/context-rail.d.ts +26 -0
- package/dist/src/ui/components/context-rail.js +33 -0
- package/dist/src/ui/components/council-conclusion-card.d.ts +73 -0
- package/dist/src/ui/components/council-conclusion-card.js +420 -0
- package/dist/src/ui/components/council-debate-pill.d.ts +36 -0
- package/dist/src/ui/components/council-debate-pill.js +34 -0
- package/dist/src/ui/components/council-info-card.js +2 -2
- package/dist/src/ui/components/council-leader-bubble.d.ts +10 -3
- package/dist/src/ui/components/council-leader-bubble.js +21 -11
- package/dist/src/ui/components/council-message-bubble.d.ts +15 -2
- package/dist/src/ui/components/council-message-bubble.js +16 -15
- package/dist/src/ui/components/council-phase-timeline.d.ts +9 -1
- package/dist/src/ui/components/council-phase-timeline.js +66 -17
- package/dist/src/ui/components/council-placeholder-bubble.d.ts +16 -9
- package/dist/src/ui/components/council-placeholder-bubble.js +32 -29
- package/dist/src/ui/components/council-question-card.js +13 -12
- package/dist/src/ui/components/council-rail-rounds.d.ts +26 -0
- package/dist/src/ui/components/council-rail-rounds.js +57 -0
- package/dist/src/ui/components/council-round-group.d.ts +38 -0
- package/dist/src/ui/components/council-round-group.js +88 -0
- package/dist/src/ui/components/council-status-list.d.ts +3 -1
- package/dist/src/ui/components/council-status-list.js +36 -24
- package/dist/src/ui/components/council-synthesis-banner.d.ts +7 -2
- package/dist/src/ui/components/council-synthesis-banner.js +20 -5
- package/dist/src/ui/components/halt-recovery-card.js +9 -5
- package/dist/src/ui/components/jump-to-latest-pill.d.ts +11 -0
- package/dist/src/ui/components/jump-to-latest-pill.js +14 -0
- package/dist/src/ui/components/message-view.d.ts +15 -0
- package/dist/src/ui/components/message-view.js +50 -1
- package/dist/src/ui/components/prompt-box.js +18 -16
- package/dist/src/ui/components/session-tree-card.d.ts +14 -0
- package/dist/src/ui/components/session-tree-card.js +46 -0
- package/dist/src/ui/components/slash-inline-menu.d.ts +12 -0
- package/dist/src/ui/components/slash-inline-menu.js +26 -5
- package/dist/src/ui/components/task-list-panel.d.ts +14 -1
- package/dist/src/ui/components/task-list-panel.js +22 -2
- package/dist/src/ui/components/tool-group.d.ts +15 -3
- package/dist/src/ui/components/tool-group.js +69 -11
- package/dist/src/ui/containers/modals-layer.d.ts +4 -2
- package/dist/src/ui/containers/modals-layer.js +2 -2
- package/dist/src/ui/council-harness-event.d.ts +57 -0
- package/dist/src/ui/council-harness-event.js +46 -0
- package/dist/src/ui/heartbeat-debug.d.ts +29 -0
- package/dist/src/ui/heartbeat-debug.js +45 -0
- package/dist/src/ui/hooks/use-session-picker.d.ts +3 -3
- package/dist/src/ui/mcp-modal.js +2 -4
- package/dist/src/ui/modals/api-key-modal.js +1 -1
- package/dist/src/ui/modals/connect-modal.js +4 -3
- package/dist/src/ui/modals/model-picker-modal.d.ts +8 -18
- package/dist/src/ui/modals/model-picker-modal.js +8 -10
- package/dist/src/ui/modals/session-picker-modal.d.ts +2 -2
- package/dist/src/ui/modals/session-picker-modal.js +3 -5
- package/dist/src/ui/picker-providers.d.ts +1 -1
- package/dist/src/ui/picker-providers.js +1 -1
- package/dist/src/ui/primitives/index.d.ts +1 -0
- package/dist/src/ui/primitives/index.js +2 -0
- package/dist/src/ui/primitives/semantic-primitives.d.ts +76 -0
- package/dist/src/ui/primitives/semantic-primitives.js +81 -0
- package/dist/src/ui/slash/compact.js +5 -7
- package/dist/src/ui/slash/cost.js +1 -1
- package/dist/src/ui/slash/council.js +19 -1
- package/dist/src/ui/slash/debug.d.ts +3 -31
- package/dist/src/ui/slash/debug.js +9 -20
- package/dist/src/ui/slash/ee.js +81 -0
- package/dist/src/ui/slash/ideal.d.ts +6 -2
- package/dist/src/ui/slash/ideal.js +97 -7
- package/dist/src/ui/slash/menu-items.d.ts +7 -0
- package/dist/src/ui/slash/menu-items.js +23 -20
- package/dist/src/ui/slash/registry.d.ts +2 -0
- package/dist/src/ui/slash/registry.js +4 -0
- package/dist/src/ui/status-bar/cache-hit.d.ts +6 -0
- package/dist/src/ui/status-bar/cache-hit.js +9 -0
- package/dist/src/ui/status-bar/index.d.ts +1 -1
- package/dist/src/ui/status-bar/index.js +7 -3
- package/dist/src/ui/status-bar/usd-meter.d.ts +5 -4
- package/dist/src/ui/status-bar/usd-meter.js +6 -4
- package/dist/src/ui/theme.d.ts +1 -0
- package/dist/src/ui/theme.js +2 -0
- package/dist/src/ui/types.d.ts +7 -0
- package/dist/src/ui/use-app-logic.js +0 -0
- package/dist/src/ui/utils/agent-activities.d.ts +39 -0
- package/dist/src/ui/utils/agent-activities.js +96 -0
- package/dist/src/ui/utils/format.d.ts +14 -0
- package/dist/src/ui/utils/format.js +23 -3
- package/dist/src/ui/utils/group-tool-entries.d.ts +26 -0
- package/dist/src/ui/utils/group-tool-entries.js +111 -0
- package/dist/src/ui/utils/tool-summary.d.ts +21 -0
- package/dist/src/ui/utils/tool-summary.js +91 -0
- package/dist/src/usage/downgrade.js +2 -2
- package/dist/src/usage/product-ledger.js +2 -2
- package/dist/src/utils/event-loop-monitor.d.ts +85 -0
- package/dist/src/utils/event-loop-monitor.js +107 -0
- package/dist/src/utils/install-manager.js +2 -1
- package/dist/src/utils/llm-deadline.d.ts +14 -0
- package/dist/src/utils/llm-deadline.js +19 -0
- package/dist/src/utils/logger.js +2 -2
- package/dist/src/utils/loop-profiler.d.ts +102 -0
- package/dist/src/utils/loop-profiler.js +202 -0
- package/dist/src/utils/permission-mode.js +5 -3
- package/dist/src/utils/redactor.js +1 -1
- package/dist/src/utils/settings.d.ts +180 -5
- package/dist/src/utils/settings.js +271 -31
- package/dist/src/utils/side-question.d.ts +1 -2
- package/dist/src/utils/side-question.js +2 -2
- package/dist/src/utils/visible-retry.d.ts +11 -0
- package/dist/src/utils/visible-retry.js +10 -1
- package/dist/src/verify/entrypoint.d.ts +1 -1
- package/dist/src/verify/entrypoint.js +52 -17
- package/dist/src/verify/orchestrator.d.ts +1 -1
- package/dist/src/verify/orchestrator.js +20 -3
- package/dist/src/verify/recipes.d.ts +13 -0
- package/dist/src/verify/recipes.js +15 -0
- package/package.json +134 -132
- package/dist/src/cli/bw-vault.d.ts +0 -55
- package/dist/src/cli/bw-vault.js +0 -133
- package/dist/src/mcp/ee-tools.d.ts +0 -46
- package/dist/src/mcp/ee-tools.js +0 -193
- package/dist/src/providers/auth/gcloud.d.ts +0 -28
- package/dist/src/providers/auth/gcloud.js +0 -102
- package/dist/src/providers/auth/gemini-oauth.d.ts +0 -82
- package/dist/src/providers/auth/gemini-oauth.js +0 -472
- package/dist/src/providers/gemini.d.ts +0 -11
- package/dist/src/providers/gemini.js +0 -45
- package/dist/src/providers/siliconflow-sse-repair.d.ts +0 -58
- package/dist/src/providers/siliconflow-sse-repair.js +0 -177
- package/dist/src/providers/strategies/google.strategy.d.ts +0 -22
- package/dist/src/providers/strategies/google.strategy.js +0 -174
- package/dist/src/providers/strategies/siliconflow.strategy.js +0 -29
- package/dist/src/ui/containers/chat-feed.d.ts +0 -40
- package/dist/src/ui/containers/chat-feed.js +0 -66
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the GSD verify-gate's EVALUATION AXES — the twin of
|
|
3
|
+
* plan-gate-vocabulary.ts for the verify council. Same drift risk: the interactive
|
|
4
|
+
* verify debate (`buildVerifyDebateTopic`) and the headless perspective review
|
|
5
|
+
* (`buildVerifyPerspectivePrompt` over `VERIFY_PERSPECTIVES`) must judge an
|
|
6
|
+
* implementation against IDENTICAL criteria or the two verify gates diverge.
|
|
7
|
+
*
|
|
8
|
+
* Council decision 2026-07-11 (PR 2): apply the plan-gate consolidation to the
|
|
9
|
+
* verify twin — one criteria source both paths derive from, parity-locked.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* The canonical axes every implementation is judged against once the
|
|
13
|
+
* deterministic test floor has passed — intent-vs-reality, not "tests are green".
|
|
14
|
+
*/
|
|
15
|
+
export const VERIFY_GATE_DIMENSIONS = [
|
|
16
|
+
{
|
|
17
|
+
id: "acceptance",
|
|
18
|
+
label: "Acceptance met",
|
|
19
|
+
probe: "Every acceptance criterion is satisfied by a cited diff line or concrete evidence.",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "correctness",
|
|
23
|
+
label: "Actually correct",
|
|
24
|
+
probe: "No concrete failing input or state refutes that the implementation works.",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "regression",
|
|
28
|
+
label: "No regression",
|
|
29
|
+
probe: "No behavior outside the task scope was broken — no removed guards, changed signatures, or side effects.",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "safety",
|
|
33
|
+
label: "Safe",
|
|
34
|
+
probe: "The diff introduces no path traversal, secret leak, permission change, or dangerous shell pattern.",
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
/** Fast lookup by id. */
|
|
38
|
+
export const VERIFY_GATE_DIMENSION_BY_ID = Object.fromEntries(VERIFY_GATE_DIMENSIONS.map((d) => [d.id, d]));
|
|
39
|
+
/** Bullet list of axes, shared by both verify-gate prompt paths. */
|
|
40
|
+
export function renderVerifyGateAxes() {
|
|
41
|
+
return [
|
|
42
|
+
"The implementation is judged against these axes (the test floor already passed):",
|
|
43
|
+
...VERIFY_GATE_DIMENSIONS.map((d) => `- ${d.label}: ${d.probe}`),
|
|
44
|
+
].join("\n");
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=verify-gate-vocabulary.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { GsdPhase } from "./types.js";
|
|
2
|
+
export interface WorkflowState {
|
|
3
|
+
phase: GsdPhase | null;
|
|
4
|
+
depth: string | null;
|
|
5
|
+
planVerified: boolean;
|
|
6
|
+
raw: string;
|
|
7
|
+
}
|
|
8
|
+
export interface WorkflowProgress {
|
|
9
|
+
milestone_version?: string;
|
|
10
|
+
milestone_name?: string;
|
|
11
|
+
phases?: unknown[];
|
|
12
|
+
phase_count?: number;
|
|
13
|
+
completed_count?: number;
|
|
14
|
+
state_exists?: boolean;
|
|
15
|
+
project_exists?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export type WorkflowKind = "task" | "product";
|
|
18
|
+
export declare function readExtensionField(cwd: string, fieldName: string): string | null;
|
|
19
|
+
export declare function readWorkflowKind(cwd: string): WorkflowKind | null;
|
|
20
|
+
export declare function readVerifyOutcome(cwd: string): "pass" | "fail" | null;
|
|
21
|
+
export declare function canShip(cwd: string, depth: string): {
|
|
22
|
+
allowed: boolean;
|
|
23
|
+
reason?: string;
|
|
24
|
+
};
|
|
25
|
+
export interface GsdStatusPayload {
|
|
26
|
+
state: WorkflowState;
|
|
27
|
+
progress: WorkflowProgress & {
|
|
28
|
+
phases_remaining?: number | null;
|
|
29
|
+
};
|
|
30
|
+
gates: {
|
|
31
|
+
canExecute: {
|
|
32
|
+
allowed: boolean;
|
|
33
|
+
reason?: string;
|
|
34
|
+
};
|
|
35
|
+
canShip: {
|
|
36
|
+
allowed: boolean;
|
|
37
|
+
reason?: string;
|
|
38
|
+
};
|
|
39
|
+
planVerifyVerdict: ReturnType<typeof readPlanVerifyVerdict>;
|
|
40
|
+
};
|
|
41
|
+
artifacts: {
|
|
42
|
+
planExists: boolean;
|
|
43
|
+
planVerifyExists: boolean;
|
|
44
|
+
verifyExists: boolean;
|
|
45
|
+
shipExists: boolean;
|
|
46
|
+
phaseDir: string | null;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export declare function buildGsdStatusPayload(cwd: string, depth: string): GsdStatusPayload;
|
|
50
|
+
export declare function readState(cwd: string): WorkflowState;
|
|
51
|
+
export declare function setStateField(cwd: string, field: string, value: string): WorkflowState;
|
|
52
|
+
export declare function currentPhase(cwd: string): GsdPhase | null;
|
|
53
|
+
export declare function advancePhase(cwd: string, phase: GsdPhase): WorkflowState;
|
|
54
|
+
export declare function readProgress(cwd: string): WorkflowProgress;
|
|
55
|
+
export declare function readPlanVerifyVerdict(cwd: string): "pass" | "revise" | "block" | null;
|
|
56
|
+
export declare function canExecute(cwd: string, depth: string): {
|
|
57
|
+
allowed: boolean;
|
|
58
|
+
reason?: string;
|
|
59
|
+
};
|
|
60
|
+
export declare function syncWorkflowContext(cwd: string, sessionModelId: string, depth: string): WorkflowState;
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { ensurePlanningWorkspace } from "./config-bridge.js";
|
|
3
|
+
import { dispatchInitProgress, dispatchStateJson, dispatchStateUpdate, invalidateGsdCache } from "./gsd-dispatch.js";
|
|
4
|
+
import { loadStateDocument } from "./gsd-runtime.js";
|
|
5
|
+
import { latestPhaseDir, planningArtifact } from "./paths.js";
|
|
6
|
+
function readStateFile(cwd) {
|
|
7
|
+
const path = planningArtifact(cwd, "STATE.md");
|
|
8
|
+
if (!existsSync(path))
|
|
9
|
+
return "";
|
|
10
|
+
return readFileSync(path, "utf8");
|
|
11
|
+
}
|
|
12
|
+
function writeStateFile(cwd, content) {
|
|
13
|
+
writeFileSync(planningArtifact(cwd, "STATE.md"), content, "utf8");
|
|
14
|
+
}
|
|
15
|
+
function mapPhaseField(value) {
|
|
16
|
+
if (!value)
|
|
17
|
+
return null;
|
|
18
|
+
const normalized = value.trim().toLowerCase();
|
|
19
|
+
const allowed = ["discuss", "plan", "execute", "verify", "review", "debug"];
|
|
20
|
+
const exact = allowed.find((p) => p === normalized);
|
|
21
|
+
if (exact)
|
|
22
|
+
return exact;
|
|
23
|
+
// gsd-core prose uses "discuss of 0 (task)" — take task-level token before " of ".
|
|
24
|
+
const taskToken = normalized.split(/\s+of\s+/)[0]?.trim();
|
|
25
|
+
return taskToken ? (allowed.find((p) => p === taskToken) ?? null) : null;
|
|
26
|
+
}
|
|
27
|
+
/** Muonroi task fields live in the extension table; prose Phase: lines are gsd milestone position. */
|
|
28
|
+
function extractExtensionTableField(raw, fieldName) {
|
|
29
|
+
const escaped = fieldName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
30
|
+
const row = raw.match(new RegExp(`^\\|\\s*${escaped}\\s*\\|\\s*([^|\\n]+?)\\s*\\|`, "im"));
|
|
31
|
+
return row?.[1]?.trim() ?? null;
|
|
32
|
+
}
|
|
33
|
+
function replaceExtensionTableField(raw, fieldName, value) {
|
|
34
|
+
const escaped = fieldName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
35
|
+
const pattern = new RegExp(`(^\\|\\s*${escaped}\\s*\\|\\s*)([^|\\n]*?)(\\s*\\|)`, "im");
|
|
36
|
+
if (!pattern.test(raw))
|
|
37
|
+
return null;
|
|
38
|
+
return raw.replace(pattern, `$1${value}$3`);
|
|
39
|
+
}
|
|
40
|
+
function appendExtensionTableField(raw, fieldName, value) {
|
|
41
|
+
return `${raw.trimEnd()}\n| ${fieldName} | ${value} |\n`;
|
|
42
|
+
}
|
|
43
|
+
export function readExtensionField(cwd, fieldName) {
|
|
44
|
+
const raw = readStateFile(cwd);
|
|
45
|
+
if (!raw)
|
|
46
|
+
return null;
|
|
47
|
+
return extractExtensionTableField(raw, fieldName);
|
|
48
|
+
}
|
|
49
|
+
export function readWorkflowKind(cwd) {
|
|
50
|
+
const kind = readExtensionField(cwd, "Workflow Kind")?.toLowerCase();
|
|
51
|
+
if (kind === "product")
|
|
52
|
+
return "product";
|
|
53
|
+
if (kind === "task")
|
|
54
|
+
return "task";
|
|
55
|
+
return kind ? kind : "task";
|
|
56
|
+
}
|
|
57
|
+
export function readVerifyOutcome(cwd) {
|
|
58
|
+
const path = planningArtifact(cwd, "VERIFY.md");
|
|
59
|
+
if (!existsSync(path))
|
|
60
|
+
return null;
|
|
61
|
+
const content = readFileSync(path, "utf8");
|
|
62
|
+
if (/verdict:\s*fail/i.test(content) || /status:\s*fail/i.test(content))
|
|
63
|
+
return "fail";
|
|
64
|
+
if (content.trim().length > 0)
|
|
65
|
+
return "pass";
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
export function canShip(cwd, depth) {
|
|
69
|
+
const state = readState(cwd);
|
|
70
|
+
if (state.phase !== "verify" && state.phase !== "review") {
|
|
71
|
+
return { allowed: false, reason: `phase is "${state.phase ?? "none"}" — call gsd_verify before gsd_ship` };
|
|
72
|
+
}
|
|
73
|
+
const verify = readVerifyOutcome(cwd);
|
|
74
|
+
if (verify === "fail") {
|
|
75
|
+
return { allowed: false, reason: "VERIFY.md indicates failure" };
|
|
76
|
+
}
|
|
77
|
+
if (depth !== "quick" && readPlanVerifyVerdict(cwd) !== "pass") {
|
|
78
|
+
return { allowed: false, reason: "plan-verify must pass before ship at standard/heavy depth" };
|
|
79
|
+
}
|
|
80
|
+
return { allowed: true };
|
|
81
|
+
}
|
|
82
|
+
export function buildGsdStatusPayload(cwd, depth) {
|
|
83
|
+
const state = readState(cwd);
|
|
84
|
+
const progressRaw = readProgress(cwd);
|
|
85
|
+
const phaseCount = progressRaw.phase_count;
|
|
86
|
+
const completedCount = progressRaw.completed_count;
|
|
87
|
+
const phasesRemaining = typeof phaseCount === "number" && typeof completedCount === "number"
|
|
88
|
+
? Math.max(0, phaseCount - completedCount)
|
|
89
|
+
: null;
|
|
90
|
+
return {
|
|
91
|
+
state,
|
|
92
|
+
progress: { ...progressRaw, phases_remaining: phasesRemaining },
|
|
93
|
+
gates: {
|
|
94
|
+
canExecute: canExecute(cwd, depth),
|
|
95
|
+
canShip: canShip(cwd, depth),
|
|
96
|
+
planVerifyVerdict: readPlanVerifyVerdict(cwd),
|
|
97
|
+
},
|
|
98
|
+
artifacts: {
|
|
99
|
+
planExists: existsSync(planningArtifact(cwd, "PLAN.md")),
|
|
100
|
+
planVerifyExists: existsSync(planningArtifact(cwd, "PLAN-VERIFY.md")),
|
|
101
|
+
verifyExists: existsSync(planningArtifact(cwd, "VERIFY.md")),
|
|
102
|
+
shipExists: existsSync(planningArtifact(cwd, "SHIP.md")),
|
|
103
|
+
phaseDir: latestPhaseDir(cwd),
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export function readState(cwd) {
|
|
108
|
+
const raw = readStateFile(cwd);
|
|
109
|
+
if (!raw) {
|
|
110
|
+
return { phase: null, depth: null, planVerified: false, raw: "" };
|
|
111
|
+
}
|
|
112
|
+
const doc = loadStateDocument();
|
|
113
|
+
const phaseRaw = extractExtensionTableField(raw, "Phase") ?? doc.stateExtractField(raw, "Phase");
|
|
114
|
+
const depth = extractExtensionTableField(raw, "Depth") ?? doc.stateExtractField(raw, "Depth");
|
|
115
|
+
const verifiedRaw = extractExtensionTableField(raw, "Plan Verified") ?? doc.stateExtractField(raw, "Plan Verified");
|
|
116
|
+
const phase = mapPhaseField(phaseRaw);
|
|
117
|
+
const planVerified = verifiedRaw?.toLowerCase() === "yes" || verifiedRaw?.toLowerCase() === "pass";
|
|
118
|
+
return { phase, depth, planVerified, raw };
|
|
119
|
+
}
|
|
120
|
+
export function setStateField(cwd, field, value) {
|
|
121
|
+
// gsd-core state-transition for milestone fields only — task Phase/Depth/Plan Verified use extension table.
|
|
122
|
+
const gsdCanonical = new Set(["Status", "status", "current_phase", "Current Phase"]);
|
|
123
|
+
if (gsdCanonical.has(field) && existsSync(planningArtifact(cwd, "STATE.md"))) {
|
|
124
|
+
const gsd = dispatchStateUpdate(cwd, field, value);
|
|
125
|
+
if (gsd.ok && gsd.data?.updated) {
|
|
126
|
+
return readState(cwd);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const raw = readStateFile(cwd);
|
|
130
|
+
const doc = loadStateDocument();
|
|
131
|
+
const base = raw || "# STATE\n\n| Field | Value |\n| --- | --- |\n";
|
|
132
|
+
const extensionFields = new Set([
|
|
133
|
+
"Phase",
|
|
134
|
+
"Depth",
|
|
135
|
+
"Plan Verified",
|
|
136
|
+
"Workflow Kind",
|
|
137
|
+
"Ideal Run",
|
|
138
|
+
"Milestone Phase Dir",
|
|
139
|
+
]);
|
|
140
|
+
let next = null;
|
|
141
|
+
if (extensionFields.has(field)) {
|
|
142
|
+
next = replaceExtensionTableField(base, field, value);
|
|
143
|
+
if (!next)
|
|
144
|
+
next = appendExtensionTableField(base, field, value);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
next = doc.stateReplaceField(base, field, value);
|
|
148
|
+
}
|
|
149
|
+
if (!next) {
|
|
150
|
+
console.error(`[gsd] setStateField could not update ${field} in STATE.md`);
|
|
151
|
+
return readState(cwd);
|
|
152
|
+
}
|
|
153
|
+
writeStateFile(cwd, next);
|
|
154
|
+
// STATE.md just changed on disk → drop cached subprocess reads so the next
|
|
155
|
+
// dispatch / readState-with-progress sees the new mtime bucket.
|
|
156
|
+
invalidateGsdCache(cwd);
|
|
157
|
+
return readState(cwd);
|
|
158
|
+
}
|
|
159
|
+
export function currentPhase(cwd) {
|
|
160
|
+
return readState(cwd).phase;
|
|
161
|
+
}
|
|
162
|
+
export function advancePhase(cwd, phase) {
|
|
163
|
+
return setStateField(cwd, "Phase", phase);
|
|
164
|
+
}
|
|
165
|
+
export function readProgress(cwd) {
|
|
166
|
+
const result = dispatchInitProgress(cwd);
|
|
167
|
+
if (result.ok && result.data) {
|
|
168
|
+
return result.data;
|
|
169
|
+
}
|
|
170
|
+
const stateJson = dispatchStateJson(cwd);
|
|
171
|
+
return {
|
|
172
|
+
state_exists: existsSync(planningArtifact(cwd, "STATE.md")),
|
|
173
|
+
...(stateJson.ok && stateJson.data ? { state_frontmatter: stateJson.data } : {}),
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
export function readPlanVerifyVerdict(cwd) {
|
|
177
|
+
const path = planningArtifact(cwd, "PLAN-VERIFY.md");
|
|
178
|
+
if (!existsSync(path))
|
|
179
|
+
return null;
|
|
180
|
+
const content = readFileSync(path, "utf8");
|
|
181
|
+
const match = content.match(/verdict:\s*(pass|revise|block)/i);
|
|
182
|
+
return match ? match[1].toLowerCase() : null;
|
|
183
|
+
}
|
|
184
|
+
export function canExecute(cwd, depth) {
|
|
185
|
+
if (depth === "quick")
|
|
186
|
+
return { allowed: true };
|
|
187
|
+
const verdict = readPlanVerifyVerdict(cwd);
|
|
188
|
+
if (verdict !== "pass") {
|
|
189
|
+
return {
|
|
190
|
+
allowed: false,
|
|
191
|
+
reason: verdict
|
|
192
|
+
? `plan-verify verdict is "${verdict}" — call gsd_plan_review before gsd_execute`
|
|
193
|
+
: "plan-verify pending — call gsd_plan_review before gsd_execute",
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
const state = readState(cwd);
|
|
197
|
+
if (state.phase && state.phase !== "execute" && depth !== "quick") {
|
|
198
|
+
return { allowed: false, reason: `STATE.md phase is "${state.phase}" — advance to execute after plan-verify pass` };
|
|
199
|
+
}
|
|
200
|
+
return { allowed: true };
|
|
201
|
+
}
|
|
202
|
+
export function syncWorkflowContext(cwd, sessionModelId, depth) {
|
|
203
|
+
ensurePlanningWorkspace(cwd, sessionModelId);
|
|
204
|
+
setStateField(cwd, "Depth", depth);
|
|
205
|
+
return readState(cwd);
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=workflow-engine.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ToolSet } from "ai";
|
|
2
|
+
import type { TaskRequest, ToolResult } from "../types/index.js";
|
|
3
|
+
export declare const GSD_WORKFLOW_TOOL_NAMES: readonly ["gsd_status", "gsd_discuss", "gsd_plan", "gsd_plan_review", "gsd_execute", "gsd_verify", "gsd_ship"];
|
|
4
|
+
export interface GsdWorkflowToolOpts {
|
|
5
|
+
cwd: string;
|
|
6
|
+
sessionModelId: string;
|
|
7
|
+
sessionId?: string;
|
|
8
|
+
depth?: string;
|
|
9
|
+
runTask?: (request: TaskRequest, abortSignal?: AbortSignal) => Promise<ToolResult>;
|
|
10
|
+
runDebate?: (topic: string) => Promise<string>;
|
|
11
|
+
}
|
|
12
|
+
export declare function shouldRegisterGsdTools(depth?: string): boolean;
|
|
13
|
+
export declare function registerGsdWorkflowTools(tools: ToolSet, opts: GsdWorkflowToolOpts): ToolSet;
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { dynamicTool, jsonSchema } from "ai";
|
|
4
|
+
import { ensurePlanningWorkspace } from "./config-bridge.js";
|
|
5
|
+
import { isGsdNativeEnabled } from "./flags.js";
|
|
6
|
+
import { getGsdLoopHost, loopHostContext, taskToRunPerspectiveFn } from "./loop-host.js";
|
|
7
|
+
import { planningArtifact } from "./paths.js";
|
|
8
|
+
import { runVerifyCouncil } from "./verify-council.js";
|
|
9
|
+
import { advancePhase, buildGsdStatusPayload, canExecute, canShip, readState, setStateField, } from "./workflow-engine.js";
|
|
10
|
+
export const GSD_WORKFLOW_TOOL_NAMES = [
|
|
11
|
+
"gsd_status",
|
|
12
|
+
"gsd_discuss",
|
|
13
|
+
"gsd_plan",
|
|
14
|
+
"gsd_plan_review",
|
|
15
|
+
"gsd_execute",
|
|
16
|
+
"gsd_verify",
|
|
17
|
+
"gsd_ship",
|
|
18
|
+
];
|
|
19
|
+
function json(data) {
|
|
20
|
+
return JSON.stringify(data, null, 2);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Adapts `taskToRunPerspectiveFn` (typed for plan-council `PlanPerspective`) to the verify
|
|
24
|
+
* council's `VerifyPerspective` shape. Safe: `resolveGsdPerspectiveAgent` only special-cases
|
|
25
|
+
* `id === "research"` (a plan-only id that never appears in `VerifyPerspectiveId`), so every
|
|
26
|
+
* verify perspective routes to the same "verify" subagent regardless of id — only the id
|
|
27
|
+
* value is threaded through for the task description string.
|
|
28
|
+
*/
|
|
29
|
+
function verifyRunPerspectiveFn(runTask, sessionModelId) {
|
|
30
|
+
const planFn = taskToRunPerspectiveFn(runTask, sessionModelId);
|
|
31
|
+
return (prompt, p) => planFn(prompt, p);
|
|
32
|
+
}
|
|
33
|
+
/** Best-effort implementation diff for the verify council. Empty on any failure — never throws. */
|
|
34
|
+
function readImplementationDiff(cwd) {
|
|
35
|
+
try {
|
|
36
|
+
return execFileSync("git", ["diff", "HEAD"], { cwd, encoding: "utf8", maxBuffer: 16 * 1024 * 1024 });
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
console.error(`[gsd] verify-council diff capture failed: ${err.message}`);
|
|
40
|
+
return "";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export function shouldRegisterGsdTools(depth) {
|
|
44
|
+
if (!isGsdNativeEnabled())
|
|
45
|
+
return false;
|
|
46
|
+
if (depth === "quick") {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
export function registerGsdWorkflowTools(tools, opts) {
|
|
52
|
+
if (!isGsdNativeEnabled())
|
|
53
|
+
return tools;
|
|
54
|
+
const depth = opts.depth ?? "standard";
|
|
55
|
+
const { cwd, sessionModelId, sessionId, runTask } = opts;
|
|
56
|
+
tools.gsd_status = dynamicTool({
|
|
57
|
+
description: "Read native GSD workflow progress: STATE.md phase, depth, plan-verify status, and gsd-tools init.progress summary. Use to orient mid-task. Pure read — does not advance phase or write STATE.md.",
|
|
58
|
+
inputSchema: jsonSchema({ type: "object", properties: {}, additionalProperties: false }),
|
|
59
|
+
execute: async () => {
|
|
60
|
+
// Pure read: bootstrap .planning/ only if absent (idempotent — no write when it exists).
|
|
61
|
+
// Turn-start sync (message-processor) handles depth/STATE writes; gsd_status must NOT
|
|
62
|
+
// mutate STATE.md mtime, or the dispatch cache (keyed on STATE mtime) would thrash.
|
|
63
|
+
ensurePlanningWorkspace(cwd, sessionModelId);
|
|
64
|
+
return json(buildGsdStatusPayload(cwd, depth));
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
tools.gsd_discuss = dynamicTool({
|
|
68
|
+
description: "Enter GSD discuss phase — surface ambiguities before planning. Sets STATE.md phase to discuss.",
|
|
69
|
+
inputSchema: jsonSchema({
|
|
70
|
+
type: "object",
|
|
71
|
+
properties: {
|
|
72
|
+
notes: { type: "string", description: "Gray-area notes to append" },
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
execute: async (input) => {
|
|
76
|
+
ensurePlanningWorkspace(cwd, sessionModelId);
|
|
77
|
+
const host = getGsdLoopHost();
|
|
78
|
+
host.ensureHost(cwd, sessionModelId);
|
|
79
|
+
advancePhase(cwd, "discuss");
|
|
80
|
+
await host.onDiscussComplete(loopHostContext(cwd, sessionModelId, depth, { phase: "discuss" }));
|
|
81
|
+
if (input.notes?.trim()) {
|
|
82
|
+
const ctxPath = planningArtifact(cwd, "CONTEXT.md");
|
|
83
|
+
const prior = existsSync(ctxPath) ? readFileSync(ctxPath, "utf8") : "# CONTEXT\n\n";
|
|
84
|
+
writeFileSync(ctxPath, `${prior}\n${input.notes.trim()}\n`, "utf8");
|
|
85
|
+
}
|
|
86
|
+
return json({ phase: "discuss", ok: true });
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
tools.gsd_plan = dynamicTool({
|
|
90
|
+
description: "Write PLAN.md for a multi-step task (leader-tier draft). Call before gsd_plan_review and gsd_execute.",
|
|
91
|
+
inputSchema: jsonSchema({
|
|
92
|
+
type: "object",
|
|
93
|
+
properties: {
|
|
94
|
+
body: { type: "string", description: "Full PLAN.md markdown body" },
|
|
95
|
+
},
|
|
96
|
+
required: ["body"],
|
|
97
|
+
}),
|
|
98
|
+
execute: async (input) => {
|
|
99
|
+
if (!input.body?.trim()) {
|
|
100
|
+
return json({ ok: false, error: "gsd_plan requires non-empty body" });
|
|
101
|
+
}
|
|
102
|
+
ensurePlanningWorkspace(cwd, sessionModelId);
|
|
103
|
+
writeFileSync(planningArtifact(cwd, "PLAN.md"), input.body.trim(), "utf8");
|
|
104
|
+
setStateField(cwd, "Plan Verified", "no");
|
|
105
|
+
advancePhase(cwd, "plan");
|
|
106
|
+
const host = getGsdLoopHost();
|
|
107
|
+
const ctx = loopHostContext(cwd, sessionModelId, depth, {
|
|
108
|
+
phase: "plan",
|
|
109
|
+
sessionId,
|
|
110
|
+
planBody: input.body.trim(),
|
|
111
|
+
planTitle: input.body
|
|
112
|
+
.trim()
|
|
113
|
+
.match(/^#\s+(.+)$/m)?.[1]
|
|
114
|
+
?.trim(),
|
|
115
|
+
});
|
|
116
|
+
await host.onPlanWritten(ctx);
|
|
117
|
+
return json({ ok: true, path: planningArtifact(cwd, "PLAN.md") });
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
if (depth !== "quick") {
|
|
121
|
+
tools.gsd_plan_review = dynamicTool({
|
|
122
|
+
description: "Run multi-perspective plan council (research + skeptic at standard; full council at heavy). Mandatory before gsd_execute at standard/heavy depth.",
|
|
123
|
+
inputSchema: jsonSchema({ type: "object", properties: {}, additionalProperties: false }),
|
|
124
|
+
execute: async () => {
|
|
125
|
+
const host = getGsdLoopHost();
|
|
126
|
+
const ctx = loopHostContext(cwd, sessionModelId, depth, {
|
|
127
|
+
sessionId,
|
|
128
|
+
runPerspectiveFn: runTask ? taskToRunPerspectiveFn(runTask, sessionModelId) : undefined,
|
|
129
|
+
runDebate: opts.runDebate,
|
|
130
|
+
});
|
|
131
|
+
await host.firePoint("plan:post", ctx);
|
|
132
|
+
const reviewResult = await host.firePoint("plan-review:post", ctx);
|
|
133
|
+
const state = readState(cwd);
|
|
134
|
+
return json({
|
|
135
|
+
planReview: reviewResult,
|
|
136
|
+
planVerified: state.planVerified,
|
|
137
|
+
phase: state.phase,
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
tools.gsd_execute = dynamicTool({
|
|
143
|
+
description: "Advance to execute phase after plan-verify pass. Does not run code itself — unlocks implement step in workflow state.",
|
|
144
|
+
inputSchema: jsonSchema({
|
|
145
|
+
type: "object",
|
|
146
|
+
properties: {
|
|
147
|
+
force: { type: "boolean", description: "Bypass plan-verify gate (yolo/debug only)" },
|
|
148
|
+
},
|
|
149
|
+
}),
|
|
150
|
+
execute: async (input) => {
|
|
151
|
+
const gate = canExecute(cwd, depth);
|
|
152
|
+
if (!gate.allowed && !input.force) {
|
|
153
|
+
return json({ blocked: true, reason: gate.reason });
|
|
154
|
+
}
|
|
155
|
+
const host = getGsdLoopHost();
|
|
156
|
+
const ctx = loopHostContext(cwd, sessionModelId, depth);
|
|
157
|
+
await host.onExecuteStart(ctx);
|
|
158
|
+
advancePhase(cwd, "execute");
|
|
159
|
+
return json({ blocked: false, phase: "execute" });
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
tools.gsd_verify = dynamicTool({
|
|
163
|
+
description: "Mark verify phase complete after tests/self-verify. Requires evidence when passed=true.",
|
|
164
|
+
inputSchema: jsonSchema({
|
|
165
|
+
type: "object",
|
|
166
|
+
properties: {
|
|
167
|
+
passed: { type: "boolean", description: "true when tests/self-verify passed" },
|
|
168
|
+
evidence: { type: "string", description: "Test/lint evidence summary (required when passed=true)" },
|
|
169
|
+
},
|
|
170
|
+
required: ["passed"],
|
|
171
|
+
additionalProperties: false,
|
|
172
|
+
}),
|
|
173
|
+
execute: async (input) => {
|
|
174
|
+
const passed = input.passed === true;
|
|
175
|
+
if (passed && !input.evidence?.trim()) {
|
|
176
|
+
return json({
|
|
177
|
+
ok: false,
|
|
178
|
+
error: "gsd_verify requires non-empty evidence when passed=true",
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
// Layer 2: council adjudication ONLY when the deterministic floor passed at non-quick
|
|
182
|
+
// depth. The council verdict OVERRIDES the model's self-reported `passed` — "tests green
|
|
183
|
+
// but doesn't meet the goal" is caught here. A `passed=false` floor never reaches the
|
|
184
|
+
// council (cheap: no LLM spend on an already-known failure).
|
|
185
|
+
let effectivePassed = passed;
|
|
186
|
+
let councilConcerns = [];
|
|
187
|
+
if (passed && depth !== "quick") {
|
|
188
|
+
try {
|
|
189
|
+
const diff = readImplementationDiff(cwd);
|
|
190
|
+
const council = await runVerifyCouncil({
|
|
191
|
+
cwd,
|
|
192
|
+
sessionModelId,
|
|
193
|
+
depth,
|
|
194
|
+
evidence: input.evidence?.trim(),
|
|
195
|
+
diff,
|
|
196
|
+
runPerspectiveFn: runTask ? verifyRunPerspectiveFn(runTask, sessionModelId) : undefined,
|
|
197
|
+
runDebate: opts.runDebate,
|
|
198
|
+
});
|
|
199
|
+
if (!council.skipped && council.verdict !== "pass") {
|
|
200
|
+
effectivePassed = false;
|
|
201
|
+
councilConcerns = council.concerns;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
catch (err) {
|
|
205
|
+
// Fail OPEN — a council wiring failure must not block a genuinely-passing verify;
|
|
206
|
+
// honor the deterministic floor's verdict. Log per No-Silent-Catch.
|
|
207
|
+
console.error(`[gsd] verify-council wiring failed, honoring deterministic floor: ${err.message}`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
const verdictLine = effectivePassed ? "verdict: pass" : "verdict: fail";
|
|
211
|
+
const concernBlock = councilConcerns.length
|
|
212
|
+
? `\n\n## Council concerns\n${councilConcerns.map((c) => `- ${c}`).join("\n")}`
|
|
213
|
+
: "";
|
|
214
|
+
if (input.evidence?.trim() || councilConcerns.length) {
|
|
215
|
+
writeFileSync(planningArtifact(cwd, "VERIFY.md"), `${verdictLine}\n\n${input.evidence?.trim() ?? ""}${concernBlock}\n`, "utf8");
|
|
216
|
+
}
|
|
217
|
+
const host = getGsdLoopHost();
|
|
218
|
+
const ctx = loopHostContext(cwd, sessionModelId, depth, {
|
|
219
|
+
sessionId,
|
|
220
|
+
verifyPassed: effectivePassed,
|
|
221
|
+
verifyEvidence: {
|
|
222
|
+
evidence: input.evidence?.trim(),
|
|
223
|
+
evidenceChars: input.evidence?.length ?? 0,
|
|
224
|
+
passed: effectivePassed,
|
|
225
|
+
},
|
|
226
|
+
});
|
|
227
|
+
const verifyResult = await host.onVerifyComplete(ctx);
|
|
228
|
+
return json({
|
|
229
|
+
ok: true,
|
|
230
|
+
phase: effectivePassed ? "review" : "debug",
|
|
231
|
+
passed: effectivePassed,
|
|
232
|
+
councilConcerns,
|
|
233
|
+
loop: verifyResult,
|
|
234
|
+
});
|
|
235
|
+
},
|
|
236
|
+
});
|
|
237
|
+
tools.gsd_ship = dynamicTool({
|
|
238
|
+
description: "Polish delivery after gsd_verify pass — writes .planning/SHIP.md. Call when task is ready to hand off.",
|
|
239
|
+
inputSchema: jsonSchema({
|
|
240
|
+
type: "object",
|
|
241
|
+
properties: {
|
|
242
|
+
notes: {
|
|
243
|
+
type: "array",
|
|
244
|
+
items: { type: "string" },
|
|
245
|
+
description: "Optional delivery notes (agent-supplied, unverified)",
|
|
246
|
+
},
|
|
247
|
+
commitMessage: {
|
|
248
|
+
type: "string",
|
|
249
|
+
description: "Suggested commit message (stored in SHIP.md only, no git)",
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
additionalProperties: false,
|
|
253
|
+
}),
|
|
254
|
+
execute: async (input) => {
|
|
255
|
+
const gate = canShip(cwd, depth);
|
|
256
|
+
if (!gate.allowed) {
|
|
257
|
+
return json({ blocked: true, reason: gate.reason });
|
|
258
|
+
}
|
|
259
|
+
const host = getGsdLoopHost();
|
|
260
|
+
const ctx = loopHostContext(cwd, sessionModelId, depth, {
|
|
261
|
+
sessionId,
|
|
262
|
+
shipNotes: input.notes,
|
|
263
|
+
commitMessage: input.commitMessage,
|
|
264
|
+
});
|
|
265
|
+
const shipResult = await host.onShipComplete(ctx);
|
|
266
|
+
advancePhase(cwd, "review");
|
|
267
|
+
return json({
|
|
268
|
+
ok: true,
|
|
269
|
+
phase: "review",
|
|
270
|
+
shipMdPath: planningArtifact(cwd, "SHIP.md"),
|
|
271
|
+
loop: shipResult,
|
|
272
|
+
});
|
|
273
|
+
},
|
|
274
|
+
});
|
|
275
|
+
return tools;
|
|
276
|
+
}
|
|
277
|
+
//# sourceMappingURL=workflow-tools.js.map
|
|
@@ -10,6 +10,10 @@ export function createCouncilAutoAnswerer(opts) {
|
|
|
10
10
|
"pil-acceptance": [],
|
|
11
11
|
"tool-loop-cap": [],
|
|
12
12
|
"safety-override": [],
|
|
13
|
+
// ask_user: no file queue — fall through to defaultAnswerFor, which returns
|
|
14
|
+
// the agent's FIRST option (index 0) or "" for a free-text ask. Index 0 is
|
|
15
|
+
// NOT a CLI recommendation, just first-listed; headless has no human.
|
|
16
|
+
"ask-user": [],
|
|
13
17
|
};
|
|
14
18
|
const preflightApprove = opts.file?.preflightApprove ?? true;
|
|
15
19
|
return {
|
package/dist/src/hooks/index.js
CHANGED
|
@@ -226,7 +226,7 @@ export async function executeEventHooks(input, cwd, _signal) {
|
|
|
226
226
|
.join(",");
|
|
227
227
|
if (pendingSha !== _lastRecallReminderSha) {
|
|
228
228
|
_lastRecallReminderSha = pendingSha;
|
|
229
|
-
recallReminder =
|
|
229
|
+
recallReminder = `↳ ${pending.length} unrated EE recall(s) — rate the one(s) you acted on when convenient (does not block the task; queued if the brain is down).\n${formatPendingReminder(pending, { max: 5 })}`;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
else {
|