cozyclay 1.3.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/CHANGELOG.md +130 -6
  2. package/LICENSE +67 -80
  3. package/LICENSES/GPL-3.0-or-later.txt +674 -0
  4. package/LICENSING.md +32 -0
  5. package/README.md +69 -12
  6. package/THIRD_PARTY_NOTICES.md +20 -2
  7. package/bin/cozyclay.mjs +230 -88
  8. package/bin/mcp-runtime.mjs +115 -0
  9. package/bin/open-browser.mjs +10 -0
  10. package/bin/package-signature.mjs +95 -0
  11. package/bin/telemetry-state.mjs +111 -0
  12. package/bin/update-check.mjs +158 -0
  13. package/dist/ai-camera-control/index.html +4 -5
  14. package/dist/app/index.html +3 -4
  15. package/dist/assets/app-CqOk49Bk.css +1 -0
  16. package/dist/assets/app-G55dPEDB.js +4811 -0
  17. package/dist/assets/module-MzlRiBjI.js +3 -0
  18. package/dist/cozyclay-package.json +1 -0
  19. package/dist/favicon.ico +0 -0
  20. package/dist/icons/apple-touch-icon.png +0 -0
  21. package/dist/icons/icon-192.png +0 -0
  22. package/dist/icons/icon-32.png +0 -0
  23. package/dist/icons/icon-512.png +0 -0
  24. package/dist/icons/icon-maskable-512.png +0 -0
  25. package/dist/index.html +27 -23
  26. package/dist/sw.js +2 -1
  27. package/mcp/LIVE-PROTOCOL.md +93 -12
  28. package/mcp/README.md +28 -10
  29. package/mcp/ardy-prompts.mjs +96 -78
  30. package/mcp/live-hub.mjs +231 -17
  31. package/mcp/package.json +5 -2
  32. package/mcp/runtime/package-lock.json +1211 -0
  33. package/mcp/runtime/package.json +16 -0
  34. package/mcp/server.mjs +798 -184
  35. package/package.json +32 -8
  36. package/src/App.jsx +2744 -713
  37. package/src/analytics-toggle.jsx +24 -0
  38. package/src/analytics.js +386 -0
  39. package/src/ardy/motion-edit.js +172 -0
  40. package/src/ardy/pose-pin.js +97 -0
  41. package/src/ardy/root-drop.js +180 -0
  42. package/src/ardy/timeline-resize.js +3 -1
  43. package/src/ardy/timeline.jsx +362 -73
  44. package/src/ardy/waypoints.js +4 -1
  45. package/src/asset-pane.jsx +339 -21
  46. package/src/asset-shelf.js +82 -0
  47. package/src/camera-block.js +42 -0
  48. package/src/camera-follow.js +149 -27
  49. package/src/camera-move.js +45 -19
  50. package/src/camera-rail-schedule.js +6 -0
  51. package/src/cuts.js +67 -54
  52. package/src/dualview.jsx +45 -5
  53. package/src/generation/generation-request.js +17 -0
  54. package/src/generation/use-generation.js +3 -14
  55. package/src/hierarchy-model.js +5 -3
  56. package/src/live-control.js +22 -2
  57. package/src/main.jsx +2 -0
  58. package/src/mp4-muxer.js +52 -0
  59. package/src/object-gizmo.jsx +211 -16
  60. package/src/offscreen-export.js +166 -0
  61. package/src/otio.js +217 -0
  62. package/src/planview.jsx +18 -10
  63. package/src/pose-extract/detector.js +7 -2
  64. package/src/pose-extract/image-frame.js +40 -0
  65. package/src/pose-extract/index.js +2 -1
  66. package/src/pose-extract/take.js +27 -0
  67. package/src/poses.js +19 -265
  68. package/src/posestudio.jsx +82 -8
  69. package/src/project-poses.js +9 -0
  70. package/src/project.js +86 -2
  71. package/src/pwa.js +6 -0
  72. package/src/room.jsx +77 -4
  73. package/src/sample-at.js +136 -0
  74. package/src/scene-asset-cache.js +137 -96
  75. package/src/scene-assets.js +94 -4
  76. package/src/scene-objects.js +82 -19
  77. package/src/scenes.js +34 -6
  78. package/src/shot-authoring.js +65 -28
  79. package/src/shot.js +53 -13
  80. package/src/source-offer.jsx +12 -0
  81. package/src/stable-items.js +83 -0
  82. package/src/styles.css +882 -115
  83. package/src/ui.jsx +32 -4
  84. package/src/usd-camera.js +145 -0
  85. package/tools/ardy/BRIDGE.md +8 -5
  86. package/tools/ardy/README.md +15 -0
  87. package/tools/ardy/artifacts.mjs +34 -0
  88. package/tools/ardy/bridge.mjs +32 -11
  89. package/tools/ardy/extract.mjs +16 -11
  90. package/tools/ardy/footage.mjs +15 -10
  91. package/tools/ardy/runners/local.mjs +4 -1
  92. package/tools/ardy/setup-text-encoder.py +14 -4
  93. package/tools/dev-full.mjs +63 -5
  94. package/tools/generation/bridge.mjs +14 -1
  95. package/tools/metrics/archive-traffic.mjs +1 -1
  96. package/tools/metrics-snapshot.mjs +98 -0
  97. package/tools/prepare-package.mjs +50 -0
  98. package/tools/process-supervisor.mjs +108 -2
  99. package/tools/run-tests.mjs +173 -0
  100. package/dist/assets/app-B3U5aut1.js +0 -4811
  101. package/dist/assets/app-BrRF0wso.css +0 -1
