(workspaceDir, filename)
| 179 | * Delete a bootstrap file (SOUL.md is protected). |
| 180 | */ |
| 181 | export async function deleteBootstrapFile(workspaceDir, filename) { |
| 182 | if (!workspaceDir || !filename) throw new Error('Missing workspaceDir or filename') |
| 183 | const safe = basename(filename) |
| 184 | if (safe === 'SOUL.md') throw new Error('SOUL.md 不可删除') |
| 185 | const { unlink } = await import('node:fs/promises') |
| 186 | await unlink(join(bootstrapDir(workspaceDir), safe)) |
| 187 | cachedBootstrap = await assembleChain(bootstrapDir(workspaceDir)) |
| 188 | return { ok: true } |
| 189 | } |
| 190 | |
| 191 | // ── Internals ──────────────────────────────────────────────────────── |
| 192 |
no test coverage detected