| 1 | import { describe, expect, it } from 'vitest';
|
| 2 | import { parseAgentProfile } from '../connectors/botpress/src/profile.js';
|
| 3 |
|
| 4 | describe('Botpress self-profile', () => {
|
| 5 | it('parses the marked structured response', () => {
|
| 6 | expect(
|
| 7 | parseAgentProfile(
|
| 8 | 'OPENCLASP_PROFILE {"description":"Compares supplier quotes","framework":"Botpress","agentVersion":"1.2.0","modelProvider":"Anthropic","modelName":"Claude","capabilities":["compare quotes"],"limitations":["human approval before payment"]}',
|
| 9 | ),
|
| 10 | ).toMatchObject({
|
| 11 | framework: 'Botpress',
|
| 12 | capabilities: ['compare quotes'],
|
| 13 | modelProvider: 'Anthropic',
|
| 14 | });
|
| 15 | });
|
| 16 |
|
| 17 | it('rejects an incomplete profile', () => {
|
| 18 | expect(() => parseAgentProfile('OPENCLASP_PROFILE {"framework":"Botpress"}')).toThrow();
|
| 19 | });
|
| 20 | });
|