/** * routes/worktree-setup.ts * * Handler for `worktrees.setup.run`, the rerun affordance for worktree * cold-start setup. Re-runs the configured setup (commands + untracked-file * carry-over) on a live worktree by path, records the honest outcome onto the * worktree registry record (so a failed setup stays a visible worktree state), * and returns the result. Registered from services.ts, the composition root * that holds the worktree registry, the daemon config, and the source root. */ import type { GatewayMethodCatalog } from '../method-catalog.js'; import type { GatewayMethodHandler } from '../method-catalog-shared.js'; import type { WorktreeRegistry } from '../../runtime/worktree/registry.js'; import { type WorktreeSetupConfig } from '../../runtime/worktree/setup.js'; /** The deps the worktree lifecycle verbs need, the registry to act on, the source root to carry from, and the current setup config. */ export interface WorktreeSetupGatewayDeps { readonly registry: Pick; readonly sourceRoot: string; /** Resolves the current per-project setup config (read fresh each run so a config change takes effect without a restart). */ readonly resolveConfig: () => WorktreeSetupConfig; } export declare function createWorktreeSetupRunHandler(deps: WorktreeSetupGatewayDeps): GatewayMethodHandler; /** * `worktrees.discard`, discard actually discards: the registry's * eviction-preserving removal (dirty state committed onto the KEPT branch, * directory removed, record dropped) with the honest receipt as the output. */ export declare function createWorktreeDiscardHandler(deps: WorktreeSetupGatewayDeps): GatewayMethodHandler; /** Attach the worktree lifecycle handlers to their already-registered descriptors. Missing descriptors are silent no-ops. */ export declare function registerWorktreeSetupGatewayMethods(catalog: GatewayMethodCatalog, deps: WorktreeSetupGatewayDeps): void; //# sourceMappingURL=worktree-setup.d.ts.map