import { type PermissionIntent, type PermissionMode } from '../types.js';
import type { AgentId } from '../types.js';
export declare function isPermissionMode(value: unknown): value is PermissionMode;
export declare function isPermissionIntent(value: unknown): value is PermissionIntent;
export type PermissionModeGroupId = 'claude' | 'codexLike';
export declare function normalizePermissionModeForGroup(mode: PermissionMode, group: PermissionModeGroupId): PermissionMode;
export declare function resolvePermissionModeGroupForAgent(agentId: AgentId): PermissionModeGroupId;
export declare function normalizePermissionModeForAgent(params: {
    agentId: AgentId;
    mode: PermissionMode;
}): PermissionMode;
/**
 * Parse a user-provided permission mode token into a canonical PermissionMode.
 *
 * This accepts common aliases so users can reuse the same vocabulary across providers.
 * The returned value is always a canonical PermissionMode, suitable for persistence.
 */
export declare function parsePermissionModeAlias(raw: string): PermissionMode | null;
/**
 * Parse a user-provided token into a provider-agnostic PermissionIntent.
 *
 * This accepts:
 * - canonical intents (default, read-only, safe-yolo, yolo, plan)
 * - common aliases (readonly, ro, full-access, etc.)
 * - legacy provider tokens (acceptEdits, bypassPermissions) as aliases
 *
 * The return value is always an intent suitable for persistence.
 */
export declare function parsePermissionIntentAlias(raw: string): PermissionIntent | null;
export type PermissionIntentCandidate = Readonly<{
    rawMode: unknown;
    updatedAt: unknown;
}>;
/**
 * Resolve the latest permission intent from a set of timestamped candidates.
 *
 * Intended to keep CLI + UI precedence rules consistent:
 * - candidates whose mode cannot be parsed to a PermissionIntent are ignored
 * - candidates whose updatedAt is not a finite number are ignored
 * - the candidate with the greatest updatedAt wins
 */
export declare function resolveLatestPermissionIntent(candidates: ReadonlyArray<PermissionIntentCandidate>): {
    intent: PermissionIntent;
    updatedAt: number;
} | null;
//# sourceMappingURL=index.d.ts.map