managarten/packages/shared-ai/src/tools
Till JS 4523ab24e3 feat(shared-ai): toolToFunctionSchema — catalog → OpenAI function-spec
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>
2026-04-20 15:24:36 +02:00
..
function-schema.test.ts feat(shared-ai): toolToFunctionSchema — catalog → OpenAI function-spec 2026-04-20 15:24:36 +02:00
function-schema.ts feat(shared-ai): toolToFunctionSchema — catalog → OpenAI function-spec 2026-04-20 15:24:36 +02:00
index.ts feat(shared-ai): toolToFunctionSchema — catalog → OpenAI function-spec 2026-04-20 15:24:36 +02:00
schemas.test.ts feat(ai): guardrail layer — pre/post-plan + pre-execute checks 2026-04-16 15:11:34 +02:00
schemas.ts feat(ai): expand Quiz tools — edit/delete questions, edit meta, stats 2026-04-19 19:50:24 +02:00