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

Function cleanupScopeClaims

hooks_src/worktree-remove.js:126–139  ·  view source on GitHub ↗
(worktreeName)

Source from the content-addressed store, hash-verified

124}
125
126function cleanupScopeClaims(worktreeName) {
127 if (!worktreeName) return;
128 try {
129 const claimsDir = path.join(PROJECT_ROOT, '.planning', 'coordination', 'claims');
130 if (!fs.existsSync(claimsDir)) return;
131 const files = fs.readdirSync(claimsDir);
132 for (const file of files) {
133 // Claims named after the worktree or agent
134 if (file.includes(worktreeName)) {
135 fs.unlinkSync(path.join(claimsDir, file));
136 }
137 }
138 } catch { /* non-critical */ }
139}
140
141function updateFleetSession(worktreeName, branch) {
142 if (!worktreeName && !branch) return;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected