Align Packs/ source PAI/Tools → PAI/TOOLS to match shipped v5 runtime dir (case-sensitive Linux)#1336
Open
Oliver-Liu99 wants to merge 1 commit into
Open
Conversation
…e dir The v5 runtime tools directory is canonically PAI/TOOLS/ (all-caps): the installer alias, settings.json, CLAUDE.md, and the entire shipped Releases/v5.0.0 tree use PAI/TOOLS/, and the v5 graders / Telos chat route already import from PAI/TOOLS/. However 10 source files under Packs/ still referenced the legacy lowercase PAI/Tools/ from v4. The release builder silently rewrites Tools->TOOLS on packaging, so shipped v5 is fine, but the source tree diverges: on case-sensitive filesystems (Linux, WSL2) these Packs paths fail to resolve when run directly, while case-insensitive macOS masks it. This is the source-side half of issue danielmiessler#1324. Scope: only the literal 'PAI/Tools/' runtime-tools token is rewritten; skill-level <Skill>/Tools/, DOCUMENTATION/Tools/, and the repo-root Tools/ dir are intentionally left untouched. No directory rename / git mv needed (physical dir is already TOOLS). Verified case-exact via git ls-files against Releases/v5.0.0. Refs danielmiessler#1324 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites the 10 remaining
Packs/source files that still reference the runtime tools directory with the legacy lowercasePAI/Tools/so they match the canonical all-capsPAI/TOOLS/used everywhere else in v5. This is the source-side half of #1324.Root cause (corrects the issue framing)
I investigated #1324 and the shipped release is not actually broken on Linux today:
/usr/local/bin/paishim — it's a singlealias pai='bun .../PAI/TOOLS/pai.ts'line, and the v5 installer already emits the correctTOOLScasing (and strips stale aliases on reinstall).Releases/v5.0.0/tree is self-consistent onPAI/TOOLS/(zero lowercasePAI/Tools/references inside it). The shipped graders import../../../../PAI/TOOLS/Inference.tsand the Telos chat route spawns~/.claude/PAI/TOOLS/Inference.ts.The real defect is a source/release divergence: the casing convention changed v4 (
PAI/Tools) → v5 (PAI/TOOLS), the release builder rewritesTools→TOOLSon packaging (so shipped output is correct), but 10 upstreamPacks/source files were never back-ported. On case-insensitive macOS/APFS every path resolves to the one physical dir, masking it; on case-sensitive Linux/ext4 (incl. WSL2) the lowercase references fail to resolve when the source is run directly.Changes (12 references, 10 files — all
PAI/Tools/→PAI/TOOLS/)Packs/Telos/.../api/chat/route.ts(spawnsInference.ts); 3 Evals model-graders importPAI/TOOLS/Inference(LLMRubric,NaturalLanguageAssert,PairwiseComparison).PAIUpgrade/Workflows/{Upgrade,AlgorithmUpgrade}.md,Media/.../Art/Workflows/{Essay,Mermaid,Visualize}.md.Utilities/src/Fabric/SKILL.md.Scope / safety
PAI/Tools/runtime-tools token is rewritten. The three legitimately capital-TTools/families — skill-level<Skill>/Tools/,PAI/DOCUMENTATION/Tools/, and the repo-rootTools/— are intentionally untouched.git mvneeded: the physical dir is alreadyTOOLS. Verified case-exact viagit ls-filesagainstReleases/v5.0.0/(immune to the macOS case-insensitivity that hides this bug). After the change,grep -rn 'PAI/Tools/' Packs/is empty.TOOLSalready matches the physical dir.Suggested follow-ups (intentionally not bundled here, to keep this PR focused)
grep -rn 'PAI/Tools/' Packs/ Releases/$LATEST/is non-empty, to stop the source/release divergence from silently reappearing.skills/_PAI/Tools/ShadowRelease.ts, not in this public tree) currently relies on a build-timeTools→TOOLSrewrite; back-porting thesePacks/edits makes the source canonical so the build no longer has to paper over it..pai-protected.jsoncould add aReleases/*/.claude/PAI/TOOLS/*.tsglob (the v5 runtime tools dir is currently unprotected by name).Refs #1324