import type { Logger } from './types.js'; import type { PermissionMode } from '../../../lib/models/dist/index.js'; /** The 5 composer-writable permission modes, declared once in lib/models. */ export type RequestedMode = PermissionMode; /** Pure: derive effective mode from log content + spawn-time requested mode. * Returns null when the file has no parseable gate-access line yet (race * between spawn and first read). For non-auto spawns this returns the * requested mode verbatim since no debug capture exists. */ export declare function deriveEffectiveMode(logContent: string, requestedMode: RequestedMode): string | null; export interface PermissionModeTailDeps { logger: Logger; } export interface PermissionModeTail { /** Read the log file and return the derived effective mode. Returns null * when the file does not exist, cannot be read, or has no gate-access * line yet. The caller (http-server fs-watcher subscriber) compares * this against the sidecar's current `effectivePermissionMode` and * only writes when changed. */ deriveFromFile(sessionId: string, logPath: string, requestedMode: RequestedMode): string | null; } export declare function createPermissionModeTail(deps: PermissionModeTailDeps): PermissionModeTail; //# sourceMappingURL=permission-mode-tail.d.ts.map