/** * skillGraph check-up — build-time validation of a declared graph. * * Pure + side-effect-free. Catches wiring mistakes at authoring time instead of * mid-run: a skill nobody can reach, an edge to a skill that isn't in the graph, * two un-prioritized edges leaving one skill, a graph with no start, a self-loop. * * Surfaced two ways: * • `graph.checkup()` → `{ ok, problems }` — always available, call it whenever. * • `.build({ check: 'throw' | 'warn' | 'off' })` — run it at build time. * * `unreachable-skill` is a WARNING, not an error: a skill with no incoming edge is * still legitimately reachable by the model via `read_skill`. Only `unknown-skill` * and `no-entry` are true errors. */ export type GraphProblemCode = 'unknown-skill' | 'no-entry' | 'unreachable-skill' | 'ambiguous-routes' | 'self-loop' | 'body-foreign-tool' | 'body-unknown-tool'; /** One issue found by the check-up. `kind: 'error'` fails `ok` (and `'throw'`). */ export interface GraphProblem { readonly kind: 'error' | 'warning'; readonly code: GraphProblemCode; readonly message: string; /** The skill the problem is about (unreachable/ambiguous source). */ readonly skill?: string; readonly from?: string; readonly to?: string; } /** Result of `graph.checkup()`. `ok` is false iff there is ≥1 `error`. */ export interface GraphCheckup { readonly ok: boolean; readonly problems: readonly GraphProblem[]; } export interface CheckupInput { /** Every skill id IN the graph. */ readonly skillIds: ReadonlySet; /** Declared entry skill ids. */ readonly entryIds: readonly string[]; /** Declared edges; `deterministic` = has a `when`/`onToolReturn` predicate. */ readonly routes: ReadonlyArray<{ fromId: string; toId: string; deterministic: boolean; }>; /** Decision-`tree()` graphs are exhaustive by construction — only id checks apply. */ readonly isTree: boolean; } /** Run the check-up. Pure. */ export declare function checkupGraph(input: CheckupInput): GraphCheckup; /** Format a check-up for a thrown error / console warning. */ export declare function formatCheckup(checkup: GraphCheckup): string; //# sourceMappingURL=skillGraphCheckup.d.ts.map