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

Function readTeamFileAsync

src/utils/swarm/teamHelpers.ts:147–160  ·  view source on GitHub ↗
(
  teamName: string,
)

Source from the content-addressed store, hash-verified

145 * Reads a team file by name (asyncfor tool handlers and other async contexts)
146 */
147export async function readTeamFileAsync(
148 teamName: string,
149): Promise<TeamFile | null> {
150 try {
151 const content = await readFile(getTeamFilePath(teamName), 'utf-8')
152 return jsonParse(content) as TeamFile
153 } catch (e) {
154 if (getErrnoCode(e) === 'ENOENT') return null
155 logForDebugging(
156 `[TeammateTool] Failed to read team file for ${teamName}: ${errorMessage(e)}`,
157 )
158 return null
159 }
160}
161
162/**
163 * Writes a team file (sync — for sync contexts)

Callers 8

handleSpawnSplitPaneFunction · 0.85
handleSpawnInProcessFunction · 0.85
handleBroadcastFunction · 0.85
handleShutdownApprovalFunction · 0.85
getLeaderNameFunction · 0.85
setMemberActiveFunction · 0.85

Calls 6

readFileFunction · 0.85
getTeamFilePathFunction · 0.85
jsonParseFunction · 0.85
getErrnoCodeFunction · 0.85
logForDebuggingFunction · 0.85
errorMessageFunction · 0.50

Tested by

no test coverage detected