@homie-rocks/studio 0.51.4 → 0.51.6
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/CHANGELOG.md +49 -0
- package/README.md +10 -29
- package/apps/APPS.md +16 -1
- package/bin/homie-studio.mjs +28 -30
- package/guides/app/NEEDS.md +160 -0
- package/guides/app/SKILL.md +20 -4
- package/guides/art/SKILL.md +68 -140
- package/guides/art/scripts/art.mjs +6 -79
- package/guides/models/SKILL.md +73 -177
- package/guides/models/references/RIGHTS.md +1 -1
- package/guides/models/scripts/models.mjs +7 -288
- package/guides/music/SKILL.md +74 -183
- package/guides/music/references/COMPOSITION.md +21 -26
- package/guides/music/references/GAME-AUDIO.md +3 -3
- package/guides/music/references/RIGHTS.md +12 -15
- package/guides/music/scripts/music.mjs +11 -202
- package/guides/parts/SKILL.md +1 -1
- package/guides/shop/SKILL.md +68 -77
- package/guides/sound/SKILL.md +70 -1
- package/guides/sound/scripts/player/sound.js +233 -0
- package/guides/studio-setup/SKILL.md +11 -27
- package/guides/studio-setup/references/OFFICIAL-MEDIA.md +66 -0
- package/guides/style/SKILL.md +66 -3
- package/guides/video/SKILL.md +83 -0
- package/guides/video/references/DELIVERY.md +73 -0
- package/guides/video/references/HONESTY.md +40 -0
- package/guides/video/references/METHOD.md +144 -0
- package/guides/video/references/RECORD.md +137 -0
- package/guides/video/references/TRAILER.md +154 -0
- package/guides/video/references/examples/site-walkthrough.json +14 -0
- package/guides/video/references/examples/studio-play-phone.json +15 -0
- package/guides/video/references/examples/studio-play.json +17 -0
- package/guides/video/scripts/capture-game.mjs +175 -0
- package/guides/video/scripts/clock.js +136 -0
- package/guides/video/scripts/drawover/film.js +58 -0
- package/guides/video/scripts/drawover/index.html +9 -0
- package/guides/video/scripts/drawover/look.js +115 -0
- package/guides/video/scripts/drawover/shots.json +12 -0
- package/guides/video/scripts/lib/browser.mjs +87 -0
- package/guides/video/scripts/lib/frames.mjs +170 -0
- package/guides/video/scripts/lib/remix.mjs +159 -0
- package/guides/video/scripts/qa.mjs +127 -0
- package/guides/video/scripts/record-fixed.mjs +403 -0
- package/guides/video/scripts/record-page.mjs +477 -0
- package/guides/video/scripts/tap.js +108 -0
- package/guides/video/scripts/video.mjs +888 -0
- package/lib/app-needs.mjs +86 -18
- package/lib/app-ready.mjs +21 -0
- package/lib/build.mjs +12 -9
- package/lib/check.mjs +16 -7
- package/lib/cloudflare.mjs +6 -11
- package/lib/codex.mjs +7 -5
- package/lib/dev.mjs +1 -2
- package/lib/doctor.mjs +10 -54
- package/lib/mcp-tools.mjs +42 -21
- package/lib/mcp.mjs +1 -1
- package/lib/media-import.mjs +41 -0
- package/lib/media-workflows.mjs +13 -0
- package/lib/needs-headless.mjs +34 -0
- package/lib/official-media.mjs +15 -0
- package/lib/rules-build.mjs +13 -5
- package/lib/scaffold.mjs +2 -2
- package/lib/shop-links.mjs +81 -19
- package/lib/shop-listen.mjs +43 -0
- package/lib/shop-local.mjs +1 -1
- package/lib/shop-mcp.mjs +58 -0
- package/lib/stripe-connect.mjs +36 -15
- package/lib/template-history.json +87 -0
- package/lib/upgrade-media.mjs +13 -0
- package/lib/upgrade.mjs +10 -0
- package/package.json +1 -1
- package/parts/PARTS.md +1 -1
- package/rules/view.ts +4 -0
- package/shop/SHOP.md +110 -34
- package/worker/app-records.mjs +1 -0
- package/worker/build-id.mjs +1 -1
- package/worker/event-resources.mjs +9 -3
- package/worker/index.mjs +5 -1
- package/worker/local-test.mjs +4 -0
- package/worker/mcp-events.mjs +2 -2
- package/worker/mcp-tools.mjs +19 -1
- package/worker/mcp.mjs +1 -1
- package/worker/purchase-reconciliation.mjs +16 -1
- package/worker/shop-links.mjs +1 -1
- package/worker/shop-rules.mjs +3 -0
- package/worker/shop-subscriptions.mjs +2 -0
- package/worker/shop.mjs +58 -8
- package/worker/stripe-ownership.mjs +7 -0
- package/worker/version.mjs +1 -1
- package/guides/models/references/models.json +0 -175
- package/guides/music/scripts/lib/eleven.mjs +0 -260
- package/lib/projects-env.mjs +0 -68
- package/lib/projects.mjs +0 -311
- package/lib/provider-key.mjs +0 -21
package/guides/models/SKILL.md
CHANGED
|
@@ -1,198 +1,94 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: models
|
|
3
|
-
description:
|
|
4
|
-
compatibility: Node 22
|
|
3
|
+
description: "Make coherent 3D assets through the official fal MCP, then optimize, register and check them in the studio."
|
|
4
|
+
compatibility: Node 22 and Tripo models through the official fal plugin in the AI client. Local media processing uses ffmpeg and Chrome where needed.
|
|
5
5
|
metadata:
|
|
6
6
|
providers: fal tripo
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
# Models
|
|
9
|
+
# Models that fit the game
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Start with Homie's CC0 starter library (`homie-studio assets`) when it fits. Read the
|
|
12
|
+
locked style, character proportions, scale and performance budgets before generating.
|
|
13
|
+
For a new prop, generate and inspect one clean concept first, then a mesh. For a
|
|
14
|
+
character, specify a full body A-pose, readable silhouette and the required skeleton.
|
|
15
|
+
Use a coherent family; avoid mixing unrelated material styles and proportions.
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
4. **Generated** (paid, their own fal account, under a budget): a concept, then a mesh: props, and rigged characters
|
|
19
|
-
(below). A character's rig, clips and feel are the `animate` skill's.
|
|
17
|
+
Use fal's `recommend_model`/`search_models`, `get_model_schema` and `get_pricing` for
|
|
18
|
+
each image, mesh and rig step. No model or price is permanently pinned in Homie.
|
|
19
|
+
Use `run_model` for the concept and `submit_job`, `check_job`, `get_job_result` for 3D.
|
|
20
|
+
Inspect the concept before paying for a mesh. Request only schema-supported rig fields.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```sh
|
|
28
|
-
npx --no-install homie-studio assets find "fox" # CC0 items, phone-sized, with triangles and size
|
|
29
|
-
npx --no-install homie-studio assets find "pine tree" --family kenney
|
|
30
|
-
npx --no-install homie-studio assets add <id> kenney-cube-pets/animal-fox --height 0.7 --card "Characters/Fox"
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
One library family per game (`cast.family`): mixing Kenney with KayKit shows. An added item is COPIED into
|
|
34
|
-
`games/<id>/public/models/` (never loaded from homie.rocks at runtime), recorded in `assets/manifest.json` with its
|
|
35
|
-
pack, origin and SHA-256, and its pack is credited on the landing's credits page (kindly: CC0 needs no credit).
|
|
36
|
-
`HOMIE_LIBRARY` points at another copy of the library (a folder or an address).
|
|
37
|
-
|
|
38
|
-
## The person's own files
|
|
39
|
-
|
|
40
|
-
```sh
|
|
41
|
-
npx --no-install homie-studio assets add <id> --file /path/to/lantern.glb --license own --as lantern --height 0.6
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Ask whose it is and under what licence: `own`, `cc0`, `cc-by-4.0` (with `--attribution "<who, where>"`),
|
|
45
|
-
`eula:<store>`, `market:<listing>`, `other` (with `--notes`). The file is refused before anything reads it when it
|
|
46
|
-
loads anything from an address (an external URI), declares a buffer over the import cap, or is over 64 MB; a
|
|
47
|
-
.gltf may bring its .bin and pictures from its own folder only. Then it is made phone-sized (its tier's
|
|
48
|
-
triangles and picture size, the pivot at the bottom centre, its height in metres, meshopt geometry, WebP
|
|
49
|
-
pictures); the raw file stays in `art/<slug>/raw/` (git-ignored; the studio's R2 with `media move` once it has
|
|
50
|
-
storage), never shipped and never committed. FBX, OBJ and .blend: export a .glb first (Blender: File > Export >
|
|
51
|
-
glTF 2.0, binary).
|
|
52
|
-
|
|
53
|
-
## Generated props (paid): price, budget, look, then the mesh
|
|
22
|
+
Import a completed GLB with `homie-studio assets add`; use its current `--help` for
|
|
23
|
+
scale, rig and clip options. Retain original generation receipts and register the
|
|
24
|
+
optimized result's licence and provenance. `scripts/models.mjs import` also accepts
|
|
25
|
+
an already completed connector receipt and local GLB; it never runs a provider.
|
|
26
|
+
For a completed connector job, the local import command is:
|
|
54
27
|
|
|
55
28
|
```sh
|
|
56
|
-
node <models.mjs>
|
|
57
|
-
node <models.mjs> quote <id> --count 3 # concept + mesh, priced live (about US$0.54 a prop)
|
|
58
|
-
node <models.mjs> budget <id> --cap 3 # the cap the person agreed to, for this game's models
|
|
59
|
-
node <models.mjs> prop <id> lantern --card "Items/Ember Lantern" --what "an iron lantern with a warm ember inside" --height 0.6 --dry-run
|
|
60
|
-
node <models.mjs> prop <id> lantern --card "Items/Ember Lantern" --what "…" --height 0.6 --yes # the concept only
|
|
61
|
-
# LOOK at art/lantern/concept.*: the thing, whole, in the game's style, on a plain background?
|
|
62
|
-
node <models.mjs> prop <id> lantern --mesh --yes # Tripo P1, textured, face_limit 1500; then optimised and recorded
|
|
63
|
-
npx --no-install homie-studio assets lineup <id> # true scale, silhouettes, palette drift
|
|
29
|
+
node <path-to-models.mjs> import <id> <asset> --receipt <job.json> --file <model.glb>
|
|
64
30
|
```
|
|
65
31
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
npx --no-install homie-studio anim preview <id> --asset ranger # LOOK at the preview sheet
|
|
32
|
+
If a registered asset is deliberately not placed, mark it accurately with
|
|
33
|
+
`homie-studio assets use <id> <asset> unused`. Never report an unused model as visible.
|
|
34
|
+
|
|
35
|
+
Inspect bounds, normals, textures, silhouettes and pivot; run `assets check`, check
|
|
36
|
+
triangles/draw calls/texture memory on a phone, and test animation in the actual scene.
|
|
37
|
+
A generated rig is not proof that Homie's clips retarget correctly.
|
|
38
|
+
|
|
39
|
+
## Official generation workflow
|
|
40
|
+
|
|
41
|
+
The owner's AI uses the provider's official plugin/MCP in its own client. Homie never
|
|
42
|
+
asks for, stores, reads or prints provider credentials. Read the current provider
|
|
43
|
+
skill and discover its available tools and input schemas; host prefixes vary.
|
|
44
|
+
Connection instructions and verified sources: [official integrations](../studio-setup/references/OFFICIAL-MEDIA.md).
|
|
45
|
+
If tools are missing, connect that official plugin once in the client's browser flow.
|
|
46
|
+
Do not fall back to a Homie client, key file, environment key or CLI generation wrapper.
|
|
47
|
+
|
|
48
|
+
Before spending, state the model, count/duration, estimated cost and remaining approved
|
|
49
|
+
budget. Use the owner's existing authorization; ask only if the spend is outside it.
|
|
50
|
+
Record the request ID as soon as accepted. Poll that same request; never resubmit to
|
|
51
|
+
retry a slow job. Unknown cost is unknown, never zero. Provider billing is authoritative;
|
|
52
|
+
Homie's local receipt cannot enforce spending in another client.
|
|
53
|
+
|
|
54
|
+
## Place and prove the result
|
|
55
|
+
|
|
56
|
+
Download the completed tool's output using the AI client's file/download facilities.
|
|
57
|
+
Keep temporary signed URLs out of committed records. Keep the original in the studio's
|
|
58
|
+
art/job folder; put the optimized delivered asset beside its game/app, or in music/ or
|
|
59
|
+
videos/ for a published work. Record a receipt with these fields:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"provider": "fal",
|
|
64
|
+
"tool": "run_model",
|
|
65
|
+
"model": "exact endpoint returned by the provider",
|
|
66
|
+
"requestId": "actual request ID",
|
|
67
|
+
"prompt": "the actual prompt, including style constraints",
|
|
68
|
+
"styleRevision": "revision from the studio's style",
|
|
69
|
+
"rights": {"source": "provider/model terms URL", "checkedAt": "YYYY-MM-DD", "commercial": false, "note": "record the actual plan and permitted use"},
|
|
70
|
+
"cost": {"status": "unknown"}
|
|
71
|
+
}
|
|
107
72
|
```
|
|
108
73
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
CC0 clips (idle, run, jump, attack, hit, die, ...) retargeted onto it, recorded with both receipts.
|
|
74
|
+
For ElevenLabs use its actual discovered tool and model, and its flow/session or request
|
|
75
|
+
identifier. A measured cost uses `{"status":"actual","amount":1,"unit":"credits"}`;
|
|
76
|
+
a quote uses `estimate`. Never claim commercial rights from the fact that generation
|
|
77
|
+
succeeded. Read the provider and model terms for the account's plan; record attribution,
|
|
78
|
+
reference-image permissions and any restrictions. Mark test fixtures `"fixture": true`.
|
|
115
79
|
|
|
116
|
-
|
|
80
|
+
Wire the delivered path into the scene or manifest, then run:
|
|
117
81
|
|
|
118
82
|
```sh
|
|
119
|
-
npx --no-install homie-studio
|
|
120
|
-
npx --no-install homie-studio assets use <id> <asset> unused # a file the game no longer draws (or cast, prop, environment)
|
|
121
|
-
npx --no-install homie-studio assets add <id> --file <model.glb> --license own --lo 0.2 # also <asset>_lo.glb: the same prop at a fifth of its triangles, for the far band (LodProps)
|
|
122
|
-
npx --no-install homie-studio assets lineup <id> # pictures in .studio/art/<id>/; look at them
|
|
123
|
-
npx --no-install homie-studio assets rights <id> # games/<id>/assets/RIGHTS.md and the credits
|
|
124
|
-
npx --no-install homie-studio assets redo <id> <asset> # made again from its kept raw file, free
|
|
83
|
+
npx --no-install homie-studio media import --file <downloaded-file> --receipt <receipt.json> --out games/<id>/assets/<name> --used-by games/<id>/view.ts
|
|
125
84
|
```
|
|
126
85
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
the scene: about 100 draw calls, 150,000 triangles, 48 MB of picture memory, 5 MB of shipped payload. `assets check`
|
|
133
|
-
holds the game to them, and what it adds up is an **inventory estimate**: the recorded files' own numbers times their
|
|
134
|
-
`placements`. It never ran the game, so procedural geometry, repeated instances, effects and shadow passes are not in
|
|
135
|
-
it, and "shipped payload" is every built file gzipped, not what a browser fetched before the first round. Say
|
|
136
|
-
"inventory estimate" when you report it; the `playtest` and `perf` skills measure the running game and are the real
|
|
137
|
-
gate on a phone.
|
|
138
|
-
|
|
139
|
-
- A game that needs heavier models says so once, in game.json: `"assets": { "budgets": { "triangles": 4000, "bytes": 600000 } }`
|
|
140
|
-
(the loader's warnings and the check both read it; hard caps still hold).
|
|
141
|
-
- Standalone textures and skies are measured too (size, hash, decode, mipmapped memory once a picture). Record every
|
|
142
|
-
picture the game loads as a texture (`kind: "texture"` or `"sky"`, with its licence and SHA-256): the check lists
|
|
143
|
-
shipped pictures that have no record and leaves them out of the sum.
|
|
144
|
-
- A model's normal and roughness maps count unless the manifest declares the game draws base colour only
|
|
145
|
-
(`"inGame": { "maps": "base" }` on a record or at the top of the manifest). Declare it only when the game really
|
|
146
|
-
calls `stylize()` with a non-PBR material model on those models; never to make a number pass.
|
|
147
|
-
- The lineup is three pictures: the inventory (everything recorded), the cast (what is in play) and the environment.
|
|
148
|
-
Mark a file the game no longer draws `unused`, and give a reviewer the cast and environment lineups, not the folder.
|
|
149
|
-
|
|
150
|
-
After the lineup, have a FRESH reviewer (the `playtest` skill's blind review: a new agent that never saw your
|
|
151
|
-
reasoning) look at the style board, the golden images and the lineup pictures and score "does every model look
|
|
152
|
-
like one game?" from 1 to 10, naming outliers; record it: `assets review <id> --score <n> --outliers a,b`.
|
|
153
|
-
Under 7, or any outlier, those assets need another look.
|
|
154
|
-
|
|
155
|
-
## Loading them in the game
|
|
156
|
-
|
|
157
|
-
Every model loads through `@homie-rocks/studio/assets`:
|
|
158
|
-
|
|
159
|
-
```ts
|
|
160
|
-
import { createModels } from '@homie-rocks/studio/assets';
|
|
161
|
-
const models = createModels();
|
|
162
|
-
const fox = await models.instance('./models/fox.glb').catch(() => models.placeholder({ x: 0.5, y: 0.7, z: 0.8 }));
|
|
163
|
-
```
|
|
86
|
+
This copies bytes, verifies a static reference, hashes the asset and records allowlisted
|
|
87
|
+
provenance in `media/provenance.json`. Reimporting the same output is idempotent; it
|
|
88
|
+
never generates or charges. Include each generation step's receipt for derived assets.
|
|
89
|
+
Run the scene and look/listen: a file and static reference are not proof that it renders
|
|
90
|
+
or plays. Report the placed path, usage evidence, rights and actual/estimated cost.
|
|
164
91
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
`stylize((await models.load(url)).scene, style)` with the game's `style.json` (its material model and ink outline,
|
|
169
|
-
as the style board drew them). The `gem-rush-3d` starter shows the whole pattern.
|
|
170
|
-
|
|
171
|
-
## Licences, plainly
|
|
172
|
-
|
|
173
|
-
- `references/RIGHTS.md` keeps what the providers' terms say, with read dates. Read the live pages again before
|
|
174
|
-
anything commercial is published (`registry` re-reads prices; terms you read by hand).
|
|
175
|
-
- The assets whose licence lets the file itself be handed on are CC0, CC BY with credit, the studio's own, and
|
|
176
|
-
generated ones: only those may be in a part the studio shares. With anything else the game may serve the file
|
|
177
|
-
to its players, and the studio's repository must stay private while it holds the raw file. `publish` refuses a game with an asset that
|
|
178
|
-
has no licence record.
|
|
179
|
-
- Never fetch from Poly Pizza or ShareTextures by script, never use Quaternius, Mixamo, Synty, Fab, Unity Asset
|
|
180
|
-
Store or TurboSquid files in a public game's repository, never use a model or dataset under non-commercial
|
|
181
|
-
terms.
|
|
182
|
-
|
|
183
|
-
## Never
|
|
184
|
-
|
|
185
|
-
- Never spend without a budget, past it, or without a receipt; never run paid generation in a loop; never print
|
|
186
|
-
or store a key.
|
|
187
|
-
- Never ship a raw provider file, never commit one, never ship an asset with no licence record.
|
|
188
|
-
- Never replace a model the person made without asking.
|
|
189
|
-
|
|
190
|
-
### Existing provider credentials
|
|
191
|
-
|
|
192
|
-
The tools read `FAL_KEY` or `ELEVENLABS_API_KEY` first, then the plain single-line
|
|
193
|
-
key in `~/.homie/keys/fal-key` or `~/.homie/keys/elevenlabs-key`. They also accept
|
|
194
|
-
`~/.homie/workspace/fal-key` and `~/.homie/workspace/elevenlabs-key` from earlier
|
|
195
|
-
installs. Checks name the source, never the key. Keep these files private (mode
|
|
196
|
-
0600); never copy them into a studio. ElevenLabs also accepts its CLI browser
|
|
197
|
-
sign-in and the existing Stripe Projects connection. Run the tool’s `check`
|
|
198
|
-
before declaring a provider disconnected.
|
|
92
|
+
The toolkit’s `lib/media-workflows.mjs` declares this skill’s verified tool references.
|
|
93
|
+
Validate them against the host’s current tool inventory before execution; tool discovery
|
|
94
|
+
is required for generation capabilities that have no stable documented name.
|
|
@@ -11,7 +11,7 @@ and in `@homie-rocks/studio`'s `lib/asset-manifest.mjs` (`PROVIDER_TERMS`), whic
|
|
|
11
11
|
Output to the customer; fal "does not represent, warrant, or covenant that any Output Content will be original,
|
|
12
12
|
will not infringe rights of any third party … or otherwise entitle Company to any intellectual property rights
|
|
13
13
|
in any Output Content". Third-party model outputs may not be used to train models that compete with them. The
|
|
14
|
-
|
|
14
|
+
model-specific terms must be checked through the official fal plugin before use; a catalogue label is not a licence record.
|
|
15
15
|
- **Tripo** through fal (developer terms, https://developers.tripo3d.ai/en/terms, read 2026-10-02, last updated
|
|
16
16
|
2025-07-11): "you may use Outputs for lawful commercial or non-commercial purposes". Calls through fal are paid
|
|
17
17
|
calls. Tripo's FREE plan makes outputs public under CC BY 4.0 (credit Tripo); this skill never uses a free plan.
|