(memoryType: MemoryType)
| 1797 | } |
| 1798 | |
| 1799 | export function getMemoryPath(memoryType: MemoryType): string { |
| 1800 | const cwd = getOriginalCwd() |
| 1801 | |
| 1802 | switch (memoryType) { |
| 1803 | case 'User': |
| 1804 | return join(getClaudeConfigHomeDir(), 'CLAUDE.md') |
| 1805 | case 'Local': |
| 1806 | return join(cwd, 'CLAUDE.local.md') |
| 1807 | case 'Project': |
| 1808 | return join(cwd, 'CLAUDE.md') |
| 1809 | case 'Managed': |
| 1810 | return join(getManagedFilePath(), 'CLAUDE.md') |
| 1811 | case 'AutoMem': |
| 1812 | return getAutoMemEntrypoint() |
| 1813 | } |
| 1814 | // TeamMem is only a valid MemoryType when feature('TEAMMEM') is true |
| 1815 | if (feature('TEAMMEM')) { |
| 1816 | return teamMemPaths!.getTeamMemEntrypoint() |
| 1817 | } |
| 1818 | return '' // unreachable in external builds where TeamMem is not in MemoryType |
| 1819 | } |
| 1820 | |
| 1821 | export function getManagedClaudeRulesDir(): string { |
| 1822 | return join(getManagedFilePath(), '.claude', 'rules') |
no test coverage detected