|
1 | 1 | // @ts-nocheck |
2 | 2 | import { z } from 'zod'; |
3 | | -import { factoryAgentWithPTRR } from '../agents/factories'; |
| 3 | +import { factoryAgentWithPTRR } from '@bitcode/generic-agents-ptrr'; |
4 | 4 |
|
5 | 5 | const OutputSchema = z.object({ |
6 | 6 | ok: z.boolean() |
@@ -38,34 +38,34 @@ describe('factoryAgentWithPTRR Bitcode prompt hierarchy', () => { |
38 | 38 | prompt: promptRegistry('system'), |
39 | 39 | stepPrompts: { |
40 | 40 | plan: () => promptRegistry('plan') |
41 | | - } |
42 | | - } as any) |
43 | | - ).toThrow(/missing try, refine, retry step Prompt registries/u); |
| 41 | + } as any |
| 42 | + }) |
| 43 | + ).toThrow(/missing try, refine, retry/u); |
44 | 44 | }); |
45 | 45 |
|
46 | | - it('accepts the explicit prompt plus stepPrompts carrier', () => { |
| 46 | + it('accepts primary prompt + stepPrompts carrier', () => { |
47 | 47 | const agent = factoryAgentWithPTRR({ |
48 | | - name: 'complete-explicit-prompt-carrier', |
| 48 | + name: 'primary-carrier', |
49 | 49 | outputSchema: OutputSchema, |
50 | 50 | prompt: promptRegistry('system'), |
51 | 51 | stepPrompts: stepPromptRegistry(), |
52 | | - enforceLLM: false |
| 52 | + enforceLLM: false, |
53 | 53 | }); |
54 | | - |
| 54 | + expect(agent.name).toBe('primary-carrier'); |
55 | 55 | expect(agent.steps).toHaveLength(4); |
56 | 56 | }); |
57 | 57 |
|
58 | | - it('accepts the compact prompts carrier with system plus complete PTRR steps', () => { |
| 58 | + it('accepts compact prompts.system + plan/try/refine/retry carrier', () => { |
59 | 59 | const agent = factoryAgentWithPTRR({ |
60 | | - name: 'complete-compact-prompt-carrier', |
| 60 | + name: 'compact-carrier', |
61 | 61 | outputSchema: OutputSchema, |
62 | 62 | prompts: { |
63 | 63 | system: promptRegistry('system'), |
64 | 64 | ...stepPromptRegistry() |
65 | 65 | }, |
66 | | - enforceLLM: false |
| 66 | + enforceLLM: false, |
67 | 67 | }); |
68 | | - |
| 68 | + expect(agent.name).toBe('compact-carrier'); |
69 | 69 | expect(agent.steps).toHaveLength(4); |
70 | 70 | }); |
71 | 71 | }); |
0 commit comments