package/LICENSING.md ADDED
@@ -0,0 +1,32 @@
1
+ # CozyClay licensing
2
+
3
+ CozyClay is distributed as a combined work under the GNU Affero General
4
+ Public License, version 3 or later (`AGPL-3.0-or-later`). The complete license
5
+ text is in [`LICENSE`](LICENSE).
6
+
7
+ If you modify CozyClay and let users interact with that modified version over
8
+ a network, section 13 of the AGPL requires you to offer those users the
9
+ Corresponding Source of the version you run, at no charge. CozyClay keeps that
10
+ offer visible in the Studio footer as **Source code (AGPL)**.
11
+
12
+ The official build points that link at this repository. Operators deploying a
13
+ modified version must set `VITE_SOURCE_CODE_URL` at build time to a public URL
14
+ containing the complete Corresponding Source for the version they run.
15
+
16
+ ## Earlier contributions
17
+
18
+ Before 2026-08-21, CozyClay was published under `GPL-3.0-or-later`. Copyright
19
+ in those contributions remains with its respective holders and those portions
20
+ remain available under that license; its text is preserved at
21
+ [`LICENSES/GPL-3.0-or-later.txt`](LICENSES/GPL-3.0-or-later.txt). Section 13 of
22
+ AGPLv3 expressly permits GPLv3 and AGPLv3 code to be combined, with the AGPL
23
+ network-source requirement applying to the combined program.
24
+
25
+ Contributions submitted on or after 2026-08-21 are accepted under
26
+ `AGPL-3.0-or-later` unless a file clearly says otherwise.
27
+
28
+ ## Third-party material
29
+
30
+ The AGPL does not replace the licenses of dependencies, fonts, models, model
31
+ weights, or other third-party material. See
32
+ [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) for their separate terms.
package/README.md CHANGED
@@ -7,10 +7,14 @@
7
7
  </p>
8
8
 
9
9
  <p align="center">
10
- <a href="LICENSE"><img alt="License: GPL-3.0" src="https://img.shields.io/badge/license-GPL--3.0-blue"></a>
10
+ Created and maintained by <a href="https://github.com/HaD0Yun">Doyun</a> at <a href="https://github.com/NomaDamas">NomaDamas</a>.
11
+ </p>
12
+
13
+ <p align="center">
14
+ <a href="LICENSE"><img alt="License: AGPL-3.0" src="https://img.shields.io/badge/license-AGPL--3.0-blue"></a>
11
15
  <a href="https://www.npmjs.com/package/cozyclay"><img alt="npm" src="https://img.shields.io/npm/v/cozyclay"></a>
