First AGENTS.md found inside a linked repo, or undefined.
(repo: string)
| 134 | |
| 135 | /** First AGENTS.md found inside a linked repo, or undefined. */ |
| 136 | function readLinkedAgents(repo: string): string | undefined { |
| 137 | for (const rel of AGENTS_LOCATIONS) { |
| 138 | try { |
| 139 | const text = fs.readFileSync(path.join(repo, rel), "utf8") |
| 140 | if (text.trim()) return text |
| 141 | } catch { |
| 142 | // try the next location |
| 143 | } |
| 144 | } |
| 145 | return undefined |
| 146 | } |
| 147 | |
| 148 | function truncate(text: string, max: number): string { |
| 149 | return text.length <= max ? text : text.slice(0, max) + "\n… (truncated)" |
no outgoing calls
no test coverage detected