mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +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).
19 lines
629 B
TypeScript
19 lines
629 B
TypeScript
import { getAllToolDefinitions } from "./catalog.ts";
|
|
import { searchTools } from "./search.ts";
|
|
import { zodToTsSignature } from "./signature.ts";
|
|
|
|
export function handleToolSearch(args: { query: string; limit?: number }) {
|
|
const entries = getAllToolDefinitions().filter((t) => t.name !== "omniroute_tool_search");
|
|
const hits = searchTools(entries, args.query, args.limit ?? 8);
|
|
return {
|
|
query: args.query,
|
|
count: hits.length,
|
|
tools: hits.map((h) => ({
|
|
name: h.name,
|
|
description: h.description,
|
|
scopes: [...h.scopes],
|
|
signature: zodToTsSignature(h.name, h.inputSchema),
|
|
})),
|
|
};
|
|
}
|