import type { PlanItem } from "./wire.js"; /** A plan item enriched with its wave position and how many deps still block it. */ export interface PlanRow { item: PlanItem; /** 0 = free now (all deps satisfied); N = behind N waves of unsatisfied deps. */ wave: number; /** direct, in-set deps that are not yet satisfied. */ blockedCount: number; /** part of a dependency cycle — never schedulable, `wave` is Infinity. */ circular: boolean; /** a PLAN item, not done, wave 0 — the set you can actually pick up now. * (design/note are context, never "actionable".) */ actionable: boolean; } export interface PlanView { plans: PlanRow[]; agents: PlanItem[]; } /** * Linearize plan items into waves by Kahn-style layering: each pass places every item * whose unsatisfied in-set deps are all already placed, so an item lands at * `1 + max(wave of its blockers)`. A pass that places nothing means the leftovers form a * cycle — those are flagged `circular` with `wave = Infinity`, never schedulable. Ordered * by (wave, kind, id); done items sink to the end. */ export declare function waveOrder(items: PlanItem[]): PlanRow[]; /** Agents: flat, chronological by startedAt (fallback receiptIndex), both in `meta`. */ export declare function sortAgents(items: PlanItem[]): PlanItem[]; /** Build the rendered view: plans wave-ordered, agents chronological. Plans come from the * crib bus snapshot; agents from the direct subagent read (see agents.ts). */ export declare function buildView(planItems: PlanItem[], agentItems: PlanItem[]): PlanView;