agent-bober 0.12.0 → 0.17.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/.claude-plugin/marketplace.json +20 -0
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +243 -0
- package/README.md +238 -5
- package/agents/bober-architect.md +72 -0
- package/agents/bober-code-reviewer.md +238 -0
- package/agents/bober-curator.md +49 -0
- package/agents/bober-deployer.md +267 -0
- package/agents/bober-diagnoser.md +289 -0
- package/agents/bober-documenter.md +129 -0
- package/agents/bober-evaluator.md +135 -1
- package/agents/bober-generator.md +80 -3
- package/agents/bober-planner.md +47 -1
- 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/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 +40 -1
- 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/memory.d.ts +14 -0
- package/dist/cli/commands/memory.d.ts.map +1 -0
- package/dist/cli/commands/memory.js +132 -0
- package/dist/cli/commands/memory.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/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 +29 -0
- package/dist/cli/commands/run.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 +56 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +41 -3
- 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 +25 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/role-providers.d.ts +29 -0
- package/dist/config/role-providers.d.ts.map +1 -0
- package/dist/config/role-providers.js +115 -0
- package/dist/config/role-providers.js.map +1 -0
- package/dist/config/schema.d.ts +1350 -61
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +189 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/contracts/eval-result.d.ts +112 -56
- package/dist/contracts/eval-result.d.ts.map +1 -1
- package/dist/contracts/eval-result.js +3 -0
- package/dist/contracts/eval-result.js.map +1 -1
- package/dist/contracts/sprint-contract.d.ts +30 -30
- package/dist/fleet/aggregator.d.ts +5 -0
- package/dist/fleet/aggregator.d.ts.map +1 -0
- package/dist/fleet/aggregator.js +39 -0
- package/dist/fleet/aggregator.js.map +1 -0
- package/dist/fleet/child-config.d.ts +12 -0
- package/dist/fleet/child-config.d.ts.map +1 -0
- package/dist/fleet/child-config.js +38 -0
- package/dist/fleet/child-config.js.map +1 -0
- package/dist/fleet/coordinator.d.ts +25 -0
- package/dist/fleet/coordinator.d.ts.map +1 -0
- package/dist/fleet/coordinator.js +40 -0
- package/dist/fleet/coordinator.js.map +1 -0
- package/dist/fleet/index.d.ts +40 -0
- package/dist/fleet/index.d.ts.map +1 -0
- package/dist/fleet/index.js +117 -0
- package/dist/fleet/index.js.map +1 -0
- package/dist/fleet/manifest.d.ts +51 -0
- package/dist/fleet/manifest.d.ts.map +1 -0
- package/dist/fleet/manifest.js +32 -0
- package/dist/fleet/manifest.js.map +1 -0
- package/dist/fleet/reporter.d.ts +32 -0
- package/dist/fleet/reporter.d.ts.map +1 -0
- package/dist/fleet/reporter.js +71 -0
- package/dist/fleet/reporter.js.map +1 -0
- package/dist/fleet/runner.d.ts +48 -0
- package/dist/fleet/runner.d.ts.map +1 -0
- package/dist/fleet/runner.js +104 -0
- package/dist/fleet/runner.js.map +1 -0
- package/dist/fleet/scaffolder.d.ts +12 -0
- package/dist/fleet/scaffolder.d.ts.map +1 -0
- package/dist/fleet/scaffolder.js +82 -0
- package/dist/fleet/scaffolder.js.map +1 -0
- package/dist/fleet/types.d.ts +21 -0
- package/dist/fleet/types.d.ts.map +1 -0
- package/dist/fleet/types.js +2 -0
- package/dist/fleet/types.js.map +1 -0
- 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 +53 -0
- package/dist/graph/cli.d.ts.map +1 -0
- package/dist/graph/cli.js +181 -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 +95 -0
- package/dist/graph/pipeline-lifecycle.d.ts.map +1 -0
- package/dist/graph/pipeline-lifecycle.js +341 -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 +130 -0
- package/dist/graph/preflight-injector.d.ts.map +1 -0
- package/dist/graph/preflight-injector.js +618 -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 +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- 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/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/init.d.ts.map +1 -1
- package/dist/mcp/tools/init.js +2 -0
- package/dist/mcp/tools/init.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/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/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 +30 -0
- package/dist/orchestrator/agent-loader.js.map +1 -1
- package/dist/orchestrator/agentic-loop.d.ts +51 -0
- package/dist/orchestrator/agentic-loop.d.ts.map +1 -1
- package/dist/orchestrator/agentic-loop.js +123 -4
- package/dist/orchestrator/agentic-loop.js.map +1 -1
- package/dist/orchestrator/arch-lenses.d.ts +7 -0
- package/dist/orchestrator/arch-lenses.d.ts.map +1 -0
- package/dist/orchestrator/arch-lenses.js +22 -0
- package/dist/orchestrator/arch-lenses.js.map +1 -0
- package/dist/orchestrator/architect-agent.d.ts +16 -0
- package/dist/orchestrator/architect-agent.d.ts.map +1 -1
- package/dist/orchestrator/architect-agent.js +546 -9
- 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/curator-agent.d.ts.map +1 -1
- package/dist/orchestrator/curator-agent.js +60 -9
- 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/documenter-agent.d.ts +57 -0
- package/dist/orchestrator/documenter-agent.d.ts.map +1 -0
- package/dist/orchestrator/documenter-agent.js +195 -0
- package/dist/orchestrator/documenter-agent.js.map +1 -0
- package/dist/orchestrator/environment.d.ts +45 -0
- package/dist/orchestrator/environment.d.ts.map +1 -0
- package/dist/orchestrator/environment.js +151 -0
- package/dist/orchestrator/environment.js.map +1 -0
- package/dist/orchestrator/eval-lenses.d.ts +7 -0
- package/dist/orchestrator/eval-lenses.d.ts.map +1 -0
- package/dist/orchestrator/eval-lenses.js +19 -0
- package/dist/orchestrator/eval-lenses.js.map +1 -0
- package/dist/orchestrator/eval-persist.d.ts +25 -0
- package/dist/orchestrator/eval-persist.d.ts.map +1 -0
- package/dist/orchestrator/eval-persist.js +74 -0
- package/dist/orchestrator/eval-persist.js.map +1 -0
- package/dist/orchestrator/evaluator-agent.d.ts +23 -0
- package/dist/orchestrator/evaluator-agent.d.ts.map +1 -1
- package/dist/orchestrator/evaluator-agent.js +80 -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 +53 -8
- package/dist/orchestrator/generator-agent.js.map +1 -1
- package/dist/orchestrator/memory/distill.d.ts +60 -0
- package/dist/orchestrator/memory/distill.d.ts.map +1 -0
- package/dist/orchestrator/memory/distill.js +177 -0
- package/dist/orchestrator/memory/distill.js.map +1 -0
- package/dist/orchestrator/memory/eval-source.d.ts +20 -0
- package/dist/orchestrator/memory/eval-source.d.ts.map +1 -0
- package/dist/orchestrator/memory/eval-source.js +88 -0
- package/dist/orchestrator/memory/eval-source.js.map +1 -0
- package/dist/orchestrator/memory/retrieve.d.ts +45 -0
- package/dist/orchestrator/memory/retrieve.d.ts.map +1 -0
- package/dist/orchestrator/memory/retrieve.js +102 -0
- package/dist/orchestrator/memory/retrieve.js.map +1 -0
- package/dist/orchestrator/model-resolver.d.ts.map +1 -1
- package/dist/orchestrator/model-resolver.js +15 -1
- 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 +31 -0
- package/dist/orchestrator/pipeline.d.ts.map +1 -1
- package/dist/orchestrator/pipeline.js +267 -5
- package/dist/orchestrator/pipeline.js.map +1 -1
- package/dist/orchestrator/planner-agent.d.ts +22 -1
- package/dist/orchestrator/planner-agent.d.ts.map +1 -1
- package/dist/orchestrator/planner-agent.js +165 -8
- 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 +48 -11
- package/dist/orchestrator/research-agent.js.map +1 -1
- package/dist/orchestrator/tools/handlers.d.ts +16 -0
- package/dist/orchestrator/tools/handlers.d.ts.map +1 -1
- package/dist/orchestrator/tools/handlers.js +30 -5
- 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/tools/schemas.js +5 -5
- package/dist/orchestrator/tools/schemas.js.map +1 -1
- package/dist/orchestrator/workflow/args-builder.d.ts +35 -0
- package/dist/orchestrator/workflow/args-builder.d.ts.map +1 -0
- package/dist/orchestrator/workflow/args-builder.js +142 -0
- package/dist/orchestrator/workflow/args-builder.js.map +1 -0
- package/dist/orchestrator/workflow/budget.d.ts +57 -0
- package/dist/orchestrator/workflow/budget.d.ts.map +1 -0
- package/dist/orchestrator/workflow/budget.js +80 -0
- package/dist/orchestrator/workflow/budget.js.map +1 -0
- package/dist/orchestrator/workflow/conformance.d.ts +27 -0
- package/dist/orchestrator/workflow/conformance.d.ts.map +1 -0
- package/dist/orchestrator/workflow/conformance.js +111 -0
- package/dist/orchestrator/workflow/conformance.js.map +1 -0
- package/dist/orchestrator/workflow/eligibility.d.ts +8 -0
- package/dist/orchestrator/workflow/eligibility.d.ts.map +1 -0
- package/dist/orchestrator/workflow/eligibility.js +10 -0
- package/dist/orchestrator/workflow/eligibility.js.map +1 -0
- package/dist/orchestrator/workflow/engine.d.ts +10 -0
- package/dist/orchestrator/workflow/engine.d.ts.map +1 -0
- package/dist/orchestrator/workflow/engine.js +2 -0
- package/dist/orchestrator/workflow/engine.js.map +1 -0
- package/dist/orchestrator/workflow/errors.d.ts +13 -0
- package/dist/orchestrator/workflow/errors.d.ts.map +1 -0
- package/dist/orchestrator/workflow/errors.js +26 -0
- package/dist/orchestrator/workflow/errors.js.map +1 -0
- package/dist/orchestrator/workflow/flusher.d.ts +19 -0
- package/dist/orchestrator/workflow/flusher.d.ts.map +1 -0
- package/dist/orchestrator/workflow/flusher.js +81 -0
- package/dist/orchestrator/workflow/flusher.js.map +1 -0
- package/dist/orchestrator/workflow/interpreter.d.ts +48 -0
- package/dist/orchestrator/workflow/interpreter.d.ts.map +1 -0
- package/dist/orchestrator/workflow/interpreter.js +92 -0
- package/dist/orchestrator/workflow/interpreter.js.map +1 -0
- package/dist/orchestrator/workflow/pure-sprint.d.ts +65 -0
- package/dist/orchestrator/workflow/pure-sprint.d.ts.map +1 -0
- package/dist/orchestrator/workflow/pure-sprint.js +82 -0
- package/dist/orchestrator/workflow/pure-sprint.js.map +1 -0
- package/dist/orchestrator/workflow/reconciler.d.ts +15 -0
- package/dist/orchestrator/workflow/reconciler.d.ts.map +1 -0
- package/dist/orchestrator/workflow/reconciler.js +65 -0
- package/dist/orchestrator/workflow/reconciler.js.map +1 -0
- package/dist/orchestrator/workflow/resume-cursor.d.ts +10 -0
- package/dist/orchestrator/workflow/resume-cursor.d.ts.map +1 -0
- package/dist/orchestrator/workflow/resume-cursor.js +25 -0
- package/dist/orchestrator/workflow/resume-cursor.js.map +1 -0
- package/dist/orchestrator/workflow/retry.d.ts +50 -0
- package/dist/orchestrator/workflow/retry.d.ts.map +1 -0
- package/dist/orchestrator/workflow/retry.js +100 -0
- package/dist/orchestrator/workflow/retry.js.map +1 -0
- package/dist/orchestrator/workflow/scheduler.d.ts +87 -0
- package/dist/orchestrator/workflow/scheduler.d.ts.map +1 -0
- package/dist/orchestrator/workflow/scheduler.js +158 -0
- package/dist/orchestrator/workflow/scheduler.js.map +1 -0
- package/dist/orchestrator/workflow/selector.d.ts +26 -0
- package/dist/orchestrator/workflow/selector.d.ts.map +1 -0
- package/dist/orchestrator/workflow/selector.js +54 -0
- package/dist/orchestrator/workflow/selector.js.map +1 -0
- package/dist/orchestrator/workflow/synthesizer.d.ts +52 -0
- package/dist/orchestrator/workflow/synthesizer.d.ts.map +1 -0
- package/dist/orchestrator/workflow/synthesizer.js +75 -0
- package/dist/orchestrator/workflow/synthesizer.js.map +1 -0
- package/dist/orchestrator/workflow/ts-engine.d.ts +13 -0
- package/dist/orchestrator/workflow/ts-engine.d.ts.map +1 -0
- package/dist/orchestrator/workflow/ts-engine.js +14 -0
- package/dist/orchestrator/workflow/ts-engine.js.map +1 -0
- package/dist/orchestrator/workflow/types.d.ts +55 -0
- package/dist/orchestrator/workflow/types.d.ts.map +1 -0
- package/dist/orchestrator/workflow/types.js +3 -0
- package/dist/orchestrator/workflow/types.js.map +1 -0
- package/dist/orchestrator/workflow/workflow-engine.d.ts +31 -0
- package/dist/orchestrator/workflow/workflow-engine.d.ts.map +1 -0
- package/dist/orchestrator/workflow/workflow-engine.js +70 -0
- package/dist/orchestrator/workflow/workflow-engine.js.map +1 -0
- 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 +135 -11
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/claude-code.d.ts +44 -0
- package/dist/providers/claude-code.d.ts.map +1 -0
- package/dist/providers/claude-code.js +143 -0
- package/dist/providers/claude-code.js.map +1 -0
- package/dist/providers/factory.d.ts +16 -2
- package/dist/providers/factory.d.ts.map +1 -1
- package/dist/providers/factory.js +101 -14
- package/dist/providers/factory.js.map +1 -1
- package/dist/providers/google.d.ts.map +1 -1
- package/dist/providers/google.js +32 -3
- package/dist/providers/google.js.map +1 -1
- package/dist/providers/index.d.ts +4 -2
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +3 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +28 -3
- package/dist/providers/openai.js.map +1 -1
- package/dist/providers/preflight.d.ts +22 -0
- package/dist/providers/preflight.d.ts.map +1 -0
- package/dist/providers/preflight.js +54 -0
- package/dist/providers/preflight.js.map +1 -0
- package/dist/providers/structured.d.ts +130 -0
- package/dist/providers/structured.d.ts.map +1 -0
- package/dist/providers/structured.js +205 -0
- package/dist/providers/structured.js.map +1 -0
- package/dist/providers/types.d.ts +53 -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-rotation.d.ts +17 -0
- package/dist/state/history-rotation.d.ts.map +1 -0
- package/dist/state/history-rotation.js +84 -0
- package/dist/state/history-rotation.js.map +1 -0
- package/dist/state/history.d.ts +16 -4
- package/dist/state/history.d.ts.map +1 -1
- package/dist/state/history.js +62 -20
- package/dist/state/history.js.map +1 -1
- package/dist/state/index.d.ts +4 -1
- package/dist/state/index.d.ts.map +1 -1
- package/dist/state/index.js +5 -2
- package/dist/state/index.js.map +1 -1
- package/dist/state/memory.d.ts +60 -0
- package/dist/state/memory.d.ts.map +1 -0
- package/dist/state/memory.js +242 -0
- package/dist/state/memory.js.map +1 -0
- 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/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 +27 -1
- package/hooks/session-start +42 -0
- package/package.json +13 -6
- package/scripts/check-prereqs.sh +12 -0
- package/scripts/e2e-graph-smoke.sh +167 -0
- package/scripts/graph-hook.mjs +151 -0
- package/scripts/run-kpi-gate.mjs +245 -0
- package/scripts/spike-claude-code-provider.mjs +66 -0
- package/scripts/spike-deepseek.mjs +63 -0
- package/scripts/sync-skills.mjs +4 -1
- package/scripts/sync-targets.json +12 -0
- package/scripts/update-all.mjs +255 -0
- package/skills/bober.architect/SKILL.md +13 -0
- package/skills/bober.architect/references/arch-lens-panel.md +126 -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.eval/SKILL.md +9 -0
- package/skills/bober.eval/references/lens-panel.md +115 -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 +16 -0
- package/skills/bober.postmortem/SKILL.md +231 -0
- package/skills/bober.run/SKILL.md +23 -4
- package/skills/bober.run/references/lens-panel.md +115 -0
- package/skills/bober.runbook/SKILL.md +335 -0
- package/skills/bober.sprint/SKILL.md +44 -2
- package/skills/bober.sprint/references/lens-panel.md +115 -0
- package/skills/bober.using-bober/SKILL.md +133 -0
- package/skills/bober.verify/SKILL.md +143 -0
- package/skills/shared/arch-lens-panel.md +126 -0
- package/skills/shared/lens-panel.md +115 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import { arch, platform, release } from "node:os";
|
|
3
|
+
import { fileExists } from "../utils/fs.js";
|
|
4
|
+
import { logger } from "../utils/logger.js";
|
|
5
|
+
// Common developer CLIs worth probing. Found ones are surfaced to agents.
|
|
6
|
+
const CANDIDATE_TOOLS = [
|
|
7
|
+
"git", "gh", "docker", "docker-compose", "kubectl",
|
|
8
|
+
"node", "npm", "pnpm", "yarn", "bun", "deno",
|
|
9
|
+
"python3", "pip3", "cargo", "rustc", "go", "java", "mvn", "gradle",
|
|
10
|
+
"ruby", "php", "dotnet",
|
|
11
|
+
"psql", "mysql", "redis-cli", "sqlite3", "mongosh",
|
|
12
|
+
"make", "cmake", "gcc", "clang",
|
|
13
|
+
"terraform", "aws", "gcloud", "vercel", "netlify",
|
|
14
|
+
"jq", "rg", "fd", "curl", "wget",
|
|
15
|
+
];
|
|
16
|
+
function friendlyOsName(p) {
|
|
17
|
+
switch (p) {
|
|
18
|
+
case "darwin":
|
|
19
|
+
return "macOS";
|
|
20
|
+
case "linux":
|
|
21
|
+
return "Linux";
|
|
22
|
+
case "win32":
|
|
23
|
+
return "Windows";
|
|
24
|
+
default:
|
|
25
|
+
return p;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Probe PATH for the candidate CLIs in a single `which` invocation (one child
|
|
30
|
+
* process, not one per tool). `which` prints a line per found binary and exits
|
|
31
|
+
* non-zero when some are missing — we read stdout regardless.
|
|
32
|
+
*/
|
|
33
|
+
function detectInstalledTools() {
|
|
34
|
+
// `which` is unavailable on bare Windows; skip probing there.
|
|
35
|
+
if (platform() === "win32")
|
|
36
|
+
return [];
|
|
37
|
+
try {
|
|
38
|
+
const out = execFileSync("which", CANDIDATE_TOOLS, {
|
|
39
|
+
encoding: "utf-8",
|
|
40
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
41
|
+
});
|
|
42
|
+
return parseWhichOutput(out);
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
// Non-zero exit (some tools missing) still carries stdout with the found ones.
|
|
46
|
+
const stdout = err.stdout;
|
|
47
|
+
if (stdout)
|
|
48
|
+
return parseWhichOutput(stdout.toString());
|
|
49
|
+
logger.debug(`Tool detection failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function parseWhichOutput(out) {
|
|
54
|
+
const found = new Set();
|
|
55
|
+
for (const line of out.split("\n")) {
|
|
56
|
+
const trimmed = line.trim();
|
|
57
|
+
if (!trimmed)
|
|
58
|
+
continue;
|
|
59
|
+
const base = trimmed.split("/").pop();
|
|
60
|
+
if (base && CANDIDATE_TOOLS.includes(base))
|
|
61
|
+
found.add(base);
|
|
62
|
+
}
|
|
63
|
+
// Preserve CANDIDATE_TOOLS order for stable output.
|
|
64
|
+
return CANDIDATE_TOOLS.filter((t) => found.has(t));
|
|
65
|
+
}
|
|
66
|
+
async function detectPackageManager(projectRoot) {
|
|
67
|
+
const candidates = [
|
|
68
|
+
["pnpm-lock.yaml", "pnpm"],
|
|
69
|
+
["yarn.lock", "yarn"],
|
|
70
|
+
["bun.lockb", "bun"],
|
|
71
|
+
["package-lock.json", "npm"],
|
|
72
|
+
];
|
|
73
|
+
for (const [lockfile, manager] of candidates) {
|
|
74
|
+
if (await fileExists(`${projectRoot}/${lockfile}`))
|
|
75
|
+
return manager;
|
|
76
|
+
}
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
let cached;
|
|
80
|
+
/**
|
|
81
|
+
* Detect the host environment. Tool/OS detection is process-stable, so the
|
|
82
|
+
* result is cached after the first call (package-manager detection re-runs only
|
|
83
|
+
* when the cache is cold). Pass a projectRoot for package-manager detection.
|
|
84
|
+
*/
|
|
85
|
+
export async function detectEnvironment(projectRoot) {
|
|
86
|
+
if (cached)
|
|
87
|
+
return cached;
|
|
88
|
+
cached = {
|
|
89
|
+
platform: platform(),
|
|
90
|
+
osName: friendlyOsName(platform()),
|
|
91
|
+
osRelease: release(),
|
|
92
|
+
arch: arch(),
|
|
93
|
+
shell: process.env["SHELL"],
|
|
94
|
+
nodeVersion: process.version,
|
|
95
|
+
packageManager: await detectPackageManager(projectRoot),
|
|
96
|
+
installedTools: detectInstalledTools(),
|
|
97
|
+
};
|
|
98
|
+
return cached;
|
|
99
|
+
}
|
|
100
|
+
/** Reset the cache (tests). */
|
|
101
|
+
export function resetEnvironmentCache() {
|
|
102
|
+
cached = undefined;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Render the environment + the role's exact harness tools as a markdown block
|
|
106
|
+
* for injection into an agent's system prompt.
|
|
107
|
+
*
|
|
108
|
+
* @param env Detected host environment.
|
|
109
|
+
* @param toolNames The exact harness tool names available to this role (e.g.
|
|
110
|
+
* ["read_file","glob","grep"]). Used to stop models inventing
|
|
111
|
+
* tools (e.g. a non-existent "bash" for read-only roles).
|
|
112
|
+
* @param projectRoot Absolute path to the project root. Surfaced so models stop
|
|
113
|
+
* guessing it — non-Claude models otherwise invent an absolute
|
|
114
|
+
* path with the wrong home dir, which the path sandbox rejects.
|
|
115
|
+
*/
|
|
116
|
+
export function formatEnvironmentContext(env, toolNames, projectRoot) {
|
|
117
|
+
const lines = [];
|
|
118
|
+
lines.push("# Host Environment");
|
|
119
|
+
lines.push(`- OS: ${env.osName} (${env.platform} ${env.osRelease}, ${env.arch})`);
|
|
120
|
+
if (env.shell)
|
|
121
|
+
lines.push(`- Shell: ${env.shell}`);
|
|
122
|
+
lines.push(`- Node: ${env.nodeVersion}`);
|
|
123
|
+
if (env.packageManager)
|
|
124
|
+
lines.push(`- Package manager: ${env.packageManager}`);
|
|
125
|
+
if (projectRoot)
|
|
126
|
+
lines.push(`- Project root (absolute): ${projectRoot}`);
|
|
127
|
+
if (env.installedTools.length > 0) {
|
|
128
|
+
lines.push(`- Installed CLIs on PATH: ${env.installedTools.join(", ")}`);
|
|
129
|
+
}
|
|
130
|
+
const hasBash = toolNames.includes("bash");
|
|
131
|
+
if (hasBash && env.platform === "darwin") {
|
|
132
|
+
lines.push("", "When using the `bash` tool, write macOS-compatible commands (BSD userland, " +
|
|
133
|
+
"not GNU coreutils — e.g. avoid `sed -i` without a backup suffix, `readlink -f`). " +
|
|
134
|
+
"Prefer the installed CLIs listed above.");
|
|
135
|
+
}
|
|
136
|
+
lines.push("");
|
|
137
|
+
lines.push("# Your Tools");
|
|
138
|
+
lines.push(`You have EXACTLY these tools: ${toolNames.join(", ")}. ` +
|
|
139
|
+
`Do NOT call any other tool name. There is no general "bash"/"shell" tool ` +
|
|
140
|
+
`unless it is listed above. If you need to do something a listed tool can't, ` +
|
|
141
|
+
`state that in your output rather than inventing a tool.`);
|
|
142
|
+
const hasPathTool = toolNames.some((t) => ["read_file", "write_file", "edit_file", "glob", "grep"].includes(t));
|
|
143
|
+
if (hasPathTool) {
|
|
144
|
+
lines.push("", "For file/path tool arguments, pass paths RELATIVE to the project root " +
|
|
145
|
+
"(e.g. `src`, `src/index.ts`, `src/**/*.ts`). Do NOT construct absolute " +
|
|
146
|
+
"paths — you do not know the real home directory and a wrong guess is " +
|
|
147
|
+
"rejected by the path sandbox.");
|
|
148
|
+
}
|
|
149
|
+
return lines.join("\n");
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/orchestrator/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AA0B5C,0EAA0E;AAC1E,MAAM,eAAe,GAAG;IACtB,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS;IAClD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KA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C,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,KAAK,CAAC,IAAI,CAAC,6BAA6B,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACzC,KAAK,CAAC,IAAI,CACR,EAAE,EACF,6EAA6E;YAC3E,mFAAmF;YACnF,yCAAyC,CAC5C,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC3B,KAAK,CAAC,IAAI,CACR,iCAAiC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;QACvD,2EAA2E;QAC3E,8EAA8E;QAC9E,yDAAyD,CAC5D,CAAC;IAEF,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CACvC,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CACrE,CAAC;IACF,IAAI,WAAW,EAAE,CAAC;QAChB,KAAK,CAAC,IAAI,CACR,EAAE,EACF,wEAAwE;YACtE,yEAAyE;YACzE,uEAAuE;YACvE,+BAA+B,CAClC,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a lens name to its focus fragment.
|
|
3
|
+
* Returns the catalog entry for a known lens, or a generic non-empty
|
|
4
|
+
* fallback for any unknown custom string — never throws (C1).
|
|
5
|
+
*/
|
|
6
|
+
export declare function resolveLensFocus(lens: string): string;
|
|
7
|
+
//# sourceMappingURL=eval-lenses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eval-lenses.d.ts","sourceRoot":"","sources":["../../src/orchestrator/eval-lenses.ts"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIrD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// ── Lens catalog ────────────────────────────────────────────────────
|
|
2
|
+
/** Built-in lens focus fragments. Each must be distinct and non-empty (C1). */
|
|
3
|
+
const LENS_CATALOG = {
|
|
4
|
+
correctness: "Focus on whether the implementation actually satisfies each success criterion verbatim. Check that all required behaviours exist, all edge cases are handled, and the contract's definitionOfDone is met.",
|
|
5
|
+
security: "Focus on injection vulnerabilities, authentication and authorisation gaps, secret handling, unsafe input validation, and any path traversal or privilege escalation risks.",
|
|
6
|
+
regression: "Focus on whether previously working behaviour still works after the changes. Verify that pre-existing tests pass, that no public API or config interface was broken, and that the sprint diff does not silently remove functionality.",
|
|
7
|
+
quality: "Focus on principles violations, dead code, misleading naming, smells, duplicated logic, and whether the implementation follows the project's established patterns and conventions.",
|
|
8
|
+
simplicity: "Focus exclusively on over-engineering in the production code: logic that reinvents the standard library, dependencies or hand-rolled code doing what a native platform feature already provides, abstractions with a single implementation, configuration nobody reads, dead flexibility, and code expressible in materially fewer lines. For each, name the location, what to cut, and what replaces it. Never flag tests, assertion-based self-checks, input validation at trust boundaries, error handling, security measures, or accessibility as deletable — minimalism governs production code, never the verification or safety discipline.",
|
|
9
|
+
};
|
|
10
|
+
// ── Resolver ────────────────────────────────────────────────────────
|
|
11
|
+
/**
|
|
12
|
+
* Resolve a lens name to its focus fragment.
|
|
13
|
+
* Returns the catalog entry for a known lens, or a generic non-empty
|
|
14
|
+
* fallback for any unknown custom string — never throws (C1).
|
|
15
|
+
*/
|
|
16
|
+
export function resolveLensFocus(lens) {
|
|
17
|
+
return (LENS_CATALOG[lens] ?? `Evaluate specifically through the '${lens}' lens.`);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=eval-lenses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eval-lenses.js","sourceRoot":"","sources":["../../src/orchestrator/eval-lenses.ts"],"names":[],"mappings":"AAAA,uEAAuE;AAEvE,+EAA+E;AAC/E,MAAM,YAAY,GAA2B;IAC3C,WAAW,EACT,2MAA2M;IAC7M,QAAQ,EACN,4KAA4K;IAC9K,UAAU,EACR,uOAAuO;IACzO,OAAO,EACL,oLAAoL;IACtL,UAAU,EACR,onBAAonB;CACvnB,CAAC;AAEF,uEAAuE;AAEvE;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,CACL,YAAY,CAAC,IAAI,CAAC,IAAI,sCAAsC,IAAI,SAAS,CAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persist a sprint evaluation to `.bober/eval-results/` so failures are
|
|
3
|
+
* inspectable after the fact.
|
|
4
|
+
*
|
|
5
|
+
* The standalone TS pipeline previously kept evaluation results only in memory:
|
|
6
|
+
* a sprint could fail with "4/5 evaluators passed. Score: 100/100" and there was
|
|
7
|
+
* no on-disk record of WHICH evaluator (or panel lens) returned `passed: false`.
|
|
8
|
+
* This writes one file per evaluation round capturing the per-evaluator and
|
|
9
|
+
* per-lens verdicts.
|
|
10
|
+
*
|
|
11
|
+
* The file shape is a superset of what `loadEvalResults` (memory/eval-source.ts)
|
|
12
|
+
* leniently reads — it carries `contractId`, `iteration`, `passed`, and
|
|
13
|
+
* `overallResult` for distillation, plus a `results[]` array with the per-lens
|
|
14
|
+
* detail for human debugging.
|
|
15
|
+
*/
|
|
16
|
+
import type { EvaluationRunResult } from "../evaluators/registry.js";
|
|
17
|
+
/**
|
|
18
|
+
* Write an evaluation round to `.bober/eval-results/eval-<contractId>-<iteration>.json`.
|
|
19
|
+
*
|
|
20
|
+
* Best-effort: any failure is logged at debug level and swallowed so persistence
|
|
21
|
+
* never blocks or fails the pipeline. Returns the written path, or `undefined`
|
|
22
|
+
* if the write failed.
|
|
23
|
+
*/
|
|
24
|
+
export declare function persistEvalResult(projectRoot: string, contractId: string, iteration: number, evaluation: EvaluationRunResult): Promise<string | undefined>;
|
|
25
|
+
//# sourceMappingURL=eval-persist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eval-persist.d.ts","sourceRoot":"","sources":["../../src/orchestrator/eval-persist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAKrE;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,mBAAmB,GAC9B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAqD7B"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persist a sprint evaluation to `.bober/eval-results/` so failures are
|
|
3
|
+
* inspectable after the fact.
|
|
4
|
+
*
|
|
5
|
+
* The standalone TS pipeline previously kept evaluation results only in memory:
|
|
6
|
+
* a sprint could fail with "4/5 evaluators passed. Score: 100/100" and there was
|
|
7
|
+
* no on-disk record of WHICH evaluator (or panel lens) returned `passed: false`.
|
|
8
|
+
* This writes one file per evaluation round capturing the per-evaluator and
|
|
9
|
+
* per-lens verdicts.
|
|
10
|
+
*
|
|
11
|
+
* The file shape is a superset of what `loadEvalResults` (memory/eval-source.ts)
|
|
12
|
+
* leniently reads — it carries `contractId`, `iteration`, `passed`, and
|
|
13
|
+
* `overallResult` for distillation, plus a `results[]` array with the per-lens
|
|
14
|
+
* detail for human debugging.
|
|
15
|
+
*/
|
|
16
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
17
|
+
import { join } from "node:path";
|
|
18
|
+
import { logger } from "../utils/logger.js";
|
|
19
|
+
const EVAL_RESULTS_DIR = ".bober/eval-results";
|
|
20
|
+
/**
|
|
21
|
+
* Write an evaluation round to `.bober/eval-results/eval-<contractId>-<iteration>.json`.
|
|
22
|
+
*
|
|
23
|
+
* Best-effort: any failure is logged at debug level and swallowed so persistence
|
|
24
|
+
* never blocks or fails the pipeline. Returns the written path, or `undefined`
|
|
25
|
+
* if the write failed.
|
|
26
|
+
*/
|
|
27
|
+
export async function persistEvalResult(projectRoot, contractId, iteration, evaluation) {
|
|
28
|
+
try {
|
|
29
|
+
const dir = join(projectRoot, EVAL_RESULTS_DIR);
|
|
30
|
+
await mkdir(dir, { recursive: true });
|
|
31
|
+
const evalId = `${contractId}-${iteration}`;
|
|
32
|
+
const file = join(dir, `eval-${evalId}.json`);
|
|
33
|
+
const payload = {
|
|
34
|
+
evalId,
|
|
35
|
+
contractId,
|
|
36
|
+
iteration,
|
|
37
|
+
passed: evaluation.passed,
|
|
38
|
+
// String mirror of `passed` for the lenient distill reader.
|
|
39
|
+
overallResult: evaluation.passed ? "pass" : "fail",
|
|
40
|
+
score: evaluation.score,
|
|
41
|
+
summary: evaluation.summary,
|
|
42
|
+
timestamp: evaluation.timestamp,
|
|
43
|
+
// Per-evaluator detail — the bit that answers "which evaluator failed?".
|
|
44
|
+
// Only failing evaluators carry their full feedback to keep files lean.
|
|
45
|
+
results: evaluation.results.map((r) => ({
|
|
46
|
+
evaluator: r.evaluator,
|
|
47
|
+
passed: r.passed,
|
|
48
|
+
score: r.score,
|
|
49
|
+
summary: r.summary,
|
|
50
|
+
...(r.passed ? {} : { feedback: r.feedback }),
|
|
51
|
+
...(r.lensVerdicts ? { lensVerdicts: r.lensVerdicts } : {}),
|
|
52
|
+
failures: r.details.filter((d) => !d.passed),
|
|
53
|
+
})),
|
|
54
|
+
};
|
|
55
|
+
await writeFile(file, JSON.stringify(payload, null, 2), "utf-8");
|
|
56
|
+
if (!evaluation.passed) {
|
|
57
|
+
const failed = evaluation.results
|
|
58
|
+
.filter((r) => !r.passed)
|
|
59
|
+
.map((r) => r.evaluator);
|
|
60
|
+
logger.info(`Eval detail written to ${file}` +
|
|
61
|
+
(failed.length ? ` — failing: ${failed.join(", ")}` : ""));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
logger.debug(`Eval detail written to ${file}`);
|
|
65
|
+
}
|
|
66
|
+
return file;
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
logger.debug(`Could not persist eval result for ${contractId} round ${iteration}: ` +
|
|
70
|
+
`${err instanceof Error ? err.message : String(err)}`);
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=eval-persist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eval-persist.js","sourceRoot":"","sources":["../../src/orchestrator/eval-persist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,WAAmB,EACnB,UAAkB,EAClB,SAAiB,EACjB,UAA+B;IAE/B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;QAChD,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAEtC,MAAM,MAAM,GAAG,GAAG,UAAU,IAAI,SAAS,EAAE,CAAC;QAC5C,MAAM,IAAI,GAAG,IAAI,CA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AAO;iBAC9B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;iBACxB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC3B,MAAM,CAAC,IAAI,CACT,0BAA0B,IAAI,EAAE;gBAC9B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAC5D,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,0BAA0B,IAAI,EAAE,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,KAAK,CACV,qCAAqC,UAAU,UAAU,SAAS,IAAI;YACpE,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CACxD,CAAC;QACF,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BoberConfig } from "../config/schema.js";
|
|
2
2
|
import type { ContextHandoff } from "./context-handoff.js";
|
|
3
|
+
import type { EvalResult } from "../contracts/eval-result.js";
|
|
3
4
|
import type { EvaluationRunResult } from "../evaluators/registry.js";
|
|
4
5
|
export type { EvaluationRunResult } from "../evaluators/registry.js";
|
|
5
6
|
/**
|
|
@@ -15,4 +16,26 @@ export type { EvaluationRunResult } from "../evaluators/registry.js";
|
|
|
15
16
|
* @returns A combined EvaluationRunResult.
|
|
16
17
|
*/
|
|
17
18
|
export declare function runEvaluatorAgent(handoff: ContextHandoff, projectRoot: string, config: BoberConfig): Promise<EvaluationRunResult>;
|
|
19
|
+
/**
|
|
20
|
+
* Run the agent-based qualitative evaluation using a multi-turn agentic
|
|
21
|
+
* loop with bash, read_file, glob, and grep tools.
|
|
22
|
+
*
|
|
23
|
+
* When panel.enabled is true and >=2 lenses are configured, fans out
|
|
24
|
+
* one judge call per lens (bounded by maxConcurrent) and reconciles
|
|
25
|
+
* via majority vote into a single evaluator='panel' EvalResult.
|
|
26
|
+
* Otherwise runs the existing single judge call (byte-identical off path).
|
|
27
|
+
*
|
|
28
|
+
* The evaluator can run commands, take screenshots, inspect code, start
|
|
29
|
+
* dev servers, and curl endpoints — but CANNOT write or edit files.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Side-effect-free lens-evaluation core. Runs the judge call(s) and returns the
|
|
33
|
+
* per-lens verdicts — a single verdict when the panel is off, one per lens
|
|
34
|
+
* (bounded concurrency) when on. Writes NOTHING to `.bober/` (no history append,
|
|
35
|
+
* no reconcile), so the workflow interpreter's `evaluate` dep can call it while
|
|
36
|
+
* the flusher remains the sole clock/commit source. The persisting wrapper
|
|
37
|
+
* {@link runAgentEvaluation} layers the history append + reconcile on top for
|
|
38
|
+
* the TS pipeline.
|
|
39
|
+
*/
|
|
40
|
+
export declare function evaluateLenses(handoff: ContextHandoff, programmaticResults: EvalResult[], projectRoot: string, config: BoberConfig): Promise<EvalResult[]>;
|
|
18
41
|
//# sourceMappingURL=evaluator-agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluator-agent.d.ts","sourceRoot":"","sources":["../../src/orchestrator/evaluator-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"evaluator-agent.d.ts","sourceRoot":"","sources":["../../src/orchestrator/evaluator-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAK9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAgBrE,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAQrE;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,cAAc,EACvB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,mBAAmB,CAAC,CA8E9B;AAID;;;;;;;;;;;GAWG;AACH;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,cAAc,EACvB,mBAAmB,EAAE,UAAU,EAAE,EACjC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,UAAU,EAAE,CAAC,CAQvB"}
|
|
@@ -4,11 +4,18 @@ import { createClient } from "../providers/factory.js";
|
|
|
4
4
|
import { getChangedFiles } from "../utils/git.js";
|
|
5
5
|
import { logger } from "../utils/logger.js";
|
|
6
6
|
import { resolveModel } from "./model-resolver.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { assembleSystemPrompt } from "./agent-loader.js";
|
|
8
|
+
import { resolveRoleTools, getGraphState, getGraphDeps } from "./tools/index.js";
|
|
9
9
|
import { runAgenticLoop } from "./agentic-loop.js";
|
|
10
|
+
import { PreflightContextInjector } from "../graph/preflight-injector.js";
|
|
11
|
+
import { graphPipelineLifecycle } from "../graph/pipeline-lifecycle.js";
|
|
12
|
+
import { emit } from "../telemetry/emit.js";
|
|
13
|
+
import { appendHistory } from "../state/history.js";
|
|
14
|
+
import { reconcile } from "./workflow/reconciler.js";
|
|
15
|
+
import { mapBounded } from "./workflow/scheduler.js";
|
|
16
|
+
import { resolveLensFocus } from "./eval-lenses.js";
|
|
10
17
|
// ── Constants ──────────────────────────────────────────────────────
|
|
11
|
-
const EVALUATOR_MAX_TURNS =
|
|
18
|
+
const EVALUATOR_MAX_TURNS = 100;
|
|
12
19
|
// ── Main ───────────────────────────────────────────────────────────
|
|
13
20
|
/**
|
|
14
21
|
* Run the evaluator agent, combining programmatic evaluation (plugins)
|
|
@@ -29,6 +36,8 @@ export async function runEvaluatorAgent(handoff, projectRoot, config) {
|
|
|
29
36
|
}
|
|
30
37
|
const sprintId = contract.contractId;
|
|
31
38
|
logger.sprint(sprintId, `Evaluating: ${contract.title}`);
|
|
39
|
+
// Sprint 28 — telemetry: emit agent-spawn at entry (fire-and-forget)
|
|
40
|
+
void emit(projectRoot, config, "agent-spawn", { agentName: "evaluator", contractId: sprintId });
|
|
32
41
|
// 1. Programmatic evaluation — run registered evaluator plugins
|
|
33
42
|
logger.info("Running programmatic evaluations...");
|
|
34
43
|
const registry = await createDefaultRegistry(config);
|
|
@@ -78,17 +87,68 @@ export async function runEvaluatorAgent(handoff, projectRoot, config) {
|
|
|
78
87
|
* Run the agent-based qualitative evaluation using a multi-turn agentic
|
|
79
88
|
* loop with bash, read_file, glob, and grep tools.
|
|
80
89
|
*
|
|
90
|
+
* When panel.enabled is true and >=2 lenses are configured, fans out
|
|
91
|
+
* one judge call per lens (bounded by maxConcurrent) and reconciles
|
|
92
|
+
* via majority vote into a single evaluator='panel' EvalResult.
|
|
93
|
+
* Otherwise runs the existing single judge call (byte-identical off path).
|
|
94
|
+
*
|
|
81
95
|
* The evaluator can run commands, take screenshots, inspect code, start
|
|
82
96
|
* dev servers, and curl endpoints — but CANNOT write or edit files.
|
|
83
97
|
*/
|
|
98
|
+
/**
|
|
99
|
+
* Side-effect-free lens-evaluation core. Runs the judge call(s) and returns the
|
|
100
|
+
* per-lens verdicts — a single verdict when the panel is off, one per lens
|
|
101
|
+
* (bounded concurrency) when on. Writes NOTHING to `.bober/` (no history append,
|
|
102
|
+
* no reconcile), so the workflow interpreter's `evaluate` dep can call it while
|
|
103
|
+
* the flusher remains the sole clock/commit source. The persisting wrapper
|
|
104
|
+
* {@link runAgentEvaluation} layers the history append + reconcile on top for
|
|
105
|
+
* the TS pipeline.
|
|
106
|
+
*/
|
|
107
|
+
export async function evaluateLenses(handoff, programmaticResults, projectRoot, config) {
|
|
108
|
+
const panel = config.evaluator.panel;
|
|
109
|
+
if (!panel.enabled || panel.lenses.length < 2) {
|
|
110
|
+
return [await runSingleLensEval(handoff, programmaticResults, projectRoot, config)];
|
|
111
|
+
}
|
|
112
|
+
return mapBounded(panel.lenses, panel.maxConcurrent, (lens) => runSingleLensEval(handoff, programmaticResults, projectRoot, config, lens));
|
|
113
|
+
}
|
|
84
114
|
async function runAgentEvaluation(handoff, programmaticResults, projectRoot, config) {
|
|
115
|
+
const panel = config.evaluator.panel;
|
|
116
|
+
// Side-effect-free core: run the judge call(s) → per-lens verdicts.
|
|
117
|
+
const lensResults = await evaluateLenses(handoff, programmaticResults, projectRoot, config);
|
|
118
|
+
if (!panel.enabled || panel.lenses.length < 2) {
|
|
119
|
+
// Off path — single judge call, byte-identical to the original behavior.
|
|
120
|
+
return lensResults[0];
|
|
121
|
+
}
|
|
122
|
+
const contractId = handoff.currentContract?.contractId ?? "unknown";
|
|
123
|
+
// C3 — per-lens verdict telemetry (PANEL path only; index-aligned with panel.lenses).
|
|
124
|
+
for (let i = 0; i < panel.lenses.length; i++) {
|
|
125
|
+
await appendHistory(projectRoot, {
|
|
126
|
+
timestamp: new Date().toISOString(),
|
|
127
|
+
event: "eval-lens-verdict",
|
|
128
|
+
phase: "evaluating",
|
|
129
|
+
sprintId: contractId,
|
|
130
|
+
details: { lens: panel.lenses[i], passed: lensResults[i].passed },
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return reconcile(contractId, 1, lensResults, new Date().toISOString());
|
|
134
|
+
}
|
|
135
|
+
// ── Single-lens evaluation ──────────────────────────────────────────
|
|
136
|
+
/**
|
|
137
|
+
* Run a single judge call. When `lens` is provided, a focus block is
|
|
138
|
+
* appended to the user message; when undefined the prompt is byte-identical
|
|
139
|
+
* to the original single-judge behavior (C2).
|
|
140
|
+
*/
|
|
141
|
+
async function runSingleLensEval(handoff, programmaticResults, projectRoot, config, lens) {
|
|
85
142
|
const timestamp = new Date().toISOString();
|
|
86
143
|
try {
|
|
87
|
-
// Load agent definition (system prompt from .md file)
|
|
88
|
-
const agentDef = await loadAgentDefinition("bober-evaluator", projectRoot);
|
|
89
144
|
const model = resolveModel(config.evaluator.model);
|
|
90
|
-
// Build tool set (evaluator: bash, read_file, glob, grep — NO write/edit)
|
|
91
|
-
|
|
145
|
+
// Build tool set (evaluator: bash, read_file, glob, grep — NO write/edit).
|
|
146
|
+
// UNION mode when gated: all original tools retained AND graph_* tools added.
|
|
147
|
+
const graphState = getGraphState(config);
|
|
148
|
+
const graphDeps = graphState.engineHealth === "ready" ? getGraphDeps() : undefined;
|
|
149
|
+
const toolSet = resolveRoleTools("evaluator", projectRoot, graphState, graphDeps ?? undefined);
|
|
150
|
+
// Assemble system prompt with graph-prompt decoration (ADR-5, Sprint 7).
|
|
151
|
+
const systemPrompt = await assembleSystemPrompt("evaluator", "bober-evaluator", projectRoot, graphState);
|
|
92
152
|
const client = createClient(config.evaluator.provider ?? null, config.evaluator.endpoint ?? null, config.evaluator.providerConfig, config.evaluator.model);
|
|
93
153
|
const handoffJson = serializeHandoff(handoff);
|
|
94
154
|
// Format programmatic results for context
|
|
@@ -150,12 +210,22 @@ Your final response must contain ONLY a JSON object matching this schema (no mar
|
|
|
150
210
|
"feedback": "Actionable feedback for the generator if anything needs fixing",
|
|
151
211
|
"timestamp": "${timestamp}"
|
|
152
212
|
}`;
|
|
153
|
-
|
|
213
|
+
// When a lens is provided, append a focus block (on path only).
|
|
214
|
+
// When lens is undefined the prompt is byte-identical to the original (C2).
|
|
215
|
+
const lensBlock = lens
|
|
216
|
+
? `\n\n## Evaluation Lens: ${lens}\n${resolveLensFocus(lens)}`
|
|
217
|
+
: "";
|
|
218
|
+
// Pre-flight graph context injection (ADR-9): prepend graph context to userMessage.
|
|
219
|
+
// On failure or timeout, userMessage is returned unchanged (spawn not blocked).
|
|
220
|
+
const graphClient = graphPipelineLifecycle.getGraphClient();
|
|
221
|
+
const preflightInjector = new PreflightContextInjector(graphClient, config.graph);
|
|
222
|
+
const enhancedMessage = await preflightInjector.inject("evaluator", handoff.currentContract ?? null, `${userMessage}${lensBlock}`, { baselineSha: "HEAD~1" });
|
|
223
|
+
logger.info(`Calling evaluator model (${config.evaluator.model} → ${model})${lens ? ` [lens: ${lens}]` : ""}...`);
|
|
154
224
|
const result = await runAgenticLoop({
|
|
155
225
|
client,
|
|
156
226
|
model,
|
|
157
|
-
systemPrompt
|
|
158
|
-
userMessage,
|
|
227
|
+
systemPrompt,
|
|
228
|
+
userMessage: enhancedMessage,
|
|
159
229
|
tools: toolSet.schemas,
|
|
160
230
|
toolHandlers: toolSet.handlers,
|
|
161
231
|
maxTurns: EVALUATOR_MAX_TURNS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluator-agent.js","sourceRoot":"","sources":["../../src/orchestrator/evaluator-agent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EACL,qBAAqB,EACrB,aAAa,GACd,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAInD,sEAAsE;AAEtE,MAAM,mBAAmB,GAAG,EAAE,CAAC;AA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,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,4CAA4C;QACrD,QAAQ,EAAE,kBAAkB,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;QAChD,SAAS,EAAE,iBAAiB;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator-agent.d.ts","sourceRoot":"","sources":["../../src/orchestrator/generator-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"generator-agent.d.ts","sourceRoot":"","sources":["../../src/orchestrator/generator-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAc3D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,mBAAmB;IACnB,KAAK,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;CACvD;AAID;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,cAAc,EACvB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,eAAe,CAAC,CA4G1B"}
|
|
@@ -2,9 +2,12 @@ import { serializeHandoff } from "./context-handoff.js";
|
|
|
2
2
|
import { createClient } from "../providers/factory.js";
|
|
3
3
|
import { logger } from "../utils/logger.js";
|
|
4
4
|
import { resolveModel } from "./model-resolver.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { assembleSystemPrompt } from "./agent-loader.js";
|
|
6
|
+
import { resolveRoleTools, getGraphState, getGraphDeps } from "./tools/index.js";
|
|
7
7
|
import { runAgenticLoop } from "./agentic-loop.js";
|
|
8
|
+
import { PreflightContextInjector } from "../graph/preflight-injector.js";
|
|
9
|
+
import { graphPipelineLifecycle } from "../graph/pipeline-lifecycle.js";
|
|
10
|
+
import { emit } from "../telemetry/emit.js";
|
|
8
11
|
// ── Main ───────────────────────────────────────────────────────────
|
|
9
12
|
/**
|
|
10
13
|
* Run the generator agent to implement changes for a sprint.
|
|
@@ -19,12 +22,17 @@ export async function runGenerator(handoff, projectRoot, config) {
|
|
|
19
22
|
const contractId = handoff.currentContract?.contractId ?? "unknown";
|
|
20
23
|
const title = handoff.currentContract?.title ?? "unknown";
|
|
21
24
|
logger.sprint(contractId, `Generating: ${title}`);
|
|
22
|
-
//
|
|
23
|
-
|
|
25
|
+
// Sprint 28 — telemetry: emit agent-spawn at entry (fire-and-forget)
|
|
26
|
+
void emit(projectRoot, config, "agent-spawn", { agentName: "generator", contractId });
|
|
24
27
|
const model = resolveModel(config.generator.model);
|
|
25
28
|
const maxTurns = config.generator.maxTurnsPerSprint;
|
|
26
|
-
// Build tool set (generator gets full access
|
|
27
|
-
|
|
29
|
+
// Build tool set (generator gets full access — UNION mode when gated:
|
|
30
|
+
// all original tools retained AND graph_* tools added).
|
|
31
|
+
const graphState = getGraphState(config);
|
|
32
|
+
const graphDeps = graphState.engineHealth === "ready" ? getGraphDeps() : undefined;
|
|
33
|
+
const toolSet = resolveRoleTools("generator", projectRoot, graphState, graphDeps ?? undefined);
|
|
34
|
+
// Assemble system prompt with graph-prompt decoration (ADR-5, Sprint 7).
|
|
35
|
+
const systemPrompt = await assembleSystemPrompt("generator", "bober-generator", projectRoot, graphState);
|
|
28
36
|
const client = createClient(config.generator.provider ?? null, config.generator.endpoint ?? null, config.generator.providerConfig, config.generator.model);
|
|
29
37
|
const handoffJson = serializeHandoff(handoff);
|
|
30
38
|
// Check if a Sprint Briefing exists for this contract
|
|
@@ -54,14 +62,19 @@ When you are done, your final response must contain ONLY a JSON object with this
|
|
|
54
62
|
"blockers": ["<any unresolved issues>"],
|
|
55
63
|
"notes": "<additional context for the evaluator>"
|
|
56
64
|
}`;
|
|
65
|
+
// Pre-flight graph context injection (ADR-9): prepend graph context to userMessage.
|
|
66
|
+
// On failure or timeout, userMessage is returned unchanged (spawn not blocked).
|
|
67
|
+
const graphClient = graphPipelineLifecycle.getGraphClient();
|
|
68
|
+
const preflightInjector = new PreflightContextInjector(graphClient, config.graph);
|
|
69
|
+
const enhancedMessage = await preflightInjector.inject("generator", handoff.currentContract ?? null, userMessage);
|
|
57
70
|
logger.info(`Calling generator model (${config.generator.model} → ${model})...`);
|
|
58
71
|
// Track which files were written/edited via tools
|
|
59
72
|
const filesWritten = new Set();
|
|
60
73
|
const result = await runAgenticLoop({
|
|
61
74
|
client,
|
|
62
75
|
model,
|
|
63
|
-
systemPrompt
|
|
64
|
-
userMessage,
|
|
76
|
+
systemPrompt,
|
|
77
|
+
userMessage: enhancedMessage,
|
|
65
78
|
tools: toolSet.schemas,
|
|
66
79
|
toolHandlers: toolSet.handlers,
|
|
67
80
|
maxTurns,
|
|
@@ -76,10 +89,42 @@ When you are done, your final response must contain ONLY a JSON object with this
|
|
|
76
89
|
const inputStr = JSON.stringify(inp).slice(0, 120);
|
|
77
90
|
logger.debug(` [generator] ${name}(${inputStr})`);
|
|
78
91
|
},
|
|
92
|
+
// DeepSeek-style models sometimes narrate ("let me write the files...") and
|
|
93
|
+
// stop without calling any tool, which would end the sprint with no work
|
|
94
|
+
// done. Treat a tool-less turn as complete ONLY if it carries the JSON
|
|
95
|
+
// report; otherwise nudge the model to actually call its tools.
|
|
96
|
+
completionCheck: (text) => looksLikeGeneratorReport(text),
|
|
97
|
+
nudgeMessage: "You stopped without calling any tool and without producing the final " +
|
|
98
|
+
"JSON report. If implementation work remains, CALL write_file / edit_file " +
|
|
99
|
+
"/ your other tools NOW to make the changes — do not just describe them. " +
|
|
100
|
+
"Only once everything is implemented and verified, output ONLY the final " +
|
|
101
|
+
"JSON report object described in the instructions.",
|
|
102
|
+
maxNudges: 3,
|
|
79
103
|
});
|
|
80
104
|
logger.debug(`Generator completed in ${result.turnsUsed} turns (${result.toolsCalled.length} tool calls)`);
|
|
81
105
|
return parseGeneratorResult(result.finalText, filesWritten, result);
|
|
82
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* True when the text contains a JSON object that looks like the generator's
|
|
109
|
+
* completion report (has a "status" or "success" field). Used as the agentic
|
|
110
|
+
* loop's completion predicate so a tool-less "I'll write the files" narration
|
|
111
|
+
* is treated as incomplete (and nudged) rather than as a finished sprint.
|
|
112
|
+
*/
|
|
113
|
+
function looksLikeGeneratorReport(text) {
|
|
114
|
+
const start = text.indexOf("{");
|
|
115
|
+
const end = text.lastIndexOf("}");
|
|
116
|
+
if (start === -1 || end <= start)
|
|
117
|
+
return false;
|
|
118
|
+
try {
|
|
119
|
+
const obj = JSON.parse(text.slice(start, end + 1));
|
|
120
|
+
return (typeof obj === "object" &&
|
|
121
|
+
obj !== null &&
|
|
122
|
+
("status" in obj || "success" in obj));
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
83
128
|
// ── JSON parser ────────────────────────────────────────────────────
|
|
84
129
|
/**
|
|
85
130
|
* Parse the generator response text into a GeneratorResult.
|