@higgsfield/video-editor-mcp 1.1.1-dev.0 → 2.0.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 (59) hide show
  1. package/README.md +63 -26
  2. package/dist/cli.mjs +284 -112
  3. package/dist/guide.md +2 -3
  4. package/dist/index.html +1 -1
  5. package/dist/launcher.mjs +34 -14
  6. package/dist/server.mjs +209 -265
  7. package/node_modules/@higgsfield/higgsedit/dist/api.d.ts +481 -0
  8. package/node_modules/@higgsfield/higgsedit/dist/{chunk-PFQYUJQL.mjs → chunk-3XVMJSV2.mjs} +1 -1
  9. package/node_modules/@higgsfield/higgsedit/dist/{chunk-F4CMIG5G.mjs → chunk-4VE54E4U.mjs} +3 -1
  10. package/node_modules/@higgsfield/higgsedit/dist/{chunk-2JYLVSVV.mjs → chunk-55JARHLA.mjs} +205 -65
  11. package/node_modules/@higgsfield/higgsedit/dist/{chunk-YLVXQIPX.mjs → chunk-E4N76T2R.mjs} +1 -1
  12. package/node_modules/@higgsfield/higgsedit/dist/{chunk-OCIZ36XD.mjs → chunk-ECRSOIKI.mjs} +1 -1
  13. package/node_modules/@higgsfield/higgsedit/dist/{chunk-IEPPEDEU.mjs → chunk-ENALCTAD.mjs} +1 -1
  14. package/node_modules/@higgsfield/higgsedit/dist/chunk-HY2E7IWX.mjs +43 -0
  15. package/node_modules/@higgsfield/higgsedit/dist/{chunk-NARTAWRN.mjs → chunk-HYCUOCUQ.mjs} +9 -4
  16. package/node_modules/@higgsfield/higgsedit/dist/{chunk-C3GSB3XZ.mjs → chunk-NLEIBCAK.mjs} +1 -7
  17. package/node_modules/@higgsfield/higgsedit/dist/{chunk-2WKNH7OL.mjs → chunk-O3AVYZ6U.mjs} +1 -1
  18. package/node_modules/@higgsfield/higgsedit/dist/chunk-UXO22E3P.mjs +22 -0
  19. package/node_modules/@higgsfield/higgsedit/dist/{chunk-BH2QF635.mjs → chunk-V5XTCFYK.mjs} +4 -100
  20. package/node_modules/@higgsfield/higgsedit/dist/chunk-W2TANYEH.mjs +118 -0
  21. package/node_modules/@higgsfield/higgsedit/dist/{chunk-DVN4LUXV.mjs → chunk-XY5CCUOZ.mjs} +2 -6
  22. package/node_modules/@higgsfield/higgsedit/dist/{chunk-KIWGVAPJ.mjs → chunk-Y7SAX2P4.mjs} +8 -12
  23. package/node_modules/@higgsfield/higgsedit/dist/chunk-YNAIRXOP.mjs +22 -0
  24. package/node_modules/@higgsfield/higgsedit/dist/{chunk-WENFTPXQ.mjs → chunk-ZO3NDQD3.mjs} +1 -1
  25. package/node_modules/@higgsfield/higgsedit/dist/higgsedit.mjs +13 -13
  26. package/node_modules/@higgsfield/higgsedit/package.json +4 -1
  27. package/package.json +4 -4
  28. package/plugin/.codex-plugin/plugin.json +1 -1
  29. package/plugin/skills/video-editing/SKILL.md +109 -95
  30. package/plugin/mcp.json +0 -10
  31. package/plugin/plugin.json +0 -41
  32. package/plugin/skills/motion-craft/SKILL.md +0 -87
  33. package/plugin/skills/motion-craft/agents/openai.yaml +0 -6
  34. package/plugin/skills/motion-craft/references/causality.md +0 -25
  35. package/plugin/skills/motion-craft/references/composition.md +0 -20
  36. package/plugin/skills/motion-craft/references/easing.md +0 -19
  37. package/plugin/skills/motion-craft/references/qc.md +0 -33
  38. package/plugin/skills/motion-craft/references/recipes.md +0 -31
  39. package/plugin/skills/motion-craft/references/stepped.md +0 -43
  40. package/plugin/skills/motion-craft/references/timing.md +0 -60
  41. package/plugin/skills/motion-craft/references/tsx.md +0 -60
  42. package/plugin/skills/motion-craft/references/typography.md +0 -22
  43. package/plugin/skills/video-editing/agents/openai.yaml +0 -6
  44. package/plugin/skills/video-editing/references/animation-contract.md +0 -45
  45. package/plugin/skills/video-editing/references/assembly.md +0 -58
  46. package/plugin/skills/video-editing/references/caption-systems.md +0 -29
  47. package/plugin/skills/video-editing/references/caption-titling.md +0 -41
  48. package/plugin/skills/video-editing/references/clip-geometry.md +0 -37
  49. package/plugin/skills/video-editing/references/compose.md +0 -283
  50. package/plugin/skills/video-editing/references/editor-measured.md +0 -37
  51. package/plugin/skills/video-editing/references/failure-modes.md +0 -37
  52. package/plugin/skills/video-editing/references/local-setup.md +0 -25
  53. package/plugin/skills/video-editing/references/motion-language.md +0 -27
  54. package/plugin/skills/video-editing/references/provenance.md +0 -7
  55. package/plugin/skills/video-editing/references/sandbox.md +0 -31
  56. package/plugin/skills/video-editing/references/shot-blueprints.md +0 -24
  57. package/plugin/skills/video-editing/references/title-animation.md +0 -29
  58. package/plugin/skills/video-editing/references/tsx-projects.md +0 -187
  59. package/plugin/skills/video-editing/references/workflows.md +0 -41
