(kaos: Kaos, path: string)
| 177 | } |
| 178 | |
| 179 | async function isFile(kaos: Kaos, path: string): Promise<boolean> { |
| 180 | try { |
| 181 | const stat = await kaos.stat(path); |
| 182 | return (stat.stMode & S_IFMT) === S_IFREG; |
| 183 | } catch { |
| 184 | return false; |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | function renderAgentFiles(files: readonly AgentFile[]): string { |
| 189 | if (files.length === 0) return ''; |