Skip to content

Latest commit

 

History

History
113 lines (81 loc) · 5.21 KB

File metadata and controls

113 lines (81 loc) · 5.21 KB

PAI v4.0.2 — Bug Fix Patch

13 surgical fixes: Linux compatibility, performance, installer, statusline, hooks.

Skills Categories Hooks Workflows Tips Algorithm


What Changed

Pure bug-fix release — no new features, no breaking changes. All fixes are surgical (1–8 lines each).

Installer Fixes

Issue Fix
#825 pai alias pointed to removed skills/PAI/Tools/pai.ts — corrected to PAI/Tools/pai.ts
#757 Alias written to .zshrc only — now detects $SHELL and writes to .bashrc, .config/fish/config.fish, or .zshrc
#755 Installer hardcoded --mode gui — now auto-detects headless/SSH and falls back to CLI mode

Statusline Fixes

Issue Fix
#747 Terminal width dropped on re-render — added persistent width cache to prevent mini mode flicker
#819 ALG field always showed UpdateCounts.ts now extracts algorithm version from CLAUDE.md
#849 OAuth token extraction was macOS-only — now reads ~/.claude/.credentials.json on Linux
#849 tr ' ' '─' produced garbled output on GNU coreutils — replaced with sed 's/ /─/g'

Hook Fixes

Issue Fix
#832 DocCrossRefIntegrity ran inference unconditionally — now skips when 0 drift detected (saves ~15s/response)
#767 WorkCompletionLearning .pop() always returned agents_spawned — replaced with tracked lineageSubKey
#769 Dead TrendingAnalysis.ts reference — removed constant, function, and all 4 call sites
#772 Explicit ratings missing source field — added 'explicit' to union type
#768 LoadContext exited with code 1 on error — changed to exit 0 (non-fatal, don't block startup)
#766 DocCrossRefIntegrity used hardcoded voice ID — now reads from getIdentity().mainDAVoiceID

Files Changed (from v4.0.1)

File Fixes
PAI-Install/engine/actions.ts #825 (alias path), #757 (shell detection)
PAI-Install/install.sh #755 (headless CLI fallback)
statusline-command.sh #747 (width cache), #849 (OAuth cross-platform, sed for multibyte)
hooks/handlers/UpdateCounts.ts #819 (algorithmVersion), #849 (OAuth cross-platform)
hooks/handlers/DocCrossRefIntegrity.ts #832 (inference guard), #766 (voice ID from config)
hooks/WorkCompletionLearning.hook.ts #767 (lineageSubKey tracking)
hooks/RatingCapture.hook.ts #769 (dead code removal), #772 (source field)
hooks/LoadContext.hook.ts #768 (exit 0)

Installation

Fresh Install

git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git
cd Personal_AI_Infrastructure/Releases/v4.0.2

cp -r .claude ~/ && cd ~/.claude && bash install.sh

Upgrading from v4.0.0 or v4.0.1

# 1. Back up
cp -r ~/.claude ~/.claude-backup-$(date +%Y%m%d)

# 2. Clone and copy
git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git
cd Personal_AI_Infrastructure/Releases/v4.0.2
cp -r .claude ~/

# 3. Run the installer
cd ~/.claude && bash install.sh

# 4. Rebuild CLAUDE.md
bun ~/.claude/PAI/Tools/BuildCLAUDE.ts

Quick Manual Upgrade (from v4.0.1)

If you just want the bug fixes without re-running the installer, copy these files from this release over your existing ones:

  • statusline-command.sh — width cache, OAuth cross-platform, GNU tr fix
  • hooks/handlers/DocCrossRefIntegrity.ts — inference guard, voice ID from config
  • hooks/handlers/UpdateCounts.ts — algorithmVersion, OAuth cross-platform
  • hooks/WorkCompletionLearning.hook.ts — lineageSubKey fix
  • hooks/RatingCapture.hook.ts — dead code removal, source field
  • hooks/LoadContext.hook.ts — exit 0 on error
  • PAI-Install/install.sh — headless/SSH auto-detection
  • PAI-Install/engine/actions.ts — alias path fix, shell detection

Upgrading from Older Versions

See the main README for the general upgrade procedure. The installer auto-detects existing installations regardless of which version you're upgrading from.