/** * Studio thread binding — which increment a SpecWeave Studio thread works on. * * Studio starts every provider turn with `SPECWEAVE_STUDIO_THREAD_ID`. When a * process inside such a turn appends to an increment's ledger (`task claim`, * `task done`, `pickup`, `note`, …), this records the increment for the thread * in `~/.specweave/studio/threads/.json`. Studio reads it to show the * thread's plan card from that increment's spec and ledger. * * It lives outside the repository and holds no task state: the ledger stays * the only source of truth. Best-effort — a failed write never fails the * command that appended to the ledger. * * @module core/tasks/studio-thread-binding */ export interface StudioThreadBinding { version: 1; threadId: string; /** Increment folder name, e.g. `0930-studio-plan-progress`. */ incrementId: string; /** Absolute project root whose `.specweave/increments` holds it (a worktree when the agent works in one). */ root: string; /** The task the last event touched; null for increment-level events (`*`). */ taskId: string | null; /** The ledger event that bound the thread, e.g. `claim`. */ event: string; at: string; } /** Where the binding of `threadId` lives. */ export declare function studioThreadBindingFile(threadId: string, home?: string): string; /** * Record that the current Studio thread works on the increment owning * `ledgerFile`. No-op outside Studio or for a ledger outside an increments folder. */ export declare function recordStudioThreadBinding(ledgerFile: string, event: { t: string; e: string; at: string; }, opts?: { env?: NodeJS.ProcessEnv; home?: string; }): void; //# sourceMappingURL=studio-thread-binding.d.ts.map