( agentType: string, scope: AgentMemoryScope, )
| 50 | * - 'local' scope: see getLocalAgentMemoryDir() |
| 51 | */ |
| 52 | export function getAgentMemoryDir( |
| 53 | agentType: string, |
| 54 | scope: AgentMemoryScope, |
| 55 | ): string { |
| 56 | const dirName = sanitizeAgentTypeForPath(agentType) |
| 57 | switch (scope) { |
| 58 | case 'project': |
| 59 | return join(getCwd(), '.claude', 'agent-memory', dirName) + sep |
| 60 | case 'local': |
| 61 | return getLocalAgentMemoryDir(dirName) |
| 62 | case 'user': |
| 63 | return join(getMemoryBaseDir(), 'agent-memory', dirName) + sep |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | // Check if file is within an agent memory directory (any scope). |
| 68 | export function isAgentMemoryPath(absolutePath: string): boolean { |
no test coverage detected