import { describe, expect, it } from 'vitest'; import { EMIT_KNOWLEDGE_GRAPH_TOOL, EMIT_HANDBOOK_DELTA_TOOL, EMIT_LEARNING_ARTICLE_TOOL, EMIT_LEARNING_SLIDES_TOOL, EMIT_LEARNING_INFOGRAPHIC_TOOL, EMIT_LEARNING_ALL_TOOL, EMIT_CUSTOM_TOPIC_TOOL, EMIT_QUIZ_QUESTIONS_TOOL, EMIT_GRAPH_ACTIONS_TOOL, ARTICLE_PATCH_TOOLS, } from '../llmTools'; import { toolSchemaRegistry } from '../llmSchemas'; const allTools = [ EMIT_KNOWLEDGE_GRAPH_TOOL, EMIT_HANDBOOK_DELTA_TOOL, EMIT_LEARNING_ARTICLE_TOOL, EMIT_LEARNING_SLIDES_TOOL, EMIT_LEARNING_INFOGRAPHIC_TOOL, EMIT_LEARNING_ALL_TOOL, EMIT_CUSTOM_TOPIC_TOOL, EMIT_QUIZ_QUESTIONS_TOOL, EMIT_GRAPH_ACTIONS_TOOL, ...ARTICLE_PATCH_TOOLS, ]; describe('llmTools', () => { it('every tool has a name, description, and object input_schema', () => { for (const t of allTools) { expect(typeof t.name).toBe('string'); expect(t.name.length).toBeGreaterThan(0); expect(typeof t.description).toBe('string'); expect(t.input_schema).toMatchObject({ type: 'object' }); } }); it('every tool has a matching Zod validator in toolSchemaRegistry', () => { for (const t of allTools) { expect(toolSchemaRegistry[t.name]).toBeTruthy(); } }); });