import type { Locale } from '../i18n/types.js'; export interface AutoWorktreeResult { /** Dir to spawn the session into: the new worktree on success, else `baseDir` * (opt-out / non-git / failure). "A worktree was created" ⇔ `dir !== baseDir`. */ dir: string; } export interface MaybeCreateWorktreeCtx { isBotDefaultDir: boolean; title?: string; prompt?: string; locale: Locale; /** Best-effort chat notice sink. Omit for silent (e.g. HTTP-virtual sessions). */ notify?: (message: string) => Promise | void; } /** * Whether this bot opts into auto-worktree on new sessions: it must be in * 「仅默认目录」mode (`defaultWorkingDir` set) with the toggle on. Because the * toggle is only settable in that mode, this doubles as the "in default mode" * check. Callers still gate on the resolved dir actually being the default one. */ export declare function botAutoWorktreeEnabled(larkAppId: string): boolean; /** * Given a resolved spawn dir, create a fresh linked worktree off it when the bot * opts in AND `isBotDefaultDir` is true. Otherwise returns `baseDir` unchanged. * Never throws — a non-git dir or git failure degrades to `baseDir` with a notice. */ export declare function maybeCreateDefaultWorktree(larkAppId: string, baseDir: string, ctx: MaybeCreateWorktreeCtx): Promise; //# sourceMappingURL=default-worktree.d.ts.map