Skip to content

feat: add MCP prompts and session resources (#126) - #149

Merged
TMHSDigital merged 1 commit into
mainfrom
feat/prompts-resources-126
Oct 24, 2026
Merged

TMHSDigital merged 1 commit into
mainfrom
feat/prompts-resources-126

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Closes #126.

Prompts (src/prompts.ts)

Four workflows clients surface as slash commands; each returns one user message that spells out the tool sequence, with the arguments filled in:

  • bug-repro-clip {target?, notes?}: record → scene frames to find the moment → find_text secret check + redact_region → trim/clip → callout → export_gif under 10 MB.
  • demo-gif {target?, maxMB?}: record → contact_sheet to pick the stretch → trim → export_gif (falling back to WebP).
  • verify-ui-change {target?, expectation?}: screenshot → change → wait_for_change settle → screen_diff → find_text for expected text.
  • review-recording {path}: get_media_info → contact_sheet → scene frames → timestamped summary.

Resources (src/resources.ts)

  • screencast://sessions: every session (JSON).
  • screencast://sessions/{id}: one record, plus fileExists; listable through the template's list callback.
  • screencast://sessions/{id}/poster: a JPEG frame from the middle of the recording (blob), so a client can show or attach a recording with no filesystem tool.
  • SessionStore.onChange() (listener after each write) → server.sendResourceListChanged() when connected, so clients refresh as recordings start and stop.

Tests

  • promptsResources.test.ts: a real MCP client over InMemoryTransport (runs in CI on any OS): lists the prompts, fills arguments, every tool a prompt names exists in mcp-tools.json, sessions appear as resources, list_changed arrives on a write, reading a record works, and a missing poster or session errors clearly.
  • Live harness (Windows): a real recording's poster resource is a JPEG. 15/15.
  • Full suite passes.

Version 0.23.0; README (new "Prompts and resources" section), CHANGELOG.

🤖 Generated with Claude Code

Four workflow prompts (bug-repro-clip, demo-gif, verify-ui-change,
review-recording) that clients surface as slash commands, and session
resources (list, per-session JSON, JPEG poster) with resources/list_changed
sent when a recording starts or stops.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@TMHSDigital
TMHSDigital merged commit 89c7edd into main Oct 24, 2026
8 checks passed
@TMHSDigital
TMHSDigital deleted the feat/prompts-resources-126 branch October 24, 2026 21:56
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.

Expose recordings as MCP resources and ship MCP prompts for common workflows

1 participant