/** * Whether the guard is on for sessions launched by this backend. * * @param env - Environment to read (defaults to the backend's process.env) * @returns false only when `CREWLY_LIVE_CHECKOUT_GUARD=0` */ export declare function isLiveCheckoutGuardEnabled(env?: NodeJS.ProcessEnv): boolean; /** * Resolve the live roots: the install root and its git toplevel (real paths). * * @param installRoot - Package root Crewly runs from * @returns Distinct absolute real paths, install root first */ export declare function resolveLiveCheckoutRoots(installRoot: string): string[]; /** * Shell command that runs the hook for the given live roots. * * @param installRoot - Install root holding `config/hooks` * @param roots - Live roots from {@link resolveLiveCheckoutRoots} * @returns `node '' '' ...` */ export declare function buildLiveCheckoutHookCommand(installRoot: string, roots: readonly string[]): string; /** Hook command and matchers for one session, or null when the guard is off. */ export interface LiveCheckoutGuard { hookCommand: string; matcher: string; roots: string[]; } /** * Prepare the guard for a session. * * @param installRoot - Install root * @param env - Environment holding the kill switch * @returns The hook description, or null when disabled */ export declare function prepareLiveCheckoutGuard(installRoot: string, env?: NodeJS.ProcessEnv): LiveCheckoutGuard | null; /** * TOML group for Codex's `hooks.PreToolUse` list. * * @param guard - From {@link prepareLiveCheckoutGuard} * @returns `{matcher="...",hooks=[{type="command",command="..."}]}`, or null * when the command cannot be embedded safely (double quote or backslash) */ export declare function codexLiveCheckoutGroup(guard: LiveCheckoutGuard): string | null; //# sourceMappingURL=live-checkout-guard.service.d.ts.map