()
| 13 | import type { Provider, TurnInput, AgentEvent, ChatMessage } from "./types"; |
| 14 | |
| 15 | function projectRoot(): string { |
| 16 | return process.env.KB_ROOT || path.resolve(process.cwd(), "..", ".."); |
| 17 | } |
| 18 | |
| 19 | function flattenMessages(system: string, messages: ChatMessage[]): string { |
| 20 | const parts: string[] = []; |