@animastor/installer 0.1.1 → 0.2.9

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/README.md CHANGED
@@ -14,7 +14,7 @@ published to npm as `@animastor/installer`.
14
14
 
15
15
  ```
16
16
  packages/animastor-installer/
17
- ├── package.json @animastor/installer 0.1.1, Node >=20, zero runtime deps
17
+ ├── package.json @animastor/installer 0.2.9, Node >=20, zero runtime deps
18
18
  ├── src/installer/
19
19
  │ ├── cli.js CLI entry (detect/plan/install/verify/resume/uninstall)
20
20
  │ ├── index.js Public API entry (10 exports, incl. setupContract)
@@ -50,6 +50,158 @@ candidates (repo root + tarball prefix), never package-locally.
50
50
 
51
51
  `animastor-installer` (package `bin` → `src/installer/cli.js`).
52
52
 
53
+ Normal use is the hub bootstrap — one command from the Animastor setup page:
54
+
55
+ ```
56
+ curl -fsSL "https://animastor.org/gpu/installer?profile=…&mode=…&platform=linux" | bash
57
+ ```
58
+
59
+ - every question and the hidden Worker Key are read from `/dev/tty` (stdin is
60
+ the piped script); without a terminal the installer stops with a clear
61
+ message (exit 3) unless `--yes` is given;
62
+ - the mode follows the MACHINE, not the recorded state (`engine/comfy-owner.js`):
63
+ a ComfyUI process the installer did not start (a platform/notebook instance
64
+ with `--listen 0.0.0.0 --port 8888 --baseurl /notebook/…`) means `existing`,
65
+ and its address is taken from its own cmdline and confirmed by a ComfyUI
66
+ `/system_stats` payload; the installer never starts a second ComfyUI next to
67
+ it. `managed` only when the installer created the ComfyUI and nobody else
68
+ runs it. A recorded `managed/startComfyui=true` that contradicts the machine
69
+ is shown and corrected; an extra installer-owned instance is offered for
70
+ stop;
71
+ - no `--mode` → as above (never "managed" just because the state says so), and
72
+ an explicit `--mode` that contradicts the machine is reported, not applied;
73
+ - problems of an existing installation (worker type, Node.js, ComfyUI URL /
74
+ notebook prefix, outdated worker bundle, missing worker dependencies) are
75
+ listed once and fixed after ONE question (`--yes` = fix, `--no-fix` = keep);
76
+ - the run ends with a RESULT block: ComfyUI API → worker "ComfyUI ready" →
77
+ hub heartbeat; every ✗ is one cause line plus one fix command.
78
+
79
+ The installer also links the `animastor` command into `~/.local/bin` (root
80
+ included — E2E nodes keep only `/home` across a reboot) and adds that directory
81
+ to PATH in `~/.bashrc` / `~/.profile` once; the command points at a persistent
82
+ copy of itself (`~/animastor/installer`):
83
+
84
+ ```
85
+ animastor start | stop | status | logs [-f] | doctor [--new-key]
86
+ ```
87
+
88
+ `doctor` re-runs the installation idempotently for the recorded profile(s):
89
+ nothing that is present is downloaded again, the worker is started again (also
90
+ after a node reboot), and a missing system prerequisite (`python3.X-venv`, …)
91
+ is installed on a single `Install <pkg> now? [Y/n]` question when the host
92
+ allows it (root or passwordless `sudo -n`). The Worker Key in `.env` is never
93
+ asked for again on a re-run.
94
+
95
+ `doctor --yes` is the boot path: no TTY, no questions, ONE line of output and
96
+ an exit code. It installs missing apt packages, starts the worker (and its
97
+ own ComfyUI in `managed` mode), and re-applies the PATH block — E2E nodes
98
+ reset `~/.bashrc`/`~/.profile` on every boot.
99
+
100
+ Type A (the platform starts ComfyUI, e.g. TIR): when the install state says
101
+ the ComfyUI belongs to the platform (`mode existing`, `startComfyui=false`,
102
+ or `comfy_owner.owner = foreign` recorded by an earlier run) and no verified
103
+ platform instance answers yet, `doctor` waits up to `--comfy-wait-ms`
104
+ (default 180000 on boot) for the `main.py` process AND its
105
+ `GET /system_stats`, re-reading the address from the process cmdline on every
106
+ poll and logging progress every 30 s. Only then are `COMFY_URL` /
107
+ `COMFY_PORT` / `NOTEBOOK_PATH` recomputed and the worker started; its 90 s
108
+ "ComfyUI ready" window opens after ComfyUI answered. If ComfyUI does not come
109
+ up in time the result is `FAILED` — "ComfyUI is started by the platform; it
110
+ did not come up in N s" — and the worker is NOT started against the address
111
+ of a previous boot. `animastor status` labels such a ComfyUI
112
+ "started by the platform (pid …)". `~/animastor/start-worker.sh` is
113
+ replaced by a wrapper (`exec ~/.local/bin/animastor start "$@"`, old script
114
+ kept as `start-worker.sh.bak`); ready-to-use boot scripts for both node types
115
+ are in `animastor-docs/04-planning/INSTALLER_BOOT_STARTUP.md`.
116
+
117
+ `animastor boot` (0.2.4) is the whole node startup script on both node types:
118
+ it detaches at once (own session, stdin `/dev/null`, output appended to
119
+ `~/animastor/logs/bootstrap.log` under a header with the boot time) and exits
120
+ 0; the detached `doctor --yes` waits up to 600 s by default. TIR starts its
121
+ ComfyUI only after the startup script has finished, so waiting inside the
122
+ script deadlocks.
123
+
124
+ Custom-node Python dependencies on type A (0.2.5): the pip requirements of
125
+ every required profile custom node are checked in the Python of the running
126
+ `main.py` (taken from `/proc/<pid>`). Missing ones go into a persistent
127
+ OVERLAY venv `~/animastor/pydeps/py<X.Y>` (`python -m venv --without-pip
128
+ --system-site-packages`: pip of the platform runs there and writes only what
129
+ the platform lacks; torch is pinned as a constraint) and a generated custom
130
+ node `custom_nodes/animastor-pydeps/prestartup_script.py` puts that
131
+ site-packages in front of `sys.path` before ComfyUI imports the nodes. All of
132
+ it is in `/home`, so after a node restart the platform's ComfyUI loads the
133
+ nodes with no reinstall and no restart. (As root, pip into `/usr/bin/python3`
134
+ writes `/usr/local/lib/python3.X/dist-packages` and `--user` writes
135
+ `/root/.local` — both are lost with a node restart.) A ComfyUI without
136
+ prestartup-script support falls back to the 0.2.4 behaviour (install into its
137
+ Python; boot reinstalls). When the running ComfyUI lacks the node classes it
138
+ is restarted — only with consent: `--restart-platform-comfy` /
139
+ `--no-restart-platform-comfy`, the answer recorded in `install-state.json`
140
+ (`installer_options.restartPlatformComfy`, asked once interactively, default
141
+ Yes), or the boot default (yes). A plain `--yes` is not consent. The restart
142
+ stops exactly that pid (its argv, cwd and environment are read from `/proc`
143
+ first; nothing is stopped when they are unreadable or the signal is refused),
144
+ gives the platform 30 s to start it again, otherwise starts the same command
145
+ line itself (detached, log `~/animastor/logs/comfyui-restart.log`) and waits
146
+ for `GET /system_stats` at the original `--baseurl` address and the node
147
+ classes in `/object_info`. Type B checks its own venv and restarts its own
148
+ ComfyUI.
149
+
150
+ Version replacements of the overlay (0.2.6): the overlay is first in
151
+ `sys.path` of the WHOLE ComfyUI, so a node that pins a version (qwen-tts:
152
+ `transformers==4.57.3`) replaces the platform's package for ComfyUI and every
153
+ other node (E2E 02.11: transformers 5.0.0→4.57.3, huggingface_hub
154
+ 1.3.5→0.36.2, cryptography 3.4.8→50.0.2). After the dependencies are in place
155
+ the overlay is compared with the platform Python (`python -I`,
156
+ `importlib.metadata`, overlay not on `sys.path`); every replacement is logged
157
+ and shown in RESULT as
158
+ `[i] <pkg> platform X → overlay Y (needed by <node>)` — `!` when the major
159
+ version goes up or down — and recorded in `install-state.json`
160
+ (`installer_options.nodeDeps.overrides`). One GPU node — one profile: when
161
+ another profile is installed (or being installed) on the same ComfyUI and a
162
+ replacement touches a package one of its nodes uses, or — with more than one
163
+ profile — a ComfyUI core requirement (`<ComfyUI>/requirements.txt`) whose
164
+ range excludes the overlay version, the replacement needs consent: an
165
+ interactive question (default No) or `--accept-node-deps-overrides`; the
166
+ answer is recorded (`installer_options.nodeDeps.accepted`). `boot` and a
167
+ plain `--yes` never consent: the run is FAILED with the cause, and the overlay
168
+ is restored from the copy taken before pip (`py<X.Y>.pre-install`).
169
+
170
+ Node classes for the worker (0.2.7): the worker bundle (>= 2.2.2) asks for
171
+ tasks only when ComfyUI's `/object_info` lists every node class of its
172
+ profile. The list is `<worker dir>/node-classes.json`
173
+ (`{"profiles":{"audio/qwen-tts":[…]}}`), written from the manifests'
174
+ `provides_classes` (required dependencies only) on a fresh install, on a
175
+ bundle update and on every `doctor`/`boot` run — a node installed by an
176
+ older installer gets it on its next doctor/boot. An identical file is left
177
+ untouched; the file is registered for the uninstaller. Without the file the
178
+ worker keeps the previous behaviour (ComfyUI API only) and logs one warning.
179
+
180
+ A running worker is not restarted by `install`/`doctor` (0.2.8). It is left
181
+ as is (`worker already running (pid N), left as is`) unless its configuration
182
+ changed (`.env` or bundle files newer than the process). Then an idle worker
183
+ is restarted; a busy one (a `Task <id>` in its own log without `Done`/`Failed`)
184
+ is waited for up to `--wait-job-ms` (default 600000), else the run is FAILED
185
+ (exit 1) and the worker keeps running. `--force` restarts it anyway. The boot
186
+ path (`doctor --yes`, no TTY) only starts a stopped worker. An unchanged
187
+ `.env` is no longer rewritten. `doctor` and `status` print
188
+ `current job: none|<id>`.
189
+
190
+ Every install/doctor run first brings the management tools (`animastor`,
191
+ the persistent installer copy) and an installed worker bundle to its own
192
+ version — before any check that can end the run — so every printed fix
193
+ command exists in the installed `animastor`. Unknown options are an error
194
+ (exit 2). When node classes are missing the result names the cause: missing
195
+ packages, an `IMPORT FAILED` line from the ComfyUI log (`/internal/logs`,
196
+ the process stdout file, the restart log) or a needed restart.
197
+
198
+ The fix list is APPLIED: `COMFY_URL`, `COMFY_PORT` and `NOTEBOOK_PATH` are
199
+ rewritten in `.env` (only real differences are listed, one entry per key), and
200
+ a second run over the fixed `.env` prints no fix list. The address is
201
+ recomputed on every run because the platform's port and notebook prefix change
202
+ between boots. Answers already given (a declined optional workflow, a declined
203
+ model download) are remembered and not asked again, also under `--yes`.
204
+
53
205
  ## Manifest resolution (MANIFEST_ROOT contract)
54
206
 
55
207
  1. `/app/artifacts/install-manifests` (baked container layout)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest_version": "1.0.0",
3
- "revision": "2026.08.27-r1",
3
+ "revision": "2026.10.30-r1",
4
4
  "status": "ready",
5
5
  "profile": {
6
6
  "id": "audio/qwen-tts",
@@ -23,10 +23,10 @@
23
23
  "note": "Workflows are the single source of truth for 'required'. Connectors are backend-only execution metadata and are NOT installed. Runtime audits are reference only, never the source of truth."
24
24
  },
25
25
  "hardware": {
26
- "gpu_min_vram_gb": null,
27
- "basis": "unknown",
26
+ "gpu_min_vram_gb": 12,
27
+ "basis": "minimum_supported",
28
28
  "reference_gpu": "NVIDIA L40S (46068 MiB)",
29
- "todo": "Open question 12: minimum VRAM is not documented anywhere; needs measurement."
29
+ "derivation": "Estimate, not a measured floor: tts-qwen-dialogue loads both 1.7B repos at once (VoiceDesign + Base: 2 x (3.57 GiB weights + 0.65 GiB speech tokenizer) = ~8.4 GiB) plus activations; 12 GB leaves headroom. Known to run on L40S 46 GB; installed on Tesla V100 (E2E, 2026-10-30). Lower it only after a measured run on a smaller card."
30
30
  },
31
31
  "runtime_requirements": {
32
32
  "comfyui": {
@@ -381,7 +381,7 @@
381
381
  },
382
382
  "provenance": {
383
383
  "evidence": [
384
- "packages/animastor-worker/worker/worker.cjs:1-4 (v2.1.1, Node 18+)",
384
+ "packages/animastor-worker/worker/worker.cjs:1-4 (v2.2.0, Node 20+)",
385
385
  "packages/animastor-worker/worker/.env.example",
386
386
  "gpu-hub/gpu-hub.js GET /worker-bundle"
387
387
  ]
@@ -439,7 +439,6 @@
439
439
  "D1: canonical torch/CUDA tier — cu128 reference vs cu124",
440
440
  "Open question 5: confirm SaveAudioMP3 belongs to ComfyUI-Qwen3-TTS via /object_info",
441
441
  "Open question 8: ComfyUI-Manager inclusion (D7)",
442
- "Open question 11: Node.js 18 (start-worker.sh) vs 20 (worker.cjs)",
443
- "Open question 12: minimum VRAM undocumented"
442
+ "Open question 12: minimum VRAM is an estimate (12 GB, hardware.derivation) — measure on a smaller card"
444
443
  ]
445
444
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest_version": "1.0.0",
3
- "revision": "2026.08.27-r1",
3
+ "revision": "2026.11.07-r1",
4
4
  "status": "ready",
5
5
  "profile": {
6
6
  "id": "image/qwen-image",
@@ -300,7 +300,7 @@
300
300
  "basis": "optional",
301
301
  "editable": true,
302
302
  "target_dir": "user/default/workflows/animastor/image",
303
- "baseline_sha256": "fb4c25e52bbb2f75270367d2696b4b7469617d6557cd0bcc634a6a6fc03a5816",
303
+ "baseline_sha256": "d2cb4c4edead909b7358e1353fdd0e0e4d5efc231abfcad28749f1c0bc99d5be",
304
304
  "source": {
305
305
  "kind": "animastor",
306
306
  "repository_path": "backend/ai/workflows/img-qwen-image.json",
@@ -314,7 +314,7 @@
314
314
  "evidence": "backend/ai/workflows/img-qwen-image.json (production workflow)"
315
315
  },
316
316
  "notes": [
317
- "sha256 of the canonical production workflow file in this repository (computed 2026-08-26); a differing hash on the target machine means the user customized it — that is allowed"
317
+ "sha256 of the canonical production workflow file in this repository (computed 2026-11-07); a differing hash on the target machine means the user customized it — that is allowed"
318
318
  ]
319
319
  }
320
320
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest_version": "1.0.0",
3
- "revision": "2026.08.27-r1",
3
+ "revision": "2026.11.07-r1",
4
4
  "status": "ready",
5
5
  "profile": {
6
6
  "id": "video/ltx-2.3",
@@ -640,7 +640,7 @@
640
640
  "basis": "optional",
641
641
  "editable": true,
642
642
  "target_dir": "user/default/workflows/animastor/video",
643
- "baseline_sha256": "6ab036e1c7b4f9e3e9df11b31b08d7495a4c7a761d8f8159951bf06768df3cc1",
643
+ "baseline_sha256": "b675a572934f95a8fb475e4832e94a78d495f4b89b1e8a1e99e93fc4b6ef30d7",
644
644
  "source": {
645
645
  "kind": "animastor",
646
646
  "repository_path": "backend/ai/workflows/video-ltx-1p.json",
@@ -654,7 +654,7 @@
654
654
  "evidence": "backend/ai/workflows/video-ltx-1p.json (production workflow)"
655
655
  },
656
656
  "notes": [
657
- "sha256 of the canonical production workflow file in this repository (computed 2026-08-26); a differing hash on the target machine means the user customized it — that is allowed"
657
+ "sha256 of the canonical production workflow file in this repository (computed 2026-11-07); a differing hash on the target machine means the user customized it — that is allowed"
658
658
  ]
659
659
  },
660
660
  {
@@ -665,7 +665,7 @@
665
665
  "basis": "optional",
666
666
  "editable": true,
667
667
  "target_dir": "user/default/workflows/animastor/video",
668
- "baseline_sha256": "1be44f6fd00e2684a6db138e1a20e8445653bfc65bbb3caa62dfe00b31067617",
668
+ "baseline_sha256": "c6bc34f3a5eb36009e203deedd7a6467a1ae3d60b9ef4abb2f0122c02c352f62",
669
669
  "source": {
670
670
  "kind": "animastor",
671
671
  "repository_path": "backend/ai/workflows/video-ltx-2p.json",
@@ -679,7 +679,7 @@
679
679
  "evidence": "backend/ai/workflows/video-ltx-2p.json (production workflow)"
680
680
  },
681
681
  "notes": [
682
- "sha256 of the canonical production workflow file in this repository (computed 2026-08-26); a differing hash on the target machine means the user customized it — that is allowed"
682
+ "sha256 of the canonical production workflow file in this repository (computed 2026-11-07); a differing hash on the target machine means the user customized it — that is allowed"
683
683
  ]
684
684
  },
685
685
  {
@@ -690,7 +690,7 @@
690
690
  "basis": "optional",
691
691
  "editable": true,
692
692
  "target_dir": "user/default/workflows/animastor/video",
693
- "baseline_sha256": "ec15a01259afcc6b3d76df5d5eec75a080b6aa54bd6b064b79538bd30dcf90f4",
693
+ "baseline_sha256": "26692d1970c92ad1d56c52d676df2f930d77898dc85618814f95d10b10ec2a80",
694
694
  "source": {
695
695
  "kind": "animastor",
696
696
  "repository_path": "backend/ai/workflows/video-ltx-3p.json",
@@ -704,7 +704,7 @@
704
704
  "evidence": "backend/ai/workflows/video-ltx-3p.json (production workflow)"
705
705
  },
706
706
  "notes": [
707
- "sha256 of the canonical production workflow file in this repository (computed 2026-08-26); a differing hash on the target machine means the user customized it — that is allowed"
707
+ "sha256 of the canonical production workflow file in this repository (computed 2026-11-07); a differing hash on the target machine means the user customized it — that is allowed"
708
708
  ]
709
709
  },
710
710
  {
@@ -715,7 +715,7 @@
715
715
  "basis": "optional",
716
716
  "editable": true,
717
717
  "target_dir": "user/default/workflows/animastor/video",
718
- "baseline_sha256": "acef76b38f25b41f133b92bb71e2ab3ac8f75808209c29624319c9d08822d80d",
718
+ "baseline_sha256": "8ea650a8cde4660eaefce427152ffe77050ff433c1b5be0a0c72a8bd73288ca6",
719
719
  "source": {
720
720
  "kind": "animastor",
721
721
  "repository_path": "backend/ai/workflows/video-ltx-4p.json",
@@ -729,7 +729,7 @@
729
729
  "evidence": "backend/ai/workflows/video-ltx-4p.json (production workflow)"
730
730
  },
731
731
  "notes": [
732
- "sha256 of the canonical production workflow file in this repository (computed 2026-08-26); a differing hash on the target machine means the user customized it — that is allowed"
732
+ "sha256 of the canonical production workflow file in this repository (computed 2026-11-07); a differing hash on the target machine means the user customized it — that is allowed"
733
733
  ]
734
734
  }
735
735
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animastor/installer",
3
- "version": "0.1.1",
3
+ "version": "0.2.9",
4
4
  "description": "Animastor Private GPU Worker installer — self-contained CLI and library for GPU worker setup, verification, and management.",
5
5
  "main": "src/installer/index.js",
6
6
  "exports": {
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "repository": {
30
30
  "type": "git",
31
- "url": "git+https://github.com/Animastor/animastor.git",
31
+ "url": "git+https://github.com/Animastor/animastor-backend.git",
32
32
  "directory": "packages/animastor-installer"
33
33
  },
34
34
  "bugs": {
35
- "url": "https://github.com/Animastor/animastor/issues"
35
+ "url": "https://github.com/Animastor/animastor-backend/issues"
36
36
  },
37
37
  "homepage": "https://animastor.org",
38
38
  "devDependencies": {