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,328 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rollback awareness helpers (Sprint 21).
|
|
3
|
+
*
|
|
4
|
+
* Reads changelog.jsonl for an incident, identifies ChangeEntries that are
|
|
5
|
+
* effective-status 'executed' (not yet rolled back), and provides:
|
|
6
|
+
*
|
|
7
|
+
* planRollback — returns a RollbackPlan with steps in reverse execution order.
|
|
8
|
+
* executeRollback — runs each step via the Sprint 20 risky-action gate (per-step).
|
|
9
|
+
* presentPlan — renders the plan to a human-readable string for CLI output.
|
|
10
|
+
*
|
|
11
|
+
* Escalation design note (Sprint 21):
|
|
12
|
+
* True checkpoint-based escalation is deferred to Sprint 24 (full /bober-incident
|
|
13
|
+
* flow). Escalation here consists of:
|
|
14
|
+
* 1. A 'rollback_halted' timeline event with remaining step ids.
|
|
15
|
+
* 2. A stderr warning via writeWarn.
|
|
16
|
+
* 3. result.escalated=true + result.remaining=[...] returned to the caller.
|
|
17
|
+
* Sprint 24 can wrap this return value in a real checkpoint if needed.
|
|
18
|
+
*
|
|
19
|
+
* JSONL semantics: changelog.jsonl is append-only; "latest line per id wins".
|
|
20
|
+
* When a change is executed, Sprint 20 writes two lines (pending, executed).
|
|
21
|
+
* After rollback, Sprint 21 appends a third line (rolled-back). Effective status
|
|
22
|
+
* is determined by the LAST line in file-order with a given id.
|
|
23
|
+
*
|
|
24
|
+
* Reverse execution order: sort by the FIRST entry's executedAt (when the action
|
|
25
|
+
* originally ran), then reverse. File order guarantees write monotonicity.
|
|
26
|
+
*
|
|
27
|
+
* Sprint 21 — src/incident/rollback.ts
|
|
28
|
+
*/
|
|
29
|
+
import { open, mkdir, readFile } from "node:fs/promises";
|
|
30
|
+
import { constants } from "node:fs";
|
|
31
|
+
import { join } from "node:path";
|
|
32
|
+
import { appendChange, appendTimeline } from "./timeline.js";
|
|
33
|
+
import { executeAction } from "../orchestrator/deploy/execute.js";
|
|
34
|
+
// ── Private helpers ────────────────────────────────────────────────────────────
|
|
35
|
+
/**
|
|
36
|
+
* Append a single newline-terminated JSON line to filePath.
|
|
37
|
+
* Creates the directory if absent. Guarantees mode 0600.
|
|
38
|
+
* Mirrors appendOneLine from timeline.ts — inlined to avoid touching Sprint 19 code.
|
|
39
|
+
*/
|
|
40
|
+
async function appendOneLine(filePath, record) {
|
|
41
|
+
const dir = join(filePath, "..");
|
|
42
|
+
await mkdir(dir, { recursive: true });
|
|
43
|
+
const line = JSON.stringify(record) + "\n";
|
|
44
|
+
const flags = constants.O_WRONLY | constants.O_APPEND | constants.O_CREAT;
|
|
45
|
+
const fh = await open(filePath, flags, 0o600);
|
|
46
|
+
try {
|
|
47
|
+
await fh.chmod(0o600);
|
|
48
|
+
await fh.write(line);
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
await fh.close();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Read all ChangeEntry lines from changelog.jsonl.
|
|
56
|
+
* Returns all raw lines (not grouped) in file order.
|
|
57
|
+
* Returns [] if the file does not exist.
|
|
58
|
+
*/
|
|
59
|
+
async function readChangelog(projectRoot, incidentId) {
|
|
60
|
+
const changelogPath = join(projectRoot, ".bober", "incidents", incidentId, "changelog.jsonl");
|
|
61
|
+
try {
|
|
62
|
+
const raw = await readFile(changelogPath, "utf-8");
|
|
63
|
+
return raw
|
|
64
|
+
.split("\n")
|
|
65
|
+
.filter(Boolean)
|
|
66
|
+
.map((line) => JSON.parse(line));
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Append a RollbackExecutionEntry to rollback-execution.jsonl.
|
|
74
|
+
* The file is created lazily on first write (Sprint 19 createIncident does NOT
|
|
75
|
+
* pre-create it — only 5 jsonl files are initialized).
|
|
76
|
+
*/
|
|
77
|
+
async function appendRollbackExecution(projectRoot, incidentId, entry) {
|
|
78
|
+
const filePath = join(projectRoot, ".bober", "incidents", incidentId, "rollback-execution.jsonl");
|
|
79
|
+
await appendOneLine(filePath, entry);
|
|
80
|
+
}
|
|
81
|
+
// ── planRollback ───────────────────────────────────────────────────────────────
|
|
82
|
+
/**
|
|
83
|
+
* Build a RollbackPlan from a changelog.
|
|
84
|
+
*
|
|
85
|
+
* Effective-status semantics (latest-line-wins):
|
|
86
|
+
* For each unique `id`, group all entries; the LAST entry in file order
|
|
87
|
+
* determines the effective status. Only `executed` entries are rollbackable.
|
|
88
|
+
*
|
|
89
|
+
* Reverse execution order:
|
|
90
|
+
* Steps are sorted ascending by the FIRST entry's executedAt (the original
|
|
91
|
+
* execution time), then reversed. This means the most recent action is
|
|
92
|
+
* rolled back first.
|
|
93
|
+
*
|
|
94
|
+
* --since semantics (changeId-based, strict-after):
|
|
95
|
+
* Only changes whose FIRST entry's executedAt is strictly greater than the
|
|
96
|
+
* --since changeId's first entry's executedAt are included.
|
|
97
|
+
*
|
|
98
|
+
* @param projectRoot Absolute path to the project root.
|
|
99
|
+
* @param incidentId Incident to plan a rollback for.
|
|
100
|
+
* @param opts Optional PlanRollbackOpts.
|
|
101
|
+
* @throws Error if opts.since references a non-existent changeId.
|
|
102
|
+
*/
|
|
103
|
+
export async function planRollback(projectRoot, incidentId, opts = {}) {
|
|
104
|
+
const entries = await readChangelog(projectRoot, incidentId);
|
|
105
|
+
const warnings = [];
|
|
106
|
+
// Group by id; track first entry (for original time + inverse) and last entry (for effective status).
|
|
107
|
+
const byId = new Map();
|
|
108
|
+
for (const e of entries) {
|
|
109
|
+
const existing = byId.get(e.id);
|
|
110
|
+
if (existing) {
|
|
111
|
+
existing.last = e;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
byId.set(e.id, { first: e, last: e });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
let unrollbackable = 0;
|
|
118
|
+
const candidates = [];
|
|
119
|
+
for (const group of byId.values()) {
|
|
120
|
+
// Defensive: missing or empty inverse.description → warn and skip.
|
|
121
|
+
// Sprint 19 schema requires inverse, but we handle malformed/legacy data.
|
|
122
|
+
if (!group.first.inverse?.description ||
|
|
123
|
+
group.first.inverse.description.trim() === "") {
|
|
124
|
+
unrollbackable += 1;
|
|
125
|
+
warnings.push(`Change "${group.first.description}" (${group.first.id}) has no recorded inverse; skipped.`);
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
// Effective status filter: only 'executed' entries are rollbackable.
|
|
129
|
+
// 'rolled-back', 'rolled-back-failed', 'pending', 'failed' are excluded.
|
|
130
|
+
if (group.last.status === "executed") {
|
|
131
|
+
candidates.push(group);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// --since filter (changeId-based, strict-after semantics).
|
|
135
|
+
let filtered = candidates;
|
|
136
|
+
if (opts.since !== undefined) {
|
|
137
|
+
const pivot = byId.get(opts.since);
|
|
138
|
+
if (!pivot) {
|
|
139
|
+
throw new Error(`--since changeId "${opts.since}" not found in changelog`);
|
|
140
|
+
}
|
|
141
|
+
const pivotTime = pivot.first.executedAt;
|
|
142
|
+
filtered = candidates.filter((c) => c.first.executedAt > pivotTime);
|
|
143
|
+
warnings.push(`--since filter applied: showing ${filtered.length} of ${candidates.length} rollbackable changes.`);
|
|
144
|
+
}
|
|
145
|
+
// Sort ascending by original executedAt, then reverse to get newest-first.
|
|
146
|
+
filtered.sort((a, b) => (a.first.executedAt < b.first.executedAt ? -1 : 1));
|
|
147
|
+
filtered.reverse();
|
|
148
|
+
const steps = filtered.map(({ first }) => ({
|
|
149
|
+
originalChangeId: first.id,
|
|
150
|
+
originalDescription: first.description,
|
|
151
|
+
inverseDescription: first.inverse.description,
|
|
152
|
+
...(first.inverse.command !== undefined ? { inverseCommand: first.inverse.command } : {}),
|
|
153
|
+
originalExecutedAt: first.executedAt,
|
|
154
|
+
}));
|
|
155
|
+
return {
|
|
156
|
+
incidentId,
|
|
157
|
+
totalChanges: byId.size,
|
|
158
|
+
rollbackableChanges: steps.length,
|
|
159
|
+
unrollbackableChanges: unrollbackable,
|
|
160
|
+
steps,
|
|
161
|
+
warnings,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
// ── presentPlan ────────────────────────────────────────────────────────────────
|
|
165
|
+
/**
|
|
166
|
+
* Render a RollbackPlan to a human-readable string for CLI output.
|
|
167
|
+
*
|
|
168
|
+
* Always includes:
|
|
169
|
+
* - Header with incident ID
|
|
170
|
+
* - Change counts (total, rollbackable, unrollbackable)
|
|
171
|
+
* - Numbered steps in reverse execution order
|
|
172
|
+
* - Warnings section (if any)
|
|
173
|
+
*/
|
|
174
|
+
export function presentPlan(plan) {
|
|
175
|
+
const lines = [];
|
|
176
|
+
lines.push(`Rollback plan for incident ${plan.incidentId}:`);
|
|
177
|
+
lines.push("");
|
|
178
|
+
lines.push(`Total changes: ${plan.totalChanges}`);
|
|
179
|
+
lines.push(`Rollbackable: ${plan.rollbackableChanges}`);
|
|
180
|
+
lines.push(`Unrollbackable: ${plan.unrollbackableChanges}${plan.unrollbackableChanges > 0 ? " (see warnings)" : ""}`);
|
|
181
|
+
lines.push("");
|
|
182
|
+
if (plan.steps.length === 0) {
|
|
183
|
+
lines.push("(no rollbackable steps)");
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
lines.push("Proposed steps (in reverse execution order):");
|
|
187
|
+
plan.steps.forEach((s, idx) => {
|
|
188
|
+
lines.push(` ${idx + 1}. Undo "${s.originalDescription}"`);
|
|
189
|
+
lines.push(` → ${s.inverseDescription}`);
|
|
190
|
+
if (s.inverseCommand)
|
|
191
|
+
lines.push(` $ ${s.inverseCommand}`);
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
if (plan.warnings.length > 0) {
|
|
195
|
+
lines.push("");
|
|
196
|
+
lines.push("Warnings:");
|
|
197
|
+
for (const w of plan.warnings)
|
|
198
|
+
lines.push(` - ${w}`);
|
|
199
|
+
}
|
|
200
|
+
lines.push("");
|
|
201
|
+
return lines.join("\n");
|
|
202
|
+
}
|
|
203
|
+
// ── executeRollback ────────────────────────────────────────────────────────────
|
|
204
|
+
/**
|
|
205
|
+
* Execute a RollbackPlan step by step.
|
|
206
|
+
*
|
|
207
|
+
* Each step is a risky action that MUST pass through the Sprint 20 gate
|
|
208
|
+
* individually. This means N rollback steps → N gate invocations.
|
|
209
|
+
*
|
|
210
|
+
* On success of each step:
|
|
211
|
+
* - Appends a ChangeEntry with id=originalChangeId, status='rolled-back'.
|
|
212
|
+
* - Appends a RollbackExecutionEntry with status='rolled-back'.
|
|
213
|
+
*
|
|
214
|
+
* On failure of any step:
|
|
215
|
+
* - Appends a ChangeEntry with id=originalChangeId, status='rolled-back-failed'.
|
|
216
|
+
* - Appends a RollbackExecutionEntry with status='rolled-back-failed'.
|
|
217
|
+
* - Halts the sequence (remaining steps are NOT attempted).
|
|
218
|
+
* - Emits a 'rollback_halted' timeline event.
|
|
219
|
+
* - Returns result.escalated=true with result.remaining=[unrolled steps].
|
|
220
|
+
*
|
|
221
|
+
* @param projectRoot Absolute path to the project root.
|
|
222
|
+
* @param incidentId Incident to execute the rollback for.
|
|
223
|
+
* @param plan The plan produced by planRollback.
|
|
224
|
+
* @param opts Optional injections (config, executor, writeWarn, now).
|
|
225
|
+
*/
|
|
226
|
+
export async function executeRollback(projectRoot, incidentId, plan, opts = {}) {
|
|
227
|
+
const now = opts.now ?? (() => new Date());
|
|
228
|
+
const writeWarn = opts.writeWarn ?? ((m) => process.stderr.write(m));
|
|
229
|
+
await appendTimeline(projectRoot, incidentId, {
|
|
230
|
+
timestamp: now().toISOString(),
|
|
231
|
+
eventKind: "rollback_started",
|
|
232
|
+
source: "deployer",
|
|
233
|
+
summary: `Rollback started: ${plan.steps.length} step(s) planned`,
|
|
234
|
+
});
|
|
235
|
+
let succeeded = 0;
|
|
236
|
+
for (let i = 0; i < plan.steps.length; i++) {
|
|
237
|
+
const step = plan.steps[i];
|
|
238
|
+
// Construct the ProposedAction for this rollback step.
|
|
239
|
+
// The rollback step is always classified as risky — undoing a change is itself
|
|
240
|
+
// a destructive operation that requires the same gate discipline.
|
|
241
|
+
const proposed = {
|
|
242
|
+
id: `rollback-${step.originalChangeId}`,
|
|
243
|
+
description: step.inverseDescription,
|
|
244
|
+
classification: "risky",
|
|
245
|
+
reasoning: `Rolling back change ${step.originalChangeId}: ${step.originalDescription}`,
|
|
246
|
+
...(step.inverseCommand !== undefined ? { command: step.inverseCommand } : {}),
|
|
247
|
+
inverse: {
|
|
248
|
+
// The inverse-of-inverse is to re-apply the original change.
|
|
249
|
+
// We don't have the original command stored in ChangeEntry — see briefing §9.
|
|
250
|
+
description: `Re-apply original change: ${step.originalDescription}`,
|
|
251
|
+
},
|
|
252
|
+
};
|
|
253
|
+
const stepStart = Date.now();
|
|
254
|
+
const result = await executeAction(proposed, incidentId, projectRoot, opts.config, { executor: opts.executor, writeWarn, now });
|
|
255
|
+
const durationMs = Date.now() - stepStart;
|
|
256
|
+
if (result.status === "executed") {
|
|
257
|
+
// Mark the ORIGINAL ChangeEntry as rolled-back (use original id).
|
|
258
|
+
await appendChange(projectRoot, incidentId, {
|
|
259
|
+
id: step.originalChangeId,
|
|
260
|
+
type: "rollback",
|
|
261
|
+
executedAt: now().toISOString(),
|
|
262
|
+
description: `Rolled back: ${step.originalDescription}`,
|
|
263
|
+
inverse: { description: `Re-apply: ${step.originalDescription}` },
|
|
264
|
+
status: "rolled-back",
|
|
265
|
+
});
|
|
266
|
+
await appendRollbackExecution(projectRoot, incidentId, {
|
|
267
|
+
timestamp: now().toISOString(),
|
|
268
|
+
originalChangeId: step.originalChangeId,
|
|
269
|
+
inverseDescription: step.inverseDescription,
|
|
270
|
+
status: "rolled-back",
|
|
271
|
+
durationMs,
|
|
272
|
+
});
|
|
273
|
+
succeeded += 1;
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
// Failure (or aborted). Halt the sequence.
|
|
277
|
+
const errMsg = result.error ??
|
|
278
|
+
`rollback step aborted: ${result.reason ?? "unknown"}`;
|
|
279
|
+
await appendChange(projectRoot, incidentId, {
|
|
280
|
+
id: step.originalChangeId,
|
|
281
|
+
type: "rollback-failed",
|
|
282
|
+
executedAt: now().toISOString(),
|
|
283
|
+
description: `Rollback FAILED for: ${step.originalDescription}`,
|
|
284
|
+
inverse: { description: `Re-apply: ${step.originalDescription}` },
|
|
285
|
+
status: "rolled-back-failed",
|
|
286
|
+
});
|
|
287
|
+
await appendRollbackExecution(projectRoot, incidentId, {
|
|
288
|
+
timestamp: now().toISOString(),
|
|
289
|
+
originalChangeId: step.originalChangeId,
|
|
290
|
+
inverseDescription: step.inverseDescription,
|
|
291
|
+
status: "rolled-back-failed",
|
|
292
|
+
durationMs,
|
|
293
|
+
errorMessage: errMsg,
|
|
294
|
+
});
|
|
295
|
+
const remaining = plan.steps.slice(i + 1);
|
|
296
|
+
await appendTimeline(projectRoot, incidentId, {
|
|
297
|
+
timestamp: now().toISOString(),
|
|
298
|
+
eventKind: "rollback_halted",
|
|
299
|
+
source: "deployer",
|
|
300
|
+
summary: `Rollback HALTED at step ${i + 1}/${plan.steps.length}: ${errMsg}. ` +
|
|
301
|
+
`Remaining: ${remaining.map((s) => s.originalChangeId).join(", ")}`,
|
|
302
|
+
});
|
|
303
|
+
writeWarn(`[bober rollback] HALTED — step ${i + 1} (${step.originalChangeId}) failed: ${errMsg}. ` +
|
|
304
|
+
`${remaining.length} step(s) NOT rolled back: ${remaining.map((s) => s.originalChangeId).join(", ")}\n`);
|
|
305
|
+
return {
|
|
306
|
+
attempted: i + 1,
|
|
307
|
+
succeeded,
|
|
308
|
+
failed: 1,
|
|
309
|
+
remaining,
|
|
310
|
+
escalated: true,
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
await appendTimeline(projectRoot, incidentId, {
|
|
315
|
+
timestamp: now().toISOString(),
|
|
316
|
+
eventKind: "rollback_completed",
|
|
317
|
+
source: "deployer",
|
|
318
|
+
summary: `Rollback completed: ${succeeded}/${plan.steps.length} step(s) succeeded`,
|
|
319
|
+
});
|
|
320
|
+
return {
|
|
321
|
+
attempted: plan.steps.length,
|
|
322
|
+
succeeded,
|
|
323
|
+
failed: 0,
|
|
324
|
+
remaining: [],
|
|
325
|
+
escalated: false,
|
|
326
|
+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,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;aACtE,CAAC,CAAC;YAEH,SAAS,CACP,kCAAkC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,gBAAgB,aAAa,MAAM,IAAI;gBACtF,GAAG,SAAS,CAAC,MAAM,6BAA6B,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAC1G,CAAC;YAEF,OAAO;gBACL,SAAS,EAAE,CAAC,GAAG,CAAC;gBAChB,SAAS;gBACT,MAAM,EAAE,CAAC;gBACT,SAAS;gBACT,SAAS,EAAE,IAAI;aAChB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,cAAc,CAAC,WAAW,EAAE,UAAU,EAAE;QAC5C,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE;QAC9B,SAAS,EAAE,oBAAoB;QAC/B,MAAM,EAAE,UAAU;QAClB,OAAO,EAAE,uBAAuB,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,oBAAoB;KACnF,CAAC,CAAC;IAEH,OAAO;QACL,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;QAC5B,SAAS;QACT,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,EAAE;QACb,SAAS,EAAE,KAAK;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Incident timeline append helpers (Sprint 19).
|
|
3
|
+
*
|
|
4
|
+
* Every helper that writes a domain artifact (observations.jsonl,
|
|
5
|
+
* actions.jsonl, changelog.jsonl, runbook-execution.jsonl) ALSO appends
|
|
6
|
+
* a corresponding event to timeline.jsonl in the same mutex tick. This
|
|
7
|
+
* makes "show me what happened in chronological order" a single file read.
|
|
8
|
+
*
|
|
9
|
+
* Append atomicity: fs.open with O_WRONLY|O_APPEND|O_CREAT plus explicit
|
|
10
|
+
* fh.chmod(0o600) after open — mirrors the audit.ts pattern from Sprint 13.
|
|
11
|
+
* fs.appendFile is NOT used because it does not reliably honor the mode
|
|
12
|
+
* argument across all Node versions (see audit.ts header comment).
|
|
13
|
+
*
|
|
14
|
+
* POSIX O_APPEND atomicity: single-line records are well under PIPE_BUF
|
|
15
|
+
* (4096 bytes), so cross-process appends are safe in practice.
|
|
16
|
+
*
|
|
17
|
+
* Concurrent appends to the same incident are serialized via a per-incidentId
|
|
18
|
+
* Promise-chain mutex. Unrelated incidents proceed in parallel.
|
|
19
|
+
*
|
|
20
|
+
* setIncidentStatus uses atomic temp-file + rename to avoid a torn write
|
|
21
|
+
* if the process crashes mid-update.
|
|
22
|
+
*
|
|
23
|
+
* Sprint 19 — src/incident/timeline.ts
|
|
24
|
+
*/
|
|
25
|
+
import type { BoberConfig } from "../config/schema.js";
|
|
26
|
+
import { type IncidentId, type IncidentMetadata, type IncidentStatus, type IncidentSummary, type TimelineEvent, type ObservationEntry, type ActionEntry, type ChangeEntry, type RunbookExecutionEntry } from "./types.js";
|
|
27
|
+
import type { VerifyResult } from "./resolution-verify.js";
|
|
28
|
+
/**
|
|
29
|
+
* Derive a short kebab-case slug from a symptom string.
|
|
30
|
+
*
|
|
31
|
+
* Rules:
|
|
32
|
+
* 1. Lowercase the input.
|
|
33
|
+
* 2. Split on whitespace; take the first 3 non-empty tokens.
|
|
34
|
+
* 3. For each token, strip all characters outside [a-z0-9] (unicode is stripped).
|
|
35
|
+
* 4. Join surviving tokens with '-'.
|
|
36
|
+
* 5. Strip leading/trailing hyphens.
|
|
37
|
+
* 6. Truncate to 30 characters (hard limit).
|
|
38
|
+
* 7. If the result is empty (empty input / all-punctuation / unicode-only), return 'untitled'.
|
|
39
|
+
*
|
|
40
|
+
* Exported for unit testing.
|
|
41
|
+
*/
|
|
42
|
+
export declare function deriveSlug(symptom: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* Create a new incident artifact directory with all required files.
|
|
45
|
+
*
|
|
46
|
+
* Layout created:
|
|
47
|
+
* ```
|
|
48
|
+
* .bober/incidents/<incidentId>/
|
|
49
|
+
* incident.json — metadata (JSON)
|
|
50
|
+
* timeline.jsonl — chronological master event log (JSONL, empty)
|
|
51
|
+
* observations.jsonl — verified facts (JSONL, empty)
|
|
52
|
+
* actions.jsonl — actions taken/proposed (JSONL, empty)
|
|
53
|
+
* changelog.jsonl — deploys/config changes (JSONL, empty)
|
|
54
|
+
* runbook-execution.jsonl — runbook step results (JSONL, empty)
|
|
55
|
+
* hypotheses.md — current hypotheses (Markdown, empty)
|
|
56
|
+
* diagnoses/ — diagnosis JSON files from bober-diagnoser
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @param symptom Human-readable description of the incident trigger.
|
|
60
|
+
* @param projectRoot Absolute path to the project root (caller resolves this).
|
|
61
|
+
* @returns The new incident ID, e.g. 'inc-20260524-500-errors-on'.
|
|
62
|
+
*/
|
|
63
|
+
export declare function createIncident(symptom: string, projectRoot: string): Promise<IncidentId>;
|
|
64
|
+
/**
|
|
65
|
+
* Append a TimelineEvent to timeline.jsonl.
|
|
66
|
+
*
|
|
67
|
+
* This is the only append helper that writes ONLY to timeline.jsonl.
|
|
68
|
+
* All other append helpers call this implicitly via the double-write pattern.
|
|
69
|
+
*/
|
|
70
|
+
export declare function appendTimeline(projectRoot: string, incidentId: IncidentId, event: TimelineEvent): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Append an ObservationEntry to observations.jsonl AND emit a timeline event.
|
|
73
|
+
*
|
|
74
|
+
* Both writes happen inside the same mutex tick so they are ordered
|
|
75
|
+
* deterministically relative to other concurrent appends on this incident.
|
|
76
|
+
*/
|
|
77
|
+
export declare function appendObservation(projectRoot: string, incidentId: IncidentId, entry: ObservationEntry): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Append an ActionEntry to actions.jsonl AND emit a timeline event.
|
|
80
|
+
*/
|
|
81
|
+
export declare function appendAction(projectRoot: string, incidentId: IncidentId, entry: ActionEntry): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Append a ChangeEntry to changelog.jsonl AND emit a timeline event.
|
|
84
|
+
*
|
|
85
|
+
* Throws a ZodError if `entry.inverse` is missing — the field is REQUIRED
|
|
86
|
+
* at the schema level so Sprint 21 rollback awareness can always find an
|
|
87
|
+
* inverse for every executed change.
|
|
88
|
+
*
|
|
89
|
+
* The zod validation runs BEFORE the mutex is entered so no file is
|
|
90
|
+
* touched if validation fails.
|
|
91
|
+
*/
|
|
92
|
+
export declare function appendChange(projectRoot: string, incidentId: IncidentId, entry: ChangeEntry): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Append a RunbookExecutionEntry to runbook-execution.jsonl AND emit a
|
|
95
|
+
* timeline event.
|
|
96
|
+
*/
|
|
97
|
+
export declare function appendRunbookExecution(projectRoot: string, incidentId: IncidentId, entry: RunbookExecutionEntry): Promise<void>;
|
|
98
|
+
/** Options for the resolution gate (Sprint 22) + postmortem trigger (Sprint 23) + telemetry (Sprint 28). */
|
|
99
|
+
export interface SetStatusOpts {
|
|
100
|
+
/** REQUIRED when status='resolved' (unless overrideToken given). Must have verified=true. */
|
|
101
|
+
verifyResult?: VerifyResult;
|
|
102
|
+
/** REQUIRED when status='resolved' AND no verifyResult. Format: 'SKIP_METRIC_VERIFY: <reason>'. Empty reason rejects. */
|
|
103
|
+
overrideToken?: string;
|
|
104
|
+
/** When true (and status === 'resolved'), trigger async postmortem generation after the
|
|
105
|
+
* status write. Only the explicit literal false disables auto-gen. Default: true.
|
|
106
|
+
* Sprint 23. */
|
|
107
|
+
autoPostmortem?: boolean;
|
|
108
|
+
/** Test seam: if provided, the function calls back with the Promise that resolves when
|
|
109
|
+
* postmortem synthesis completes. Production callers leave this undefined and rely on
|
|
110
|
+
* fire-and-forget behavior. Sprint 23. */
|
|
111
|
+
onPostmortemPromise?: (p: Promise<void>) => void;
|
|
112
|
+
/** Sprint 28 — optional config for telemetry. When provided and telemetry.enabled=true,
|
|
113
|
+
* an 'incident-resolved' event is emitted (fire-and-forget) after the status write.
|
|
114
|
+
* Callers that don't have config available leave this undefined; no telemetry fires. */
|
|
115
|
+
config?: BoberConfig;
|
|
116
|
+
/** Sprint 28 — absolute project root for telemetry file path resolution.
|
|
117
|
+
* Required when config is provided for telemetry emit. */
|
|
118
|
+
telemetryProjectRoot?: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Update the status field in incident.json atomically.
|
|
122
|
+
*
|
|
123
|
+
* If status is 'resolved', sets resolvedAt to now (ISO-8601) automatically.
|
|
124
|
+
* Any additional fields in `extras` are merged in.
|
|
125
|
+
*
|
|
126
|
+
* Sprint 22 resolution gate: when transitioning to 'resolved', one of the
|
|
127
|
+
* following MUST be provided via opts:
|
|
128
|
+
* 1. opts.verifyResult with verified=true — metric verification passed.
|
|
129
|
+
* 2. opts.overrideToken matching 'SKIP_METRIC_VERIFY: <reason>' with a
|
|
130
|
+
* non-empty, non-whitespace reason — operator override with audit trail.
|
|
131
|
+
* Any other call to setIncidentStatus(id, 'resolved') will THROW.
|
|
132
|
+
*
|
|
133
|
+
* Uses temp-file + POSIX rename for crash safety.
|
|
134
|
+
*/
|
|
135
|
+
export declare function setIncidentStatus(projectRoot: string, incidentId: IncidentId, status: IncidentStatus, extras?: Partial<Omit<IncidentMetadata, "incidentId" | "symptom" | "createdAt" | "status">>, opts?: SetStatusOpts): Promise<void>;
|
|
136
|
+
/**
|
|
137
|
+
* List all incidents in .bober/incidents/, sorted by createdAt descending.
|
|
138
|
+
*
|
|
139
|
+
* Gracefully handles:
|
|
140
|
+
* - Missing .bober/incidents/ directory → returns [].
|
|
141
|
+
* - Malformed incident.json → logged via logger.warn, skipped.
|
|
142
|
+
*
|
|
143
|
+
* ENOENT on readdir is caught and returns []. Any other readdir error is
|
|
144
|
+
* re-thrown (do NOT silence unexpected failures).
|
|
145
|
+
*/
|
|
146
|
+
export declare function listIncidents(projectRoot: string): Promise<IncidentSummary[]>;
|
|
147
|
+
//# sourceMappingURL=timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../src/incident/timeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAOL,KAAK,UAAU,EACf,KAAK,gBAAgB,EAErB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAsD3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAWlD;AAID;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,UAAU,CAAC,CAiDrB;AAID;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,IAAI,CAAC,CASf;AAID;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CAsBf;AAID;;GAEG;AACH,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,WAAW,GACjB,OAAO,CAAC,IAAI,CAAC,CAsBf;AAID;;;;;;;;;GASG;A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