@writepanda/mcp 1.92.0 → 1.98.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/server.mjs +90 -11
  2. package/package.json +1 -1
package/bin/server.mjs CHANGED
@@ -155,6 +155,26 @@ const TOOLS = [
155
155
  inputSchema: { type: "object", properties: {} },
156
156
  command: "system.status",
157
157
  },
158
+ {
159
+ name: "agent_session_list",
160
+ description:
161
+ "List the embedded in-app agent's opencode sessions (id, title, created/updated timestamps). Observational only — never starts the agent server; returns running:false when it isn't up. Use before agent_session_stop to find the session to kill.",
162
+ inputSchema: { type: "object", properties: {} },
163
+ command: "agent.session-list",
164
+ },
165
+ {
166
+ name: "agent_session_stop",
167
+ description:
168
+ "Abort an in-app agent session by id (from agent_session_list), or every session with all:true. Stops that session's tool execution immediately; the transcript survives for replay. The kill switch for a runaway/ghost in-app agent session.",
169
+ inputSchema: {
170
+ type: "object",
171
+ properties: {
172
+ sessionId: { type: "string", description: "Session id to abort." },
173
+ all: { type: "boolean", description: "Abort every session instead of one." },
174
+ },
175
+ },
176
+ command: "agent.session-stop",
177
+ },
158
178
  {
159
179
  name: "system_list_commands",
160
180
  description:
@@ -834,7 +854,7 @@ const TOOLS = [
834
854
  {
835
855
  name: "project_add_motion_graphic",
836
856
  description:
837
- "Drop a motion-graphic MP4/WebM onto the timeline. PREFERRED: pass `fromJob` (the jobId from motion_render_html / motion_generate / motion_concat) — the server resolves the outputPath internally, so you never handle the path string at all. Fallback: pass `file` (an absolute path) only for external/uploaded files. **Defaults to a `bundled:sound/mouse-click` SFX as the graphic appears** — pass `soundUrl: null` to make it silent, or any other `bundled:sound/<id>` to swap the sound.",
857
+ "Drop a motion-graphic MP4/WebM onto the timeline. PREFERRED: pass `fromJob` (the jobId from motion_render_html / motion_generate / motion_concat) — the server resolves the outputPath internally, so you never handle the path string at all. Fallback: pass `file` (an absolute path) only for external/uploaded files. Also accepts `file: 'bundled:transition/<id>'` (ids from asset_list_transitions) — the house-opener pattern: a bundled transition placed as an overlay auto-stamps transitionId so it COVER-fits any canvas (a 16:9 sweep fills a 9:16 frame) and carries its SFX via soundUrl. **Defaults to a `bundled:sound/mouse-click` SFX as the graphic appears** — pass `soundUrl: null` to make it silent, or any other `bundled:sound/<id>` to swap the sound.",
838
858
  inputSchema: {
839
859
  type: "object",
840
860
  properties: {
@@ -1281,6 +1301,60 @@ const TOOLS = [
1281
1301
  },
1282
1302
  command: "project.render-frame",
1283
1303
  },
1304
+ {
1305
+ name: "project_render_sheet",
1306
+ description:
1307
+ "Render N preview frames sampled across an edited-time range and tile them into ONE contact-sheet PNG (row-major grid). THE verification tool for pacing and motion: one call + one image read shows caption changes, zoom ramps, overlay mutations, and dead stretches — use this instead of N sequential project_render_frame calls. Returns { sheetPath, cols, rows, frames: [{index,row,col,atMs,timeMs,path}] }; per-cell timestamps come from the frames array (cell k = frames[k], left-to-right then top-to-bottom). Every frame's seek is verified — no stale frames. If tiling is unavailable, sheetPath is null and frames[].path are readable individually.",
1308
+ inputSchema: {
1309
+ type: "object",
1310
+ properties: {
1311
+ id: { type: "string" },
1312
+ path: { type: "string" },
1313
+ fromMs: { type: "number", description: "Range start, edited ms. Default 0." },
1314
+ toMs: { type: "number", description: "Range end, edited ms. Default: edited end." },
1315
+ count: { type: "number", description: "Frames sampled evenly. Default 12, max 24." },
1316
+ cols: { type: "number", description: "Grid columns. Default 4." },
1317
+ outPath: { type: "string", description: "Optional sheet PNG output path." },
1318
+ },
1319
+ },
1320
+ command: "project.render-sheet",
1321
+ },
1322
+ {
1323
+ name: "project_apply_edit_plan",
1324
+ description:
1325
+ 'Apply a whole editing plan in ONE call: a JSON array of timeline ops, applied atomically (single read, all ops, single save; any invalid op aborts with nothing written). Supported ops: {"op":"add-trim","startMs","endMs"} | {"op":"add-zoom","atMs","durationMs","depth?","focusX?","focusY?","soundUrl?","anchorSourceMs?"} | {"op":"add-speed","startMs","endMs","speed"}. ALWAYS prefer this over sequential project_add_trim/zoom/speed calls when executing a beat map — it replaces 20+ round-trips with one.',
1326
+ inputSchema: {
1327
+ type: "object",
1328
+ properties: {
1329
+ id: { type: "string" },
1330
+ path: { type: "string" },
1331
+ plan: {
1332
+ type: "string",
1333
+ description:
1334
+ 'JSON array of ops, e.g. [{"op":"add-trim","startMs":1000,"endMs":1400},{"op":"add-zoom","atMs":5000,"durationMs":2500,"depth":2}]',
1335
+ },
1336
+ expectedRevision: { type: "number" },
1337
+ },
1338
+ required: ["plan"],
1339
+ },
1340
+ command: "project.apply-edit-plan",
1341
+ },
1342
+ {
1343
+ name: "audio_probe",
1344
+ description:
1345
+ 'EARS without exporting: per-clip audio stats from the export-relevant track (cleanedAudioPath when present, else source). Returns hasAudio, mean/max volume (dB), detected silence spans (clip-SOURCE time), and the project audio overlays (music beds) — verify "is there dead air / is the level sane / did my music land" before export. Synchronous, a few seconds per clip.',
1346
+ inputSchema: {
1347
+ type: "object",
1348
+ properties: {
1349
+ id: { type: "string" },
1350
+ path: { type: "string" },
1351
+ clipId: { type: "string", description: "Optional — probe only this clip." },
1352
+ noiseDb: { type: "number", description: "Silence threshold dBFS. Default -30." },
1353
+ minSilenceSec: { type: "number", description: "Min silence to report, sec. Default 0.5." },
1354
+ },
1355
+ },
1356
+ command: "audio.probe",
1357
+ },
1284
1358
  {
1285
1359
  name: "project_set_region_sound",
1286
1360
  description:
@@ -1460,7 +1534,8 @@ const TOOLS = [
1460
1534
  },
1461
1535
  expectedRevision: {
1462
1536
  type: "number",
1463
- description: "Revision from your last project_read. Strongly recommended in overwrite mode.",
1537
+ description:
1538
+ "Revision from your last project_read. Strongly recommended in overwrite mode.",
1464
1539
  },
1465
1540
  },
1466
1541
  },
@@ -1589,7 +1664,7 @@ const TOOLS = [
1589
1664
  {
1590
1665
  name: "project_update_region",
1591
1666
  description:
1592
- "Patch fields on an existing region without replacing it. Accepts any subset of the region's own properties — only the supplied fields are changed, everything else is preserved. Works on zoom (depth, focusX, focusY, focusMode: 'static'|'auto' — set 'auto' for the cursor-follow camera), trim (startMs, endMs), speed (startMs, endMs, speed), fx (atMs, durationMs, opacity, blendMode, speed), annotation, overlay, clip-transform (startMs, endMs, preset, transitionMs), and audio-overlay (startMs, endMs, sourceStartMs, volume — lets you drag-trim an audio overlay without removing it). Time shifts on a link-grouped region (e.g. one half of a designed segment) propagate to every peer in the group so the pair stays coherent.",
1667
+ "Patch fields on an existing region without replacing it. Accepts any subset of the region's own properties — only the supplied fields are changed, everything else is preserved. Overlay geometry (x/y/width/height) is PERCENT of canvas 0-100; values <= 1 are treated as 0-1 fractions and scaled. Works on zoom (depth, focusX, focusY, focusMode: 'static'|'auto' — set 'auto' for the cursor-follow camera), trim (startMs, endMs), speed (startMs, endMs, speed), fx (atMs, durationMs, opacity, blendMode, speed), annotation, overlay, clip-transform (startMs, endMs, preset, transitionMs), and audio-overlay (startMs, endMs, sourceStartMs, volume — lets you drag-trim an audio overlay without removing it). Time shifts on a link-grouped region (e.g. one half of a designed segment) propagate to every peer in the group so the pair stays coherent.",
1593
1668
  inputSchema: {
1594
1669
  type: "object",
1595
1670
  properties: {
@@ -2012,7 +2087,7 @@ const TOOLS = [
2012
2087
  {
2013
2088
  name: "transcript_get",
2014
2089
  description:
2015
- "Return the merged edited-time transcript: every word with id, text, startMs, endMs in EDITED-TIMELINE coordinates. Use word IDs as input to transcript_delete_words. For a PODCAST composite, each word also carries `speaker` ('host' = speaker 1 / mediaPath, 'guest' = speaker 2 / webcamPath) — use these spans to drive project_set_clip_layout (cut to whoever is talking).",
2090
+ "Return the merged transcript. Each word carries BOTH time bases: startMs/endMs are SOURCE time (the raw recording; use for anchorSourceMs), and editedStartMs/editedEndMs are EDITED-timeline time with trims/speeds applied (null = the word sits inside a trim). Read the base you need; no conversion calls required. Word IDs feed transcript_delete_words. For a PODCAST composite, each word also carries `speaker` ('host' = speaker 1 / mediaPath, 'guest' = speaker 2 / webcamPath) — use these spans to drive project_set_clip_layout (cut to whoever is talking).",
2016
2091
  inputSchema: {
2017
2092
  type: "object",
2018
2093
  properties: {
@@ -2100,7 +2175,7 @@ const TOOLS = [
2100
2175
  {
2101
2176
  name: "transcript_find_issues",
2102
2177
  description:
2103
- "Scan the transcript for editorial problems the speaker created and recovered from: **duplicate-take** (a line re-recorded later — keep the cleaner second take, cut the first), **false-start** (an abandoned fragment before a restart), and **adjacent-repeat** (a stutter like 'the the'). Returns candidate `issues`, each with `type`, `severity`, the `wordIds` of the DISCARDED attempt (pass straight to transcript.delete-words), the edited-time span, the offending `text`, and a `note` explaining what's kept. CONSERVATIVE and read-only — it never edits; review each candidate against context before deleting, since some repeats are intentional. Run this after transcribe + remove-fillers as the content-cleanup pass. Filter with `types` (comma-separated) and cap with `limit`.",
2178
+ "Scan the transcript for editorial problems the speaker created and recovered from: **duplicate-take** (a line re-recorded later — keep the cleaner second take, cut the first), **false-start** (an abandoned fragment before a restart), and **adjacent-repeat** (a stutter like 'the the'). Returns candidate `issues`, each with `type`, `severity`, the `wordIds` of the DISCARDED attempt (pass straight to transcript.delete-words), the edited-time span, the offending `text`, and a `note` explaining what's kept. CONSERVATIVE and read-only — it never edits. Deliberate parallel structure ('one for transcription, one for outreach') is NOT flagged as a false start, and lone stopword repeats across pause tokens are skipped. A `severity: \"low\"` false-start is a REVIEW candidate (the restart diverges from the fragment — possibly an intentional list): KEEP it by default unless context clearly shows a flubbed take. Review every candidate against context before deleting. Run this after transcribe + remove-fillers as the content-cleanup pass. Filter with `types` (comma-separated) and cap with `limit`.",
2104
2179
  inputSchema: {
2105
2180
  type: "object",
2106
2181
  properties: {
@@ -2119,7 +2194,7 @@ const TOOLS = [
2119
2194
  {
2120
2195
  name: "transcript_find_replace",
2121
2196
  description:
2122
- "Find the first occurrence of a phrase in the transcript and replace it with new text. Useful for correcting mis-transcribed names, technical terms, or brand names without re-transcribing. Returns { matched, replacements } — matched is false if the phrase wasn't found.",
2197
+ "Find every occurrence of a phrase in the transcript and replace it with new text. Useful for correcting mis-transcribed names, technical terms, or brand names without re-transcribing. Timing is preserved — only the displayed/exported text changes. Returns { replacedCount, wordsPatched }; replacedCount is 0 if the phrase wasn't found.",
2123
2198
  inputSchema: {
2124
2199
  type: "object",
2125
2200
  properties: {
@@ -2128,7 +2203,7 @@ const TOOLS = [
2128
2203
  find: {
2129
2204
  type: "string",
2130
2205
  description:
2131
- 'Phrase to search for. Case-insensitive; digits and punctuation are ignored on both sides, so "than60" and "than" both match the word "than60". A pure-number/punctuation phrase can\'t be targeted (it normalizes to empty) — include a letter word.',
2206
+ 'Phrase to search for. Case-insensitive; punctuation is ignored. Digits are SIGNIFICANT when the phrase contains them ("try30" matches only the token "try30") and ignored otherwise ("than" also matches "than60"). A multi-word phrase also matches a single merged STT token ("Wispr Flow" as one token; "of $499" matches "of$499"), and a phrase equal to a token\'s raw text always matches — so space/digit/punctuation-bearing tokens (even pure numbers like "30%") are all targetable.',
2132
2207
  },
2133
2208
  replace: { type: "string", description: "Replacement text (replaces the whole phrase)" },
2134
2209
  expectedRevision: { type: "number" },
@@ -2222,7 +2297,7 @@ const TOOLS = [
2222
2297
  {
2223
2298
  name: "caption_set_style",
2224
2299
  description:
2225
- "Override specific style properties of the caption overlay without changing the template. All fields are optional — pass only what you want to change. positionY controls vertical placement (0=top, 100=bottom, default 85). fontFamily sets the caption font (a system font like 'Georgia' or a loaded custom font; unloaded fonts fall back). fontSize is in REM (e.g. '2.6rem'), matching the editor's Font size slider; it is clamped to 1.0–5.0rem (a px value is converted to rem), so you can't exceed the editor's max.",
2300
+ "Override specific style properties of the caption overlay without changing the template. All fields are optional — pass only what you want to change. positionY controls vertical placement in PERCENT of frame height (0=top, 100=bottom, default 85; a 0-1 fraction like 0.85 is auto-converted to percent). fontFamily sets the caption font (a system font like 'Georgia' or a loaded custom font; unloaded fonts fall back). fontSize is in REM (e.g. '2.6rem'), matching the editor's Font size slider; it is clamped to 1.0–5.0rem (a px value is converted to rem), so you can't exceed the editor's max.",
2226
2301
  inputSchema: {
2227
2302
  type: "object",
2228
2303
  properties: {
@@ -2232,7 +2307,11 @@ const TOOLS = [
2232
2307
  type: "number",
2233
2308
  description: "Max words shown at once. Default varies by template.",
2234
2309
  },
2235
- positionY: { type: "number", description: "Vertical position 0-100. Default 85." },
2310
+ positionY: {
2311
+ type: "number",
2312
+ description:
2313
+ "Vertical position as percent of frame height from the top (0-100). Default 85. Fractions \u2264 1.0 (e.g. 0.85) are treated as 0-1 and converted to percent.",
2314
+ },
2236
2315
  fontFamily: {
2237
2316
  type: "string",
2238
2317
  description:
@@ -2384,7 +2463,7 @@ const TOOLS = [
2384
2463
  {
2385
2464
  name: "motion_generate",
2386
2465
  description:
2387
- "Render a bundled template by id with your own slot values (text, colors, list items) and a background mode, then add the result to the timeline with project_add_motion_graphic (or project_add_designed_segment for split-panel). Async — returns { jobId, outputPath }; call job_wait, then pass that jobId as `fromJob` to the add tool. Discover templates + slots with motion_list. Prefer this over motion_render_html whenever a bundled template fits the brief — it's faster and already designed.",
2466
+ "Render a bundled template by id with your own slot values (text, colors, list items) and a background mode, then add the result to the timeline with project_add_motion_graphic (or project_add_designed_segment for split-panel). Async — returns { jobId, outputPath }; call job_wait, then pass that jobId as `fromJob` to the add tool. Discover templates + slots with motion_list. Prefer this over motion_render_html whenever a bundled template fits the brief — it's faster and already designed. The same automatic quality gates as motion_render_html apply (pre-render contract lint; STATIC_RENDER on frozen output).",
2388
2467
  inputSchema: {
2389
2468
  type: "object",
2390
2469
  properties: {
@@ -2457,7 +2536,7 @@ const TOOLS = [
2457
2536
  {
2458
2537
  name: "motion_render_html",
2459
2538
  description:
2460
- "Render arbitrary HTML/CSS/JS to video via the HyperFrames engine — frame-perfect, seekable capture through chrome-headless-shell's BeginFrame API. Use this when the bundled motion-graphic templates don't fit the brief. The HTML MUST expose a paused GSAP timeline registered as `window.__timelines[<data-composition-id>] = tl` — NOT CSS keyframes, NOT setTimeout, NOT `window.__hf.seek` (that lower-level protocol skips the compositor invalidation wrapper and renders with 1-second stalls). See the SKILL.md `Custom motion graphics — HTML authoring` section for the required `data-composition-id`/`data-width`/`data-height`/`data-duration` root element, the canonical template, and pacing rules. Pass either inline `html` or `htmlPath`. Set `transparent: true` for a WebM+alpha overlay (lower thirds, watermarks). IMPORTANT: renders are sequential — call job_wait to completion before starting another render, or you'll get a RENDER_BUSY error. Async — returns { jobId, outputPath }; poll job_wait for the final file.",
2539
+ "Render arbitrary HTML/CSS/JS to video via the HyperFrames engine — frame-perfect, seekable capture through chrome-headless-shell's BeginFrame API. Use this when the bundled motion-graphic templates don't fit the brief. The HTML MUST expose a paused GSAP timeline registered as `window.__timelines[<data-composition-id>] = tl` — NOT CSS keyframes, NOT setTimeout, NOT `window.__hf.seek` (that lower-level protocol skips the compositor invalidation wrapper and renders with 1-second stalls). See the SKILL.md `Custom motion graphics — HTML authoring` section for the required `data-composition-id`/`data-width`/`data-height`/`data-duration` root element, the canonical template, and pacing rules. Pass either inline `html` or `htmlPath`. Set `transparent: true` for a WebM+alpha overlay (lower thirds, watermarks). Renders queue automatically and execute serially in submission order — fire multiple renders back-to-back without waiting, then job_wait each. RENDER_BUSY appears only past a 16-deep runaway ceiling. Two automatic quality gates apply: a pre-render lint rejects contract violations (unpaused timeline, repeat:-1, Math.random, missing __timelines registration, shadow/blur radii over 500px), and a post-render check fails any clip frozen for 90%+ of its duration with STATIC_RENDER (fix the composition; never place a gated clip). Async — returns { jobId, outputPath }; poll job_wait for the final file.",
2461
2540
  inputSchema: {
2462
2541
  type: "object",
2463
2542
  properties: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@writepanda/mcp",
3
- "version": "1.92.0",
3
+ "version": "1.98.0",
4
4
  "description": "Model Context Protocol server for PandaStudio. Exposes the desktop video editor's automation surface to Cursor, Continue, Cline, Claude Desktop, and any MCP-compliant client.",
5
5
  "keywords": [
6
6
  "pandastudio",