import type { AgentPlan, PolicyRule, PolicyAction, PolicyDecision, BudgetState } from "@loomic/types"; import { RuntimeEventEmitter } from "./event-emitter.js"; /** Decision for a single action within a plan. */ export type ActionVerdict = { action: PolicyAction; decision: PolicyDecision; reason: string; /** If decision is allow-with-modification, the patched payload */ modifiedPayload: Record | undefined; /** Which policy rule produced this verdict (if any) */ ruleName: string | undefined; }; /** Result of evaluating an entire plan. */ export type GovernorVerdict = { /** Per-action verdicts, in the same order as they were evaluated */ actions: ActionVerdict[]; /** Convenience counts */ summary: { allowed: number; denied: number; modified: number; deferred: number; approvalRequired: number; }; /** Budget warnings emitted during evaluation */ budgetWarnings: string[]; }; /** * Governor — evaluates an AgentPlan against registered PolicyRules. * * The governor does not mutate the plan. It returns a GovernorVerdict * describing what is allowed, denied, modified, or deferred. The * executor is responsible for acting only on allowed/modified actions. */ export declare class Governor { private readonly rules; private emitter; constructor(rules: PolicyRule[], emitter?: RuntimeEventEmitter); /** * Attach or replace the event emitter used for governor events. */ setEmitter(emitter: RuntimeEventEmitter): void; /** * Evaluate every action in a plan against registered policy rules. */ evaluate(plan: AgentPlan, budgets: BudgetState, cycleId?: string): GovernorVerdict; } //# sourceMappingURL=governor.d.ts.map