mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 00:09:41 +02:00
Single bridge between the AI_TOOL_CATALOG shape and the wire format every provider (Gemini, OpenAI-compat, Ollama ≥ 0.3) speaks for native tool calling. Keeps the catalog as the source of truth — the runner never reads catalog entries directly; it asks this converter for function-spec shapes to hand the LLM. - No _rationale or wrapper-tool injection: the runner doesn't need it and the added schema noise would hurt planner quality. - Throws on unknown parameter types so catalog typos (e.g. "array" instead of "string") fail loudly instead of coercing silently. - Preserves enum constraints; drops the enum key entirely when absent so Gemini doesn't reject empty-enum function-declarations. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9 lines
305 B
TypeScript
9 lines
305 B
TypeScript
export type { ToolSchema } from './schemas';
|
|
export { AI_TOOL_CATALOG, AI_TOOL_CATALOG_BY_NAME } from './schemas';
|
|
export type {
|
|
FunctionSpec,
|
|
JsonSchemaObject,
|
|
JsonSchemaProperty,
|
|
ToolSpec,
|
|
} from './function-schema';
|
|
export { toolToFunctionSchema, toolsToFunctionSchemas } from './function-schema';
|