/** * Shared types for the concurrency module (git-worktree instance). * * Coordination data lives in `/aidlc/` so every worktree * of a repository sees the same claims and registry (AC-1, AC-2, AC-15). * Durable artifacts stay tracked in git; only live coordination moves here. */ /** A live claim on an instance (AC-1). Stored per instance, never committed. */ export interface Claim { session: string; claimed_at: string; renewed_at?: string; id_source: 'platform' | 'agent'; /** Set when the claiming session works in a linked worktree (AC-18b). */ worktree_path?: string; } /** A registry entry recording instance existence across worktrees (AC-26). */ export interface RegistryEntry { name: string; /** Branch owning the instance; null for no-code instances (AC-11). */ branch: string | null; worktree_path: string | null; created_at: string; } /** Concurrency policy from `.aidlc/config.yaml` (AC-13). */ export interface ConcurrencyConfig { mode: 'offer-worktree' | 'forbid' | 'ask'; worktree_dir: string; } export declare const DEFAULT_CONCURRENCY: ConcurrencyConfig; /** Result of concurrency detection (AC-7). */ export interface Detection { /** A blocking holder exists — i.e. `holders` is non-empty. */ busy: boolean; /** * Live claims that SHARE this session's working directory. These are the ones * worth blocking on: two sessions in one checkout collide on git, not on state. */ holders: Array<{ instance: string; session: string; }>; /** * Live claims held from a DIFFERENT working directory — another worktree, or the * primary checkout while this session is in a worktree * (automation-verdicts/AC-9). * * They cannot collide, so they gate nothing. Reported rather than dropped: * knowing another instance is in flight is useful even when it cannot * interfere, and discarding them silently would be the same silent-verdict * mistake in a new place. */ elsewhere: Array<{ instance: string; session: string; dir: string; }>; } //# sourceMappingURL=types.d.ts.map