12
16
  <img alt="Node 22+" src="https://img.shields.io/badge/node-22%2B-brightgreen">
13
- <a href="https://github.com/HaD0Yun/CozyClay/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/HaD0Yun/CozyClay?style=flat"></a>
17
+ <a href="https://github.com/NomaDamas/CozyClay/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/NomaDamas/CozyClay?style=flat"></a>
14
18
  </p>
15
19
 
16
20
  <p align="center">
@@ -19,7 +23,7 @@
19
23
  <a href="#what-you-can-do">Features</a> ·
20
24
  <a href="#ai-control-mcp">AI control</a> ·
21
25
  <a href="#controls">Controls</a> ·
22
- <a href="https://github.com/HaD0Yun/CozyClay/issues">Issues</a>
26
+ <a href="https://github.com/NomaDamas/CozyClay/issues">Issues</a>
23
27
  </p>
24
28
 
25
29
  ---
@@ -51,7 +55,7 @@ https://github.com/user-attachments/assets/1d0113e5-6922-443d-affc-1bdabc666247
51
55
  - Node.js 22 or newer
52
56
  - npm, or bun
53
57
  - A Chromium-based browser
54
- - *Optional:* an SSH-accessible NVIDIA machine running ARDY, for motion generation
58
+ - *Optional:* an SSH-accessible NVIDIA machine running ARDY, for motion generation — first-time setup downloads a ~16.4 GB text-encoder stack onto that machine; see [`tools/ardy/README.md`](tools/ardy/README.md)
55
59
 
56
60
  ## Quick start
57
61
 
@@ -63,6 +67,8 @@ bunx cozyclay
63
67
 
64
68
  That downloads the built studio and opens it at `http://127.0.0.1:5180`. Nothing to compile, no dependency tree to install. Useful flags: `--port 5200`, `--no-open`, `--no-ardy`.
65
69
 
70
+ A global install gives you `cclay`, the same command with less typing. Once a day the launcher checks npm for a newer release and prints a one-line notice after the studio is up; it stays quiet when you're current or offline. `cclay update` installs the latest release, and `--no-update-check` skips the check entirely.
71
+
66
72
  Motion generation stays off until you point it at a machine that can run it:
67
73
 
68
74
  ```bash
@@ -90,18 +96,21 @@ The studio ships an [MCP](https://modelcontextprotocol.io) server, so an AI assi
90
96
  ```
91
97
 
92
98
  Drop that into `claude_desktop_config.json` (or any MCP client config) and restart the client. The
93
- first run prints one `npm install` line: the MCP SDK is a 95-package tree, and opening the studio
94
- should never wait on it, so those dependencies are fetched only when you actually want the server.
99
+ first run automatically installs the MCP SDK's 95-package tree; opening the studio never waits on
100
+ it, so those dependencies are fetched only when you actually want the server.
95
101
 
96
102
  - **Editor open?** Tool calls move the visible viewport — camera, cast, set, generated motion, prompt blocks on the timeline.
97
- - **No editor?** The same tools run headless: block scenes, derive film vocabulary (“wide shot · right profile · knee level · 24mm”), render AI video prompts, and write `.cclayproject` files the studio opens.
103
+ - **No editor?** Scene and project tools run headless: block scenes, derive film vocabulary
104
+ (“wide shot · right profile · knee level · 24mm”), render AI video prompts, and write
105
+ `.cclayproject` files. `capture_frame`, `set_prompt_blocks`, `generate_motion`, and
106
+ `apply_batch` require the live editor.
98
107
 
99
108
  Tools, transports and the live-control protocol are documented in [`mcp/README.md`](mcp/README.md).
100
109
 
101
110
  ### From a clone
102
111
 
