@ignix-social/creator 0.1.1 → 0.1.3

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 (3) hide show
  1. package/dist/cli.cjs +332 -23
  2. package/dist/core.cjs +205 -80
  3. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -8,6 +8,7 @@ var __export = (target, all) => {
8
8
 
9
9
  // src/cli.ts
10
10
  var import_node_fs2 = require("node:fs");
11
+ var import_node_path6 = require("node:path");
11
12
  var import_node_net3 = require("node:net");
12
13
 
13
14
  // ../desktop/main/mcp/endpoint.ts
@@ -2346,8 +2347,8 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
2346
2347
  (_a3 = inst._zod.def).when ?? (_a3.when = _whenHasSize);
2347
2348
  inst._zod.check = (payload) => {
2348
2349
  const input2 = payload.value;
2349
- const size = input2.size;
2350
- if (size <= def.maximum)
2350
+ const size2 = input2.size;
2351
+ if (size2 <= def.maximum)
2351
2352
  return;
2352
2353
  payload.issues.push({
2353
2354
  origin: getSizableOrigin(input2),
@@ -2366,8 +2367,8 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
2366
2367
  (_a3 = inst._zod.def).when ?? (_a3.when = _whenHasSize);
2367
2368
  inst._zod.check = (payload) => {
2368
2369
  const input2 = payload.value;
2369
- const size = input2.size;
2370
- if (size >= def.minimum)
2370
+ const size2 = input2.size;
2371
+ if (size2 >= def.minimum)
2371
2372
  return;
2372
2373
  payload.issues.push({
2373
2374
  origin: getSizableOrigin(input2),
@@ -2386,10 +2387,10 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
2386
2387
  (_a3 = inst._zod.def).when ?? (_a3.when = _whenHasSize);
2387
2388
  inst._zod.check = (payload) => {
2388
2389
  const input2 = payload.value;
2389
- const size = input2.size;
2390
- if (size === def.size)
2390
+ const size2 = input2.size;
2391
+ if (size2 === def.size)
2391
2392
  return;
2392
- const tooBig = size > def.size;
2393
+ const tooBig = size2 > def.size;
2393
2394
  payload.issues.push({
2394
2395
  origin: getSizableOrigin(input2),
2395
2396
  ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
@@ -15165,11 +15166,11 @@ function _minSize(minimum, params) {
15165
15166
  });
15166
15167
  }
15167
15168
  // @__NO_SIDE_EFFECTS__
15168
- function _size(size, params) {
15169
+ function _size(size2, params) {
15169
15170
  return new $ZodCheckSizeEquals({
15170
15171
  check: "size_equals",
15171
15172
  ...normalizeParams(params),
15172
- size
15173
+ size: size2
15173
15174
  });
15174
15175
  }
15175
15176
  // @__NO_SIDE_EFFECTS__
@@ -18418,8 +18419,8 @@ var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
18418
18419
  $ZodFile.init(inst, def);
18419
18420
  ZodType.init(inst, def);
18420
18421
  inst._zod.processJSONSchema = (ctx, json2, params) => fileProcessor(inst, ctx, json2, params);
18421
- inst.min = (size, params) => inst.check(_minSize(size, params));
18422
- inst.max = (size, params) => inst.check(_maxSize(size, params));
18422
+ inst.min = (size2, params) => inst.check(_minSize(size2, params));
18423
+ inst.max = (size2, params) => inst.check(_maxSize(size2, params));
18423
18424
  inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params));
18424
18425
  });
18425
18426
  function file(params) {
@@ -21068,14 +21069,16 @@ var MCP_TOOL_INPUTS = {
21068
21069
  prompt: external_exports.string().trim().min(1).max(2e3),
21069
21070
  aspect: Aspect.optional(),
21070
21071
  referenceAssetId: AssetId2.optional(),
21071
- target: external_exports.enum(["auto", "local"]).optional()
21072
+ /** Where it runs: leave it out when only one way is possible; when two are, ask the person and pass their choice. */
21073
+ target: external_exports.enum(["auto", "local", "ignix", "boost"]).optional()
21072
21074
  }).strict(),
21073
21075
  make_video_clip: external_exports.object({
21074
21076
  prompt: external_exports.string().trim().min(1).max(900),
21075
21077
  imageAssetId: AssetId2.optional(),
21076
21078
  model: external_exports.enum(["wan", "minimax_h3"]).optional(),
21077
21079
  seconds: external_exports.number().int().min(2).max(10).optional(),
21078
- aspect: Aspect.optional()
21080
+ aspect: Aspect.optional(),
21081
+ target: external_exports.enum(["auto", "local", "ignix", "boost"]).optional()
21079
21082
  }).strict(),
21080
21083
  make_presenter: external_exports.object({
21081
21084
  /** The presenter's photo (a face looking at the camera). */
@@ -21089,7 +21092,8 @@ var MCP_TOOL_INPUTS = {
21089
21092
  /** The exact words of the audio: required for MiniMax H3 (it says them itself). */
21090
21093
  line: external_exports.string().trim().min(1).max(400).optional(),
21091
21094
  language: Language.optional(),
21092
- aspect: Aspect.optional()
21095
+ aspect: Aspect.optional(),
21096
+ target: external_exports.enum(["auto", "local", "ignix", "boost"]).optional()
21093
21097
  }).strict(),
21094
21098
  transcribe: external_exports.object({ assetId: AssetId2 }).strict(),
21095
21099
  find_faces: external_exports.object({ assetId: AssetId2 }).strict(),
@@ -21261,21 +21265,21 @@ var MCP_TOOL_META = {
21261
21265
  },
21262
21266
  make_image: {
21263
21267
  title: "Make an image",
21264
- description: "An image from your prompt (used as is). Made on this computer when it can; a paid route waits on the card (choose_route).",
21268
+ description: "An image from your prompt (used as is). Where it runs is priced before anything starts: with one possible way, the approval says where, its credits and roughly how long, and approving starts it; with two (e.g. free on this computer but slow, or Cloud Boost), it answers `needsChoice` with each way \u2014 tell the person and call again with `target`; with none, it says why (get_engines says what this computer can run).",
21265
21269
  readOnly: false,
21266
21270
  spend: "with_approval",
21267
21271
  openWorld: true
21268
21272
  },
21269
21273
  make_video_clip: {
21270
21274
  title: "Make a video clip",
21271
- description: "A short generated clip: a photo brought to life (`imageAssetId`, Wan or MiniMax H3) or text \u2192 video (MiniMax H3). This computer or Cloud Boost, chosen on the card (choose_route).",
21275
+ description: "A short generated clip: a photo brought to life (`imageAssetId`, Wan or MiniMax H3) or text \u2192 video (MiniMax H3). Where it runs is priced before anything starts: with one possible way, the approval says where, its credits and roughly how long, and approving starts it; with two (e.g. free on this computer but slow, or Cloud Boost), it answers `needsChoice` with each way \u2014 tell the person and call again with `target`; with none, it says why (get_engines says what this computer can run).",
21272
21276
  readOnly: false,
21273
21277
  spend: "with_approval",
21274
21278
  openWorld: true
21275
21279
  },
21276
21280
  make_presenter: {
21277
21281
  title: "Make a presenter",
21278
- description: "A talking presenter from a photo and ONE voice line (\u2264 8.5 s): InfiniteTalk lip-syncs the audio (default), or MiniMax H3 says `line` in that voice. For a longer script call it once per line and join the clips in Ignix Editor. This computer or Cloud Boost, chosen on the card (choose_route): a paid route or a photo of a real person waits for the person\u2019s approval there (needs_approval).",
21282
+ description: "A talking presenter from a photo and ONE voice line (\u2264 8.5 s): InfiniteTalk lip-syncs the audio (default), or MiniMax H3 says `line` in that voice. For a longer script call it once per line and join the clips in Ignix Editor. A photo of a real person also needs the person\u2019s consent in the same approval. Where it runs is priced before anything starts: with one possible way, the approval says where, its credits and roughly how long, and approving starts it; with two (e.g. free on this computer but slow, or Cloud Boost), it answers `needsChoice` with each way \u2014 tell the person and call again with `target`; with none, it says why (get_engines says what this computer can run).",
21279
21283
  readOnly: false,
21280
21284
  spend: "with_approval",
21281
21285
  openWorld: true
@@ -22124,7 +22128,7 @@ async function removeStaleSocket(path) {
22124
22128
  // ../desktop/main/mcp/lines.ts
22125
22129
  function createLineReader(maxBytes, onLine, onOverflow) {
22126
22130
  let parts = [];
22127
- let size = 0;
22131
+ let size2 = 0;
22128
22132
  let dead = false;
22129
22133
  return (chunk) => {
22130
22134
  if (dead) return;
@@ -22132,8 +22136,8 @@ function createLineReader(maxBytes, onLine, onOverflow) {
22132
22136
  for (; ; ) {
22133
22137
  const nl = buf.indexOf(10);
22134
22138
  if (nl === -1) {
22135
- size += buf.length;
22136
- if (size > maxBytes) {
22139
+ size2 += buf.length;
22140
+ if (size2 > maxBytes) {
22137
22141
  dead = true;
22138
22142
  parts = [];
22139
22143
  onOverflow();
@@ -22143,7 +22147,7 @@ function createLineReader(maxBytes, onLine, onOverflow) {
22143
22147
  return;
22144
22148
  }
22145
22149
  const head = buf.subarray(0, nl);
22146
- if (size + head.length > maxBytes) {
22150
+ if (size2 + head.length > maxBytes) {
22147
22151
  dead = true;
22148
22152
  parts = [];
22149
22153
  onOverflow();
@@ -22151,7 +22155,7 @@ function createLineReader(maxBytes, onLine, onOverflow) {
22151
22155
  }
22152
22156
  const line = Buffer.concat([...parts, head]).toString("utf8").replace(/\r$/, "");
22153
22157
  parts = [];
22154
- size = 0;
22158
+ size2 = 0;
22155
22159
  buf = buf.subarray(nl + 1);
22156
22160
  if (line.trim()) onLine(line);
22157
22161
  }
@@ -23604,14 +23608,284 @@ async function runService(paths, version2) {
23604
23608
  });
23605
23609
  }
23606
23610
 
23611
+ // src/report.ts
23612
+ var ROWS = ["production_tools", "presenter", "video", "h3", "images", "recast"];
23613
+ var W = {
23614
+ en: {
23615
+ title: "Ignix Creator on this computer",
23616
+ intro: "Ignix Creator measured this computer. Here is what it can make on its own (free, after a one-time download) and what Ignix Cloud Boost makes for it (Ignix AI credits).",
23617
+ machine: "This computer",
23618
+ what: "What",
23619
+ here: "On this computer",
23620
+ boost: "On Cloud Boost",
23621
+ rows: {
23622
+ production_tools: "Make and edit videos (reels from scratch, your recordings, clips and captions)",
23623
+ presenter: "A talking presenter from a photo",
23624
+ video: "Photo \u2192 video",
23625
+ h3: "Text \u2192 video (MiniMax H3)",
23626
+ images: "Images",
23627
+ recast: "Swap the person in a video for the one in a photo (you, for example)"
23628
+ },
23629
+ installed: "\u2713 Installed",
23630
+ available: (d, k) => `Possible: ${d} download (${k} on disk)`,
23631
+ recommendedTag: "recommended",
23632
+ notHere: "Not possible on this computer",
23633
+ installing: "Installing\u2026",
23634
+ h3Here: (m) => `about ${String(m)} min per 5-second clip`,
23635
+ perSecond: (c) => `${String(c)} credits per second`,
23636
+ perImage: (c) => `${String(c)} credits per image`,
23637
+ localOnly: "Only on this computer (free)",
23638
+ boostOff: "Not available now",
23639
+ recommendTitle: "Our recommendation",
23640
+ recommendInstall: (i, s) => `Install ${i} (${s}): your agent does it when you ask, and you approve the download.`,
23641
+ recommendNothing: "Nothing to install for now: what this computer cannot make, Cloud Boost makes.",
23642
+ boostFor: "Cloud Boost is the way here for",
23643
+ seeExamples: "See what it makes",
23644
+ howTo: "Ask your AI agent for what you want; before anything that spends credits it shows you where it runs, its price and roughly how long, and you approve it."
23645
+ },
23646
+ es: {
23647
+ title: "Ignix Creator en este ordenador",
23648
+ intro: "Ignix Creator ha analizado este ordenador. Esto es lo que puede hacer por s\xED mismo (gratis, tras una descarga \xFAnica) y lo que hace Cloud Boost de Ignix por \xE9l (cr\xE9ditos de IA de Ignix).",
23649
+ machine: "Este ordenador",
23650
+ what: "Qu\xE9",
23651
+ here: "En este ordenador",
23652
+ boost: "En Cloud Boost",
23653
+ rows: {
23654
+ production_tools: "Crear y editar v\xEDdeos (reels desde cero, tus grabaciones, clips y subt\xEDtulos)",
23655
+ presenter: "Un presentador que habla, desde una foto",
23656
+ video: "Foto \u2192 v\xEDdeo",
23657
+ h3: "Texto \u2192 v\xEDdeo (MiniMax H3)",
23658
+ images: "Im\xE1genes",
23659
+ recast: "Cambiar a la persona de un v\xEDdeo por la de una foto (por ejemplo, t\xFA)"
23660
+ },
23661
+ installed: "\u2713 Instalado",
23662
+ available: (d, k) => `Posible: descarga de ${d} (${k} en disco)`,
23663
+ recommendedTag: "recomendado",
23664
+ notHere: "No es posible en este ordenador",
23665
+ installing: "Instalando\u2026",
23666
+ h3Here: (m) => `unos ${String(m)} min por clip de 5 s`,
23667
+ perSecond: (c) => `${String(c)} cr\xE9ditos por segundo`,
23668
+ perImage: (c) => `${String(c)} cr\xE9ditos por imagen`,
23669
+ localOnly: "Solo en este ordenador (gratis)",
23670
+ boostOff: "No disponible ahora",
23671
+ recommendTitle: "Nuestra recomendaci\xF3n",
23672
+ recommendInstall: (i, s) => `Instala ${i} (${s}): lo hace tu agente cuando se lo pidas, y t\xFA apruebas la descarga.`,
23673
+ recommendNothing: "No hace falta instalar nada por ahora: lo que este ordenador no puede hacer, lo hace Cloud Boost.",
23674
+ boostFor: "Aqu\xED Cloud Boost se encarga de",
23675
+ seeExamples: "Mira lo que hace",
23676
+ howTo: "P\xEDdele a tu agente de IA lo que quieras: antes de cualquier cosa que gaste cr\xE9ditos te ense\xF1a d\xF3nde se hace, su precio y cu\xE1nto tarda, y t\xFA lo apruebas."
23677
+ },
23678
+ pt: {
23679
+ title: "Ignix Creator neste computador",
23680
+ intro: "O Ignix Creator analisou este computador. Isto \xE9 o que ele faz sozinho (gr\xE1tis, depois de um download \xFAnico) e o que o Cloud Boost da Ignix faz por ele (cr\xE9ditos de IA da Ignix).",
23681
+ machine: "Este computador",
23682
+ what: "O qu\xEA",
23683
+ here: "Neste computador",
23684
+ boost: "No Cloud Boost",
23685
+ rows: {
23686
+ production_tools: "Criar e editar v\xEDdeos (reels do zero, suas grava\xE7\xF5es, clipes e legendas)",
23687
+ presenter: "Um apresentador que fala, a partir de uma foto",
23688
+ video: "Foto \u2192 v\xEDdeo",
23689
+ h3: "Texto \u2192 v\xEDdeo (MiniMax H3)",
23690
+ images: "Imagens",
23691
+ recast: "Trocar a pessoa de um v\xEDdeo pela de uma foto (voc\xEA, por exemplo)"
23692
+ },
23693
+ installed: "\u2713 Instalado",
23694
+ available: (d, k) => `Poss\xEDvel: download de ${d} (${k} em disco)`,
23695
+ recommendedTag: "recomendado",
23696
+ notHere: "N\xE3o \xE9 poss\xEDvel neste computador",
23697
+ installing: "Instalando\u2026",
23698
+ h3Here: (m) => `cerca de ${String(m)} min por clipe de 5 s`,
23699
+ perSecond: (c) => `${String(c)} cr\xE9ditos por segundo`,
23700
+ perImage: (c) => `${String(c)} cr\xE9ditos por imagem`,
23701
+ localOnly: "S\xF3 neste computador (gr\xE1tis)",
23702
+ boostOff: "Indispon\xEDvel agora",
23703
+ recommendTitle: "Nossa recomenda\xE7\xE3o",
23704
+ recommendInstall: (i, s) => `Instale ${i} (${s}): seu agente faz isso quando voc\xEA pedir, e voc\xEA aprova o download.`,
23705
+ recommendNothing: "N\xE3o precisa instalar nada por enquanto: o que este computador n\xE3o consegue fazer, o Cloud Boost faz.",
23706
+ boostFor: "Aqui o Cloud Boost cuida de",
23707
+ seeExamples: "Veja o que ele faz",
23708
+ howTo: "Pe\xE7a ao seu agente de IA o que quiser: antes de qualquer coisa que use cr\xE9ditos ele mostra onde \xE9 feito, o pre\xE7o e quanto tempo leva, e voc\xEA aprova."
23709
+ },
23710
+ fr: {
23711
+ title: "Ignix Creator sur cet ordinateur",
23712
+ intro: "Ignix Creator a analys\xE9 cet ordinateur. Voici ce qu\u2019il peut faire seul (gratuit, apr\xE8s un t\xE9l\xE9chargement unique) et ce que Cloud Boost d\u2019Ignix fait pour lui (cr\xE9dits IA d\u2019Ignix).",
23713
+ machine: "Cet ordinateur",
23714
+ what: "Quoi",
23715
+ here: "Sur cet ordinateur",
23716
+ boost: "Sur Cloud Boost",
23717
+ rows: {
23718
+ production_tools: "Cr\xE9er et monter des vid\xE9os (reels de A \xE0 Z, vos enregistrements, extraits et sous-titres)",
23719
+ presenter: "Un pr\xE9sentateur qui parle, \xE0 partir d\u2019une photo",
23720
+ video: "Photo \u2192 vid\xE9o",
23721
+ h3: "Texte \u2192 vid\xE9o (MiniMax H3)",
23722
+ images: "Images",
23723
+ recast: "Remplacer la personne d\u2019une vid\xE9o par celle d\u2019une photo (vous, par exemple)"
23724
+ },
23725
+ installed: "\u2713 Install\xE9",
23726
+ available: (d, k) => `Possible : ${d} \xE0 t\xE9l\xE9charger (${k} sur le disque)`,
23727
+ recommendedTag: "recommand\xE9",
23728
+ notHere: "Impossible sur cet ordinateur",
23729
+ installing: "Installation\u2026",
23730
+ h3Here: (m) => `environ ${String(m)} min par clip de 5 s`,
23731
+ perSecond: (c) => `${String(c)} cr\xE9dits par seconde`,
23732
+ perImage: (c) => `${String(c)} cr\xE9dits par image`,
23733
+ localOnly: "Seulement sur cet ordinateur (gratuit)",
23734
+ boostOff: "Indisponible pour le moment",
23735
+ recommendTitle: "Notre recommandation",
23736
+ recommendInstall: (i, s) => `Installez ${i} (${s}) : votre agent le fait quand vous le demandez, et vous approuvez le t\xE9l\xE9chargement.`,
23737
+ recommendNothing: "Rien \xE0 installer pour l\u2019instant : ce que cet ordinateur ne peut pas faire, Cloud Boost le fait.",
23738
+ boostFor: "Ici, Cloud Boost s\u2019occupe de",
23739
+ seeExamples: "Voir ce qu\u2019il fait",
23740
+ howTo: "Demandez ce que vous voulez \xE0 votre agent IA : avant tout ce qui consomme des cr\xE9dits, il vous montre o\xF9 c\u2019est fait, le prix et la dur\xE9e approximative, et vous approuvez."
23741
+ },
23742
+ de: {
23743
+ title: "Ignix Creator auf diesem Computer",
23744
+ intro: "Ignix Creator hat diesen Computer analysiert. Das kann er selbst (kostenlos, nach einem einmaligen Download) und das \xFCbernimmt Ignix Cloud Boost f\xFCr ihn (Ignix-KI-Credits).",
23745
+ machine: "Dieser Computer",
23746
+ what: "Was",
23747
+ here: "Auf diesem Computer",
23748
+ boost: "Auf Cloud Boost",
23749
+ rows: {
23750
+ production_tools: "Videos erstellen und schneiden (Reels von Grund auf, deine Aufnahmen, Clips und Untertitel)",
23751
+ presenter: "Ein sprechender Pr\xE4sentator aus einem Foto",
23752
+ video: "Foto \u2192 Video",
23753
+ h3: "Text \u2192 Video (MiniMax H3)",
23754
+ images: "Bilder",
23755
+ recast: "Die Person in einem Video durch die auf einem Foto ersetzen (zum Beispiel dich)"
23756
+ },
23757
+ installed: "\u2713 Installiert",
23758
+ available: (d, k) => `M\xF6glich: ${d} Download (${k} auf der Festplatte)`,
23759
+ recommendedTag: "empfohlen",
23760
+ notHere: "Auf diesem Computer nicht m\xF6glich",
23761
+ installing: "Wird installiert\u2026",
23762
+ h3Here: (m) => `etwa ${String(m)} Min. pro 5-Sekunden-Clip`,
23763
+ perSecond: (c) => `${String(c)} Credits pro Sekunde`,
23764
+ perImage: (c) => `${String(c)} Credits pro Bild`,
23765
+ localOnly: "Nur auf diesem Computer (kostenlos)",
23766
+ boostOff: "Derzeit nicht verf\xFCgbar",
23767
+ recommendTitle: "Unsere Empfehlung",
23768
+ recommendInstall: (i, s) => `Installiere ${i} (${s}): Dein Agent macht das, wenn du ihn darum bittest, und du genehmigst den Download.`,
23769
+ recommendNothing: "Vorerst musst du nichts installieren: Was dieser Computer nicht kann, macht Cloud Boost.",
23770
+ boostFor: "Hier \xFCbernimmt Cloud Boost",
23771
+ seeExamples: "Sieh, was es macht",
23772
+ howTo: "Bitte deinen KI-Agenten um das, was du willst: Vor allem, was Credits kostet, zeigt er dir, wo es l\xE4uft, den Preis und die ungef\xE4hre Dauer, und du genehmigst es."
23773
+ }
23774
+ };
23775
+ var reelMaker = (lang) => `https://ignix.social${lang === "en" ? "" : `/${lang}`}/ai-reel-maker`;
23776
+ var esc2 = (s) => s.replace(/[&<>"']/g, (c) => `&#${String(c.charCodeAt(0))};`);
23777
+ var numberLang = "en";
23778
+ function size(bytes) {
23779
+ const gb = bytes / 1e9;
23780
+ const n = new Intl.NumberFormat(numberLang, { maximumFractionDigits: 1 });
23781
+ return gb >= 1 ? `${n.format(gb)} GB` : `${n.format(Math.max(1, Math.round(bytes / 1e6)))} MB`;
23782
+ }
23783
+ function here(item, w) {
23784
+ if (!item) return esc2(w.notHere);
23785
+ if (item.id === "h3" && item.h3 && item.state !== "unsupported" && item.h3.minutesFull)
23786
+ return esc2(
23787
+ `${item.state === "installed" ? w.installed : w.available(size(item.downloadBytes), size(item.diskBytes))} \xB7 ${w.h3Here(item.h3.minutesFull)}`
23788
+ );
23789
+ switch (item.state) {
23790
+ case "installed":
23791
+ case "update_available":
23792
+ return esc2(w.installed);
23793
+ case "queued":
23794
+ case "installing":
23795
+ return esc2(w.installing);
23796
+ case "unsupported":
23797
+ return esc2(w.notHere);
23798
+ default:
23799
+ return `${esc2(w.available(size(item.downloadBytes), size(item.diskBytes)))}${item.recommended ? ` <span class="tag">${esc2(w.recommendedTag)}</span>` : ""}`;
23800
+ }
23801
+ }
23802
+ function boost(row, p, w) {
23803
+ const sec = (c) => c === null ? w.boostOff : w.perSecond(c);
23804
+ switch (row) {
23805
+ case "production_tools":
23806
+ return w.localOnly;
23807
+ case "presenter":
23808
+ return p.presenterH3 !== null && p.presenter !== null ? `InfiniteTalk: ${sec(p.presenter)} \xB7 MiniMax H3: ${sec(p.presenterH3)}` : sec(p.presenter);
23809
+ case "video":
23810
+ return sec(p.animate);
23811
+ case "h3":
23812
+ return sec(p.textToVideo);
23813
+ case "images":
23814
+ return p.image === null ? w.boostOff : w.perImage(p.image);
23815
+ case "recast":
23816
+ return sec(p.recast);
23817
+ }
23818
+ }
23819
+ function buildReport(pack, prices, lang) {
23820
+ const w = W[lang];
23821
+ numberLang = lang;
23822
+ const item = (id) => pack.items.find((i) => i.id === id);
23823
+ const toInstall = pack.items.filter(
23824
+ (i) => i.recommended && i.id !== "assistant" && i.state === "not_installed"
23825
+ );
23826
+ const rows = ROWS.map(
23827
+ (r) => `<tr><th scope="row">${esc2(w.rows[r])}${r === "production_tools" ? ` <a href="${reelMaker(lang)}" target="_blank" rel="noopener">${esc2(w.seeExamples)} \u2197</a>` : ""}</th><td>${here(item(r), w)}</td><td>${esc2(boost(r, prices, w))}</td></tr>`
23828
+ ).join("\n");
23829
+ const recommend = toInstall.length ? w.recommendInstall(
23830
+ toInstall.map((i) => `\xAB${w.rows[i.id]}\xBB`).join(", "),
23831
+ size(toInstall.reduce((n, i) => n + i.downloadBytes, 0))
23832
+ ) : w.recommendNothing;
23833
+ const boostFor = pack.cloudBoostFor.length ? `<p>${esc2(w.boostFor)}: ${esc2(
23834
+ pack.cloudBoostFor.map(
23835
+ (k) => k === "images" ? w.rows.images : k === "video" ? w.rows.video : w.rows.presenter
23836
+ ).join(", ")
23837
+ )}.</p>` : "";
23838
+ return `<!doctype html>
23839
+ <html lang="${lang}">
23840
+ <head>
23841
+ <meta charset="utf-8">
23842
+ <meta name="viewport" content="width=device-width, initial-scale=1">
23843
+ <meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'">
23844
+ <title>${esc2(w.title)}</title>
23845
+ <style>
23846
+ :root { color-scheme: light dark; --bg: #fffaf5; --fg: #1c1917; --muted: #78716c; --line: #e7e5e4; --accent: #ea580c; }
23847
+ @media (prefers-color-scheme: dark) { :root { --bg: #1c1917; --fg: #f5f5f4; --muted: #a8a29e; --line: #44403c; } }
23848
+ body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
23849
+ main { max-width: 860px; margin: 0 auto; padding: 32px 16px 48px; }
23850
+ h1 { font-size: 28px; margin: 0 0 8px; } h1 span { color: var(--accent); }
23851
+ p { margin: 8px 0; } .muted { color: var(--muted); }
23852
+ .machine { margin: 20px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
23853
+ table { width: 100%; border-collapse: collapse; margin: 16px 0; }
23854
+ th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
23855
+ thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
23856
+ tbody th { font-weight: 600; }
23857
+ th a { display: block; font-weight: 400; font-size: 14px; color: var(--accent); }
23858
+ .tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--accent); color: #fff; }
23859
+ .rec { margin-top: 24px; padding: 14px 16px; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 6px; }
23860
+ @media (max-width: 600px) { thead { display: none; } tr, td, tbody th { display: block; } td { border: 0; padding: 2px 8px; } tbody th { padding-top: 14px; } }
23861
+ </style>
23862
+ </head>
23863
+ <body><main>
23864
+ <h1><span>Ignix</span> ${esc2(w.title.replace(/^Ignix /, ""))}</h1>
23865
+ <p class="muted">${esc2(w.intro)}</p>
23866
+ <div class="machine"><strong>${esc2(w.machine)}:</strong> ${esc2(pack.machine)}</div>
23867
+ <table>
23868
+ <thead><tr><th>${esc2(w.what)}</th><th>${esc2(w.here)}</th><th>${esc2(w.boost)}</th></tr></thead>
23869
+ <tbody>
23870
+ ${rows}
23871
+ </tbody>
23872
+ </table>
23873
+ <div class="rec"><strong>${esc2(w.recommendTitle)}</strong><p>${esc2(recommend)}</p>${boostFor}</div>
23874
+ <p class="muted">${esc2(w.howTo)}</p>
23875
+ </main></body>
23876
+ </html>
23877
+ `;
23878
+ }
23879
+
23607
23880
  // src/cli.ts
23608
- var VERSION = true ? "0.1.1" : "0.0.0-dev";
23881
+ var VERSION = true ? "0.1.3" : "0.0.0-dev";
23609
23882
  var HELP = `Ignix Creator ${VERSION} - generation tools for AI agents (ADR-0028/0029)
23610
23883
 
23611
23884
  ignix-creator login sign in to Ignix in your browser
23612
23885
  ignix-creator logout
23613
23886
  ignix-creator status account, plan and what waits for your approval
23614
23887
  ignix-creator doctor what this computer can run
23888
+ ignix-creator report open \xABIgnix Creator on this computer\xBB in your browser
23615
23889
  ignix-creator engines local engines and their state
23616
23890
  ignix-creator engines install <item...> [--accept-licence minimax_h3]
23617
23891
  ignix-creator engines cancel stop the install in progress
@@ -23692,6 +23966,7 @@ async function login(paths) {
23692
23966
  }
23693
23967
  process.stdout.write(`Signed in: ${account(s)}
23694
23968
  `);
23969
+ await report(paths).catch(() => void 0);
23695
23970
  return;
23696
23971
  }
23697
23972
  if (s.status === "ineligible" || s.status === "error" || s.status === "signed_out") {
@@ -23700,6 +23975,37 @@ async function login(paths) {
23700
23975
  }
23701
23976
  throw new Error("Sign-in timed out.");
23702
23977
  }
23978
+ async function report(paths) {
23979
+ await ensureService(paths);
23980
+ const pack = (await control(paths, "engines.getPack")).value;
23981
+ const credits = async (what, args) => {
23982
+ const r = await control(paths, "mcp.call", {
23983
+ client: { name: "ignix-creator CLI", version: VERSION },
23984
+ tool: "estimate",
23985
+ args: { what, ...args }
23986
+ });
23987
+ const v = r.value;
23988
+ if (v?.status !== "ok") return null;
23989
+ const d = v.data;
23990
+ return d.cloudBoost === false || typeof d.credits !== "number" ? null : d.credits;
23991
+ };
23992
+ const prices = {
23993
+ presenter: await credits("presenter", { seconds: 1 }),
23994
+ presenterH3: await credits("presenter", { seconds: 1, model: "minimax_h3" }),
23995
+ animate: await credits("animate", { seconds: 1 }),
23996
+ textToVideo: await credits("text_to_video", { seconds: 1 }),
23997
+ recast: await credits("recast", { seconds: 1 }),
23998
+ image: await credits("image", { count: 1 })
23999
+ };
24000
+ const file2 = (0, import_node_path6.join)(paths.home, "report.html");
24001
+ (0, import_node_fs2.writeFileSync)(file2, buildReport(pack, prices, dialogLang(await systemLanguage())), {
24002
+ mode: 384
24003
+ });
24004
+ openUrl(file2);
24005
+ process.stdout.write(`Opened: ${file2}
24006
+ `);
24007
+ return file2;
24008
+ }
23703
24009
  async function main(argv) {
23704
24010
  const paths = cliPaths();
23705
24011
  const [cmd, sub, ...rest] = argv;
@@ -23725,6 +24031,9 @@ async function main(argv) {
23725
24031
  return;
23726
24032
  case "login":
23727
24033
  return login(paths);
24034
+ case "report":
24035
+ await report(paths);
24036
+ return;
23728
24037
  case "logout":
23729
24038
  await ensureService(paths);
23730
24039
  await control(paths, "auth.signOut");
package/dist/core.cjs CHANGED
@@ -22718,14 +22718,16 @@ var MCP_TOOL_INPUTS = {
22718
22718
  prompt: external_exports.string().trim().min(1).max(2e3),
22719
22719
  aspect: Aspect.optional(),
22720
22720
  referenceAssetId: AssetId2.optional(),
22721
- target: external_exports.enum(["auto", "local"]).optional()
22721
+ /** Where it runs: leave it out when only one way is possible; when two are, ask the person and pass their choice. */
22722
+ target: external_exports.enum(["auto", "local", "ignix", "boost"]).optional()
22722
22723
  }).strict(),
22723
22724
  make_video_clip: external_exports.object({
22724
22725
  prompt: external_exports.string().trim().min(1).max(900),
22725
22726
  imageAssetId: AssetId2.optional(),
22726
22727
  model: external_exports.enum(["wan", "minimax_h3"]).optional(),
22727
22728
  seconds: external_exports.number().int().min(2).max(10).optional(),
22728
- aspect: Aspect.optional()
22729
+ aspect: Aspect.optional(),
22730
+ target: external_exports.enum(["auto", "local", "ignix", "boost"]).optional()
22729
22731
  }).strict(),
22730
22732
  make_presenter: external_exports.object({
22731
22733
  /** The presenter's photo (a face looking at the camera). */
@@ -22739,7 +22741,8 @@ var MCP_TOOL_INPUTS = {
22739
22741
  /** The exact words of the audio: required for MiniMax H3 (it says them itself). */
22740
22742
  line: external_exports.string().trim().min(1).max(400).optional(),
22741
22743
  language: Language.optional(),
22742
- aspect: Aspect.optional()
22744
+ aspect: Aspect.optional(),
22745
+ target: external_exports.enum(["auto", "local", "ignix", "boost"]).optional()
22743
22746
  }).strict(),
22744
22747
  transcribe: external_exports.object({ assetId: AssetId2 }).strict(),
22745
22748
  find_faces: external_exports.object({ assetId: AssetId2 }).strict(),
@@ -22911,21 +22914,21 @@ var MCP_TOOL_META = {
22911
22914
  },
22912
22915
  make_image: {
22913
22916
  title: "Make an image",
22914
- description: "An image from your prompt (used as is). Made on this computer when it can; a paid route waits on the card (choose_route).",
22917
+ description: "An image from your prompt (used as is). Where it runs is priced before anything starts: with one possible way, the approval says where, its credits and roughly how long, and approving starts it; with two (e.g. free on this computer but slow, or Cloud Boost), it answers `needsChoice` with each way \u2014 tell the person and call again with `target`; with none, it says why (get_engines says what this computer can run).",
22915
22918
  readOnly: false,
22916
22919
  spend: "with_approval",
22917
22920
  openWorld: true
22918
22921
  },
22919
22922
  make_video_clip: {
22920
22923
  title: "Make a video clip",
22921
- description: "A short generated clip: a photo brought to life (`imageAssetId`, Wan or MiniMax H3) or text \u2192 video (MiniMax H3). This computer or Cloud Boost, chosen on the card (choose_route).",
22924
+ description: "A short generated clip: a photo brought to life (`imageAssetId`, Wan or MiniMax H3) or text \u2192 video (MiniMax H3). Where it runs is priced before anything starts: with one possible way, the approval says where, its credits and roughly how long, and approving starts it; with two (e.g. free on this computer but slow, or Cloud Boost), it answers `needsChoice` with each way \u2014 tell the person and call again with `target`; with none, it says why (get_engines says what this computer can run).",
22922
22925
  readOnly: false,
22923
22926
  spend: "with_approval",
22924
22927
  openWorld: true
22925
22928
  },
22926
22929
  make_presenter: {
22927
22930
  title: "Make a presenter",
22928
- description: "A talking presenter from a photo and ONE voice line (\u2264 8.5 s): InfiniteTalk lip-syncs the audio (default), or MiniMax H3 says `line` in that voice. For a longer script call it once per line and join the clips in Ignix Editor. This computer or Cloud Boost, chosen on the card (choose_route): a paid route or a photo of a real person waits for the person\u2019s approval there (needs_approval).",
22931
+ description: "A talking presenter from a photo and ONE voice line (\u2264 8.5 s): InfiniteTalk lip-syncs the audio (default), or MiniMax H3 says `line` in that voice. For a longer script call it once per line and join the clips in Ignix Editor. A photo of a real person also needs the person\u2019s consent in the same approval. Where it runs is priced before anything starts: with one possible way, the approval says where, its credits and roughly how long, and approving starts it; with two (e.g. free on this computer but slow, or Cloud Boost), it answers `needsChoice` with each way \u2014 tell the person and call again with `target`; with none, it says why (get_engines says what this computer can run).",
22929
22932
  readOnly: false,
22930
22933
  spend: "with_approval",
22931
22934
  openWorld: true
@@ -57846,6 +57849,9 @@ ${es ? "A partir de ahora lo sigo en cada v\xEDdeo, salvo que me pidas otra cosa
57846
57849
  const text2 = rec7.error === "not_set_up" ? final.caption ? reply2.notSetUp : reply2.notSetUpNoCopy : rec7.target === null && !rec7.error ? final.caption ? reply2.choose : reply2.chooseNoCopy : rec7.note === "allowance_exhausted" ? reply2.exhausted : final.caption ? reply2.started : reply2.startedNoCopy;
57847
57850
  return { jobId: rec7.jobId, text: text2, usedModel };
57848
57851
  },
57852
+ async quote(request2) {
57853
+ return perTarget(await deps.engine.plan(request2).catch(() => [])).map(routeOption);
57854
+ },
57849
57855
  async generate(g) {
57850
57856
  const rec7 = {
57851
57857
  jobId: newJobId(),
@@ -61217,18 +61223,18 @@ var EN2 = {
61217
61223
  yourTranslations: "Your translations.",
61218
61224
  linesVoiced: (n) => `${String(n)} lines voiced.`,
61219
61225
  noVoice: "No voice.",
61220
- recast: "Put a person in a video (checks first, the price on its card)",
61226
+ recast: "Swap the person in a video for the one in a photo (checks first, the price on its card)",
61221
61227
  makeImage: "Make an image",
61222
61228
  makeClip: "Make a video clip",
61223
61229
  makePresenter: "Make a presenter",
61224
61230
  installHere: (e) => `Install on this computer: ${e ? e.map(
61225
61231
  (i) => ({
61226
- production_tools: "video tools (editing, rendering, transcription)",
61232
+ production_tools: "the tools to make and edit videos",
61227
61233
  assistant: "a local writing assistant",
61228
61234
  images: "local image generation",
61229
61235
  video: "local video generation",
61230
61236
  presenter: "a local talking presenter",
61231
- recast: "putting a person in a video, locally",
61237
+ recast: "swapping the person in a video for the one in a photo, locally",
61232
61238
  h3: "the MiniMax H3 video model"
61233
61239
  })[i]
61234
61240
  ).join(", ") : "the tools recommended for it"}`,
@@ -61236,7 +61242,12 @@ var EN2 = {
61236
61242
  acceptsH3Licence: "Accepts the MiniMax H3 Community License.",
61237
61243
  uploadToIgnix: (k, mb) => `Upload to Ignix (${k}, ${String(mb)} MB)`,
61238
61244
  toWorkspace: (n) => `To workspace \xAB${n}\xBB.`,
61239
- consentDetail: "Uses photos or videos of people: approving confirms they are you or consented."
61245
+ consentDetail: "Uses photos or videos of people: approving confirms they are you or consented.",
61246
+ whereLocal: (eta) => `On this computer, free${eta ? `, about ${eta}` : ""}.`,
61247
+ whereBoost: (eta) => `On Ignix Cloud Boost${eta ? `, about ${eta}` : ""}.`,
61248
+ whereIgnix: (eta) => `With Ignix AI${eta ? `, about ${eta}` : ""}.`,
61249
+ modelInfiniteTalk: "Model: InfiniteTalk (lip-syncs your exact voice line).",
61250
+ modelH3: "Model: MiniMax H3 (says the line itself in a voice cloned from yours; may add a word at the end)."
61240
61251
  };
61241
61252
  var ES2 = {
61242
61253
  piece: (k) => ({ reel: "reel", story: "historia", post: "publicaci\xF3n" })[k] ?? k,
@@ -61264,18 +61275,18 @@ var ES2 = {
61264
61275
  yourTranslations: "Tus traducciones.",
61265
61276
  linesVoiced: (n) => `${String(n)} frases con voz.`,
61266
61277
  noVoice: "Sin voz.",
61267
- recast: "Poner a una persona en un v\xEDdeo (primero se comprueba; el precio, en su tarjeta)",
61278
+ recast: "Cambiar a la persona de un v\xEDdeo por la de una foto (primero se comprueba; el precio, en su tarjeta)",
61268
61279
  makeImage: "Crear una imagen",
61269
61280
  makeClip: "Crear un clip de v\xEDdeo",
61270
61281
  makePresenter: "Crear un presentador",
61271
61282
  installHere: (e) => `Instalar en este ordenador: ${e ? e.map(
61272
61283
  (i) => ({
61273
- production_tools: "herramientas de v\xEDdeo (edici\xF3n, render y transcripci\xF3n)",
61284
+ production_tools: "las herramientas para crear y editar v\xEDdeos",
61274
61285
  assistant: "un asistente de escritura local",
61275
61286
  images: "generaci\xF3n de im\xE1genes local",
61276
61287
  video: "generaci\xF3n de v\xEDdeo local",
61277
61288
  presenter: "un presentador que habla, en local",
61278
- recast: "poner a una persona en un v\xEDdeo, en local",
61289
+ recast: "cambiar a la persona de un v\xEDdeo por la de una foto, en local",
61279
61290
  h3: "el modelo de v\xEDdeo MiniMax H3"
61280
61291
  })[i]
61281
61292
  ).join(", ") : "las herramientas recomendadas para \xE9l"}`,
@@ -61283,7 +61294,12 @@ var ES2 = {
61283
61294
  acceptsH3Licence: "Acepta la licencia comunitaria de MiniMax H3.",
61284
61295
  uploadToIgnix: (k, mb) => `Subir a Ignix (${k}, ${String(mb).replace(".", ",")} MB)`,
61285
61296
  toWorkspace: (n) => `Al espacio de trabajo \xAB${n}\xBB.`,
61286
- consentDetail: "Usa fotos o v\xEDdeos de personas: al aprobar confirmas que eres t\xFA o que han dado su consentimiento."
61297
+ consentDetail: "Usa fotos o v\xEDdeos de personas: al aprobar confirmas que eres t\xFA o que han dado su consentimiento.",
61298
+ whereLocal: (eta) => `En este ordenador, gratis${eta ? `, unos ${eta}` : ""}.`,
61299
+ whereBoost: (eta) => `En Cloud Boost de Ignix${eta ? `, unos ${eta}` : ""}.`,
61300
+ whereIgnix: (eta) => `Con la IA de Ignix${eta ? `, unos ${eta}` : ""}.`,
61301
+ modelInfiniteTalk: "Modelo: InfiniteTalk (sincroniza los labios con tu voz exacta).",
61302
+ modelH3: "Modelo: MiniMax H3 (dice la frase \xE9l mismo con una voz clonada de la tuya; a veces a\xF1ade una palabra al final)."
61287
61303
  };
61288
61304
  var PT = {
61289
61305
  piece: (k) => ({ reel: "reel", story: "story", post: "post" })[k] ?? k,
@@ -61311,18 +61327,18 @@ var PT = {
61311
61327
  yourTranslations: "Suas tradu\xE7\xF5es.",
61312
61328
  linesVoiced: (n) => `${String(n)} falas com voz.`,
61313
61329
  noVoice: "Sem voz.",
61314
- recast: "Colocar uma pessoa em um v\xEDdeo (verifica primeiro; o pre\xE7o fica no cart\xE3o)",
61330
+ recast: "Trocar a pessoa de um v\xEDdeo pela de uma foto (verifica primeiro; o pre\xE7o fica no cart\xE3o)",
61315
61331
  makeImage: "Criar uma imagem",
61316
61332
  makeClip: "Criar um clipe de v\xEDdeo",
61317
61333
  makePresenter: "Criar um apresentador",
61318
61334
  installHere: (e) => `Instalar neste computador: ${e ? e.map(
61319
61335
  (i) => ({
61320
- production_tools: "ferramentas de v\xEDdeo (edi\xE7\xE3o, renderiza\xE7\xE3o e transcri\xE7\xE3o)",
61336
+ production_tools: "as ferramentas para criar e editar v\xEDdeos",
61321
61337
  assistant: "um assistente de escrita local",
61322
61338
  images: "gera\xE7\xE3o de imagens local",
61323
61339
  video: "gera\xE7\xE3o de v\xEDdeo local",
61324
61340
  presenter: "um apresentador que fala, local",
61325
- recast: "colocar uma pessoa em um v\xEDdeo, local",
61341
+ recast: "trocar a pessoa de um v\xEDdeo pela de uma foto, local",
61326
61342
  h3: "o modelo de v\xEDdeo MiniMax H3"
61327
61343
  })[i]
61328
61344
  ).join(", ") : "as ferramentas recomendadas para ele"}`,
@@ -61330,7 +61346,12 @@ var PT = {
61330
61346
  acceptsH3Licence: "Aceita a licen\xE7a comunit\xE1ria do MiniMax H3.",
61331
61347
  uploadToIgnix: (k, mb) => `Enviar para a Ignix (${k}, ${String(mb).replace(".", ",")} MB)`,
61332
61348
  toWorkspace: (n) => `Para o espa\xE7o de trabalho \xAB${n}\xBB.`,
61333
- consentDetail: "Usa fotos ou v\xEDdeos de pessoas: ao aprovar, voc\xEA confirma que \xE9 voc\xEA ou que elas consentiram."
61349
+ consentDetail: "Usa fotos ou v\xEDdeos de pessoas: ao aprovar, voc\xEA confirma que \xE9 voc\xEA ou que elas consentiram.",
61350
+ whereLocal: (eta) => `Neste computador, gr\xE1tis${eta ? `, cerca de ${eta}` : ""}.`,
61351
+ whereBoost: (eta) => `No Cloud Boost da Ignix${eta ? `, cerca de ${eta}` : ""}.`,
61352
+ whereIgnix: (eta) => `Com a IA da Ignix${eta ? `, cerca de ${eta}` : ""}.`,
61353
+ modelInfiniteTalk: "Modelo: InfiniteTalk (sincroniza os l\xE1bios com a sua voz exata).",
61354
+ modelH3: "Modelo: MiniMax H3 (diz a frase ele mesmo com uma voz clonada da sua; \xE0s vezes acrescenta uma palavra no final)."
61334
61355
  };
61335
61356
  var FR = {
61336
61357
  piece: (k) => ({ reel: "reel", story: "story", post: "publication" })[k] ?? k,
@@ -61358,18 +61379,18 @@ var FR = {
61358
61379
  yourTranslations: "Vos traductions.",
61359
61380
  linesVoiced: (n) => `${String(n)} r\xE9pliques avec voix.`,
61360
61381
  noVoice: "Sans voix.",
61361
- recast: "Mettre une personne dans une vid\xE9o (v\xE9rification d\u2019abord ; le prix figure sur sa fiche)",
61382
+ recast: "Remplacer la personne d\u2019une vid\xE9o par celle d\u2019une photo (v\xE9rification d\u2019abord ; le prix figure sur sa fiche)",
61362
61383
  makeImage: "Cr\xE9er une image",
61363
61384
  makeClip: "Cr\xE9er un clip vid\xE9o",
61364
61385
  makePresenter: "Cr\xE9er un pr\xE9sentateur",
61365
61386
  installHere: (e) => `Installer sur cet ordinateur : ${e ? e.map(
61366
61387
  (i) => ({
61367
- production_tools: "les outils vid\xE9o (montage, rendu, transcription)",
61388
+ production_tools: "les outils pour cr\xE9er et monter des vid\xE9os",
61368
61389
  assistant: "un assistant de r\xE9daction local",
61369
61390
  images: "la g\xE9n\xE9ration d\u2019images en local",
61370
61391
  video: "la g\xE9n\xE9ration de vid\xE9os en local",
61371
61392
  presenter: "un pr\xE9sentateur qui parle, en local",
61372
- recast: "mettre une personne dans une vid\xE9o, en local",
61393
+ recast: "remplacer la personne d\u2019une vid\xE9o par celle d\u2019une photo, en local",
61373
61394
  h3: "le mod\xE8le vid\xE9o MiniMax H3"
61374
61395
  })[i]
61375
61396
  ).join(", ") : "les outils recommand\xE9s pour lui"}`,
@@ -61377,7 +61398,12 @@ var FR = {
61377
61398
  acceptsH3Licence: "Accepte la licence communautaire de MiniMax H3.",
61378
61399
  uploadToIgnix: (k, mb) => `Envoyer vers Ignix (${k}, ${String(mb).replace(".", ",")} Mo)`,
61379
61400
  toWorkspace: (n) => `Dans l\u2019espace de travail \xAB ${n} \xBB.`,
61380
- consentDetail: "Utilise des photos ou vid\xE9os de personnes : approuver confirme qu\u2019il s\u2019agit de vous ou qu\u2019elles ont consenti."
61401
+ consentDetail: "Utilise des photos ou vid\xE9os de personnes : approuver confirme qu\u2019il s\u2019agit de vous ou qu\u2019elles ont consenti.",
61402
+ whereLocal: (eta) => `Sur cet ordinateur, gratuit${eta ? `, environ ${eta}` : ""}.`,
61403
+ whereBoost: (eta) => `Sur Cloud Boost d\u2019Ignix${eta ? `, environ ${eta}` : ""}.`,
61404
+ whereIgnix: (eta) => `Avec l\u2019IA d\u2019Ignix${eta ? `, environ ${eta}` : ""}.`,
61405
+ modelInfiniteTalk: "Mod\xE8le : InfiniteTalk (synchronise les l\xE8vres sur votre voix exacte).",
61406
+ modelH3: "Mod\xE8le : MiniMax H3 (dit la phrase lui-m\xEAme avec une voix clon\xE9e de la v\xF4tre ; ajoute parfois un mot \xE0 la fin)."
61381
61407
  };
61382
61408
  var DE = {
61383
61409
  piece: (k) => ({ reel: "Reel", story: "Story", post: "Post" })[k] ?? k,
@@ -61405,18 +61431,18 @@ var DE = {
61405
61431
  yourTranslations: "Deine \xDCbersetzungen.",
61406
61432
  linesVoiced: (n) => `${String(n)} gesprochene Zeilen.`,
61407
61433
  noVoice: "Ohne Stimme.",
61408
- recast: "Eine Person in ein Video setzen (erst wird gepr\xFCft; der Preis steht auf der Karte)",
61434
+ recast: "Die Person in einem Video durch die auf einem Foto ersetzen (erst wird gepr\xFCft; der Preis steht auf der Karte)",
61409
61435
  makeImage: "Ein Bild erstellen",
61410
61436
  makeClip: "Einen Videoclip erstellen",
61411
61437
  makePresenter: "Einen Pr\xE4sentator erstellen",
61412
61438
  installHere: (e) => `Auf diesem Computer installieren: ${e ? e.map(
61413
61439
  (i) => ({
61414
- production_tools: "Video-Werkzeuge (Schnitt, Rendering, Transkription)",
61440
+ production_tools: "die Werkzeuge zum Erstellen und Schneiden von Videos",
61415
61441
  assistant: "einen lokalen Schreibassistenten",
61416
61442
  images: "lokale Bildgenerierung",
61417
61443
  video: "lokale Videogenerierung",
61418
61444
  presenter: "einen sprechenden Pr\xE4sentator, lokal",
61419
- recast: "eine Person in ein Video setzen, lokal",
61445
+ recast: "die Person in einem Video durch die auf einem Foto ersetzen, lokal",
61420
61446
  h3: "das Videomodell MiniMax H3"
61421
61447
  })[i]
61422
61448
  ).join(", ") : "die daf\xFCr empfohlenen Werkzeuge"}`,
@@ -61424,12 +61450,21 @@ var DE = {
61424
61450
  acceptsH3Licence: "Akzeptiert die MiniMax H3 Community License.",
61425
61451
  uploadToIgnix: (k, mb) => `Zu Ignix hochladen (${k}, ${String(mb).replace(".", ",")} MB)`,
61426
61452
  toWorkspace: (n) => `In den Workspace \xAB${n}\xBB.`,
61427
- consentDetail: "Verwendet Fotos oder Videos von Personen: Mit der Genehmigung best\xE4tigst du, dass du es bist oder sie zugestimmt haben."
61453
+ consentDetail: "Verwendet Fotos oder Videos von Personen: Mit der Genehmigung best\xE4tigst du, dass du es bist oder sie zugestimmt haben.",
61454
+ whereLocal: (eta) => `Auf diesem Computer, kostenlos${eta ? `, etwa ${eta}` : ""}.`,
61455
+ whereBoost: (eta) => `Auf Ignix Cloud Boost${eta ? `, etwa ${eta}` : ""}.`,
61456
+ whereIgnix: (eta) => `Mit der Ignix-KI${eta ? `, etwa ${eta}` : ""}.`,
61457
+ modelInfiniteTalk: "Modell: InfiniteTalk (synchronisiert die Lippen mit deiner genauen Stimme).",
61458
+ modelH3: "Modell: MiniMax H3 (spricht den Satz selbst mit einer aus deiner geklonten Stimme; h\xE4ngt manchmal ein Wort an)."
61428
61459
  };
61429
61460
  var TEXTS = { en: EN2, es: ES2, pt: PT, fr: FR, de: DE };
61430
61461
  function approvalText(lang) {
61431
61462
  return TEXTS[lang];
61432
61463
  }
61464
+ function etaText(seconds) {
61465
+ if (!seconds || seconds <= 0) return null;
61466
+ return seconds < 90 ? `${String(Math.round(seconds))} s` : `${String(Math.round(seconds / 60))} min`;
61467
+ }
61433
61468
 
61434
61469
  // ../../packages/core/src/mcp/service.ts
61435
61470
  var ok2 = (data) => ({ status: "ok", data });
@@ -61569,7 +61604,9 @@ function createMcpService(deps) {
61569
61604
  tool: c.tool,
61570
61605
  kinds,
61571
61606
  title: opts.title,
61572
- details: [...opts.details ?? [], ...needConsent ? [T2.consentDetail] : []],
61607
+ // Consent is said by its kind (the dialog and the window both show it): a
61608
+ // detail line repeating it read twice (Fran, 2026-10-12).
61609
+ details: [...opts.details ?? []],
61573
61610
  credits,
61574
61611
  jobId: opts.jobId ?? null,
61575
61612
  paid: Boolean(opts.spend || opts.write || opts.download),
@@ -61588,6 +61625,54 @@ function createMcpService(deps) {
61588
61625
  message: `Waiting for the person to approve it in Ignix Creator on this computer (\xAB${opts.title.slice(0, 200)}\xBB). Tell them an approval is waiting; poll get_approval with this approvalId; nothing happens until they decide.`
61589
61626
  };
61590
61627
  }
61628
+ async function routed(c, o, start3) {
61629
+ const quoted2 = await Promise.all(
61630
+ o.variants.map(async (v) => ({
61631
+ v,
61632
+ options: await deps.content.quote?.(v.request).catch(() => []) ?? []
61633
+ }))
61634
+ );
61635
+ const creditsOf = (v, x) => x.cost.unit === "none" ? 0 : x.cost.unit === "boost" ? v.boostCredits : x.cost.amount;
61636
+ const all = quoted2.flatMap(({ v, options: options2 }) => options2.map((x) => ({ v, x })));
61637
+ const way = ({ v, x }) => ({
61638
+ ...v.model ? { model: v.model } : {},
61639
+ target: x.target,
61640
+ available: x.available,
61641
+ reason: x.reason,
61642
+ estimateSeconds: x.estimateSeconds,
61643
+ credits: creditsOf(v, x),
61644
+ ...v.note ? { note: v.note } : {}
61645
+ });
61646
+ const wanted = o.target && o.target !== "auto" ? o.target : null;
61647
+ const usable = all.filter((w) => w.x.available && (!wanted || w.x.target === wanted));
61648
+ if (usable.length > 1)
61649
+ return ok2({
61650
+ needsChoice: true,
61651
+ ways: usable.map(way),
61652
+ unavailable: all.filter((w) => !w.x.available).map(way),
61653
+ message: "It can be made in more than one way. Tell the person each one in plain words \u2014 model and what it does, where (local = their computer, free; boost = Ignix Cloud Boost; ignix = Ignix AI), its credits and roughly how long \u2014 and what cannot run here and why; then call again with their `target` (and `model`)."
61654
+ });
61655
+ const pick2 = usable[0];
61656
+ if (!pick2)
61657
+ return err(
61658
+ "unavailable",
61659
+ `${wanted ? `It cannot be made on \xAB${wanted}\xBB here.` : "Nothing can make it here right now."} Ways and why: ${JSON.stringify(all.map(way))}. get_engines says what this computer can run and what to install.`
61660
+ );
61661
+ const credits = pick2.x.cost.unit === "none" ? null : creditsOf(pick2.v, pick2.x);
61662
+ const eta = etaText(pick2.x.estimateSeconds);
61663
+ const where = pick2.x.target === "local" ? T2.whereLocal(eta) : pick2.x.target === "boost" ? T2.whereBoost(eta) : T2.whereIgnix(eta);
61664
+ return gate(
61665
+ c,
61666
+ {
61667
+ spend: pick2.x.target !== "local",
61668
+ visual: o.visual,
61669
+ title: o.title,
61670
+ details: [where, ...pick2.v.label ? [pick2.v.label] : [], ...o.details ?? []],
61671
+ credits
61672
+ },
61673
+ () => start3(pick2.v, pick2.x.target)
61674
+ );
61675
+ }
61591
61676
  async function start2(c, o) {
61592
61677
  let out;
61593
61678
  try {
@@ -62112,18 +62197,27 @@ function createMcpService(deps) {
62112
62197
  count: 1,
62113
62198
  references: ref ? [ref.id] : []
62114
62199
  };
62115
- return gate(c, { visual: ref ? [ref] : [], title: T2.makeImage }, async () => {
62116
- const jobId = await deps.content.generate?.({
62117
- request: request2,
62118
- aspect,
62119
- referenceAssetId: ref?.id ?? null,
62120
- headline: a.prompt.slice(0, 80),
62121
- preference: a.target === "local" ? "local" : "auto"
62122
- });
62123
- if (!jobId) return err("unavailable", "Image generation is not available here.");
62124
- deps.chat.showJob(jobId, `${c.client.name}: an image \u2014 \u201C${a.prompt.slice(0, 120)}\u201D`);
62125
- return ok2({ jobId, job: jobView(jobId) });
62126
- });
62200
+ const visual = ref ? [ref] : [];
62201
+ const R = (await rates(AbortSignal.timeout(1e4))).rates;
62202
+ const variants = [
62203
+ { model: null, note: null, label: null, request: request2, boostCredits: R.image }
62204
+ ];
62205
+ return routed(
62206
+ c,
62207
+ { variants, target: a.target, visual, title: T2.makeImage },
62208
+ async (_v, target) => {
62209
+ const jobId = await deps.content.generate?.({
62210
+ request: request2,
62211
+ aspect,
62212
+ referenceAssetId: ref?.id ?? null,
62213
+ headline: a.prompt.slice(0, 80),
62214
+ preference: target
62215
+ });
62216
+ if (!jobId) return err("unavailable", "Image generation is not available here.");
62217
+ deps.chat.showJob(jobId, `${c.client.name}: an image \u2014 \u201C${a.prompt.slice(0, 120)}\u201D`);
62218
+ return ok2({ jobId, job: jobView(jobId) });
62219
+ }
62220
+ );
62127
62221
  },
62128
62222
  async make_video_clip(a, c) {
62129
62223
  const image = a.imageAssetId ? asset(a.imageAssetId) : null;
@@ -62143,18 +62237,26 @@ function createMcpService(deps) {
62143
62237
  aspect,
62144
62238
  ...a.model ? { model: a.model } : {}
62145
62239
  } : { kind: "video", prompt: a.prompt, aspect, durationSec: seconds, references: [] };
62146
- return gate(c, { visual: image ? [image] : [], title: T2.makeClip }, async () => {
62147
- const jobId = await deps.content.generate?.({
62148
- request: request2,
62149
- aspect,
62150
- referenceAssetId: image?.id ?? null,
62151
- headline: a.prompt.slice(0, 80),
62152
- preference: "auto"
62153
- });
62154
- if (!jobId) return err("unavailable", "Video generation is not available here.");
62155
- deps.chat.showJob(jobId, `${c.client.name}: a video clip \u2014 \u201C${a.prompt.slice(0, 120)}\u201D`);
62156
- return ok2({ jobId, job: jobView(jobId) });
62157
- });
62240
+ const visual = image ? [image] : [];
62241
+ const variants = [
62242
+ { model: null, note: null, label: null, request: request2, boostCredits: boostCreditsFor(request2) }
62243
+ ];
62244
+ return routed(
62245
+ c,
62246
+ { variants, target: a.target, visual, title: T2.makeClip },
62247
+ async (_v, target) => {
62248
+ const jobId = await deps.content.generate?.({
62249
+ request: request2,
62250
+ aspect,
62251
+ referenceAssetId: image?.id ?? null,
62252
+ headline: a.prompt.slice(0, 80),
62253
+ preference: target
62254
+ });
62255
+ if (!jobId) return err("unavailable", "Video generation is not available here.");
62256
+ deps.chat.showJob(jobId, `${c.client.name}: a video clip \u2014 \u201C${a.prompt.slice(0, 120)}\u201D`);
62257
+ return ok2({ jobId, job: jobView(jobId) });
62258
+ }
62259
+ );
62158
62260
  },
62159
62261
  async make_presenter(a, c) {
62160
62262
  const photo = asset(a.photoAssetId);
@@ -62162,43 +62264,60 @@ function createMcpService(deps) {
62162
62264
  const voice = asset(a.audioAssetId);
62163
62265
  if (voice?.kind !== "audio")
62164
62266
  return err("not_found", "No such audio (import the voice line first).");
62165
- const h3 = a.model === "minimax_h3";
62166
- const max = h3 ? H3_PRESENTER_MAX_LINE_SEC : PRESENTER_MAX_LINE_SEC;
62167
- if (voice.durationSec !== null && voice.durationSec > max)
62168
- return err(
62169
- "invalid_arguments",
62170
- `One voice line per call, up to ${String(max)} s: split longer audio at its pauses (transcribe gives them) and make one presenter clip per line.`
62171
- );
62172
- if (h3 && !a.line)
62267
+ if (a.model === "minimax_h3" && !a.line)
62173
62268
  return err(
62174
62269
  "invalid_arguments",
62175
62270
  "MiniMax H3 says the line itself: give `line`, the exact words of the audio."
62176
62271
  );
62177
62272
  const aspect = a.aspect ?? "9:16";
62178
62273
  const scene = a.prompt ?? "A person talking to the camera like a UGC creator, natural head movement and expressions that follow the voice.";
62179
- const request2 = {
62180
- kind: "presenter",
62181
- image: photo.id,
62182
- audio: voice.id,
62183
- prompt: h3 ? h3PresenterPrompt(scene, a.line ?? "", a.language ?? "en") : scene.slice(0, 900),
62184
- aspect,
62185
- ...h3 ? { model: "minimax_h3" } : {}
62186
- };
62187
- return gate(c, { visual: [photo], title: T2.makePresenter }, async () => {
62188
- const jobId = await deps.content.generate?.({
62189
- request: request2,
62190
- aspect,
62191
- referenceAssetId: photo.id,
62192
- headline: (a.line ?? scene).slice(0, 80),
62193
- preference: "auto"
62194
- });
62195
- if (!jobId) return err("unavailable", "Presenters are not available here.");
62196
- deps.chat.showJob(
62197
- jobId,
62198
- `${c.client.name}: a presenter \u2014 \u201C${(a.line ?? scene).slice(0, 120)}\u201D`
62274
+ const sec2 = Math.ceil(voice.durationSec ?? PRESENTER_MAX_LINE_SEC);
62275
+ const R = (await rates(AbortSignal.timeout(1e4))).rates;
62276
+ const models = (a.model ? [a.model] : a.line ? ["wan", "minimax_h3"] : ["wan"]).filter(
62277
+ (m) => voice.durationSec === null || voice.durationSec <= (m === "minimax_h3" ? H3_PRESENTER_MAX_LINE_SEC : PRESENTER_MAX_LINE_SEC)
62278
+ );
62279
+ if (!models.length)
62280
+ return err(
62281
+ "invalid_arguments",
62282
+ `One voice line per call, up to ${String(a.model === "minimax_h3" ? H3_PRESENTER_MAX_LINE_SEC : PRESENTER_MAX_LINE_SEC)} s: split longer audio at its pauses (transcribe gives them) and make one presenter clip per line.`
62199
62283
  );
62200
- return ok2({ jobId, job: jobView(jobId) });
62284
+ const variants = models.map((m) => {
62285
+ const h3 = m === "minimax_h3";
62286
+ return {
62287
+ model: models.length > 1 || a.model ? m : null,
62288
+ note: h3 ? "MiniMax H3: says the line itself in a voice cloned from the voice line; livelier, but may add a word at the end." : "InfiniteTalk: lip-syncs the exact voice line.",
62289
+ label: h3 ? T2.modelH3 : T2.modelInfiniteTalk,
62290
+ request: {
62291
+ kind: "presenter",
62292
+ image: photo.id,
62293
+ audio: voice.id,
62294
+ prompt: h3 ? h3PresenterPrompt(scene, a.line ?? "", a.language ?? "en") : scene.slice(0, 900),
62295
+ aspect,
62296
+ ...h3 ? { model: "minimax_h3" } : {}
62297
+ },
62298
+ boostCredits: (h3 ? R.boostH3Second : R.boostOutputSecond) * sec2
62299
+ };
62201
62300
  });
62301
+ const visual = [photo];
62302
+ return routed(
62303
+ c,
62304
+ { variants, target: a.target, visual, title: T2.makePresenter },
62305
+ async (v, target) => {
62306
+ const jobId = await deps.content.generate?.({
62307
+ request: v.request,
62308
+ aspect,
62309
+ referenceAssetId: photo.id,
62310
+ headline: (a.line ?? scene).slice(0, 80),
62311
+ preference: target
62312
+ });
62313
+ if (!jobId) return err("unavailable", "Presenters are not available here.");
62314
+ deps.chat.showJob(
62315
+ jobId,
62316
+ `${c.client.name}: a presenter \u2014 \u201C${(a.line ?? scene).slice(0, 120)}\u201D`
62317
+ );
62318
+ return ok2({ jobId, job: jobView(jobId) });
62319
+ }
62320
+ );
62202
62321
  },
62203
62322
  async transcribe(a) {
62204
62323
  const m = asset(a.assetId);
@@ -63171,6 +63290,12 @@ async function start(init, port) {
63171
63290
  // The video provider, capped at what the card quoted (ADR-0022 O6, O7;
63172
63291
  // text → video is MiniMax H3's, quoted only when Ignix enables it).
63173
63292
  boostVideo.authorize(request2, { maxCredits: boostCreditsFor(request2) ?? 0 })
63293
+ ) : request2.kind === "presenter" ? (
63294
+ // A presenter is also the video provider's (InfiniteTalk / H3). It
63295
+ // went to the IMAGE provider, which refused it: the job failed at
63296
+ // once (Fran, 2026-10-12). Its price comes from the voice line, known
63297
+ // when it runs, as in the studio (no cap here; the approval showed it).
63298
+ boostVideo.authorize(request2)
63174
63299
  ) : boost.authorize(request2) : false,
63175
63300
  plan: async (aspect) => {
63176
63301
  const t = await images.target();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignix-social/creator",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Ignix Creator: generation tools (presenters, photo → video, text → video, recast, dubbing) on this computer or Cloud Boost, driven by AI agents over MCP. Needs an active Ignix plan.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "commonjs",