import { type WorktreeReference } from "../../src/index.js"; export interface SubagentWorktreeContext { readonly cwd: string; readonly sessionId: string; readonly runId: string; readonly name: string; readonly owner: string; } export interface SubagentWorktreeRunStore { recordSystemPrompt(entry: { sessionId: string; attempt: number; turn: number; prompt: string; }): Promise; validateWorktree(owner: string, cwd?: string): Promise; worktree(owner: string): Promise; snapshotWorktree(owner: string): Promise; } export interface SubagentWorktreeHandle { readonly path: string; readonly branch: string; readonly cwd: string; readonly runStore: SubagentWorktreeRunStore; cleanup(): Promise; } export interface SubagentWorktreeAdapter { create(context: Readonly): Promise; cleanup?(context: Readonly): Promise; } export declare function createRunStoreWorktreeAdapter(home: string): SubagentWorktreeAdapter; export declare function defaultWorktreeHome(storageDirectory: string): string;