Function: resolveAgentWorkspaceDir()
resolveAgentWorkspaceDir(
agentId,baseDir?):string
Defined in: packages/agentos/src/cognition/marketplace/workspace/AgentWorkspace.ts:143
Resolve the full workspace directory for an agent: the folder named by sanitizeAgentWorkspaceId, which must resolve inside the base folder, a second guard should a platform's path rules ever place the folder of an accepted name elsewhere.
Parameters
agentId
string
The agent's id.
baseDir?
string
The folder that holds every agent's workspace; resolveAgentWorkspaceBaseDir by default.
Returns
string
The absolute path of the agent's workspace folder, inside the base folder.
Throws
InvalidAgentWorkspaceIdError when the id gives no safe folder name, or its folder would be outside the base folder.