@webpresso/agent-kit 3.1.28 → 3.2.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.
Potentially problematic release.
This version of @webpresso/agent-kit might be problematic. Click here for more details.
- package/README.md +53 -15
- package/bin/_run.js +179 -19
- package/catalog/AGENTS.md.tpl +6 -6
- package/catalog/agent/agents/implementer.md +45 -0
- package/catalog/agent/rules/ci-cost-local-first.md +139 -0
- package/catalog/agent/rules/ci-test-perf.md +5 -1
- package/catalog/agent/rules/cmd-execution.md +9 -0
- package/catalog/agent/rules/parallel-orchestration-quota.md +100 -0
- package/catalog/agent/rules/pre-implementation.md +30 -2
- package/catalog/agent/rules/supported-agent-clis.md +9 -0
- package/catalog/agent/rules/test-scan-perf.md +80 -0
- package/catalog/agent/rules/typescript-version.md +50 -0
- package/catalog/agent/rules/workflow-skills-routing.md +4 -2
- package/catalog/agent/skills/codex/SKILL.md +25 -1
- package/catalog/agent/skills/fix/SKILL.md +3 -0
- package/catalog/agent/skills/verify/SKILL.md +22 -2
- package/catalog/docs/templates/blueprint.md +1 -1
- package/dist/esm/audit/agents.js +1 -0
- package/dist/esm/audit/blueprint-lifecycle-sql.d.ts +12 -0
- package/dist/esm/audit/blueprint-lifecycle-sql.js +23 -2
- package/dist/esm/audit/blueprint-pr-coverage.js +72 -7
- package/dist/esm/audit/ci-guardrails-wiring.d.ts +22 -0
- package/dist/esm/audit/ci-guardrails-wiring.js +90 -0
- package/dist/esm/audit/ci-test-perf.js +30 -0
- package/dist/esm/audit/command-surface.js +4 -2
- package/dist/esm/audit/host-substitution-risk.d.ts +2 -0
- package/dist/esm/audit/host-substitution-risk.js +256 -0
- package/dist/esm/audit/registry.d.ts +4 -4
- package/dist/esm/audit/registry.js +11 -1
- package/dist/esm/audit/roadmap-links.js +6 -0
- package/dist/esm/audit/test-scan-perf.d.ts +18 -0
- package/dist/esm/audit/test-scan-perf.js +275 -0
- package/dist/esm/audit/toolchain-isolation.js +1 -2
- package/dist/esm/audit/typescript-version.d.ts +2 -0
- package/dist/esm/audit/typescript-version.js +123 -0
- package/dist/esm/blueprint/core/parser.js +43 -1
- package/dist/esm/blueprint/core/validation/criteria.d.ts +14 -0
- package/dist/esm/blueprint/core/validation/criteria.js +41 -2
- package/dist/esm/blueprint/core/validation/state.js +25 -14
- package/dist/esm/blueprint/db/migrations/run.js +4 -2
- package/dist/esm/blueprint/lifecycle/audit.d.ts +20 -0
- package/dist/esm/blueprint/lifecycle/audit.js +65 -10
- package/dist/esm/blueprint/lifecycle/canonicalize.d.ts +6 -0
- package/dist/esm/blueprint/lifecycle/canonicalize.js +135 -0
- package/dist/esm/blueprint/lifecycle/engine.d.ts +9 -0
- package/dist/esm/blueprint/lifecycle/engine.js +53 -6
- package/dist/esm/blueprint/lifecycle/local.d.ts +2 -1
- package/dist/esm/blueprint/lifecycle/local.js +19 -3
- package/dist/esm/blueprint/lifecycle/review-provenance.d.ts +6 -0
- package/dist/esm/blueprint/lifecycle/review-provenance.js +118 -12
- package/dist/esm/blueprint/markdown/helpers.js +6 -2
- package/dist/esm/blueprint/service/BlueprintCreationService.d.ts +1 -0
- package/dist/esm/blueprint/service/BlueprintCreationService.js +53 -4
- package/dist/esm/blueprint/service/blueprint-tech-debt-links.js +16 -2
- package/dist/esm/blueprint/trust/command-runner.d.ts +26 -0
- package/dist/esm/blueprint/trust/command-runner.js +148 -0
- package/dist/esm/blueprint/trust/gates.d.ts +7 -0
- package/dist/esm/blueprint/trust/gates.js +20 -0
- package/dist/esm/blueprint/trust/promotion.d.ts +8 -0
- package/dist/esm/blueprint/trust/promotion.js +62 -112
- package/dist/esm/blueprint/trust/scaffold.d.ts +19 -0
- package/dist/esm/blueprint/trust/scaffold.js +64 -0
- package/dist/esm/blueprint/trust/validator.d.ts +1 -0
- package/dist/esm/blueprint/trust/validator.js +7 -1
- package/dist/esm/blueprint/utils/archive.js +27 -5
- package/dist/esm/blueprint/utils/document-paths.d.ts +18 -0
- package/dist/esm/blueprint/utils/document-paths.js +45 -12
- package/dist/esm/build/cli-mcp-parity.js +10 -0
- package/dist/esm/ci/act-replay.js +110 -7
- package/dist/esm/ci/act-runner.d.ts +4 -0
- package/dist/esm/ci/act-runner.js +85 -26
- package/dist/esm/ci/act-worktree-git.d.ts +11 -0
- package/dist/esm/ci/act-worktree-git.js +219 -0
- package/dist/esm/cli/bundle/commands/blueprint.d.ts +1 -0
- package/dist/esm/cli/bundle/commands/blueprint.js +1 -0
- package/dist/esm/cli/cli.d.ts +1 -1
- package/dist/esm/cli/cli.js +34 -0
- package/dist/esm/cli/commands/agent-launch.d.ts +6 -1
- package/dist/esm/cli/commands/agent-launch.js +82 -4
- package/dist/esm/cli/commands/audit-core.d.ts +1 -1
- package/dist/esm/cli/commands/audit-core.js +8 -1
- package/dist/esm/cli/commands/audit.js +20 -5
- package/dist/esm/cli/commands/blueprint/execution.js +18 -6
- package/dist/esm/cli/commands/blueprint/mutations.js +83 -47
- package/dist/esm/cli/commands/blueprint/router-dispatch.d.ts +2 -1
- package/dist/esm/cli/commands/blueprint/router-dispatch.js +20 -1
- package/dist/esm/cli/commands/blueprint/router-output.d.ts +21 -0
- package/dist/esm/cli/commands/blueprint/router-output.js +48 -17
- package/dist/esm/cli/commands/blueprint/router.d.ts +7 -0
- package/dist/esm/cli/commands/blueprint/router.js +40 -3
- package/dist/esm/cli/commands/ci-preflight.d.ts +13 -2
- package/dist/esm/cli/commands/ci-preflight.js +6 -3
- package/dist/esm/cli/commands/ci.d.ts +8 -1
- package/dist/esm/cli/commands/ci.js +80 -21
- package/dist/esm/cli/commands/compile.js +5 -31
- package/dist/esm/cli/commands/dash/delivery-status.d.ts +1 -0
- package/dist/esm/cli/commands/dash/delivery-status.js +11 -4
- package/dist/esm/cli/commands/dash/keymap.js +1 -0
- package/dist/esm/cli/commands/dash/launch-preferences.d.ts +15 -0
- package/dist/esm/cli/commands/dash/launch-preferences.js +46 -17
- package/dist/esm/cli/commands/dash/plan-once-label.d.ts +7 -0
- package/dist/esm/cli/commands/dash/plan-once-label.js +5 -0
- package/dist/esm/cli/commands/dash/plan-once-membership.d.ts +67 -0
- package/dist/esm/cli/commands/dash/plan-once-membership.js +151 -0
- package/dist/esm/cli/commands/dash/plan-once-merge.d.ts +143 -0
- package/dist/esm/cli/commands/dash/plan-once-merge.js +238 -0
- package/dist/esm/cli/commands/dash/plan-once.d.ts +22 -2
- package/dist/esm/cli/commands/dash/plan-once.js +41 -4
- package/dist/esm/cli/commands/dash/tui/attention-hud.d.ts +9 -0
- package/dist/esm/cli/commands/dash/tui/attention-hud.js +9 -0
- package/dist/esm/cli/commands/dash/tui/chat-bridge.d.ts +41 -0
- package/dist/esm/cli/commands/dash/tui/chat-bridge.js +73 -0
- package/dist/esm/cli/commands/dash/tui/chat-mode.d.ts +47 -0
- package/dist/esm/cli/commands/dash/tui/chat-mode.js +98 -0
- package/dist/esm/cli/commands/dash/tui/frame.d.ts +3 -0
- package/dist/esm/cli/commands/dash/tui/frame.js +3 -1
- package/dist/esm/cli/commands/dash/tui/palette.d.ts +1 -1
- package/dist/esm/cli/commands/dash/tui/palette.js +14 -0
- package/dist/esm/cli/commands/dash/tui/runtime.js +239 -4
- package/dist/esm/cli/commands/dash/tui/state.d.ts +41 -0
- package/dist/esm/cli/commands/dash/tui/state.js +257 -4
- package/dist/esm/cli/commands/doctor.js +5 -0
- package/dist/esm/cli/commands/format.js +0 -2
- package/dist/esm/cli/commands/hook.d.ts +5 -0
- package/dist/esm/cli/commands/hook.js +15 -9
- package/dist/esm/cli/commands/init/config.d.ts +0 -1
- package/dist/esm/cli/commands/init/config.js +3 -6
- package/dist/esm/cli/commands/init/convergence-apply.d.ts +24 -0
- package/dist/esm/cli/commands/init/convergence-apply.js +221 -0
- package/dist/esm/cli/commands/init/convergence-state.d.ts +13 -0
- package/dist/esm/cli/commands/init/convergence-state.js +54 -0
- package/dist/esm/cli/commands/init/convergence.d.ts +23 -0
- package/dist/esm/cli/commands/init/convergence.js +57 -0
- package/dist/esm/cli/commands/init/git-convergence.d.ts +19 -0
- package/dist/esm/cli/commands/init/git-convergence.js +168 -0
- package/dist/esm/cli/commands/init/gitignore-patcher.js +2 -0
- package/dist/esm/cli/commands/init/grok-privacy-smoke.d.ts +52 -0
- package/dist/esm/cli/commands/init/grok-privacy-smoke.js +91 -0
- package/dist/esm/cli/commands/init/host-native-proof.d.ts +18 -0
- package/dist/esm/cli/commands/init/host-native-proof.js +88 -0
- package/dist/esm/cli/commands/init/host-visibility.d.ts +2 -2
- package/dist/esm/cli/commands/init/host-visibility.js +94 -5
- package/dist/esm/cli/commands/init/index.d.ts +1 -0
- package/dist/esm/cli/commands/init/index.js +326 -173
- package/dist/esm/cli/commands/init/mcp-spec.d.ts +57 -0
- package/dist/esm/cli/commands/init/mcp-spec.js +273 -0
- package/dist/esm/cli/commands/init/merge.d.ts +1 -0
- package/dist/esm/cli/commands/init/merge.js +30 -1
- package/dist/esm/cli/commands/init/plugin-cache-prune.d.ts +0 -3
- package/dist/esm/cli/commands/init/plugin-cache-prune.js +0 -1
- package/dist/esm/cli/commands/init/scaffold-agents-md.d.ts +1 -1
- package/dist/esm/cli/commands/init/scaffold-agents-md.js +9 -3
- package/dist/esm/cli/commands/init/scaffold-base-kit.d.ts +11 -0
- package/dist/esm/cli/commands/init/scaffold-base-kit.js +56 -1
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/emitters/claude.d.ts +5 -6
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/emitters/claude.js +6 -13
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/emitters/grok.d.ts +14 -8
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/emitters/grok.js +41 -24
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/index.d.ts +2 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/index.js +51 -23
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/ir.d.ts +0 -2
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/ir.js +0 -2
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/merge.d.ts +6 -3
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/merge.js +39 -26
- package/dist/esm/cli/commands/init/scaffolders/codex-mcp/index.d.ts +12 -31
- package/dist/esm/cli/commands/init/scaffolders/codex-mcp/index.js +297 -173
- package/dist/esm/cli/commands/init/scaffolders/file-transaction.d.ts +7 -0
- package/dist/esm/cli/commands/init/scaffolders/file-transaction.js +58 -0
- package/dist/esm/cli/commands/init/scaffolders/grok-mcp/index.d.ts +38 -0
- package/dist/esm/cli/commands/init/scaffolders/grok-mcp/index.js +73 -0
- package/dist/esm/cli/commands/init/scaffolders/opencode-plugin/index.d.ts +21 -0
- package/dist/esm/cli/commands/init/scaffolders/opencode-plugin/index.js +559 -63
- package/dist/esm/cli/commands/init/untracked-collision.d.ts +14 -0
- package/dist/esm/cli/commands/init/untracked-collision.js +42 -0
- package/dist/esm/cli/commands/logs.d.ts +15 -0
- package/dist/esm/cli/commands/logs.js +192 -3
- package/dist/esm/cli/commands/opencode-rotate.d.ts +49 -0
- package/dist/esm/cli/commands/opencode-rotate.js +135 -0
- package/dist/esm/cli/commands/public-readiness.d.ts +11 -0
- package/dist/esm/cli/commands/public-readiness.js +42 -0
- package/dist/esm/cli/commands/quality-log-store.d.ts +1 -0
- package/dist/esm/cli/commands/quality-log-store.js +187 -51
- package/dist/esm/cli/commands/review.d.ts +35 -3
- package/dist/esm/cli/commands/review.js +734 -217
- package/dist/esm/cli/commands/run-wait.d.ts +2 -0
- package/dist/esm/cli/commands/run-wait.js +122 -0
- package/dist/esm/cli/commands/secrets.d.ts +1 -0
- package/dist/esm/cli/commands/secrets.js +4 -1
- package/dist/esm/cli/commands/setup-help.js +1 -1
- package/dist/esm/cli/commands/setup-repair-help.js +1 -1
- package/dist/esm/cli/commands/worktree/router-dispatch.js +13 -8
- package/dist/esm/cli/direct-provider-launch.js +31 -3
- package/dist/esm/cli/optional-tool-freshness.d.ts +27 -0
- package/dist/esm/cli/optional-tool-freshness.js +219 -9
- package/dist/esm/daemon/domains/git-actions.d.ts +29 -0
- package/dist/esm/daemon/domains/git-actions.js +136 -0
- package/dist/esm/daemon/domains/run-registry-interop.d.ts +16 -0
- package/dist/esm/daemon/domains/run-registry-interop.js +45 -0
- package/dist/esm/daemon/domains/sessions-search.d.ts +11 -0
- package/dist/esm/daemon/domains/sessions-search.js +29 -0
- package/dist/esm/daemon/handlers/blueprints-handlers.d.ts +5 -0
- package/dist/esm/daemon/handlers/blueprints-handlers.js +36 -0
- package/dist/esm/daemon/handlers/deploy-handlers.d.ts +6 -0
- package/dist/esm/daemon/handlers/deploy-handlers.js +5 -0
- package/dist/esm/daemon/handlers/fleet-handlers.d.ts +15 -0
- package/dist/esm/daemon/handlers/fleet-handlers.js +91 -0
- package/dist/esm/daemon/handlers/git-handlers.d.ts +6 -0
- package/dist/esm/daemon/handlers/git-handlers.js +27 -0
- package/dist/esm/daemon/handlers/product.d.ts +7 -0
- package/dist/esm/daemon/handlers/product.js +10 -119
- package/dist/esm/daemon/handlers/sessions-handlers.d.ts +12 -0
- package/dist/esm/daemon/handlers/sessions-handlers.js +31 -0
- package/dist/esm/daemon/handlers/shared.d.ts +5 -0
- package/dist/esm/daemon/handlers/shared.js +16 -0
- package/dist/esm/daemon/methods.d.ts +8 -1
- package/dist/esm/daemon/methods.js +7 -0
- package/dist/esm/daemon/protocol/contract.d.ts +43 -0
- package/dist/esm/daemon/protocol/contract.js +26 -0
- package/dist/esm/daemon/protocol/index.d.ts +1 -1
- package/dist/esm/daemon/protocol/index.js +1 -1
- package/dist/esm/hooks/__conformance__/matrix.d.ts +6 -0
- package/dist/esm/hooks/__conformance__/matrix.js +137 -0
- package/dist/esm/hooks/conformance/batch.js +5 -0
- package/dist/esm/hooks/doctor.d.ts +15 -0
- package/dist/esm/hooks/doctor.js +79 -8
- package/dist/esm/hooks/permission-request/index.js +9 -3
- package/dist/esm/hooks/permission-request/policy.d.ts +9 -0
- package/dist/esm/hooks/permission-request/policy.js +13 -0
- package/dist/esm/hooks/pretool-guard/dev-routing.d.ts +9 -0
- package/dist/esm/hooks/pretool-guard/dev-routing.js +41 -5
- package/dist/esm/hooks/pretool-guard/logger.d.ts +7 -0
- package/dist/esm/hooks/pretool-guard/logger.js +16 -0
- package/dist/esm/hooks/pretool-guard/runner.d.ts +6 -0
- package/dist/esm/hooks/pretool-guard/runner.js +68 -16
- package/dist/esm/hooks/pretool-guard/validators/blueprint.js +30 -10
- package/dist/esm/hooks/pretool-guard/validators/forbidden-commands.js +58 -4
- package/dist/esm/hooks/pretool-guard/validators/index.d.ts +7 -0
- package/dist/esm/hooks/pretool-guard/validators/index.js +21 -0
- package/dist/esm/hooks/pretool-guard/validators/mcp-redirect.d.ts +0 -1
- package/dist/esm/hooks/pretool-guard/validators/mcp-redirect.js +8 -5
- package/dist/esm/hooks/pretool-guard/validators/path-contract.d.ts +19 -0
- package/dist/esm/hooks/pretool-guard/validators/path-contract.js +25 -8
- package/dist/esm/hooks/pretool-guard/validators/worktree-discipline.d.ts +9 -7
- package/dist/esm/hooks/pretool-guard/validators/worktree-discipline.js +126 -14
- package/dist/esm/hooks/shared/guard-outcome.d.ts +149 -0
- package/dist/esm/hooks/shared/guard-outcome.js +215 -0
- package/dist/esm/hooks/shared/hook-bootstrap.d.ts +26 -0
- package/dist/esm/hooks/shared/hook-bootstrap.js +64 -1
- package/dist/esm/hooks/shared/types.d.ts +8 -5
- package/dist/esm/hooks/shared/types.js +23 -8
- package/dist/esm/hooks/stop/qa-changed-files.d.ts +11 -0
- package/dist/esm/hooks/stop/qa-changed-files.js +74 -0
- package/dist/esm/mcp/blueprint/_shared/lifecycle.js +14 -1
- package/dist/esm/mcp/blueprint/handlers/document-mutations.js +78 -4
- package/dist/esm/mcp/blueprint/handlers/review-log.js +8 -1
- package/dist/esm/mcp/blueprint/handlers/task-advance.js +113 -54
- package/dist/esm/mcp/blueprint/handlers/task-verify.js +39 -19
- package/dist/esm/mcp/blueprint/registration.js +3 -2
- package/dist/esm/mcp/server.d.ts +1 -0
- package/dist/esm/mcp/server.js +27 -0
- package/dist/esm/mcp/tools/_names.d.ts +1 -1
- package/dist/esm/mcp/tools/_names.js +5 -0
- package/dist/esm/mcp/tools/_registry.js +10 -0
- package/dist/esm/mcp/tools/_shared/audit-kinds.d.ts +1 -1
- package/dist/esm/mcp/tools/_shared/result.js +44 -1
- package/dist/esm/mcp/tools/audit.d.ts +5 -1
- package/dist/esm/mcp/tools/audit.js +40 -0
- package/dist/esm/mcp/tools/audits.d.ts +4 -0
- package/dist/esm/mcp/tools/ci-act.js +9 -11
- package/dist/esm/mcp/tools/ci-preflight.d.ts +50 -0
- package/dist/esm/mcp/tools/ci-preflight.js +183 -0
- package/dist/esm/mcp/tools/pr-upsert.js +39 -1
- package/dist/esm/mcp/tools/review-run.d.ts +28 -0
- package/dist/esm/mcp/tools/review-run.js +216 -0
- package/dist/esm/mcp/tools/run-wait.d.ts +86 -0
- package/dist/esm/mcp/tools/run-wait.js +593 -0
- package/dist/esm/mcp/tools/session-id.d.ts +3 -0
- package/dist/esm/mcp/tools/session-id.js +45 -0
- package/dist/esm/mcp/tools/session-info.d.ts +3 -0
- package/dist/esm/mcp/tools/session-info.js +49 -0
- package/dist/esm/output-transforms/audit.d.ts +23 -0
- package/dist/esm/output-transforms/audit.js +47 -0
- package/dist/esm/output-transforms/index.js +2 -0
- package/dist/esm/paths/state-root.js +3 -0
- package/dist/esm/review/authority.js +30 -7
- package/dist/esm/review/availability.d.ts +22 -0
- package/dist/esm/review/availability.js +123 -23
- package/dist/esm/review/delivery-verifier.d.ts +27 -0
- package/dist/esm/review/delivery-verifier.js +115 -0
- package/dist/esm/review/events.d.ts +3 -2
- package/dist/esm/review/events.js +23 -3
- package/dist/esm/review/execution/adapters.js +26 -9
- package/dist/esm/review/execution/output-policy.d.ts +2 -0
- package/dist/esm/review/execution/output-policy.js +12 -0
- package/dist/esm/review/execution/review-checkout.js +87 -6
- package/dist/esm/review/execution/supervisor.js +5 -0
- package/dist/esm/review/execution/types.d.ts +8 -0
- package/dist/esm/review/opencode-account.d.ts +24 -0
- package/dist/esm/review/opencode-account.js +68 -0
- package/dist/esm/review/opencode-auth.d.ts +33 -0
- package/dist/esm/review/opencode-auth.js +79 -0
- package/dist/esm/review/subject.d.ts +27 -0
- package/dist/esm/review/subject.js +179 -32
- package/dist/esm/runtime/executor.d.ts +1 -0
- package/dist/esm/runtime/executor.js +2 -1
- package/dist/esm/runtime/opencode-account-materializer.d.ts +34 -0
- package/dist/esm/runtime/opencode-account-materializer.js +33 -0
- package/dist/esm/secret-gate/runner.d.ts +1 -0
- package/dist/esm/secret-gate/runner.js +4 -1
- package/dist/esm/status/snapshot.js +30 -19
- package/dist/esm/test/duration-sequencer.d.ts +20 -0
- package/dist/esm/test/duration-sequencer.js +54 -0
- package/dist/esm/test/shard-durations.json +922 -0
- package/dist/esm/test/worker-budget.d.ts +6 -0
- package/dist/esm/test/worker-budget.js +59 -1
- package/dist/esm/test-helpers/global-setup.d.ts +1 -1
- package/dist/esm/test-helpers/global-setup.js +68 -24
- package/dist/esm/ultragoal/service.d.ts +7 -0
- package/dist/esm/ultragoal/service.js +42 -2
- package/dist/esm/utils/write-json-file.js +3 -1
- package/dist/esm/worktrees/codex-project-trust.d.ts +15 -0
- package/dist/esm/worktrees/codex-project-trust.js +56 -0
- package/dist/esm/worktrees/current.d.ts +1 -0
- package/dist/esm/worktrees/current.js +1 -0
- package/dist/esm/worktrees/project-agent-surfaces.d.ts +1 -0
- package/dist/esm/worktrees/project-agent-surfaces.js +2 -1
- package/dist/esm/worktrees/registry.d.ts +8 -0
- package/dist/esm/worktrees/registry.js +18 -3
- package/package.json +18 -15
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
-
import {
|
|
1
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
+
import { createWriteStream, mkdirSync, openSync, readdirSync, readFileSync, statSync, renameSync, utimesSync, rmSync, writeFileSync, } from "node:fs";
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
|
-
import { dirname, join } from "node:path";
|
|
4
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
5
5
|
import { getSurfacePath } from "#paths/state-root.js";
|
|
6
6
|
import { readTrustedJsonFile } from "#shared-utils/read-json-file.js";
|
|
7
7
|
import { shortId } from "#shared-utils/short-id.js";
|
|
@@ -16,6 +16,7 @@ export const CLI_LOG_COMMANDS = [
|
|
|
16
16
|
"format",
|
|
17
17
|
];
|
|
18
18
|
const ORPHAN_LOG_GRACE_MS = 60_000;
|
|
19
|
+
const INDEX_LOCK_STALE_MS = 5_000;
|
|
19
20
|
export function isCliLogCommandName(value) {
|
|
20
21
|
return CLI_LOG_COMMANDS.includes(value);
|
|
21
22
|
}
|
|
@@ -63,39 +64,39 @@ function openCliLogSink(commandDir, command, cwd) {
|
|
|
63
64
|
stream.write(chunk);
|
|
64
65
|
},
|
|
65
66
|
async finalize(metadata) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
reject(streamError);
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
rejectPendingFinalize = reject;
|
|
72
|
-
stream.end(() => {
|
|
73
|
-
rejectPendingFinalize = undefined;
|
|
67
|
+
try {
|
|
68
|
+
await new Promise((resolve, reject) => {
|
|
74
69
|
if (streamError) {
|
|
75
70
|
reject(streamError);
|
|
76
71
|
return;
|
|
77
72
|
}
|
|
78
|
-
|
|
73
|
+
rejectPendingFinalize = reject;
|
|
74
|
+
stream.end(() => {
|
|
75
|
+
rejectPendingFinalize = undefined;
|
|
76
|
+
if (streamError) {
|
|
77
|
+
reject(streamError);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
resolve();
|
|
81
|
+
});
|
|
79
82
|
});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
};
|
|
90
|
-
try {
|
|
83
|
+
const entry = {
|
|
84
|
+
id,
|
|
85
|
+
command,
|
|
86
|
+
timestamp: metadata.timestamp ?? new Date().toISOString(),
|
|
87
|
+
exitCode: metadata.exitCode,
|
|
88
|
+
logPath: absoluteLogPath,
|
|
89
|
+
...(metadata.options ? { options: metadata.options } : {}),
|
|
90
|
+
...(metadata.summary ? { summary: metadata.summary } : {}),
|
|
91
|
+
};
|
|
91
92
|
markLogRecentlyFinalized(absoluteLogPath);
|
|
92
93
|
// Index/lock live next to the log file so fallback dirs stay consistent.
|
|
93
94
|
writeLogEntryInDir(entry, commandDir);
|
|
95
|
+
return entry;
|
|
94
96
|
}
|
|
95
97
|
finally {
|
|
96
98
|
rmSync(activeMarkerPath, { force: true });
|
|
97
99
|
}
|
|
98
|
-
return entry;
|
|
99
100
|
},
|
|
100
101
|
};
|
|
101
102
|
}
|
|
@@ -113,7 +114,7 @@ export function createCliLogSink(command, cwd = process.cwd()) {
|
|
|
113
114
|
catch (error) {
|
|
114
115
|
if (!isUnwritableFsError(error))
|
|
115
116
|
throw error;
|
|
116
|
-
const fallbackDir =
|
|
117
|
+
const fallbackDir = getFallbackCommandLogDir(command, cwd);
|
|
117
118
|
const code = typeof error === "object" && error !== null && "code" in error
|
|
118
119
|
? String(error.code)
|
|
119
120
|
: "unknown";
|
|
@@ -122,13 +123,37 @@ export function createCliLogSink(command, cwd = process.cwd()) {
|
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
export function readCliLogEntries(command, cwd = process.cwd()) {
|
|
125
|
-
const
|
|
126
|
+
const entries = [
|
|
127
|
+
...readCliLogEntriesFromCommandDir(command, getCommandLogDir(command, cwd)),
|
|
128
|
+
...readCliLogEntriesFromCommandDir(command, getFallbackCommandLogDir(command, cwd)),
|
|
129
|
+
];
|
|
130
|
+
const byLogPath = new Map();
|
|
131
|
+
for (const entry of entries) {
|
|
132
|
+
byLogPath.set(entry.logPath, entry);
|
|
133
|
+
}
|
|
134
|
+
return [...byLogPath.values()]
|
|
135
|
+
.sort((a, b) => {
|
|
136
|
+
if (a.active === true && b.active !== true)
|
|
137
|
+
return -1;
|
|
138
|
+
if (b.active === true && a.active !== true)
|
|
139
|
+
return 1;
|
|
140
|
+
return b.timestamp.localeCompare(a.timestamp);
|
|
141
|
+
})
|
|
142
|
+
.slice(0, 10);
|
|
143
|
+
}
|
|
144
|
+
function readCliLogEntriesFromCommandDir(command, commandDir) {
|
|
145
|
+
const activeEntries = readActiveCliLogEntriesFromDir(command, commandDir);
|
|
146
|
+
const indexPath = join(commandDir, "index.json");
|
|
126
147
|
try {
|
|
127
148
|
const parsed = readTrustedJsonFile(indexPath);
|
|
128
|
-
|
|
149
|
+
const finalizedEntries = Array.isArray(parsed.entries) ? parsed.entries : [];
|
|
150
|
+
return [
|
|
151
|
+
...activeEntries,
|
|
152
|
+
...finalizedEntries.filter((entry) => !activeEntries.some((active) => active.id === entry.id)),
|
|
153
|
+
].slice(0, 10);
|
|
129
154
|
}
|
|
130
155
|
catch {
|
|
131
|
-
return
|
|
156
|
+
return activeEntries;
|
|
132
157
|
}
|
|
133
158
|
}
|
|
134
159
|
export function readCliLogEntry(command, ordinal = 1, cwd = process.cwd()) {
|
|
@@ -146,6 +171,45 @@ function readCliLogEntriesFromDir(commandDir) {
|
|
|
146
171
|
return [];
|
|
147
172
|
}
|
|
148
173
|
}
|
|
174
|
+
function readActiveCliLogEntriesFromDir(command, commandDir) {
|
|
175
|
+
let files;
|
|
176
|
+
try {
|
|
177
|
+
files = readdirSync(commandDir);
|
|
178
|
+
}
|
|
179
|
+
catch {
|
|
180
|
+
return [];
|
|
181
|
+
}
|
|
182
|
+
return files
|
|
183
|
+
.filter((file) => file.endsWith(".log.active"))
|
|
184
|
+
.map((file) => readActiveCliLogEntryFromMarker(command, join(commandDir, file)))
|
|
185
|
+
.filter((entry) => entry !== null)
|
|
186
|
+
.sort((a, b) => b.timestamp.localeCompare(a.timestamp));
|
|
187
|
+
}
|
|
188
|
+
function readActiveCliLogEntryFromMarker(command, markerPath) {
|
|
189
|
+
try {
|
|
190
|
+
const markerStat = statSync(markerPath);
|
|
191
|
+
const marker = readFileSync(markerPath, "utf8");
|
|
192
|
+
const id = basename(markerPath).slice(0, -".log.active".length);
|
|
193
|
+
if (!id)
|
|
194
|
+
return null;
|
|
195
|
+
const markerLines = marker.split("\n");
|
|
196
|
+
const live = isActiveMarkerSnapshotLive(marker, markerStat.mtimeMs);
|
|
197
|
+
return {
|
|
198
|
+
id,
|
|
199
|
+
command,
|
|
200
|
+
timestamp: markerLines[1]?.trim() || new Date(markerStat.mtimeMs).toISOString(),
|
|
201
|
+
exitCode: -1,
|
|
202
|
+
logPath: markerPath.slice(0, -".active".length),
|
|
203
|
+
...(live ? { active: true } : {}),
|
|
204
|
+
summary: live ? "active log" : "orphaned log from exited process",
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
catch (error) {
|
|
208
|
+
if (isMissingFileError(error))
|
|
209
|
+
return null;
|
|
210
|
+
throw error;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
149
213
|
function writeLogEntryInDir(entry, commandDir) {
|
|
150
214
|
withCommandIndexLockInDir(commandDir, () => {
|
|
151
215
|
const indexPath = join(commandDir, "index.json");
|
|
@@ -169,28 +233,86 @@ function writeLogEntryInDir(entry, commandDir) {
|
|
|
169
233
|
}
|
|
170
234
|
function withCommandIndexLockInDir(commandDir, fn) {
|
|
171
235
|
mkdirSync(commandDir, { recursive: true });
|
|
172
|
-
const
|
|
236
|
+
const lockDir = join(commandDir, "index.lock.d");
|
|
237
|
+
mkdirSync(lockDir, { recursive: true });
|
|
238
|
+
const ownerPath = join(lockDir, `${Date.now()}-${process.pid}-${randomUUID()}.owner`);
|
|
239
|
+
writeFileSync(ownerPath, `${process.pid}\n${new Date().toISOString()}\n`, {
|
|
240
|
+
encoding: "utf8",
|
|
241
|
+
flag: "wx",
|
|
242
|
+
});
|
|
173
243
|
const started = Date.now();
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
catch (error) {
|
|
180
|
-
if (!isFileExistsError(error))
|
|
181
|
-
throw error;
|
|
182
|
-
if (Date.now() - started > 5_000) {
|
|
183
|
-
throw new Error(`Timed out waiting for CLI log index lock: ${lockPath}`);
|
|
244
|
+
try {
|
|
245
|
+
while (!isCurrentIndexLockOwner(lockDir, ownerPath)) {
|
|
246
|
+
if (Date.now() - started > INDEX_LOCK_STALE_MS) {
|
|
247
|
+
throw new Error(`Timed out waiting for CLI log index lock: ${lockDir}`);
|
|
184
248
|
}
|
|
185
249
|
sleepSync(10);
|
|
186
250
|
}
|
|
187
|
-
}
|
|
188
|
-
try {
|
|
189
251
|
return fn();
|
|
190
252
|
}
|
|
191
253
|
finally {
|
|
192
|
-
|
|
193
|
-
|
|
254
|
+
rmSync(ownerPath, { force: true });
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function isCurrentIndexLockOwner(lockDir, ownerPath) {
|
|
258
|
+
const liveOwners = readLiveIndexLockOwners(lockDir);
|
|
259
|
+
const firstOwner = liveOwners[0];
|
|
260
|
+
if (firstOwner === undefined)
|
|
261
|
+
return false;
|
|
262
|
+
return firstOwner.path === ownerPath;
|
|
263
|
+
}
|
|
264
|
+
function readLiveIndexLockOwners(lockDir) {
|
|
265
|
+
let files;
|
|
266
|
+
try {
|
|
267
|
+
files = readdirSync(lockDir);
|
|
268
|
+
}
|
|
269
|
+
catch (error) {
|
|
270
|
+
if (isMissingFileError(error))
|
|
271
|
+
return [];
|
|
272
|
+
throw error;
|
|
273
|
+
}
|
|
274
|
+
return files
|
|
275
|
+
.filter((file) => file.endsWith(".owner"))
|
|
276
|
+
.map((file) => readIndexLockOwner(join(lockDir, file)))
|
|
277
|
+
.filter((owner) => owner !== null)
|
|
278
|
+
.sort((a, b) => a.timestampMs - b.timestampMs || a.path.localeCompare(b.path));
|
|
279
|
+
}
|
|
280
|
+
function readIndexLockOwner(ownerPath) {
|
|
281
|
+
let marker = "";
|
|
282
|
+
let markerMtimeMs = 0;
|
|
283
|
+
try {
|
|
284
|
+
const markerStat = statSync(ownerPath);
|
|
285
|
+
markerMtimeMs = markerStat.mtimeMs;
|
|
286
|
+
marker = readFileSync(ownerPath, "utf8");
|
|
287
|
+
}
|
|
288
|
+
catch (error) {
|
|
289
|
+
if (isMissingFileError(error))
|
|
290
|
+
return null;
|
|
291
|
+
throw error;
|
|
292
|
+
}
|
|
293
|
+
const markerLines = marker.split("\n");
|
|
294
|
+
const pid = Number(markerLines[0]);
|
|
295
|
+
const hasOwner = Number.isInteger(pid) && pid > 0;
|
|
296
|
+
const timestamp = Date.parse(markerLines[1] ?? "");
|
|
297
|
+
const timestampMs = Number.isFinite(timestamp) ? timestamp : markerMtimeMs;
|
|
298
|
+
const stale = (hasOwner && !isProcessLive(pid)) ||
|
|
299
|
+
(!hasOwner && Date.now() - markerMtimeMs > INDEX_LOCK_STALE_MS);
|
|
300
|
+
if (stale) {
|
|
301
|
+
rmSync(ownerPath, { force: true });
|
|
302
|
+
return null;
|
|
303
|
+
}
|
|
304
|
+
return { path: ownerPath, timestampMs };
|
|
305
|
+
}
|
|
306
|
+
function isProcessLive(pid) {
|
|
307
|
+
try {
|
|
308
|
+
process.kill(pid, 0);
|
|
309
|
+
return true;
|
|
310
|
+
}
|
|
311
|
+
catch (error) {
|
|
312
|
+
if (typeof error === "object" && error !== null && "code" in error) {
|
|
313
|
+
return error.code === "EPERM";
|
|
314
|
+
}
|
|
315
|
+
return false;
|
|
194
316
|
}
|
|
195
317
|
}
|
|
196
318
|
function writeIndexAtomically(indexPath, index) {
|
|
@@ -233,31 +355,45 @@ function canPruneLogPath(logPath) {
|
|
|
233
355
|
}
|
|
234
356
|
}
|
|
235
357
|
function isActiveLogPath(logPath) {
|
|
358
|
+
const activeMarkerPath = getActiveMarkerPath(logPath);
|
|
236
359
|
try {
|
|
237
|
-
|
|
238
|
-
|
|
360
|
+
const markerStat = statSync(activeMarkerPath);
|
|
361
|
+
const marker = readFileSync(activeMarkerPath, "utf8");
|
|
362
|
+
const live = isActiveMarkerSnapshotLive(marker, markerStat.mtimeMs);
|
|
363
|
+
if (!live)
|
|
364
|
+
rmSync(activeMarkerPath, { force: true });
|
|
365
|
+
return live;
|
|
239
366
|
}
|
|
240
|
-
catch {
|
|
367
|
+
catch (error) {
|
|
368
|
+
if (!isMissingFileError(error))
|
|
369
|
+
throw error;
|
|
241
370
|
return false;
|
|
242
371
|
}
|
|
243
372
|
}
|
|
373
|
+
function isActiveMarkerSnapshotLive(marker, markerMtimeMs) {
|
|
374
|
+
const pid = Number(marker.split("\n")[0]);
|
|
375
|
+
if (Number.isInteger(pid) && pid > 0) {
|
|
376
|
+
return isProcessLive(pid);
|
|
377
|
+
}
|
|
378
|
+
return Date.now() - markerMtimeMs <= ORPHAN_LOG_GRACE_MS;
|
|
379
|
+
}
|
|
244
380
|
function getActiveMarkerPath(logPath) {
|
|
245
381
|
return `${logPath}.active`;
|
|
246
382
|
}
|
|
247
383
|
function sleepSync(ms) {
|
|
248
384
|
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
249
385
|
}
|
|
250
|
-
function isFileExistsError(error) {
|
|
251
|
-
return typeof error === "object" && error !== null && "code" in error && error.code === "EEXIST";
|
|
252
|
-
}
|
|
253
386
|
function isMissingFileError(error) {
|
|
254
387
|
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
255
388
|
}
|
|
256
389
|
function getCommandLogDir(command, cwd) {
|
|
257
390
|
return getSurfacePath(join("cli-logs", command), "repo", cwd);
|
|
258
391
|
}
|
|
259
|
-
function
|
|
260
|
-
return join(
|
|
392
|
+
function getFallbackCommandLogDir(command, cwd) {
|
|
393
|
+
return join(tmpdir(), "webpresso", "cli-logs", fallbackScopeId(cwd), command);
|
|
394
|
+
}
|
|
395
|
+
function fallbackScopeId(cwd) {
|
|
396
|
+
return createHash("sha256").update(resolve(cwd)).digest("hex").slice(0, 12);
|
|
261
397
|
}
|
|
262
398
|
function createLogId(now = new Date()) {
|
|
263
399
|
const iso = now.toISOString().replaceAll(":", "-").replaceAll(".", "-");
|
|
@@ -2,8 +2,11 @@ import type { CAC } from "cac";
|
|
|
2
2
|
import { runReviewExecution, type ReviewEffort, type ReviewLimitWindow, type ReviewProvider, type ReviewRunSummary, type ReviewStage } from "#review/execution/index.js";
|
|
3
3
|
import { createReviewTargetCheckout, type ReviewTargetCheckout } from "#review/execution/review-checkout.js";
|
|
4
4
|
import { type ReviewProcessRecord } from "#review/execution/process-registry.js";
|
|
5
|
+
import { type OpencodeAccount } from "#review/opencode-account.js";
|
|
6
|
+
import { resolveOpencodeAccountsGracefully } from "#runtime/opencode-account-materializer.js";
|
|
5
7
|
import { evaluateApprovalGate } from "#lifecycle/audit";
|
|
6
8
|
import { type ReviewEvent } from "#review/events.js";
|
|
9
|
+
import { type ReviewGateVerification } from "#review/delivery-verifier.js";
|
|
7
10
|
import { runCommand } from "#mcp/tools/_shared/run-command.js";
|
|
8
11
|
export type ReviewVerdict = "approve" | "approve-with-nits" | "reject" | "no-verdict";
|
|
9
12
|
export type ReviewStatus = "complete" | "timed-out" | "incomplete" | "unavailable" | "failed";
|
|
@@ -77,6 +80,8 @@ export interface ReviewCommandOptions {
|
|
|
77
80
|
artifactRoot?: string;
|
|
78
81
|
idleSeconds?: string;
|
|
79
82
|
maxProgressEvents?: string;
|
|
83
|
+
reason?: string;
|
|
84
|
+
confirm?: boolean;
|
|
80
85
|
}
|
|
81
86
|
interface ReviewGateAttempt {
|
|
82
87
|
readonly provider: ReviewProvider;
|
|
@@ -90,6 +95,7 @@ interface ReviewGateAttempt {
|
|
|
90
95
|
readonly verdict: ReviewVerdict;
|
|
91
96
|
readonly terminalClassification: string;
|
|
92
97
|
readonly failureCode?: string;
|
|
98
|
+
readonly providerErrorDetail?: string;
|
|
93
99
|
readonly limitWindow?: ReviewLimitWindow;
|
|
94
100
|
readonly retryAfterMs?: number;
|
|
95
101
|
readonly artifact?: string;
|
|
@@ -105,7 +111,7 @@ interface ReviewGateResult {
|
|
|
105
111
|
readonly targetSha: string;
|
|
106
112
|
readonly baseSha: string;
|
|
107
113
|
readonly promptHash: string;
|
|
108
|
-
readonly status: "approved" | "needs-review" | "rejected" | "recorded-untracked";
|
|
114
|
+
readonly status: "approved" | "needs-review" | "rejected" | "scope-exhausted" | "recorded-untracked" | "verification-failed";
|
|
109
115
|
readonly approvalGate: ReturnType<typeof evaluateApprovalGate>;
|
|
110
116
|
readonly statePath: string;
|
|
111
117
|
readonly attempts: readonly ReviewGateAttempt[];
|
|
@@ -123,6 +129,7 @@ interface ReviewGateResult {
|
|
|
123
129
|
readonly rev?: string;
|
|
124
130
|
}[];
|
|
125
131
|
readonly issues?: readonly string[];
|
|
132
|
+
readonly verification?: ReviewGateVerification;
|
|
126
133
|
readonly message: string;
|
|
127
134
|
}
|
|
128
135
|
interface ReviewLedger {
|
|
@@ -164,6 +171,22 @@ export declare function runReviewRunCommand(projectRoot: string, options: Review
|
|
|
164
171
|
export declare function readReviewLedger(projectRoot: string, slug: string): Promise<ReviewLedger>;
|
|
165
172
|
export declare function logReviewEntry(projectRoot: string, slug: string, input: ReviewCommandOptions): Promise<ReviewEntry>;
|
|
166
173
|
export declare function logReviewEvent(projectRoot: string, slug: string, input: ReviewCommandOptions): Promise<ReviewEvent>;
|
|
174
|
+
/**
|
|
175
|
+
* `wp review override` — the gated, auditable human escape hatch for the
|
|
176
|
+
* promotion approval gate. It records a `maintainer-override` approval that
|
|
177
|
+
* satisfies the gate distinctly (never as a strong/OpenCode-Go approval).
|
|
178
|
+
*
|
|
179
|
+
* Trust properties:
|
|
180
|
+
* - REFUSES unless a formal strong-reviewer gate has already REJECTED the exact
|
|
181
|
+
* current subject (precondition + target binding are the same lookup).
|
|
182
|
+
* - Requires an explicit `--reason` and `--confirm` — no accidental invocation.
|
|
183
|
+
* - Reviewer id `maintainer-override` is not in the `wp review log` reviewer
|
|
184
|
+
* enum, so neither `wp review log` nor `wp_blueprint_review_log` can mint it;
|
|
185
|
+
* this command is the only writer. The read-time policy in
|
|
186
|
+
* `#review/events` treats it as human-like, so its manual-stage record is a
|
|
187
|
+
* legitimate governance approval rather than a disguised machine approval.
|
|
188
|
+
*/
|
|
189
|
+
export declare function runReviewOverride(projectRoot: string, slug: string, input: ReviewCommandOptions): Promise<ReviewEvent>;
|
|
167
190
|
export declare function classifyProviderOutput(output: string): Pick<ReviewGateAttempt, "status" | "verdict" | "terminalClassification">;
|
|
168
191
|
export declare function reviewerFamily(model: string): ReviewReviewerId;
|
|
169
192
|
type GateProviderResultStage = ReviewStage | "approval-gate";
|
|
@@ -176,18 +199,26 @@ export declare function invokeProvider(input: {
|
|
|
176
199
|
readonly provider: ReviewProvider;
|
|
177
200
|
readonly targetSha: string;
|
|
178
201
|
readonly signal?: AbortSignal;
|
|
179
|
-
|
|
202
|
+
readonly authDataDir?: string;
|
|
203
|
+
}, executeReview?: typeof runReviewExecution, runCatalogCommand?: typeof runCommand, createTargetCheckout?: typeof createReviewTargetCheckout, getSharedCheckout?: () => ReviewTargetCheckout | undefined): Promise<{
|
|
180
204
|
output: string;
|
|
181
205
|
model: string;
|
|
182
206
|
reviewer: string;
|
|
183
207
|
stage?: GateProviderResultStage;
|
|
184
|
-
} & Pick<ReviewGateAttempt, "status" | "verdict" | "terminalClassification" | "failureCode" | "limitWindow" | "retryAfterMs">>;
|
|
208
|
+
} & Pick<ReviewGateAttempt, "status" | "verdict" | "terminalClassification" | "failureCode" | "providerErrorDetail" | "limitWindow" | "retryAfterMs">>;
|
|
185
209
|
export interface ReviewGateDependencies {
|
|
186
210
|
readonly createTargetCheckout?: typeof createReviewTargetCheckout;
|
|
187
211
|
readonly invokeProvider?: typeof invokeProvider;
|
|
188
212
|
readonly runCatalogCommand?: typeof runCommand;
|
|
189
213
|
readonly runReviewExecution?: typeof runReviewExecution;
|
|
190
214
|
readonly signal?: AbortSignal;
|
|
215
|
+
/** Test seam: resolve opencode-go accounts from the secret provider. */
|
|
216
|
+
readonly resolveOpencodeAccounts?: typeof resolveOpencodeAccountsGracefully;
|
|
217
|
+
/**
|
|
218
|
+
* Test seam: materialize an account's isolated auth store and return the
|
|
219
|
+
* `XDG_DATA_HOME` directory to inject for that account's spawns.
|
|
220
|
+
*/
|
|
221
|
+
readonly prepareOpencodeCredential?: (account: OpencodeAccount) => string;
|
|
191
222
|
}
|
|
192
223
|
/**
|
|
193
224
|
* Sanctioned fallback when `wp review gate` does not reach "approved" — points
|
|
@@ -198,6 +229,7 @@ export interface ReviewGateDependencies {
|
|
|
198
229
|
export declare function reviewGateNonConvergenceHint(slug: string, context?: {
|
|
199
230
|
readonly gateId?: string;
|
|
200
231
|
readonly failureCode?: string;
|
|
232
|
+
readonly status?: ReviewGateResult["status"];
|
|
201
233
|
}): string;
|
|
202
234
|
export declare function runReviewGate(projectRoot: string, slug: string, input: ReviewCommandOptions, dependencies?: ReviewGateDependencies): Promise<ReviewGateResult>;
|
|
203
235
|
export declare function buildReviewScoreboard(entries: readonly ReviewEntry[]): readonly ReviewScoreboardRow[];
|