import { z } from "zod"; import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; import type { SpecShieldApiClient } from "../client.js"; import type { Logger } from "../logger.js"; import type { RiskLevel } from "../backendTypes.js"; export interface ToolContext { client: SpecShieldApiClient; logger: Logger; } export interface ToolDef { name: string; title: string; description: string; inputSchema: z.ZodRawShape; handler: (args: Record, ctx: ToolContext) => Promise; } /** base/target spec inputs shared by every tool (inline content or a file path). */ export declare const specSourceShape: { baseSpecContent: z.ZodOptional; baseSpecPath: z.ZodOptional; targetSpecContent: z.ZodOptional; targetSpecPath: z.ZodOptional; }; export declare function resolveBothSpecs(args: Record): Promise<{ baseSpec: string; targetSpec: string; }>; /** A single-spec input (governance reviews one spec, not a base/target pair). */ export declare const singleSpecShape: { specContent: z.ZodOptional; specPath: z.ZodOptional; }; export declare function resolveSingleSpec(args: Record): Promise; export declare function textResult(header: string, data: unknown): CallToolResult; export declare function markdownResult(markdown: string): CallToolResult; export declare function errorResult(err: unknown): CallToolResult; /** Wrap a handler so any error becomes a safe, machine-readable isError result. */ export declare function guarded(fn: (args: Record, ctx: ToolContext) => Promise): ToolDef["handler"]; export declare function consumerImpact(level: RiskLevel): string;