feat(mcp): add read_live_metrics tool + bump joserfc (Dependabot #25)#40
Merged
Conversation
Reads the Phantom Studio plugin's 2 Hz JSON metrics snapshots from PHANTOM_METRICS_DIR (default ~/Library/PhantomStudio/metrics on macOS) and returns the newest or a specific instance's snapshot with age and staleness. Does its own realpath containment since it bypasses load_audio's sandbox: instance ids are pattern-validated and symlinks resolving outside the metrics dir are never followed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PVuJ8YPjPJRvGTkT2mnZM4
Dependabot alert #25 (CVE-2026-48990, medium): b64=false RFC7797 JWS payloads could bypass JWSRegistry payload-size limits during deserialization. Transitive via authlib; patched from 1.6.7. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PVuJ8YPjPJRvGTkT2mnZM4
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.
What
read_live_metrics(18 tools now): reads the Phantom Studio plugin's 2 Hz Phantom Link metrics snapshots fromPHANTOM_METRICS_DIR(default~/Library/PhantomStudio/metricson macOS) and returns the newest — or a specific instance's — snapshot with age and staleness. This is the grounding tool for the Phantom Studio AI companion (Phase 1).joserfc1.6.4 → 1.7.2 for GHSA-wphv-vfrh-23q5 / CVE-2026-48990 (Dependabot alert docs: update README with new tools, CLI commands, and config options #25, medium — RFC7797b64=falseJWS payload-size-limit bypass).Security notes
read_live_metricsbypassesload_audio's sandbox, so it does its own containment: the metrics dir is realpath-resolved, instance ids are pattern-validated ([A-Za-z0-9_-]+), and symlinks resolving outside the dir are never followed. Musician-friendlyPhantomErrors throughout.Tests
15 new tests in
tests/test_live_metrics.py(fresh/stale snapshots, newest-wins, specific instance, missing/empty dir, traversal + symlink-escape rejection, corrupt JSON, MCP surface via in-memory client). Full suite: 984 passed, 44 skipped. Error-schema consistency test extended for the new tool.🤖 Generated with Claude Code
https://claude.ai/code/session_01PVuJ8YPjPJRvGTkT2mnZM4