/** * Timeline projection for the dashboard (`GET /api/plan`): one Gantt row per * increment, the latest ledger activity, daily throughput and an * uninterrupted-work forecast for open increments. Reads only `.specweave` * files; no model or network calls. * * Forecast model * - Active time of a finished task: from the later of its claim and the same * agent's previous finish in that increment, to its `done`. Spans under a * minute are bookkeeping (work recorded after the fact) and spans over * {@link MAX_TASK_MINUTES} include interruptions; both are dropped. * - Task weight: `1 + 0.5 x (files - 1) + 0.25 x (ACs - 1)`, clamped to 0.5-4. * - Only increments tracked live feed the rates. * - Rate: minutes per weight unit at the median (p50) and 80th percentile * (p80), by model when it has {@link MIN_SAMPLES}, else by tool, else overall. * - Remaining minutes of an open increment: its open tasks' weight x rate. * * @module dashboard/server/data/plan-timeline */ import { type LedgerEvent } from '../../../core/tasks/ledger.js'; import type { PlanTimelinePayload } from '../../work-types.js'; export declare const MAX_TASK_MINUTES = 240; export declare const MIN_SAMPLES = 5; /** Minutes per weight unit when the project has no history yet. */ export declare const DEFAULT_RATE: { p50: number; p80: number; }; export declare function taskWeight(files: number, acs: number): number; export declare function quantile(values: number[], q: number): number; interface Sample { tool: string; model: string | null; perWeight: number; } /** Active-time samples of the finished tasks in one increment's ledger. */ export declare function taskSamples(events: LedgerEvent[], weights: Map): Sample[]; export declare function buildPlanTimeline(root: string, now?: Date): PlanTimelinePayload; export {}; //# sourceMappingURL=plan-timeline.d.ts.map