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

Function getActualAgentFilePath

src/components/agents/agentFileUtils.ts:159–170  ·  view source on GitHub ↗
(agent: AgentDefinition)

Source from the content-addressed store, hash-verified

157 * Always use this for existing agents to get their real file location
158 */
159export function getActualAgentFilePath(agent: AgentDefinition): string {
160 if (agent.source === 'built-in') {
161 return 'Built-in'
162 }
163 if (agent.source === 'plugin') {
164 throw new Error('Cannot get file path for plugin agents')
165 }
166
167 const dirPath = agent.baseDir || getAgentDirectoryPath(agent.source)
168 const filename = agent.filename || agent.agentType
169 return join(dirPath, `${filename}.md`)
170}
171
172/**
173 * Gets the relative file path for a new agent based on its name

Callers 3

AgentEditorFunction · 0.85
updateAgentFileFunction · 0.85
deleteAgentFromFileFunction · 0.85

Calls 1

getAgentDirectoryPathFunction · 0.85

Tested by

no test coverage detected