(sources: Readonly<Record<string, string>>, path: string)
| 96 | } |
| 97 | |
| 98 | function readRequiredSource(sources: Readonly<Record<string, string>>, path: string): string { |
| 99 | const normalized = normalizeSourcePath(path); |
| 100 | const content = sources[normalized]; |
| 101 | if (content === undefined) { |
| 102 | throw new Error(`Embedded agent profile source missing: ${normalized}`); |
| 103 | } |
| 104 | return content; |
| 105 | } |
| 106 | |
| 107 | function normalizeSourcePath(path: string): string { |
| 108 | return normalize(path.replaceAll('\\', '/')).replace(/^\.\//, ''); |
no test coverage detected