import type { BudgetLimit, LedgerVerification, PolicyApproval, PolicyDecision, PolicyEngineOptions, PolicyReceipt, PolicyRequest, PolicyRule, PolicyState } from './types.js'; export declare class AgenticPolicyEngine { private readonly now; private readonly signingKey?; private readonly keyId?; private readonly evidenceVerifier?; private readonly approvalIssuerVerifier?; private state; constructor(options?: PolicyEngineOptions); static fromState(state: PolicyState, options?: Omit): AgenticPolicyEngine; exportState(): PolicyState; setMode(mode: PolicyState['mode']): void; setConfiguredMode(mode: PolicyState['mode']): void; upsertRule(rule: PolicyRule): void; setBudget(limit: BudgetLimit): void; issueApproval(approval: Omit & { uses?: number; issuedAt?: number; }): PolicyApproval; revokeApproval(id: string): boolean; evaluate(request: PolicyRequest): PolicyDecision; /** Authenticate each physical record before callers deduplicate it. * Receipts use one configured key and key ID for this ledger. For existing * custom-ID history, restore the original CLAUDE_FLOW_POLICY_KEY_ID when * verifying; never rewrite or re-sign history to change its identity. * Key rotation/multi-key historical verification is not supported here. */ verifyReceipt(receipt: unknown): string | undefined; /** * `establishAnchor` is the ONLY way to create an anchor over receipts that * already exist (#3602). A caller must have decided, outside the state file, * that this is legitimate (genesis, an authentic second anchor, or an * explicit operator action). Without it a ledger with receipts and no anchor * is `anchor-missing`, because deleting the anchor fields from the file the * anchor protects would otherwise let verify bless a truncated chain. */ verifyLedger(options?: { establishAnchor?: boolean; }): LedgerVerification; /** * Removes the oldest receipts from the hot `receipts` array, keeping only * `retain` of the most recent ones in memory (#3164). Pure and in-memory — * this class stays side-effect-free; the runtime layer archives the * returned receipts to disk and persists the resulting state. Requires an * established anchor first: pruning a ledger whose historical length isn't * externally anchored would make a future `verifyLedger` unable to tell * truncation-by-attacker apart from legitimate pruning. */ pruneReceipts(retain: number): PolicyReceipt[]; private applyBudget; private applyApproval; private consumeBudget; private appendReceipt; private validateRequest; } export declare function createLegacyCompatibleState(source?: string): PolicyState; //# sourceMappingURL=engine.d.ts.map