MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / deleteBootstrapFile

Function deleteBootstrapFile

tools/claw-launcher-ui/bootstrap.mjs:181–189  ·  view source on GitHub ↗
(workspaceDir, filename)

Source from the content-addressed store, hash-verified

179 * Delete a bootstrap file (SOUL.md is protected).
180 */
181export 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

Callers 1

server.mjsFile · 0.90

Calls 2

bootstrapDirFunction · 0.85
assembleChainFunction · 0.85

Tested by

no test coverage detected