103
112
  ```bash
104
- git clone https://github.com/HaD0Yun/CozyClay.git
113
+ git clone https://github.com/NomaDamas/CozyClay.git
105
114
  cd CozyClay
106
115
  npm install
107
116
  npm run dev
@@ -152,8 +161,8 @@ See [`tools/ardy/README.md`](tools/ardy/README.md) for details. This workflow is
152
161
  | `npm run test:theme` / `test:appearance` / `test:layout` | UI theme, appearance, layout |
153
162
  | `npm run test:lifecycle` | Dev-server process lifecycle |
154
163
  | `npm run test:ardy` | ARDY conversion, playback, and IK pipeline |
155
- | `cd mcp && npm run verify` | MCP server over real stdio — all 420 framing combinations |
156
- | `cd mcp && npm run verify:live` | Live-control protocol against a fake editor |
164
+ | `cd mcp && npm install && npm run verify` | MCP server over real stdio — all 420 framing combinations |
165
+ | `cd mcp && npm run verify:live` | Live-control protocol against a fake editor (same `npm install` first) |
157
166
  | `npm run build` | Production build |
158
167
 
159
168
  Ad-hoc browser QA, while a dev server is available:
@@ -164,12 +173,60 @@ npm run qa:browser -- <qa-script>
164
173
 
165
174
  ## Contributing
166
175
 
167
- Found something broken, or want a feature? [Open an issue](https://github.com/HaD0Yun/CozyClay/issues) — bug reports with a repro are the most useful thing you can send.
176
+ Found something broken, or want a feature? [Open an issue](https://github.com/NomaDamas/CozyClay/issues) — bug reports with a repro are the most useful thing you can send. Contributions are accepted under `AGPL-3.0-or-later`.
168
177
 
169
178
  **Repository hygiene.** Generated motion archives, QA output, build output, logs and local runtime artifacts are not source files and must not be committed. Keep `tools/ardy/out/`, `artifacts/`, `dist/`, `.gjc/` and `.npz` files local.
170
179
 
180
+ All runtime libraries intentionally live in `devDependencies` because the published npm package ships the prebuilt `dist/`, so `npx cozyclay` must not install the studio's dependency tree.
181
+
182
+ ## Analytics & privacy
183
+
184
+ The hosted site at [cozyclay.org](https://cozyclay.org/) collects anonymous usage analytics via [PostHog](https://posthog.com/) (US Cloud). There are no cookies and no session recording, and Do-Not-Track is respected. A random pseudonymous identifier is kept in your browser's localStorage so that returning visits and retention can be counted; it is never linked to an account or project content and is removed by clearing site data or using the opt-out toggle.
185
+
186
+ Events collected:
187
+
188
+ | Event | Purpose |
189
+ | --- | --- |
190
+ | `install:first_launch` | First run of the official npm package |
191
+ | `app:session_started` | Start of an official npm package session |
192
+ | `$pageview` | Funnel and drop-off analysis |
193
+ | `scene:created` | Funnel and drop-off analysis |
194
+ | `scene:loaded` | Funnel and drop-off analysis |
195
+ | `craft:first_action` | Funnel and drop-off analysis |
196
+ | `motion:job_started` | Motion reliability |
197
+ | `motion:job_succeeded` | Motion reliability |
198
+ | `motion:job_failed` | Motion reliability |
199
+ | `export:blocking_frame_succeeded` | Funnel and drop-off analysis |
200
+ | `activation:completed` | Funnel and drop-off analysis |
201
+
202
+ Geo data comes from ingest-time GeoIP country lookup only — no precise location is collected. Prompt text, asset names, file names, project content, local paths, and any user-entered text are never collected.
203
+
204
+ The official npm package also measures anonymous first launches, sessions, and
205
+ the same in-app funnel on its `127.0.0.1` studio. It stores one random
206
+ installation identifier in `~/.config/cozyclay/state.json` so returning use can
207
+ be counted across ports and browser storage resets. Source checkouts, forks,
208
+ development servers, CI, and tests do not send analytics. Official npm
209
+ artifacts carry a signature checked by the launcher, so copying or repackaging
210
+ the source does not enable telemetry.
211
+
212
+ The npm package prints this disclosure once on first launch. Control it at any
213
+ time:
214
+
215
+ ```bash
216
+ cclay telemetry status
217
+ cclay telemetry off
218
+ cclay telemetry on
219
+ ```
220
+
221
+ `COZYCLAY_TELEMETRY=0` and `DO_NOT_TRACK=1` disable collection for a launch.
222
+ The in-app topbar toggle changes the same npm-package setting and removes its
223
+ anonymous installation identifier. Hosted-site visitors can opt out with that
224
+ toggle, browser Do-Not-Track, or a content blocker.
225
+
226
+ PostHog's free plan retains events for 1 year.
227
+
171
228
  ## License & credits
172
229
 
173
- GNU General Public License v3.0 or later — see [`LICENSE`](LICENSE). Third-party projects retain their own licenses and copyright; see [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md).
230
+ GNU Affero General Public License v3.0 or later — see [`LICENSE`](LICENSE) and the transition details in [`LICENSING.md`](LICENSING.md). Modified network services must offer their users the corresponding source. Third-party projects retain their own licenses and copyright; see [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md).
174
231
 
175
232
  CozyClay can connect to [NVIDIA ARDY](https://github.com/nv-tlabs/ardy) for motion generation. ARDY is a separate third-party project owned and maintained by NVIDIA; it is not included in this repository, and CozyClay is not affiliated with or endorsed by NVIDIA.
@@ -11,6 +11,16 @@ CozyClay's browser-based 3D studio uses [Three.js](https://threejs.org/) through
11
11
  - Source: https://github.com/mrdoob/three.js
12
12
  - License text: https://github.com/mrdoob/three.js/blob/dev/LICENSE
13
13
 
14
+ ## Mediabunny
15
+
16
+ CozyClay uses [Mediabunny](https://mediabunny.dev/) to mux recorded WebCodecs
17
+ video frames into MP4 files in the browser.
18
+
19
+ - Copyright (c) 2024-2026 Vanilagy
20
+ - License: MPL-2.0
21
+ - Source: https://github.com/Vanilagy/mediabunny
22
+ - License text: https://github.com/Vanilagy/mediabunny/blob/main/LICENSE
23
+
14
24
  ## NVIDIA ARDY
15
25
 
16
26
  CozyClay provides an optional bridge and data-conversion workflow for externally installed [ARDY](https://github.com/nv-tlabs/ardy), an interactive human-motion generation project from NVIDIA Research.
@@ -81,7 +91,7 @@ in `public/fonts/` next to the fonts themselves.
81
91
  The rigs in `public/models/` are Mixamo characters from Adobe. Adobe permits
82
92
  their use in projects but not the distribution of the raw character files, which
83
93
  is what shipping them in this repository, the npm package and the hosted site
84
- amounts to. They are also outside the scope of this repository's GPL-3.0 grant:
94
+ amounts to. They are also outside the scope of this repository's AGPL-3.0 grant:
85
95
  nothing here relicenses them, and a fork does not acquire the right to
86
96
  redistribute them.
87
97
 
@@ -91,6 +101,14 @@ as third-party content that this licence does not cover.
91
101
  - `x-bot-tpose.fbx`, `y-bot-tpose.fbx` — Adobe Mixamo
92
102
  - Terms: https://www.adobe.com/legal/terms.html
93
103
 
104
+ ## posthog-js
105
+
106
+ The hosted site at cozyclay.org uses [posthog-js](https://posthog.com/docs/libraries/js) for anonymous usage analytics.
107
+
108
+ - Copyright PostHog Inc.
109
+ - License: Apache-2.0 AND MIT
110
+ - Source: https://github.com/PostHog/posthog-js
111
+
94
112
  ## CozyClay license scope
95
113
 
96
- The CozyClay source code in this repository is licensed under GPL-3.0-or-later. That license does not replace or relicense Three.js, ARDY, ARDY model checkpoints, the bundled fonts, the character rigs, or any other third-party component.
114
+ The CozyClay combined work in this repository is distributed under AGPL-3.0-or-later, subject to the transition details in `LICENSING.md`. That license does not replace or relicense Three.js, ARDY, ARDY model checkpoints, the bundled fonts, the character rigs, or any other third-party component.