(memoryType: MemoryType)
| 1814 | } |
| 1815 | |
| 1816 | export function getMemoryPath(memoryType: MemoryType): string { |
| 1817 | const cwd = getOriginalCwd() |
| 1818 | |
| 1819 | switch (memoryType) { |
| 1820 | case 'User': |
| 1821 | return join(getClaudeConfigHomeDir(), 'CLAUDE.md') |
| 1822 | case 'Local': |
| 1823 | return join(cwd, 'CLAUDE.local.md') |
| 1824 | case 'Project': |
| 1825 | return join(cwd, 'CLAUDE.md') |
| 1826 | case 'Managed': |
| 1827 | return join(getManagedFilePath(), 'CLAUDE.md') |
| 1828 | case 'AutoMem': |
| 1829 | return getAutoMemEntrypoint() |
| 1830 | } |
| 1831 | // TeamMem is only a valid MemoryType when feature('TEAMMEM') is true |
| 1832 | if (feature('TEAMMEM')) { |
| 1833 | return teamMemPaths!.getTeamMemEntrypoint() |
| 1834 | } |
| 1835 | return '' // unreachable in external builds where TeamMem is not in MemoryType |
| 1836 | } |
| 1837 | |
| 1838 | export function getManagedClaudeRulesDir(): string { |
| 1839 | return join(getManagedFilePath(), '.claude', 'rules') |
no test coverage detected