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

Function readAgentMetadata

src/utils/sessionStorage.ts:292–303  ·  view source on GitHub ↗
(
  agentId: AgentId,
)

Source from the content-addressed store, hash-verified

290}
291
292export async function readAgentMetadata(
293 agentId: AgentId,
294): Promise<AgentMetadata | null> {
295 const path = getAgentMetadataPath(agentId)
296 try {
297 const raw = await readFile(path, 'utf-8')
298 return JSON.parse(raw) as AgentMetadata
299 } catch (e) {
300 if (isFsInaccessible(e)) return null
301 throw e
302 }
303}
304
305export type RemoteAgentMetadata = {
306 taskId: string

Callers 1

resumeAgentBackgroundFunction · 0.85

Calls 4

getAgentMetadataPathFunction · 0.85
readFileFunction · 0.85
isFsInaccessibleFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected