import Database from "better-sqlite3";
import type { PolicyOperationId } from "../policy.js";
import type { SessionPolicyGrant } from "../session-policy.js";
export declare const SESSION_GRANTS_JSON_REL = ".workspace-kit/policy/session-grants.json";
export declare const SESSION_GRANTS_MIGRATED_SUFFIX = ".migrated";
export type SessionGrantRow = {
    sessionId: string;
    operationId: PolicyOperationId;
    rationale: string;
    grantedAt: string;
    expiresAt: string | null;
};
export declare function importSessionGrantsJsonIfNeeded(db: Database.Database, workspacePath: string): number;
export declare function getSessionGrantRow(workspacePath: string, operationId: PolicyOperationId, sessionId: string, effectiveConfig?: Record<string, unknown>): SessionPolicyGrant | undefined;
export declare function upsertSessionGrantRow(workspacePath: string, operationId: PolicyOperationId, sessionId: string, rationale: string, effectiveConfig?: Record<string, unknown>): void;
export declare function listSessionGrantRows(workspacePath: string, effectiveConfig?: Record<string, unknown>, sessionId?: string): SessionGrantRow[];
