trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
33 lines • 1.41 kB
TypeScript
/**
* Admin causal history graph primitive — SVG + row list.
* Spec: docs/specs/trellis-admin-causal-graph.md
*/
import type { CausalGraphSnapshot, CausalNode } from './causal-graph-snapshot.js';
export declare const ROW_HEIGHT = 72;
export declare const LANE_GAP = 48;
export declare const LEFT_PAD = 28;
export declare const TIME_COL_W = 52;
export declare const DOT_R = 10;
export declare const LINE_W = 5;
export declare function laneX(lane: number): number;
export declare function laneLabelOffset(lane: number): number;
export declare function rowY(row: number): number;
export declare function laneColorCss(lane: number, el?: Element): string;
export interface GraphEdge {
d: string;
color: string;
key: string;
}
export declare function buildEdges(commits: CausalNode[], colorForLane: (lane: number) => string): GraphEdge[];
export declare function formatGraphTime(iso?: string, trunk?: boolean): string;
export type AdminCausalGraphHandle = {
refresh(data?: CausalGraphSnapshot): void;
destroy(): void;
};
export { formatViewMeta } from './causal-graph-snapshot.js';
export declare function mountAdminCausalGraph(root: HTMLElement, opts?: {
fetchUrl?: string;
onSelect?: (node: CausalNode | null) => void;
onStats?: (stats: CausalGraphSnapshot['stats'], integrationBranch: string) => void;
}): AdminCausalGraphHandle;
//# sourceMappingURL=admin-causal-graph.d.ts.map