import { type DeferredWorktree } from './worktree.js'; import type { AgentSession } from '../../../agent/session/agent-session.js'; export type SkipReason = 'empty-message' | 'slash-command' | 'slug-generator-error' | 'invalid-slug-output'; export interface AutonameOptions { token: string; model?: string; timeoutMs?: number; worktreePath: string; signal?: AbortSignal; slugGenerator?: (message: string, signal: AbortSignal) => Promise; onSkip?: (reason: SkipReason, detail?: string) => void; } export declare function generateSlugFromPrompt(message: string, opts: AutonameOptions): Promise; export declare function sanitizeSlug(raw: string): string | null; export type AutonameOutcome = { status: 'created'; path: string; branch: string; slug: string; } | { status: 'created-fallback'; path: string; branch: string; reason: SkipReason | 'create-failed' | 'unknown'; detail?: string; } | { status: 'failed'; reason: string; }; export interface RunAutonameInput { deferred: DeferredWorktree; message: string; token: string; model?: string; timeoutMs?: number; session?: AgentSession | null; branchPrefix?: string; slugGenerator?: (message: string, signal: AbortSignal) => Promise; signal?: AbortSignal; } export declare function runFirstTurnAutoname(input: RunAutonameInput): Promise; export declare function pinProcessCwd(newPath: string): void;