/**
 * Aperant Framework v2 — Coordination types
 *
 * Defines types for the lock file system and append-only event log
 * that enable safe multi-agent parallel execution.
 * See: docs/frameworks/aperant-framework-spec.md Section 6.3
 */
/** Lock file contents — written to `.aperant/locks/{subtask-id}.lock` */
export interface LockFile {
    /** PID of the worker process that claimed this lock */
    worker_pid: number;
    /** ISO timestamp when the lock was claimed */
    claimed_at: string;
    /** Time-to-live in seconds before the lock is considered stale (default: 120) */
    ttl_seconds: number;
    /** ISO timestamp of the last heartbeat update */
    heartbeat: string;
}
/** Event types for the coordination event log */
export type EventType = 'task-claimed' | 'task-completed' | 'task-failed' | 'wave-started' | 'wave-completed';
/** A single event in the append-only event log at `.aperant/events/` */
export interface CoordinationEvent {
    /** Sequential event ID (monotonically increasing) */
    id: number;
    /** The type of coordination event */
    type: EventType;
    /** The subtask this event relates to */
    subtask: string;
    /** Worker identifier (hostname + PID) */
    worker: string;
    /** ISO timestamp when the event occurred */
    timestamp: string;
    /** Optional payload (e.g., commits for task-completed, error for task-failed) */
    data: Record<string, unknown>;
}
/** A group of subtasks that can execute in parallel within the same wave */
export interface WaveGroup {
    /** Wave number (1-based, lower waves execute first) */
    wave: number;
    /** Subtask IDs in this wave — all can run concurrently */
    subtasks: string[];
}
/** Tracks an active git worktree created for isolated parallel execution */
export interface WorktreeInfo {
    /** The subtask ID this worktree was created for */
    subtask_id: string;
    /** Absolute path to the worktree directory */
    path: string;
    /** Git branch name used in this worktree */
    branch: string;
    /** ISO timestamp when the worktree was created */
    created_at: string;
}
/** State returned by `apt-tools worktree list` — all active worktrees */
export interface WorktreeState {
    /** Active worktrees under .aperant/worktrees/ */
    worktrees: WorktreeInfo[];
}
//# sourceMappingURL=coordination.d.ts.map