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

Function ensureAgentDirectoryExists

src/components/agents/agentFileUtils.ts:219–225  ·  view source on GitHub ↗

* Ensures the directory for an agent location exists

(
  source: SettingSource,
)

Source from the content-addressed store, hash-verified

217 * Ensures the directory for an agent location exists
218 */
219async function ensureAgentDirectoryExists(
220 source: SettingSource,
221): Promise<string> {
222 const dirPath = getCanonicalAgentDirectoryPath(source)
223 await mkdir(dirPath, { recursive: true })
224 return dirPath
225}
226
227/**
228 * Saves an agent to the filesystem

Callers 1

saveAgentToFileFunction · 0.85

Calls 2

mkdirFunction · 0.85

Tested by

no test coverage detected