/**
 * Tool Invocation Contract Registry
 *
 * MCP 工具 / 适配器边界受控自由契约。
 * 每个工具声明类别 (strict_controlled / read_only_bypass / normal_controlled)、
 * 副作用、授权要求、允许/禁止后续工具。
 * 适配器必须遵守 Adapter Workflow Policy。
 * 治理检查防止 8 类退化。
 */
import type { IntentRoute, ExecutionShape } from "../../types/pipeline.js";
import type { ToolCategory, SideEffect, ViolationType, ViolationSeverity, ToolTrace, ToolAuthorization, ToolBypass, ToolInvocationViolation, ToolInvocationContract, AdapterWorkflowPolicyRule, ToolInvocationGovernanceFinding } from "../../types/pipeline.js";
export type { ToolCategory, SideEffect, ViolationType, ViolationSeverity, ToolTrace, ToolAuthorization, ToolBypass, ToolInvocationViolation, ToolInvocationContract, AdapterWorkflowPolicyRule, ToolInvocationGovernanceFinding, } from "../../types/pipeline.js";
/** 适配器工作流策略规则集 */
export declare const ADAPTER_WORKFLOW_POLICY: AdapterWorkflowPolicyRule[];
/** 列出所有已注册的工具调用契约 */
export declare function listToolInvocationContracts(): ToolInvocationContract[];
/** 按工具名称查找对应的调用契约 */
export declare function findToolInvocationContractByName(toolName: string): ToolInvocationContract | undefined;
/** 查找所有严格受控工具的契约 */
export declare function findStrictControlledTools(): ToolInvocationContract[];
/** 查找所有只读旁路工具的契约 */
export declare function findReadOnlyBypassTools(): ToolInvocationContract[];
/** 按类别查找工具调用契约 */
export declare function findByCategory(category: ToolCategory): ToolInvocationContract[];
/** 检查副作用列表是否包含写入类副作用 */
export declare function hasWriteSideEffect(effects: SideEffect[]): boolean;
/** 创建工具调用追踪记录 */
export declare function createToolTrace(params: {
    tool_name: string;
    invocation_id: string;
    task_id?: string;
    workflow_id?: string;
    route?: IntentRoute;
    execution_shape?: ExecutionShape;
    contract_ids?: string[];
    capability_ids?: string[];
    guard_report_id?: string;
    degraded?: boolean;
    warnings?: string[];
    actual_side_effects: SideEffect[];
    next_allowed_tools?: string[];
    forbidden_tools?: string[];
    authorization?: ToolAuthorization;
    bypass?: ToolBypass;
}): ToolTrace;
/** 创建工具调用违规记录 */
export declare function createViolation(params: {
    invocation_id: string;
    tool_name: string;
    violation_type: ViolationType;
    reason: string;
    recovery: string;
}): ToolInvocationViolation;
/** 根据违规类型和工具类别分类违规严重级别 */
export declare function classifyViolationSeverity(violationType: ViolationType, toolCategory?: ToolCategory): ViolationSeverity;
export interface ValidateToolInvocationParams {
    tool_name: string;
    current_next_allowed: string[];
    current_forbidden: string[];
    authorization?: {
        granted: boolean;
        reason?: string;
    };
    bypass?: {
        allowed: boolean;
        reason: string;
    };
    actual_side_effects: SideEffect[];
    workflow_id?: string;
    /** @internal Override contract lookup for dynamic category tools */
    _contractOverride?: ToolInvocationContract;
}
/** 验证工具调用是否符合契约约束，返回违规列表 */
export declare function validateToolInvocation(params: ValidateToolInvocationParams): ToolInvocationViolation[];
/** 治理验证所有工具调用契约的结构完整性 */
export declare function validateToolInvocationContracts(contracts?: ToolInvocationContract[]): ToolInvocationGovernanceFinding[];
//# sourceMappingURL=tool_invocation_contract_registry.d.ts.map