Commit graph

1 commit

Author SHA1 Message Date
57fcdf7158 feat(ms-ai-architect): add lib/cross-platform-paths for cache/log/state/backup dirs [skip-docs]
First foundation lib for v1.12.0 auto-KB-update. Resolves per-OS paths:
- macOS: ~/Library/{Caches,Logs,Application Support}/<app>/
- Linux: XDG_CACHE_HOME / XDG_STATE_HOME with ~/.cache, ~/.local/state fallbacks
- Windows: %LOCALAPPDATA%\<app>\{Cache,Logs,State}

Plus getBackupDir(pluginRoot) → <pluginRoot>/.kb-backup (gitignored).

All four functions auto-mkdir target. Dependency-injection via opts
({platform, homedir, env}) makes the lib pure-testable; 13/13 tests
pass under tmpdir isolation without touching real ~/ paths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 10:30:31 +02:00