/** * ContentPolicyGate — the shared "what may be SAID" gate for the ecosystem. * * Runs the four-tier moderation cascade recommended by the 2026-06-13 survey: * Tier 0 deterministic blocklist (hard-stops, sub-ms) * Tier 1 cheap classifier (optional, injected) + data rules * Tier 2 LLM-with-policy for borderline content (optional, injected) * Tier 3 human escalation (the `escalate` action — caller wires HITLManager) * * It is PROVIDER-AGNOSTIC by design: it does not know or care whether the text * came from the Anthropic, OpenAI, or sovereign/Ollama lane. That is what lets * the sovereign lane be "allowed but wrapped" — its output is screened by the * same gate as everyone else's. Tier-1/Tier-2 model calls are injected hooks so * @holoscript/core stays dependency-free; the studio/mcp-server surfaces supply * the concrete moderation callables. * * Every decision is designed to flow into the existing audit ledger * ({@link AuditLogger}) as a DSA-style Statement of Reasons via * {@link toAuditEventInput} — so ComplianceReporter finally has real input. */ import type { AuditEventInput } from '../audit'; import type { ContentPolicyConfig, ContentPolicyDecision, ContentPolicyInput } from './types'; /** * Run only the deterministic tiers (Tier-0 blocklist + data rules). Synchronous, * no model calls — safe for hot paths and for callers that have no providers * wired. The sovereign/Ollama lane can use this as a first-pass even before a * Tier-2 LLM is available. */ export declare function evaluateContentPolicySync(input: ContentPolicyInput, config: ContentPolicyConfig): ContentPolicyDecision; /** * Full async cascade: Tier-0 blocklist, Tier-1 classifier + data rules, Tier-2 * LLM-with-policy for borderline content, Tier-3 human escalation. Hard-stop * categories short-circuit to a block at whatever tier first detects them. */ export declare function evaluateContentPolicy(input: ContentPolicyInput, config: ContentPolicyConfig): Promise; /** Context the audit ledger needs that the decision itself does not carry. */ export interface AuditContext { tenantId: string; actorId: string; actorType?: 'user' | 'agent' | 'system'; surface?: string; resourceId?: string; clientIp?: string; } /** * Map a gate decision to an {@link AuditEventInput} for the existing AuditLogger. * Produces a DSA-style machine-readable Statement-of-Reasons record. Pipe the * result through `auditLogger.log(...)` at the call site. */ export declare function toAuditEventInput(decision: ContentPolicyDecision, ctx: AuditContext): AuditEventInput; //# sourceMappingURL=ContentPolicyGate.d.ts.map