MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / writeAgentMetadata

Function writeAgentMetadata

source code/utils/sessionStorage.ts:285–292  ·  view source on GitHub ↗
(
  agentId: AgentId,
  metadata: AgentMetadata,
)

Source from the content-addressed store, hash-verified

283 * isolation, enabling resume to restore the correct cwd.
284 */
285export async function writeAgentMetadata(
286 agentId: AgentId,
287 metadata: AgentMetadata,
288): Promise<void> {
289 const path = getAgentMetadataPath(agentId)
290 await mkdir(dirname(path), { recursive: true })
291 await writeFile(path, JSON.stringify(metadata))
292}
293
294export async function readAgentMetadata(
295 agentId: AgentId,

Callers 2

runAgentFunction · 0.85
cleanupWorktreeIfNeededFunction · 0.85

Calls 2

getAgentMetadataPathFunction · 0.85
mkdirFunction · 0.85

Tested by

no test coverage detected