14 lines
555 B
JavaScript
14 lines
555 B
JavaScript
import { describe, it, expect } from 'vitest';
|
|
import { companionRegistry } from '../../../../lib/ai/agent/tools/index.js';
|
|
|
|
describe('companion registry', () => {
|
|
it('registers exactly the four v1 tools', () => {
|
|
expect(companionRegistry.listTools().map(t => t.name).sort())
|
|
.toEqual(['context', 'propose_change', 'read', 'search']);
|
|
});
|
|
it('exposes them in Anthropic shape', () => {
|
|
const tools = companionRegistry.toAnthropicTools();
|
|
expect(tools.every(t => t.name && t.input_schema && !('handler' in t))).toBe(true);
|
|
});
|
|
});
|