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,39 @@
|
|
|
1
|
+
import { readRunStatesFromDisk } from "../state/run-state.js";
|
|
2
|
+
// ── Status mapping ────────────────────────────────────────────────────
|
|
3
|
+
function mapStatus(s) {
|
|
4
|
+
if (s === "completed")
|
|
5
|
+
return "completed";
|
|
6
|
+
if (s === "failed" || s === "aborted")
|
|
7
|
+
return "failed";
|
|
8
|
+
return "other"; // "running"
|
|
9
|
+
}
|
|
10
|
+
// ── OutcomeAggregator ─────────────────────────────────────────────────
|
|
11
|
+
export class OutcomeAggregator {
|
|
12
|
+
async aggregate(execution) {
|
|
13
|
+
const { folder, scaffold, spawn } = execution;
|
|
14
|
+
// Scaffold failed and no spawn → failed via exit-code source
|
|
15
|
+
if (scaffold.error && !spawn) {
|
|
16
|
+
return { folder, status: "failed", source: "exit-code", exitCode: -1 };
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
const states = await readRunStatesFromDisk(scaffold.absPath);
|
|
20
|
+
if (states.length > 0) {
|
|
21
|
+
// newest by startedAt — ISO-8601 strings sort lexicographically
|
|
22
|
+
const newest = states.reduce((a, b) => (b.startedAt > a.startedAt ? b : a));
|
|
23
|
+
return {
|
|
24
|
+
folder,
|
|
25
|
+
status: mapStatus(newest.status),
|
|
26
|
+
source: "disk",
|
|
27
|
+
runId: newest.runId,
|
|
28
|
+
runState: newest,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
// readRunStatesFromDisk already swallows IO/JSON errors; guard anyway → fall through
|
|
34
|
+
}
|
|
35
|
+
const code = spawn?.exitCode ?? -1;
|
|
36
|
+
return { folder, status: code === 0 ? "completed" : "failed", source: "exit-code", exitCode: code };
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=aggregator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregator.js","sourceRoot":"","sources":["../../src/fleet/aggregator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,yEAAyE;AAEzE,SAAS,SAAS,CAAC,CAAqB;IACtC,IAAI,CAAC,KAAK,WAAW;QAAE,OAAO,WAAW,CAAC;IAC1C,IAAI,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IACvD,OAAO,OAAO,CAAC,CAAC,YAAY;AAC9B,CAAC;AAED,yEAAyE;AAEzE,MAAM,OAAO,iBAAiB;IAC5B,KAAK,CAAC,SAAS,CAAC,SAAyB;QACvC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC;QAE9C,6DAA6D;QAC7D,IAAI,QAAQ,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;YAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC;QACzE,CAAC;QAED,IAAI,CAAC;YACH,MAAM,MAAM,GAAe,MAAM,qBAAqB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACzE,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACtB,gEAAgE;gBAChE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC5E,OAAO;oBACL,MAAM;oBACN,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;oBAChC,MAAM,EAAE,MAAM;oBACd,KAAK,EAAE,MAAM,CAAC,KAAK;oBACnB,QAAQ,EAAE,MAAM;iBACjB,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,qFAAqF;QACvF,CAAC;QAED,MAAM,IAAI,GAAG,KAAK,EAAE,QAAQ,IAAI,CAAC,CAAC,CAAC;QACnC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACtG,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BoberConfig } from "../config/schema.js";
|
|
2
|
+
import type { FleetChild } from "./manifest.js";
|
|
3
|
+
/**
|
|
4
|
+
* Build a Zod-valid BoberConfig for a fleet child process.
|
|
5
|
+
*
|
|
6
|
+
* Starts from createDefaultConfig() with the DeepSeek (openai-compat)
|
|
7
|
+
* provider set on planner, generator, and evaluator, then shallow-merges
|
|
8
|
+
* child.config top-level keys over the base (a child top-level key fully
|
|
9
|
+
* replaces the base value — no deep merge).
|
|
10
|
+
*/
|
|
11
|
+
export declare function buildChildConfig(child: FleetChild): BoberConfig;
|
|
12
|
+
//# sourceMappingURL=child-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child-config.d.ts","sourceRoot":"","sources":["../../src/fleet/child-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAUhD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,CAwB/D"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { BoberConfigSchema, createDefaultConfig } from "../config/schema.js";
|
|
2
|
+
// ── DeepSeek / openai-compat constants ──────────────────────────────
|
|
3
|
+
const DEEPSEEK_PROVIDER = "openai-compat";
|
|
4
|
+
const DEEPSEEK_ENDPOINT = "https://api.deepseek.com";
|
|
5
|
+
const DEEPSEEK_MODEL = "deepseek-v4-pro";
|
|
6
|
+
// ── Builder ──────────────────────────────────────────────────────────
|
|
7
|
+
/**
|
|
8
|
+
* Build a Zod-valid BoberConfig for a fleet child process.
|
|
9
|
+
*
|
|
10
|
+
* Starts from createDefaultConfig() with the DeepSeek (openai-compat)
|
|
11
|
+
* provider set on planner, generator, and evaluator, then shallow-merges
|
|
12
|
+
* child.config top-level keys over the base (a child top-level key fully
|
|
13
|
+
* replaces the base value — no deep merge).
|
|
14
|
+
*/
|
|
15
|
+
export function buildChildConfig(child) {
|
|
16
|
+
const base = createDefaultConfig(child.folder, "greenfield");
|
|
17
|
+
base.planner = {
|
|
18
|
+
...base.planner,
|
|
19
|
+
model: DEEPSEEK_MODEL,
|
|
20
|
+
provider: DEEPSEEK_PROVIDER,
|
|
21
|
+
endpoint: DEEPSEEK_ENDPOINT,
|
|
22
|
+
};
|
|
23
|
+
base.generator = {
|
|
24
|
+
...base.generator,
|
|
25
|
+
model: DEEPSEEK_MODEL,
|
|
26
|
+
provider: DEEPSEEK_PROVIDER,
|
|
27
|
+
endpoint: DEEPSEEK_ENDPOINT,
|
|
28
|
+
};
|
|
29
|
+
base.evaluator = {
|
|
30
|
+
...base.evaluator,
|
|
31
|
+
model: DEEPSEEK_MODEL,
|
|
32
|
+
provider: DEEPSEEK_PROVIDER,
|
|
33
|
+
endpoint: DEEPSEEK_ENDPOINT,
|
|
34
|
+
};
|
|
35
|
+
const merged = { ...base, ...(child.config ?? {}) };
|
|
36
|
+
return BoberConfigSchema.parse(merged);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=child-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child-config.js","sourceRoot":"","sources":["../../src/fleet/child-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAI7E,uEAAuE;AAEvE,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAC1C,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AACrD,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEzC,wEAAwE;AAExE;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAiB;IAChD,MAAM,IAAI,GAAG,mBAAmB,CAAC,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAE7D,IAAI,CAAC,OAAO,GAAG;QACb,GAAG,IAAI,CAAC,OAAO;QACf,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,iBAAiB;QAC3B,QAAQ,EAAE,iBAAiB;KAC5B,CAAC;IACF,IAAI,CAAC,SAAS,GAAG;QACf,GAAG,IAAI,CAAC,SAAS;QACjB,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,iBAAiB;QAC3B,QAAQ,EAAE,iBAAiB;KAC5B,CAAC;IACF,IAAI,CAAC,SAAS,GAAG;QACf,GAAG,IAAI,CAAC,SAAS;QACjB,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,iBAAiB;QAC3B,QAAQ,EAAE,iBAAiB;KAC5B,CAAC;IAEF,MAAM,MAAM,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC;IACpD,OAAO,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { FleetManifest, FleetChild } from "./manifest.js";
|
|
2
|
+
import type { ScaffoldResult } from "./scaffolder.js";
|
|
3
|
+
import type { ChildSpawnResult } from "./runner.js";
|
|
4
|
+
import type { ChildExecution } from "./types.js";
|
|
5
|
+
export interface Scaffolder {
|
|
6
|
+
scaffold(rootDir: string, child: FleetChild): Promise<ScaffoldResult>;
|
|
7
|
+
}
|
|
8
|
+
export interface Runner {
|
|
9
|
+
run(spec: {
|
|
10
|
+
cwd: string;
|
|
11
|
+
task: string;
|
|
12
|
+
timeoutMs?: number;
|
|
13
|
+
}): Promise<ChildSpawnResult>;
|
|
14
|
+
}
|
|
15
|
+
export declare class FleetCoordinator {
|
|
16
|
+
private readonly scaffolder;
|
|
17
|
+
private readonly runner;
|
|
18
|
+
constructor(deps?: {
|
|
19
|
+
scaffolder?: Scaffolder;
|
|
20
|
+
runner?: Runner;
|
|
21
|
+
});
|
|
22
|
+
execute(manifest: FleetManifest): Promise<ChildExecution[]>;
|
|
23
|
+
private runChild;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=coordinator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../src/fleet/coordinator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CACvE;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACzF;AAID,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAEpB,IAAI,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,UAAU,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;IAKzD,OAAO,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;YASnD,QAAQ;CAsBvB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { mapBounded } from "../orchestrator/workflow/scheduler.js";
|
|
2
|
+
import { ChildScaffolder } from "./scaffolder.js";
|
|
3
|
+
import { ChildRunner } from "./runner.js";
|
|
4
|
+
// ── FleetCoordinator ──────────────────────────────────────────────────
|
|
5
|
+
export class FleetCoordinator {
|
|
6
|
+
scaffolder;
|
|
7
|
+
runner;
|
|
8
|
+
constructor(deps) {
|
|
9
|
+
this.scaffolder = deps?.scaffolder ?? new ChildScaffolder();
|
|
10
|
+
this.runner = deps?.runner ?? new ChildRunner();
|
|
11
|
+
}
|
|
12
|
+
async execute(manifest) {
|
|
13
|
+
return mapBounded(manifest.children, manifest.concurrency, (child) => this.runChild(manifest.rootDir, child));
|
|
14
|
+
}
|
|
15
|
+
// The never-reject thunk: EVERYTHING (incl. the awaits) is inside try/catch.
|
|
16
|
+
async runChild(rootDir, child) {
|
|
17
|
+
try {
|
|
18
|
+
const scaffold = await this.scaffolder.scaffold(rootDir, child);
|
|
19
|
+
if (scaffold.error) {
|
|
20
|
+
return { folder: child.folder, scaffold, spawn: undefined };
|
|
21
|
+
}
|
|
22
|
+
const spawn = await this.runner.run({ cwd: scaffold.absPath, task: child.task });
|
|
23
|
+
return { folder: child.folder, scaffold, spawn };
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
return {
|
|
27
|
+
folder: child.folder,
|
|
28
|
+
scaffold: {
|
|
29
|
+
folder: child.folder,
|
|
30
|
+
absPath: "",
|
|
31
|
+
configWritten: false,
|
|
32
|
+
gitInitialized: false,
|
|
33
|
+
error: String(e),
|
|
34
|
+
},
|
|
35
|
+
spawn: undefined,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=coordinator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator.js","sourceRoot":"","sources":["../../src/fleet/coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAgB1C,yEAAyE;AAEzE,MAAM,OAAO,gBAAgB;IACV,UAAU,CAAa;IACvB,MAAM,CAAS;IAEhC,YAAY,IAAmD;QAC7D,IAAI,CAAC,UAAU,GAAG,IAAI,EAAE,UAAU,IAAI,IAAI,eAAe,EAAE,CAAC;QAC5D,IAAI,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,QAAuB;QACnC,OAAO,UAAU,CACf,QAAQ,CAAC,QAAQ,EACjB,QAAQ,CAAC,WAAW,EACpB,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,CAClD,CAAC;IACJ,CAAC;IAED,6EAA6E;IACrE,KAAK,CAAC,QAAQ,CAAC,OAAe,EAAE,KAAiB;QACvD,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAChE,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;gBACnB,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;YAC9D,CAAC;YACD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YACjF,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QACnD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO;gBACL,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,QAAQ,EAAE;oBACR,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,OAAO,EAAE,EAAE;oBACX,aAAa,EAAE,KAAK;oBACpB,cAAc,EAAE,KAAK;oBACrB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;iBACjB;gBACD,KAAK,EAAE,SAAS;aACjB,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import { FleetCoordinator } from "./coordinator.js";
|
|
3
|
+
import { OutcomeAggregator } from "./aggregator.js";
|
|
4
|
+
import { PortfolioReporter } from "./reporter.js";
|
|
5
|
+
import type { PortfolioReport } from "./reporter.js";
|
|
6
|
+
export type { PortfolioReport };
|
|
7
|
+
export interface FleetDeps {
|
|
8
|
+
coordinator?: FleetCoordinator;
|
|
9
|
+
aggregator?: OutcomeAggregator;
|
|
10
|
+
reporter?: PortfolioReporter;
|
|
11
|
+
}
|
|
12
|
+
export interface FleetOptions {
|
|
13
|
+
/** Override manifest.concurrency */
|
|
14
|
+
concurrency?: number;
|
|
15
|
+
/** Override manifest.rootDir */
|
|
16
|
+
rootDir?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Load a fleet manifest, fail fast on missing credentials, fan-out all
|
|
20
|
+
* children through the coordinator, aggregate outcomes, build a portfolio
|
|
21
|
+
* report, write it to <rootDir>/.bober/fleet-report.json, and return it.
|
|
22
|
+
*
|
|
23
|
+
* Per-child failures are data in the report — this function only throws on
|
|
24
|
+
* batch-setup errors (bad manifest, missing credentials, report-write IO).
|
|
25
|
+
*
|
|
26
|
+
* @param manifestPath - Absolute or relative path to the fleet manifest JSON.
|
|
27
|
+
* @param options - Optional overrides for concurrency and rootDir.
|
|
28
|
+
* @param deps - Optional DI for testing (coordinator / aggregator / reporter).
|
|
29
|
+
*/
|
|
30
|
+
export declare function runFleet(manifestPath: string, options?: FleetOptions, deps?: FleetDeps): Promise<PortfolioReport>;
|
|
31
|
+
/**
|
|
32
|
+
* Register `agent-bober fleet <manifest>` with the commander program.
|
|
33
|
+
*
|
|
34
|
+
* Exit codes:
|
|
35
|
+
* 0 — always on per-child failures (failures are reported, not fatal)
|
|
36
|
+
* 1 — only on batch-setup errors (bad manifest, missing credentials,
|
|
37
|
+
* report IO failure)
|
|
38
|
+
*/
|
|
39
|
+
export declare function registerFleetCommand(program: Command): void;
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fleet/index.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAKlD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,YAAY,EAAE,eAAe,EAAE,CAAC;AAIhC,MAAM,WAAW,SAAS;IACxB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B;AAqCD,MAAM,WAAW,YAAY;IAC3B,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,QAAQ,CAC5B,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,YAAY,EACtB,IAAI,CAAC,EAAE,SAAS,GACf,OAAO,CAAC,eAAe,CAAC,CA6B1B;AAID;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgC3D"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// ── fleet/index.ts ────────────────────────────────────────────────────
|
|
2
|
+
//
|
|
3
|
+
// runFleet: orchestrates load → credential fail-fast → coordinate →
|
|
4
|
+
// aggregate → report → write, and always resolves with a
|
|
5
|
+
// PortfolioReport (per-child failures are data, not throws).
|
|
6
|
+
//
|
|
7
|
+
// registerFleetCommand: wires `agent-bober fleet <manifest>` into the
|
|
8
|
+
// commander program (mirrors registerWorktreeCommand pattern).
|
|
9
|
+
import chalk from "chalk";
|
|
10
|
+
import { load } from "./manifest.js";
|
|
11
|
+
import { buildChildConfig } from "./child-config.js";
|
|
12
|
+
import { FleetCoordinator } from "./coordinator.js";
|
|
13
|
+
import { OutcomeAggregator } from "./aggregator.js";
|
|
14
|
+
import { PortfolioReporter } from "./reporter.js";
|
|
15
|
+
import { validateApiKey } from "../providers/factory.js";
|
|
16
|
+
import { logger } from "../utils/logger.js";
|
|
17
|
+
// ── Credential fail-fast ──────────────────────────────────────────────
|
|
18
|
+
/**
|
|
19
|
+
* Validate DeepSeek credentials for every child BEFORE spawning anything.
|
|
20
|
+
* Reuses validateApiKey from providers/factory.ts for identical semantics.
|
|
21
|
+
* Throws on the first child whose effective config is missing a required key.
|
|
22
|
+
*/
|
|
23
|
+
function validateManifestCredentials(manifest) {
|
|
24
|
+
for (const child of manifest.children) {
|
|
25
|
+
const cfg = buildChildConfig(child);
|
|
26
|
+
const roleCfgs = [
|
|
27
|
+
{ role: "Planner", section: cfg.planner },
|
|
28
|
+
{ role: "Generator", section: cfg.generator },
|
|
29
|
+
{ role: "Evaluator", section: cfg.evaluator },
|
|
30
|
+
];
|
|
31
|
+
for (const { role, section } of roleCfgs) {
|
|
32
|
+
if (!section)
|
|
33
|
+
continue;
|
|
34
|
+
const s = section;
|
|
35
|
+
const apiKey = typeof s.providerConfig?.["apiKey"] === "string"
|
|
36
|
+
? s.providerConfig["apiKey"]
|
|
37
|
+
: undefined;
|
|
38
|
+
validateApiKey(s.provider ?? "anthropic", role, apiKey, s.endpoint ?? undefined);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Load a fleet manifest, fail fast on missing credentials, fan-out all
|
|
44
|
+
* children through the coordinator, aggregate outcomes, build a portfolio
|
|
45
|
+
* report, write it to <rootDir>/.bober/fleet-report.json, and return it.
|
|
46
|
+
*
|
|
47
|
+
* Per-child failures are data in the report — this function only throws on
|
|
48
|
+
* batch-setup errors (bad manifest, missing credentials, report-write IO).
|
|
49
|
+
*
|
|
50
|
+
* @param manifestPath - Absolute or relative path to the fleet manifest JSON.
|
|
51
|
+
* @param options - Optional overrides for concurrency and rootDir.
|
|
52
|
+
* @param deps - Optional DI for testing (coordinator / aggregator / reporter).
|
|
53
|
+
*/
|
|
54
|
+
export async function runFleet(manifestPath, options, deps) {
|
|
55
|
+
// 1. Load + validate manifest
|
|
56
|
+
const manifest = await load(manifestPath);
|
|
57
|
+
// 2. Apply options overrides (shallow copy to avoid mutating the parsed object)
|
|
58
|
+
const effectiveManifest = {
|
|
59
|
+
...manifest,
|
|
60
|
+
...(options?.concurrency !== undefined ? { concurrency: options.concurrency } : {}),
|
|
61
|
+
...(options?.rootDir !== undefined ? { rootDir: options.rootDir } : {}),
|
|
62
|
+
};
|
|
63
|
+
// 3. Credential fail-fast BEFORE any spawn
|
|
64
|
+
validateManifestCredentials(effectiveManifest);
|
|
65
|
+
// 4. Execute → aggregate
|
|
66
|
+
const coordinator = deps?.coordinator ?? new FleetCoordinator();
|
|
67
|
+
const aggregator = deps?.aggregator ?? new OutcomeAggregator();
|
|
68
|
+
const reporter = deps?.reporter ?? new PortfolioReporter();
|
|
69
|
+
const executions = await coordinator.execute(effectiveManifest);
|
|
70
|
+
const outcomes = await Promise.all(executions.map((e) => aggregator.aggregate(e)));
|
|
71
|
+
// 5. Build + write report
|
|
72
|
+
const report = reporter.build(outcomes);
|
|
73
|
+
await reporter.write(effectiveManifest.rootDir, report);
|
|
74
|
+
return report;
|
|
75
|
+
}
|
|
76
|
+
// ── registerFleetCommand ──────────────────────────────────────────────
|
|
77
|
+
/**
|
|
78
|
+
* Register `agent-bober fleet <manifest>` with the commander program.
|
|
79
|
+
*
|
|
80
|
+
* Exit codes:
|
|
81
|
+
* 0 — always on per-child failures (failures are reported, not fatal)
|
|
82
|
+
* 1 — only on batch-setup errors (bad manifest, missing credentials,
|
|
83
|
+
* report IO failure)
|
|
84
|
+
*/
|
|
85
|
+
export function registerFleetCommand(program) {
|
|
86
|
+
program
|
|
87
|
+
.command("fleet <manifest>")
|
|
88
|
+
.description("Run a fleet of agent-bober children from a manifest")
|
|
89
|
+
.option("--concurrency <n>", "Override manifest concurrency")
|
|
90
|
+
.option("--root <dir>", "Override manifest rootDir")
|
|
91
|
+
.action(async (manifest, opts) => {
|
|
92
|
+
try {
|
|
93
|
+
const report = await runFleet(manifest, {
|
|
94
|
+
concurrency: opts.concurrency ? Number(opts.concurrency) : undefined,
|
|
95
|
+
rootDir: opts.root,
|
|
96
|
+
});
|
|
97
|
+
console.log();
|
|
98
|
+
console.log(chalk.bold("═══ Fleet Summary ═══"));
|
|
99
|
+
console.log();
|
|
100
|
+
console.log(` Total: ${chalk.cyan(String(report.total))} children`);
|
|
101
|
+
console.log(` Completed: ${chalk.green(String(report.completed))}`);
|
|
102
|
+
if (report.failed > 0) {
|
|
103
|
+
console.log(` Failed: ${chalk.red(String(report.failed))}`);
|
|
104
|
+
}
|
|
105
|
+
if (report.other > 0) {
|
|
106
|
+
console.log(` Other: ${chalk.yellow(String(report.other))}`);
|
|
107
|
+
}
|
|
108
|
+
console.log();
|
|
109
|
+
process.exitCode = 0;
|
|
110
|
+
}
|
|
111
|
+
catch (err) {
|
|
112
|
+
logger.error(`Fleet failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
113
|
+
process.exitCode = 1;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fleet/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const FleetChildSchema: z.ZodObject<{
|
|
3
|
+
folder: z.ZodString;
|
|
4
|
+
task: z.ZodString;
|
|
5
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
folder: string;
|
|
8
|
+
task: string;
|
|
9
|
+
config?: Record<string, unknown> | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
folder: string;
|
|
12
|
+
task: string;
|
|
13
|
+
config?: Record<string, unknown> | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export type FleetChild = z.infer<typeof FleetChildSchema>;
|
|
16
|
+
export declare const FleetManifestSchema: z.ZodObject<{
|
|
17
|
+
rootDir: z.ZodDefault<z.ZodString>;
|
|
18
|
+
concurrency: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
children: z.ZodArray<z.ZodObject<{
|
|
20
|
+
folder: z.ZodString;
|
|
21
|
+
task: z.ZodString;
|
|
22
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
folder: string;
|
|
25
|
+
task: string;
|
|
26
|
+
config?: Record<string, unknown> | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
folder: string;
|
|
29
|
+
task: string;
|
|
30
|
+
config?: Record<string, unknown> | undefined;
|
|
31
|
+
}>, "many">;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
rootDir: string;
|
|
34
|
+
concurrency: number;
|
|
35
|
+
children: {
|
|
36
|
+
folder: string;
|
|
37
|
+
task: string;
|
|
38
|
+
config?: Record<string, unknown> | undefined;
|
|
39
|
+
}[];
|
|
40
|
+
}, {
|
|
41
|
+
children: {
|
|
42
|
+
folder: string;
|
|
43
|
+
task: string;
|
|
44
|
+
config?: Record<string, unknown> | undefined;
|
|
45
|
+
}[];
|
|
46
|
+
rootDir?: string | undefined;
|
|
47
|
+
concurrency?: number | undefined;
|
|
48
|
+
}>;
|
|
49
|
+
export type FleetManifest = z.infer<typeof FleetManifestSchema>;
|
|
50
|
+
export declare function load(manifestPath: string): Promise<FleetManifest>;
|
|
51
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/fleet/manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAIhE,wBAAsB,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAsBvE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
// ── Schemas ──────────────────────────────────────────────────────────
|
|
4
|
+
export const FleetChildSchema = z.object({
|
|
5
|
+
folder: z.string().min(1),
|
|
6
|
+
task: z.string().min(1),
|
|
7
|
+
config: z.record(z.string(), z.unknown()).optional(),
|
|
8
|
+
});
|
|
9
|
+
export const FleetManifestSchema = z.object({
|
|
10
|
+
rootDir: z.string().default("."),
|
|
11
|
+
concurrency: z.number().int().min(1).default(3),
|
|
12
|
+
children: z.array(FleetChildSchema).min(1),
|
|
13
|
+
});
|
|
14
|
+
// ── Loader ───────────────────────────────────────────────────────────
|
|
15
|
+
export async function load(manifestPath) {
|
|
16
|
+
let raw;
|
|
17
|
+
try {
|
|
18
|
+
raw = await readFile(manifestPath, "utf-8");
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
throw new Error(`Failed to read fleet manifest at "${manifestPath}": ${err.message}`, { cause: err });
|
|
22
|
+
}
|
|
23
|
+
let parsed;
|
|
24
|
+
try {
|
|
25
|
+
parsed = JSON.parse(raw);
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
throw new Error(`Fleet manifest at "${manifestPath}" is not valid JSON: ${err.message}`, { cause: err });
|
|
29
|
+
}
|
|
30
|
+
return FleetManifestSchema.parse(parsed);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/fleet/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wEAAwE;AAExE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC;IAChC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3C,CAAC,CAAC;AAGH,wEAAwE;AAExE,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,YAAoB;IAC7C,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,MAAM,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,qCAAqC,YAAY,MAAO,GAAa,CAAC,OAAO,EAAE,EAC/E,EAAE,KAAK,EAAE,GAAG,EAAE,CACf,CAAC;IACJ,CAAC;IAED,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,sBAAsB,YAAY,wBAAyB,GAAa,CAAC,OAAO,EAAE,EAClF,EAAE,KAAK,EAAE,GAAG,EAAE,CACf,CAAC;IACJ,CAAC;IAED,OAAO,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ChildOutcome } from "./types.js";
|
|
2
|
+
export interface PortfolioReport {
|
|
3
|
+
total: number;
|
|
4
|
+
completed: number;
|
|
5
|
+
failed: number;
|
|
6
|
+
other: number;
|
|
7
|
+
generatedAt: string;
|
|
8
|
+
children: ChildOutcome[];
|
|
9
|
+
}
|
|
10
|
+
export declare class PortfolioReporter {
|
|
11
|
+
/**
|
|
12
|
+
* Tally a list of ChildOutcome records into a PortfolioReport.
|
|
13
|
+
*
|
|
14
|
+
* - completed: status === "completed"
|
|
15
|
+
* - failed: status === "failed"
|
|
16
|
+
* - other: anything else (running / aborted / unknown)
|
|
17
|
+
* - generatedAt: ISO-8601 timestamp at call time
|
|
18
|
+
*/
|
|
19
|
+
build(outcomes: ChildOutcome[]): PortfolioReport;
|
|
20
|
+
/**
|
|
21
|
+
* Atomically write the PortfolioReport to <rootDir>/.bober/fleet-report.json.
|
|
22
|
+
*
|
|
23
|
+
* Uses temp file + rename to prevent partial-write corruption (mirrors
|
|
24
|
+
* writeRunState in src/state/run-state.ts).
|
|
25
|
+
*
|
|
26
|
+
* This is the ONE place in the fleet subsystem allowed to throw on IO failure.
|
|
27
|
+
*
|
|
28
|
+
* @returns The absolute path of the written file.
|
|
29
|
+
*/
|
|
30
|
+
write(rootDir: string, report: PortfolioReport): Promise<string>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=reporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../../src/fleet/reporter.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B;AAID,qBAAa,iBAAiB;IAG5B;;;;;;;OAOG;IACH,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,eAAe;IA2BhD;;;;;;;;;OASG;IACG,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;CAgBvE"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// ── reporter.ts ───────────────────────────────────────────────────────
|
|
2
|
+
//
|
|
3
|
+
// PortfolioReporter: tally ChildOutcome[] into a PortfolioReport and
|
|
4
|
+
// atomically write it to <rootDir>/.bober/fleet-report.json.
|
|
5
|
+
//
|
|
6
|
+
// Write strategy mirrors writeRunState in src/state/run-state.ts:
|
|
7
|
+
// temp file + rename to prevent partial-write corruption.
|
|
8
|
+
import { mkdir, rename, writeFile } from "node:fs/promises";
|
|
9
|
+
import { randomBytes } from "node:crypto";
|
|
10
|
+
import { join, resolve } from "node:path";
|
|
11
|
+
// ── PortfolioReporter ─────────────────────────────────────────────────
|
|
12
|
+
export class PortfolioReporter {
|
|
13
|
+
// ── build ───────────────────────────────────────────────────────────
|
|
14
|
+
/**
|
|
15
|
+
* Tally a list of ChildOutcome records into a PortfolioReport.
|
|
16
|
+
*
|
|
17
|
+
* - completed: status === "completed"
|
|
18
|
+
* - failed: status === "failed"
|
|
19
|
+
* - other: anything else (running / aborted / unknown)
|
|
20
|
+
* - generatedAt: ISO-8601 timestamp at call time
|
|
21
|
+
*/
|
|
22
|
+
build(outcomes) {
|
|
23
|
+
let completed = 0;
|
|
24
|
+
let failed = 0;
|
|
25
|
+
let other = 0;
|
|
26
|
+
for (const o of outcomes) {
|
|
27
|
+
if (o.status === "completed") {
|
|
28
|
+
completed++;
|
|
29
|
+
}
|
|
30
|
+
else if (o.status === "failed") {
|
|
31
|
+
failed++;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
other++;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
total: outcomes.length,
|
|
39
|
+
completed,
|
|
40
|
+
failed,
|
|
41
|
+
other,
|
|
42
|
+
generatedAt: new Date().toISOString(),
|
|
43
|
+
children: outcomes,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
// ── write ────────────────────────────────────────────────────────────
|
|
47
|
+
/**
|
|
48
|
+
* Atomically write the PortfolioReport to <rootDir>/.bober/fleet-report.json.
|
|
49
|
+
*
|
|
50
|
+
* Uses temp file + rename to prevent partial-write corruption (mirrors
|
|
51
|
+
* writeRunState in src/state/run-state.ts).
|
|
52
|
+
*
|
|
53
|
+
* This is the ONE place in the fleet subsystem allowed to throw on IO failure.
|
|
54
|
+
*
|
|
55
|
+
* @returns The absolute path of the written file.
|
|
56
|
+
*/
|
|
57
|
+
async write(rootDir, report) {
|
|
58
|
+
const dir = resolve(join(rootDir, ".bober"));
|
|
59
|
+
await mkdir(dir, { recursive: true });
|
|
60
|
+
const filePath = join(dir, "fleet-report.json");
|
|
61
|
+
const rnd = randomBytes(4).toString("hex");
|
|
62
|
+
const tmp = `${filePath}.${process.pid}.${Date.now()}.${rnd}.tmp`;
|
|
63
|
+
await writeFile(tmp, JSON.stringify(report, null, 2) + "\n", {
|
|
64
|
+
encoding: "utf-8",
|
|
65
|
+
mode: 0o600,
|
|
66
|
+
});
|
|
67
|
+
await rename(tmp, filePath);
|
|
68
|
+
return filePath;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=reporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../src/fleet/reporter.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,qEAAqE;AACrE,6DAA6D;AAC7D,EAAE;AACF,kEAAkE;AAClE,0DAA0D;AAE1D,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAe1C,yEAAyE;AAEzE,MAAM,OAAO,iBAAiB;IAC5B,uEAAuE;IAEvE;;;;;;;OAOG;IACH,KAAK,CAAC,QAAwB;QAC5B,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,IAAI,MAAM,GAAG,CAAC,CAAC;QACf,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;YACzB,IAAI,CAAC,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;gBAC7B,SAAS,EAAE,CAAC;YACd,CAAC;iBAAM,IAAI,CAAC,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;gBACjC,MAAM,EAAE,CAAC;YACX,CAAC;iBAAM,CAAC;gBACN,KAAK,EAAE,CAAC;YACV,CAAC;QACH,CAAC;QAED,OAAO;YACL,KAAK,EAAE,QAAQ,CAAC,MAAM;YACtB,SAAS;YACT,MAAM;YACN,KAAK;YACL,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACrC,QAAQ,EAAE,QAAQ;SACnB,CAAC;IACJ,CAAC;IAED,wEAAwE;IAExE;;;;;;;;;OASG;IACH,KAAK,CAAC,KAAK,CAAC,OAAe,EAAE,MAAuB;QAClD,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC7C,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAEtC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;QAChD,MAAM,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC3C,MAAM,GAAG,GAAG,GAAG,QAAQ,IAAI,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,CAAC;QAElE,MAAM,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE;YAC3D,QAAQ,EAAE,OAAO;YACjB,IAAI,EAAE,KAAK;SACZ,CAAC,CAAC;QACH,MAAM,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAE5B,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare function resolveCliEntry(): string;
|
|
2
|
+
export interface ChildRunSpec {
|
|
3
|
+
cwd: string;
|
|
4
|
+
task: string;
|
|
5
|
+
timeoutMs?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ChildSpawnResult {
|
|
8
|
+
cwd: string;
|
|
9
|
+
exitCode: number | null;
|
|
10
|
+
stdout: string;
|
|
11
|
+
stderr: string;
|
|
12
|
+
timedOut?: boolean;
|
|
13
|
+
spawnError?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Probe the CLI binary for a successful --version response.
|
|
17
|
+
* Returns true if the entry file responds with exitCode 0, false otherwise.
|
|
18
|
+
* Never throws.
|
|
19
|
+
*/
|
|
20
|
+
export declare function probeCliVersion(cliEntry: string): Promise<boolean>;
|
|
21
|
+
export declare class ChildRunner {
|
|
22
|
+
/**
|
|
23
|
+
* Optional override for the CLI entry path.
|
|
24
|
+
* Production code leaves this undefined (defaults to resolveCliEntry()).
|
|
25
|
+
* Tests inject the stub fixture path via the constructor to avoid
|
|
26
|
+
* requiring a built dist/cli/index.js during unit testing.
|
|
27
|
+
*/
|
|
28
|
+
private readonly _cliEntry?;
|
|
29
|
+
/**
|
|
30
|
+
* Optional override for the Node.js binary path.
|
|
31
|
+
* Production code leaves this undefined (defaults to process.execPath).
|
|
32
|
+
* Tests may inject a bad path to exercise the spawn-failure / ENOENT path.
|
|
33
|
+
*/
|
|
34
|
+
private readonly _nodeBin?;
|
|
35
|
+
constructor(options?: {
|
|
36
|
+
cliEntry?: string;
|
|
37
|
+
nodeBin?: string;
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* Spawn one `agent-bober run <task>` child process in spec.cwd.
|
|
41
|
+
* Uses process.execPath (the current Node binary) + the parent's own
|
|
42
|
+
* dist/cli/index.js — never a bare PATH lookup.
|
|
43
|
+
*
|
|
44
|
+
* Never throws: spawn errors are captured in spawnError.
|
|
45
|
+
*/
|
|
46
|
+
run(spec: ChildRunSpec): Promise<ChildSpawnResult>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/fleet/runner.ts"],"names":[],"mappings":"AAQA,wBAAgB,eAAe,IAAI,MAAM,CAGxC;AAID,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AASD;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUxE;AAID,qBAAa,WAAW;IACtB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAS;IAEpC;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAS;gBAEvB,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAK7D;;;;;;OAMG;IACG,GAAG,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAmDzD"}
|