mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-19 21:52:21 +03:00
v3.8.40 cycle integration → main. All test gates green (Unit/Integration/Coverage/Node-compat/Quality-Ratchet). The only red check, 'PR Test Policy', is the test-masking heuristic firing on the cumulative ~57-commit release diff (legitimate assert consolidations already reviewed per-PR — Gemini CLI removal #5246, retired GPT models #5280, provider catalog refreshes); overridden with --admin per the documented release-PR convention. CodeQL/SonarQube advisory scans non-blocking; #5278's code already passed CodeQL on main. Homologated on VPS 192.168.0.15 (v3.8.40 healthy).
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
/**
|
|
* Leaf module for the shared MCP tool-definition types.
|
|
*
|
|
* Extracted out of `tools.ts` to break a dependency cycle: `tools.ts` imports the
|
|
* `toolSearchTool` value from `toolSearch.ts`, and `toolSearch.ts` needs the
|
|
* `McpToolDefinition` type. Keeping the type here (a leaf that only depends on zod)
|
|
* lets both files import it without forming a cycle.
|
|
*/
|
|
|
|
import type { z } from "zod";
|
|
|
|
export type AuditLevel = "none" | "basic" | "full";
|
|
|
|
export interface McpToolDefinition<TInput extends z.ZodTypeAny, TOutput extends z.ZodTypeAny> {
|
|
/** Tool name (MCP identifier) */
|
|
name: string;
|
|
/** Human-readable description for AI agents */
|
|
description: string;
|
|
/** Zod schema for input validation */
|
|
inputSchema: TInput;
|
|
/** Zod schema for output validation */
|
|
outputSchema: TOutput;
|
|
/** Required API key scopes */
|
|
scopes: readonly string[];
|
|
/** Audit logging level */
|
|
auditLevel: AuditLevel;
|
|
/** Phase: 1 = essential, 2 = advanced */
|
|
phase: 1 | 2;
|
|
/** Source endpoints on OmniRoute that this tool wraps */
|
|
sourceEndpoints: readonly string[];
|
|
}
|