(cwd: string, content: string)
| 688 | } |
| 689 | |
| 690 | function createReadToolKaos(cwd: string, content: string): Kaos { |
| 691 | return createFakeKaos({ |
| 692 | getcwd: () => cwd, |
| 693 | stat: async () => |
| 694 | ({ |
| 695 | stMode: 0o100644, |
| 696 | stIno: 1, |
| 697 | stDev: 1, |
| 698 | stNlink: 1, |
| 699 | stUid: 0, |
| 700 | stGid: 0, |
| 701 | stSize: content.length, |
| 702 | stAtime: 0, |
| 703 | stMtime: 0, |
| 704 | stCtime: 0, |
| 705 | }) satisfies StatResult, |
| 706 | readBytes: async () => Buffer.from(content), |
| 707 | readLines: async function* () { |
| 708 | yield content; |
| 709 | }, |
| 710 | }); |
| 711 | } |
| 712 | |
| 713 | function registerLookupNoteTool(agent: Agent): void { |
| 714 | agent.tools.registerUserTool({ |
no test coverage detected