trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
78 lines • 2.13 kB
TypeScript
/**
* Agent lane snapshot for the lanes dashboard (demo / sanity check).
*/
import type { TrellisVcsEngine } from '../engine.js';
import type { LaneMeta } from '../vcs/lane.js';
export interface LaneRow {
id: string;
status: LaneMeta['status'];
issueId?: string;
issueTitle?: string;
claimedSessionId?: string;
sessionId?: string;
agentId: string;
opCount: number;
fileCount: number;
worktreePath?: string;
baseBranch: string;
targetBranch: string;
isActive: boolean;
createdAt: string;
updatedAt: string;
}
export interface IssueRow {
id: string;
title?: string;
status?: string;
priority?: string;
labels: string[];
createdAt?: string;
claimedLaneId?: string;
claimedSessionId?: string;
laneCount: number;
laneIds: string[];
}
export interface MilestoneRow {
id: string;
message?: string;
createdAt?: string;
createdBy?: string;
fileCount: number;
affectedFiles: string[];
}
export interface LanesSnapshotExtras {
/** Bound HTTP port for the dashboard (status bar). */
port?: number;
/** Connected SSE viewers (admin/dashboard clients). */
viewers?: number;
}
export interface LanesSnapshot {
at: string;
rootPath: string;
integrationBranch: string;
activeLaneId?: string;
/** Dashboard listen port when served via lanes-dashboard. */
port?: number;
/** Connected SSE clients watching this dashboard. */
viewers: number;
/** Distinct agentIds on active lanes. */
activeAgents: number;
promoteLock: {
locked: boolean;
stale?: boolean;
laneId?: string;
pid?: number;
acquiredAt?: string;
};
lanes: LaneRow[];
issues: IssueRow[];
milestones: MilestoneRow[];
inProgressIssues: Array<{
id: string;
title?: string;
claimedLaneId?: string;
claimedSessionId?: string;
}>;
}
export declare function buildLanesSnapshot(engine: TrellisVcsEngine, rootPath: string, extras?: LanesSnapshotExtras): LanesSnapshot;
//# sourceMappingURL=lanes-snapshot.d.ts.map