import type { BrainArbiter } from '../coordination/brain.js'; import type { EventBus } from '../kernel/events.js'; import { type GoalFile } from './goal-store.js'; export interface CompletedGoalDeliverable { index: number; text: string; } export interface GoalCoordinationResult { goal: GoalFile; completed: CompletedGoalDeliverable[]; kanbanUpdatedTaskIds: string[]; reached: boolean; } export interface CoordinateGoalIterationOptions { projectRoot: string; goalPath: string; finalText: string; brain?: BrainArbiter | undefined; sessionId?: string | undefined; events?: EventBus | undefined; now?: (() => Date) | undefined; } /** * Parse optional `[DONE: index]` / `[DONE: text-prefix]` markers emitted by an * autonomy iteration. Numeric indices are human-facing and therefore 1-based; * `0` is accepted as an explicit first-item alias for backwards compatibility. */ export declare function parseCompletedGoalDeliverables(finalText: string, deliverables: readonly string[]): CompletedGoalDeliverable[]; export declare function isGoalDeliverableComplete(value: string): boolean; export declare function stripGoalDeliverableMarker(value: string): string; /** Mark newly completed deliverables and recompute progress from the checklist. */ export declare function applyGoalDeliverableCompletions(goal: GoalFile, completed: readonly CompletedGoalDeliverable[]): GoalFile; export declare function recomputeGoalProgress(goal: GoalFile): GoalFile; /** * Close the marker → Kanban → progress → Brain loop and persist the resulting * goal state. Brain is called exactly once, and only when every deliverable is * complete. A missing/negative Brain leaves the goal active at 100%. */ export declare function coordinateGoalIteration(options: CoordinateGoalIterationOptions): Promise; //# sourceMappingURL=goal-coordination.d.ts.map