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
package/dist/mcp/tools/index.js
CHANGED
|
@@ -19,28 +19,64 @@ import { registerReactTool } from "./react.js";
|
|
|
19
19
|
import { registerSolidityTool } from "./solidity.js";
|
|
20
20
|
import { registerAnchorTool } from "./anchor.js";
|
|
21
21
|
import { registerPlaywrightTool } from "./playwright.js";
|
|
22
|
+
import { registerListActiveRunsTool } from "./list-active-runs.js";
|
|
23
|
+
import { registerGetRunStatusTool } from "./get-run-status.js";
|
|
24
|
+
import { registerAbortRunTool } from "./abort-run.js";
|
|
25
|
+
import { registerSubscribeEventsTool } from "./subscribe-events.js";
|
|
26
|
+
import { registerUnsubscribeEventsTool } from "./unsubscribe-events.js";
|
|
27
|
+
import { registerRunInWorktreeTool } from "./run-in-worktree.js";
|
|
28
|
+
import { registerListPendingApprovalsTool } from "./list-pending-approvals.js";
|
|
29
|
+
import { registerApproveCheckpointTool } from "./approve-checkpoint.js";
|
|
30
|
+
import { registerRejectCheckpointTool } from "./reject-checkpoint.js";
|
|
31
|
+
import { registerListProjectsTool } from "./list-projects.js";
|
|
32
|
+
import { registerListSpecsTool } from "./list-specs.js";
|
|
33
|
+
import { registerGetProjectStateTool } from "./get-project-state.js";
|
|
34
|
+
import { registerIncidentTools } from "./incident.js";
|
|
35
|
+
import { registerRollbackTool } from "./rollback.js";
|
|
36
|
+
import { registerPostmortemTool } from "./postmortem.js";
|
|
37
|
+
import { registerPlaybookTools } from "./playbook.js";
|
|
22
38
|
/**
|
|
23
39
|
* Registers all built-in agent-bober MCP tools into the global registry.
|
|
24
40
|
* Call this once before starting the MCP server.
|
|
25
41
|
*
|
|
26
|
-
* Registered tools (
|
|
27
|
-
* 1. bober_init
|
|
28
|
-
* 2. bober_plan
|
|
29
|
-
* 3. bober_sprint
|
|
30
|
-
* 4. bober_eval
|
|
31
|
-
* 5. bober_run
|
|
32
|
-
* 6. bober_status
|
|
33
|
-
* 7. bober_contracts
|
|
34
|
-
* 8. bober_spec
|
|
35
|
-
* 9. bober_principles
|
|
36
|
-
* 10. bober_config
|
|
37
|
-
* 11. bober_architect
|
|
38
|
-
* 12. bober_research
|
|
39
|
-
* 13. bober_brownfield
|
|
40
|
-
* 14. bober_react
|
|
41
|
-
* 15. bober_solidity
|
|
42
|
-
* 16. bober_anchor
|
|
43
|
-
* 17. bober_playwright
|
|
42
|
+
* Registered tools (37 total):
|
|
43
|
+
* 1. bober_init – Initialise a project
|
|
44
|
+
* 2. bober_plan – Generate a sprint plan
|
|
45
|
+
* 3. bober_sprint – Execute the next sprint cycle
|
|
46
|
+
* 4. bober_eval – Evaluate a sprint
|
|
47
|
+
* 5. bober_run – Start the full pipeline asynchronously
|
|
48
|
+
* 6. bober_status – Poll pipeline status
|
|
49
|
+
* 7. bober_contracts – List/read sprint contracts
|
|
50
|
+
* 8. bober_spec – Read the latest plan spec
|
|
51
|
+
* 9. bober_principles – Read/write .bober/principles.md
|
|
52
|
+
* 10. bober_config – Read/update bober.config.json
|
|
53
|
+
* 11. bober_architect – Solution architecture (5-checkpoint flow + ADRs)
|
|
54
|
+
* 12. bober_research – Two-phase codebase research (fact-only)
|
|
55
|
+
* 13. bober_brownfield – Brownfield pipeline (existing codebase)
|
|
56
|
+
* 14. bober_react – React web application pipeline
|
|
57
|
+
* 15. bober_solidity – EVM smart contract pipeline
|
|
58
|
+
* 16. bober_anchor – Solana program pipeline (Anchor)
|
|
59
|
+
* 17. bober_playwright – Playwright E2E setup and runner
|
|
60
|
+
* 18. bober_list_active_runs – List all runs by status
|
|
61
|
+
* 19. bober_get_run_status – Get one run by runId
|
|
62
|
+
* 20. bober_abort_run – Abort a run by runId
|
|
63
|
+
* 21. bober_subscribe_events – Subscribe to runId-scoped event notifications
|
|
64
|
+
* 22. bober_unsubscribe_events – Unsubscribe from a runId-scoped event stream
|
|
65
|
+
* 23. bober_run_in_worktree – Start the pipeline in an isolated git worktree
|
|
66
|
+
* 24. bober_list_pending_approvals – List pending careful-flow checkpoints
|
|
67
|
+
* 25. bober_approve_checkpoint – Approve a pending checkpoint (writes .approved.json)
|
|
68
|
+
* 26. bober_reject_checkpoint – Reject a pending checkpoint with feedback
|
|
69
|
+
* 27. bober_list_projects – Enumerate projects under one or more search roots
|
|
70
|
+
* 28. bober_list_specs – List PlanSpecs in a project
|
|
71
|
+
* 29. bober_get_project_state – Aggregate per-project counts for the cockpit sidebar
|
|
72
|
+
* 30. bober_incident_start – Create a new incident from a symptom
|
|
73
|
+
* 31. bober_incident_status – Read the current status of an incident
|
|
74
|
+
* 32. bober_incident_list – List all incidents sorted by createdAt descending
|
|
75
|
+
* 33. bober_incident_abort – Abort an incident at any phase (terminal)
|
|
76
|
+
* 34. bober_rollback_start – Plan and execute rollback for an incident
|
|
77
|
+
* 35. bober_postmortem_get – Read incident postmortem.md and return parsed content
|
|
78
|
+
* 36. bober_playbook_list – List all playbooks from .bober/playbooks/
|
|
79
|
+
* 37. bober_playbook_search – Search playbooks matching a symptom
|
|
44
80
|
*/
|
|
45
81
|
export function registerAllTools() {
|
|
46
82
|
// ── Core workflow tools ─────────────────────────────────────────
|
|
@@ -52,6 +88,7 @@ export function registerAllTools() {
|
|
|
52
88
|
registerResearchTool();
|
|
53
89
|
// ── Async pipeline tools ────────────────────────────────────────
|
|
54
90
|
registerRunTool();
|
|
91
|
+
registerRunInWorktreeTool();
|
|
55
92
|
registerBrownfieldTool();
|
|
56
93
|
registerReactTool();
|
|
57
94
|
registerSolidityTool();
|
|
@@ -59,6 +96,25 @@ export function registerAllTools() {
|
|
|
59
96
|
registerStatusTool();
|
|
60
97
|
// ── Utility tools ──────────────────────────────────────────────
|
|
61
98
|
registerPlaywrightTool();
|
|
99
|
+
// ── Multi-run management tools ─────────────────────────────────
|
|
100
|
+
registerListActiveRunsTool();
|
|
101
|
+
registerGetRunStatusTool();
|
|
102
|
+
registerAbortRunTool();
|
|
103
|
+
// ── Event stream tools (cockpit-integration sprint 3) ──────────
|
|
104
|
+
registerSubscribeEventsTool();
|
|
105
|
+
registerUnsubscribeEventsTool();
|
|
106
|
+
// ── Cockpit careful-flow + discovery tools (cockpit-integration sprint 5) ──
|
|
107
|
+
registerListPendingApprovalsTool();
|
|
108
|
+
registerApproveCheckpointTool();
|
|
109
|
+
registerRejectCheckpointTool();
|
|
110
|
+
registerListProjectsTool();
|
|
111
|
+
registerListSpecsTool();
|
|
112
|
+
registerGetProjectStateTool();
|
|
113
|
+
// ── Vision-era incident/rollback/postmortem/playbook (cockpit-integration sprint 6) ──
|
|
114
|
+
registerIncidentTools();
|
|
115
|
+
registerRollbackTool();
|
|
116
|
+
registerPostmortemTool();
|
|
117
|
+
registerPlaybookTools();
|
|
62
118
|
// ── Read / configuration tools ──────────────────────────────────
|
|
63
119
|
registerContractsTool();
|
|
64
120
|
registerSpecTool();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/tools/index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,EAAE;AACF,qEAAqE;AACrE,qEAAqE;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/tools/index.ts"],"names":[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A8E;IAC9E,gCAAgC,EAAE,CAAC;IACnC,6BAA6B,EAAE,CAAC;IAChC,4BAA4B,EAAE,CAAC;IAC/B,wBAAwB,EAAE,CAAC;IAC3B,qBAAqB,EAAE,CAAC;IACxB,2BAA2B,EAAE,CAAC;IAE9B,wFAAwF;IACxF,qBAAqB,EAAE,CAAC;IACxB,oBAAoB,EAAE,CAAC;IACvB,sBAAsB,EAAE,CAAC;IACzB,qBAAqB,EAAE,CAAC;IAExB,mEAAmE;IACnE,qBAAqB,EAAE,CAAC;IACxB,gBAAgB,EAAE,CAAC;IACnB,sBAAsB,EAAE,CAAC;IACzB,kBAAkB,EAAE,CAAC;AACvB,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-active-runs.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/list-active-runs.ts"],"names":[],"mappings":"AAWA,wBAAgB,0BAA0B,IAAI,IAAI,CA6BjD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// ── bober_list_active_runs tool ──────────────────────────────────────
|
|
2
|
+
//
|
|
3
|
+
// Returns all known runs tracked by the RunManager, optionally filtered
|
|
4
|
+
// by status. When no status filter is provided, all runs are returned
|
|
5
|
+
// regardless of their current status.
|
|
6
|
+
import { registerTool } from "./registry.js";
|
|
7
|
+
import { runManager } from "../run-manager.js";
|
|
8
|
+
// ── Registration ─────────────────────────────────────────────────────
|
|
9
|
+
export function registerListActiveRunsTool() {
|
|
10
|
+
registerTool({
|
|
11
|
+
name: "bober_list_active_runs",
|
|
12
|
+
description: "List all runs tracked by the multi-run RunManager. " +
|
|
13
|
+
"Optionally filter by status. Returns an array of RunState objects.",
|
|
14
|
+
inputSchema: {
|
|
15
|
+
type: "object",
|
|
16
|
+
properties: {
|
|
17
|
+
status: {
|
|
18
|
+
type: "string",
|
|
19
|
+
enum: ["running", "completed", "failed", "aborted"],
|
|
20
|
+
description: "Optional status filter. Omit to return all runs.",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
additionalProperties: false,
|
|
24
|
+
},
|
|
25
|
+
handler: async (args) => {
|
|
26
|
+
const statusFilter = typeof args.status === "string" ? args.status : undefined;
|
|
27
|
+
const all = runManager.listAllRuns();
|
|
28
|
+
const filtered = statusFilter
|
|
29
|
+
? all.filter((s) => s.status === statusFilter)
|
|
30
|
+
: all;
|
|
31
|
+
return JSON.stringify(filtered, null, 2);
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=list-active-runs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-active-runs.js","sourceRoot":"","sources":["../../../src/mcp/tools/list-active-runs.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,sCAAsC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,wEAAwE;AAExE,MAAM,UAAU,0BAA0B;IACxC,YAAY,CAAC;QACX,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACT,qDAAqD;YACrD,oEAAoE;QACtE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC;oBACnD,WAAW,EAAE,kDAAkD;iBAChE;aACF;YACD,oBAAoB,EAAE,KAAK;SAC5B;QACD,OAAO,EAAE,KAAK,EAAE,IAA6B,EAAmB,EAAE;YAChE,MAAM,YAAY,GAChB,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YAE5D,MAAM,GAAG,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;YACrC,MAAM,QAAQ,GAAG,YAAY;gBAC3B,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,YAAY,CAAC;gBAC9C,CAAC,CAAC,GAAG,CAAC;YAER,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC3C,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-pending-approvals.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/list-pending-approvals.ts"],"names":[],"mappings":"AAgBA,wBAAgB,gCAAgC,IAAI,IAAI,CA6BvD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// ── bober_list_pending_approvals tool ────────────────────────────────
|
|
2
|
+
//
|
|
3
|
+
// Returns all pending checkpoints in cockpit-row shape:
|
|
4
|
+
// [{ checkpointId, ageMs, prompt }]
|
|
5
|
+
// Optional projectPath (must be absolute when supplied).
|
|
6
|
+
//
|
|
7
|
+
// Sprint 5 (cockpit-integration)
|
|
8
|
+
import { cwd } from "node:process";
|
|
9
|
+
import { isAbsolute } from "node:path";
|
|
10
|
+
import { registerTool } from "./registry.js";
|
|
11
|
+
import { listPendingApprovals } from "../../state/approval-state.js";
|
|
12
|
+
// ── Registration ─────────────────────────────────────────────────────
|
|
13
|
+
export function registerListPendingApprovalsTool() {
|
|
14
|
+
registerTool({
|
|
15
|
+
name: "bober_list_pending_approvals",
|
|
16
|
+
description: "List all pending careful-flow checkpoints awaiting human approval. " +
|
|
17
|
+
"Returns an array of { checkpointId, ageMs, prompt } — the same shape " +
|
|
18
|
+
"as `bober list-approvals --json`. Optional projectPath defaults to cwd; " +
|
|
19
|
+
"when supplied it MUST be absolute.",
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {
|
|
23
|
+
projectPath: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "Absolute path to the project root. Defaults to cwd when omitted.",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
additionalProperties: false,
|
|
29
|
+
},
|
|
30
|
+
handler: async (args) => {
|
|
31
|
+
const projectPath = typeof args.projectPath === "string" ? args.projectPath : cwd();
|
|
32
|
+
if (typeof args.projectPath === "string" && !isAbsolute(args.projectPath)) {
|
|
33
|
+
return JSON.stringify({ error: "projectPath must be absolute" });
|
|
34
|
+
}
|
|
35
|
+
const rows = await listPendingApprovals(projectPath);
|
|
36
|
+
return JSON.stringify(rows, null, 2);
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=list-pending-approvals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-pending-approvals.js","sourceRoot":"","sources":["../../../src/mcp/tools/list-pending-approvals.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,EAAE;AACF,wDAAwD;AACxD,sCAAsC;AACtC,yDAAyD;AACzD,EAAE;AACF,iCAAiC;AAEjC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,wEAAwE;AAExE,MAAM,UAAU,gCAAgC;IAC9C,YAAY,CAAC;QACX,IAAI,EAAE,8BAA8B;QACpC,WAAW,EACT,qEAAqE;YACrE,uEAAuE;YACvE,0EAA0E;YAC1E,oCAAoC;QACtC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,kEAAkE;iBACrE;aACF;YACD,oBAAoB,EAAE,KAAK;SAC5B;QACD,OAAO,EAAE,KAAK,EAAE,IAA6B,EAAmB,EAAE;YAChE,MAAM,WAAW,GACf,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YAClE,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC1E,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,8BAA8B,EAAE,CAAC,CAAC;YACnE,CAAC;YACD,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,WAAW,CAAC,CAAC;YACrD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACvC,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-projects.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/list-projects.ts"],"names":[],"mappings":"AAiCA,wBAAgB,wBAAwB,IAAI,IAAI,CA4F/C"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// ── bober_list_projects tool ──────────────────────────────────────────
|
|
2
|
+
//
|
|
3
|
+
// Walks each searchRoot one level deep looking for subdirectories
|
|
4
|
+
// containing bober.config.json. Returns an array of ProjectRow objects.
|
|
5
|
+
//
|
|
6
|
+
// Behavior:
|
|
7
|
+
// - Unreadable searchRoot → soft-skip with stderr warning (never throw).
|
|
8
|
+
// - Directories without bober.config.json → silently skipped.
|
|
9
|
+
// - No caching — every call walks fresh.
|
|
10
|
+
// - Does NOT instantiate RunManager; uses readRunStatesFromDisk for
|
|
11
|
+
// per-project run enumeration.
|
|
12
|
+
//
|
|
13
|
+
// Sprint 5 (cockpit-integration)
|
|
14
|
+
import { readdir, readFile, access } from "node:fs/promises";
|
|
15
|
+
import { constants } from "node:fs";
|
|
16
|
+
import { join, basename } from "node:path";
|
|
17
|
+
import { registerTool } from "./registry.js";
|
|
18
|
+
import { readRunStatesFromDisk } from "../../state/run-state.js";
|
|
19
|
+
// ── Registration ─────────────────────────────────────────────────────
|
|
20
|
+
export function registerListProjectsTool() {
|
|
21
|
+
registerTool({
|
|
22
|
+
name: "bober_list_projects",
|
|
23
|
+
description: "Enumerate bober projects under one or more search roots by walking each root " +
|
|
24
|
+
"one level deep for directories containing bober.config.json. " +
|
|
25
|
+
"Returns [{ projectPath, name, mode?, hasActiveRuns, lastRunAt? }]. " +
|
|
26
|
+
"Unreadable roots are skipped with a stderr warning. " +
|
|
27
|
+
"Does not instantiate RunManager — reads disk state directly.",
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
searchRoots: {
|
|
32
|
+
type: "array",
|
|
33
|
+
items: { type: "string" },
|
|
34
|
+
description: "Array of absolute directory paths to search one level deep.",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
required: ["searchRoots"],
|
|
38
|
+
additionalProperties: false,
|
|
39
|
+
},
|
|
40
|
+
handler: async (args) => {
|
|
41
|
+
const searchRoots = Array.isArray(args.searchRoots)
|
|
42
|
+
? args.searchRoots.filter((x) => typeof x === "string")
|
|
43
|
+
: [];
|
|
44
|
+
if (searchRoots.length === 0) {
|
|
45
|
+
return JSON.stringify({ error: "searchRoots must be a non-empty array of strings." });
|
|
46
|
+
}
|
|
47
|
+
const rows = [];
|
|
48
|
+
for (const root of searchRoots) {
|
|
49
|
+
let dirEntries;
|
|
50
|
+
try {
|
|
51
|
+
dirEntries = await readdir(root, { withFileTypes: true });
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
process.stderr.write(`[bober_list_projects] Skipping unreadable searchRoot ${root}: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
for (const entry of dirEntries) {
|
|
58
|
+
if (!entry.isDirectory())
|
|
59
|
+
continue;
|
|
60
|
+
const projectPath = join(root, entry.name);
|
|
61
|
+
const configPath = join(projectPath, "bober.config.json");
|
|
62
|
+
try {
|
|
63
|
+
await access(configPath, constants.R_OK);
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
continue; // silently skip dirs without bober.config.json
|
|
67
|
+
}
|
|
68
|
+
// Parse minimally — only project.name and project.mode are needed.
|
|
69
|
+
let name = basename(projectPath);
|
|
70
|
+
let mode;
|
|
71
|
+
try {
|
|
72
|
+
const raw = await readFile(configPath, "utf-8");
|
|
73
|
+
const parsed = JSON.parse(raw);
|
|
74
|
+
if (parsed.project?.name)
|
|
75
|
+
name = parsed.project.name;
|
|
76
|
+
if (parsed.project?.mode)
|
|
77
|
+
mode = parsed.project.mode;
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
// keep basename fallback for name
|
|
81
|
+
}
|
|
82
|
+
// Active runs / lastRunAt — read from disk without RunManager
|
|
83
|
+
const runs = await readRunStatesFromDisk(projectPath);
|
|
84
|
+
const hasActiveRuns = runs.some((r) => r.status === "running");
|
|
85
|
+
const lastRunAt = runs.length > 0
|
|
86
|
+
? runs.map((r) => r.startedAt).sort().slice(-1)[0]
|
|
87
|
+
: undefined;
|
|
88
|
+
rows.push({
|
|
89
|
+
projectPath,
|
|
90
|
+
name,
|
|
91
|
+
...(mode !== undefined ? { mode } : {}),
|
|
92
|
+
hasActiveRuns,
|
|
93
|
+
...(lastRunAt !== undefined ? { lastRunAt } : {}),
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return JSON.stringify(rows, null, 2);
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=list-projects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-projects.js","sourceRoot":"","sources":["../../../src/m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.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/list-specs.ts"],"names":[],"mappings":"AA0BA,wBAAgB,qBAAqB,IAAI,IAAI,CAsC5C"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// ── bober_list_specs tool ─────────────────────────────────────────────
|
|
2
|
+
//
|
|
3
|
+
// Reads .bober/specs/*.json and returns an array of SpecRow objects.
|
|
4
|
+
// Uses listSpecs() from plan-state.ts which already does loose-parsing
|
|
5
|
+
// (safeParse + skip invalid files) — perfect for cockpit listing.
|
|
6
|
+
//
|
|
7
|
+
// Sprint 5 (cockpit-integration)
|
|
8
|
+
import { cwd } from "node:process";
|
|
9
|
+
import { isAbsolute } from "node:path";
|
|
10
|
+
import { registerTool } from "./registry.js";
|
|
11
|
+
import { listSpecs } from "../../state/plan-state.js";
|
|
12
|
+
// ── Registration ─────────────────────────────────────────────────────
|
|
13
|
+
export function registerListSpecsTool() {
|
|
14
|
+
registerTool({
|
|
15
|
+
name: "bober_list_specs",
|
|
16
|
+
description: "List all PlanSpecs in a project's .bober/specs/ directory. " +
|
|
17
|
+
"Returns [{ specId, title, status, sprintCount, completedAt? }]. " +
|
|
18
|
+
"Tolerates version mismatches — invalid spec files are silently skipped. " +
|
|
19
|
+
"projectPath must be absolute.",
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {
|
|
23
|
+
projectPath: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "Absolute path to the project root.",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
required: ["projectPath"],
|
|
29
|
+
additionalProperties: false,
|
|
30
|
+
},
|
|
31
|
+
handler: async (args) => {
|
|
32
|
+
const projectPath = typeof args.projectPath === "string" ? args.projectPath : cwd();
|
|
33
|
+
if (typeof args.projectPath === "string" && !isAbsolute(args.projectPath)) {
|
|
34
|
+
return JSON.stringify({ error: "projectPath must be absolute" });
|
|
35
|
+
}
|
|
36
|
+
const specs = await listSpecs(projectPath);
|
|
37
|
+
const rows = specs.map((s) => ({
|
|
38
|
+
specId: s.specId,
|
|
39
|
+
title: s.title,
|
|
40
|
+
status: s.status,
|
|
41
|
+
sprintCount: Array.isArray(s.sprints) ? s.sprints.length : 0,
|
|
42
|
+
...(s.completedAt ? { completedAt: s.completedAt } : {}),
|
|
43
|
+
}));
|
|
44
|
+
return JSON.stringify(rows, null, 2);
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=list-specs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-specs.js","sourceRoot":"","sources":["../../../src/mcp/tools/list-specs.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,qEAAqE;AACrE,uEAAuE;AACvE,kEAAkE;AAClE,EAAE;AACF,iCAAiC;AAEjC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAYtD,wEAAwE;AAExE,MAAM,UAAU,qBAAqB;IACnC,YAAY,CAAC;QACX,IAAI,EAAE,kBAAkB;QACxB,WAAW,EACT,6DAA6D;YAC7D,kEAAkE;YAClE,0EAA0E;YAC1E,+BAA+B;QACjC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oCAAoC;iBAClD;aACF;YACD,QAAQ,EAAE,CAAC,aAAa,CAAC;YACzB,oBAAoB,EAAE,KAAK;SAC5B;QACD,OAAO,EAAE,KAAK,EAAE,IAA6B,EAAmB,EAAE;YAChE,MAAM,WAAW,GACf,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YAClE,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC1E,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,8BAA8B,EAAE,CAAC,CAAC;YACnE,CAAC;YAED,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,CAAC;YAC3C,MAAM,IAAI,GAAc,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACxC,MAAM,EAAE,CAAC,CAAC,MAAM;gBAChB,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,MAAM,EAAE,CAAC,CAAC,MAAM;gBAChB,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC5D,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACzD,CAAC,CAAC,CAAC;YAEJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACvC,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/plan.ts"],"names":[],"mappings":"AAkBA,wBAAgB,gBAAgB,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/plan.ts"],"names":[],"mappings":"AAkBA,wBAAgB,gBAAgB,IAAI,IAAI,CAkIvC"}
|
package/dist/mcp/tools/plan.js
CHANGED
|
@@ -50,39 +50,65 @@ export function registerPlanTool() {
|
|
|
50
50
|
}
|
|
51
51
|
await ensureBoberDir(projectRoot);
|
|
52
52
|
try {
|
|
53
|
-
const
|
|
54
|
-
|
|
53
|
+
const plannerResult = await runPlanner(task, projectRoot, config);
|
|
54
|
+
const spec = plannerResult.spec;
|
|
55
|
+
// If the planner refused (high ambiguity), surface the open
|
|
56
|
+
// questions instead of running sprints. The MCP caller decides
|
|
57
|
+
// what to do — typically prompt the user for answers.
|
|
58
|
+
if (plannerResult.kind === "needs-clarification") {
|
|
59
|
+
return JSON.stringify({
|
|
60
|
+
specId: spec.specId,
|
|
61
|
+
status: spec.status,
|
|
62
|
+
title: spec.title,
|
|
63
|
+
description: spec.description,
|
|
64
|
+
ambiguityScore: spec.ambiguityScore,
|
|
65
|
+
clarificationQuestions: spec.clarificationQuestions,
|
|
66
|
+
savedTo: `.bober/specs/${spec.specId}.json`,
|
|
67
|
+
message: "Planner needs clarification before sprint contracts can be generated. " +
|
|
68
|
+
`Resolve via 'bober plan answer ${spec.specId} <questionId> "<answer>"' or edit the spec file directly.`,
|
|
69
|
+
}, null, 2);
|
|
70
|
+
}
|
|
71
|
+
// Generate sprint contracts from features (same as pipeline.ts).
|
|
72
|
+
// These auto-generated contracts are placeholders; planner-authored
|
|
73
|
+
// contracts (saved by the bober-planner subagent) are richer.
|
|
55
74
|
const contracts = [];
|
|
56
|
-
for (
|
|
75
|
+
for (let i = 0; i < spec.features.length; i++) {
|
|
76
|
+
const feature = spec.features[i];
|
|
57
77
|
const contract = createContract(feature.title, feature.description, feature.acceptanceCriteria.map((ac, idx) => ({
|
|
58
|
-
|
|
78
|
+
criterionId: `${feature.featureId}-criterion-${idx + 1}`,
|
|
59
79
|
description: ac,
|
|
60
80
|
verificationMethod: "agent-evaluation",
|
|
61
|
-
}))
|
|
81
|
+
})), {
|
|
82
|
+
specId: spec.specId,
|
|
83
|
+
sprintNumber: i + 1,
|
|
84
|
+
features: [feature.featureId],
|
|
85
|
+
});
|
|
62
86
|
contracts.push(contract);
|
|
63
87
|
await saveContract(projectRoot, contract);
|
|
64
88
|
}
|
|
65
89
|
const summary = {
|
|
66
|
-
|
|
90
|
+
specId: spec.specId,
|
|
67
91
|
title: spec.title,
|
|
68
92
|
description: spec.description,
|
|
69
|
-
|
|
93
|
+
mode: spec.mode,
|
|
94
|
+
status: spec.status,
|
|
70
95
|
techStack: spec.techStack,
|
|
71
96
|
sprintCount: spec.features.length,
|
|
72
97
|
sprints: spec.features.map((f, idx) => ({
|
|
73
|
-
|
|
74
|
-
contractId: contracts[idx]?.
|
|
75
|
-
|
|
98
|
+
featureId: f.featureId,
|
|
99
|
+
contractId: contracts[idx]?.contractId,
|
|
100
|
+
title: f.title,
|
|
76
101
|
description: f.description,
|
|
77
102
|
priority: f.priority,
|
|
78
|
-
|
|
103
|
+
estimatedComplexity: f.estimatedComplexity,
|
|
79
104
|
criteriaCount: f.acceptanceCriteria.length,
|
|
80
105
|
status: "proposed",
|
|
81
106
|
})),
|
|
82
|
-
contractIds: contracts.map((c) => c.
|
|
83
|
-
|
|
107
|
+
contractIds: contracts.map((c) => c.contractId),
|
|
108
|
+
assumptions: spec.assumptions,
|
|
109
|
+
outOfScope: spec.outOfScope,
|
|
84
110
|
constraints: spec.constraints,
|
|
85
|
-
savedTo: `.bober/specs/${spec.
|
|
111
|
+
savedTo: `.bober/specs/${spec.specId}.json`,
|
|
86
112
|
};
|
|
87
113
|
return JSON.stringify(summary, null, 2);
|
|
88
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/mcp/tools/plan.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,EAAE;AACF,mEAAmE;AACnE,yCAAyC;AAEzC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,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C,GAAG,CAAC,EAAE;iBAC7E,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playbook.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/playbook.ts"],"names":[],"mappings":"AAwBA,wBAAgB,qBAAqB,IAAI,IAAI,CAmG5C"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// ── bober_playbook_list + bober_playbook_search tools ─────────────────
|
|
2
|
+
//
|
|
3
|
+
// Two thin adapters over loadPlaybooks + searchPlaybooks from src/incident/playbook-search.ts.
|
|
4
|
+
// No business logic here — all logic delegated to the underlying helpers.
|
|
5
|
+
//
|
|
6
|
+
// Sprint 6 (cockpit-integration)
|
|
7
|
+
import { cwd } from "node:process";
|
|
8
|
+
import { isAbsolute } from "node:path";
|
|
9
|
+
import { registerTool } from "./registry.js";
|
|
10
|
+
import { loadPlaybooks, searchPlaybooks, HIGH_CONFIDENCE_THRESHOLD, LOW_CONFIDENCE_THRESHOLD, } from "../../incident/playbook-search.js";
|
|
11
|
+
function classifyTier(confidence) {
|
|
12
|
+
if (confidence >= HIGH_CONFIDENCE_THRESHOLD)
|
|
13
|
+
return "high";
|
|
14
|
+
if (confidence >= LOW_CONFIDENCE_THRESHOLD)
|
|
15
|
+
return "suggestion";
|
|
16
|
+
return "low";
|
|
17
|
+
}
|
|
18
|
+
export function registerPlaybookTools() {
|
|
19
|
+
// ── bober_playbook_list ─────────────────────────────────────────────
|
|
20
|
+
registerTool({
|
|
21
|
+
name: "bober_playbook_list",
|
|
22
|
+
description: "List all playbooks from .bober/playbooks/. " +
|
|
23
|
+
"Delegates to loadPlaybooks from src/incident/playbook-search.ts. " +
|
|
24
|
+
"Returns [{ name, classification, applicableSymptoms }].",
|
|
25
|
+
inputSchema: {
|
|
26
|
+
type: "object",
|
|
27
|
+
properties: {
|
|
28
|
+
projectPath: {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Absolute project root (defaults to cwd).",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
additionalProperties: false,
|
|
34
|
+
},
|
|
35
|
+
handler: async (args) => {
|
|
36
|
+
const projectPath = typeof args.projectPath === "string" ? args.projectPath : cwd();
|
|
37
|
+
if (typeof args.projectPath === "string" && !isAbsolute(args.projectPath)) {
|
|
38
|
+
return JSON.stringify({ error: "projectPath must be absolute" });
|
|
39
|
+
}
|
|
40
|
+
let playbooks;
|
|
41
|
+
try {
|
|
42
|
+
playbooks = await loadPlaybooks(projectPath);
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
return JSON.stringify({
|
|
46
|
+
error: `Failed to load playbooks: ${err instanceof Error ? err.message : String(err)}`,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return JSON.stringify(playbooks.map((p) => ({
|
|
50
|
+
name: p.name,
|
|
51
|
+
classification: p.classification,
|
|
52
|
+
applicableSymptoms: p.applicableSymptoms,
|
|
53
|
+
})), null, 2);
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
// ── bober_playbook_search ───────────────────────────────────────────
|
|
57
|
+
registerTool({
|
|
58
|
+
name: "bober_playbook_search",
|
|
59
|
+
description: "Search playbooks matching a symptom. " +
|
|
60
|
+
"Delegates to searchPlaybooks from src/incident/playbook-search.ts. " +
|
|
61
|
+
"Returns [{ name, confidence, tier, matchedTokens }] sorted descending by confidence.",
|
|
62
|
+
inputSchema: {
|
|
63
|
+
type: "object",
|
|
64
|
+
properties: {
|
|
65
|
+
symptom: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "Free-text symptom to search for.",
|
|
68
|
+
},
|
|
69
|
+
projectPath: {
|
|
70
|
+
type: "string",
|
|
71
|
+
description: "Absolute project root (defaults to cwd).",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
required: ["symptom"],
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
},
|
|
77
|
+
handler: async (args) => {
|
|
78
|
+
const symptom = typeof args.symptom === "string" ? args.symptom.trim() : "";
|
|
79
|
+
if (!symptom) {
|
|
80
|
+
return JSON.stringify({ error: "symptom is required and must be a non-empty string." });
|
|
81
|
+
}
|
|
82
|
+
const projectPath = typeof args.projectPath === "string" ? args.projectPath : cwd();
|
|
83
|
+
if (typeof args.projectPath === "string" && !isAbsolute(args.projectPath)) {
|
|
84
|
+
return JSON.stringify({ error: "projectPath must be absolute" });
|
|
85
|
+
}
|
|
86
|
+
let matches;
|
|
87
|
+
try {
|
|
88
|
+
matches = await searchPlaybooks(symptom, projectPath);
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
return JSON.stringify({
|
|
92
|
+
error: `Failed to search playbooks: ${err instanceof Error ? err.message : String(err)}`,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return JSON.stringify(matches.map((m) => ({
|
|
96
|
+
name: m.playbook.name,
|
|
97
|
+
confidence: m.confidence,
|
|
98
|
+
tier: classifyTier(m.confidence),
|
|
99
|
+
matchedTokens: m.matchedTokens,
|
|
100
|
+
})), null, 2);
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=playbook.js.map
|