⛰️ LifeOS — The AI-powered Life Operating System that helps you hill climb to wherever you're going.
README: add Star the repo call-to-action
Daniel Miesslerbc9d675541fa
diff --git a/.pai-protected.json b/.pai-protected.jsondeleted file mode 100644index 3f09303d..00000000--- a/.pai-protected.json+++ /dev/null@@ -1,462 +0,0 @@-{- "$schema": "https://json-schema.org/draft-07/schema#",- "description": "PAI Protected Files - Files that must NOT be overwritten with Kai content",- "version": "2.0",- "protected": {- "core_documents": {- "description": "Core PAI documentation that differs from Kai",- "files": [- "README.md",- "INSTALL.md",- "SECURITY.md"- ],- "validation": "Must contain 'PAI' or 'Personal AI Infrastructure' in content"- },- "pai_infrastructure": {- "description": "PAI-specific infrastructure code",- "files": [- "Tools/validate-protected.ts",- ".pai-protected.json"- ],- "validation": "Must not contain references to private Kai data"- },- "sanitized_config": {- "description": "Configuration files that must remain sanitized",- "files": [- ".env.example"- ],- "validation": "Must not contain API keys, personal emails, or secrets"- },- "forbidden_directories": {- "description": "Directories that should NEVER exist in public PAI",- "patterns": [- "^skills/",- "^Deprecated/",- "^.deprecated/",- "^MEMORY/",- "^History/",- "^context/",- "^progress/"- ],- "validation": "These directories contain private Kai data and must not be committed"- },- "protected_patterns": {- "description": "Comprehensive patterns to catch sensitive data from production agent systems",- "categories": {- "api_keys": {- "description": "API keys and tokens from various services",- "patterns": [- "sk-ant-api[a-zA-Z0-9-]{20,}",- "sk-[a-zA-Z0-9]{20,}",- "ANTHROPIC_API_KEY=[^$\\s]{10,}",- "OPENAI_API_KEY=[^$\\s]{10,}",- "PERPLEXITY_API_KEY=pplx-[a-zA-Z0-9]+",- "ELEVENLABS_API_KEY=[a-f0-9]{32}",- "GOOGLE_API_KEY=AIza[a-zA-Z0-9_-]{35}",- "AKIA[0-9A-Z]{16}",- "ABIA[0-9A-Z]{16}",- "ACCA[0-9A-Z]{16}",- "ASIA[0-9A-Z]{16}",- "aws_access_key_id[\"'\\s:=]+[A-Z0-9]{20}",- "aws_secret_access_key[\"'\\s:=]+[A-Za-z0-9/+=]{40}",- "sk_live_[a-zA-Z0-9]{24,}",- "pk_live_[a-zA-Z0-9]{24,}",- "rk_live_[a-zA-Z0-9]{24,}",- "AC[a-f0-9]{32}",- "SK[a-f0-9]{32}",- "SG\\.[a-zA-Z0-9_-]{22}\\.[a-zA-Z0-9_-]{43}",- "dd[a-z]_[a-zA-Z0-9]{40}",- "NRAK-[A-Z0-9]{27}",- "sntrys_[a-zA-Z0-9]{64}",- "AAAA[A-Za-z0-9_-]{7}:[A-Za-z0-9_-]{140}",- "sbp_[a-f0-9]{40}",- "eyJ[a-zA-Z0-9_-]*\\.[a-zA-Z0-9_-]*\\.[a-zA-Z0-9_-]*",- "dop_v1_[a-f0-9]{64}",- "do_[a-zA-Z0-9_]{40,}",- "npm_[a-zA-Z0-9]{36}",- "pypi-[a-zA-Z0-9_-]{64,}",- "glpat-[a-zA-Z0-9_-]{20,}",- "glsa_[a-zA-Z0-9_-]{32,}"- ]- },- "github_tokens": {- "description": "GitHub authentication tokens",- "patterns": [- "ghp_[a-zA-Z0-9]{36}",- "gho_[a-zA-Z0-9]{36}",- "ghu_[a-zA-Z0-9]{36}",- "ghs_[a-zA-Z0-9]{36}",- "ghr_[a-zA-Z0-9]{36}",- "github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59}",- "GITHUB_TOKEN=[^$\\s]{10,}"- ]- },- "slack_tokens": {- "description": "Slack API tokens",- "patterns": [- "xoxb-[0-9]+-[0-9]+-[a-zA-Z0-9]+",- "xoxp-[0-9]+-[0-9]+-[a-zA-Z0-9]+",- "xoxa-[0-9]+-[a-zA-Z0-9]+",- "xoxr-[0-9]+-[a-zA-Z0-9]+"- ]- },- "webhooks": {- "description": "Webhook URLs that could expose private channels",- "patterns": [- "https://discord\\.com/api/webhooks/[0-9]+/[a-zA-Z0-9_-]+",- "https://discordapp\\.com/api/webhooks/[0-9]+/[a-zA-Z0-9_-]+",- "https://hooks\\.slack\\.com/services/T[A-Z0-9]+/B[A-Z0-9]+/[a-zA-Z0-9]+",- "https://ntfy\\.sh/[a-zA-Z0-9_-]{10,}",- "ntfy\\.sh/kai-[a-zA-Z0-9]+",- "https://hooks\\.zapier\\.com/hooks/catch/[0-9]+/[a-zA-Z0-9]+",- "https://maker\\.ifttt\\.com/trigger/[^/]+/with/key/[a-zA-Z0-9_-]+"- ]- },- "database_credentials": {- "description": "Database connection strings and credentials",- "patterns": [- "mongodb(\\+srv)?://[^:]+:[^@]+@[^/]+",- "postgres(ql)?://[^:]+:[^@]+@[^/]+",- "mysql://[^:]+:[^@]+@[^/]+",- "redis://[^:]+:[^@]+@[^/]+",- "DATABASE_URL=[^\\s]+:[^\\s]+@",- "REDIS_URL=[^\\s]+:[^\\s]+@",- "MONGO_URI=[^\\s]+:[^\\s]+@"- ]- },- "private_keys": {- "description": "Private keys and certificates",- "patterns": [- "-----BEGIN RSA PRIVATE KEY-----",- "-----BEGIN OPENSSH PRIVATE KEY-----",- "-----BEGIN PGP PRIVATE KEY-----",- "-----BEGIN EC PRIVATE KEY-----",- "-----BEGIN PRIVATE KEY-----",- "-----BEGIN DSA PRIVATE KEY-----",- "-----BEGIN ENCRYPTED PRIVATE KEY-----"- ]- },- "pii_ssn_financial": {- "description": "SSN, EIN, and financial identifiers",- "patterns": [- "SSN[:\\s]+[0-9]{3}-[0-9]{2}-[0-9]{4}",- "\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b",- "EIN[:\\s]+[0-9]{2}-[0-9]{7}",- "\\b[0-9]{2}-[0-9]{7}\\b",- "\\b[45][0-9]{3}[- ]?[0-9]{4}[- ]?[0-9]{4}[- ]?[0-9]{4}\\b",- "\\b3[47][0-9]{2}[- ]?[0-9]{6}[- ]?[0-9]{5}\\b",- "routing[_\\s]?number[:\\s]+[0-9]{9}",- "account[_\\s]?number[:\\s]+[0-9]{8,17}"- ]- },- "pii_phone": {- "description": "Phone numbers in various formats",- "patterns": [- "\\+1[- ]?\\(?[0-9]{3}\\)?[- ]?[0-9]{3}[- ]?[0-9]{4}",- "\\b\\(?[0-9]{3}\\)?[- ]?[0-9]{3}[- ]?[0-9]{4}\\b",- "phone[:\\s]+[0-9]{3}[-.\\s]?[0-9]{3}[-.\\s]?[0-9]{4}",- "cell[:\\s]+[0-9]{3}[-.\\s]?[0-9]{3}[-.\\s]?[0-9]{4}",- "mobile[:\\s]+[0-9]{3}[-.\\s]?[0-9]{3}[-.\\s]?[0-9]{4}"- ]- },- "personal_emails": {- "description": "Personal and business email addresses",- "patterns": [- "[a-z]+@danielmiessler\\.com",- "[a-z]+@unsupervised-learning\\.com",- "daniel@[a-z]+\\.[a-z]+",- "susan@[a-z]+\\.[a-z]+",- "@gmail\\.com(?!.*example)",- "@yahoo\\.com(?!.*example)",- "@hotmail\\.com(?!.*example)",- "@outlook\\.com(?!.*example)",- "@icloud\\.com(?!.*example)"- ]- },- "private_paths": {- "description": "Private file system paths",- "patterns": [- "/Users/daniel/(?!Projects/PAI)",- "/Users/[a-z]+/\\.claude/",- "/home/[a-z]+/\\.claude/",- "~/.claude/skills/CORE/USER/",- "~/.claude/MEMORY/",- "~/.claude/History/",- "/Users/daniel/.claude/skills/personal"- ]- },- "internal_infrastructure": {- "description": "Internal hostnames, IPs, and URLs",- "patterns": [- "\\b10\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\b",- "\\b172\\.(1[6-9]|2[0-9]|3[0-1])\\.[0-9]{1,3}\\.[0-9]{1,3}\\b",- "\\b192\\.168\\.[0-9]{1,3}\\.[0-9]{1,3}\\b",- "\\.internal\\.",- "\\.local\\.",- "\\.corp\\.",- "\\.private\\.",- "localhost:[0-9]{4,5}(?!/)"- ]- },- "customer_data": {- "description": "Customer names and identifiable information",- "patterns": [- "customer[_\\s]?id[:\\s]+[A-Z0-9]{8,}",- "client[_\\s]?name[:\\s]+[A-Z][a-z]+",- "account[_\\s]?name[:\\s]+[A-Z][a-z]+",- "company[_\\s]?name[:\\s]+[A-Z][a-z]+"- ]- },- "team_members": {- "description": "Team member and contact names that shouldn't be public",- "patterns": [- "Kaleigh Feher",- "Bryan Brake",- "Angela Gunn",- "Susan Miessler",- "Matt Johansen",- "Dave Kennedy"- ]- },- "credentials_inline": {- "description": "Inline credentials and secrets",- "patterns": [- "password[\"'\\s:=]+[^$\\s\"']{8,}(?!.*placeholder|.*example|.*YOUR_)",- "secret[\"'\\s:=]+[^$\\s\"']{8,}(?!.*placeholder|.*example|.*YOUR_)",- "API_KEY=['\"][a-zA-Z0-9_-]{16,}['\"]",- "SECRET_KEY=['\"][a-zA-Z0-9_-]{16,}['\"]",- "Bearer [a-zA-Z0-9_-]{20,}",- "Authorization:[\\s]+Bearer [a-zA-Z0-9_-]+"- ]- },- "cloudflare": {- "description": "Cloudflare credentials and identifiers",- "patterns": [- "CLOUDFLARE_API_TOKEN=[a-zA-Z0-9_-]{40}",- "CLOUDFLARE_API_KEY=[a-f0-9]{37}",- "CF_API_TOKEN=[a-zA-Z0-9_-]{40}",- "CLOUDFLARE_ZONE_ID=[a-f0-9]{32}",- "CLOUDFLARE_ACCOUNT_ID=[a-f0-9]{32}"- ]- },- "private_repos": {- "description": "Private GitHub repository references that shouldn't be public",- "patterns": [- "danielmiessler/arbol",- "danielmiessler/feed",- "danielmiessler/substrate",- "danielmiessler/telos",- "danielmiessler/ladder"- ]- },- "personal_project_urls": {- "description": "Personal project URLs that reveal private infrastructure",- "patterns": [- "thesurface\\.ai"- ],- "severity": "high"- },- "da_names": {- "description": "DA (Digital Assistant) name patterns",- "patterns": [- "\\bDevi\\b"- ]- },- "imessage_bot": {- "description": "iMessage bot infrastructure references",- "patterns": [- "iMessageBot",- "iMessage[_\\s]?[Bb]ot",- "imessage[_-]bot"- ]- },- "misc_sensitive": {- "description": "Miscellaneous sensitive patterns",- "patterns": [- "daemon\\.plist",- "id_rsa",- "id_ed25519",- "id_ecdsa",- "\\.pem$",- "\\.key$",- "\\.p12$",- "\\.pfx$",- "service[_-]account.*\\.json"- ]- }- },- "exception_files": [- "SECURITY.md",- ".pai-protected.json",- ".env.example",- "Tools/validate-protected.ts",- "Tools/CheckPAIState.md",- "README.md",- "INSTALL.md",- "Releases/*/README.md",- "Releases/*/.claude/INSTALL.md",- "Releases/*/.claude/skills/*/SKILL.md",- "Releases/*/.claude/skills/*/SYSTEM/*.md",- "Releases/*/.claude/skills/*/Workflows/*.md",- "Releases/*/.claude/skills/*/Phases/*.md",- "Releases/*/.claude/skills/*/Reference/*.md",- "Releases/*/.claude/skills/*/Tools/*.ts",- "Releases/*/.claude/skills/CORE/USER/*/README.md",- "Releases/*/.claude/skills/CORE/Tools/fabric/Patterns/*/*.md",- "Releases/*/.claude/skills/CORE/Tools/*.ts",- "Releases/*/.claude/skills/PAI/USER/*/README.md",- "Releases/*/.claude/skills/PAI/SYSTEM/PAISECURITYSYSTEM/*.yaml",- "Releases/*/.claude/skills/PAI/Tools/*.ts",- "Releases/*/.claude/MEMORY/README.md",- "Releases/*/.claude/MEMORY/*/README.md",- "Releases/*/.claude/skills/Recon/Data/*.md",- "Releases/*/.claude/skills/Recon/*.md",- "Releases/*/.claude/skills/Recon/Tools/*.ts",- "Releases/*/.claude/skills/Recon/Workflows/*.md",- "Releases/*/.claude/skills/OSINT/*.md",- "Releases/*/.claude/skills/OSINT/Workflows/*.md",- "Releases/*/.claude/skills/PrivateInvestigator/*.md",- "Releases/*/.claude/skills/PrivateInvestigator/Workflows/*.md",- "Releases/*/.claude/skills/Telos/*.md",- "Releases/*/.claude/skills/Telos/Workflows/*.md",- "Releases/*/.claude/skills/Telos/DashboardTemplate/*.md",- "Releases/*/.claude/skills/Telos/ReportTemplate/*/*.ts",- "Releases/*/.claude/skills/Telos/ReportTemplate/*/*.tsx",- "Releases/*/.claude/skills/Research/*.md",- "Releases/*/.claude/skills/Research/Workflows/*.md",- "Releases/*/.claude/skills/System/*.md",- "Releases/*/.claude/skills/System/Workflows/*.md",- "Releases/*/.claude/skills/System/Tools/*.ts",- "Releases/*/.claude/skills/Prompting/*.md",- "Releases/*/.claude/skills/Prompting/Templates/*.md",- "Releases/*/.claude/skills/CreateSkill/Workflows/*.md",- "Releases/*/.claude/skills/PAIUpgrade/*.md",- "Releases/*/.claude/skills/PAIUpgrade/Workflows/*.md",- "Releases/*/.claude/skills/Agents/*.md",- "Releases/*/.claude/PAISECURITYSYSTEM/*.md",- "Releases/*/.claude/PAISECURITYSYSTEM/*.yaml",- "Releases/*/.claude/Observability/*.sh",- "Releases/*/.claude/Observability/scripts/*.sh",- "Releases/*/.claude/Observability/apps/*/src/*/*.ts",- "Releases/*/.claude/VoiceServer/*/*.sh",- "Releases/*/.claude/VoiceServer/macos-service/*/*.sh",- "Releases/*/.claude/hooks/lib/*.ts",- "Releases/*/.claude/skills/CORE/SYSTEM/UPDATES/*.md",- "Releases/*/.claude/skills/CORE/USER/TERMINAL/*.conf",- "Releases/*/.claude/skills/CORE/SYSTEM/PAISECURITYSYSTEM/*.yaml",- "Releases/*/.claude/skills/PAI/SYSTEM/UPDATES/*.md",- "Releases/*/.claude/skills/PAI/USER/TERMINAL/*.conf",- "Releases/*/.claude/skills/Fabric/Patterns/*/*.md",- "Releases/*/.claude/skills/Fabric/Patterns/*/system.md",- "Releases/*/.claude/skills/Fabric/Patterns/*/README.md",- "Releases/*/.claude/skills/WebAssessment/**/*.md",- "Releases/*/.claude/skills/WebAssessment/**/*.py",- "Releases/*/.claude/skills/WebAssessment/Workflows/**/*.md",- "Releases/*/.claude/skills/WebAssessment/OsintTools/*.md",- "Releases/*/.claude/skills/WebAssessment/OsintTools/*.py",- "Releases/*/.claude/skills/WebAssessment/FfufResources/*.md",- "Releases/*/.claude/skills/PromptInjection/*.md",- "Releases/*/.claude/skills/Documents/Pdf/*.md",- "Releases/*/.claude/skills/WebAssessment/*.py",- "Releases/*/.claude/skills/PAI/*.md",- "Releases/*/.claude/skills/PAI/Components/Algorithm/*.md",- "Releases/*/.claude/skills/PAI/USER/PAISECURITYSYSTEM/*.md",- "Releases/*/.claude/skills/PAI/USER/PAISECURITYSYSTEM/*.yaml",- "Releases/*/.claude/skills/PAI/PAISECURITYSYSTEM/*.yaml",- "Releases/*/.claude/skills/Parser/Prompts/*.md",- "Releases/*/.claude/skills/Parser/Utils/*.ts"- ],- "exception_contexts": {- "description": "Patterns that are OK when in documentation/example context",- "allowed_prefixes": [- "# Example:",- "// Example:",- "/* Example",- "e.g.,",- "for example",- "placeholder",- "YOUR_",- "EXAMPLE",- "xxx",- "<your-",- "documentation",- "`~/.claude",- "$PAI_HOME",- "$PAI_DIR",- "pattern:",- "regex:",- "matches:",- "// Pattern",- "# Pattern",- "sample",- "template",- "default:",- "fallback",- "config example",- "configuration:",- "localhost example",- "test server",- "development server",- "local dev",- "192.168.x.x",- "10.x.x.x",- "private IP",- "internal IP",- "example IP",- "example phone",- "format:",- "(xxx)",- "xxx-xxx",- "secret detection",- "detect secret",- "find secret",- "scan for",- "pattern match",- "regex match",- "localhost:",- "http://localhost",- "127.0.0.1",- "dashboard at",- "server at",- "running at",- "start server",- "dev server",- "port ",- ":3000",- ":8080",- ":8888",- ":4173",- "USER/",- "USER directory",- "USER tier",- "~/.claude/skills",- "~/.claude/hooks",- "$PAI_DIR/skills",- "$PAI_DIR/hooks",- "ANTHROPIC_API_KEY=your",- "your_api_key",- "[email protected]",- "Co-Authored-By:",- "[email protected]",- "ssh://",- "github.com/",- "TELOS_DIR"- ]- }- }- },- "kai_to_pai_workflow": {- "description": "How to safely sync Kai improvements to PAI",- "steps": [- "1. Make changes in Kai (~/.claude/)",- "2. Test thoroughly in Kai environment",- "3. Identify which changes should go to public PAI",- "4. Copy changes to PAI repo (~/Projects/PAI/)",- "5. SKIP protected files (they stay PAI-specific)",- "6. Sanitize any personal data or API keys",- "7. Run: bun ~/Projects/PAI/Tools/validate-protected.ts",- "8. If validation passes, commit to PAI",- "9. If validation fails, check which protected files changed"- ]- }-}diff --git a/PLATFORM.md b/PLATFORM.mddeleted file mode 100644index 68df7e01..00000000--- a/PLATFORM.md+++ /dev/null@@ -1,255 +0,0 @@-# PAI Platform Compatibility Status--This document tracks all platform-specific code and dependencies across PAI, providing a roadmap for cross-platform support.--**Last Updated:** 2026-01-01-**Maintainer:** Community contributions welcome-------## Platform Support Matrix--| Platform | Status | Notes |-|----------|--------|-------|-| **macOS** | ✅ Fully Supported | Primary development platform |-| **Linux** | ✅ Fully Supported | Ubuntu/Debian tested, other distros via community |-| **Windows** | ❌ Not Supported | Community contributions welcome |-------## Known Platform-Specific Issues (22 Total)--### ✅ FIXED (PR #XXX - Linux Compatibility Fixes)--**Critical Blockers:**-1. ✅ `sed -i ''` syntax (macOS BSD vs GNU sed)- - **File:** Voice system INSTALL.md- - **Fix:** Platform-aware sed with USERNAME fallback- - **Status:** Fixed with conditional `uname -s` detection--2. ✅ `/opt/homebrew/bin` hardcoded in PATH- - **Files:** `pai-observability-server/src/Observability/manage.sh:8`, `pai-observability-server.md:1316`- - **Fix:** Conditional PATH based on directory existence- - **Status:** Fixed with `[ -d "/opt/homebrew/bin" ]` check--**Auto-Start Feature Parity:**-3. ✅ LaunchAgent plist only (no Linux alternative)- - **File:** Voice system INSTALL.md Step 9- - **Fix:** Added systemd user service for Linux- - **Status:** Linux now has full auto-start support--4. ✅ launchctl commands (macOS-only daemon management)- - **Context:** Part of LaunchAgent system- - **Fix:** systemd equivalent provided for Linux- - **Status:** Platform-specific but both supported--5. ✅ ~/Library/LaunchAgents path (macOS directory structure)- - **Context:** Part of LaunchAgent system- - **Fix:** Linux uses `~/.config/systemd/user`- - **Status:** Platform-specific but both supported--**Documentation:**-6. ✅ VERIFY.md misleading "requires modifications" warning- - **File:** Voice system VERIFY.md- - **Fix:** Updated to reflect Linux is fully supported- - **Status:** Documentation now accurate--6a. ✅ `Pulse` vs `PULSE` directory casing mismatch- - **Files:** `Releases/v5.0.0/.claude/PAI/PULSE/{run-job,lib,setup,pulse-unified}.ts`,- `PULSE/modules/{imessage,user-index}.ts`, `PULSE/Performance/cost-aggregator.ts`,- `PULSE/checks/{notification-governor,poller-meta-monitor,github-work}.ts`,- `PULSE/Observability/observability.ts` (11 files, 14 occurrences)- - **Issue:** Source referenced `~/.claude/PAI/Pulse/...` but directory on disk is `PULSE`. Worked on macOS APFS (case-insensitive default) but broke on Linux ext4 and case-sensitive APFS — config and state lookups silently missed.- - **Fix:** Aligned all `path.join(...)` literals to `"PULSE"`.- - **Tested:** Linux (Ubuntu, runtime-verified). Behavior unchanged on case-insensitive filesystems (macOS default, NTFS).-------### 📋 ALREADY HANDLED (No Action Needed)--**Audio Playback (Fixed in PR #285 - Google TTS):**-17. ✅ afplay calls conditionally executed- - **File:** Voice server source- - **Status:** Runtime platform detection via `process.platform`- - **Implementation:** macOS uses afplay, Linux auto-detects mpg123/mpv/snap--18. ✅ Linux audio player auto-detection- - **Status:** Fully implemented with graceful fallbacks- - **Priority:** mpg123 → mpv → snap/mpv → warn user--19. ✅ Cross-platform notifications- - **macOS:** osascript (native notification center)- - **Linux:** notify-send (libnotify)- - **Status:** Both fully implemented--20. ✅ process.platform checks- - **Status:** Correct pattern throughout codebase- - **Note:** Needs Windows support added (future work)--21. ✅ Bun runtime- - **Status:** Cross-platform, no issues- - **Installation:** Works on macOS, Linux, Windows-------### 🔮 MINOR ISSUES (Low Priority)--**Documentation Inconsistencies:**-7. 🔮 Platform check mentions paplay but code doesn't use it- - **File:** Voice system INSTALL.md platform check- - **Impact:** Minor - doesn't block functionality- - **Fix:** Either add paplay support or remove from docs- - **Priority:** Low - mpg123/mpv work fine--8. 🔮 /Users/ hardcoded paths in examples- - **Files:** Various documentation showing macOS examples- - **Impact:** Documentation only, not actual code- - **Fix:** Use generic paths like `$HOME` in examples- - **Priority:** Low - users can adapt examples--**macOS-Specific Features (Can't Test Without macOS):**-9-14. 🔮 LaunchAgent plist internals (6 specific property keys)- - **Context:** macOS-only format- - **Status:** Not applicable to Linux- - **Priority:** Low - macOS functionality works--15. 🔮 osascript for notifications- - **Status:** Already has notify-send fallback- - **Priority:** Low - both platforms supported--16. 🔮 ~/Library/Logs for logging- - **Status:** Already uses `~/.config/pai` on Linux- - **Priority:** Low - platform-appropriate paths used-------### ❌ UNSUPPORTED (Windows - Community Contributions Welcome)--22. ❌ Windows support entirely absent- - **Audio:** No Windows Media Player integration- - **Notifications:** No Windows Toast notifications- - **Auto-start:** No Task Scheduler implementation- - **Shell scripts:** Assume bash (not cmd/PowerShell)- - **Priority:** Medium - depends on community interest--**How to Contribute Windows Support:**-1. Add Windows audio playback (Windows Media Player, ffplay, or native APIs)-2. Implement Windows Toast notifications-3. Create Task Scheduler auto-start alternative-4. Convert bash scripts to cross-platform Bun/TypeScript-5. Test on Windows 10/11-6. Submit PR following PAI contribution guidelines-------## Platform Detection Patterns--**Recommended pattern (used throughout PAI):**--```bash-# Shell scripts-OS_TYPE="$(uname -s)"-if [ "$OS_TYPE" = "Darwin" ]; then- # macOS-specific code-elif [ "$OS_TYPE" = "Linux" ]; then- # Linux-specific code-else- echo "Unsupported platform: $OS_TYPE"-fi-```--```typescript-// TypeScript/Bun code-if (process.platform === 'darwin') {- // macOS-specific code-} else if (process.platform === 'linux') {- // Linux-specific code-} else if (process.platform === 'win32') {- // Windows-specific code (future)-}-```--**Anti-patterns to avoid:**-- Hardcoding paths that only exist on one platform-- Assuming package manager locations (Homebrew, apt, etc.)-- Using platform-specific syntax without detection (sed -i '', etc.)-- Skipping platform checks in documentation examples-------## Testing Requirements--Contributors fixing platform issues should:--1. **Test on target platform** - Don't submit untested code-2. **Document limitations** - Be honest about what you couldn't test-3. **Follow PAI principles** - Simple, transparent, UNIX philosophy-4. **Maintain backward compatibility** - Don't break existing platforms-5. **Add to this document** - Update the inventory with your fixes--**Current test coverage:**-- macOS: Tested by Daniel Miessler-- Linux (Ubuntu/WSL2): Tested by contributors-- Linux (other distros): Community testing-- Windows: Untested-------## Future Work--**High Priority:**-- Windows audio playback support-- Windows notification support-- Windows auto-start mechanism--**Medium Priority:**-- Test on non-Ubuntu Linux distros (Fedora, Arch, etc.)-- Improve error messages for missing dependencies-- Add platform compatibility checks to installation--**Low Priority:**-- Support for alternative package managers-- Docker/container deployment guide-- Automated multi-platform testing (CI/CD)-------## How to Report Platform Issues--1. Check this document to see if the issue is already known-2. Test on a clean installation (not your dev environment)-3. Open a GitHub issue with:- - Platform details (OS, version, package manager)- - Error message or unexpected behavior- - Steps to reproduce- - Proposed solution (if you have one)--**Before submitting:** Try to fix it yourself! PAI is community-driven.-------## Contribution Guidelines--When contributing platform fixes:--1. **Fix what you can test** - Don't guess, verify-2. **Document what you can't** - Be honest about limitations-3. **Keep it simple** - Follow PAI's UNIX philosophy-4. **Stay transparent** - No magic abstractions-5. **Add tests** - At minimum, manual verification steps--**Good PR example:** "feat: Add systemd auto-start for Linux (tested on Ubuntu 24.04)"--**Bad PR example:** "feat: Universal auto-start abstraction framework for all platforms"-------## Credits--**Platform compatibility work by:**-- Daniel Miessler - Original PAI implementation (macOS focus)-- PR #285 - Google Cloud TTS provider, Linux audio support-- PR #XXX - Linux compatibility fixes (sed, PATH, systemd)-- Community contributors - Testing and bug reports--Want your name here? Contribute a platform fix!diff --git a/README.md b/README.mdindex 3832e90b..ef0651ef 100644--- a/README.md+++ b/README.md@@ -1,6 +1,6 @@<p align="center"><br />- <img src="./lifeos-logo-full.png" alt="LifeOS" width="460">+ <img src="./images/lifeos-logo-full.png" alt="LifeOS" width="460"><br /></p>@@ -43,6 +43,16 @@LifeOS is a Life Operating System. It captures who you are, what you care about, and where you're trying to go, then uses AI that knows you to help you get there. Everything runs on one loop: move from your current state to your ideal state through steps you can verify.+<div align="center">++### ⭐ If LifeOS is useful to you, star the repo++Stars help more people find the project and keep it moving. It takes one click.++[](https://github.com/danielmiessler/LifeOS)++</div>+## Install**Give it to your AI.** LifeOS is installed *by* an AI, so the install is just a prompt. Paste this into your AI coding harness — Claude Code, Cursor, Codex, Hermes, or any capable agent — and it does the whole setup for you:diff --git a/Tools/validate-protected.ts b/Tools/validate-protected.tsdeleted file mode 100644index fad43b57..00000000--- a/Tools/validate-protected.ts+++ /dev/null@@ -1,470 +0,0 @@-#!/usr/bin/env bun-/**- * PAI Protected Files Validator- *- * Ensures PAI-specific files haven't been overwritten with Kai content.- * Run before committing changes to PAI repository.- *- * Usage:- * bun ~/Projects/PAI/Tools/validate-protected.ts- * bun ~/Projects/PAI/Tools/validate-protected.ts --staged (check only staged files)- */--import { readFileSync, existsSync } from 'fs';-import { join } from 'path';-import { execSync } from 'child_process';--interface PatternCategory {- description: string;- patterns: string[];-}--interface ProtectedPatterns {- description: string;- categories: {- [name: string]: PatternCategory;- };- exception_files: string[];- exception_contexts?: {- description: string;- allowed_prefixes: string[];- };-}--interface ProtectedManifest {- version: string;- protected: {- [category: string]: {- description: string;- files?: string[];- patterns?: string[];- exception_files?: string[];- validation?: string;- };- protected_patterns?: ProtectedPatterns;- };-}--const PAI_ROOT = join(import.meta.dir, '..');-const MANIFEST_PATH = join(PAI_ROOT, '.pai-protected.json');--// Colors for terminal output-const RED = '\x1b[31m';-const GREEN = '\x1b[32m';-const YELLOW = '\x1b[33m';-const BLUE = '\x1b[34m';-const RESET = '\x1b[0m';--function loadManifest(): ProtectedManifest {- if (!existsSync(MANIFEST_PATH)) {- console.error(`${RED}❌ Protected files manifest not found: ${MANIFEST_PATH}${RESET}`);- process.exit(1);- }-- return JSON.parse(readFileSync(MANIFEST_PATH, 'utf-8'));-}--function getStagedFiles(): string[] {- try {- const output = execSync('git diff --cached --name-only', {- cwd: PAI_ROOT,- encoding: 'utf-8'- });- return output.trim().split('\n').filter(f => f.length > 0);- } catch {- return [];- }-}--function checkForbiddenDirectories(stagedFiles: string[], manifest: ProtectedManifest): string[] {- const violations: string[] = [];- const forbiddenDirs = manifest.protected.forbidden_directories;-- if (!forbiddenDirs || !forbiddenDirs.patterns) {- return violations;- }-- for (const file of stagedFiles) {- for (const pattern of forbiddenDirs.patterns) {- const regex = new RegExp(pattern);- if (regex.test(file)) {- violations.push(`Forbidden directory file staged: ${file} (matches pattern: ${pattern})`);- }- }- }-- return violations;-}--/**- * Extract all patterns from the categorized structure- */-function getAllPatterns(patternCategory: ProtectedPatterns): { category: string; pattern: string }[] {- const allPatterns: { category: string; pattern: string }[] = [];-- if (!patternCategory.categories) {- return allPatterns;- }-- for (const [categoryName, category] of Object.entries(patternCategory.categories)) {- if (category.patterns) {- for (const pattern of category.patterns) {- allPatterns.push({ category: categoryName, pattern });- }- }- }-- return allPatterns;-}--/**- * Check if content has an allowed exception context (e.g., "# Example:", "placeholder")- */-function hasExceptionContext(line: string, patternCategory: ProtectedPatterns): boolean {- const allowedPrefixes = patternCategory.exception_contexts?.allowed_prefixes || [];-- for (const prefix of allowedPrefixes) {- if (line.toLowerCase().includes(prefix.toLowerCase())) {- return true;- }- }-- return false;-}--function scanAllFilesForSensitiveContent(stagedFiles: string[], manifest: ProtectedManifest): {- file: string;- violations: string[];-}[] {- const results: { file: string; violations: string[] }[] = [];- const patternCategory = manifest.protected.protected_patterns as ProtectedPatterns | undefined;-- if (!patternCategory || !patternCategory.categories) {- return results;- }-- const exceptions = patternCategory.exception_files || [];- const allPatterns = getAllPatterns(patternCategory);-- for (const file of stagedFiles) {- // Skip exception files- if (exceptions.includes(file)) {- continue;- }-- // Check wildcard exceptions (e.g., "Packs/*/README.md", "Releases/*/.claude/skills/*/SKILL.md")- const isWildcardException = exceptions.some(exc => {- if (exc.includes('*')) {- // Escape special regex characters except *, then replace * with [^/]+- const escapedPattern = exc- .replace(/[.+?^${}()|[\]\\]/g, '\\$&') // Escape special chars- .replace(/\*/g, '[^/]+'); // Replace * with path segment matcher- return new RegExp(`^${escapedPattern}$`).test(file);- }- return false;- });-- if (isWildcardException) {- continue;- }-- const fullPath = join(PAI_ROOT, file);-- // Skip if file doesn't exist (might be deleted)- if (!existsSync(fullPath)) {- continue;- }-- // Skip binary files- try {- const content = readFileSync(fullPath, 'utf-8');- const lines = content.split('\n');- const violations: string[] = [];-- for (const { category, pattern } of allPatterns) {- try {- const regex = new RegExp(pattern, 'gi');- const matchingLines: { line: number; text: string }[] = [];-- lines.forEach((lineText, idx) => {- regex.lastIndex = 0; // Reset regex state- if (regex.test(lineText)) {- // Check if this line has an exception context- if (!hasExceptionContext(lineText, patternCategory)) {- matchingLines.push({ line: idx + 1, text: lineText.trim().slice(0, 60) });- }- }- });-- if (matchingLines.length > 0) {- const lineInfo = matchingLines.slice(0, 3)- .map(m => `L${m.line}`)- .join(', ');- const moreInfo = matchingLines.length > 3 ? ` (+${matchingLines.length - 3} more)` : '';- violations.push(`[${category}] Pattern: ${pattern.slice(0, 40)}${pattern.length > 40 ? '...' : ''} at ${lineInfo}${moreInfo}`);- }- } catch {- // Invalid regex, skip- }- }-- if (violations.length > 0) {- results.push({ file, violations });- }- } catch {- // Binary file or read error, skip- }- }-- return results;-}--function getAllProtectedFiles(manifest: ProtectedManifest): string[] {- const files: string[] = [];-- for (const category of Object.values(manifest.protected)) {- if (category.files) {- files.push(...category.files);- }- }-- return files;-}--function checkFileContent(filePath: string, manifest: ProtectedManifest): {- valid: boolean;- violations: string[];-} {- const fullPath = join(PAI_ROOT, filePath);-- if (!existsSync(fullPath)) {- return { valid: true, violations: [] };- }-- const content = readFileSync(fullPath, 'utf-8');- const lines = content.split('\n');- const violations: string[] = [];-- // Get exception files list (applies to ALL checks, not just patterns)- const patternCategory = manifest.protected.protected_patterns as ProtectedPatterns | undefined;- const exceptions = patternCategory?.exception_files || [];- const isException = exceptions.includes(filePath);-- // Check for forbidden patterns from categorized structure (skip if exception)- if (patternCategory && patternCategory.categories && !isException) {- const allPatterns = getAllPatterns(patternCategory);-- for (const { category, pattern } of allPatterns) {- try {- const regex = new RegExp(pattern, 'gi');- let matchCount = 0;- const matchingLineNums: number[] = [];-- lines.forEach((lineText, idx) => {- regex.lastIndex = 0;- if (regex.test(lineText)) {- // Check for exception context- if (!hasExceptionContext(lineText, patternCategory)) {- matchCount++;- if (matchingLineNums.length < 3) {- matchingLineNums.push(idx + 1);- }- }- }- });-- if (matchCount > 0) {- const lineInfo = matchingLineNums.length > 0- ? ` (lines: ${matchingLineNums.join(', ')}${matchCount > 3 ? '...' : ''})`- : '';- violations.push(`[${category}] Found: "${pattern.slice(0, 50)}${pattern.length > 50 ? '...' : ''}" (${matchCount} occurrence(s))${lineInfo}`);- }- } catch {- // Invalid regex, skip- }- }- }-- // Check category-specific validation- for (const [categoryName, category] of Object.entries(manifest.protected)) {- if (!category.files?.includes(filePath) || !category.validation) {- continue;- }-- // Core documents must reference PAI- if (category.validation.includes('PAI')) {- if (!content.includes('PAI') && !content.includes('Personal AI Infrastructure')) {- violations.push(`Missing required reference to "PAI" or "Personal AI Infrastructure"`);- }- }-- // Must not contain private Kai data (skip if exception file)- if (category.validation.includes('private Kai data') && !isException) {- const privatePatterns = [- /\/Users\/daniel\/\.claude\/skills\/personal/,- /daemon\.plist/,- /Kai \(Personal AI Infrastructure\)/,- ];-- for (const pattern of privatePatterns) {- if (pattern.test(content)) {- violations.push(`Contains private Kai reference: ${pattern.source}`);- }- }- }-- // Must not contain secrets (skip if exception file)- if (category.validation.includes('secrets') && !isException) {- const secretPatterns = [- /ANTHROPIC_API_KEY=sk-/,- /ELEVENLABS_API_KEY=(?!your_elevenlabs_api_key_here)/,- /PERPLEXITY_API_KEY=(?!your_perplexity_api_key_here)/,- /@danielmiessler\.com/,- /@unsupervised-learning\.com/,- ];-- for (const pattern of secretPatterns) {- if (pattern.test(content)) {- violations.push(`Contains secret or personal email: ${pattern.source}`);- }- }- }- }-- return { valid: violations.length === 0, violations };-}--async function main() {- const args = process.argv.slice(2);- const stagedOnly = args.includes('--staged');-- console.log(`\n${BLUE}🛡️ PAI Protected Files Validator${RESET}\n`);- console.log('='.repeat(60));-- const manifest = loadManifest();- const allProtectedFiles = getAllProtectedFiles(manifest);-- // Determine which files to check- let filesToCheck: string[];-- if (stagedOnly) {- const stagedFiles = getStagedFiles();-- // Check for forbidden directories FIRST- const forbiddenViolations = checkForbiddenDirectories(stagedFiles, manifest);- if (forbiddenViolations.length > 0) {- console.log(`\n${RED}🚫 FORBIDDEN DIRECTORIES DETECTED${RESET}\n`);- for (const violation of forbiddenViolations) {- console.log(`${RED}❌${RESET} ${violation}`);- }- console.log('\n' + '='.repeat(60));- console.log(`\n${RED}🚫 COMMIT BLOCKED${RESET}\n`);- console.log('These directories contain private Kai data and must NOT be in public PAI.');- console.log('\n' + YELLOW + 'To fix:' + RESET);- console.log(' 1. git reset HEAD <file> to unstage');- console.log(' 2. rm -rf <directory> to remove');- console.log(' 3. Add to .gitignore if needed\n');- process.exit(1);- }-- // Scan ALL staged files for sensitive content- console.log(`\n${YELLOW}Scanning ${stagedFiles.length} staged file(s) for sensitive content...${RESET}\n`);- const sensitiveResults = scanAllFilesForSensitiveContent(stagedFiles, manifest);-- if (sensitiveResults.length > 0) {- console.log(`${RED}🚫 SENSITIVE CONTENT DETECTED${RESET}\n`);- for (const result of sensitiveResults) {- console.log(`${RED}❌${RESET} ${result.file}`);- for (const violation of result.violations) {- console.log(` ${RED}→${RESET} ${violation}`);- }- }- console.log('\n' + '='.repeat(60));- console.log(`\n${RED}🚫 COMMIT BLOCKED${RESET}\n`);- console.log('Files contain sensitive content that must NOT be in public PAI:\n');- console.log(' Categories checked:');- console.log(' - api_keys (Anthropic, OpenAI, AWS, Stripe, etc.)');- console.log(' - github_tokens (ghp_, gho_, github_pat_, etc.)');- console.log(' - slack_tokens (xoxb-, xoxp-, etc.)');- console.log(' - webhooks (Discord, Slack, ntfy, Zapier)');- console.log(' - database_credentials');- console.log(' - private_keys (RSA, SSH, PGP, etc.)');- console.log(' - pii_ssn_financial (SSN, EIN, credit cards)');- console.log(' - pii_phone (phone numbers)');- console.log(' - personal_emails (@gmail, @yahoo, etc.)');- console.log(' - private_paths (/Users/daniel/, ~/.claude/)');- console.log(' - internal_infrastructure (private IPs, .internal.)');- console.log(' - customer_data (customer_id, client_name)');- console.log(' - team_members (real names of team members)');- console.log(' - credentials_inline (password=, secret=)');- console.log(' - cloudflare (CF tokens and zone IDs)');- console.log(' - misc_sensitive (.pem, .key, service accounts)');- console.log('\n' + YELLOW + 'To fix:' + RESET);- console.log(' 1. Remove or redact the sensitive content');- console.log(' 2. Use placeholder values (e.g., "YOUR_API_KEY_HERE")');- console.log(' 3. Wrap in example context (e.g., "# Example: sk-...")');- console.log(' 4. Add file to exception_files if intentional\n');- process.exit(1);- }-- console.log(`${GREEN}✅ No sensitive content found in staged files${RESET}\n`);- console.log('='.repeat(60));-- filesToCheck = allProtectedFiles.filter(f => stagedFiles.includes(f));-- if (filesToCheck.length === 0) {- console.log(`\n${GREEN}✅ No protected files staged for commit${RESET}\n`);- process.exit(0);- }-- console.log(`\n${YELLOW}Checking ${filesToCheck.length} staged protected file(s)...${RESET}\n`);- } else {- filesToCheck = allProtectedFiles;- console.log(`\n${YELLOW}Checking all ${filesToCheck.length} protected files...${RESET}\n`);- }-- let hasViolations = false;- const results: { file: string; valid: boolean; violations: string[] }[] = [];-- // Check each file- for (const file of filesToCheck) {- const result = checkFileContent(file, manifest);- results.push({ file, ...result });-- if (!result.valid) {- hasViolations = true;- }- }-- // Print results- for (const result of results) {- if (result.valid) {- console.log(`${GREEN}✅${RESET} ${result.file}`);- } else {- console.log(`${RED}❌${RESET} ${result.file}`);- for (const violation of result.violations) {- console.log(` ${RED}→${RESET} ${violation}`);- }- }- }-- console.log('\n' + '='.repeat(60));-- if (hasViolations) {- console.log(`\n${RED}🚫 VALIDATION FAILED${RESET}\n`);- console.log('Protected files contain content that should not be in public PAI.');- console.log('\n' + YELLOW + 'Common fixes:' + RESET);- console.log(' 1. Remove API keys and secrets');- console.log(' 2. Remove personal email addresses');- console.log(' 3. Remove references to private Kai data');- console.log(' 4. Ensure PAI-specific files reference "PAI" not "Kai"');- console.log('\n📖 See .pai-protected.json for details\n');- process.exit(1);- } else {- console.log(`\n${GREEN}✅ All protected files validated successfully!${RESET}\n`);- console.log('Safe to commit to PAI repository.\n');- process.exit(0);- }-}--main();diff --git a/lifeos-logo-full.png b/images/lifeos-logo-full.pngsimilarity index 100%rename from lifeos-logo-full.pngrename to images/lifeos-logo-full.png