@ignix-social/creator 0.1.2 → 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 +323 -17
  2. package/dist/core.cjs +122 -74
  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) {
@@ -22127,7 +22128,7 @@ async function removeStaleSocket(path) {
22127
22128
  // ../desktop/main/mcp/lines.ts
22128
22129
  function createLineReader(maxBytes, onLine, onOverflow) {
22129
22130
  let parts = [];
22130
- let size = 0;
22131
+ let size2 = 0;
22131
22132
  let dead = false;
22132
22133
  return (chunk) => {
22133
22134
  if (dead) return;
@@ -22135,8 +22136,8 @@ function createLineReader(maxBytes, onLine, onOverflow) {
22135
22136
  for (; ; ) {
22136
22137
  const nl = buf.indexOf(10);
22137
22138
  if (nl === -1) {
22138
- size += buf.length;
22139
- if (size > maxBytes) {
22139
+ size2 += buf.length;
22140
+ if (size2 > maxBytes) {
22140
22141
  dead = true;
22141
22142
  parts = [];
22142
22143
  onOverflow();
@@ -22146,7 +22147,7 @@ function createLineReader(maxBytes, onLine, onOverflow) {
22146
22147
  return;
22147
22148
  }
22148
22149
  const head = buf.subarray(0, nl);
22149
- if (size + head.length > maxBytes) {
22150
+ if (size2 + head.length > maxBytes) {
22150
22151
  dead = true;
22151
22152
  parts = [];
22152
22153
  onOverflow();
@@ -22154,7 +22155,7 @@ function createLineReader(maxBytes, onLine, onOverflow) {
22154
22155
  }
22155
22156
  const line = Buffer.concat([...parts, head]).toString("utf8").replace(/\r$/, "");
22156
22157
  parts = [];
22157
- size = 0;
22158
+ size2 = 0;
22158
22159
  buf = buf.subarray(nl + 1);
22159
22160
  if (line.trim()) onLine(line);
22160
22161
  }
@@ -23607,14 +23608,284 @@ async function runService(paths, version2) {
23607
23608
  });
23608
23609
  }
23609
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
+
23610
23880
  // src/cli.ts
23611
- var VERSION = true ? "0.1.2" : "0.0.0-dev";
23881
+ var VERSION = true ? "0.1.3" : "0.0.0-dev";
23612
23882
  var HELP = `Ignix Creator ${VERSION} - generation tools for AI agents (ADR-0028/0029)
23613
23883
 
23614
23884
  ignix-creator login sign in to Ignix in your browser
23615
23885
  ignix-creator logout
23616
23886
  ignix-creator status account, plan and what waits for your approval
23617
23887
  ignix-creator doctor what this computer can run
23888
+ ignix-creator report open \xABIgnix Creator on this computer\xBB in your browser
23618
23889
  ignix-creator engines local engines and their state
23619
23890
  ignix-creator engines install <item...> [--accept-licence minimax_h3]
23620
23891
  ignix-creator engines cancel stop the install in progress
@@ -23695,6 +23966,7 @@ async function login(paths) {
23695
23966
  }
23696
23967
  process.stdout.write(`Signed in: ${account(s)}
23697
23968
  `);
23969
+ await report(paths).catch(() => void 0);
23698
23970
  return;
23699
23971
  }
23700
23972
  if (s.status === "ineligible" || s.status === "error" || s.status === "signed_out") {
@@ -23703,6 +23975,37 @@ async function login(paths) {
23703
23975
  }
23704
23976
  throw new Error("Sign-in timed out.");
23705
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
+ }
23706
24009
  async function main(argv) {
23707
24010
  const paths = cliPaths();
23708
24011
  const [cmd, sub, ...rest] = argv;
@@ -23728,6 +24031,9 @@ async function main(argv) {
23728
24031
  return;
23729
24032
  case "login":
23730
24033
  return login(paths);
24034
+ case "report":
24035
+ await report(paths);
24036
+ return;
23731
24037
  case "logout":
23732
24038
  await ensureService(paths);
23733
24039
  await control(paths, "auth.signOut");
package/dist/core.cjs CHANGED
@@ -61223,18 +61223,18 @@ var EN2 = {
61223
61223
  yourTranslations: "Your translations.",
61224
61224
  linesVoiced: (n) => `${String(n)} lines voiced.`,
61225
61225
  noVoice: "No voice.",
61226
- 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)",
61227
61227
  makeImage: "Make an image",
61228
61228
  makeClip: "Make a video clip",
61229
61229
  makePresenter: "Make a presenter",
61230
61230
  installHere: (e) => `Install on this computer: ${e ? e.map(
61231
61231
  (i) => ({
61232
- production_tools: "video tools (editing, rendering, transcription)",
61232
+ production_tools: "the tools to make and edit videos",
61233
61233
  assistant: "a local writing assistant",
61234
61234
  images: "local image generation",
61235
61235
  video: "local video generation",
61236
61236
  presenter: "a local talking presenter",
61237
- recast: "putting a person in a video, locally",
61237
+ recast: "swapping the person in a video for the one in a photo, locally",
61238
61238
  h3: "the MiniMax H3 video model"
61239
61239
  })[i]
61240
61240
  ).join(", ") : "the tools recommended for it"}`,
@@ -61245,7 +61245,9 @@ var EN2 = {
61245
61245
  consentDetail: "Uses photos or videos of people: approving confirms they are you or consented.",
61246
61246
  whereLocal: (eta) => `On this computer, free${eta ? `, about ${eta}` : ""}.`,
61247
61247
  whereBoost: (eta) => `On Ignix Cloud Boost${eta ? `, about ${eta}` : ""}.`,
61248
- whereIgnix: (eta) => `With Ignix AI${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)."
61249
61251
  };
61250
61252
  var ES2 = {
61251
61253
  piece: (k) => ({ reel: "reel", story: "historia", post: "publicaci\xF3n" })[k] ?? k,
@@ -61273,18 +61275,18 @@ var ES2 = {
61273
61275
  yourTranslations: "Tus traducciones.",
61274
61276
  linesVoiced: (n) => `${String(n)} frases con voz.`,
61275
61277
  noVoice: "Sin voz.",
61276
- 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)",
61277
61279
  makeImage: "Crear una imagen",
61278
61280
  makeClip: "Crear un clip de v\xEDdeo",
61279
61281
  makePresenter: "Crear un presentador",
61280
61282
  installHere: (e) => `Instalar en este ordenador: ${e ? e.map(
61281
61283
  (i) => ({
61282
- production_tools: "herramientas de v\xEDdeo (edici\xF3n, render y transcripci\xF3n)",
61284
+ production_tools: "las herramientas para crear y editar v\xEDdeos",
61283
61285
  assistant: "un asistente de escritura local",
61284
61286
  images: "generaci\xF3n de im\xE1genes local",
61285
61287
  video: "generaci\xF3n de v\xEDdeo local",
61286
61288
  presenter: "un presentador que habla, en local",
61287
- 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",
61288
61290
  h3: "el modelo de v\xEDdeo MiniMax H3"
61289
61291
  })[i]
61290
61292
  ).join(", ") : "las herramientas recomendadas para \xE9l"}`,
@@ -61295,7 +61297,9 @@ var ES2 = {
61295
61297
  consentDetail: "Usa fotos o v\xEDdeos de personas: al aprobar confirmas que eres t\xFA o que han dado su consentimiento.",
61296
61298
  whereLocal: (eta) => `En este ordenador, gratis${eta ? `, unos ${eta}` : ""}.`,
61297
61299
  whereBoost: (eta) => `En Cloud Boost de Ignix${eta ? `, unos ${eta}` : ""}.`,
61298
- whereIgnix: (eta) => `Con la IA 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)."
61299
61303
  };
61300
61304
  var PT = {
61301
61305
  piece: (k) => ({ reel: "reel", story: "story", post: "post" })[k] ?? k,
@@ -61323,18 +61327,18 @@ var PT = {
61323
61327
  yourTranslations: "Suas tradu\xE7\xF5es.",
61324
61328
  linesVoiced: (n) => `${String(n)} falas com voz.`,
61325
61329
  noVoice: "Sem voz.",
61326
- 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)",
61327
61331
  makeImage: "Criar uma imagem",
61328
61332
  makeClip: "Criar um clipe de v\xEDdeo",
61329
61333
  makePresenter: "Criar um apresentador",
61330
61334
  installHere: (e) => `Instalar neste computador: ${e ? e.map(
61331
61335
  (i) => ({
61332
- 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",
61333
61337
  assistant: "um assistente de escrita local",
61334
61338
  images: "gera\xE7\xE3o de imagens local",
61335
61339
  video: "gera\xE7\xE3o de v\xEDdeo local",
61336
61340
  presenter: "um apresentador que fala, local",
61337
- recast: "colocar uma pessoa em um v\xEDdeo, local",
61341
+ recast: "trocar a pessoa de um v\xEDdeo pela de uma foto, local",
61338
61342
  h3: "o modelo de v\xEDdeo MiniMax H3"
61339
61343
  })[i]
61340
61344
  ).join(", ") : "as ferramentas recomendadas para ele"}`,
@@ -61345,7 +61349,9 @@ var PT = {
61345
61349
  consentDetail: "Usa fotos ou v\xEDdeos de pessoas: ao aprovar, voc\xEA confirma que \xE9 voc\xEA ou que elas consentiram.",
61346
61350
  whereLocal: (eta) => `Neste computador, gr\xE1tis${eta ? `, cerca de ${eta}` : ""}.`,
61347
61351
  whereBoost: (eta) => `No Cloud Boost da Ignix${eta ? `, cerca de ${eta}` : ""}.`,
61348
- whereIgnix: (eta) => `Com a IA 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)."
61349
61355
  };
61350
61356
  var FR = {
61351
61357
  piece: (k) => ({ reel: "reel", story: "story", post: "publication" })[k] ?? k,
@@ -61373,18 +61379,18 @@ var FR = {
61373
61379
  yourTranslations: "Vos traductions.",
61374
61380
  linesVoiced: (n) => `${String(n)} r\xE9pliques avec voix.`,
61375
61381
  noVoice: "Sans voix.",
61376
- 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)",
61377
61383
  makeImage: "Cr\xE9er une image",
61378
61384
  makeClip: "Cr\xE9er un clip vid\xE9o",
61379
61385
  makePresenter: "Cr\xE9er un pr\xE9sentateur",
61380
61386
  installHere: (e) => `Installer sur cet ordinateur : ${e ? e.map(
61381
61387
  (i) => ({
61382
- production_tools: "les outils vid\xE9o (montage, rendu, transcription)",
61388
+ production_tools: "les outils pour cr\xE9er et monter des vid\xE9os",
61383
61389
  assistant: "un assistant de r\xE9daction local",
61384
61390
  images: "la g\xE9n\xE9ration d\u2019images en local",
61385
61391
  video: "la g\xE9n\xE9ration de vid\xE9os en local",
61386
61392
  presenter: "un pr\xE9sentateur qui parle, en local",
61387
- 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",
61388
61394
  h3: "le mod\xE8le vid\xE9o MiniMax H3"
61389
61395
  })[i]
61390
61396
  ).join(", ") : "les outils recommand\xE9s pour lui"}`,
@@ -61395,7 +61401,9 @@ var FR = {
61395
61401
  consentDetail: "Utilise des photos ou vid\xE9os de personnes : approuver confirme qu\u2019il s\u2019agit de vous ou qu\u2019elles ont consenti.",
61396
61402
  whereLocal: (eta) => `Sur cet ordinateur, gratuit${eta ? `, environ ${eta}` : ""}.`,
61397
61403
  whereBoost: (eta) => `Sur Cloud Boost d\u2019Ignix${eta ? `, environ ${eta}` : ""}.`,
61398
- whereIgnix: (eta) => `Avec l\u2019IA 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)."
61399
61407
  };
61400
61408
  var DE = {
61401
61409
  piece: (k) => ({ reel: "Reel", story: "Story", post: "Post" })[k] ?? k,
@@ -61423,18 +61431,18 @@ var DE = {
61423
61431
  yourTranslations: "Deine \xDCbersetzungen.",
61424
61432
  linesVoiced: (n) => `${String(n)} gesprochene Zeilen.`,
61425
61433
  noVoice: "Ohne Stimme.",
61426
- 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)",
61427
61435
  makeImage: "Ein Bild erstellen",
61428
61436
  makeClip: "Einen Videoclip erstellen",
61429
61437
  makePresenter: "Einen Pr\xE4sentator erstellen",
61430
61438
  installHere: (e) => `Auf diesem Computer installieren: ${e ? e.map(
61431
61439
  (i) => ({
61432
- production_tools: "Video-Werkzeuge (Schnitt, Rendering, Transkription)",
61440
+ production_tools: "die Werkzeuge zum Erstellen und Schneiden von Videos",
61433
61441
  assistant: "einen lokalen Schreibassistenten",
61434
61442
  images: "lokale Bildgenerierung",
61435
61443
  video: "lokale Videogenerierung",
61436
61444
  presenter: "einen sprechenden Pr\xE4sentator, lokal",
61437
- recast: "eine Person in ein Video setzen, lokal",
61445
+ recast: "die Person in einem Video durch die auf einem Foto ersetzen, lokal",
61438
61446
  h3: "das Videomodell MiniMax H3"
61439
61447
  })[i]
61440
61448
  ).join(", ") : "die daf\xFCr empfohlenen Werkzeuge"}`,
@@ -61445,7 +61453,9 @@ var DE = {
61445
61453
  consentDetail: "Verwendet Fotos oder Videos von Personen: Mit der Genehmigung best\xE4tigst du, dass du es bist oder sie zugestimmt haben.",
61446
61454
  whereLocal: (eta) => `Auf diesem Computer, kostenlos${eta ? `, etwa ${eta}` : ""}.`,
61447
61455
  whereBoost: (eta) => `Auf Ignix Cloud Boost${eta ? `, etwa ${eta}` : ""}.`,
61448
- whereIgnix: (eta) => `Mit der Ignix-KI${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)."
61449
61459
  };
61450
61460
  var TEXTS = { en: EN2, es: ES2, pt: PT, fr: FR, de: DE };
61451
61461
  function approvalText(lang) {
@@ -61616,42 +61626,51 @@ function createMcpService(deps) {
61616
61626
  };
61617
61627
  }
61618
61628
  async function routed(c, o, start3) {
61619
- const options2 = await deps.content.quote?.(o.request).catch(() => []) ?? [];
61620
- const usable = options2.filter((x) => x.available);
61621
- const wanted = o.target && o.target !== "auto" ? o.target : null;
61622
- const way = (x) => ({
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 } : {},
61623
61639
  target: x.target,
61624
61640
  available: x.available,
61625
61641
  reason: x.reason,
61626
61642
  estimateSeconds: x.estimateSeconds,
61627
- credits: x.cost.unit === "none" ? 0 : x.cost.amount
61643
+ credits: creditsOf(v, x),
61644
+ ...v.note ? { note: v.note } : {}
61628
61645
  });
61629
- const pick2 = wanted ? usable.find((x) => x.target === wanted) ?? null : usable.length === 1 ? usable[0] ?? null : null;
61630
- if (!pick2) {
61631
- if (!wanted && usable.length > 1)
61632
- return ok2({
61633
- needsChoice: true,
61634
- ways: usable.map(way),
61635
- message: "It can be made in more than one place. Tell the person each way \u2014 where (local = their computer, free; boost = Ignix Cloud Boost; ignix = Ignix AI), its credits and roughly how long \u2014 and call again with `target` set to their choice."
61636
- });
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)
61637
61657
  return err(
61638
61658
  "unavailable",
61639
- `${wanted ? `It cannot be made on \xAB${wanted}\xBB here.` : "Nothing can make it here right now."} Ways and why: ${JSON.stringify(options2.map(way))}. get_engines says what this computer can run and what to install.`
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.`
61640
61660
  );
61641
- }
61642
- const credits = pick2.cost.unit === "none" ? null : pick2.cost.amount;
61643
- const eta = etaText(pick2.estimateSeconds);
61644
- const where = pick2.target === "local" ? T2.whereLocal(eta) : pick2.target === "boost" ? T2.whereBoost(eta) : T2.whereIgnix(eta);
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);
61645
61664
  return gate(
61646
61665
  c,
61647
61666
  {
61648
- spend: pick2.target !== "local",
61667
+ spend: pick2.x.target !== "local",
61649
61668
  visual: o.visual,
61650
61669
  title: o.title,
61651
- details: [where, ...o.details ?? []],
61670
+ details: [where, ...pick2.v.label ? [pick2.v.label] : [], ...o.details ?? []],
61652
61671
  credits
61653
61672
  },
61654
- () => start3(pick2.target)
61673
+ () => start3(pick2.v, pick2.x.target)
61655
61674
  );
61656
61675
  }
61657
61676
  async function start2(c, o) {
@@ -62179,10 +62198,14 @@ function createMcpService(deps) {
62179
62198
  references: ref ? [ref.id] : []
62180
62199
  };
62181
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
+ ];
62182
62205
  return routed(
62183
62206
  c,
62184
- { request: request2, target: a.target, visual, title: T2.makeImage },
62185
- async (target) => {
62207
+ { variants, target: a.target, visual, title: T2.makeImage },
62208
+ async (_v, target) => {
62186
62209
  const jobId = await deps.content.generate?.({
62187
62210
  request: request2,
62188
62211
  aspect,
@@ -62215,18 +62238,25 @@ function createMcpService(deps) {
62215
62238
  ...a.model ? { model: a.model } : {}
62216
62239
  } : { kind: "video", prompt: a.prompt, aspect, durationSec: seconds, references: [] };
62217
62240
  const visual = image ? [image] : [];
62218
- return routed(c, { request: request2, target: a.target, visual, title: T2.makeClip }, async (target) => {
62219
- const jobId = await deps.content.generate?.({
62220
- request: request2,
62221
- aspect,
62222
- referenceAssetId: image?.id ?? null,
62223
- headline: a.prompt.slice(0, 80),
62224
- preference: target
62225
- });
62226
- if (!jobId) return err("unavailable", "Video generation is not available here.");
62227
- deps.chat.showJob(jobId, `${c.client.name}: a video clip \u2014 \u201C${a.prompt.slice(0, 120)}\u201D`);
62228
- return ok2({ jobId, job: jobView(jobId) });
62229
- });
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
+ );
62230
62260
  },
62231
62261
  async make_presenter(a, c) {
62232
62262
  const photo = asset(a.photoAssetId);
@@ -62234,35 +62264,47 @@ function createMcpService(deps) {
62234
62264
  const voice = asset(a.audioAssetId);
62235
62265
  if (voice?.kind !== "audio")
62236
62266
  return err("not_found", "No such audio (import the voice line first).");
62237
- const h3 = a.model === "minimax_h3";
62238
- const max = h3 ? H3_PRESENTER_MAX_LINE_SEC : PRESENTER_MAX_LINE_SEC;
62239
- if (voice.durationSec !== null && voice.durationSec > max)
62240
- return err(
62241
- "invalid_arguments",
62242
- `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.`
62243
- );
62244
- if (h3 && !a.line)
62267
+ if (a.model === "minimax_h3" && !a.line)
62245
62268
  return err(
62246
62269
  "invalid_arguments",
62247
62270
  "MiniMax H3 says the line itself: give `line`, the exact words of the audio."
62248
62271
  );
62249
62272
  const aspect = a.aspect ?? "9:16";
62250
62273
  const scene = a.prompt ?? "A person talking to the camera like a UGC creator, natural head movement and expressions that follow the voice.";
62251
- const request2 = {
62252
- kind: "presenter",
62253
- image: photo.id,
62254
- audio: voice.id,
62255
- prompt: h3 ? h3PresenterPrompt(scene, a.line ?? "", a.language ?? "en") : scene.slice(0, 900),
62256
- aspect,
62257
- ...h3 ? { model: "minimax_h3" } : {}
62258
- };
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.`
62283
+ );
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
+ };
62300
+ });
62259
62301
  const visual = [photo];
62260
62302
  return routed(
62261
62303
  c,
62262
- { request: request2, target: a.target, visual, title: T2.makePresenter },
62263
- async (target) => {
62304
+ { variants, target: a.target, visual, title: T2.makePresenter },
62305
+ async (v, target) => {
62264
62306
  const jobId = await deps.content.generate?.({
62265
- request: request2,
62307
+ request: v.request,
62266
62308
  aspect,
62267
62309
  referenceAssetId: photo.id,
62268
62310
  headline: (a.line ?? scene).slice(0, 80),
@@ -63248,6 +63290,12 @@ async function start(init, port) {
63248
63290
  // The video provider, capped at what the card quoted (ADR-0022 O6, O7;
63249
63291
  // text → video is MiniMax H3's, quoted only when Ignix enables it).
63250
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)
63251
63299
  ) : boost.authorize(request2) : false,
63252
63300
  plan: async (aspect) => {
63253
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.2",
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",