@tmhs/screencast-mcp 0.39.0 → 0.45.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 (344) hide show
  1. package/README.md +95 -17
  2. package/assets/icon.png +0 -0
  3. package/assets/ui/player.html +47 -302
  4. package/assets/ui/player.js +402 -0
  5. package/dist/context.js +0 -5
  6. package/dist/index.js +17 -21
  7. package/dist/prompts.js +18 -8
  8. package/dist/resources.js +2 -14
  9. package/dist/server.js +49 -11
  10. package/dist/tools/addMarker.js +89 -0
  11. package/dist/tools/assembleHighlights.js +12 -7
  12. package/dist/tools/backdrop.js +89 -0
  13. package/dist/tools/bugReport.js +266 -0
  14. package/dist/tools/burnSubtitles.js +12 -6
  15. package/dist/tools/callout.js +32 -16
  16. package/dist/tools/chapters.js +156 -0
  17. package/dist/tools/clip.js +12 -9
  18. package/dist/tools/compress.js +10 -5
  19. package/dist/tools/concat.js +16 -15
  20. package/dist/tools/contactSheet.js +39 -33
  21. package/dist/tools/convert.js +12 -6
  22. package/dist/tools/crop.js +12 -7
  23. package/dist/tools/cutIdle.js +15 -9
  24. package/dist/tools/denoise.js +12 -6
  25. package/dist/tools/doctor.js +133 -0
  26. package/dist/tools/exportGif.js +14 -10
  27. package/dist/tools/exportPreset.js +11 -8
  28. package/dist/tools/extractAudio.js +10 -8
  29. package/dist/tools/findText.js +52 -98
  30. package/dist/tools/getMediaInfo.js +17 -3
  31. package/dist/tools/getSession.js +15 -3
  32. package/dist/tools/keystrokeOverlay.js +131 -0
  33. package/dist/tools/listAudioDevices.js +14 -7
  34. package/dist/tools/listSessions.js +13 -3
  35. package/dist/tools/listTargets.js +76 -0
  36. package/dist/tools/musicBed.js +14 -10
  37. package/dist/tools/normalizeAudio.js +12 -8
  38. package/dist/tools/overlay.js +16 -12
  39. package/dist/tools/pipeline.js +86 -25
  40. package/dist/tools/readEvents.js +21 -12
  41. package/dist/tools/redactRegion.js +19 -17
  42. package/dist/tools/reframe.js +9 -5
  43. package/dist/tools/reviewRecording.js +75 -22
  44. package/dist/tools/sampleFrames.js +33 -40
  45. package/dist/tools/saveReplay.js +90 -0
  46. package/dist/tools/scale.js +9 -3
  47. package/dist/tools/screenDiff.js +23 -17
  48. package/dist/tools/screenshot.js +21 -17
  49. package/dist/tools/speed.js +15 -4
  50. package/dist/tools/startRecording.js +96 -59
  51. package/dist/tools/stopRecording.js +35 -10
  52. package/dist/tools/titleCard.js +19 -11
  53. package/dist/tools/transcribe.js +13 -7
  54. package/dist/tools/trim.js +11 -10
  55. package/dist/tools/waitForChange.js +37 -22
  56. package/dist/tools/xfadeTransition.js +12 -8
  57. package/dist/tools/zoom.js +26 -29
  58. package/dist/utils/anim.js +1 -21
  59. package/dist/utils/animExport.js +5 -10
  60. package/dist/utils/audio.js +4 -33
  61. package/dist/utils/audioDevices.js +1 -48
  62. package/dist/utils/backdrop.js +151 -0
  63. package/dist/utils/bugReport.js +246 -0
  64. package/dist/utils/callout.js +1 -19
  65. package/dist/utils/calloutAssets.js +21 -11
  66. package/dist/utils/capabilities.js +95 -0
  67. package/dist/utils/captions.js +9 -26
  68. package/dist/utils/chapters.js +222 -0
  69. package/dist/utils/consent.js +29 -0
  70. package/dist/utils/diff.js +0 -46
  71. package/dist/utils/errors.js +5 -13
  72. package/dist/utils/events.js +21 -77
  73. package/dist/utils/expr.js +11 -0
  74. package/dist/utils/ffmpeg.js +119 -48
  75. package/dist/utils/fontCoverage.js +177 -0
  76. package/dist/utils/fonts.js +139 -23
  77. package/dist/utils/idle.js +12 -24
  78. package/dist/utils/images.js +0 -17
  79. package/dist/utils/jobs.js +42 -41
  80. package/dist/utils/keystrokes.js +170 -0
  81. package/dist/utils/lifecycle.js +11 -31
  82. package/dist/utils/logging.js +75 -0
  83. package/dist/utils/media.js +16 -124
  84. package/dist/utils/monitors.js +7 -43
  85. package/dist/utils/ocr.js +53 -71
  86. package/dist/utils/ocrScan.js +77 -0
  87. package/dist/utils/paths.js +68 -31
  88. package/dist/utils/pipeline.js +39 -25
  89. package/dist/utils/player.js +50 -27
  90. package/dist/utils/produce.js +6 -66
  91. package/dist/utils/replay.js +278 -0
  92. package/dist/utils/resolveTarget.js +0 -19
  93. package/dist/utils/retention.js +1 -15
  94. package/dist/utils/roots.js +42 -0
  95. package/dist/utils/sessions.js +195 -160
  96. package/dist/utils/sheet.js +0 -19
  97. package/dist/utils/still.js +0 -15
  98. package/dist/utils/targetList.js +63 -0
  99. package/dist/utils/targets.js +5 -70
  100. package/dist/utils/toolSpec.js +25 -0
  101. package/dist/utils/toolsets.js +122 -0
  102. package/dist/utils/validate.js +0 -22
  103. package/dist/utils/wgc.js +0 -46
  104. package/dist/utils/windows.js +5 -50
  105. package/dist/utils/zoom.js +55 -85
  106. package/dist/wgcRecorder.js +1 -30
  107. package/package.json +7 -3
  108. package/dist/context.d.ts +0 -9
  109. package/dist/context.d.ts.map +0 -1
  110. package/dist/context.js.map +0 -1
  111. package/dist/index.d.ts +0 -3
  112. package/dist/index.d.ts.map +0 -1
  113. package/dist/index.js.map +0 -1
  114. package/dist/prompts.d.ts +0 -10
  115. package/dist/prompts.d.ts.map +0 -1
  116. package/dist/prompts.js.map +0 -1
  117. package/dist/resources.d.ts +0 -3
  118. package/dist/resources.d.ts.map +0 -1
  119. package/dist/resources.js.map +0 -1
  120. package/dist/server.d.ts +0 -3
  121. package/dist/server.d.ts.map +0 -1
  122. package/dist/server.js.map +0 -1
  123. package/dist/tools/assembleHighlights.d.ts +0 -3
  124. package/dist/tools/assembleHighlights.d.ts.map +0 -1
  125. package/dist/tools/assembleHighlights.js.map +0 -1
  126. package/dist/tools/burnSubtitles.d.ts +0 -3
  127. package/dist/tools/burnSubtitles.d.ts.map +0 -1
  128. package/dist/tools/burnSubtitles.js.map +0 -1
  129. package/dist/tools/callout.d.ts +0 -37
  130. package/dist/tools/callout.d.ts.map +0 -1
  131. package/dist/tools/callout.js.map +0 -1
  132. package/dist/tools/clip.d.ts +0 -3
  133. package/dist/tools/clip.d.ts.map +0 -1
  134. package/dist/tools/clip.js.map +0 -1
  135. package/dist/tools/compress.d.ts +0 -3
  136. package/dist/tools/compress.d.ts.map +0 -1
  137. package/dist/tools/compress.js.map +0 -1
  138. package/dist/tools/concat.d.ts +0 -3
  139. package/dist/tools/concat.d.ts.map +0 -1
  140. package/dist/tools/concat.js.map +0 -1
  141. package/dist/tools/contactSheet.d.ts +0 -3
  142. package/dist/tools/contactSheet.d.ts.map +0 -1
  143. package/dist/tools/contactSheet.js.map +0 -1
  144. package/dist/tools/convert.d.ts +0 -3
  145. package/dist/tools/convert.d.ts.map +0 -1
  146. package/dist/tools/convert.js.map +0 -1
  147. package/dist/tools/crop.d.ts +0 -3
  148. package/dist/tools/crop.d.ts.map +0 -1
  149. package/dist/tools/crop.js.map +0 -1
  150. package/dist/tools/cutIdle.d.ts +0 -3
  151. package/dist/tools/cutIdle.d.ts.map +0 -1
  152. package/dist/tools/cutIdle.js.map +0 -1
  153. package/dist/tools/denoise.d.ts +0 -3
  154. package/dist/tools/denoise.d.ts.map +0 -1
  155. package/dist/tools/denoise.js.map +0 -1
  156. package/dist/tools/exportGif.d.ts +0 -3
  157. package/dist/tools/exportGif.d.ts.map +0 -1
  158. package/dist/tools/exportGif.js.map +0 -1
  159. package/dist/tools/exportPreset.d.ts +0 -3
  160. package/dist/tools/exportPreset.d.ts.map +0 -1
  161. package/dist/tools/exportPreset.js.map +0 -1
  162. package/dist/tools/extractAudio.d.ts +0 -3
  163. package/dist/tools/extractAudio.d.ts.map +0 -1
  164. package/dist/tools/extractAudio.js.map +0 -1
  165. package/dist/tools/findText.d.ts +0 -6
  166. package/dist/tools/findText.d.ts.map +0 -1
  167. package/dist/tools/findText.js.map +0 -1
  168. package/dist/tools/getMediaInfo.d.ts +0 -3
  169. package/dist/tools/getMediaInfo.d.ts.map +0 -1
  170. package/dist/tools/getMediaInfo.js.map +0 -1
  171. package/dist/tools/getSession.d.ts +0 -3
  172. package/dist/tools/getSession.d.ts.map +0 -1
  173. package/dist/tools/getSession.js.map +0 -1
  174. package/dist/tools/listAudioDevices.d.ts +0 -3
  175. package/dist/tools/listAudioDevices.d.ts.map +0 -1
  176. package/dist/tools/listAudioDevices.js.map +0 -1
  177. package/dist/tools/listSessions.d.ts +0 -3
  178. package/dist/tools/listSessions.d.ts.map +0 -1
  179. package/dist/tools/listSessions.js.map +0 -1
  180. package/dist/tools/musicBed.d.ts +0 -3
  181. package/dist/tools/musicBed.d.ts.map +0 -1
  182. package/dist/tools/musicBed.js.map +0 -1
  183. package/dist/tools/normalizeAudio.d.ts +0 -3
  184. package/dist/tools/normalizeAudio.d.ts.map +0 -1
  185. package/dist/tools/normalizeAudio.js.map +0 -1
  186. package/dist/tools/overlay.d.ts +0 -3
  187. package/dist/tools/overlay.d.ts.map +0 -1
  188. package/dist/tools/overlay.js.map +0 -1
  189. package/dist/tools/pipeline.d.ts +0 -3
  190. package/dist/tools/pipeline.d.ts.map +0 -1
  191. package/dist/tools/pipeline.js.map +0 -1
  192. package/dist/tools/readEvents.d.ts +0 -6
  193. package/dist/tools/readEvents.d.ts.map +0 -1
  194. package/dist/tools/readEvents.js.map +0 -1
  195. package/dist/tools/redactRegion.d.ts +0 -13
  196. package/dist/tools/redactRegion.d.ts.map +0 -1
  197. package/dist/tools/redactRegion.js.map +0 -1
  198. package/dist/tools/reframe.d.ts +0 -3
  199. package/dist/tools/reframe.d.ts.map +0 -1
  200. package/dist/tools/reframe.js.map +0 -1
  201. package/dist/tools/reviewRecording.d.ts +0 -5
  202. package/dist/tools/reviewRecording.d.ts.map +0 -1
  203. package/dist/tools/reviewRecording.js.map +0 -1
  204. package/dist/tools/sampleFrames.d.ts +0 -3
  205. package/dist/tools/sampleFrames.d.ts.map +0 -1
  206. package/dist/tools/sampleFrames.js.map +0 -1
  207. package/dist/tools/scale.d.ts +0 -3
  208. package/dist/tools/scale.d.ts.map +0 -1
  209. package/dist/tools/scale.js.map +0 -1
  210. package/dist/tools/screenDiff.d.ts +0 -3
  211. package/dist/tools/screenDiff.d.ts.map +0 -1
  212. package/dist/tools/screenDiff.js.map +0 -1
  213. package/dist/tools/screenshot.d.ts +0 -3
  214. package/dist/tools/screenshot.d.ts.map +0 -1
  215. package/dist/tools/screenshot.js.map +0 -1
  216. package/dist/tools/speed.d.ts +0 -3
  217. package/dist/tools/speed.d.ts.map +0 -1
  218. package/dist/tools/speed.js.map +0 -1
  219. package/dist/tools/startRecording.d.ts +0 -3
  220. package/dist/tools/startRecording.d.ts.map +0 -1
  221. package/dist/tools/startRecording.js.map +0 -1
  222. package/dist/tools/stopRecording.d.ts +0 -3
  223. package/dist/tools/stopRecording.d.ts.map +0 -1
  224. package/dist/tools/stopRecording.js.map +0 -1
  225. package/dist/tools/titleCard.d.ts +0 -3
  226. package/dist/tools/titleCard.d.ts.map +0 -1
  227. package/dist/tools/titleCard.js.map +0 -1
  228. package/dist/tools/transcribe.d.ts +0 -3
  229. package/dist/tools/transcribe.d.ts.map +0 -1
  230. package/dist/tools/transcribe.js.map +0 -1
  231. package/dist/tools/trim.d.ts +0 -3
  232. package/dist/tools/trim.d.ts.map +0 -1
  233. package/dist/tools/trim.js.map +0 -1
  234. package/dist/tools/waitForChange.d.ts +0 -3
  235. package/dist/tools/waitForChange.d.ts.map +0 -1
  236. package/dist/tools/waitForChange.js.map +0 -1
  237. package/dist/tools/xfadeTransition.d.ts +0 -3
  238. package/dist/tools/xfadeTransition.d.ts.map +0 -1
  239. package/dist/tools/xfadeTransition.js.map +0 -1
  240. package/dist/tools/zoom.d.ts +0 -15
  241. package/dist/tools/zoom.d.ts.map +0 -1
  242. package/dist/tools/zoom.js.map +0 -1
  243. package/dist/utils/anim.d.ts +0 -33
  244. package/dist/utils/anim.d.ts.map +0 -1
  245. package/dist/utils/anim.js.map +0 -1
  246. package/dist/utils/animExport.d.ts +0 -27
  247. package/dist/utils/animExport.d.ts.map +0 -1
  248. package/dist/utils/animExport.js.map +0 -1
  249. package/dist/utils/audio.d.ts +0 -49
  250. package/dist/utils/audio.d.ts.map +0 -1
  251. package/dist/utils/audio.js.map +0 -1
  252. package/dist/utils/audioDevices.d.ts +0 -33
  253. package/dist/utils/audioDevices.d.ts.map +0 -1
  254. package/dist/utils/audioDevices.js.map +0 -1
  255. package/dist/utils/callout.d.ts +0 -72
  256. package/dist/utils/callout.d.ts.map +0 -1
  257. package/dist/utils/callout.js.map +0 -1
  258. package/dist/utils/calloutAssets.d.ts +0 -3
  259. package/dist/utils/calloutAssets.d.ts.map +0 -1
  260. package/dist/utils/calloutAssets.js.map +0 -1
  261. package/dist/utils/captions.d.ts +0 -26
  262. package/dist/utils/captions.d.ts.map +0 -1
  263. package/dist/utils/captions.js.map +0 -1
  264. package/dist/utils/diff.d.ts +0 -112
  265. package/dist/utils/diff.d.ts.map +0 -1
  266. package/dist/utils/diff.js.map +0 -1
  267. package/dist/utils/errors.d.ts +0 -33
  268. package/dist/utils/errors.d.ts.map +0 -1
  269. package/dist/utils/errors.js.map +0 -1
  270. package/dist/utils/events.d.ts +0 -143
  271. package/dist/utils/events.d.ts.map +0 -1
  272. package/dist/utils/events.js.map +0 -1
  273. package/dist/utils/ffmpeg.d.ts +0 -50
  274. package/dist/utils/ffmpeg.d.ts.map +0 -1
  275. package/dist/utils/ffmpeg.js.map +0 -1
  276. package/dist/utils/fonts.d.ts +0 -17
  277. package/dist/utils/fonts.d.ts.map +0 -1
  278. package/dist/utils/fonts.js.map +0 -1
  279. package/dist/utils/idle.d.ts +0 -23
  280. package/dist/utils/idle.d.ts.map +0 -1
  281. package/dist/utils/idle.js.map +0 -1
  282. package/dist/utils/images.d.ts +0 -21
  283. package/dist/utils/images.d.ts.map +0 -1
  284. package/dist/utils/images.js.map +0 -1
  285. package/dist/utils/jobs.d.ts +0 -44
  286. package/dist/utils/jobs.d.ts.map +0 -1
  287. package/dist/utils/jobs.js.map +0 -1
  288. package/dist/utils/lifecycle.d.ts +0 -29
  289. package/dist/utils/lifecycle.d.ts.map +0 -1
  290. package/dist/utils/lifecycle.js.map +0 -1
  291. package/dist/utils/media.d.ts +0 -272
  292. package/dist/utils/media.d.ts.map +0 -1
  293. package/dist/utils/media.js.map +0 -1
  294. package/dist/utils/monitors.d.ts +0 -47
  295. package/dist/utils/monitors.d.ts.map +0 -1
  296. package/dist/utils/monitors.js.map +0 -1
  297. package/dist/utils/ocr.d.ts +0 -50
  298. package/dist/utils/ocr.d.ts.map +0 -1
  299. package/dist/utils/ocr.js.map +0 -1
  300. package/dist/utils/paths.d.ts +0 -28
  301. package/dist/utils/paths.d.ts.map +0 -1
  302. package/dist/utils/paths.js.map +0 -1
  303. package/dist/utils/pipeline.d.ts +0 -69
  304. package/dist/utils/pipeline.d.ts.map +0 -1
  305. package/dist/utils/pipeline.js.map +0 -1
  306. package/dist/utils/player.d.ts +0 -30
  307. package/dist/utils/player.d.ts.map +0 -1
  308. package/dist/utils/player.js.map +0 -1
  309. package/dist/utils/produce.d.ts +0 -126
  310. package/dist/utils/produce.d.ts.map +0 -1
  311. package/dist/utils/produce.js.map +0 -1
  312. package/dist/utils/resolveTarget.d.ts +0 -32
  313. package/dist/utils/resolveTarget.d.ts.map +0 -1
  314. package/dist/utils/resolveTarget.js.map +0 -1
  315. package/dist/utils/retention.d.ts +0 -10
  316. package/dist/utils/retention.d.ts.map +0 -1
  317. package/dist/utils/retention.js.map +0 -1
  318. package/dist/utils/sessions.d.ts +0 -154
  319. package/dist/utils/sessions.d.ts.map +0 -1
  320. package/dist/utils/sessions.js.map +0 -1
  321. package/dist/utils/sheet.d.ts +0 -26
  322. package/dist/utils/sheet.d.ts.map +0 -1
  323. package/dist/utils/sheet.js.map +0 -1
  324. package/dist/utils/still.d.ts +0 -7
  325. package/dist/utils/still.d.ts.map +0 -1
  326. package/dist/utils/still.js.map +0 -1
  327. package/dist/utils/targets.d.ts +0 -113
  328. package/dist/utils/targets.d.ts.map +0 -1
  329. package/dist/utils/targets.js.map +0 -1
  330. package/dist/utils/validate.d.ts +0 -15
  331. package/dist/utils/validate.d.ts.map +0 -1
  332. package/dist/utils/validate.js.map +0 -1
  333. package/dist/utils/wgc.d.ts +0 -46
  334. package/dist/utils/wgc.d.ts.map +0 -1
  335. package/dist/utils/wgc.js.map +0 -1
  336. package/dist/utils/windows.d.ts +0 -94
  337. package/dist/utils/windows.d.ts.map +0 -1
  338. package/dist/utils/windows.js.map +0 -1
  339. package/dist/utils/zoom.d.ts +0 -95
  340. package/dist/utils/zoom.d.ts.map +0 -1
  341. package/dist/utils/zoom.js.map +0 -1
  342. package/dist/wgcRecorder.d.ts +0 -2
  343. package/dist/wgcRecorder.d.ts.map +0 -1
  344. package/dist/wgcRecorder.js.map +0 -1
