MCPcopy Create free account
hub / github.com/SethGammon/Citadel / makeSandbox

Function makeSandbox

scripts/test-cost-tracker.js:37–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37function makeSandbox() {
38 const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'citadel-cost-'));
39 const slug = projectSlug(path.join(dir, 'project'));
40 fs.mkdirSync(path.join(dir, 'home', '.claude', 'projects', slug), { recursive: true });
41 fs.mkdirSync(path.join(dir, 'project', '.claude'), { recursive: true });
42 fs.mkdirSync(path.join(dir, 'project', '.planning', 'telemetry'), { recursive: true });
43 fs.writeFileSync(
44 path.join(dir, 'project', '.claude', 'harness.json'),
45 JSON.stringify({ version: 1 })
46 );
47 return dir;
48}
49
50function cleanup(dir) {
51 try { fs.rmSync(dir, { recursive: true, force: true }); } catch {}

Callers 1

Calls 1

projectSlugFunction · 0.85

Tested by

no test coverage detected