@hraness/slopcamera 3.2.8 → 3.3.2
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 +29 -9
- package/apps/desktop/application/context.ts +6 -0
- package/apps/desktop/application/default-registry.ts +26 -0
- package/apps/desktop/application/operation.ts +14 -1
- package/apps/desktop/application/operations/index.ts +4 -0
- package/apps/desktop/application/operations/spatial-behavior.ts +151 -0
- package/apps/desktop/application/operations/spatial-direction.ts +222 -0
- package/apps/desktop/application/operations/spatial-rendered-audit.ts +174 -0
- package/apps/desktop/application/operations/spatial-review.ts +194 -0
- package/apps/desktop/application/operations/spatial-scene.ts +25 -1
- package/apps/desktop/application/registry.ts +2 -2
- package/apps/desktop/application/spatial-asset-admission.ts +201 -0
- package/apps/desktop/application/spatial-assets.ts +160 -31
- package/apps/desktop/application/spatial-render.ts +217 -20
- package/apps/desktop/application/spatial-rendered-audit.ts +273 -0
- package/apps/desktop/application/spatial-review.ts +361 -0
- package/apps/desktop/application/spatial-spz.ts +48 -3
- package/apps/desktop/application/spatial-world-import.ts +26 -5
- package/apps/desktop/application/spatial-world-metadata.ts +105 -0
- package/apps/desktop/cli/args.ts +514 -11
- package/apps/desktop/cli/capability-manifest.ts +374 -0
- package/apps/desktop/cli/cinema-renderer.ts +608 -0
- package/apps/desktop/cli/command-host-resources.ts +29 -1
- package/apps/desktop/cli/commands.ts +1188 -4
- package/apps/desktop/cli/gateway-review-provider.ts +334 -0
- package/apps/desktop/cli/help.ts +172 -6
- package/apps/desktop/cli/main.ts +3 -3
- package/apps/desktop/cli/portable-surface.ts +6 -1
- package/apps/desktop/cli/spatial-asset-service.ts +124 -0
- package/apps/desktop/cli/spatial-design-service.ts +237 -0
- package/apps/desktop/cli/spatial-generate-service.ts +370 -0
- package/apps/desktop/cli/spatial-scene-service.ts +271 -4
- package/apps/desktop/cli/workflow-code.ts +1 -1
- package/apps/desktop/code/semantic-builder.ts +24 -0
- package/apps/desktop/contracts/cinema.ts +736 -0
- package/apps/desktop/contracts/index.ts +1 -0
- package/apps/desktop/contracts/spatial-asset.ts +16 -0
- package/apps/desktop/contracts/spatial-world.ts +26 -3
- package/apps/desktop/core/cinema-plan.ts +1320 -0
- package/apps/desktop/core/index.ts +1 -0
- package/apps/desktop/core/storage.ts +75 -0
- package/apps/desktop/dist/cli/main.js +725 -273
- package/apps/desktop/html-overlay/spatial.ts +619 -57
- package/apps/desktop/workflows/cinematic-world.ts +127 -0
- package/apps/desktop/workflows/index.ts +6 -0
- package/dist/cli.js +25 -429
- package/dist/code/advanced.js +1 -269
- package/dist/code/index.js +16 -2239
- package/dist/generate.js +1 -23
- package/dist/host-resources.js +1 -25
- package/dist/index-0bbesn4m.js +35 -0
- package/dist/index-296qhpf2.js +3 -0
- package/dist/index-3cxf2c58.js +3 -0
- package/dist/index-77fjfg9f.js +3 -0
- package/dist/index-80a36bc0.js +3 -0
- package/dist/index-a3vvs3rf.js +3 -0
- package/dist/index-b3geqczn.js +5 -0
- package/dist/index-grk47tgs.js +3 -0
- package/dist/index-gs48afpt.js +7 -0
- package/dist/index-qry58nj2.js +10 -0
- package/dist/index-zhg36tf9.js +3 -0
- package/dist/index.js +1 -226
- package/dist/operations.js +1 -28
- package/dist/skill-install-gx7afxsd.js +2 -0
- package/dist/vectorize/worker.js +1 -141
- package/dist/workflow.js +1 -15
- package/docs/README.md +5 -1
- package/docs/studio.md +12 -0
- package/package.json +7 -5
- package/skills/slopcamera/SKILL.md +7 -1
- package/skills/slopcamera/references/directed-scenes.md +48 -2
- package/skills/slopcamera/references/gateway-media.md +15 -1
- package/skills/slopcamera/references/image-galleries.md +166 -0
- package/skills/slopcamera/references/install.md +1 -1
- package/skills/slopcamera/references/music-video.md +4 -0
- package/skills/slopcamera/references/native-studio.md +19 -0
- package/skills/slopcamera/references/parametric-design.md +14 -0
- package/skills/slopcamera/references/scene-building.md +172 -0
- package/skills/slopcamera/references/social-collage-banners.md +204 -0
- package/skills/slopcamera/references/workflows-sdk.md +3 -3
- package/skills/slopcamera/scripts/compose-social-collage-banner.ts +728 -0
- package/src/capability-manifest.ts +361 -0
- package/src/cli.ts +222 -4
- package/src/code/canonical-json.ts +9 -0
- package/src/generate.ts +2 -2
- package/src/icon.ts +1111 -0
- package/src/image-gallery.ts +1049 -0
- package/src/index.ts +11 -0
- package/src/mcp/boundary.ts +11 -11
- package/src/mcp/index.ts +3 -0
- package/src/mcp/server.ts +2 -1
- package/src/mcp/tools.ts +1649 -132
- package/src/mcp/types.ts +19 -0
- package/src/operations.ts +412 -0
- package/src/portable-capability-manifest.ts +67 -0
- package/src/scene-gallery.ts +184 -0
- package/src/spatial-scene/asset-admission.ts +183 -0
- package/src/spatial-scene/audit-rendered.ts +692 -0
- package/src/spatial-scene/audit.ts +617 -0
- package/src/spatial-scene/behavior-audit.ts +252 -0
- package/src/spatial-scene/behavior-bake.ts +232 -0
- package/src/spatial-scene/behavior-fns.ts +585 -0
- package/src/spatial-scene/behavior-gallery.ts +108 -0
- package/src/spatial-scene/behavior-stdlib.ts +323 -0
- package/src/spatial-scene/behavior-trace.ts +325 -0
- package/src/spatial-scene/behavior.ts +617 -0
- package/src/spatial-scene/build.ts +632 -0
- package/src/spatial-scene/camera-rig.ts +125 -0
- package/src/spatial-scene/camera-track.ts +4 -2
- package/src/spatial-scene/character.ts +124 -0
- package/src/spatial-scene/contracts.ts +75 -7
- package/src/spatial-scene/design-templates.ts +351 -0
- package/src/spatial-scene/design.ts +327 -0
- package/src/spatial-scene/direction-compile.ts +584 -0
- package/src/spatial-scene/direction.ts +122 -0
- package/src/spatial-scene/effects.ts +149 -0
- package/src/spatial-scene/evaluate.ts +109 -29
- package/src/spatial-scene/gallery.ts +277 -0
- package/src/spatial-scene/generate.ts +239 -0
- package/src/spatial-scene/geometry-native.ts +165 -0
- package/src/spatial-scene/geometry.ts +1216 -0
- package/src/spatial-scene/gltf.ts +600 -77
- package/src/spatial-scene/identity.ts +55 -2
- package/src/spatial-scene/index.ts +36 -0
- package/src/spatial-scene/inspect.ts +35 -6
- package/src/spatial-scene/material-lighting.ts +609 -0
- package/src/spatial-scene/math.ts +21 -4
- package/src/spatial-scene/motion-evidence.ts +88 -0
- package/src/spatial-scene/parametric.ts +765 -0
- package/src/spatial-scene/particle-preparation.ts +183 -0
- package/src/spatial-scene/particle.ts +195 -0
- package/src/spatial-scene/patch.ts +109 -15
- package/src/spatial-scene/performance.ts +1613 -0
- package/src/spatial-scene/probe.ts +137 -0
- package/src/spatial-scene/recipe-pack.ts +86 -0
- package/src/spatial-scene/render-effects.ts +240 -0
- package/src/spatial-scene/review.ts +639 -0
- package/src/spatial-scene/simulation-bake.ts +206 -0
- package/src/spatial-scene/simulation.ts +187 -0
- package/src/spatial-scene/solve.ts +366 -0
- package/src/spatial-scene/temporal-audit.ts +354 -0
- package/src/version.ts +1 -1
- package/dist/index-42zsesc1.js +0 -2257
- package/dist/index-7131pg1c.js +0 -1820
- package/dist/index-7308egqr.js +0 -48
- package/dist/index-8txs6fkn.js +0 -712
- package/dist/index-fava6pge.js +0 -192
- package/dist/index-h1k0fnjq.js +0 -2363
- package/dist/index-r7gdhmsp.js +0 -424
- package/dist/index-sh6xbav6.js +0 -1219
- package/dist/index-z1w83f81.js +0 -4
- package/dist/index-zfnddgay.js +0 -2029
- package/dist/skill-install-dh0ntqba.js +0 -10
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Compose a social collage banner
|
|
2
|
+
|
|
3
|
+
Use this workflow for an editorial or social banner built from several generated visual roles, local labels, annotations, and optional diagram material. Generate the parts independently, inspect them, then assemble the selected files with the packaged local compositor. Do not ask one model call to render the final banner or important text.
|
|
4
|
+
|
|
5
|
+
## Fix the delivery frame first
|
|
6
|
+
|
|
7
|
+
Record the exact output geometry before prompting. For an X profile header, use `1500×500` unless the user or current platform tooling supplies another target. Keep important faces and title copy away from the lower-left profile-photo overlap and the outer crop margins.
|
|
8
|
+
|
|
9
|
+
Split the brief into visual roles rather than requesting several complete banners:
|
|
10
|
+
|
|
11
|
+
- one opaque background plate that establishes place, lighting, and atmosphere;
|
|
12
|
+
- one or more isolated subjects on transparent backgrounds;
|
|
13
|
+
- one motif cluster for secondary concepts;
|
|
14
|
+
- optional editable diagrams for literal values and relationships;
|
|
15
|
+
- local title, labels, circles, arrows, tape, grain, and vignette.
|
|
16
|
+
|
|
17
|
+
A role prompt should describe only that asset. Tell an isolated-asset model that the output needs a fully transparent background and no words, letters, or logos. Tell a background model to omit people when a separate character layer will cover it. This reduces accidental text, duplicate subjects, and baked-in composition decisions.
|
|
18
|
+
|
|
19
|
+
## Discover the model and controls
|
|
20
|
+
|
|
21
|
+
Inspect the current image catalog and selected model instead of naming a remembered “latest” model:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
slopcamera ai models list --type image --json
|
|
25
|
+
slopcamera ai models show <image-model-id> --json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Check that the model reports image output, the intended size or aspect control, and provider options for transparent PNG output before relying on them. Keep provider options in a private physical file because the same surface may contain sensitive values:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
cat > transparent-provider-options.json <<'JSON'
|
|
32
|
+
{
|
|
33
|
+
"openai": {
|
|
34
|
+
"background": "transparent",
|
|
35
|
+
"outputFormat": "png",
|
|
36
|
+
"quality": "high"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
JSON
|
|
40
|
+
chmod 600 transparent-provider-options.json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
That object is an example for a compatible OpenAI image model, not a portable option set. Use only namespaces and fields reported for the selected model. An opaque background plate normally needs a separate options file without `background: "transparent"`.
|
|
44
|
+
|
|
45
|
+
## Generate independent roles in parallel
|
|
46
|
+
|
|
47
|
+
Write one prompt file per role and retain it beside the collage manifest. Start independent text-only generations concurrently when the agent host supports parallel tool calls. Each command remains one durable paid job with its own output and receipt:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
vercel env run -- bun "$SLOPCAMERA_SOURCE_ROOT/apps/desktop/dist/cli/main.js" ai image generate \
|
|
51
|
+
--model <image-model-id> \
|
|
52
|
+
--prompt-file prompts/background.txt \
|
|
53
|
+
--size 1536x1024 \
|
|
54
|
+
--provider-options opaque-provider-options.json \
|
|
55
|
+
--json
|
|
56
|
+
|
|
57
|
+
vercel env run -- bun "$SLOPCAMERA_SOURCE_ROOT/apps/desktop/dist/cli/main.js" ai image generate \
|
|
58
|
+
--model <image-model-id> \
|
|
59
|
+
--prompt-file prompts/character-sticker.txt \
|
|
60
|
+
--size 1024x1024 \
|
|
61
|
+
--provider-options transparent-provider-options.json \
|
|
62
|
+
--json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Do not hide several semantic roles in `--count`; they need separate prompts and retained requests. Use an [image gallery](image-galleries.md) when a role needs competing visual alternatives. Text-only generation does not authorize uploading local media. If a role needs a local reference, name that exact file and add `--allow-cloud-upload` only when the task already authorizes its upload.
|
|
66
|
+
|
|
67
|
+
Inspect every candidate before composition. Check background alpha for isolated layers, accidental writing, duplicated limbs or objects, clipped silhouettes, and whether the visual metaphor still reads at banner size. A successful receipt does not establish those facts.
|
|
68
|
+
|
|
69
|
+
## Render literal facts as an editable diagram
|
|
70
|
+
|
|
71
|
+
Use a Slopcamera diagram when the banner needs a pipeline, architecture, values, or named relationships. Keep its `.diagram.json` source and render the PNG locally:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
slopcamera diagram check work/token-flow.diagram.json --strict
|
|
75
|
+
slopcamera diagram render work/token-flow.diagram.json
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Place that PNG as a `paper` image layer. The diagram remains editable and factual while the surrounding composition can stay loose and expressive.
|
|
79
|
+
|
|
80
|
+
## Author the collage manifest
|
|
81
|
+
|
|
82
|
+
The packaged compositor accepts local PNG, JPEG, and WebP inputs. Paths are relative to the manifest unless absolute. Every `x` and `y` identifies the layer center. Array order is back-to-front.
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"schemaVersion": 1,
|
|
87
|
+
"canvas": {
|
|
88
|
+
"width": 1500,
|
|
89
|
+
"height": 500,
|
|
90
|
+
"color": "#100a1c",
|
|
91
|
+
"background": {
|
|
92
|
+
"path": "../generated/background.png",
|
|
93
|
+
"position": "centre"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"layers": [
|
|
97
|
+
{
|
|
98
|
+
"kind": "image",
|
|
99
|
+
"path": "../generated/character.png",
|
|
100
|
+
"x": 255,
|
|
101
|
+
"y": 258,
|
|
102
|
+
"width": 330,
|
|
103
|
+
"rotation": -4,
|
|
104
|
+
"treatment": {
|
|
105
|
+
"kind": "sticker",
|
|
106
|
+
"border": 12,
|
|
107
|
+
"borderColor": "#ffffff",
|
|
108
|
+
"shadow": { "dx": 10, "dy": 14, "blur": 14, "opacity": 0.5 }
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"kind": "image",
|
|
113
|
+
"path": "token-flow.light.png",
|
|
114
|
+
"x": 760,
|
|
115
|
+
"y": 430,
|
|
116
|
+
"width": 850,
|
|
117
|
+
"rotation": -1.5,
|
|
118
|
+
"treatment": {
|
|
119
|
+
"kind": "paper",
|
|
120
|
+
"padding": 26,
|
|
121
|
+
"color": "#faf5e8"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"kind": "tape",
|
|
126
|
+
"x": 430,
|
|
127
|
+
"y": 325,
|
|
128
|
+
"width": 120,
|
|
129
|
+
"height": 38,
|
|
130
|
+
"rotation": -38,
|
|
131
|
+
"color": "#f8ebaa",
|
|
132
|
+
"opacity": 0.82
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"kind": "text",
|
|
136
|
+
"text": "275B TOKENS",
|
|
137
|
+
"x": 760,
|
|
138
|
+
"y": 64,
|
|
139
|
+
"fontSize": 58,
|
|
140
|
+
"fontFamily": "sans",
|
|
141
|
+
"fontWeight": 900,
|
|
142
|
+
"fill": "#ffe05a",
|
|
143
|
+
"stroke": "#3c1450",
|
|
144
|
+
"strokeWidth": 4,
|
|
145
|
+
"rotation": 1
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"kind": "ellipse",
|
|
149
|
+
"x": 1210,
|
|
150
|
+
"y": 250,
|
|
151
|
+
"width": 350,
|
|
152
|
+
"height": 330,
|
|
153
|
+
"rotation": -5,
|
|
154
|
+
"color": "#ff5048",
|
|
155
|
+
"strokeWidth": 8
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"kind": "arrow",
|
|
159
|
+
"from": { "x": 1080, "y": 130 },
|
|
160
|
+
"to": { "x": 1150, "y": 180 },
|
|
161
|
+
"bend": 0.25,
|
|
162
|
+
"color": "#ff5048",
|
|
163
|
+
"width": 8
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"effects": {
|
|
167
|
+
"grain": 0.18,
|
|
168
|
+
"grainSeed": 7,
|
|
169
|
+
"vignette": 0.35,
|
|
170
|
+
"chromaticShift": 2
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Image treatments are `plain`, `sticker`, and `paper`. Text supports `sans`, `serif`, and `mono`, newline-separated rows, fill, stroke, weight, alignment, and rotation. Annotation layers are `arrow`, `ellipse`, and `tape`. The compositor bounds canvas size, input bytes, decoded pixels, layer count, text, geometry, and effects; it rejects remote URLs and never replaces an existing output.
|
|
176
|
+
|
|
177
|
+
Render through the version-matched packaged skill:
|
|
178
|
+
|
|
179
|
+
```sh
|
|
180
|
+
skill_root="$(slopcamera skill path)"
|
|
181
|
+
bun "$skill_root/scripts/compose-social-collage-banner.ts" \
|
|
182
|
+
--manifest /absolute/banner.manifest.json \
|
|
183
|
+
--output /absolute/banner-v1.png
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
The command writes the PNG and a same-stem `.receipt.json` containing the manifest digest, exact input paths and digests, output digest, canvas, and layer count. Save a new manifest or output name for each material revision.
|
|
187
|
+
|
|
188
|
+
## Inspect the delivered pixels
|
|
189
|
+
|
|
190
|
+
Open the final PNG and inspect it at full size. Also inspect crops around the title, faces, high-contrast annotations, paper edges, and each platform exclusion zone. Confirm:
|
|
191
|
+
|
|
192
|
+
- the file has the exact requested dimensions;
|
|
193
|
+
- text is local, legible, and free of missing-glyph boxes;
|
|
194
|
+
- transparent assets have no opaque square or dark fringe;
|
|
195
|
+
- paper clippings and tape stay behind labels that must remain readable;
|
|
196
|
+
- chromatic shift and grain do not damage small text;
|
|
197
|
+
- factual diagram labels remain accurate;
|
|
198
|
+
- the composition still reads when scaled down.
|
|
199
|
+
|
|
200
|
+
Keep the prompt files, provider-option digests, generated receipts, diagram source, collage manifest, compositor receipt, and rejected attempts that explain a selection or recovery.
|
|
201
|
+
|
|
202
|
+
## Recover paid failures deliberately
|
|
203
|
+
|
|
204
|
+
Run each paid command with zero client retries. If a generation fails or is interrupted, inspect its retained job path and reconciliation state before doing anything else. Do not automatically resubmit an ambiguous attempt. A deliberate replacement call is appropriate only after reconciliation and within the task's existing spending authority. The local compositor is deterministic and unpaid, so layout revisions should happen there rather than through more model calls.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Use SDKs and durable workflows
|
|
2
2
|
|
|
3
|
-
Use `slopcamera workflows list --json` and `slopcamera workflows show <id> --json` to discover checked recipes and their actual inputs. Built-ins include `talking-head-cleanup`, `polished-screen-demo`, `chaptered-demo`, `social-variants`, `creative-iteration`, `creative-selection` and `
|
|
3
|
+
Use `slopcamera workflows list --json` and `slopcamera workflows show <id> --json` to discover checked recipes and their actual inputs. Built-ins include `talking-head-cleanup`, `polished-screen-demo`, `chaptered-demo`, `social-variants`, `creative-iteration`, `creative-selection`, `directed-scene` and `cinematic-world`. Keep ordinary project edits complete before a V2 scene migration.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
slopcamera workflows plan <id> --input input.json --json
|
|
@@ -32,9 +32,9 @@ Keep run IDs, errors and receipts after failure. A missing journal does not prov
|
|
|
32
32
|
|
|
33
33
|
## Use the portable MCP surface narrowly
|
|
34
34
|
|
|
35
|
-
When connected, use `check_diagram` and `render_diagram` for compatibility calls, or `search_slopcamera` and `execute_slopcamera` with one exact returned operation and typed JSON. No tool rewrites source.
|
|
35
|
+
When connected, use `check_diagram` and `render_diagram` for compatibility calls, `check_scene`/`inspect_scene`/`audit_scene`/`audit_scene_temporal`/`diff_scenes`/`evaluate_scene` for read-only spatial scene work, `check_scene_direction`/`plan_scene_direction`/`plan_scene_gallery`/`check_scene_effects`/`plan_scene_effects` for cinematic planning evidence, or `search_slopcamera` and `execute_slopcamera` with one exact returned operation and typed JSON. No tool rewrites source or mutates project state; candidate selection stays an explicit CLI or SDK call.
|
|
36
36
|
|
|
37
|
-
- Use root-relative paths. A diagram must end in `.diagram.json`.
|
|
37
|
+
- Use root-relative paths. A diagram must end in `.diagram.json`; a scene must end in `.json`.
|
|
38
38
|
- Diagram render replaces the five documented exports, never its source.
|
|
39
39
|
- MCP bounds diagrams to 64 shapes and 128 edges and reports at most 40 findings. Use the CLI for larger checked sources.
|
|
40
40
|
- MCP uses built-in themes/icons and never executes workspace configuration; trusted custom config belongs to the CLI.
|