MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / readUdsCapabilityToken

Function readUdsCapabilityToken

src/utils/udsMessaging.ts:268–282  ·  view source on GitHub ↗
(
  socket: string,
)

Source from the content-addressed store, hash-verified

266}
267
268export async function readUdsCapabilityToken(
269 socket: string,
270): Promise<string | undefined> {
271 try {
272 const parsed = jsonParse(
273 await readFile(getCapabilityPath(socket), 'utf-8'),
274 ) as Record<string, unknown>
275 if (parsed.socketPath === socket && typeof parsed.authToken === 'string') {
276 return parsed.authToken
277 }
278 } catch {
279 // Missing or unreadable capability file means the peer is not addressable.
280 }
281 return undefined
282}
283
284// ---------------------------------------------------------------------------
285// Inbox

Callers 1

Calls 3

jsonParseFunction · 0.85
readFileFunction · 0.85
getCapabilityPathFunction · 0.85

Tested by

no test coverage detected