import type { PolicyDecisionOutcome, PolicySink, PromptSegment, RedactedSegment, RedactionReport, RedactionStatus } from "./policy-types.js"; import type { PromptSegmentInput } from "./prompt-intake.js"; export declare const chatGuardrailOutcomes: readonly ["allow", "block", "defer"]; export type ChatGuardrailOutcome = (typeof chatGuardrailOutcomes)[number]; export type ChatGuardrailAction = "providerMessage" | "toolRequest" | "subagentRequest" | "messagePersist" | "evidenceWrite" | "outputRender"; export type ChatGuardrailActorType = "human" | "runtime" | "system" | "tool"; export type ChatGuardrailResourceType = "artifact" | "command" | "evidence" | "file" | "message" | "prompt" | "subagent" | "thread" | "url"; export interface ChatGuardrailActor { id: string; actorType: ChatGuardrailActorType; tenantId: string; workspaceId: string; } export interface ChatGuardrailResource { resourceType: ChatGuardrailResourceType; summary: string; tenantId: string; workspaceId: string; } export interface ChatGuardrailSink { kind: PolicySink; } export interface ChatGuardrailRequest { requestId: string; tenantId: string; workspaceId: string; taskId?: string; runId?: string; threadId?: string; messageId?: string; actor: ChatGuardrailActor; action: ChatGuardrailAction; sink: ChatGuardrailSink; resource: ChatGuardrailResource; segments: PromptSegmentInput[]; redactionReportOverride?: RedactionReport; } export interface ChatGuardrailScope { tenantId: string; workspaceId: string; resourceTenantId: string; resourceWorkspaceId: string; } export interface ChatHumanReviewMetadata { required: true; reason: string; decisionId: string; matchedRuleIds: string[]; redactionStatus: RedactionStatus; scope: ChatGuardrailScope; } export interface ChatGuardrailDecision { requestId: string; outcome: ChatGuardrailOutcome; policyOutcome: PolicyDecisionOutcome; matchedRuleIds: string[]; redactionStatus: RedactionStatus; redactedSegments: RedactedSegment[]; sanitizedReasons: string[]; evidenceSummary: string; humanReview?: ChatHumanReviewMetadata; scope: ChatGuardrailScope; canProceed: boolean; policySegments: PromptSegment[]; }