@ignix-social/creator 0.1.3 → 0.1.5

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.
package/dist/cli.cjs CHANGED
@@ -23878,7 +23878,7 @@ ${rows}
23878
23878
  }
23879
23879
 
23880
23880
  // src/cli.ts
23881
- var VERSION = true ? "0.1.3" : "0.0.0-dev";
23881
+ var VERSION = true ? "0.1.5" : "0.0.0-dev";
23882
23882
  var HELP = `Ignix Creator ${VERSION} - generation tools for AI agents (ADR-0028/0029)
23883
23883
 
23884
23884
  ignix-creator login sign in to Ignix in your browser
package/dist/core.cjs CHANGED
@@ -36430,7 +36430,8 @@ function createEditorKitStore(deps) {
36430
36430
  return { install, verify, dir: kitDir, dataDir, removeData };
36431
36431
  }
36432
36432
  function createNpmEditorKitStore(deps) {
36433
- const dataDir = () => inside(deps.paths.models, "ignix-editor");
36433
+ const shared = deps.sharedDataDir && (0, import_node_path8.isAbsolute)(deps.sharedDataDir) ? (0, import_node_path8.resolve)(deps.sharedDataDir) : null;
36434
+ const dataDir = () => shared ?? inside(deps.paths.models, "ignix-editor");
36434
36435
  async function verify() {
36435
36436
  let version2;
36436
36437
  try {
@@ -36460,6 +36461,7 @@ function createNpmEditorKitStore(deps) {
36460
36461
  dir: () => (0, import_node_path8.resolve)(deps.root),
36461
36462
  dataDir,
36462
36463
  removeData: async () => {
36464
+ if (shared) return;
36463
36465
  await discardDir(dataDir(), deps.paths.trash).catch(() => void 0);
36464
36466
  }
36465
36467
  };
@@ -40230,6 +40232,7 @@ function createCoreService({
40230
40232
  }
40231
40233
 
40232
40234
  // ../../packages/core/src/process/entry.ts
40235
+ var import_node_os4 = require("node:os");
40233
40236
  var import_node_path27 = require("node:path");
40234
40237
 
40235
40238
  // ../../packages/generation/src/index.ts
@@ -56128,7 +56131,7 @@ function renderEstimateSeconds(videoSeconds) {
56128
56131
  return Math.round(RENDER_STARTUP_SECONDS + videoSeconds * RENDER_SECONDS_PER_VIDEO_SECOND);
56129
56132
  }
56130
56133
  var WHISPER_SMALL_BYTES = 487601967;
56131
- function editorDownloadBytes(kitSourceDir, os2, arch2) {
56134
+ function editorDownloadBytes(kitSourceDir, os2, arch2, dataDir) {
56132
56135
  try {
56133
56136
  const m = JSON.parse(
56134
56137
  (0, import_node_fs14.readFileSync)(
@@ -56137,8 +56140,27 @@ function editorDownloadBytes(kitSourceDir, os2, arch2) {
56137
56140
  )
56138
56141
  );
56139
56142
  const key = `${os2 === "windows" ? "win32" : "darwin"}-${arch2}`;
56140
- const sum = (o) => Object.values(o ?? {}).reduce((n, e) => n + (e.size ?? 0), 0);
56141
- return sum(m.platforms?.[key]) + (m.analysis?.runtime?.[key]?.size ?? 0) + sum(m.analysis?.models) + WHISPER_SMALL_BYTES;
56143
+ const has2 = (path, size) => {
56144
+ if (!dataDir || !path) return false;
56145
+ try {
56146
+ const st = (0, import_node_fs14.statSync)((0, import_node_path23.join)(dataDir, path));
56147
+ return size === void 0 ? st.isDirectory() : st.isFile() && st.size === size;
56148
+ } catch {
56149
+ return false;
56150
+ }
56151
+ };
56152
+ const bins = Object.values(m.platforms?.[key] ?? {}).reduce(
56153
+ (n, e) => n + (has2(e.file ? (0, import_node_path23.join)("bin", key, m.version ?? "", e.file) : null, e.size) ? 0 : e.size ?? 0),
56154
+ 0
56155
+ );
56156
+ const a = m.analysis;
56157
+ const runtime = has2((0, import_node_path23.join)("runtime", `onnxruntime-${a?.runtimeVersion ?? ""}`, key)) ? 0 : a?.runtime?.[key]?.size ?? 0;
56158
+ const models = Object.values(a?.models ?? {}).reduce(
56159
+ (n, e) => n + (has2(e.file ? (0, import_node_path23.join)("models", "analysis", a?.version ?? "", e.file) : null, e.size) ? 0 : e.size ?? 0),
56160
+ 0
56161
+ );
56162
+ const whisper = has2((0, import_node_path23.join)("models", "ggml-small.bin"), WHISPER_SMALL_BYTES) ? 0 : WHISPER_SMALL_BYTES;
56163
+ return bins + runtime + models + whisper;
56142
56164
  } catch {
56143
56165
  return WHISPER_SMALL_BYTES;
56144
56166
  }
@@ -56165,7 +56187,8 @@ function createVideoEngineService(deps) {
56165
56187
  const kit = deps.npmEditor ? createNpmEditorKitStore({
56166
56188
  paths: engine.paths,
56167
56189
  root: deps.npmEditor.root,
56168
- editorVersion: deps.npmEditor.version
56190
+ editorVersion: deps.npmEditor.version,
56191
+ ...deps.npmEditor.sharedDataDir ? { sharedDataDir: deps.npmEditor.sharedDataDir } : {}
56169
56192
  }) : createEditorKitStore({ paths: engine.paths, manifestSha256: deps.kitManifestSha256 });
56170
56193
  const launcher = createRuntimeLauncher({
56171
56194
  paths: engine.paths,
@@ -56215,6 +56238,14 @@ function createVideoEngineService(deps) {
56215
56238
  if (!platform && !unsupported && !installing2) await refresh();
56216
56239
  return status();
56217
56240
  }
56241
+ async function downloadEstimate() {
56242
+ const p = platform ?? (unsupported ? null : await refresh());
56243
+ const artifact = p ? videoArtifactFor(recipe, p.os, p.arch) : null;
56244
+ if (!p || !artifact) return null;
56245
+ const engineBytes = installedRuntime() ? 0 : videoDownloadBytes(artifact);
56246
+ const editorBytes = editorFiles === "ready" ? 0 : editorDownloadBytes(deps.kitSourceDir, p.os, p.arch, kit.dataDir());
56247
+ return engineBytes + editorBytes;
56248
+ }
56218
56249
  async function prepare() {
56219
56250
  if (installing2) return status();
56220
56251
  error62 = null;
@@ -56225,7 +56256,7 @@ function createVideoEngineService(deps) {
56225
56256
  return status();
56226
56257
  }
56227
56258
  const engineBytes = installedRuntime() ? 0 : videoDownloadBytes(artifact);
56228
- const editorBytes = editorFiles === "ready" ? 0 : editorDownloadBytes(deps.kitSourceDir, p.os, p.arch);
56259
+ const editorBytes = editorFiles === "ready" ? 0 : editorDownloadBytes(deps.kitSourceDir, p.os, p.arch, kit.dataDir());
56229
56260
  const download = engineBytes + editorBytes;
56230
56261
  const free = await freeBytes(engine.paths.root);
56231
56262
  const required2 = download + (engineBytes ? videoInstalledBytes(artifact) : 0) + editorBytes + DISK_RESERVE;
@@ -56262,7 +56293,7 @@ function createVideoEngineService(deps) {
56262
56293
  const artifact = videoArtifactFor(recipe, p.os, p.arch);
56263
56294
  if (!artifact) throw new Error("unsupported");
56264
56295
  const engineBytes = installedRuntime() ? 0 : videoDownloadBytes(artifact);
56265
- const editorEstimate = editorDownloadBytes(deps.kitSourceDir, p.os, p.arch);
56296
+ const editorEstimate = editorDownloadBytes(deps.kitSourceDir, p.os, p.arch, kit.dataDir());
56266
56297
  if (!installedRuntime()) {
56267
56298
  progress = {
56268
56299
  stage: "engine_download",
@@ -56400,6 +56431,7 @@ function createVideoEngineService(deps) {
56400
56431
  const speech = editorService(5 * 6e4);
56401
56432
  return {
56402
56433
  getStatus,
56434
+ downloadEstimate,
56403
56435
  prepare,
56404
56436
  install,
56405
56437
  cancel,
@@ -60705,15 +60737,17 @@ function createEngineService(deps) {
60705
60737
  switch (id) {
60706
60738
  case "production_tools": {
60707
60739
  const st = await hosts.video.getStatus();
60740
+ const dl = st.setup?.downloadBytes ?? await hosts.video.downloadEstimate?.().catch(() => null) ?? Math.round(1.2 * GB4);
60708
60741
  return {
60709
60742
  ...base,
60710
60743
  engine: "ignix-editor",
60711
60744
  state: phase(st.phase, queued, busy),
60712
60745
  progress: bytesFraction(st.progress),
60713
60746
  running: deps.editor.running(),
60714
- // Node + browser (~160 MB) and the Editor's tools and models (~1 GB).
60715
- downloadBytes: st.setup?.downloadBytes ?? Math.round(1.2 * GB4),
60716
- diskBytes: Math.round((st.setup?.downloadBytes ?? 1.2 * GB4) * 1.5)
60747
+ // Node + browser (~160 MB) and the Editor's tools and models (~1 GB, or
60748
+ // only what the person's own Ignix Editor does not have yet).
60749
+ downloadBytes: dl,
60750
+ diskBytes: Math.round(dl * 1.5)
60717
60751
  };
60718
60752
  }
60719
60753
  case "assistant": {
@@ -61038,7 +61072,7 @@ function bytesFraction(p) {
61038
61072
  // ../../packages/core/src/process/entry.ts
61039
61073
  var import_node_crypto30 = require("node:crypto");
61040
61074
  var import_promises33 = require("node:fs/promises");
61041
- var import_node_os4 = require("node:os");
61075
+ var import_node_os5 = require("node:os");
61042
61076
 
61043
61077
  // ../../packages/core/src/process/host-bridge.ts
61044
61078
  init_define_CREATOR_BOX_KIT();
@@ -62893,7 +62927,9 @@ async function start(init, port) {
62893
62927
  });
62894
62928
  const npmEditor = process.env.IGNIX_CREATOR_EDITOR_ROOT && process.env.IGNIX_CREATOR_EDITOR_VERSION ? {
62895
62929
  root: process.env.IGNIX_CREATOR_EDITOR_ROOT,
62896
- version: process.env.IGNIX_CREATOR_EDITOR_VERSION
62930
+ version: process.env.IGNIX_CREATOR_EDITOR_VERSION,
62931
+ // One set of Editor files per person: the ones their Ignix Editor already has.
62932
+ sharedDataDir: process.env.IGNIX_EDITOR_HOME || (0, import_node_path27.join)((0, import_node_os4.homedir)(), ".ignix-editor")
62897
62933
  } : void 0;
62898
62934
  const video = createVideoEngineService({
62899
62935
  engine: localAiBackend.engine,
@@ -63227,7 +63263,7 @@ async function start(init, port) {
63227
63263
  if (!editor.available()) return null;
63228
63264
  const handle = await assets.resolve(asset.id);
63229
63265
  if (!handle) return null;
63230
- const dir = await (0, import_promises33.mkdtemp)((0, import_node_path27.join)((0, import_node_os4.tmpdir)(), "creator-voice-"));
63266
+ const dir = await (0, import_promises33.mkdtemp)((0, import_node_path27.join)((0, import_node_os5.tmpdir)(), "creator-voice-"));
63231
63267
  try {
63232
63268
  const out = (0, import_node_path27.join)(dir, "voice.wav");
63233
63269
  await editor.call(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignix-social/creator",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
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",