cozyclay 1.6.0 → 1.7.1

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 (211) hide show
  1. package/CHANGELOG.md +156 -0
  2. package/README.md +82 -23
  3. package/THIRD_PARTY_NOTICES.md +8 -0
  4. package/bin/agent/agent-routes.mjs +348 -0
  5. package/bin/agent/agent-tools.mjs +164 -0
  6. package/bin/agent/codex-client.mjs +295 -0
  7. package/bin/agent/video-adapters.mjs +127 -0
  8. package/bin/codex-auth.mjs +112 -0
  9. package/bin/cozyclay.mjs +85 -25
  10. package/bin/package-signature.mjs +3 -0
  11. package/bin/telemetry-state.mjs +15 -0
  12. package/dist/app/index.html +5 -2
  13. package/dist/assets/analytics-Ce3YvFby.js +1 -0
  14. package/dist/assets/app-DNYMNzNh.css +1 -0
  15. package/dist/assets/app-jcR6lsws.js +4859 -0
  16. package/dist/assets/config-Bx7pYsD9.js +1 -0
  17. package/dist/assets/config-DeoFTYzb.css +1 -0
  18. package/dist/assets/demo-CEleUnpD.js +1 -0
  19. package/dist/assets/rolldown-runtime-hePW80VL.js +1 -0
  20. package/dist/assets/shot-prompt-s4R0Y9R7.js +14 -0
  21. package/dist/assets/ticket-CX73jjoc.js +1 -0
  22. package/dist/assets/workflow-BcZSgt5C.js +180 -0
  23. package/dist/assets/workflow-CKCpHJGL.css +1 -0
  24. package/dist/cozyclay-package.json +1 -1
  25. package/dist/index.html +8 -10
  26. package/dist/robots.txt +2 -0
  27. package/dist/sw.js +8 -2
  28. package/dist/workflow/index.html +18 -0
  29. package/mcp/LIVE-PROTOCOL.md +3 -1
  30. package/mcp/ardy-prompts.mjs +39 -9
  31. package/mcp/live-hub.mjs +15 -1
  32. package/mcp/package.json +1 -1
  33. package/mcp/runtime/package-lock.json +1 -1
  34. package/mcp/runtime/package.json +1 -1
  35. package/mcp/server.mjs +33 -1706
  36. package/mcp/tool-handlers.mjs +1896 -0
  37. package/package.json +19 -8
  38. package/src/App.jsx +6500 -2071
  39. package/src/analytics.js +173 -7
  40. package/src/app-stage.jsx +2831 -0
  41. package/src/ardy/auto-physics.js +1204 -0
  42. package/src/ardy/collision-blockers.js +289 -0
  43. package/src/ardy/cskel27.js +5 -1
  44. package/src/ardy/export.js +9 -1
  45. package/src/ardy/fix-collisions.js +2343 -0
  46. package/src/ardy/ik.js +690 -55
  47. package/src/ardy/motion-edit.js +41 -0
  48. package/src/ardy/motion-url.js +55 -0
  49. package/src/ardy/npz.js +18 -2
  50. package/src/ardy/physics-panel.css +19 -0
  51. package/src/ardy/physics-panel.jsx +76 -0
  52. package/src/ardy/physics-refine.js +111 -0
  53. package/src/ardy/physics-review.js +516 -0
  54. package/src/ardy/physics-support.js +212 -0
  55. package/src/ardy/physics-surface.js +116 -0
  56. package/src/ardy/physics-temporal.js +54 -0
  57. package/src/ardy/playback-clock.js +15 -0
  58. package/src/ardy/playback.js +145 -12
  59. package/src/ardy/prompt-clips.js +16 -7
  60. package/src/ardy/timeline-coordinates.js +24 -0
  61. package/src/ardy/timeline.jsx +1118 -308
  62. package/src/asset-pane.jsx +18 -7
  63. package/src/auto-color.js +63 -0
  64. package/src/burn-in.js +91 -0
  65. package/src/camera-block.js +21 -4
  66. package/src/camera-follow.js +16 -6
  67. package/src/camera-move.js +23 -0
  68. package/src/controls.jsx +44 -4
  69. package/src/dualview.jsx +89 -10
  70. package/src/error-boundary.jsx +41 -0
  71. package/src/first-success-guide.jsx +75 -0
  72. package/src/gizmo-claim.js +48 -0
  73. package/src/grid-floor.jsx +97 -0
  74. package/src/grid-view.js +40 -0
  75. package/src/hierarchy-model.js +124 -71
  76. package/src/hierarchy-panel.jsx +120 -8
  77. package/src/keyframe-pack.js +91 -0
  78. package/src/line-edit.js +1348 -0
  79. package/src/live-control.js +11 -1
  80. package/src/main.jsx +4 -1
  81. package/src/matte.js +55 -0
  82. package/src/model-presets.js +85 -0
  83. package/src/motion-trail.js +250 -0
  84. package/src/multimodel-ingest.js +25 -0
  85. package/src/object-gizmo.jsx +57 -18
  86. package/src/object-path.js +224 -0
  87. package/src/part-colours.js +105 -0
  88. package/src/planview.jsx +165 -14
  89. package/src/pose-extract/detector.js +24 -4
  90. package/src/pose-extract/fit.js +36 -3
  91. package/src/pose-extract/image-frame.js +16 -5
  92. package/src/pose-extract/index.js +3 -2
  93. package/src/pose-extract/mirror.js +153 -0
  94. package/src/pose-extract/take.js +20 -3
  95. package/src/pose-thumbs.js +3 -2
  96. package/src/poses.js +55 -0
  97. package/src/posestudio.jsx +115 -87
  98. package/src/project-browser.jsx +80 -6
  99. package/src/project.js +178 -4
  100. package/src/props.jsx +169 -27
  101. package/src/render-passes.js +114 -0
  102. package/src/result-modal.jsx +2 -14
  103. package/src/room.jsx +37 -10
  104. package/src/scene-asset-cache.js +3 -0
  105. package/src/scene-objects.js +245 -6
  106. package/src/scenes.js +47 -2
  107. package/src/shot-authoring.js +18 -0
  108. package/src/shot-guides.js +90 -0
  109. package/src/shot-meta.js +66 -0
  110. package/src/shot-prompt.js +80 -0
  111. package/src/shot.js +7 -7
  112. package/src/speed-envelope.js +254 -0
  113. package/src/storyboard.js +60 -0
  114. package/src/styles.css +8190 -6054
  115. package/src/take-recipe.js +165 -0
  116. package/src/timeline-extent.js +39 -0
  117. package/src/ui-scrub.js +102 -0
  118. package/src/ui.jsx +80 -43
  119. package/src/use-render-activity.js +17 -0
  120. package/src/workflow/AgentPanel.jsx +505 -0
  121. package/src/workflow/CozySceneNode.jsx +140 -0
  122. package/src/workflow/ShotPromptNode.jsx +35 -0
  123. package/src/workflow/WorkflowBuilder.jsx +573 -0
  124. package/src/workflow/agent-client.js +336 -0
  125. package/src/workflow/agent-panel.css +692 -0
  126. package/src/workflow/canvas-commands.js +64 -0
  127. package/src/workflow/clipboard-image.js +44 -0
  128. package/src/workflow/cozy-scene-node.css +52 -0
  129. package/src/workflow/cozy-scene-node.js +196 -0
  130. package/src/workflow/image-versions.js +69 -0
  131. package/src/workflow/keyframe-pack-request.js +64 -0
  132. package/src/workflow/local-workflow.js +60 -0
  133. package/src/workflow/main.jsx +12 -0
  134. package/src/workflow/motion-input.js +99 -0
  135. package/src/workflow/node-schema.js +64 -0
  136. package/src/workflow/scene-asset-sync.js +223 -0
  137. package/src/workflow/shot-prompt-node.js +33 -0
  138. package/src/workflow/vibe-payload.js +215 -0
  139. package/src/workflow/workflow.css +8 -0
  140. package/src/zip-store.js +122 -0
  141. package/tools/ardy/BRIDGE.md +20 -316
  142. package/tools/ardy/GVHMR-NPZ.md +68 -0
  143. package/tools/ardy/README.md +89 -205
  144. package/tools/ardy/bridge.mjs +598 -73
  145. package/tools/ardy/bvh-cskel27.mjs +63 -5
  146. package/tools/ardy/cclay_gvhmr_worker.py +127 -0
  147. package/tools/ardy/extract.mjs +136 -10
  148. package/tools/ardy/gvhmr-floor.mjs +102 -0
  149. package/tools/ardy/gvhmr-to-cskel27.mjs +21 -0
  150. package/tools/ardy/gvhmr_fastpath.py +168 -0
  151. package/tools/ardy/gvhmr_trajectory.py +240 -0
  152. package/tools/ardy/mocap-metrics.mjs +166 -0
  153. package/tools/ardy/npz.mjs +15 -1
  154. package/tools/ardy/prompt-limits.mjs +5 -0
  155. package/tools/ardy/run-on-box.sh +1 -1
  156. package/tools/ardy/runners/gvhmr-worker.mjs +194 -0
  157. package/tools/ardy/runners/index.mjs +11 -16
  158. package/tools/ardy/smpl-cskel27.mjs +178 -0
  159. package/tools/ardy/visual-qa.mjs +38 -30
  160. package/tools/ardy/vq-car.mjs +1 -1
  161. package/tools/demo-worker/README.md +137 -0
  162. package/tools/demo-worker/api-client.mjs +239 -0
  163. package/tools/demo-worker/generate.mjs +303 -0
  164. package/tools/demo-worker/index.mjs +466 -0
  165. package/tools/demo-worker/sign-core.mjs +112 -0
  166. package/tools/demo-worker/sign.mjs +161 -0
  167. package/tools/dev-full.mjs +84 -37
  168. package/tools/kimodo/compare-seam.mjs +108 -0
  169. package/tools/kimodo/constraints.mjs +244 -0
  170. package/tools/kimodo/edit.mjs +264 -0
  171. package/tools/kimodo/effector-constraints.mjs +200 -0
  172. package/tools/kimodo/generate.mjs +597 -0
  173. package/tools/kimodo/measure-pose.mjs +65 -0
  174. package/tools/kimodo/measure-preserve.mjs +899 -0
  175. package/tools/kimodo/measure-waypoints.mjs +55 -0
  176. package/tools/kimodo/pose-constraints.mjs +250 -0
  177. package/tools/kimodo/preserve-mask.mjs +543 -0
  178. package/tools/kimodo/read-npz.mjs +189 -0
  179. package/tools/kimodo/run-edit-on-box.mjs +155 -0
  180. package/tools/kimodo/run-sequence-on-box.mjs +178 -0
  181. package/tools/kimodo/runner.mjs +246 -0
  182. package/tools/kimodo/seam-batch.mjs +77 -0
  183. package/tools/kimodo/setup-local.mjs +30 -0
  184. package/tools/kimodo/setup-on-box.sh +83 -0
  185. package/tools/kimodo/soma77-to-cskel27.mjs +305 -0
  186. package/tools/perf/ik-camera-drag.mjs +138 -0
  187. package/tools/process-supervisor.mjs +1 -1
  188. package/tools/projflow/driver.py +1069 -0
  189. package/tools/projflow/generate.mjs +805 -0
  190. package/tools/projflow/hml22-to-cskel27.mjs +735 -0
  191. package/tools/projflow/line-edit-job.mjs +547 -0
  192. package/tools/projflow/replay.mjs +452 -0
  193. package/tools/projflow/runner.mjs +269 -0
  194. package/tools/projflow/service.mjs +742 -0
  195. package/tools/run-tests.mjs +165 -19
  196. package/tools/verify-package-tarball.mjs +41 -0
  197. package/dist/assets/app-CqOk49Bk.css +0 -1
  198. package/dist/assets/app-G55dPEDB.js +0 -4811
  199. package/src/generation/client.js +0 -56
  200. package/src/generation/generation-request.js +0 -17
  201. package/src/generation/session.js +0 -47
  202. package/src/generation/shot-spec.js +0 -40
  203. package/src/generation/use-generation.js +0 -44
  204. package/tools/generation/README.md +0 -29
  205. package/tools/generation/bridge.mjs +0 -162
  206. package/tools/generation/job-store.mjs +0 -51
  207. package/tools/generation/providers/kling.mjs +0 -76
  208. package/tools/generation/providers/runway.mjs +0 -101
  209. package/tools/generation/providers/seedance.mjs +0 -87
  210. package/tools/generation/providers/shared.mjs +0 -49
  211. package/tools/generation/providers/veo.mjs +0 -84