@@ -1,21 +1,10 @@
1
- /**
2
- * Captions (#120): transcribe speech to SRT with FFmpeg 8's built-in whisper
3
- * filter (whisper.cpp, runs locally), and burn subtitles into a video.
4
- *
5
- * Whisper's SRT needs tidying: it numbers cues from 0 and lets consecutive
6
- * cues overlap (one starting before the previous ends), which some players
7
- * render as two stacked lines. normalizeSrt fixes both. Builders and the SRT
8
- * handling are pure.
9
- */
10
1
  import { existsSync } from "node:fs";
11
2
  import { ScreencastError } from "./errors.js";
12
3
  import { escapeFilterPath } from "./fonts.js";
13
4
  import { resolveQuality } from "./targets.js";
14
- /** Env var naming the default whisper.cpp model file. */
15
5
  export const WHISPER_MODEL_ENV = "SCREENCAST_WHISPER_MODEL";
16
6
  const MODEL_HINT = `Download a whisper.cpp model (ggml-base.en.bin is a good start; ggml-tiny.en.bin is fastest) from ` +
17
7
  `https://huggingface.co/ggerganov/whisper.cpp and pass its path as model, or set ${WHISPER_MODEL_ENV}.`;
18
- /** The model to use: the argument, else the env var. It must exist. */
19
8
  export function resolveWhisperModel(arg, env = process.env) {
20
9
  const model = arg ?? env[WHISPER_MODEL_ENV];
21
10
  if (!model || model.trim().length === 0) {
@@ -25,7 +14,6 @@ export function resolveWhisperModel(arg, env = process.env) {
25
14
  throw new ScreencastError(`Whisper model not found: ${model}`, MODEL_HINT);
26
15
  return model;
27
16
  }
28
- /** Transcribe the input's audio to an SRT file (whisper wants 16 kHz). */
29
17
  export function buildTranscribeArgs(input, model, srtOut, language = "auto") {
30
18
  if (!/^[a-z]{2,3}$|^auto$/.test(language)) {
31
19
  throw new ScreencastError(`language must be a code like "en" or "auto", got "${language}".`);
@@ -48,16 +36,16 @@ function fmt(sec) {
48
36
  const pad = (n, w = 2) => String(n).padStart(w, "0");
49
37
  return `${pad(h)}:${pad(m)}:${pad(s)},${pad(ms % 1000, 3)}`;
50
38
  }
51
- /** Parse SRT into cues (tolerant of CRLF, 0-based numbering, blank lines). */
52
39
  export function parseSrt(srt) {
53
40
  const cues = [];
54
41
  for (const block of srt.replace(/\r\n/g, "\n").split(/\n\s*\n/)) {
55
42
  const lines = block.split("\n").map((l) => l.trim()).filter((l) => l.length > 0);
56
43
  const i = lines.findIndex((l) => l.includes("-->"));
57
- if (i === -1)
44
+ const header = lines[i];
45
+ if (header === undefined)
58
46
  continue;
59
- const [a, b] = lines[i].split("-->");
60
- const sa = a.match(TIME);
47
+ const [a, b] = header.split("-->");
48
+ const sa = a?.match(TIME);
61
49
  const sb = b?.match(TIME);
62
50
  if (!sa || !sb)
63
51
  continue;
@@ -67,8 +55,6 @@ export function parseSrt(srt) {
67
55
  }
68
56
  return cues;
69
57
  }
70
- /** Renumber from 1, sort by start, and end each cue no later than the next
71
- * one starts, so cues never overlap. Pure. */
72
58
  export function normalizeCues(cues) {
73
59
  const sorted = [...cues].sort((p, q) => p.start - q.start);
74
60
  return sorted
@@ -82,24 +68,21 @@ export function normalizeCues(cues) {
82
68
  export function formatSrt(cues) {
83
69
  return cues.map((c, i) => `${i + 1}\n${fmt(c.start)} --> ${fmt(c.end)}\n${c.text}\n`).join("\n");
84
70
  }
85
- /** libass force_style overrides. SRT is laid out on a 288 px-tall canvas, so
86
- * sizes are relative to that: "clean" is a modest outlined line at the bottom;
87
- * "social" is large, bold, on a dark box, raised clear of app UI. */
88
71
  export const CAPTION_STYLES = {
89
72
  clean: "FontName=Inter,FontSize=16,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=1.5,Shadow=0,MarginV=16",
90
73
  social: "FontName=Inter,Bold=1,FontSize=22,PrimaryColour=&H00FFFFFF,BackColour=&H99000000,BorderStyle=3,Outline=6,Shadow=0,MarginV=40",
91
74
  };
92
- /** Burn an SRT/ASS file into the video with the bundled font. */
93
75
  export function buildBurnSubtitlesArgs(input, subtitles, output, fontsDir, style = "clean", quality = "standard") {
94
- const force = CAPTION_STYLES[style];
95
- if (!force)
76
+ const force = style === null ? null : CAPTION_STYLES[style];
77
+ if (force === undefined)
96
78
  throw new ScreencastError(`Unknown caption style "${style}".`);
97
79
  return [
98
80
  "-y", "-i", input,
99
- "-vf", `subtitles=filename=${escapeFilterPath(subtitles)}:fontsdir=${escapeFilterPath(fontsDir)}:force_style='${force}'`,
81
+ "-vf",
82
+ `subtitles=filename=${escapeFilterPath(subtitles)}:fontsdir=${escapeFilterPath(fontsDir)}` +
83
+ (force ? `:force_style='${force}'` : ""),
100
84
  ...resolveQuality(quality),
101
85
  "-c:a", "copy",
102
86
  output,
103
87
  ];
104
88
  }
105
- //# sourceMappingURL=captions.js.map
@@ -0,0 +1,222 @@
1
+ import { existsSync, readFileSync, renameSync, writeFileSync } from "node:fs";
2
+ import { ScreencastError } from "./errors.js";
3
+ import { requireFfmpeg, runCapture } from "./ffmpeg.js";
4
+ export const MAX_MARKERS = 500;
5
+ export const MAX_LABEL = 200;
6
+ export const YOUTUBE_MIN_CHAPTERS = 3;
7
+ export const YOUTUBE_MIN_CHAPTER_SEC = 10;
8
+ const r3 = (v) => Math.round(v * 1000) / 1000;
9
+ export function markersPath(video) {
10
+ return `${video.replace(/\.[^./\\]+$/, "")}.markers.json`;
11
+ }
12
+ export function markerTimeSec(videoStartMs, nowMs) {
13
+ return Math.max(0, r3((nowMs - videoStartMs) / 1000));
14
+ }
15
+ export function cleanLabel(label, max = MAX_LABEL) {
16
+ const s = label.replace(/\s+/g, " ").trim();
17
+ return s.length > max ? `${s.slice(0, max - 1).trimEnd()}…` : s;
18
+ }
19
+ export function insertMarker(list, marker) {
20
+ if (list.length >= MAX_MARKERS) {
21
+ throw new ScreencastError(`A recording holds at most ${MAX_MARKERS} markers.`);
22
+ }
23
+ const label = cleanLabel(marker.label);
24
+ if (!label)
25
+ throw new ScreencastError("A marker needs a non-empty label.");
26
+ if (!Number.isFinite(marker.t) || marker.t < 0)
27
+ throw new ScreencastError("A marker time must be a non-negative number of seconds.");
28
+ const m = { ...marker, t: r3(marker.t), label };
29
+ const i = list.findIndex((x) => x.t > m.t);
30
+ return i === -1 ? [...list, m] : [...list.slice(0, i), m, ...list.slice(i)];
31
+ }
32
+ function isMarker(v) {
33
+ const m = v;
34
+ return !!m && typeof m.t === "number" && Number.isFinite(m.t) && m.t >= 0 && typeof m.label === "string";
35
+ }
36
+ export function parseMarkerSidecar(text) {
37
+ let data;
38
+ try {
39
+ data = JSON.parse(text);
40
+ }
41
+ catch {
42
+ return [];
43
+ }
44
+ const list = Array.isArray(data) ? data : data?.markers;
45
+ return Array.isArray(list) ? list.filter(isMarker).sort((a, b) => a.t - b.t) : [];
46
+ }
47
+ export function readMarkers(video) {
48
+ const path = markersPath(video);
49
+ if (!existsSync(path))
50
+ return [];
51
+ try {
52
+ return parseMarkerSidecar(readFileSync(path, "utf8"));
53
+ }
54
+ catch {
55
+ return [];
56
+ }
57
+ }
58
+ export function writeMarkers(video, markers, sessionId) {
59
+ const path = markersPath(video);
60
+ const tmp = `${path}.${process.pid}.tmp`;
61
+ writeFileSync(tmp, JSON.stringify({ ...(sessionId ? { sessionId } : {}), markers }, null, 2));
62
+ renameSync(tmp, path);
63
+ return path;
64
+ }
65
+ export function retimeMarkers(markers, ops) {
66
+ let cur = [...markers].sort((a, b) => a.t - b.t);
67
+ for (const op of ops) {
68
+ if (op.op === "speed") {
69
+ cur = cur.map((m) => ({ ...m, t: r3(m.t / op.factor) }));
70
+ continue;
71
+ }
72
+ const inside = cur.filter((m) => m.t >= op.start && m.t < op.end).map((m) => ({ ...m, t: r3(m.t - op.start) }));
73
+ const carried = cur.filter((m) => m.t < op.start).at(-1);
74
+ cur = carried && !inside.some((m) => m.t < 0.001) ? [{ ...carried, t: 0 }, ...inside] : inside;
75
+ }
76
+ return cur;
77
+ }
78
+ export function buildChapters(points, durationSec, opts = {}) {
79
+ const min = Math.max(0.001, opts.minChapterSec ?? 1);
80
+ const sorted = points
81
+ .filter((p) => Number.isFinite(p.start) && p.start >= 0 && p.start < durationSec)
82
+ .map((p, i) => ({ start: r3(p.start), title: cleanLabel(p.title, 100) || `Chapter ${i + 1}` }))
83
+ .sort((a, b) => a.start - b.start);
84
+ const kept = [];
85
+ for (const p of sorted) {
86
+ const last = kept.at(-1);
87
+ if (!last) {
88
+ if (p.start < min)
89
+ kept.push({ ...p, start: 0 });
90
+ else
91
+ kept.push({ start: 0, title: opts.introTitle ?? "Intro" }, p);
92
+ }
93
+ else if (p.start - last.start >= min) {
94
+ kept.push(p);
95
+ }
96
+ }
97
+ const lastKept = kept.at(-1);
98
+ if (kept.length > 1 && lastKept && durationSec - lastKept.start < min)
99
+ kept.pop();
100
+ return kept.map((p, i) => ({ start: p.start, end: r3(kept[i + 1]?.start ?? durationSec), title: p.title }));
101
+ }
102
+ export function youtubeTimestamp(sec, long) {
103
+ const s = Math.max(0, Math.floor(sec));
104
+ const h = Math.floor(s / 3600);
105
+ const m = Math.floor((s % 3600) / 60);
106
+ const ss = String(s % 60).padStart(2, "0");
107
+ return long ? `${h}:${String(m).padStart(2, "0")}:${ss}` : `${Math.floor(s / 60)}:${ss}`;
108
+ }
109
+ export function youtubeChapters(chapters, durationSec) {
110
+ const long = durationSec >= 3600;
111
+ const text = chapters.map((c) => `${youtubeTimestamp(c.start, long)} ${c.title}`).join("\n");
112
+ const issues = [];
113
+ if (chapters.length < YOUTUBE_MIN_CHAPTERS) {
114
+ issues.push(`YouTube needs at least ${YOUTUBE_MIN_CHAPTERS} chapters; there are ${chapters.length}.`);
115
+ }
116
+ if (chapters[0] && chapters[0].start !== 0)
117
+ issues.push("YouTube needs the first chapter at 0:00.");
118
+ const short = chapters.filter((c) => c.end - c.start < YOUTUBE_MIN_CHAPTER_SEC);
119
+ if (short.length > 0) {
120
+ issues.push(`YouTube needs every chapter to be at least ${YOUTUBE_MIN_CHAPTER_SEC} s long; ${short.length} ` +
121
+ `${short.length === 1 ? "is" : "are"} shorter (${short.map((c) => `"${c.title}"`).join(", ")}). ` +
122
+ `Raise minChapterSec to ${YOUTUBE_MIN_CHAPTER_SEC} to merge them.`);
123
+ }
124
+ return { text, issues };
125
+ }
126
+ export function escapeFfmetadata(value) {
127
+ return value.replace(/[=;#\\\n]/g, (c) => `\\${c}`);
128
+ }
129
+ export function ffmetadata(chapters) {
130
+ const lines = [";FFMETADATA1"];
131
+ for (const c of chapters) {
132
+ lines.push("[CHAPTER]", "TIMEBASE=1/1000", `START=${Math.round(c.start * 1000)}`, `END=${Math.round(c.end * 1000)}`, `title=${escapeFfmetadata(c.title)}`);
133
+ }
134
+ return `${lines.join("\n")}\n`;
135
+ }
136
+ export function markerPoints(markers) {
137
+ return markers.map((m) => ({ start: m.t, title: m.label }));
138
+ }
139
+ export function scenePoints(scenes, minChapterSec, maxChapters) {
140
+ const picked = [0];
141
+ for (const s of [...scenes].sort((a, b) => b.score - a.score)) {
142
+ if (picked.length >= maxChapters)
143
+ break;
144
+ if (picked.every((t) => Math.abs(t - s.timeSec) >= minChapterSec))
145
+ picked.push(s.timeSec);
146
+ }
147
+ return picked.sort((a, b) => a - b).map((t, i) => ({ start: t, title: `Scene ${i + 1}` }));
148
+ }
149
+ function cueTitle(text, max = 60) {
150
+ const s = text.replace(/<[^>]+>/g, "").replace(/\s+/g, " ").trim();
151
+ if (s.length <= max)
152
+ return s;
153
+ const cut = s.slice(0, max);
154
+ const space = cut.lastIndexOf(" ");
155
+ return `${(space > max / 2 ? cut.slice(0, space) : cut).trimEnd()}…`;
156
+ }
157
+ export function transcriptPoints(cues, opts = {}) {
158
+ const gap = opts.gapSec ?? 2;
159
+ const min = opts.minChapterSec ?? 30;
160
+ const sorted = [...cues].sort((a, b) => a.start - b.start);
161
+ const out = [];
162
+ let prevEnd = -Infinity;
163
+ for (const c of sorted) {
164
+ const last = out.at(-1);
165
+ if (!last || (c.start - prevEnd >= gap && c.start - last.start >= min)) {
166
+ out.push({ start: c.start, title: cueTitle(c.text) });
167
+ }
168
+ prevEnd = Math.max(prevEnd, c.end);
169
+ }
170
+ return out;
171
+ }
172
+ export function buildChaptersMuxArgs(input, metaFile, output, opts) {
173
+ const subs = opts.subtitles;
174
+ return [
175
+ "-y",
176
+ "-i", input,
177
+ "-f", "ffmetadata", "-i", metaFile,
178
+ ...(subs ? ["-i", subs] : []),
179
+ "-map", "0:v", "-map", "0:a?",
180
+ ...(subs ? ["-map", "2:s:0"] : ["-map", "0:s?"]),
181
+ "-map_metadata", "0",
182
+ "-map_chapters", "1",
183
+ "-c", "copy",
184
+ ...(subs ? ["-c:s", opts.container === ".mkv" ? "copy" : "mov_text"] : []),
185
+ ...(subs && opts.language ? ["-metadata:s:s:0", `language=${opts.language}`] : []),
186
+ ...(opts.container === ".mkv" ? [] : ["-movflags", "+faststart"]),
187
+ output,
188
+ ];
189
+ }
190
+ export function buildChaptersProbeArgs(input) {
191
+ return ["-v", "quiet", "-print_format", "json", "-show_chapters", input];
192
+ }
193
+ export function parseChaptersProbe(stdout) {
194
+ let data;
195
+ try {
196
+ data = JSON.parse(stdout);
197
+ }
198
+ catch {
199
+ return [];
200
+ }
201
+ return (data.chapters ?? []).flatMap((c, i) => {
202
+ const start = Number(c.start_time);
203
+ const end = Number(c.end_time);
204
+ if (!Number.isFinite(start) || !Number.isFinite(end))
205
+ return [];
206
+ return [{ start: r3(start), end: r3(end), title: c.tags?.title ?? `Chapter ${i + 1}` }];
207
+ });
208
+ }
209
+ export async function probeChapters(input, signal) {
210
+ const { ffprobe } = requireFfmpeg();
211
+ const res = await runCapture(ffprobe, buildChaptersProbeArgs(input), 30_000, { signal });
212
+ return res.code === 0 ? parseChaptersProbe(res.stdout) : [];
213
+ }
214
+ export async function markersOrChapters(video, signal) {
215
+ const sidecar = readMarkers(video);
216
+ if (sidecar.length > 0)
217
+ return { markers: sidecar, from: "sidecar" };
218
+ const embedded = await probeChapters(video, signal);
219
+ if (embedded.length > 0)
220
+ return { markers: embedded.map((c) => ({ t: c.start, label: c.title })), from: "chapters" };
221
+ return { markers: [], from: null };
222
+ }
@@ -0,0 +1,29 @@
1
+ import { ScreencastError } from "./errors.js";
2
+ export const CONFIRM_CAPTURE_ENV = "SCREENCAST_CONFIRM_CAPTURE";
3
+ export const CONFIRM_TIMEOUT_MS = 5 * 60 * 1000;
4
+ export function confirmCaptureEnabled(env = process.env) {
5
+ return ["1", "true", "yes", "on"].includes((env[CONFIRM_CAPTURE_ENV] ?? "").trim().toLowerCase());
6
+ }
7
+ export function describeTarget(target, window) {
8
+ if (window)
9
+ return `window "${window.matchedTitle}"`;
10
+ return target === "full" ? "the full screen (all monitors)" : target;
11
+ }
12
+ export async function confirmCapture(server, request, signal) {
13
+ if (!confirmCaptureEnabled())
14
+ return;
15
+ if (!server.server.getClientCapabilities()?.elicitation?.form) {
16
+ throw new ScreencastError(`Capture blocked: ${CONFIRM_CAPTURE_ENV} requires the user to confirm each capture, ` +
17
+ "but this client does not support MCP elicitation. Nothing was captured.", `Use a client that supports elicitation, or unset ${CONFIRM_CAPTURE_ENV} to capture without confirmation.`);
18
+ }
19
+ let action;
20
+ try {
21
+ ({ action } = await server.server.elicitInput({ message: request, requestedSchema: { type: "object", properties: {} } }, { signal, timeout: CONFIRM_TIMEOUT_MS }));
22
+ }
23
+ catch (err) {
24
+ throw new ScreencastError(`Capture blocked: the confirmation request failed (${err instanceof Error ? err.message : String(err)}). Nothing was captured.`);
25
+ }
26
+ if (action !== "accept") {
27
+ throw new ScreencastError(`Capture ${action === "decline" ? "declined" : "cancelled"} by the user. Nothing was captured.`);
28
+ }
29
+ }
@@ -1,31 +1,11 @@
1
- /**
2
- * Frame differencing for screen_diff and wait_for_change (#116).
3
- *
4
- * Frames are compared as small grayscale bitmaps (detectionSize: about a
5
- * quarter of the source width, 320-1600 px). The image is split into a grid of cells; a cell counts as changed when its mean
6
- * absolute difference passes a threshold, and touching changed cells are
7
- * grouped into bounding boxes mapped back to the source's pixel coordinates.
8
- * Everything here is pure, so it is unit-tested on synthetic bitmaps.
9
- */
10
1
  import { ScreencastError } from "./errors.js";
11
2
  import { targetInputArgs, SCREENSHOT_GRAB_FPS } from "./targets.js";
12
3
  import { stillOutput } from "./paths.js";
13
- /** Width frames are analysed at by analysisSize (auto-zoom's whole-video scan). */
14
4
  export const ANALYSIS_WIDTH = 320;
15
- /** screen_diff and wait_for_change analyse at one pixel per this many source
16
- * pixels, so a cell covers the same ~32 source px on a 4K monitor or a
17
- * three-monitor desktop as on a laptop, and a small label change still
18
- * passes the threshold (#234). */
19
5
  export const SOURCE_PX_PER_ANALYSIS_PX = 4;
20
- /** Cap on detectionSize's width, for cost (a 5760 px desktop analyses at 1440). */
21
6
  export const MAX_DETECTION_WIDTH = 1600;
22
- /** Cell size in analysis pixels. */
23
7
  export const CELL = 8;
24
- /** A cell's mean |a - b| (0-255) above this counts as changed. Low enough to
25
- * catch a text caret or a button highlight, high enough to ignore encoder noise. */
26
8
  export const DEFAULT_PIXEL_THRESHOLD = 12;
27
- /** Analysis size for a source of `width` x `height`: at most ANALYSIS_WIDTH
28
- * wide, aspect kept, both sides even and at least 2. */
29
9
  export function analysisSize(width, height) {
30
10
  if (!(width > 0) || !(height > 0))
31
11
  throw new ScreencastError("Image has no size.");
@@ -33,9 +13,6 @@ export function analysisSize(width, height) {
33
13
  const h = Math.max(2, Math.round((height * w) / width / 2) * 2);
34
14
  return { width: Math.max(2, Math.round(w / 2) * 2), height: h };
35
15
  }
36
- /** Analysis size for change detection (#234): SOURCE_PX_PER_ANALYSIS_PX
37
- * source pixels per analysis pixel, between ANALYSIS_WIDTH and
38
- * MAX_DETECTION_WIDTH wide (never wider than the source), aspect kept. */
39
16
  export function detectionSize(width, height) {
40
17
  if (!(width > 0) || !(height > 0))
41
18
  throw new ScreencastError("Image has no size.");
@@ -43,7 +20,6 @@ export function detectionSize(width, height) {
43
20
  const h = Math.max(2, Math.round((height * w) / width / 2) * 2);
44
21
  return { width: Math.max(2, Math.round(w / 2) * 2), height: h };
45
22
  }
46
- /** Pixel size of a resolved capture target (`full` is the union of monitors). */
47
23
  export function targetSize(target, monitors) {
48
24
  switch (target.kind) {
49
25
  case "region":
@@ -67,7 +43,6 @@ export function targetSize(target, monitors) {
67
43
  throw new ScreencastError("Internal: resolve window targets to a region first.");
68
44
  }
69
45
  }
70
- /** Mean |a - b| over two equal-size grayscale bitmaps, as a 0-1 fraction. */
71
46
  export function meanDifference(a, b) {
72
47
  if (a.length !== b.length || a.length === 0)
73
48
  throw new ScreencastError("Frames differ in size.");
@@ -76,8 +51,6 @@ export function meanDifference(a, b) {
76
51
  sum += Math.abs(a[i] - b[i]);
77
52
  return sum / a.length / 255;
78
53
  }
79
- /** Compare two `width` x `height` grayscale bitmaps. `scale` (or `scaleX` /
80
- * `scaleY`) maps analysis pixels to source pixels; `origin` offsets the boxes. */
81
54
  export function diffFrames(a, b, width, height, opts = {}) {
82
55
  if (a.length !== width * height || b.length !== width * height) {
83
56
  throw new ScreencastError("Frame size does not match its dimensions.");
@@ -101,7 +74,6 @@ export function diffFrames(a, b, width, height, opts = {}) {
101
74
  changed[cy * cols + cx] = 1;
102
75
  }
103
76
  }
104
- // Group touching changed cells (8-neighbour flood fill) into boxes.
105
77
  const seen = new Uint8Array(cols * rows);
106
78
  const boxes = [];
107
79
  for (let start = 0; start < changed.length; start++) {
@@ -157,18 +129,9 @@ export function diffFrames(a, b, width, height, opts = {}) {
157
129
  const changedCount = changed.reduce((s, v) => s + v, 0);
158
130
  return { meanDiff: meanDifference(a, b), changedFraction: changedCount / changed.length, regions };
159
131
  }
160
- /** Diff options mapping analysis boxes onto a captured target's own pixels,
161
- * i.e. onto the screenshot of it, not the desktop (#233): callers report the
162
- * target's x/y as `origin` instead. */
163
132
  export function targetDiffOptions(area, size, pixelThreshold) {
164
133
  return { scaleX: area.width / size.width, scaleY: area.height / size.height, pixelThreshold };
165
134
  }
166
- /**
167
- * Settle detection for wait_for_change (#234). Each frame is compared with the
168
- * previous one and with the first frame of the current quiet stretch, so a
169
- * change too slow to pass the threshold between two frames (a progress bar
170
- * creeping along) still ends the quiet stretch once it adds up.
171
- */
172
135
  export class SettleTracker {
173
136
  width;
174
137
  height;
@@ -182,7 +145,6 @@ export class SettleTracker {
182
145
  this.previous = first;
183
146
  this.anchor = first;
184
147
  }
185
- /** Feed the next frame; returns the changed regions, empty when still quiet. */
186
148
  push(frame) {
187
149
  const step = diffFrames(this.previous, frame, this.width, this.height, this.opts).regions;
188
150
  const drift = step.length > 0 ? step : diffFrames(this.anchor, frame, this.width, this.height, this.opts).regions;
@@ -192,8 +154,6 @@ export class SettleTracker {
192
154
  return drift;
193
155
  }
194
156
  }
195
- /** Grab args that decode one frame of a still or video file to a raw gray
196
- * bitmap at the analysis size on stdout. */
197
157
  export function buildRawFrameArgs(input, size) {
198
158
  return [
199
159
  "-v", "error", "-i", input, "-frames:v", "1",
@@ -201,8 +161,6 @@ export function buildRawFrameArgs(input, size) {
201
161
  "-f", "rawvideo", "-",
202
162
  ];
203
163
  }
204
- /** Grab one live frame of a resolved target as a raw gray bitmap at the
205
- * analysis size on stdout (gdigrab at 30 fps; see SCREENSHOT_GRAB_FPS). */
206
164
  export function buildRawGrabArgs(target, monitors, size) {
207
165
  return [
208
166
  "-v", "error", "-f", "gdigrab", "-framerate", String(SCREENSHOT_GRAB_FPS),
@@ -212,19 +170,15 @@ export function buildRawGrabArgs(target, monitors, size) {
212
170
  "-f", "rawvideo", "-",
213
171
  ];
214
172
  }
215
- /** SSIM between two images, both scaled to `size`; score printed to stderr. */
216
173
  export function buildSsimArgs(a, b, size) {
217
174
  const s = `scale=${size.width}:${size.height}:flags=area,format=gray`;
218
175
  return ["-v", "info", "-i", a, "-i", b, "-lavfi", `[0]${s}[x];[1]${s}[y];[x][y]ssim`, "-frames:v", "1", "-f", "null", "-"];
219
176
  }
220
- /** Draw each changed region as a red outline on `input`, for a quick visual. */
221
177
  export function buildHighlightArgs(input, regions, output) {
222
178
  const boxes = regions.map((r) => `drawbox=x=${r.x}:y=${r.y}:w=${r.width}:h=${r.height}:color=red@0.9:t=3`);
223
179
  return ["-y", "-v", "error", "-i", input, "-frames:v", "1", ...(boxes.length ? ["-vf", boxes.join(",")] : []), ...stillOutput(output)];
224
180
  }
225
- /** Parse the `All:` score from ffmpeg's ssim filter output, or null. */
226
181
  export function parseSsim(stderr) {
227
182
  const m = stderr.match(/All:([\d.]+)/);
228
183
  return m ? Number(m[1]) : null;
229
184
  }
230
- //# sourceMappingURL=diff.js.map
@@ -1,12 +1,4 @@
1
- /**
2
- * Shared error type and MCP response helpers.
3
- *
4
- * Every tool returns a JSON text block first; tools that produce frames may
5
- * append image blocks after it (#79). Errors are surfaced as `isError: true` so
6
- * an agent sees an actionable message instead of a transport-level failure.
7
- */
8
1
  export class ScreencastError extends Error {
9
- /** Optional remediation hint shown to the caller (e.g. an install command). */
10
2
  hint;
11
3
  constructor(message, hint) {
12
4
  super(message);
@@ -14,13 +6,14 @@ export class ScreencastError extends Error {
14
6
  this.hint = hint;
15
7
  }
16
8
  }
17
- /** Wrap a JSON-serializable value as a successful tool result, optionally
18
- * followed by image blocks. */
19
9
  export function okResponse(value, images = []) {
20
10
  const text = typeof value === "string" ? value : JSON.stringify(value, null, 2);
21
- return { content: [{ type: "text", text }, ...images] };
11
+ const result = { content: [{ type: "text", text }, ...images] };
12
+ if (value !== null && typeof value === "object" && !Array.isArray(value)) {
13
+ result.structuredContent = JSON.parse(text);
14
+ }
15
+ return result;
22
16
  }
23
- /** Wrap any thrown value as an error tool result, appending a hint if present. */
24
17
  export function errorResponse(error) {
25
18
  let message;
26
19
  if (error instanceof ScreencastError) {
@@ -34,4 +27,3 @@ export function errorResponse(error) {
34
27
  }
35
28
  return { content: [{ type: "text", text: message }], isError: true };
36
29
  }
37
- //# sourceMappingURL=errors.js.map