/** * Action Validator — Jensen-owned execution authority boundary. * * No model-proposed executable action may reach a tool without passing this * validator. It checks, in order: * * 1. tool exists in the registry * 2. arguments parse and satisfy the tool schema * 3. required arguments are present and correctly typed (schema) * 4. the action is not a mission-forbidden action * 5. the action respects the workspace/path boundary * 6. the action respects permission/effect policy * * Any failure returns a structured ActionValidationFailure and the tool is NOT * executed. The validator is provider-independent: the live integration injects * the real tool registry, boundary, and policy adapters. */ import type { ActionValidationResult, ToolCallAction } from "./types.js"; export interface ToolSchemaValidator { exists(name: string): boolean; validateArgs(name: string, args: Record): { ok: true; normalized: Record; } | { ok: false; message: string; }; } export interface ActionPolicyAdapter { /** Return a reason string when the action is forbidden, else undefined. */ forbiddenReason(action: ToolCallAction): string | undefined; /** Return a reason string when the action violates the boundary, else undefined. */ boundaryViolationReason(action: ToolCallAction): string | undefined; /** Return a reason string when the action violates permission policy, else undefined. */ permissionViolationReason(action: ToolCallAction): string | undefined; } export interface ActionValidatorContext { schema: ToolSchemaValidator; policy?: ActionPolicyAdapter; } /** * Validate a model-proposed tool call. Returns a normalized/validated argument * object on success; a structured failure otherwise. Never throws and never * executes anything. */ export declare function validateToolCallAction(action: ToolCallAction, ctx: ActionValidatorContext): ActionValidationResult; //# sourceMappingURL=action-validator.d.ts.map