package/dist/launcher.mjs CHANGED
@@ -14579,6 +14579,7 @@ function findCodex(capability = "mcp") {
14579
14579
  }
14580
14580
 
14581
14581
  // src/adapters/codex-plugin.ts
14582
+ var marketplaceName = (channel) => `higgsfield-video-editor-updates-${channel}`;
14582
14583
  var PLUGIN_ROLLBACK_ERROR = "Plugin refresh failed and rollback requires attention.";
14583
14584
  var identity = external_exports.object({
14584
14585
  name: external_exports.string().regex(/^[a-z][a-z0-9-]{0,63}$/),
@@ -14607,7 +14608,7 @@ function validateTree(root) {
14607
14608
  }
14608
14609
  }
14609
14610
  function bindPackageRuntime(root, dist2) {
14610
- for (const file2 of ["mcp.json", ".mcp.json"]) {
14611
+ for (const file2 of [".mcp.json"]) {
14611
14612
  const path = join2(root, file2);
14612
14613
  if (!existsSync(path)) continue;
14613
14614
  const config2 = external_exports.object({ mcpServers: external_exports.record(external_exports.string(), external_exports.unknown()) }).parse(JSON.parse(readFileSync(path, "utf8")));
@@ -14630,14 +14631,34 @@ function bundledPlugin(options2) {
14630
14631
  if (!existsSync(root)) return null;
14631
14632
  if (!lstatSync(root).isDirectory()) throw new Error("Plugin bundle must be a directory");
14632
14633
  validateTree(root);
14633
- const manifest = identity.parse(JSON.parse(readFileSync(join2(root, "plugin.json"), "utf8")));
14634
- const codex = identity.parse(
14634
+ const manifest = identity.parse(
14635
14635
  JSON.parse(readFileSync(join2(root, ".codex-plugin/plugin.json"), "utf8"))
14636
14636
  );
14637
- if (manifest.name !== codex.name || manifest.version !== options2.version || codex.version !== options2.version)
14637
+ if (manifest.version !== options2.version)
14638
14638
  throw new Error("Plugin identity/version must match its package and Codex manifest");
14639
14639
  return { root, name: manifest.name };
14640
14640
  }
14641
+ var marketplaceList = external_exports.object({
14642
+ marketplaces: external_exports.array(external_exports.object({ name: external_exports.string(), root: external_exports.string() }))
14643
+ });
14644
+ function listMarketplaces(codex, runner, install) {
14645
+ const list = () => marketplaceList.parse(JSON.parse(runner(codex, ["plugin", "marketplace", "list", "--json"]))).marketplaces;
14646
+ try {
14647
+ return list();
14648
+ } catch (error51) {
14649
+ const message = error51 instanceof Error ? error51.message : String(error51);
14650
+ const broken = [...message.matchAll(/^- `([^`]+)` at /gm)].map((match) => match[1]);
14651
+ if (!broken.length) throw error51;
14652
+ const ours = broken.filter((name) => name.startsWith("higgsfield-video-editor-"));
14653
+ if (install && ours.length === broken.length) {
14654
+ for (const name of ours) runner(codex, ["plugin", "marketplace", "remove", name]);
14655
+ return list();
14656
+ }
14657
+ throw new Error(
14658
+ `The ChatGPT desktop app has plugin registrations whose folders are gone: ${broken.join(", ")}. Run \`codex plugin marketplace remove <name>\` for each, then try again.`
14659
+ );
14660
+ }
14661
+ }
14641
14662
  function refreshBundledPlugin(options2, install = false, runner = run) {
14642
14663
  const marker = join2(options2.root, "plugin-registration.json");
14643
14664
  if (!install && !existsSync(marker)) return void 0;
@@ -14650,21 +14671,20 @@ function refreshBundledPlugin(options2, install = false, runner = run) {
14650
14671
  if (previous && previous.name !== bundle.name)
14651
14672
  throw new Error("Plugin identity changed; refusing to replace it");
14652
14673
  const codex = previous?.codex ?? findCodex("plugin");
14653
- const marketplaceName = `higgsfield-video-editor-updates-${options2.channel}`;
14674
+ const marketplace = marketplaceName(options2.channel);
14654
14675
  const root = join2(options2.root, "marketplace");
14655
14676
  mkdirSync(root, { recursive: true });
14656
- const marketplaces = external_exports.object({ marketplaces: external_exports.array(external_exports.object({ name: external_exports.string(), root: external_exports.string() })) }).parse(JSON.parse(runner(codex, ["plugin", "marketplace", "list", "--json"])));
14657
- const existing = marketplaces.marketplaces.find(
14658
- (marketplace) => marketplace.name === marketplaceName
14677
+ const existing = listMarketplaces(codex, runner, install).find(
14678
+ (entry) => entry.name === marketplace
14659
14679
  );
14660
14680
  if (existing && realpathSync(existing.root) !== realpathSync(root))
14661
14681
  throw new Error("Marketplace name belongs to another source; nothing changed");
14662
14682
  const installedSchema = external_exports.object({
14663
14683
  installed: external_exports.array(external_exports.object({ pluginId: external_exports.string(), enabled: external_exports.boolean() }))
14664
14684
  });
14665
- const selector = `${bundle.name}@${marketplaceName}`;
14685
+ const selector = `${bundle.name}@${marketplace}`;
14666
14686
  const current = installedSchema.parse(
14667
- JSON.parse(runner(codex, ["plugin", "list", "--marketplace", marketplaceName, "--json"]))
14687
+ JSON.parse(runner(codex, ["plugin", "list", "--marketplace", marketplace, "--json"]))
14668
14688
  ).installed.find((plugin) => plugin.pluginId === selector);
14669
14689
  if (!install && (!current || !current.enabled))
14670
14690
  throw new Error("Plugin was removed or disabled; refusing to reinstall or re-enable it");
@@ -14699,7 +14719,7 @@ function refreshBundledPlugin(options2, install = false, runner = run) {
14699
14719
  if (current) runner(codex, ["plugin", "add", selector, "--json"]);
14700
14720
  else runner(codex, ["plugin", "remove", selector]);
14701
14721
  }
14702
- if (addedMarketplace) runner(codex, ["plugin", "marketplace", "remove", marketplaceName]);
14722
+ if (addedMarketplace) runner(codex, ["plugin", "marketplace", "remove", marketplace]);
14703
14723
  if (oldCatalog === null) rmSync(catalog, { force: true });
14704
14724
  if (oldMarker !== null) writeAtomic(marker, oldMarker);
14705
14725
  else rmSync(marker, { force: true });
@@ -14708,7 +14728,7 @@ function refreshBundledPlugin(options2, install = false, runner = run) {
14708
14728
  writeAtomic(
14709
14729
  catalog,
14710
14730
  JSON.stringify({
14711
- name: marketplaceName,
14731
+ name: marketplace,
14712
14732
  interface: { displayName: "Higgsfield Video Editor Updates" },
14713
14733
  plugins: [
14714
14734
  {
@@ -14829,7 +14849,7 @@ function saveState(root, state) {
14829
14849
  writeFileSync2(temp, JSON.stringify(state));
14830
14850
  renameSync2(temp, join3(root, "state.json"));
14831
14851
  }
14832
- var run2 = (command, args, timeout, cwd) => execFileSync2(command, args, {
14852
+ var defaultRunner = (command, args, timeout, cwd) => execFileSync2(command, args, {
14833
14853
  cwd,
14834
14854
  env: Object.fromEntries(
14835
14855
  Object.entries(process.env).filter(([name]) => !name.toLowerCase().startsWith("npm_config_"))
@@ -14840,7 +14860,7 @@ var run2 = (command, args, timeout, cwd) => execFileSync2(command, args, {
14840
14860
  maxBuffer: 1024 * 1024,
14841
14861
  stdio: ["ignore", "pipe", "pipe"]
14842
14862
  });
14843
- function updateEditor(options2, force = false, runner = run2) {
14863
+ function updateEditor(options2, force = false, runner = defaultRunner) {
14844
14864
  const { root, channel } = options2;
14845
14865
  if (!force && !checkDue(root)) return "Already checked within the last hour.";
14846
14866
  mkdirSync2(root, { recursive: true });