/** * Agent Lane metadata and paths (ADR 0001, terminology ADR 0005). * Journal I/O: {@link LaneOpLog} in ./op-log.js */ import type { VcsOp } from './types.js'; export type LaneStatus = 'active' | 'promoting' | 'promoted' | 'dropped'; /** ADR 0006 sibling; ADR 0007 child with virtualBaseOpHash. */ export type LaneForkKind = 'sibling' | 'child'; export interface LaneMeta { id: string; status: LaneStatus; baseBranch: string; baseOpHash: string; targetBranch: string; headOpHash?: string; agentId: string; issueId?: string; sessionId?: string; /** Human domain slug from `lane split --name` (TRL-117). */ name?: string; parentLaneId?: string; forkKind?: LaneForkKind; forkedAt?: string; /** Parent lane head at child fork (ADR 0007). */ virtualBaseOpHash?: string; worktreePath?: string; leaseExpiresAt?: string; createdAt: string; updatedAt: string; } /** Domain slug: lowercase letters, digits, hyphen, underscore. */ export declare function normalizeLaneName(raw: string): string; export declare function lanesRoot(trellisDir: string): string; export declare function laneDir(trellisDir: string, laneId: string): string; export declare function laneMetaPath(trellisDir: string, laneId: string): string; export declare function newLaneId(): string; export declare function loadLaneMeta(trellisDir: string, laneId: string): LaneMeta | undefined; export declare function saveLaneMeta(trellisDir: string, meta: LaneMeta): void; export declare function listLaneIds(trellisDir: string): string[]; export interface CreateLaneParams { baseBranch: string; baseOpHash: string; agentId: string; targetBranch?: string; issueId?: string; sessionId?: string; name?: string; parentLaneId?: string; forkKind?: LaneForkKind; forkedAt?: string; virtualBaseOpHash?: string; worktreePath?: string; leaseExpiresAt?: string; } /** Lane journal tail, else meta head, else integration fork base. */ export declare function resolveLaneHeadFromJournal(meta: LaneMeta, laneOps: VcsOp[]): string; export declare function createLaneMeta(trellisDir: string, params: CreateLaneParams): LaneMeta; export declare function updateLaneHead(trellisDir: string, laneId: string, headOpHash: string): void; export declare function listLaneMetas(trellisDir: string): LaneMeta[]; //# sourceMappingURL=lane.d.ts.map