From 301dfad6cd1fa101d9ab1fb76c6023870673caef Mon Sep 17 00:00:00 2001 From: klarkxy <278370456@qq.com> Date: Sun, 25 Oct 2026 12:26:13 +0800 Subject: [PATCH 1/3] Add FableCut video editing Mini App --- README.md | 1 + README.zh-CN.md | 1 + plugins/klarkxy/fablecut/.gitignore | 3 + .../fablecut/.minimax-plugin/plugin.json | 22 + plugins/klarkxy/fablecut/LICENSE | 51 + plugins/klarkxy/fablecut/PATCHES.md | 206 + plugins/klarkxy/fablecut/README.md | 58 + plugins/klarkxy/fablecut/README.zh-CN.md | 58 + plugins/klarkxy/fablecut/icon.png | Bin 0 -> 1574 bytes .../klarkxy/fablecut/miniapp/client/app.js | 19509 ++++++++++++++++ .../fablecut/miniapp/client/audio-fx.js | 241 + .../fablecut/miniapp/client/client-api.ts | 387 + .../klarkxy/fablecut/miniapp/client/color.js | 1076 + .../klarkxy/fablecut/miniapp/client/comp.js | 199 + .../fablecut/miniapp/client/delivery.js | 799 + .../fablecut/miniapp/client/ducking.js | 127 + .../fablecut/miniapp/client/edit-ops.js | 1015 + .../fablecut/miniapp/client/favicon.svg | 14 + .../fablecut/miniapp/client/fx-worklet.js | 162 + .../miniapp/client/icons/favicon-32.png | Bin 0 -> 551 bytes .../fablecut/miniapp/client/index.html | 682 + .../fablecut/miniapp/client/loudness.js | 135 + .../klarkxy/fablecut/miniapp/client/mask.js | 467 + .../fablecut/miniapp/client/media-lib.js | 298 + .../fablecut/miniapp/client/meter-worklet.js | 229 + .../klarkxy/fablecut/miniapp/client/motion.js | 803 + .../fablecut/miniapp/client/mp4-demux.js | 256 + .../fablecut/miniapp/client/ruler-worker.js | 120 + .../fablecut/miniapp/client/sequences.js | 216 + .../fablecut/miniapp/client/silence.js | 97 + .../klarkxy/fablecut/miniapp/client/style.css | 4360 ++++ .../fablecut/miniapp/client/templates.js | 576 + .../fablecut/miniapp/client/tracker.js | 253 + plugins/klarkxy/fablecut/miniapp/miniapp.json | 31 + .../miniapp/node/adapters/local-api.mjs | 205 + .../miniapp/node/adapters/mcp-http.mjs | 227 + .../fablecut/miniapp/node/miniapp-api.ts | 397 + .../klarkxy/fablecut/miniapp/node/server.mjs | 202 + .../miniapp/node/vendor/fablecut/CLAUDE.md | 2472 ++ .../miniapp/node/vendor/fablecut/analyze.js | 423 + .../miniapp/node/vendor/fablecut/audio-fx.js | 241 + .../miniapp/node/vendor/fablecut/color.js | 1076 + .../miniapp/node/vendor/fablecut/comp.js | 199 + .../miniapp/node/vendor/fablecut/delivery.js | 799 + .../miniapp/node/vendor/fablecut/denoise.js | 120 + .../miniapp/node/vendor/fablecut/ducking.js | 127 + .../miniapp/node/vendor/fablecut/edit-ops.js | 1015 + .../node/vendor/fablecut/encode-profiles.js | 308 + .../vendor/fablecut/encoding-profiles.json | 120 + .../node/vendor/fablecut/export-jobs.js | 181 + .../node/vendor/fablecut/frame-cache.js | 49 + .../node/vendor/fablecut/frame-stats.js | 267 + .../miniapp/node/vendor/fablecut/history.js | 341 + .../node/vendor/fablecut/import-url.js | 389 + .../node/vendor/fablecut/library/README.md | 17 + .../fablecut/library/elements/bokeh-drift.svg | 19 + .../library/elements/light-leak-cool.svg | 16 + .../library/elements/light-leak-warm.svg | 22 + .../library/elements/logo-placeholder.svg | 12 + .../library/elements/vhs-scanlines.svg | 18 + .../library/elements/vignette-frame.svg | 14 + .../library/fonts/Abril-Fatface.LICENSE.txt | 107 + .../library/fonts/Abril-Fatface.woff2 | Bin 0 -> 13156 bytes .../fablecut/library/fonts/Anton.LICENSE.txt | 106 + .../vendor/fablecut/library/fonts/Anton.woff2 | Bin 0 -> 18612 bytes .../library/fonts/Archivo-Black.LICENSE.txt | 106 + .../library/fonts/Archivo-Black.woff2 | Bin 0 -> 18604 bytes .../library/fonts/Bangers.LICENSE.txt | 106 + .../fablecut/library/fonts/Bangers.woff2 | Bin 0 -> 23528 bytes .../fablecut/library/fonts/Barlow.LICENSE.txt | 106 + .../fablecut/library/fonts/Barlow.woff2 | Bin 0 -> 22196 bytes .../library/fonts/Bebas-Neue.LICENSE.txt | 107 + .../fablecut/library/fonts/Bebas-Neue.woff2 | Bin 0 -> 13768 bytes .../fablecut/library/fonts/Bungee.LICENSE.txt | 106 + .../fablecut/library/fonts/Bungee.woff2 | Bin 0 -> 14344 bytes .../fablecut/library/fonts/Caveat.LICENSE.txt | 106 + .../fablecut/library/fonts/Caveat.woff2 | Bin 0 -> 74932 bytes .../library/fonts/DM-Sans.LICENSE.txt | 106 + .../fablecut/library/fonts/DM-Sans.woff2 | Bin 0 -> 36932 bytes .../fablecut/library/fonts/Inter.LICENSE.txt | 107 + .../vendor/fablecut/library/fonts/Inter.woff2 | Bin 0 -> 48256 bytes .../vendor/fablecut/library/fonts/LICENSES.md | 186 + .../fablecut/library/fonts/Lato.LICENSE.txt | 107 + .../vendor/fablecut/library/fonts/Lato.woff2 | Bin 0 -> 23580 bytes .../library/fonts/Montserrat.LICENSE.txt | 107 + .../fablecut/library/fonts/Montserrat.woff2 | Bin 0 -> 37956 bytes .../fablecut/library/fonts/Oswald.LICENSE.txt | 106 + .../fablecut/library/fonts/Oswald.woff2 | Bin 0 -> 28488 bytes .../library/fonts/Pacifico.LICENSE.txt | 106 + .../fablecut/library/fonts/Pacifico.woff2 | Bin 0 -> 32280 bytes .../fonts/Playfair-Display.LICENSE.txt | 106 + .../library/fonts/Playfair-Display.woff2 | Bin 0 -> 38404 bytes .../library/fonts/Poppins.LICENSE.txt | 106 + .../fablecut/library/fonts/Poppins.woff2 | Bin 0 -> 7884 bytes .../library/fonts/Righteous.LICENSE.txt | 108 + .../fablecut/library/fonts/Righteous.woff2 | Bin 0 -> 12756 bytes .../fablecut/library/fonts/Roboto.LICENSE.txt | 106 + .../fablecut/library/fonts/Roboto.woff2 | Bin 0 -> 43136 bytes .../fablecut/library/fonts/Rubik.LICENSE.txt | 106 + .../vendor/fablecut/library/fonts/Rubik.woff2 | Bin 0 -> 35348 bytes .../fablecut/library/fonts/Teko.LICENSE.txt | 106 + .../vendor/fablecut/library/fonts/Teko.woff2 | Bin 0 -> 15420 bytes .../vendor/fablecut/library/sfx/README.md | 18 + .../vendor/fablecut/library/svg/ai-star.svg | 17 + .../fablecut/library/svg/arrow-bounce.svg | 18 + .../fablecut/library/svg/arrow-scribble.svg | 13 + .../fablecut/library/svg/burst-lines.svg | 30 + .../library/svg/checkmark-success.svg | 19 + .../fablecut/library/svg/confetti-burst.svg | 23 + .../fablecut/library/svg/countdown-ring.svg | 92 + .../vendor/fablecut/library/svg/equalizer.svg | 18 + .../vendor/fablecut/library/svg/glow-orbs.svg | 29 + .../vendor/fablecut/library/svg/heart-pop.svg | 28 + .../fablecut/library/svg/loading-dots.svg | 16 + .../fablecut/library/svg/location-pin.svg | 25 + .../fablecut/library/svg/lower-third.svg | 17 + .../vendor/fablecut/library/svg/new-badge.svg | 18 + .../fablecut/library/svg/progress-bar.svg | 16 + .../fablecut/library/svg/radial-pulse.svg | 19 + .../fablecut/library/svg/rating-stars.svg | 25 + .../fablecut/library/svg/rec-indicator.svg | 41 + .../vendor/fablecut/library/svg/sparkles.svg | 17 + .../fablecut/library/svg/spawning-hearts.svg | 39 + .../fablecut/library/svg/speech-bubble.svg | 23 + .../fablecut/library/svg/subscribe-bell.svg | 29 + .../fablecut/library/svg/subscribe-pill.svg | 22 + .../vendor/fablecut/library/svg/swipe-up.svg | 46 + .../fablecut/library/svg/underline-swoosh.svg | 15 + .../miniapp/node/vendor/fablecut/loudness.js | 135 + .../miniapp/node/vendor/fablecut/mask.js | 467 + .../node/vendor/fablecut/mcp-server.js | 1885 ++ .../miniapp/node/vendor/fablecut/media-lib.js | 298 + .../node/vendor/fablecut/media-probe.js | 88 + .../miniapp/node/vendor/fablecut/motion.js | 803 + .../miniapp/node/vendor/fablecut/paths.js | 136 + .../miniapp/node/vendor/fablecut/processes.js | 37 + .../node/vendor/fablecut/project-ops.js | 1358 ++ .../miniapp/node/vendor/fablecut/projects.js | 324 + .../miniapp/node/vendor/fablecut/proxy.js | 180 + .../miniapp/node/vendor/fablecut/sequences.js | 216 + .../miniapp/node/vendor/fablecut/server.js | 1447 ++ .../miniapp/node/vendor/fablecut/silence.js | 97 + .../miniapp/node/vendor/fablecut/templates.js | 576 + .../miniapp/node/vendor/fablecut/tracker.js | 253 + plugins/klarkxy/fablecut/package.json | 15 + plugins/klarkxy/fablecut/servers.mcp.json | 12 + .../klarkxy/fablecut/skills/fablecut/SKILL.md | 160 + .../references/audio-and-subtitles.md | 123 + .../skills/fablecut/references/editing.md | 243 + .../skills/fablecut/references/export.md | 174 + .../fablecut/references/media-generation.md | 150 + .../fablecut/references/motion-graphics.md | 231 + plugins/klarkxy/fablecut/tests/abort.test.mjs | 39 + .../klarkxy/fablecut/tests/editing.test.mjs | 210 + .../klarkxy/fablecut/tests/editor.test.mjs | 140 + plugins/klarkxy/fablecut/tests/helpers.mjs | 240 + .../fablecut/tests/import-safety.test.mjs | 300 + .../tests/import-url-security.test.mjs | 419 + .../klarkxy/fablecut/tests/import.test.mjs | 172 + .../klarkxy/fablecut/tests/lifecycle.test.mjs | 59 + .../fablecut/tests/mcp-session-bound.test.mjs | 33 + plugins/klarkxy/fablecut/tests/mcp.test.mjs | 198 + .../fablecut/tests/preview-seek.test.mjs | 57 + .../klarkxy/fablecut/tests/processes.test.mjs | 18 + .../fablecut/tests/reference-path.test.mjs | 29 + plugins/klarkxy/fablecut/upstream.json | 94 + 166 files changed, 56130 insertions(+) create mode 100644 plugins/klarkxy/fablecut/.gitignore create mode 100644 plugins/klarkxy/fablecut/.minimax-plugin/plugin.json create mode 100644 plugins/klarkxy/fablecut/LICENSE create mode 100644 plugins/klarkxy/fablecut/PATCHES.md create mode 100644 plugins/klarkxy/fablecut/README.md create mode 100644 plugins/klarkxy/fablecut/README.zh-CN.md create mode 100644 plugins/klarkxy/fablecut/icon.png create mode 100644 plugins/klarkxy/fablecut/miniapp/client/app.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/audio-fx.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/client-api.ts create mode 100644 plugins/klarkxy/fablecut/miniapp/client/color.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/comp.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/delivery.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/ducking.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/edit-ops.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/favicon.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/client/fx-worklet.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/icons/favicon-32.png create mode 100644 plugins/klarkxy/fablecut/miniapp/client/index.html create mode 100644 plugins/klarkxy/fablecut/miniapp/client/loudness.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/mask.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/media-lib.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/meter-worklet.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/motion.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/mp4-demux.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/ruler-worker.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/sequences.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/silence.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/style.css create mode 100644 plugins/klarkxy/fablecut/miniapp/client/templates.js create mode 100644 plugins/klarkxy/fablecut/miniapp/client/tracker.js create mode 100644 plugins/klarkxy/fablecut/miniapp/miniapp.json create mode 100644 plugins/klarkxy/fablecut/miniapp/node/adapters/local-api.mjs create mode 100644 plugins/klarkxy/fablecut/miniapp/node/adapters/mcp-http.mjs create mode 100644 plugins/klarkxy/fablecut/miniapp/node/miniapp-api.ts create mode 100644 plugins/klarkxy/fablecut/miniapp/node/server.mjs create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/CLAUDE.md create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/analyze.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/audio-fx.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/color.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/comp.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/delivery.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/denoise.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/ducking.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/edit-ops.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/encode-profiles.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/encoding-profiles.json create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/export-jobs.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/frame-cache.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/frame-stats.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/history.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/import-url.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/README.md create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/elements/bokeh-drift.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/elements/light-leak-cool.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/elements/light-leak-warm.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/elements/logo-placeholder.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/elements/vhs-scanlines.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/elements/vignette-frame.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Abril-Fatface.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Abril-Fatface.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Anton.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Anton.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Archivo-Black.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Archivo-Black.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Bangers.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Bangers.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Barlow.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Barlow.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Bebas-Neue.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Bebas-Neue.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Bungee.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Bungee.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Caveat.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Caveat.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/DM-Sans.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/DM-Sans.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Inter.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Inter.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/LICENSES.md create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Lato.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Lato.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Montserrat.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Montserrat.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Oswald.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Oswald.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Pacifico.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Pacifico.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Playfair-Display.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Playfair-Display.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Poppins.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Poppins.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Righteous.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Righteous.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Roboto.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Roboto.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Rubik.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Rubik.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Teko.LICENSE.txt create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/fonts/Teko.woff2 create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/sfx/README.md create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/ai-star.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/arrow-bounce.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/arrow-scribble.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/burst-lines.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/checkmark-success.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/confetti-burst.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/countdown-ring.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/equalizer.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/glow-orbs.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/heart-pop.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/loading-dots.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/location-pin.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/lower-third.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/new-badge.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/progress-bar.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/radial-pulse.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/rating-stars.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/rec-indicator.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/sparkles.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/spawning-hearts.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/speech-bubble.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/subscribe-bell.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/subscribe-pill.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/swipe-up.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/library/svg/underline-swoosh.svg create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/loudness.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/mask.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/mcp-server.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/media-lib.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/media-probe.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/motion.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/paths.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/processes.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/project-ops.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/projects.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/proxy.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/sequences.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/server.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/silence.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/templates.js create mode 100644 plugins/klarkxy/fablecut/miniapp/node/vendor/fablecut/tracker.js create mode 100644 plugins/klarkxy/fablecut/package.json create mode 100644 plugins/klarkxy/fablecut/servers.mcp.json create mode 100644 plugins/klarkxy/fablecut/skills/fablecut/SKILL.md create mode 100644 plugins/klarkxy/fablecut/skills/fablecut/references/audio-and-subtitles.md create mode 100644 plugins/klarkxy/fablecut/skills/fablecut/references/editing.md create mode 100644 plugins/klarkxy/fablecut/skills/fablecut/references/export.md create mode 100644 plugins/klarkxy/fablecut/skills/fablecut/references/media-generation.md create mode 100644 plugins/klarkxy/fablecut/skills/fablecut/references/motion-graphics.md create mode 100644 plugins/klarkxy/fablecut/tests/abort.test.mjs create mode 100644 plugins/klarkxy/fablecut/tests/editing.test.mjs create mode 100644 plugins/klarkxy/fablecut/tests/editor.test.mjs create mode 100644 plugins/klarkxy/fablecut/tests/helpers.mjs create mode 100644 plugins/klarkxy/fablecut/tests/import-safety.test.mjs create mode 100644 plugins/klarkxy/fablecut/tests/import-url-security.test.mjs create mode 100644 plugins/klarkxy/fablecut/tests/import.test.mjs create mode 100644 plugins/klarkxy/fablecut/tests/lifecycle.test.mjs create mode 100644 plugins/klarkxy/fablecut/tests/mcp-session-bound.test.mjs create mode 100644 plugins/klarkxy/fablecut/tests/mcp.test.mjs create mode 100644 plugins/klarkxy/fablecut/tests/preview-seek.test.mjs create mode 100644 plugins/klarkxy/fablecut/tests/processes.test.mjs create mode 100644 plugins/klarkxy/fablecut/tests/reference-path.test.mjs create mode 100644 plugins/klarkxy/fablecut/upstream.json diff --git a/README.md b/README.md index 6361d109..10c6982b 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ The MiniMax Code Agent communicates through the host MCP client. Business reques | --- | --- | --- | | [Dynamic Workflow Console](plugins/stevenjj33/workflow-console/) | Run and supervise MiniMax Code dynamic workflows from one page: live status, a stage-and-dependency flow graph, per-node output, approval and control, templates, and report export | [stevenjj33](https://github.com/stevenjj33) | | [MiniMax Photo](plugins/webguhui/minimax-photo/) | Layered image editing with an in-app AI assistant, local recovery and programmatic editing tools | [WebGuHui](https://github.com/WebGuHui) | +| [FableCut](plugins/klarkxy/fablecut/) | Local timeline editing with FableCut MCP tools and a skill for generating and importing media through mcode-tools | [klarkxy](https://github.com/klarkxy) | | [MiniMax Video](plugins/webguhui/minimax-video/) | Local video editing with captions, a host Agent assistant, reviewable timeline edits, and MP4/MP3 export | [WebGuHui](https://github.com/WebGuHui) | | [AI Office](plugins/cristinamadureira353-svg/ai-office/) | Manage five model-powered employees in a pixel office: client tasks, chats, breaks, meetings and quota-aware offline states; uses your own API keys | [最爱双皮奶](https://github.com/cristinamadureira353-svg) | | [Token Usage Board](plugins/amszuidas/mcode-token-usage-board/) | Explore local Token usage by date, model, and session, including input, output, and cache usage | [amszuidas](https://github.com/amszuidas) | diff --git a/README.zh-CN.md b/README.zh-CN.md index 58b60d69..05c89435 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -59,6 +59,7 @@ MiniMax Code Agent 通过宿主 MCP 客户端与 MiniApp 协作。业务请求 | --- | --- | --- | | [动态工作流控制台](plugins/stevenjj33/workflow-console/README.zh-CN.md) | 在一个页面里运行并盯住 MiniMax Code 动态工作流:实时状态、按阶段与依赖画出的流程图、节点输出、审核与控制、模板与报告导出 | [stevenjj33](https://github.com/stevenjj33) | | [MiniMax Photo](plugins/webguhui/minimax-photo/) | 图层图片编辑、应用内 AI 助手、本地恢复与程序化编辑工具 | [WebGuHui](https://github.com/WebGuHui) | +| [FableCut](plugins/klarkxy/fablecut/) | 本地时间线剪辑、FableCut MCP 工具,以及通过 mcode-tools 生成并导入素材的使用技能 | [klarkxy](https://github.com/klarkxy) | | [MiniMax Video](plugins/webguhui/minimax-video/) | 本地视频剪辑、字幕、宿主 Agent 助手、可预览的时间线修改与 MP4/MP3 导出 | [WebGuHui](https://github.com/WebGuHui) | | [AI 事务所](plugins/cristinamadureira353-svg/ai-office/README.zh-CN.md) | 五位真实模型员工的像素事务所:接单、聊天、休息和开会,额度耗尽时角色暂停;使用玩家自己的 API Key | [最爱双皮奶](https://github.com/cristinamadureira353-svg) | | [Token 用量看板](plugins/amszuidas/mcode-token-usage-board/README.zh-CN.md) | 按时间、模型和会话查看本机 Token 用量,包含输入、输出和缓存用量 | [amszuidas](https://github.com/amszuidas) | diff --git a/plugins/klarkxy/fablecut/.gitignore b/plugins/klarkxy/fablecut/.gitignore new file mode 100644 index 00000000..eb9dea2b --- /dev/null +++ b/plugins/klarkxy/fablecut/.gitignore @@ -0,0 +1,3 @@ +# Test fixtures: files the tests create and read (a clip outside the library, +# a FableCut data folder to import from). Machine-specific, never tracked. +tests/.tmp/ diff --git a/plugins/klarkxy/fablecut/.minimax-plugin/plugin.json b/plugins/klarkxy/fablecut/.minimax-plugin/plugin.json new file mode 100644 index 00000000..91a57ef4 --- /dev/null +++ b/plugins/klarkxy/fablecut/.minimax-plugin/plugin.json @@ -0,0 +1,22 @@ +{ + "schemaVersion": 1, + "name": "fablecut", + "displayName": "FableCut 剪辑台", + "version": "0.1.0", + "description": "浏览器里的视频剪辑台:时间线、字幕、动效、调色与导出,附带 20 个 MCP 工具,聊天里就能剪片。", + "author": "klarkxy", + "icon": "icon.png", + "category": "Studio", + "exampleQueries": [ + "打开 FableCut 剪辑台", + "用 FableCut 把这段素材剪成一条竖屏短视频", + "FableCut 现在时间线上有什么?帮我加个字幕" + ], + "apps": [], + "mcpServers": [ + "servers.mcp.json" + ], + "skills": [ + "skills/fablecut/SKILL.md" + ] +} diff --git a/plugins/klarkxy/fablecut/LICENSE b/plugins/klarkxy/fablecut/LICENSE new file mode 100644 index 00000000..3f0ff373 --- /dev/null +++ b/plugins/klarkxy/fablecut/LICENSE @@ -0,0 +1,51 @@ +MIT License + +Copyright (c) 2026 klarkxy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +This package vendors FableCut, which is MIT licensed as well: + +MIT License + +Copyright (c) 2026 ronak-create + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +The vendored sources live in miniapp/node/vendor/fablecut/ and +miniapp/client/. Every change made to them is listed in PATCHES.md, and the +upstream revision they came from is recorded in upstream.json. diff --git a/plugins/klarkxy/fablecut/PATCHES.md b/plugins/klarkxy/fablecut/PATCHES.md new file mode 100644 index 00000000..71d6f7c9 --- /dev/null +++ b/plugins/klarkxy/fablecut/PATCHES.md @@ -0,0 +1,206 @@ +# Patches to the vendored FableCut source + +Everything under `miniapp/node/vendor/fablecut/` and `miniapp/client/` is +vendored from [FableCut](https://github.com/ronak-create/FableCut) 1.16.0, +commit `fd2af081d73ec94464b88df8c21f640adcc78985` (MIT, © 2026 ronak-create). +The upstream revision is recorded in `upstream.json`. + +The changes below are the whole difference. Each one says what it is for, so +the upstream files can be re-vendored later and the patches re-applied. + +Files this package adds that are not upstream: + +| File | What it is | +| --- | --- | +| `miniapp/node/server.mjs` | The Node entry: `start(context)`, the HTTP server, the routing, the lifecycle. | +| `miniapp/node/adapters/local-api.mjs` | The in-process transport that lets the MCP tools call the editor without a socket. | +| `miniapp/node/adapters/mcp-http.mjs` | The Streamable HTTP MCP endpoint; rejects browser Origin/Fetch Metadata requests so page scripts cannot acquire Agent file capabilities. | +| `miniapp/node/vendor/fablecut/processes.js` | Tracks media child processes and waits for their termination when the Host stops the runtime. | + +--- + +## `miniapp/node/vendor/fablecut/server.js` + +1. **The static root is configurable.** `ROOT` stays the module's own folder + (the encode profiles are watched there); a new `STATIC_DIR` takes the + editor's static files from `FABLECUT_STATIC_DIR`, which the entry points at + the client payload. The last two lines of the request handler serve from + `STATIC_DIR` instead of `ROOT`. + +2. **The request handler is a plain function.** `const server = http.createServer(async (req, res) => {…})` + became `async function handleRequest(req, res) {…}`, and the module exports + it. A Mini App must bind only the port the Host assigns, so the upstream + server cannot create and listen on a server of its own. + +3. **The standalone listener is gone.** The `server.listen(PORT, HOST, …)` + block, with its banner and its `console.log` lines, was removed together + with the `PORT`/`HOST` constants: the Host owns stdout, and a fixed port + is not allowed. `startExportSweep()` now runs at load, where the listen + callback used to call it. + +4. **`shutdown()` is a library call.** It no longer closes a server or calls + `process.exit`, and it no longer registers `SIGINT`/`SIGTERM` handlers. + It closes the export sweep, the export sessions, the auto-version timer, + the two debounce timers, the directory watchers and the live-reload + clients; the entry calls it from `dispose()`. The `fs.watch` calls now keep + their handles in a `watchers` array so they can be closed. + +5. **The logger is injectable.** `console.warn` on a damaged `project.json` + goes through `log.warn`, which reads `globalThis.__FABLECUT_LOG__` — the + entry sets that to `context.logger`. The fallback is stderr. + +6. **The host gate has a same-origin rule.** `FABLECUT_TRUST_HOST=1` accepts a + request whose `Origin` names the same host as the request itself, whatever + host name the Host serves the page under. A cross-origin request still + fails the origin check. The Host already guards the assigned port with a + per-run credential, so a request that reaches the handler is authenticated. + +7. **`path=` needs the local transport, not a header.** The `X-FableCut-Client: + mcp` header is gone as the gate: the page is same-origin and can set any + header it likes. The absolute-path capability is granted to a request that + carries the symbol `Symbol.for("fablecut.localRequest")`, which only the + in-process transport sets and which cannot be forged from a page. + + The split is the upstream one, with the page on the outside of it: the page + cannot name a file outside `media/` and `library/` at all, while the local + MCP client — which the user asked for, and which can read any file the user + can — still can. The editor page itself never uses `path=`; it reads served + `src=` paths only. + +## `miniapp/node/vendor/fablecut/mcp-server.js` + +1. **A transport can replace the HTTP client.** `apiJSON`, `apiBytes` and + `httpOk` use a transport when one is installed (`setTransport`), and + `ensureUIServer()` then reports that the editor is there. Upstream reaches + the editor over HTTP on 127.0.0.1:7777; here the editor is this same + process, so the tools call its request handler in-process. Without a + transport the upstream HTTP path is unchanged. + +2. **The stdio plumbing is gone.** The newline-delimited JSON-RPC loop over + stdin and its `process.stdout.write` were replaced by `handleMessage(msg)`, + which answers with the response object, and by the module exports. The + Host owns stdin and stdout. + +3. **`fablecut_set_project` compares the submitted document's revision.** + Upstream compared the file's revision with `lastReadRevision`, a + process-global that records the last read. With several MCP sessions in + one process, another session's read answered for this write and a stale + document slipped through. The base is now the revision carried by the + submitted document — the same rule `fablecut_patch_project` applies to + `baseRevision` — and a document without a revision falls back to the last + read, because it makes no claim of its own. The write helper also refuses + writes after runtime disposal has begun. + +4. **`relinkMedia` and `replaceMedia` see the file's details.** The ops are + applied synchronously, but the details come from ffprobe, which is + asynchronous: upstream handed the op a Promise, so a replaced media entry + kept no duration and no width and its clips were never trimmed to fit. The + files the ops name are probed first, and the op reads a plain value. + +5. **The editor's location is settable.** Upstream printed its own loopback + URL, so the user could open the editor in a browser. A host that serves the + page itself has no such URL to print: `setEditorLocation()` replaces the + three strings, and the entry points them at the Mini App. + +6. **`fablecut_import_project` was added.** The upstream editor can import a + project document, but a document on its own is not portable: its media + entries name `/media/…` paths that belong to the data folder it was made + in. The new tool imports a project *folder*: the document is read, the + media files it uses are copied into this installation's library (never + overwriting anything), the entries point at the copies, the originals are + left untouched, and the project is saved as the open one at the actual + current revision. It prevalidates document/media real paths, refuses missing + or escaping sources, supports nested source folders, and copies into safe + unique destination names. Library references are resolved by content rather + than silently reusing a different asset. It snapshots the existing project + before replacement and refuses concurrent changes during probing. It writes + the same shared `project.json` that `fablecut_set_project` writes. + +7. **The `where` parameters say what is possible.** The four `where` + descriptions and the `fablecut_export` and `fablecut_frame` descriptions + no longer offer a headless browser: in this package there is none, because + a background browser cannot load the editor's authenticated origin. + +## `miniapp/node/vendor/fablecut/export-jobs.js` + +`createExportJobs` takes `allowHeadless`. When it is false — as it is here — +`where: "headless"` is refused with an explanation, and `where: "auto"` with +no editor tab open is refused as well. The compositor is the editor tab. + +## Media process ownership + +`analyze.js`, `denoise.js`, `encode-profiles.js`, `export-jobs.js`, +`import-url.js`, `mcp-server.js`, `media-probe.js`, `proxy.js`, and `server.js` +import the local `processes.js` adapter instead of `child_process`. Their +argument arrays and media operations remain unchanged. The adapter tracks +asynchronous children, stops them on disposal and rejects new work after +shutdown. The entry also cleans up children when binding the Host port fails. + +## `miniapp/node/vendor/fablecut/analyze.js` + +The `node analyze.js