MCPcopy
hub / github.com/codeaashu/claude-code / readTeamFile

Function readTeamFile

src/utils/swarm/teamHelpers.ts:131–142  ·  view source on GitHub ↗
(teamName: string)

Source from the content-addressed store, hash-verified

129 */
130// sync IO: called from sync context
131export function readTeamFile(teamName: string): TeamFile | null {
132 try {
133 const content = readFileSync(getTeamFilePath(teamName), 'utf-8')
134 return jsonParse(content) as TeamFile
135 } catch (e) {
136 if (getErrnoCode(e) === 'ENOENT') return null
137 logForDebugging(
138 `[TeammateTool] Failed to read team file for ${teamName}: ${errorMessage(e)}`,
139 )
140 return null
141 }
142}
143
144/**
145 * Reads a team file by name (asyncfor tool handlers and other async contexts)

Callers 15

callFunction · 0.85
generateUniqueTeamNameFunction · 0.85
getTeammateStatusesFunction · 0.85
initializeTeammateHooksFunction · 0.85
addHiddenPaneIdFunction · 0.85
removeHiddenPaneIdFunction · 0.85
removeMemberFromTeamFunction · 0.85
removeMemberByAgentIdFunction · 0.85
setMemberModeFunction · 0.85
setMultipleMemberModesFunction · 0.85

Calls 6

readFileSyncFunction · 0.90
getTeamFilePathFunction · 0.85
jsonParseFunction · 0.85
getErrnoCodeFunction · 0.85
logForDebuggingFunction · 0.85
errorMessageFunction · 0.50

Tested by

no test coverage detected