agent-bober 0.11.6 → 0.15.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/CHANGELOG.md +311 -0
- package/README.md +124 -9
- package/agents/bober-architect.md +38 -0
- package/agents/bober-code-reviewer.md +236 -0
- package/agents/bober-curator.md +37 -0
- package/agents/bober-deployer.md +267 -0
- package/agents/bober-diagnoser.md +289 -0
- package/agents/bober-evaluator.md +127 -1
- package/agents/bober-generator.md +122 -3
- package/agents/bober-planner.md +293 -32
- package/agents/bober-postmortemer.md +185 -0
- package/agents/bober-researcher.md +38 -0
- package/dist/cli/commands/approve.d.ts +17 -0
- package/dist/cli/commands/approve.d.ts.map +1 -0
- package/dist/cli/commands/approve.js +64 -0
- package/dist/cli/commands/approve.js.map +1 -0
- package/dist/cli/commands/audit-show.d.ts +14 -0
- package/dist/cli/commands/audit-show.d.ts.map +1 -0
- package/dist/cli/commands/audit-show.js +85 -0
- package/dist/cli/commands/audit-show.js.map +1 -0
- package/dist/cli/commands/config.d.ts +10 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +73 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/eval.js +6 -6
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/graph.d.ts +8 -0
- package/dist/cli/commands/graph.d.ts.map +1 -0
- package/dist/cli/commands/graph.js +219 -0
- package/dist/cli/commands/graph.js.map +1 -0
- package/dist/cli/commands/impact.d.ts +19 -0
- package/dist/cli/commands/impact.d.ts.map +1 -0
- package/dist/cli/commands/impact.js +191 -0
- package/dist/cli/commands/impact.js.map +1 -0
- package/dist/cli/commands/incident.d.ts +19 -0
- package/dist/cli/commands/incident.d.ts.map +1 -0
- package/dist/cli/commands/incident.js +324 -0
- package/dist/cli/commands/incident.js.map +1 -0
- package/dist/cli/commands/init.js +82 -3
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list-approvals.d.ts +16 -0
- package/dist/cli/commands/list-approvals.d.ts.map +1 -0
- package/dist/cli/commands/list-approvals.js +57 -0
- package/dist/cli/commands/list-approvals.js.map +1 -0
- package/dist/cli/commands/onboard.d.ts +3 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -0
- package/dist/cli/commands/onboard.js +190 -0
- package/dist/cli/commands/onboard.js.map +1 -0
- package/dist/cli/commands/plan.d.ts +12 -0
- package/dist/cli/commands/plan.d.ts.map +1 -1
- package/dist/cli/commands/plan.js +232 -37
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/playbook.d.ts +17 -0
- package/dist/cli/commands/playbook.d.ts.map +1 -0
- package/dist/cli/commands/playbook.js +123 -0
- package/dist/cli/commands/playbook.js.map +1 -0
- package/dist/cli/commands/postmortem.d.ts +12 -0
- package/dist/cli/commands/postmortem.d.ts.map +1 -0
- package/dist/cli/commands/postmortem.js +67 -0
- package/dist/cli/commands/postmortem.js.map +1 -0
- package/dist/cli/commands/reject.d.ts +17 -0
- package/dist/cli/commands/reject.d.ts.map +1 -0
- package/dist/cli/commands/reject.js +52 -0
- package/dist/cli/commands/reject.js.map +1 -0
- package/dist/cli/commands/rollback.d.ts +21 -0
- package/dist/cli/commands/rollback.d.ts.map +1 -0
- package/dist/cli/commands/rollback.js +90 -0
- package/dist/cli/commands/rollback.js.map +1 -0
- package/dist/cli/commands/run.d.ts +9 -0
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +31 -2
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/sprint.d.ts.map +1 -1
- package/dist/cli/commands/sprint.js +8 -8
- package/dist/cli/commands/sprint.js.map +1 -1
- package/dist/cli/commands/telemetry.d.ts +16 -0
- package/dist/cli/commands/telemetry.d.ts.map +1 -0
- package/dist/cli/commands/telemetry.js +152 -0
- package/dist/cli/commands/telemetry.js.map +1 -0
- package/dist/cli/commands/worktree.d.ts +12 -0
- package/dist/cli/commands/worktree.d.ts.map +1 -0
- package/dist/cli/commands/worktree.js +57 -0
- package/dist/cli/commands/worktree.js.map +1 -0
- package/dist/cli/index.js +73 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +27 -0
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +4 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +18 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +1016 -96
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +147 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/contracts/eval-result.d.ts +38 -38
- package/dist/contracts/index.d.ts +2 -2
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +8 -4
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/spec.d.ts +335 -40
- package/dist/contracts/spec.d.ts.map +1 -1
- package/dist/contracts/spec.js +210 -18
- package/dist/contracts/spec.js.map +1 -1
- package/dist/contracts/sprint-contract.d.ts +155 -88
- package/dist/contracts/sprint-contract.d.ts.map +1 -1
- package/dist/contracts/sprint-contract.js +176 -29
- package/dist/contracts/sprint-contract.js.map +1 -1
- package/dist/evaluators/builtin/api-check.js +1 -1
- package/dist/evaluators/builtin/api-check.js.map +1 -1
- package/dist/graph/artifact-store.d.ts +14 -0
- package/dist/graph/artifact-store.d.ts.map +1 -0
- package/dist/graph/artifact-store.js +100 -0
- package/dist/graph/artifact-store.js.map +1 -0
- package/dist/graph/cli.d.ts +49 -0
- package/dist/graph/cli.d.ts.map +1 -0
- package/dist/graph/cli.js +140 -0
- package/dist/graph/cli.js.map +1 -0
- package/dist/graph/client.d.ts +64 -0
- package/dist/graph/client.d.ts.map +1 -0
- package/dist/graph/client.js +216 -0
- package/dist/graph/client.js.map +1 -0
- package/dist/graph/fallback.d.ts +13 -0
- package/dist/graph/fallback.d.ts.map +1 -0
- package/dist/graph/fallback.js +57 -0
- package/dist/graph/fallback.js.map +1 -0
- package/dist/graph/hook-handler.d.ts +50 -0
- package/dist/graph/hook-handler.d.ts.map +1 -0
- package/dist/graph/hook-handler.js +217 -0
- package/dist/graph/hook-handler.js.map +1 -0
- package/dist/graph/incidents.d.ts +59 -0
- package/dist/graph/incidents.d.ts.map +1 -0
- package/dist/graph/incidents.js +22 -0
- package/dist/graph/incidents.js.map +1 -0
- package/dist/graph/mcp-client.d.ts +51 -0
- package/dist/graph/mcp-client.d.ts.map +1 -0
- package/dist/graph/mcp-client.js +285 -0
- package/dist/graph/mcp-client.js.map +1 -0
- package/dist/graph/onboarding-composer.d.ts +30 -0
- package/dist/graph/onboarding-composer.d.ts.map +1 -0
- package/dist/graph/onboarding-composer.js +275 -0
- package/dist/graph/onboarding-composer.js.map +1 -0
- package/dist/graph/pipeline-lifecycle.d.ts +86 -0
- package/dist/graph/pipeline-lifecycle.d.ts.map +1 -0
- package/dist/graph/pipeline-lifecycle.js +329 -0
- package/dist/graph/pipeline-lifecycle.js.map +1 -0
- package/dist/graph/preflight-budgets.d.ts +52 -0
- package/dist/graph/preflight-budgets.d.ts.map +1 -0
- package/dist/graph/preflight-budgets.js +78 -0
- package/dist/graph/preflight-budgets.js.map +1 -0
- package/dist/graph/preflight-injector.d.ts +116 -0
- package/dist/graph/preflight-injector.d.ts.map +1 -0
- package/dist/graph/preflight-injector.js +538 -0
- package/dist/graph/preflight-injector.js.map +1 -0
- package/dist/graph/prereq.d.ts +12 -0
- package/dist/graph/prereq.d.ts.map +1 -0
- package/dist/graph/prereq.js +61 -0
- package/dist/graph/prereq.js.map +1 -0
- package/dist/graph/prompts.d.ts +42 -0
- package/dist/graph/prompts.d.ts.map +1 -0
- package/dist/graph/prompts.js +80 -0
- package/dist/graph/prompts.js.map +1 -0
- package/dist/graph/sandbox.d.ts +19 -0
- package/dist/graph/sandbox.d.ts.map +1 -0
- package/dist/graph/sandbox.js +25 -0
- package/dist/graph/sandbox.js.map +1 -0
- package/dist/graph/token-usage.d.ts +21 -0
- package/dist/graph/token-usage.d.ts.map +1 -0
- package/dist/graph/token-usage.js +22 -0
- package/dist/graph/token-usage.js.map +1 -0
- package/dist/graph/types.d.ts +129 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +12 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/incident/orchestrator.d.ts +168 -0
- package/dist/incident/orchestrator.d.ts.map +1 -0
- package/dist/incident/orchestrator.js +279 -0
- package/dist/incident/orchestrator.js.map +1 -0
- package/dist/incident/playbook-search.d.ts +67 -0
- package/dist/incident/playbook-search.d.ts.map +1 -0
- package/dist/incident/playbook-search.js +288 -0
- package/dist/incident/playbook-search.js.map +1 -0
- package/dist/incident/postmortem.d.ts +44 -0
- package/dist/incident/postmortem.d.ts.map +1 -0
- package/dist/incident/postmortem.js +486 -0
- package/dist/incident/postmortem.js.map +1 -0
- package/dist/incident/resolution-verify.d.ts +186 -0
- package/dist/incident/resolution-verify.d.ts.map +1 -0
- package/dist/incident/resolution-verify.js +210 -0
- package/dist/incident/resolution-verify.js.map +1 -0
- package/dist/incident/rollback.d.ts +137 -0
- package/dist/incident/rollback.d.ts.map +1 -0
- package/dist/incident/rollback.js +328 -0
- package/dist/incident/rollback.js.map +1 -0
- package/dist/incident/timeline.d.ts +147 -0
- package/dist/incident/timeline.d.ts.map +1 -0
- package/dist/incident/timeline.js +452 -0
- package/dist/incident/timeline.js.map +1 -0
- package/dist/incident/types.d.ts +335 -0
- package/dist/incident/types.d.ts.map +1 -0
- package/dist/incident/types.js +158 -0
- package/dist/incident/types.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp/event-stream.d.ts +46 -0
- package/dist/mcp/event-stream.d.ts.map +1 -0
- package/dist/mcp/event-stream.js +421 -0
- package/dist/mcp/event-stream.js.map +1 -0
- package/dist/mcp/external-client.d.ts +38 -0
- package/dist/mcp/external-client.d.ts.map +1 -0
- package/dist/mcp/external-client.js +121 -0
- package/dist/mcp/external-client.js.map +1 -0
- package/dist/mcp/run-manager.d.ts +74 -9
- package/dist/mcp/run-manager.d.ts.map +1 -1
- package/dist/mcp/run-manager.js +127 -31
- package/dist/mcp/run-manager.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +56 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/abort-run.d.ts +2 -0
- package/dist/mcp/tools/abort-run.d.ts.map +1 -0
- package/dist/mcp/tools/abort-run.js +62 -0
- package/dist/mcp/tools/abort-run.js.map +1 -0
- package/dist/mcp/tools/anchor.js +1 -1
- package/dist/mcp/tools/anchor.js.map +1 -1
- package/dist/mcp/tools/approve-checkpoint.d.ts +2 -0
- package/dist/mcp/tools/approve-checkpoint.d.ts.map +1 -0
- package/dist/mcp/tools/approve-checkpoint.js +70 -0
- package/dist/mcp/tools/approve-checkpoint.js.map +1 -0
- package/dist/mcp/tools/brownfield.js +1 -1
- package/dist/mcp/tools/brownfield.js.map +1 -1
- package/dist/mcp/tools/contracts.js +2 -2
- package/dist/mcp/tools/contracts.js.map +1 -1
- package/dist/mcp/tools/eval.js +8 -8
- package/dist/mcp/tools/eval.js.map +1 -1
- package/dist/mcp/tools/get-project-state.d.ts +2 -0
- package/dist/mcp/tools/get-project-state.d.ts.map +1 -0
- package/dist/mcp/tools/get-project-state.js +107 -0
- package/dist/mcp/tools/get-project-state.js.map +1 -0
- package/dist/mcp/tools/get-run-status.d.ts +2 -0
- package/dist/mcp/tools/get-run-status.d.ts.map +1 -0
- package/dist/mcp/tools/get-run-status.js +40 -0
- package/dist/mcp/tools/get-run-status.js.map +1 -0
- package/dist/mcp/tools/graph-schemas.d.ts +100 -0
- package/dist/mcp/tools/graph-schemas.d.ts.map +1 -0
- package/dist/mcp/tools/graph-schemas.js +39 -0
- package/dist/mcp/tools/graph-schemas.js.map +1 -0
- package/dist/mcp/tools/graph.d.ts +19 -0
- package/dist/mcp/tools/graph.d.ts.map +1 -0
- package/dist/mcp/tools/graph.js +263 -0
- package/dist/mcp/tools/graph.js.map +1 -0
- package/dist/mcp/tools/incident.d.ts +2 -0
- package/dist/mcp/tools/incident.d.ts.map +1 -0
- package/dist/mcp/tools/incident.js +246 -0
- package/dist/mcp/tools/incident.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +38 -18
- package/dist/mcp/tools/index.d.ts.map +1 -1
- package/dist/mcp/tools/index.js +74 -18
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/list-active-runs.d.ts +2 -0
- package/dist/mcp/tools/list-active-runs.d.ts.map +1 -0
- package/dist/mcp/tools/list-active-runs.js +35 -0
- package/dist/mcp/tools/list-active-runs.js.map +1 -0
- package/dist/mcp/tools/list-pending-approvals.d.ts +2 -0
- package/dist/mcp/tools/list-pending-approvals.d.ts.map +1 -0
- package/dist/mcp/tools/list-pending-approvals.js +40 -0
- package/dist/mcp/tools/list-pending-approvals.js.map +1 -0
- package/dist/mcp/tools/list-projects.d.ts +2 -0
- package/dist/mcp/tools/list-projects.d.ts.map +1 -0
- package/dist/mcp/tools/list-projects.js +101 -0
- package/dist/mcp/tools/list-projects.js.map +1 -0
- package/dist/mcp/tools/list-specs.d.ts +2 -0
- package/dist/mcp/tools/list-specs.d.ts.map +1 -0
- package/dist/mcp/tools/list-specs.js +48 -0
- package/dist/mcp/tools/list-specs.js.map +1 -0
- package/dist/mcp/tools/plan.d.ts.map +1 -1
- package/dist/mcp/tools/plan.js +40 -14
- package/dist/mcp/tools/plan.js.map +1 -1
- package/dist/mcp/tools/playbook.d.ts +2 -0
- package/dist/mcp/tools/playbook.d.ts.map +1 -0
- package/dist/mcp/tools/playbook.js +104 -0
- package/dist/mcp/tools/playbook.js.map +1 -0
- package/dist/mcp/tools/postmortem.d.ts +2 -0
- package/dist/mcp/tools/postmortem.d.ts.map +1 -0
- package/dist/mcp/tools/postmortem.js +75 -0
- package/dist/mcp/tools/postmortem.js.map +1 -0
- package/dist/mcp/tools/react.js +1 -1
- package/dist/mcp/tools/react.js.map +1 -1
- package/dist/mcp/tools/reject-checkpoint.d.ts +2 -0
- package/dist/mcp/tools/reject-checkpoint.d.ts.map +1 -0
- package/dist/mcp/tools/reject-checkpoint.js +79 -0
- package/dist/mcp/tools/reject-checkpoint.js.map +1 -0
- package/dist/mcp/tools/rollback.d.ts +2 -0
- package/dist/mcp/tools/rollback.d.ts.map +1 -0
- package/dist/mcp/tools/rollback.js +78 -0
- package/dist/mcp/tools/rollback.js.map +1 -0
- package/dist/mcp/tools/run-in-worktree.d.ts +2 -0
- package/dist/mcp/tools/run-in-worktree.d.ts.map +1 -0
- package/dist/mcp/tools/run-in-worktree.js +90 -0
- package/dist/mcp/tools/run-in-worktree.js.map +1 -0
- package/dist/mcp/tools/run.js +1 -1
- package/dist/mcp/tools/run.js.map +1 -1
- package/dist/mcp/tools/solidity.js +1 -1
- package/dist/mcp/tools/solidity.js.map +1 -1
- package/dist/mcp/tools/sprint.d.ts.map +1 -1
- package/dist/mcp/tools/sprint.js +11 -11
- package/dist/mcp/tools/sprint.js.map +1 -1
- package/dist/mcp/tools/status.d.ts.map +1 -1
- package/dist/mcp/tools/status.js +11 -0
- package/dist/mcp/tools/status.js.map +1 -1
- package/dist/mcp/tools/subscribe-events.d.ts +2 -0
- package/dist/mcp/tools/subscribe-events.d.ts.map +1 -0
- package/dist/mcp/tools/subscribe-events.js +48 -0
- package/dist/mcp/tools/subscribe-events.js.map +1 -0
- package/dist/mcp/tools/unsubscribe-events.d.ts +2 -0
- package/dist/mcp/tools/unsubscribe-events.d.ts.map +1 -0
- package/dist/mcp/tools/unsubscribe-events.js +45 -0
- package/dist/mcp/tools/unsubscribe-events.js.map +1 -0
- package/dist/orchestrator/agent-loader.d.ts +16 -0
- package/dist/orchestrator/agent-loader.d.ts.map +1 -1
- package/dist/orchestrator/agent-loader.js +16 -0
- package/dist/orchestrator/agent-loader.js.map +1 -1
- package/dist/orchestrator/architect-agent.d.ts.map +1 -1
- package/dist/orchestrator/architect-agent.js +37 -8
- package/dist/orchestrator/architect-agent.js.map +1 -1
- package/dist/orchestrator/checkpoints/audit.d.ts +128 -0
- package/dist/orchestrator/checkpoints/audit.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/audit.js +272 -0
- package/dist/orchestrator/checkpoints/audit.js.map +1 -0
- package/dist/orchestrator/checkpoints/feedback-router.d.ts +213 -0
- package/dist/orchestrator/checkpoints/feedback-router.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/feedback-router.js +438 -0
- package/dist/orchestrator/checkpoints/feedback-router.js.map +1 -0
- package/dist/orchestrator/checkpoints/index.d.ts +11 -0
- package/dist/orchestrator/checkpoints/index.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/index.js +12 -0
- package/dist/orchestrator/checkpoints/index.js.map +1 -0
- package/dist/orchestrator/checkpoints/mechanisms/cli.d.ts +35 -0
- package/dist/orchestrator/checkpoints/mechanisms/cli.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/mechanisms/cli.js +153 -0
- package/dist/orchestrator/checkpoints/mechanisms/cli.js.map +1 -0
- package/dist/orchestrator/checkpoints/mechanisms/disk.d.ts +34 -0
- package/dist/orchestrator/checkpoints/mechanisms/disk.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/mechanisms/disk.js +139 -0
- package/dist/orchestrator/checkpoints/mechanisms/disk.js.map +1 -0
- package/dist/orchestrator/checkpoints/mechanisms/pr.d.ts +141 -0
- package/dist/orchestrator/checkpoints/mechanisms/pr.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/mechanisms/pr.js +445 -0
- package/dist/orchestrator/checkpoints/mechanisms/pr.js.map +1 -0
- package/dist/orchestrator/checkpoints/noop.d.ts +12 -0
- package/dist/orchestrator/checkpoints/noop.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/noop.js +13 -0
- package/dist/orchestrator/checkpoints/noop.js.map +1 -0
- package/dist/orchestrator/checkpoints/registry.d.ts +48 -0
- package/dist/orchestrator/checkpoints/registry.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/registry.js +89 -0
- package/dist/orchestrator/checkpoints/registry.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/_util.d.ts +50 -0
- package/dist/orchestrator/checkpoints/renderers/_util.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/_util.js +137 -0
- package/dist/orchestrator/checkpoints/renderers/_util.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/code-review.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/code-review.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/code-review.js +66 -0
- package/dist/orchestrator/checkpoints/renderers/code-review.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/curator-briefing.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/curator-briefing.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/curator-briefing.js +40 -0
- package/dist/orchestrator/checkpoints/renderers/curator-briefing.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/eval-result.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/eval-result.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/eval-result.js +54 -0
- package/dist/orchestrator/checkpoints/renderers/eval-result.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/generator-diff.d.ts +49 -0
- package/dist/orchestrator/checkpoints/renderers/generator-diff.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/generator-diff.js +154 -0
- package/dist/orchestrator/checkpoints/renderers/generator-diff.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/pipeline-summary.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/pipeline-summary.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/pipeline-summary.js +59 -0
- package/dist/orchestrator/checkpoints/renderers/pipeline-summary.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/plan.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/plan.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/plan.js +34 -0
- package/dist/orchestrator/checkpoints/renderers/plan.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/registry.d.ts +43 -0
- package/dist/orchestrator/checkpoints/renderers/registry.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/registry.js +83 -0
- package/dist/orchestrator/checkpoints/renderers/registry.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/research.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/research.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/research.js +39 -0
- package/dist/orchestrator/checkpoints/renderers/research.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-contract.d.ts +20 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-contract.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-contract.js +57 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-contract.js.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-summary.d.ts +15 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-summary.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-summary.js +38 -0
- package/dist/orchestrator/checkpoints/renderers/sprint-summary.js.map +1 -0
- package/dist/orchestrator/checkpoints/sites.d.ts +22 -0
- package/dist/orchestrator/checkpoints/sites.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/sites.js +57 -0
- package/dist/orchestrator/checkpoints/sites.js.map +1 -0
- package/dist/orchestrator/checkpoints/types.d.ts +51 -0
- package/dist/orchestrator/checkpoints/types.d.ts.map +1 -0
- package/dist/orchestrator/checkpoints/types.js +9 -0
- package/dist/orchestrator/checkpoints/types.js.map +1 -0
- package/dist/orchestrator/code-reviewer-agent.d.ts +50 -0
- package/dist/orchestrator/code-reviewer-agent.d.ts.map +1 -0
- package/dist/orchestrator/code-reviewer-agent.js +283 -0
- package/dist/orchestrator/code-reviewer-agent.js.map +1 -0
- package/dist/orchestrator/context-handoff.d.ts +484 -224
- package/dist/orchestrator/context-handoff.d.ts.map +1 -1
- package/dist/orchestrator/context-handoff.js +32 -12
- package/dist/orchestrator/context-handoff.js.map +1 -1
- package/dist/orchestrator/curator-agent.d.ts.map +1 -1
- package/dist/orchestrator/curator-agent.js +63 -12
- package/dist/orchestrator/curator-agent.js.map +1 -1
- package/dist/orchestrator/deploy/classify.d.ts +31 -0
- package/dist/orchestrator/deploy/classify.d.ts.map +1 -0
- package/dist/orchestrator/deploy/classify.js +109 -0
- package/dist/orchestrator/deploy/classify.js.map +1 -0
- package/dist/orchestrator/deploy/execute.d.ts +45 -0
- package/dist/orchestrator/deploy/execute.d.ts.map +1 -0
- package/dist/orchestrator/deploy/execute.js +146 -0
- package/dist/orchestrator/deploy/execute.js.map +1 -0
- package/dist/orchestrator/deploy/executor.d.ts +22 -0
- package/dist/orchestrator/deploy/executor.d.ts.map +1 -0
- package/dist/orchestrator/deploy/executor.js +31 -0
- package/dist/orchestrator/deploy/executor.js.map +1 -0
- package/dist/orchestrator/deploy/index.d.ts +21 -0
- package/dist/orchestrator/deploy/index.d.ts.map +1 -0
- package/dist/orchestrator/deploy/index.js +21 -0
- package/dist/orchestrator/deploy/index.js.map +1 -0
- package/dist/orchestrator/deploy/resolve.d.ts +51 -0
- package/dist/orchestrator/deploy/resolve.d.ts.map +1 -0
- package/dist/orchestrator/deploy/resolve.js +53 -0
- package/dist/orchestrator/deploy/resolve.js.map +1 -0
- package/dist/orchestrator/deploy/spawn.d.ts +60 -0
- package/dist/orchestrator/deploy/spawn.d.ts.map +1 -0
- package/dist/orchestrator/deploy/spawn.js +62 -0
- package/dist/orchestrator/deploy/spawn.js.map +1 -0
- package/dist/orchestrator/deploy/types.d.ts +98 -0
- package/dist/orchestrator/deploy/types.d.ts.map +1 -0
- package/dist/orchestrator/deploy/types.js +39 -0
- package/dist/orchestrator/deploy/types.js.map +1 -0
- package/dist/orchestrator/evaluator-agent.d.ts.map +1 -1
- package/dist/orchestrator/evaluator-agent.js +23 -10
- package/dist/orchestrator/evaluator-agent.js.map +1 -1
- package/dist/orchestrator/generator-agent.d.ts.map +1 -1
- package/dist/orchestrator/generator-agent.js +24 -11
- package/dist/orchestrator/generator-agent.js.map +1 -1
- package/dist/orchestrator/model-resolver.d.ts.map +1 -1
- package/dist/orchestrator/model-resolver.js +4 -2
- package/dist/orchestrator/model-resolver.js.map +1 -1
- package/dist/orchestrator/observability/index.d.ts +12 -0
- package/dist/orchestrator/observability/index.d.ts.map +1 -0
- package/dist/orchestrator/observability/index.js +12 -0
- package/dist/orchestrator/observability/index.js.map +1 -0
- package/dist/orchestrator/observability/merge.d.ts +73 -0
- package/dist/orchestrator/observability/merge.d.ts.map +1 -0
- package/dist/orchestrator/observability/merge.js +110 -0
- package/dist/orchestrator/observability/merge.js.map +1 -0
- package/dist/orchestrator/pipeline.d.ts +28 -0
- package/dist/orchestrator/pipeline.d.ts.map +1 -1
- package/dist/orchestrator/pipeline.js +223 -30
- package/dist/orchestrator/pipeline.js.map +1 -1
- package/dist/orchestrator/planner-agent.d.ts +21 -1
- package/dist/orchestrator/planner-agent.d.ts.map +1 -1
- package/dist/orchestrator/planner-agent.js +16 -6
- package/dist/orchestrator/planner-agent.js.map +1 -1
- package/dist/orchestrator/research-agent.d.ts.map +1 -1
- package/dist/orchestrator/research-agent.js +46 -9
- package/dist/orchestrator/research-agent.js.map +1 -1
- package/dist/orchestrator/tools/handlers.d.ts +2 -0
- package/dist/orchestrator/tools/handlers.d.ts.map +1 -1
- package/dist/orchestrator/tools/handlers.js +1 -1
- package/dist/orchestrator/tools/handlers.js.map +1 -1
- package/dist/orchestrator/tools/index.d.ts +84 -1
- package/dist/orchestrator/tools/index.d.ts.map +1 -1
- package/dist/orchestrator/tools/index.js +164 -1
- package/dist/orchestrator/tools/index.js.map +1 -1
- package/dist/orchestrator/worktree.d.ts +18 -0
- package/dist/orchestrator/worktree.d.ts.map +1 -0
- package/dist/orchestrator/worktree.js +129 -0
- package/dist/orchestrator/worktree.js.map +1 -0
- package/dist/providers/anthropic.d.ts +8 -1
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +86 -5
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/factory.d.ts.map +1 -1
- package/dist/providers/factory.js +35 -2
- package/dist/providers/factory.js.map +1 -1
- package/dist/providers/google.d.ts.map +1 -1
- package/dist/providers/google.js +5 -0
- package/dist/providers/google.js.map +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +4 -0
- package/dist/providers/openai.js.map +1 -1
- package/dist/providers/types.d.ts +25 -2
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/state/approval-state.d.ts +74 -0
- package/dist/state/approval-state.d.ts.map +1 -0
- package/dist/state/approval-state.js +127 -0
- package/dist/state/approval-state.js.map +1 -0
- package/dist/state/history.d.ts.map +1 -1
- package/dist/state/history.js +3 -3
- package/dist/state/history.js.map +1 -1
- package/dist/state/index.d.ts +3 -0
- package/dist/state/index.d.ts.map +1 -1
- package/dist/state/index.js +4 -1
- package/dist/state/index.js.map +1 -1
- package/dist/state/plan-state.js +1 -1
- package/dist/state/plan-state.js.map +1 -1
- package/dist/state/review-state.d.ts +15 -0
- package/dist/state/review-state.d.ts.map +1 -0
- package/dist/state/review-state.js +51 -0
- package/dist/state/review-state.js.map +1 -0
- package/dist/state/run-state.d.ts +39 -0
- package/dist/state/run-state.d.ts.map +1 -0
- package/dist/state/run-state.js +101 -0
- package/dist/state/run-state.js.map +1 -0
- package/dist/state/sprint-state.d.ts +9 -2
- package/dist/state/sprint-state.d.ts.map +1 -1
- package/dist/state/sprint-state.js +25 -11
- package/dist/state/sprint-state.js.map +1 -1
- package/dist/telemetry/emit.d.ts +41 -0
- package/dist/telemetry/emit.d.ts.map +1 -0
- package/dist/telemetry/emit.js +65 -0
- package/dist/telemetry/emit.js.map +1 -0
- package/dist/utils/git.d.ts +27 -0
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +50 -0
- package/dist/utils/git.js.map +1 -1
- package/hooks/hooks.json +17 -1
- package/hooks/session-start +42 -0
- package/package.json +6 -2
- package/scripts/check-prereqs.sh +12 -0
- package/scripts/e2e-graph-smoke.sh +167 -0
- package/scripts/graph-hook.mjs +151 -0
- package/scripts/migrate-specs.mjs +127 -0
- package/scripts/run-kpi-gate.mjs +245 -0
- package/scripts/sync-skills.mjs +99 -0
- package/skills/bober.code-review/SKILL.md +186 -0
- package/skills/bober.debug/SKILL.md +300 -0
- package/skills/bober.deploy/SKILL.md +262 -0
- package/skills/bober.diagnose/SKILL.md +254 -0
- package/skills/bober.graph/SKILL.md +85 -0
- package/skills/bober.impact/SKILL.md +101 -0
- package/skills/bober.incident/SKILL.md +245 -0
- package/skills/bober.onboard/SKILL.md +84 -0
- package/skills/bober.plan/SKILL.md +51 -0
- package/skills/bober.plan/references/spec-schema.md +31 -4
- package/skills/bober.postmortem/SKILL.md +231 -0
- package/skills/bober.run/SKILL.md +41 -7
- package/skills/bober.runbook/SKILL.md +335 -0
- package/skills/bober.sprint/SKILL.md +6 -259
- package/skills/bober.using-bober/SKILL.md +133 -0
- package/skills/bober.verify/SKILL.md +143 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/orchestrator/checkpoints/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAA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,iDAAiD;IACjD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,yBAAyB,CACvC,YAAoB,EACpB,MAA4C,EAC5C,QAAiB,EACjB,WAAoB,EACpB,cAAwB;IAExB,MAAM,IAAI,GAAG,8BAA8B,CACzC,YAAY,EACZ,MAAM,EACN,WAAW,EACX,cAAc,EACd,QAAQ,IAAI,MAAM,CACnB,CAAC;IACF,OAAO,sBAAsB,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAED,mDAAmD;AACnD,yEAAyE;AACzE,2BAA2B,CAAC,MAAM,EAAE,IAAI,uBAAuB,EAAE,CAAC,CAAC;AACnE,2BAA2B,CAAC,KAAK,EAAE,IAAI,sBAAsB,EAAE,CAAC,CAAC;AACjE,6EAA6E;AAC7E,4EAA4E;AAC5E,mFAAmF;AACnF,2BAA2B,CACzB,MAAM,EACN,IAAI,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CACxE,CAAC;AAEF,kEAAkE;AAClE,sEAAsE;AACtE,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAC1B,MAAM,iBAAiB,GAAG,IAAI,uBAAuB,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;AACxF,2BAA2B,CACzB,IAAI,EACJ,IAAI,qBAAqB,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,iBAAiB,CAAC,CAClE,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for per-artifact-type renderers.
|
|
3
|
+
*
|
|
4
|
+
* Private to the renderers/ directory — not re-exported from registry.ts.
|
|
5
|
+
* All functions are pure (no I/O, no side effects).
|
|
6
|
+
*
|
|
7
|
+
* Sprint 11 — colocated in renderers/ per mechanisms/ precedent.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Apply a line cap to rendered content.
|
|
11
|
+
* If content exceeds maxLines, truncates with the canonical truncation marker:
|
|
12
|
+
* `... <N more lines truncated, see <path>:<startLine> for full content>`
|
|
13
|
+
* When no source path is available, falls back to:
|
|
14
|
+
* `... <N more lines truncated>`
|
|
15
|
+
*/
|
|
16
|
+
export declare function applyLineCap(content: string, maxLines: number, sourcePath?: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Extract the first H1 heading from markdown content.
|
|
19
|
+
* Returns null if no H1 is found.
|
|
20
|
+
*/
|
|
21
|
+
export declare function extractH1(content: string): string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Count list items (lines starting with `- `) under a given section heading.
|
|
24
|
+
* Stops counting when another heading of equal or higher level is encountered.
|
|
25
|
+
*/
|
|
26
|
+
export declare function countSectionItems(content: string, sectionName: string): number;
|
|
27
|
+
/**
|
|
28
|
+
* Count the number of sections (headings) at level 2 (`## `) in the content.
|
|
29
|
+
*/
|
|
30
|
+
export declare function countH2Sections(content: string): number;
|
|
31
|
+
/**
|
|
32
|
+
* Extract the first N non-blank lines after a line matching the given separator pattern.
|
|
33
|
+
* If separator is not found, returns the first N non-blank lines of the content.
|
|
34
|
+
*/
|
|
35
|
+
export declare function firstNNonBlankAfter(content: string, n: number, separatorPattern: RegExp): string[];
|
|
36
|
+
/**
|
|
37
|
+
* Parse an inline count from a markdown line matching a pattern.
|
|
38
|
+
* Returns null if not found.
|
|
39
|
+
*/
|
|
40
|
+
export declare function parseInlineCount(content: string, pattern: RegExp): number | null;
|
|
41
|
+
/**
|
|
42
|
+
* Extract content and path from an artifact.
|
|
43
|
+
* Handles shapes: { content }, { text }, { path, content }, { path }
|
|
44
|
+
* Does NOT perform file I/O — mechanisms must preload content.
|
|
45
|
+
*/
|
|
46
|
+
export declare function extractMarkdownContent(artifact: unknown): {
|
|
47
|
+
content: string;
|
|
48
|
+
path: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=_util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_util.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/checkpoints/renderers/_util.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAWR;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMxD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAsB9E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,CAAC,EAAE,MAAM,EACT,gBAAgB,EAAE,MAAM,GACvB,MAAM,EAAE,CA6BV;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKhF;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,CAaA"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for per-artifact-type renderers.
|
|
3
|
+
*
|
|
4
|
+
* Private to the renderers/ directory — not re-exported from registry.ts.
|
|
5
|
+
* All functions are pure (no I/O, no side effects).
|
|
6
|
+
*
|
|
7
|
+
* Sprint 11 — colocated in renderers/ per mechanisms/ precedent.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Apply a line cap to rendered content.
|
|
11
|
+
* If content exceeds maxLines, truncates with the canonical truncation marker:
|
|
12
|
+
* `... <N more lines truncated, see <path>:<startLine> for full content>`
|
|
13
|
+
* When no source path is available, falls back to:
|
|
14
|
+
* `... <N more lines truncated>`
|
|
15
|
+
*/
|
|
16
|
+
export function applyLineCap(content, maxLines, sourcePath) {
|
|
17
|
+
const lines = content.split("\n");
|
|
18
|
+
if (lines.length <= maxLines)
|
|
19
|
+
return content;
|
|
20
|
+
const kept = lines.slice(0, maxLines);
|
|
21
|
+
const dropped = lines.length - maxLines;
|
|
22
|
+
const startLine = maxLines + 1;
|
|
23
|
+
const pathHint = sourcePath
|
|
24
|
+
? ` see ${sourcePath}:${startLine} for full content`
|
|
25
|
+
: "";
|
|
26
|
+
kept.push(`... <${dropped} more lines truncated,${pathHint}>`);
|
|
27
|
+
return kept.join("\n");
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Extract the first H1 heading from markdown content.
|
|
31
|
+
* Returns null if no H1 is found.
|
|
32
|
+
*/
|
|
33
|
+
export function extractH1(content) {
|
|
34
|
+
for (const line of content.split("\n")) {
|
|
35
|
+
const m = /^#\s+(.+)$/.exec(line);
|
|
36
|
+
if (m)
|
|
37
|
+
return m[1].trim();
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Count list items (lines starting with `- `) under a given section heading.
|
|
43
|
+
* Stops counting when another heading of equal or higher level is encountered.
|
|
44
|
+
*/
|
|
45
|
+
export function countSectionItems(content, sectionName) {
|
|
46
|
+
const lines = content.split("\n");
|
|
47
|
+
let inSection = false;
|
|
48
|
+
let count = 0;
|
|
49
|
+
for (const line of lines) {
|
|
50
|
+
const headingMatch = /^(#{1,6})\s+(.+)$/.exec(line);
|
|
51
|
+
if (headingMatch) {
|
|
52
|
+
if (inSection) {
|
|
53
|
+
// Encountered next heading — stop
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
if (headingMatch[2].trim().toLowerCase().includes(sectionName.toLowerCase())) {
|
|
57
|
+
inSection = true;
|
|
58
|
+
}
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (inSection && /^\s*[-*]\s+/.test(line)) {
|
|
62
|
+
count++;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return count;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Count the number of sections (headings) at level 2 (`## `) in the content.
|
|
69
|
+
*/
|
|
70
|
+
export function countH2Sections(content) {
|
|
71
|
+
return content.split("\n").filter((l) => /^##\s+/.test(l)).length;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Extract the first N non-blank lines after a line matching the given separator pattern.
|
|
75
|
+
* If separator is not found, returns the first N non-blank lines of the content.
|
|
76
|
+
*/
|
|
77
|
+
export function firstNNonBlankAfter(content, n, separatorPattern) {
|
|
78
|
+
const lines = content.split("\n");
|
|
79
|
+
let afterSep = false;
|
|
80
|
+
const result = [];
|
|
81
|
+
for (const line of lines) {
|
|
82
|
+
if (!afterSep) {
|
|
83
|
+
if (separatorPattern.test(line)) {
|
|
84
|
+
afterSep = true;
|
|
85
|
+
}
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if (line.trim() !== "") {
|
|
89
|
+
result.push(line);
|
|
90
|
+
if (result.length >= n)
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// Fallback: if separator not found, take first N non-blank lines
|
|
95
|
+
if (!afterSep) {
|
|
96
|
+
for (const line of lines) {
|
|
97
|
+
if (line.trim() !== "") {
|
|
98
|
+
result.push(line);
|
|
99
|
+
if (result.length >= n)
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return result;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Parse an inline count from a markdown line matching a pattern.
|
|
108
|
+
* Returns null if not found.
|
|
109
|
+
*/
|
|
110
|
+
export function parseInlineCount(content, pattern) {
|
|
111
|
+
const m = pattern.exec(content);
|
|
112
|
+
if (!m)
|
|
113
|
+
return null;
|
|
114
|
+
const n = parseInt(m[1], 10);
|
|
115
|
+
return isNaN(n) ? null : n;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Extract content and path from an artifact.
|
|
119
|
+
* Handles shapes: { content }, { text }, { path, content }, { path }
|
|
120
|
+
* Does NOT perform file I/O — mechanisms must preload content.
|
|
121
|
+
*/
|
|
122
|
+
export function extractMarkdownContent(artifact) {
|
|
123
|
+
const a = artifact;
|
|
124
|
+
if (!a || typeof a !== "object") {
|
|
125
|
+
return { content: "", path: undefined };
|
|
126
|
+
}
|
|
127
|
+
const path = typeof a["path"] === "string" ? a["path"] : undefined;
|
|
128
|
+
let content = "";
|
|
129
|
+
if (typeof a["content"] === "string") {
|
|
130
|
+
content = a["content"];
|
|
131
|
+
}
|
|
132
|
+
else if (typeof a["text"] === "string") {
|
|
133
|
+
content = a["text"];
|
|
134
|
+
}
|
|
135
|
+
return { content, path };
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=_util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_util.js","sourceRoot":"","sources":["../../../../src/orchestrator/checkpoints/renderers/_util.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,OAAe,EACf,QAAgB,EAChB,UAAmB;IAEnB,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,KAAK,CAAC,MAAM,IAAI,QAAQ;QAAE,OAAO,OAAO,CAAC;IAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC;IACxC,MAAM,SAA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
* Renderer for `code-review` artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Shows: summary, critical count + first 5 with evidence (file:line),
|
|
5
|
+
* important count, minor count, approved areas. Caps output at 300 lines.
|
|
6
|
+
*
|
|
7
|
+
* Pure function — no I/O. Receives the parsed ReviewResult object directly.
|
|
8
|
+
*
|
|
9
|
+
* Sprint 11 — colocated in renderers/ per mechanisms/ precedent.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Render a `code-review` artifact as markdown.
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderCodeReview(artifact: unknown): string;
|
|
15
|
+
//# sourceMappingURL=code-review.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-review.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/checkpoints/renderers/code-review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAuCH;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CA+C1D"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderer for `code-review` artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Shows: summary, critical count + first 5 with evidence (file:line),
|
|
5
|
+
* important count, minor count, approved areas. Caps output at 300 lines.
|
|
6
|
+
*
|
|
7
|
+
* Pure function — no I/O. Receives the parsed ReviewResult object directly.
|
|
8
|
+
*
|
|
9
|
+
* Sprint 11 — colocated in renderers/ per mechanisms/ precedent.
|
|
10
|
+
*/
|
|
11
|
+
import { applyLineCap } from "./_util.js";
|
|
12
|
+
/**
|
|
13
|
+
* Format a ReviewFinding bullet with evidence citation (file:line).
|
|
14
|
+
* Per AGENTS.md, every finding must cite file:line.
|
|
15
|
+
*/
|
|
16
|
+
function formatFinding(f) {
|
|
17
|
+
const ev = f.evidence?.[0];
|
|
18
|
+
const citation = ev ? ` — \`${ev.path ?? "?"}:${ev.line ?? "?"}\`` : "";
|
|
19
|
+
const desc = f.description ?? "(no description)";
|
|
20
|
+
return `- ${desc}${citation}`;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Render a `code-review` artifact as markdown.
|
|
24
|
+
*/
|
|
25
|
+
export function renderCodeReview(artifact) {
|
|
26
|
+
const r = (artifact ?? {});
|
|
27
|
+
const critical = r.critical ?? [];
|
|
28
|
+
const important = r.important ?? [];
|
|
29
|
+
const minor = r.minor ?? [];
|
|
30
|
+
const approvedAreas = r.approvedAreas ?? [];
|
|
31
|
+
const lines = [
|
|
32
|
+
`## Code Review`,
|
|
33
|
+
``,
|
|
34
|
+
];
|
|
35
|
+
if (r.contractId) {
|
|
36
|
+
lines.push(`**Contract:** \`${r.contractId}\``);
|
|
37
|
+
lines.push(``);
|
|
38
|
+
}
|
|
39
|
+
if (r.summary) {
|
|
40
|
+
lines.push(`### Summary`);
|
|
41
|
+
lines.push(r.summary);
|
|
42
|
+
lines.push(``);
|
|
43
|
+
}
|
|
44
|
+
lines.push(`### Findings`);
|
|
45
|
+
lines.push(``);
|
|
46
|
+
lines.push(`- **Critical:** ${critical.length}`);
|
|
47
|
+
lines.push(`- **Important:** ${important.length}`);
|
|
48
|
+
lines.push(`- **Minor:** ${minor.length}`);
|
|
49
|
+
lines.push(``);
|
|
50
|
+
if (critical.length > 0) {
|
|
51
|
+
lines.push(`### Critical findings (first 5)`);
|
|
52
|
+
for (const f of critical.slice(0, 5)) {
|
|
53
|
+
lines.push(formatFinding(f));
|
|
54
|
+
}
|
|
55
|
+
lines.push(``);
|
|
56
|
+
}
|
|
57
|
+
if (approvedAreas.length > 0) {
|
|
58
|
+
lines.push(`### Approved areas`);
|
|
59
|
+
for (const area of approvedAreas) {
|
|
60
|
+
lines.push(`- ${area}`);
|
|
61
|
+
}
|
|
62
|
+
lines.push(``);
|
|
63
|
+
}
|
|
64
|
+
return applyLineCap(lines.join("\n"), 300);
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=code-review.js.map
|
|
@@ -0,0 +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C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderer for `curator-briefing` artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Extracts: title (H1), contract id, section count, first 3 lines of sprint summary,
|
|
5
|
+
* and file path citation count. Caps output at 300 lines.
|
|
6
|
+
*
|
|
7
|
+
* Pure function — no I/O. Mechanisms must preload file content into artifact.content.
|
|
8
|
+
*
|
|
9
|
+
* Sprint 11 — colocated in renderers/ per mechanisms/ precedent.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Render a `curator-briefing` artifact as markdown.
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderCuratorBriefing(artifact: unknown): string;
|
|
15
|
+
//# sourceMappingURL=curator-briefing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"curator-briefing.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/checkpoints/renderers/curator-briefing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAUH;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CA+B/D"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderer for `curator-briefing` artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Extracts: title (H1), contract id, section count, first 3 lines of sprint summary,
|
|
5
|
+
* and file path citation count. Caps output at 300 lines.
|
|
6
|
+
*
|
|
7
|
+
* Pure function — no I/O. Mechanisms must preload file content into artifact.content.
|
|
8
|
+
*
|
|
9
|
+
* Sprint 11 — colocated in renderers/ per mechanisms/ precedent.
|
|
10
|
+
*/
|
|
11
|
+
import { applyLineCap, extractH1, countH2Sections, firstNNonBlankAfter, extractMarkdownContent, } from "./_util.js";
|
|
12
|
+
/**
|
|
13
|
+
* Render a `curator-briefing` artifact as markdown.
|
|
14
|
+
*/
|
|
15
|
+
export function renderCuratorBriefing(artifact) {
|
|
16
|
+
const { content, path } = extractMarkdownContent(artifact);
|
|
17
|
+
const title = extractH1(content) ?? "(untitled briefing)";
|
|
18
|
+
// Extract contract id from `**Contract:** \`<id>\``
|
|
19
|
+
const contractMatch = /\*\*Contract:\*\*\s+`([^`]+)`/.exec(content);
|
|
20
|
+
const contractId = contractMatch ? contractMatch[1] : "unknown";
|
|
21
|
+
const sectionCount = countH2Sections(content);
|
|
22
|
+
// First 3 lines of ## 0. Sprint Summary body
|
|
23
|
+
const sprintSummary = firstNNonBlankAfter(content, 3, /^##\s+0\.\s+Sprint Summary/i);
|
|
24
|
+
// Count file path references (backtick-quoted paths starting with . or src/)
|
|
25
|
+
const filePathMatches = content.match(/`(?:\.bober|src\/)[^`]+`/g);
|
|
26
|
+
const filePathCount = filePathMatches ? filePathMatches.length : 0;
|
|
27
|
+
const lines = [
|
|
28
|
+
`## Curator Briefing: ${title}`,
|
|
29
|
+
``,
|
|
30
|
+
`- **Contract:** \`${contractId}\``,
|
|
31
|
+
`- **Sections:** ${sectionCount}`,
|
|
32
|
+
`- **File paths cited:** ${filePathCount}`,
|
|
33
|
+
``,
|
|
34
|
+
`### Sprint summary (first 3 lines)`,
|
|
35
|
+
...sprintSummary,
|
|
36
|
+
``,
|
|
37
|
+
];
|
|
38
|
+
return applyLineCap(lines.join("\n"), 300, path);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=curator-briefing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"curator-briefing.js","sourceRoot":"","sources":["../../../../src/orchestrator/checkpoints/renderers/curator-briefing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,YAAY,EACZ,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAAiB;IACrD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IAE3D,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,qBAAqB,CAAC;IAE1D,oDAAoD;IACpD,MAAM,aAAa,GAAG,+BAA+B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpE,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEhE,MAAM,YAAY,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAE9C,6CAA6C;IAC7C,MAAM,aAAa,GAAG,mBAAmB,CAAC,OAAO,EAAE,CAAC,EAAE,6BAA6B,CAAC,CAAC;IAErF,6EAA6E;IAC7E,MAAM,eAAe,GAAG,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACnE,MAAM,aAAa,GAAG,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnE,MAAM,KAAK,GAAa;QACtB,wBAAwB,KAAK,EAAE;QAC/B,EAAE;QACF,qBAAqB,UAAU,IAAI;QACnC,mBAAmB,YAAY,EAAE;QACjC,2BAA2B,aAAa,EAAE;QAC1C,EAAE;QACF,oCAAoC;QACpC,GAAG,aAAa;QAChB,EAAE;KACH,CAAC;IAEF,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderer for `eval-result` artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Shows: overallResult, score (passed/failed/total), failing criteria,
|
|
5
|
+
* strategy results (exit codes only — no full stdout). Caps output at 300 lines.
|
|
6
|
+
*
|
|
7
|
+
* Pure function — no I/O. Receives the parsed eval result object directly.
|
|
8
|
+
*
|
|
9
|
+
* Sprint 11 — colocated in renderers/ per mechanisms/ precedent.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Render an `eval-result` artifact as markdown.
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderEvalResult(artifact: unknown): string;
|
|
15
|
+
//# sourceMappingURL=eval-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eval-result.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/checkpoints/renderers/eval-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAkCH;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CA6C1D"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderer for `eval-result` artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Shows: overallResult, score (passed/failed/total), failing criteria,
|
|
5
|
+
* strategy results (exit codes only — no full stdout). Caps output at 300 lines.
|
|
6
|
+
*
|
|
7
|
+
* Pure function — no I/O. Receives the parsed eval result object directly.
|
|
8
|
+
*
|
|
9
|
+
* Sprint 11 — colocated in renderers/ per mechanisms/ precedent.
|
|
10
|
+
*/
|
|
11
|
+
import { applyLineCap } from "./_util.js";
|
|
12
|
+
/**
|
|
13
|
+
* Render an `eval-result` artifact as markdown.
|
|
14
|
+
*/
|
|
15
|
+
export function renderEvalResult(artifact) {
|
|
16
|
+
const e = (artifact ?? {});
|
|
17
|
+
// Handle both `overallResult` and `passed` boolean shapes
|
|
18
|
+
const overall = e.overallResult ?? (e.passed === true ? "pass" : e.passed === false ? "fail" : "unknown");
|
|
19
|
+
const score = e.score;
|
|
20
|
+
const failing = (e.criteriaResults ?? []).filter((c) => c.result !== "pass" && c.result !== undefined);
|
|
21
|
+
const lines = [
|
|
22
|
+
`## Eval Result: **${overall.toUpperCase()}**`,
|
|
23
|
+
``,
|
|
24
|
+
`- **Score:** ${score?.criteriaPassed ?? 0}/${score?.criteriaTotal ?? 0} (${score?.criteriaFailed ?? 0} failed)`,
|
|
25
|
+
``,
|
|
26
|
+
];
|
|
27
|
+
// Strategy results — exit codes only (no full stdout)
|
|
28
|
+
if (e.strategyResults && e.strategyResults.length > 0) {
|
|
29
|
+
lines.push(`### Strategies`);
|
|
30
|
+
for (const s of e.strategyResults) {
|
|
31
|
+
const req = s.required === true ? " (required)" : "";
|
|
32
|
+
lines.push(`- \`${s.strategy}\`${req}: **${s.result}**`);
|
|
33
|
+
}
|
|
34
|
+
lines.push(``);
|
|
35
|
+
}
|
|
36
|
+
// Failing criteria
|
|
37
|
+
lines.push(`### Failing criteria (${failing.length})`);
|
|
38
|
+
if (failing.length === 0) {
|
|
39
|
+
lines.push(`_All criteria passed._`);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
for (const c of failing) {
|
|
43
|
+
const feedback = c.feedback ?? c.evidence ?? "(no feedback)";
|
|
44
|
+
lines.push(`- **${c.criterionId ?? "?"}**: ${feedback}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (e.summary) {
|
|
48
|
+
lines.push(``);
|
|
49
|
+
lines.push(`### Summary`);
|
|
50
|
+
lines.push(e.summary);
|
|
51
|
+
}
|
|
52
|
+
return applyLineCap(lines.join("\n"), 300);
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=eval-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eval-result.js","sourceRoot":"","sources":["../../../../src/orchestrator/checkpoints/renderers/eval-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAgC1C;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAiB;IAChD,MAAM,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAmB,CAAC;IAE7C,0DAA0D;IAC1D,MAAM,OAAO,GAAG,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CA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AAC;QACzB,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;IACvC,CAAC;SAAM,CAAC;QACN,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACxB,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,IAAI,eAAe,CAAC;YAC7D,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,IAAI,GAAG,OAAO,QAAQ,EAAE,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IAED,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QACd,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC1B,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;IAED,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderer for `generator-diff` artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Shows: git diff --stat of the sprint's commits, list of files changed
|
|
5
|
+
* (created/modified/deleted), commit count, and per-file diff (truncated
|
|
6
|
+
* at 50 lines per file). Skips binary files (lists but does not render inline).
|
|
7
|
+
*
|
|
8
|
+
* This is the ONLY renderer allowed to shell out (to git).
|
|
9
|
+
* All git calls go through the GitClient interface for testability.
|
|
10
|
+
*
|
|
11
|
+
* Exports two functions:
|
|
12
|
+
* - `renderGeneratorDiff(artifact)` — SYNC, no git I/O, uses filesChanged list only.
|
|
13
|
+
* Used by the registry dispatch (sync constraint).
|
|
14
|
+
* - `renderGeneratorDiffAsync(artifact, git?)` — ASYNC, full git diff.
|
|
15
|
+
* May be called directly by mechanisms that can await.
|
|
16
|
+
*
|
|
17
|
+
* Sprint 11 — colocated in renderers/ per mechanisms/ precedent.
|
|
18
|
+
*/
|
|
19
|
+
/** Mockable seam for git operations — mirrors GhClient pattern in pr.ts. */
|
|
20
|
+
export interface GitClient {
|
|
21
|
+
diffStat(base: string, head: string, cwd: string): Promise<string>;
|
|
22
|
+
diffNumstat(base: string, head: string, cwd: string): Promise<Array<{
|
|
23
|
+
added: string;
|
|
24
|
+
deleted: string;
|
|
25
|
+
path: string;
|
|
26
|
+
}>>;
|
|
27
|
+
diffFile(filePath: string, base: string, head: string, cwd: string): Promise<string>;
|
|
28
|
+
revListCount(base: string, head: string, cwd: string): Promise<number>;
|
|
29
|
+
}
|
|
30
|
+
/** Default GitClient implementation — wraps execa. */
|
|
31
|
+
export declare function createGitClient(): GitClient;
|
|
32
|
+
/**
|
|
33
|
+
* Render a `generator-diff` artifact as markdown (SYNC version).
|
|
34
|
+
*
|
|
35
|
+
* Only uses the `filesChanged` list from the artifact — no git I/O.
|
|
36
|
+
* This is what the registry dispatch calls (sync constraint).
|
|
37
|
+
*/
|
|
38
|
+
export declare function renderGeneratorDiff(artifact: unknown): string;
|
|
39
|
+
/**
|
|
40
|
+
* Render a `generator-diff` artifact as markdown (ASYNC version with git I/O).
|
|
41
|
+
*
|
|
42
|
+
* When baseRef/headRef are available, shells out to git for stat and per-file diffs.
|
|
43
|
+
* Falls back to showing just the filesChanged list when refs are unavailable.
|
|
44
|
+
*
|
|
45
|
+
* @param artifact - The generator-diff artifact.
|
|
46
|
+
* @param git - Injectable GitClient (default: createGitClient()).
|
|
47
|
+
*/
|
|
48
|
+
export declare function renderGeneratorDiffAsync(artifact: unknown, git?: GitClient): Promise<string>;
|
|
49
|
+
//# sourceMappingURL=generator-diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-diff.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/checkpoints/renderers/generator-diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAOH,4EAA4E;AAC5E,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACnE,WAAW,CACT,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;IACpE,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACxE;AAED,sDAAsD;AACtD,wBAAgB,eAAe,IAAI,SAAS,CA4C3C;AAWD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAwB7D;AAED;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,CAC5C,QAAQ,EAAE,OAAO,EACjB,GAAG,GAAE,SAA6B,GACjC,OAAO,CAAC,MAAM,CAAC,CA6EjB"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderer for `generator-diff` artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Shows: git diff --stat of the sprint's commits, list of files changed
|
|
5
|
+
* (created/modified/deleted), commit count, and per-file diff (truncated
|
|
6
|
+
* at 50 lines per file). Skips binary files (lists but does not render inline).
|
|
7
|
+
*
|
|
8
|
+
* This is the ONLY renderer allowed to shell out (to git).
|
|
9
|
+
* All git calls go through the GitClient interface for testability.
|
|
10
|
+
*
|
|
11
|
+
* Exports two functions:
|
|
12
|
+
* - `renderGeneratorDiff(artifact)` — SYNC, no git I/O, uses filesChanged list only.
|
|
13
|
+
* Used by the registry dispatch (sync constraint).
|
|
14
|
+
* - `renderGeneratorDiffAsync(artifact, git?)` — ASYNC, full git diff.
|
|
15
|
+
* May be called directly by mechanisms that can await.
|
|
16
|
+
*
|
|
17
|
+
* Sprint 11 — colocated in renderers/ per mechanisms/ precedent.
|
|
18
|
+
*/
|
|
19
|
+
import { execa } from "execa";
|
|
20
|
+
import { applyLineCap } from "./_util.js";
|
|
21
|
+
const MAX_LINES_PER_FILE = 50;
|
|
22
|
+
/** Default GitClient implementation — wraps execa. */
|
|
23
|
+
export function createGitClient() {
|
|
24
|
+
return {
|
|
25
|
+
async diffStat(base, head, cwd) {
|
|
26
|
+
const r = await execa("git", ["diff", "--stat", `${base}..${head}`], { cwd, reject: false });
|
|
27
|
+
return r.stdout ?? "";
|
|
28
|
+
},
|
|
29
|
+
async diffNumstat(base, head, cwd) {
|
|
30
|
+
const r = await execa("git", ["diff", "--numstat", `${base}..${head}`], { cwd, reject: false });
|
|
31
|
+
const lines = (r.stdout ?? "").split("\n").filter(Boolean);
|
|
32
|
+
return lines.map((line) => {
|
|
33
|
+
const parts = line.split("\t");
|
|
34
|
+
return {
|
|
35
|
+
added: parts[0] ?? "-",
|
|
36
|
+
deleted: parts[1] ?? "-",
|
|
37
|
+
path: parts[2] ?? "",
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
async diffFile(filePath, base, head, cwd) {
|
|
42
|
+
const r = await execa("git", ["diff", "--unified=3", `${base}..${head}`, "--", filePath], { cwd, reject: false });
|
|
43
|
+
return r.stdout ?? "";
|
|
44
|
+
},
|
|
45
|
+
async revListCount(base, head, cwd) {
|
|
46
|
+
const r = await execa("git", ["rev-list", "--count", `${base}..${head}`], { cwd, reject: false });
|
|
47
|
+
const n = parseInt((r.stdout ?? "").trim(), 10);
|
|
48
|
+
return isNaN(n) ? 0 : n;
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Render a `generator-diff` artifact as markdown (SYNC version).
|
|
54
|
+
*
|
|
55
|
+
* Only uses the `filesChanged` list from the artifact — no git I/O.
|
|
56
|
+
* This is what the registry dispatch calls (sync constraint).
|
|
57
|
+
*/
|
|
58
|
+
export function renderGeneratorDiff(artifact) {
|
|
59
|
+
const a = (artifact ?? {});
|
|
60
|
+
const filesChanged = a.filesChanged ?? [];
|
|
61
|
+
const commit = a.commit ?? a.headRef ?? "unknown";
|
|
62
|
+
const lines = [
|
|
63
|
+
`## Generator Diff`,
|
|
64
|
+
``,
|
|
65
|
+
`- **Commit:** \`${commit}\``,
|
|
66
|
+
``,
|
|
67
|
+
];
|
|
68
|
+
if (filesChanged.length > 0) {
|
|
69
|
+
lines.push(`### Files changed (${filesChanged.length})`);
|
|
70
|
+
for (const f of filesChanged) {
|
|
71
|
+
lines.push(`- \`${f.path}\` (${f.action})`);
|
|
72
|
+
}
|
|
73
|
+
lines.push(``);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
lines.push(`_No files listed in artifact._`);
|
|
77
|
+
lines.push(``);
|
|
78
|
+
}
|
|
79
|
+
return lines.join("\n");
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Render a `generator-diff` artifact as markdown (ASYNC version with git I/O).
|
|
83
|
+
*
|
|
84
|
+
* When baseRef/headRef are available, shells out to git for stat and per-file diffs.
|
|
85
|
+
* Falls back to showing just the filesChanged list when refs are unavailable.
|
|
86
|
+
*
|
|
87
|
+
* @param artifact - The generator-diff artifact.
|
|
88
|
+
* @param git - Injectable GitClient (default: createGitClient()).
|
|
89
|
+
*/
|
|
90
|
+
export async function renderGeneratorDiffAsync(artifact, git = createGitClient()) {
|
|
91
|
+
const a = (artifact ?? {});
|
|
92
|
+
const filesChanged = a.filesChanged ?? [];
|
|
93
|
+
const cwd = a.cwd ?? process.cwd();
|
|
94
|
+
const lines = [`## Generator Diff`, ``];
|
|
95
|
+
// If we have refs, shell out for stat and per-file diffs.
|
|
96
|
+
const baseRef = a.baseRef;
|
|
97
|
+
const headRef = a.headRef ?? a.commit ?? "HEAD";
|
|
98
|
+
if (baseRef) {
|
|
99
|
+
try {
|
|
100
|
+
const commitCount = await git.revListCount(baseRef, headRef, cwd);
|
|
101
|
+
lines.push(`- **Commits:** ${commitCount}`);
|
|
102
|
+
lines.push(``);
|
|
103
|
+
const stat = await git.diffStat(baseRef, headRef, cwd);
|
|
104
|
+
if (stat.trim()) {
|
|
105
|
+
lines.push(`### Diff stat`);
|
|
106
|
+
lines.push("```");
|
|
107
|
+
lines.push(stat.trim());
|
|
108
|
+
lines.push("```");
|
|
109
|
+
lines.push(``);
|
|
110
|
+
}
|
|
111
|
+
// Get numstat to identify binary files
|
|
112
|
+
const numstat = await git.diffNumstat(baseRef, headRef, cwd);
|
|
113
|
+
const binaryPaths = new Set(numstat.filter((e) => e.added === "-" && e.deleted === "-").map((e) => e.path));
|
|
114
|
+
const textPaths = numstat
|
|
115
|
+
.filter((e) => e.added !== "-" || e.deleted !== "-")
|
|
116
|
+
.map((e) => e.path);
|
|
117
|
+
if (binaryPaths.size > 0) {
|
|
118
|
+
lines.push(`### Binary files (not rendered inline)`);
|
|
119
|
+
for (const p of binaryPaths) {
|
|
120
|
+
lines.push(`- \`${p}\``);
|
|
121
|
+
}
|
|
122
|
+
lines.push(``);
|
|
123
|
+
}
|
|
124
|
+
// Per-file diffs (text files only, truncated at 50 lines)
|
|
125
|
+
if (textPaths.length > 0) {
|
|
126
|
+
lines.push(`### Per-file diffs`);
|
|
127
|
+
lines.push(``);
|
|
128
|
+
for (const filePath of textPaths.slice(0, 10)) {
|
|
129
|
+
const fileDiff = await git.diffFile(filePath, baseRef, headRef, cwd);
|
|
130
|
+
const diffLines = fileDiff.split("\n");
|
|
131
|
+
const truncated = applyLineCap(diffLines.join("\n"), MAX_LINES_PER_FILE, `${filePath}:1`);
|
|
132
|
+
lines.push(`#### \`${filePath}\``);
|
|
133
|
+
lines.push("```diff");
|
|
134
|
+
lines.push(truncated);
|
|
135
|
+
lines.push("```");
|
|
136
|
+
lines.push(``);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
// If git fails, fall through to file list
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
// Always show the filesChanged list from the artifact
|
|
145
|
+
if (filesChanged.length > 0) {
|
|
146
|
+
lines.push(`### Files changed (${filesChanged.length})`);
|
|
147
|
+
for (const f of filesChanged) {
|
|
148
|
+
lines.push(`- \`${f.path}\` (${f.action})`);
|
|
149
|
+
}
|
|
150
|
+
lines.push(``);
|
|
151
|
+
}
|
|
152
|
+
return lines.join("\n");
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=generator-diff.js.map
|