Skip to content

feat(mcp): add read_live_metrics tool + bump joserfc (Dependabot #25)#40

Merged
leesaenz merged 2 commits into
mainfrom
feature/read-live-metrics
Jul 5, 2026
Merged

feat(mcp): add read_live_metrics tool + bump joserfc (Dependabot #25)#40
leesaenz merged 2 commits into
mainfrom
feature/read-live-metrics

Conversation

@leesaenz

@leesaenz leesaenz commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

What

  • New MCP tool read_live_metrics (18 tools now): reads the Phantom Studio plugin's 2 Hz Phantom Link 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. This is the grounding tool for the Phantom Studio AI companion (Phase 1).
  • Security fix: bump transitive joserfc 1.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 — RFC7797 b64=false JWS payload-size-limit bypass).

Security notes

read_live_metrics bypasses load_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-friendly PhantomErrors 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

leesaenz and others added 2 commits July 4, 2026 22:50
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
@leesaenz leesaenz merged commit 405229c into main Jul 5, 2026
11 checks passed
@leesaenz leesaenz deleted the feature/read-live-metrics branch July 5, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant