MCPcopy Create free account
hub / github.com/Noumena-Network/code / readAgentMetadata

Function readAgentMetadata

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

Source from the content-addressed store, hash-verified

318}
319
320export async function readAgentMetadata(
321 agentId: AgentId,
322): Promise<AgentMetadata | null> {
323 const path = getAgentMetadataPath(agentId)
324 try {
325 const raw = await readFile(path, 'utf-8')
326 return JSON.parse(raw) as AgentMetadata
327 } catch (e) {
328 if (isFsInaccessible(e)) return null
329 throw e
330 }
331}
332
333export type RemoteAgentMetadata = {
334 taskId: string

Callers 1

resumeAgentBackgroundFunction · 0.85

Calls 3

getAgentMetadataPathFunction · 0.85
readFileFunction · 0.85
isFsInaccessibleFunction · 0.85

Tested by

no test coverage detected