package/CHANGELOG.md CHANGED
@@ -1,5 +1,161 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.1
4
+
5
+ - Open the complete Studio at the development server root; the unfinished
6
+ Workflow canvas remains available at `/workflow/`.
7
+
8
+ ## 1.7.0
9
+
10
+ Kimodo becomes the default motion-generation backend, and a full edit-and-refine
11
+ loop lands on top of it: draw over a trail to reshape it, keep most of a take
12
+ and regenerate only a window, and step back through 20 checkpoints of a
13
+ take's history. Multi-character rigs, prop motion, and camera work all get
14
+ real editing surfaces, and three failure modes that used to blank the whole
15
+ studio now degrade with a way back instead.
16
+
17
+ ### Kimodo motion backend, now default
18
+
19
+ - Kimodo, introduced behind `CCLAY_MOTION_BACKEND=kimodo`, is now the default
20
+ motion-generation backend.
21
+ - Root 2D path constraints, pose pinning (via Kimodo's fullbody constraints),
22
+ and motion-edit-by-regeneration (IK-adjust a span, then regenerate) now all
23
+ work on Kimodo — base clips still refuse, since Kimodo has no autoregressive
24
+ history input for them.
25
+ - The prompt-block cap is raised from 4s to 5s after measuring seam quality
26
+ across block lengths — 5s scored best short of a single seamless take, while
27
+ 8s blocks collapsed and sub-2s blocks lost a third of their frames to the
28
+ transition window.
29
+
30
+ ### Draw to edit a take (line editing)
31
+
32
+ - A new line-edit mode: drag a joint's motion trail to reshape it, or draw a
33
+ fresh stroke across empty space when the trail doesn't reach where you want.
34
+ Stroke endpoints snap to the take's own nearby frames so edits land where
35
+ you meant, and a smoothstep seam keeps the join from popping.
36
+ - Pin exact moments in 3D: scrub the playhead, drag a joint into place, and
37
+ pin up to 8 moments across a take.
38
+ - Runs on a new ProjFlow-based backend on the Kimodo box; edits are
39
+ seed-deterministic, so a release-quality regenerate reproduces the preview
40
+ bit for bit.
41
+ - Ctrl/Cmd+Z undoes the last pull; releasing a drag previews at reduced
42
+ quality first (~1s), then a full-quality generate confirms with the same
43
+ seed.
44
+
45
+ ### Keep most of a take (preserve mode)
46
+
47
+ - A preserve slider and grouped per-limb masks let you regenerate only part of
48
+ a take — free one limb, or a masked region — instead of the whole clip.
49
+ - Effector constraints keep specific joints anchored through a regeneration.
50
+
51
+ ### Take recipes and version history
52
+
53
+ - Every generate or edit now records its own recipe (seed, prompt blocks, and
54
+ edits in order), and extending a take re-sends its edits so refining before
55
+ extending no longer throws work away.
56
+ - A version strip above the timeline checkpoints every generate/edit up to 20
57
+ deep — click any entry to restore that take and its recipe.
58
+ - The edit surface collapses to two modes: 장면 (Kimodo blocking — new, again,
59
+ add-block) and 다듬기 (line-edit refinement, one click from a loaded take).
60
+
61
+ ### Multi-character rigs and IK
62
+
63
+ - Every cast member now gets its own namespaced rig subtree in the Hierarchy
64
+ panel, not just the first — bones, IK badges, and focus all follow the
65
+ active character correctly (#76, #77, #78).
66
+ - IK corrections on an inactive character now survive a focus switch instead
67
+ of silently reverting to the uncorrected take (#77).
68
+ - Timeline pins (IK correction keys, prompt-clip ranges) migrate through
69
+ segment retimes instead of firing on the wrong frame after a slow-mo (#79).
70
+ - Body Contact: dragging a character down during IK editing now stops the
71
+ pelvis at the floor and holds any planted foot or reaching hand there,
72
+ measured per character from the actual skinned mesh — no more clay figures
73
+ hovering above the ground.
74
+ - Motion trails now render per body part in IK handle colors, with trail
75
+ editing and IK editing split into separate tools instead of one ambiguous
76
+ shared gizmo.
77
+ - A One-Euro filter now smooths SAM-extracted wrist tremor by speed —
78
+ quieting rest-state jitter while leaving fast strikes untouched (#84).
79
+
80
+ ### Prop motion: travel paths and speed
81
+
82
+ - Scene objects (props) can now be given a travel path, authored the same way
83
+ as a camera rail: draw it in Top-View, refine it in the 3D scene, with a
84
+ mid-route point insertable by double-click.
85
+ - A speed graph — shared by props and the camera dolly — lets you drag a
86
+ stretch of the timeline faster or slower; the area under the curve is the
87
+ distance, so the rest of the segment compensates automatically, and a cut
88
+ pins the take at an exact time/distance point.
89
+ - Drag a prop onto a character or a specific rig bone in the Hierarchy to
90
+ attach it — it now rides that character's motion (a carried bat stays in a
91
+ walking character's hand instead of staying world-anchored).
92
+
93
+ ### Viewport and lighting
94
+
95
+ - Auto Color mode: a topbar toggle stamps a stable, automatically derived
96
+ color onto every set object, the way Blender's random viewport shading
97
+ colors objects — display-only, so authored colors, saved projects, undo
98
+ history, and the MCP scene view are untouched.
99
+ - A new Grid view swaps the clay stage for a dark, Blender-style reference
100
+ grid for blocking work — overlay-only, so exports and the plan board never
101
+ see it.
102
+ - The key light is now a grabbable sun: move it like any other object, and
103
+ dial its warmth between cool daylight and warm sunset amber.
104
+ - Blender-style composition guides (thirds, golden ratio, center+diagonals,
105
+ safe areas) on the shot preview, and exported frames can burn in a slate +
106
+ zero-padded frame counter.
107
+
108
+ ### Camera
109
+
110
+ - Crane marks get a 3-axis gizmo; a rail now always carries a crane profile,
111
+ and the old on/off toggle is gone (a flat profile at the follow height reads
112
+ as "off").
113
+
114
+ ### Project workflow
115
+
116
+ - A startup chooser and local project session replace the always-on implicit
117
+ scene.
118
+ - New workflow-focused camera motion modes, plus several passes cleaning up
119
+ timeline control grouping, control visibility, and removing legacy
120
+ console/generation panels.
121
+
122
+ ### AI control (MCP)
123
+
124
+ - `describe_scene` now reports the key light and the shot list; `update_object`
125
+ can set a prop's travel path; `load_motion` can target a specific character
126
+ by letter/slot/id and re-install an assembled take without a full
127
+ regeneration.
128
+ - Editors now identify themselves (project, scene, cast size) in
129
+ `live_status`, so multi-tab routing no longer depends on an opaque UUID.
130
+
131
+ ### Hosted demo v1
132
+
133
+ - cozyclay.org's install-free demo got a real backend: a Cloudflare Worker
134
+ queue (Google OAuth + Turnstile, single-FIFO D1 queue, private R2 result
135
+ proxy) and an outbound-polling GPU box worker with zero inbound sockets.
136
+
137
+ ### Reliability
138
+
139
+ - Three failure modes that used to blank the whole studio now degrade
140
+ instead: a render error anywhere in the app shows a message with a
141
+ reload-and-resume, a lost WebGL context (sleep/wake, driver restart) shows
142
+ an overlay and repaints on restore, and layout-save writes are guarded like
143
+ every other write in the app (#64).
144
+ - A selected object's own gizmo cage no longer blocks clicks meant for a
145
+ different object (#81).
146
+ - Recording no longer exports frozen tail frames after a cast member or
147
+ motion segment shrinks (#80).
148
+
149
+ ### Also in this release
150
+
151
+ - Onboarding: a hosted-demo visitor now gets a "watch the sample" path instead
152
+ of landing on an empty stage, and three funnel-measurement gaps (startup
153
+ scene creation, video export, cutout import) are closed.
154
+ - The studio's PWA update banner finally has a listener, so a waiting version
155
+ reloads on request instead of running stale indefinitely.
156
+ - Objects can now be parented from the Inspector's own Parent picker, not
157
+ only through MCP.
158
+
3
159
  ## 1.6.0
4
160
 
5
161
  The official npm package now records anonymous product usage so downloads can
package/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
  <p align="center">
14
14
  <a href="LICENSE"><img alt="License: AGPL-3.0" src="https://img.shields.io/badge/license-AGPL--3.0-blue"></a>
15
15
  <a href="https://www.npmjs.com/package/cozyclay"><img alt="npm" src="https://img.shields.io/npm/v/cozyclay"></a>
16
- <img alt="Node 22+" src="https://img.shields.io/badge/node-22%2B-brightgreen">
16
+ <img alt="Node 22.13+" src="https://img.shields.io/badge/node-22.13%2B-brightgreen">
17
17
  <a href="https://github.com/NomaDamas/CozyClay/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/NomaDamas/CozyClay?style=flat"></a>
18
18
  </p>
19
19
 
@@ -34,7 +34,7 @@ CozyClay is a browser-based 3D staging studio built with Three.js and React Thre
34
34
  npx cozyclay
35
35
  ```
36
36
 
37
- That is the whole install. **[cozyclay.org](https://cozyclay.org/)** has the demo reel and a walkthrough of what the studio does; to use it, run it on your own machine. It ships seeded with a pre-generated motion clip, so you can scrub the timeline, drive the cameras and draw a dolly rail straight away — generating *new* motion needs a local ARDY machine, so that part stays off until you point it at one.
37
+ That is the whole install. **[cozyclay.org](https://cozyclay.org/)** has the demo reel and a walkthrough of what the studio does; to use it, run it on your own machine. It ships seeded with a pre-generated motion clip, so you can scrub the timeline, drive the cameras and draw a dolly rail straight away — generating *new* motion is optional and uses the Kimodo bridge when configured.
38
38
 
39
39
  ## Demo
40
40
 
@@ -44,18 +44,18 @@ https://github.com/user-attachments/assets/1d0113e5-6922-443d-affc-1bdabc666247
44
44
 
45
45
  | | |
46
46
  | --- | --- |
47
- | **Stage a scene** | Create primitives and set pieces, then move, rotate and scale them with a W/E/R gizmo. Grid snapping is a preference, not a law — hold `Ctrl` mid-drag to invert it. A bird's-eye plan view drives 2D root waypoints for character paths. |
47
+ | **Stage a scene** | Create primitives and set pieces, then move, rotate and scale them with a W/E/R gizmo. Grid snapping is a preference, not a law — hold `Ctrl` mid-drag to invert it. A bird's-eye plan view drives 2D root waypoints for character paths. The topbar's Auto Color toggle gives every object its own stable display color — Blender's random viewport color, so twenty grey blockout boxes stay tellable apart — without touching the colors you authored (captures include the display colors while it is on). |
48
48
  | **Fly the camera** | Right-drag flies (WASD walks, Q/E cranes), middle-drag pans, Alt+drag orbits the selection, click selects, `F` frames — the muscle memory you already have from a 3D editor. |
49
49
  | **Undo anything** | Every scene mutation goes through one history store: a drag, a scrub, an inspector edit is exactly one undo entry. `Esc` cancels an in-flight drag and restores the pre-drag transform. |
50
- | **Generate motion** | Pose characters and export poses, sequence multi-phase motion as Prompt Blocks on a resizable timeline, send them to ARDY, then play the result back with sparse IK correction where the generated motion needs fixing. |
50
+ | **Generate motion** | Pose characters and export poses, sequence multi-phase motion as Prompt Blocks on a resizable timeline, send them to Kimodo, then play the result back with sparse IK correction where the generated motion needs fixing. |
51
51
  | **Direct it with an AI** | Connect Claude — or any MCP client — and ask for a shot in plain language. It places the cast, frames “a low wide profile”, generates multi-phase motion, and the viewport moves in front of you. See [AI control](#ai-control-mcp). |
52
52
 
53
53
  ## Requirements
54
54
 
55
- - Node.js 22 or newer
55
+ - Node.js 22.13 or newer
56
56
  - npm, or bun
57
57
  - A Chromium-based browser
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)
58
+ - An SSH-accessible NVIDIA machine running Kimodo, for motion generation — run `npm run kimodo:setup` once; the first setup downloads the Kimodo checkpoint and text-encoder stack.
59
59
 
60
60
  ## Quick start
61
61
 
@@ -65,17 +65,21 @@ npx cozyclay
65
65
  bunx cozyclay
66
66
  ```
67
67
 
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`.
68
+ That downloads the built studio and opens it at `http://127.0.0.1:5180/app/`. Nothing to compile, no dependency tree to install. Useful flags: `--port 5200`, `--no-open`, `--no-motion`.
69
69
 
70
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
71
 
72
- Motion generation stays off until you point it at a machine that can run it:
72
+ Motion generation uses Kimodo by default once you point it at an SSH-accessible NVIDIA machine:
73
73
 
74
74
  ```bash
75
- CCLAY_ARDY_HOST=user@your-gpu-box npx cozyclay
75
+ CCLAY_KIMODO_HOST=user@your-gpu-box npx cozyclay
76
76
  ```
77
77
 
78
- Everything else staging through camera work and playback — runs without it.
78
+ Install the remote worker once:
79
+
80
+ ```bash
81
+ CCLAY_KIMODO_HOST=user@your-gpu-box npm run kimodo:setup
82
+ ```
79
83
 
80
84
  ## AI control (MCP)
81
85
 
@@ -116,20 +120,57 @@ npm install
116
120
  npm run dev
117
121
  ```
118
122
 
119
- Open `http://127.0.0.1:5180`. `npm run dev` starts the studio together with its local ARDY bridge; `npm run dev:ui` starts the browser UI alone, without Block Generation. The bridge listens on loopback only; the environment variables that point it at a remote ARDY machine are documented in [`tools/ardy/BRIDGE.md`](tools/ardy/BRIDGE.md).
123
+ Open `http://127.0.0.1:5180/` for the Studio. The Workflow canvas remains available at `http://127.0.0.1:5180/workflow/` when you need its node editor. `npm run dev` starts the studio together with its local Kimodo bridge once `CCLAY_KIMODO_HOST` points at a GPU box; without that variable it starts the studio alone and says so, and Block Generation stays unavailable until you set it. `npm run dev:ui` starts the browser UI alone in every case. The bridge listens on loopback only; Kimodo host variables are documented in [`tools/kimodo/setup-on-box.sh`](tools/kimodo/setup-on-box.sh).
124
+
125
+ ### Workflow canvas
126
+
127
+ The Vibe-Workflow canvas is available at `http://127.0.0.1:5180/workflow/`. It keeps the original node-style flow and adds a **CozyClay Scene** node with an interactive 3D viewport, frame/camera controls, and an Open Studio handoff. Start it with the normal dev server, or run `npm run dev:ui` by itself for local-only editing. Workflow graphs are saved in the browser and execute locally; no remote workflow service or API key is required.
120
128
 
121
- <details>
122
- <summary><b>Token-free ARDY text encoder</b> — skip the Hugging Face gate</summary>
129
+ ## Hosted demo
130
+
131
+ Installing a GPU motion backend is the hard part, so `cozyclay.org` also runs a queued demo: a visitor writes one prompt, gets a ticket link, and a GPU box owned by the maintainer generates the motion and uploads it. The visitor never installs anything and never leaves the site — the result opens in the studio itself.
132
+
133
+ The pieces live in this repository, under `AGPL-3.0-or-later` like everything else:
134
+
135
+ | Path | Role |
136
+ | --- | --- |
137
+ | `demo/`, `d/` | Static composer and ticket/result pages, built into `dist/` by the same `npm run build` |
138
+ | `workers/api/` | Cloudflare Worker queue API (D1 for state, R2 for results), with its own pinned toolchain |
139
+ | `tools/demo-worker/` | The GPU-box poller. Outbound fetch only — it never opens a listening socket |
123
140
 
124
- ARDY's text encoder normally requires a Hugging Face account, gated-model approval, and an access token on the ARDY machine. CozyClay ships a token-free alternative — one command provisions the same encoder stack from public repositories, pinned by commit and SHA-256:
141
+ **Queue policy.** Jobs run in a single FIFO queue. All of these values live in `workers/api/src/policy.js`; nothing else carries a copy.
142
+
143
+ | Rule | Value |
144
+ | --- | --- |
145
+ | Active jobs per account | 1 |
146
+ | Daily cap | 2 per account |
147
+ | Global waiting cap | 200, then submissions are refused |
148
+ | Lease / heartbeat / hard timeout | 15 min lease, renewed every 60 s, 20 min hard stop |
149
+ | Attempts | 2 (one automatic retry); a failed job refunds the daily cap |
150
+ | Result retention | 30 days, then the R2 object is deleted |
151
+ | Prompt limit | shared with the studio via `tools/ardy/prompt-limits.mjs` |
152
+
153
+ **Secrets.** Never committed. Configure each with `wrangler secret put` against `workers/api/wrangler.toml`:
154
+ `GOOGLE_CLIENT_SECRET`, `CC_WORKER_SECRET`, `SESSION_SIGNING_KEY`, `TURNSTILE_SECRET_KEY`. The non-secret `GOOGLE_CLIENT_ID` and `TURNSTILE_SITE_KEY` vars in `wrangler.toml` must also be replaced before a real deployment.
155
+
156
+ **Running the API locally.**
125
157
 
126
158
  ```bash
127
- CCLAY_ARDY_HOST=user@your-gpu-box tools/ardy/setup-text-encoder-on-box.sh
159
+ npm run demo:api:install # npm --prefix workers/api ci
160
+ npm --prefix workers/api exec -- wrangler d1 migrations apply cozyclay-demo --local
161
+ npm run demo:api # wrangler dev on 127.0.0.1:8787
128
162
  ```
129
163
 
130
- See [`tools/ardy/README.md`](tools/ardy/README.md) for details. This workflow is built with Meta Llama 3; the encoder's base weights are licensed under the Meta Llama 3 Community License.
164
+ **Running the GPU-box worker.** The hosted queue worker has its own isolated runtime and reaches the API outbound only. It is independent from the local Studio's Kimodo backend.
131
165
 
132
- </details>
166
+ ```bash
167
+ CC_DEMO_API_BASE=https://api.cozyclay.org \
168
+ CC_WORKER_ID=box1 \
169
+ CC_WORKER_SECRET=... \
170
+ npm run demo:worker
171
+ ```
172
+
173
+ See [`workers/api/README.md`](workers/api/README.md) for the deployment, migration and rollback runbook, and [`tools/demo-worker/README.md`](tools/demo-worker/README.md) for service units, environment-file permissions and the listening-socket check.
133
174
 
134
175
  ## Controls
135
176
 
@@ -138,16 +179,18 @@ See [`tools/ardy/README.md`](tools/ardy/README.md) for details. This workflow is
138
179
  | Right-drag | Look around (fly) |
139
180
  | RMB + WASD | Walk while flying |
140
181
  | RMB + Q/E | Crane down / up |
182
+ | RMB + Shift | Boost fly speed 2.6× |
141
183
  | Middle-drag | Pan |
142
184
  | Alt + drag | Orbit the selection |
143
- | Scroll | Dolly |
185
+ | Scroll | Dolly; while flying, sets the fly speed instead |
144
186
  | Click | Select; empty space clears |
145
187
  | W / E / R | Move / rotate / scale tool |
146
- | Ctrl (during drag) | Invert grid snapping |
188
+ | Ctrl/Cmd (during drag) | Invert grid snapping |
147
189
  | Ctrl/Cmd+Z, Ctrl/Cmd+Shift+Z | Undo / redo |
148
190
  | Esc | Cancel the in-flight drag |
149
191
  | End | Drop the selection to the surface |
150
192
  | Ctrl/Cmd+D | Duplicate the selection |
193
+ | Delete / Backspace | Delete the selection |
151
194
  | F | Frame the selection |
152
195
 
153
196
  ## Validate
@@ -160,15 +203,15 @@ See [`tools/ardy/README.md`](tools/ardy/README.md) for details. This workflow is
160
203
  | `npm run test:objects` | Gizmo interaction in a real browser — needs `npm run dev:ui` in another shell |
161
204
  | `npm run test:theme` / `test:appearance` / `test:layout` | UI theme, appearance, layout |
162
205
  | `npm run test:lifecycle` | Dev-server process lifecycle |
163
- | `npm run test:ardy` | ARDY conversion, playback, and IK pipeline |
206
+ | `npm run test:ardy` | Motion conversion, playback, and IK pipeline |
164
207
  | `cd mcp && npm install && npm run verify` | MCP server over real stdio — all 420 framing combinations |
165
208
  | `cd mcp && npm run verify:live` | Live-control protocol against a fake editor (same `npm install` first) |
166
209
  | `npm run build` | Production build |
167
210
 
168
- Ad-hoc browser QA, while a dev server is available:
211
+ Ad-hoc browser QA, while a dev server is available (the browser opens the studio at `/app/`):
169
212
 
170
213
  ```bash
171
- npm run qa:browser -- <qa-script>
214
+ npm run qa:browser -- node <qa-script>
172
215
  ```
173
216
 
174
217
  ## Contributing
@@ -189,15 +232,23 @@ Events collected:
189
232
  | --- | --- |
190
233
  | `install:first_launch` | First run of the official npm package |
191
234
  | `app:session_started` | Start of an official npm package session |
235
+ | `app:session_ended` | Session duration, action count, and scenes touched (bucketed) |
236
+ | `feature:used` | One signal per feature per session |
192
237
  | `$pageview` | Funnel and drop-off analysis |
193
238
  | `scene:created` | Funnel and drop-off analysis |
194
239
  | `scene:loaded` | Funnel and drop-off analysis |
240
+ | `project:saved` | User-owned project persistence |
241
+ | `project:opened` | Return to a saved project (age bucket) |
195
242
  | `craft:first_action` | Funnel and drop-off analysis |
243
+ | `motion:backend_state` | Motion capability at session start (`none`, `local_kimodo`, or `hosted`) |
244
+ | `motion:generate_blocked` | Generate intent when no motion backend is available |
196
245
  | `motion:job_started` | Motion reliability |
197
246
  | `motion:job_succeeded` | Motion reliability |
198
247
  | `motion:job_failed` | Motion reliability |
199
248
  | `export:blocking_frame_succeeded` | Funnel and drop-off analysis |
200
249
  | `activation:completed` | Funnel and drop-off analysis |
250
+ | `hosted:composer_viewed`, `hosted:login_started`, `hosted:ticket_created` | Hosted demo funnel |
251
+ | `hosted:result_opened`, `hosted:opened_in_studio` | Hosted result funnel |
201
252
 
202
253
  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
254
 
@@ -209,6 +260,14 @@ development servers, CI, and tests do not send analytics. Official npm
209
260
  artifacts carry a signature checked by the launcher, so copying or repackaging
210
261
  the source does not enable telemetry.
211
262
 
263
+ Each event is registered with `origin_kind` (`local` or `hosted`), a coarse
264
+ operating-system label, and (for npm sessions) `install_kind` (`npx` or
265
+ `global`). Source checkouts are classified as `clone` and remain telemetry-off.
266
+ The first npm launch may optionally answer a one-line channel question
267
+ (`x`, `hn`, `reddit`, `github`, `friend`, `other`, or `skip`); `skip` sends no
268
+ acquisition value. Session duration and action counts are buckets, and project
269
+ events never include names, paths, prompts, or timestamps.
270
+
212
271
  The npm package prints this disclosure once on first launch. Control it at any
213
272
  time:
214
273
 
@@ -229,4 +288,4 @@ PostHog's free plan retains events for 1 year.
229
288
 
230
289
  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).
231
290
 
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.
291
+ The hosted demo worker may use an externally installed [NVIDIA ARDY](https://github.com/nv-tlabs/ardy) runtime. 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. The local Studio uses Kimodo instead.
@@ -105,6 +105,14 @@ as third-party content that this licence does not cover.
105
105
 
106
106
  The hosted site at cozyclay.org uses [posthog-js](https://posthog.com/docs/libraries/js) for anonymous usage analytics.
107
107
 
108
+ The disclosed wire events include session start/end (bucketed duration and
109
+ actions), one-per-session feature usage, project save/open buckets, and the
110
+ hosted composer/login/ticket/result funnel. Events carry only the registered
111
+ `origin_kind`, coarse `os`, and npm `install_kind`; prompts, filenames, paths,
112
+ project names, and timestamps are excluded. Source checkouts keep telemetry
113
+ disabled. See the Analytics & privacy section in `README.md` for the complete
114
+ event table and opt-out controls.
115
+
108
116
  - Copyright PostHog Inc.
109
117
  - License: Apache-2.0 AND MIT
110
118
  - Source: https://github.com/PostHog/posthog-js