/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */ /** * fix-workstream-runner.ts, drives ONE planned-fix cycle through the ONE * workstream engine and reports a structured outcome to the WRFC controller. * * This is what replaced the single-fixer prompt path: the review parses into * a dependency graph of typed tasks (review-task-source.ts), the engine runs * them elastically in isolated worktrees with reviewed-and-merged edge * release, and the outcome is STRUCTURED, merged, or a cycle / orphaned / * tasks-failed chain outcome, never a prompt an agent "may or may not follow * all the way through". Task-level green is telemetry: the CALLER (the * controller's terminal contract gate) decides completion by re-reviewing the * merged result against the ORIGINAL request. */ import type { ReviewerReport } from '../agents/completion-report.js'; import type { WrfcCommitScope } from '../agents/wrfc-config.js'; import type { OrchestrationEngine } from './engine.js'; import { type SemanticEdgePlanner } from './review-task-source.js'; export type FixWorkstreamOutcome = { readonly status: 'merged'; readonly workstreamId: string; readonly taskCount: number; readonly mergedTitles: readonly string[]; readonly filesModified: readonly string[]; } | { readonly status: 'failed'; readonly workstreamId?: string | undefined; readonly reason: string; /** The structured chain outcome class, when one applies. */ readonly structured?: 'cycle' | 'orphaned' | 'tasks-failed' | 'nothing-to-fix' | 'timeout' | undefined; }; export interface FixWorkstreamRunner { run(input: { readonly chainId: string; readonly originalTask: string; readonly review: ReviewerReport; readonly attempt: number; readonly commitScope: WrfcCommitScope; }): Promise; } export interface FixWorkstreamRunnerDeps { readonly engine: Pick; readonly semanticEdges?: SemanticEdgePlanner | undefined; /** Hard wall-clock bound on one cycle. Default 2 hours. */ readonly timeoutMs?: number | undefined; } /** Compose the runner over the one engine. */ export declare function createFixWorkstreamRunner(deps: FixWorkstreamRunnerDeps): FixWorkstreamRunner; //# sourceMappingURL=fix-workstream-runner.d.ts.map