@lalalic/markcut 3.2.60 → 3.2.61

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 (52) hide show
  1. package/README.md +20 -4
  2. package/bin/markcut +10 -0
  3. package/docs/developer-reference.md +41 -1
  4. package/package.json +8 -2
  5. package/recipes/markcut/map-cinematic-follow.json +17 -0
  6. package/recipes/markcut/map-location-reveal.json +17 -0
  7. package/recipes/markcut/map-route-journey.json +18 -0
  8. package/recipes/markcut/map-streetview-explore.json +17 -0
  9. package/skills/markcut/SKILL.md +5 -1
  10. package/skills/markcut/docs/markdown-descriptive.md +68 -1
  11. package/skills/markcut/docs/recipes.md +45 -0
  12. package/skills/markcut/references/mobile-event-preview-cli.md +9 -5
  13. package/src/descriptive/compiler.ts +38 -2
  14. package/src/descriptive/markdown.ts +30 -0
  15. package/src/descriptive/model3d.test.ts +38 -0
  16. package/src/editor-decision/cli.mjs +21 -0
  17. package/src/editor-decision/editor-decision.schema.json +41 -0
  18. package/src/editor-decision/index.mjs +115 -0
  19. package/src/editor-decision/index.test.mjs +63 -0
  20. package/src/mcp/bridge.mjs +46 -9
  21. package/src/mcp/compile-worker.mjs +2 -2
  22. package/src/mcp/mobile-review-cli.mjs +40 -33
  23. package/src/mcp/preview-mobile.css +21 -8
  24. package/src/mcp/preview.mjs +95 -57
  25. package/src/mcp/remote-assets.mjs +85 -7
  26. package/src/mcp/remotion-app.bundle.js +5013 -1117
  27. package/src/mcp/remotion-app.tsx +117 -10
  28. package/src/mcp/server.mjs +4 -2
  29. package/src/player/browser.tsx +1 -3
  30. package/src/player/bundle/player.js +73054 -17357
  31. package/src/player/components/HeaderBar.tsx +3 -1
  32. package/src/player/components/VariantBar.tsx +20 -21
  33. package/src/player/pipeline.mjs +133 -77
  34. package/src/player/server.mjs +43 -23
  35. package/src/recipes/catalog.mjs +115 -0
  36. package/src/recipes/cli.mjs +87 -0
  37. package/src/render/cli.mjs +38 -1
  38. package/src/schema/index.ts +21 -0
  39. package/src/types/Folder.tsx +2 -0
  40. package/src/types/Model3D.tsx +91 -0
  41. package/src/vision/cli.mjs +63 -50
  42. package/tests/mcp-editor-decisions-mobile.test.ts +35 -0
  43. package/tests/mcp-preview-bridge.test.ts +44 -3
  44. package/tests/mcp-preview-proxy-version.test.mjs +80 -0
  45. package/tests/mcp-preview.test.ts +41 -8
  46. package/tests/mcp-remote-assets.test.ts +17 -0
  47. package/tests/mcp-static-preview.test.ts +1 -1
  48. package/tests/mcp-video-selector.test.ts +55 -0
  49. package/tests/mobile-preview-cli.test.ts +10 -15
  50. package/tests/recipes-catalog.test.ts +141 -0
  51. package/tests/vision-generic-vtt-hooks.test.ts +7 -7
  52. package/tests/vision-normalized-metadata.test.ts +23 -0
package/README.md CHANGED
@@ -397,13 +397,15 @@ choose or manage a browser/model provider.
397
397
  The MCP compiler itself does **not** send APNs notifications, manage Relay
398
398
  Invocations, or change Task state. Through Neo MCP, Neo's Federation Wrapper
399
399
  binds an optional Relay execution, watches compilation, and delivers the review
400
- through Neo.app Core's loopback-only `POST /mobile/review/notify` REST API.
400
+ through the Neo wrapper-owned durable request queue and NeoY's generic
401
+ loopback-only `POST /mobile/notify` APNs sender.
401
402
 
402
403
  The terminal command `markcut preview video.md --delivery event --event-template
403
404
  /path/event.json` compiles the same immutable revision, then sends its request
404
- to that same Neo.app Core REST endpoint. Exit status is nonzero if Neo Core does
405
- not confirm durable Inbox storage; a `review_requested` receipt confirms only
406
- Inbox acceptance, not the person's decision. `--delivery text` similarly
405
+ to the installed Neo wrapper's `deliver` command. Exit status is nonzero if
406
+ the wrapper does not confirm durable request storage; a `review_requested`
407
+ receipt means the phone can acquire the request, not that it already accepted
408
+ or decided it. `--delivery text` similarly
407
409
  mirrors a view-only mobile preview when no ChatGPT thread is bound. Neither
408
410
  path embeds an APNs key or creates its own notification provider. Standalone
409
411
  Markcut compilation without human-review delivery does not require Neo Mobile
@@ -412,3 +414,17 @@ or Agents Relay.
412
414
  ### Offline schematic routes
413
415
 
414
416
  Use `- map view:route mapType:schematic duration:5 waypoints:[45.4236,-75.7009,"Start";45.4295,-75.7090,"End"]` in a Markcut scene for a deterministic, Google-independent, animated geographic schematic. It labels connections as illustrative (not computed roads or recorded GPS tracks). The renderer accepts verified waypoint coordinates and produces real moving map frames without a web request. For a route chapter in a larger Vlog, render it separately, verify decode/motion, and insert the resulting MP4 into the main film. Other map types still require working provider credentials and render checks.
417
+
418
+
419
+ ## Recipe catalog (Markcut native + video-shotcraft)
420
+
421
+ Choose reusable shots with `markcut recipes list --json`. It dynamically combines Markcut-owned **executable Markdown** recipes with installed video-shotcraft **reference shot cards**, without copying Shotcraft sources. See [Recipe catalog](skills/markcut/docs/recipes.md) for the status/ownership contract.
422
+
423
+ ```sh
424
+ markcut recipes list --source markcut --category map
425
+ markcut recipes show markcut:map-route-journey
426
+ markcut recipes list --source shotcraft --category camera
427
+ markcut recipes show shotcraft:cursor-flyover
428
+ ```
429
+
430
+ A Markcut-native map recipe supplies an editable `- map` snippet; replace its example coordinates and verify/preview it. Shotcraft cards supply reference timing and demo implementation notes; they are **not executable Markcut scenes** without adaptation. The catalog continues to expose native recipes when video-shotcraft is not installed.
package/bin/markcut CHANGED
@@ -26,6 +26,16 @@ if (process.argv[2] === "preview") {
26
26
  if(explicit)process.exit(0);
27
27
  }
28
28
  }
29
+ if (process.argv[2] === "edl") {
30
+ const result = spawnSync(process.execPath, [resolve(root, "src", "editor-decision", "cli.mjs"), ...process.argv.slice(2)], { stdio: "inherit" });
31
+ if (result.error) console.error(result.error.message);
32
+ process.exit(result.status ?? 1);
33
+ }
34
+ if (process.argv[2] === "recipes" || process.argv[2] === "recipe") {
35
+ const result = spawnSync(process.execPath, [resolve(root, "src", "recipes", "cli.mjs"), ...process.argv.slice(3)], { stdio: "inherit" });
36
+ if (result.error) console.error(result.error.message);
37
+ process.exit(result.status ?? 1);
38
+ }
29
39
  if (process.argv[2] === "queue") {
30
40
  const result = spawnSync(process.execPath, [resolve(root, "src", "queue-worker.mjs"), ...process.argv.slice(3)], { stdio: "inherit" });
31
41
  if (result.error) console.error(result.error.message);
@@ -12,6 +12,15 @@ npm test # unit + integration tests
12
12
  npm run typecheck # TypeScript type check
13
13
  ```
14
14
 
15
+ ## Video selector
16
+
17
+ Native and hosted Previewers use a single top-right selector for the original film,
18
+ named Markdown variants, and the optional Editor Decision sidecar view.
19
+ Native Preview compiles the named variants automatically unless an explicit
20
+ `--variant` selection limits the compiled set. Hosted and Neo Mobile previews
21
+ include the available variants in the same compiled-media contract. Editor Decisions
22
+ is read-only: review approval remains tied to the original film.
23
+
15
24
  ## Input formats
16
25
 
17
26
  | Format | CLI | Description |
@@ -39,6 +48,7 @@ See [docs/markdown-strict-descriptive.md](docs/markdown-strict-descriptive.md) f
39
48
  | `scene` | Storyboard container: name, layout, script, children |
40
49
  | `folder` | Internal container (series/parallel) |
41
50
  | `image` | Still photo with fit mode |
51
+ | `model3d` | GLB/GLTF in frame-synced Remotion `<ThreeCanvas>` (turntable/orbit, camera, scale) |
42
52
  | `video` | Video clip with startFrom/endAt trimming, playbackRate |
43
53
  | `audio` | Soundtrack/SFX with foreground ducking |
44
54
  | `component` | External React component by componentName + props |
@@ -128,7 +138,7 @@ Computed by `getDurationInSeconds()` in `src/utils/index.ts`:
128
138
  - **Include with `src`**: treated as leaf (duration from base `end`)
129
139
  - Sets `durationInSeconds` on every node as a side effect
130
140
 
131
- ### 12 Stream Types
141
+ ### Stream Types
132
142
 
133
143
  All types share base fields from `BaseShape`: `id`, `name`, `title`, `description`, `script`, `src`, `style`, `visible`, `isBackground`, `start`, `end`, `duration`, `startFrom`, `endAt`, `durationInSeconds`.
134
144
 
@@ -138,6 +148,7 @@ All types share base fields from `BaseShape`: `id`, `name`, `title`, `descriptio
138
148
  | `folder` | Group children | `isSeries`, `transition`, `children[]` |
139
149
  | `scene` | Storyboard node (alias for folder) | `name`, `description`, `script`, `children[]` |
140
150
  | `image` | Still photo | `src`, `fit` (contain/cover/fill) |
151
+ | `model3d` | Three.js GLB/GLTF model | `src`, `motion`, `turns`, `rotation`, `camera`, `autoFit` |
141
152
  | `video` | Video clip | `src`, `volume`, `playbackRate` |
142
153
  | `audio` | Soundtrack/SFX | `src`, `volume`, `foreground` (ducks parent) |
143
154
  | `subtitle` | Text overlay | `src` (text/VTT) or `cues[]`, `fontSize`, `style` |
@@ -307,6 +318,23 @@ Whenever Markcut MCP server, preview UI, bridge, or bundled player code changes,
307
318
 
308
319
  ## Stateless MCP review
309
320
 
321
+ For media served by `/preview-files/`, Markcut versions each compiled video URL with
322
+ a stable `pv` query key based on the mounted source path, size, and modification
323
+ time. `markcut.preview.media` also adds the key when reading previously compiled
324
+ revisions, so old Cloudflare-cached originals do not override the latest mobile
325
+ transcode proxy. The NeoY Rust file server validates the key and serves preview
326
+ responses with `Cache-Control: no-store`; the unmodified `/files/` route still
327
+ streams the original. No `video.md` edits are needed. See
328
+ `tests/mcp-preview-proxy-version.test.mjs`.
329
+
330
+ Older compiled video sources using `/files/` are automatically upgraded to
331
+ `/preview-files/` inside the preview scene tree, including media snapshots under
332
+ `_neoy/markcut/generated/`. Other file types and direct original URLs stay
333
+ unchanged. If an immutable compiled scene cache already exists for the same
334
+ content hash, updated proxy URLs publish a deterministic `hash-transportHash.json`
335
+ variant rather than overwriting the original hash URL. The bridge validates
336
+ both formats, and normal cache retirement removes the variants as well.
337
+
310
338
  `markcut.preview` compiles and publishes an immutable revision for the calling ChatGPT conversation. The hosted app verifies the current path-keyed revision record before enabling review and sends decisions to that same conversation with `ui/message`. Neo Mobile owns its locally notified requests and delivery. Markcut does not store shared review history or poll for decisions. `markcut.preview.media({contentHash})` reads a compiled revision when a client needs its scene tree; operation status, immutable content fingerprints, media cache and safe pruning remain server-owned.
311
339
 
312
340
  ## MCP background-audio regression guard
@@ -317,6 +345,18 @@ When extracting HTTPS BGM from a preview tree, traverse the tree **before** retu
317
345
 
318
346
  For `map view:route`, omit `zoom` to auto-fit geotagged stops to the Remotion composition dimensions, including 9:16 vertical output; auto-fit reserves 14% padding. The route schema and both descriptive compiler paths must leave omitted zoom undefined, or their old `zoom:10` defaults silently override the runtime fit. Explicit `zoom` and camera tweens still override fit. Verify the real browser map's zoom/center and rendered tiles, not just a successful Markdown compile or Google API HTTP response. A calculated Directions line is not proof of a recorded GPS track.
319
347
 
348
+ ## Preview display title and question presentation
349
+
350
+ `markcut.preview({path, title?})` uses `title` as a UI and notification
351
+ display label without changing the compiled media/content hash. The optional
352
+ `mode: "questions"` is a presentation-only variant used by the Neo
353
+ `askquestions` wrapper: each compiled Scene has a Markdown question in its
354
+ UTF-8/base64-encoded `title` (prefixed `md64:`). The generic Preview UI
355
+ renders those titles as Markdown and collects one Scene comment per answer.
356
+ Only Submit is available; generic event delivery remains unchanged.
357
+ The Neo wrapper owns question generation and Relay binding, Markcut owns
358
+ Markdown rendering, compilation and opaque event delivery.
359
+
320
360
  ## Generic Preview event delivery
321
361
 
322
362
  Markcut is a renderer and event transport, not a workflow or review authority. With
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lalalic/markcut",
3
- "version": "3.2.60",
3
+ "version": "3.2.61",
4
4
  "description": "Markdown-to-video engine. Describe scenes in markdown, get a rendered video.",
5
5
  "bin": {
6
6
  "markcut": "bin/markcut"
@@ -14,7 +14,9 @@
14
14
  "./components": "./src/components/index.ts",
15
15
  "./descriptive": "./src/descriptive/compiler.ts",
16
16
  "./descriptive-markdown": "./src/descriptive/markdown.ts",
17
- "./descriptive-resolve": "./src/descriptive/resolve.ts"
17
+ "./descriptive-resolve": "./src/descriptive/resolve.ts",
18
+ "./editor-decision": "./src/editor-decision/index.mjs",
19
+ "./editor-decision/schema": "./src/editor-decision/editor-decision.schema.json"
18
20
  },
19
21
  "scripts": {
20
22
  "render": "node src/render/cli.mjs render",
@@ -42,10 +44,12 @@
42
44
  "@babel/standalone": "^8.0.3",
43
45
  "@modelcontextprotocol/ext-apps": "^2.0.3",
44
46
  "@modelcontextprotocol/server": "^2.3.1",
47
+ "@react-three/fiber": "9.4.0",
45
48
  "@remotion/cli": "4.0.469",
46
49
  "@remotion/media-parser": "4.0.469",
47
50
  "@remotion/media-utils": "4.0.469",
48
51
  "@remotion/player": "4.0.469",
52
+ "@remotion/three": "4.0.469",
49
53
  "@remotion/transitions": "4.0.469",
50
54
  "@vis.gl/react-google-maps": "^1.8.3",
51
55
  "immer": "^10.1.1",
@@ -61,6 +65,7 @@
61
65
  "remotion": "4.0.469",
62
66
  "remotion-subtitle": "^2.0.0",
63
67
  "systemjs": "^6.15.1",
68
+ "three": "0.180.0",
64
69
  "unified": "^11.0.5",
65
70
  "zod": "4.3.6"
66
71
  },
@@ -68,6 +73,7 @@
68
73
  "@types/node": "^22.0.0",
69
74
  "@types/react": "^19.0.0",
70
75
  "@types/react-dom": "^19.0.0",
76
+ "@types/three": "0.180.0",
71
77
  "typescript": "^5.6.0",
72
78
  "vitest": "^2.1.0"
73
79
  },
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "map-cinematic-follow",
3
+ "title": "Google Satellite Cinematic Follow",
4
+ "category": "map",
5
+ "description": "Follow a short portion of a Directions route with a controlled satellite-map camera and gentle heading movement.",
6
+ "use": "A short cinematic route interlude between two actual Vlog shots.",
7
+ "duration": "3–5s",
8
+ "durationSeconds": 4,
9
+ "view": "cinematic",
10
+ "parameters": ["waypoints", "cinematic.mode", "cinematic.headingFollow", "cinematic.tilt", "camera", "duration"],
11
+ "snippet": "## Cinematic-Follow\nlayout:parallel\n- map view:cinematic mapType:satellite duration:4 cinematic:{mode:flyAlong,headingFollow:false,tilt:25} camera:{zoom:tween(13,14,easeInOut),heading:tween(0,12,easeInOut)} waypoints:[37.7749,-122.4194,\"Start\";37.7799,-122.4144,\"Middle\";37.7849,-122.4094,\"Finish\"]",
12
+ "notes": [
13
+ "Use a short contiguous waypoint subset rather than forcing six stops through a four-second shot.",
14
+ "headingFollow:true can swing sharply at turns; the calmer template uses false.",
15
+ "Default is a moving 2D Google satellite map, not real drone or photorealistic 3D footage."
16
+ ]
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "map-location-reveal",
3
+ "title": "Google Location Reveal",
4
+ "category": "map",
5
+ "description": "Start with a wide Google satellite overview and gently zoom to a verified filming location.",
6
+ "use": "Introduce a city or neighbourhood before the first real-life shot.",
7
+ "duration": "2.5–3.5s",
8
+ "durationSeconds": 3,
9
+ "view": "overview",
10
+ "parameters": ["center", "camera.zoom", "duration", "mapType"],
11
+ "snippet": "## Location-Reveal\nlayout:parallel\n- map view:overview mapType:satellite duration:3 center:{lat:37.7749,lng:-122.4194} camera:{zoom:tween(10,14,easeInOut)}",
12
+ "notes": [
13
+ "Replace example coordinates with a verified filming location.",
14
+ "Keep location titles readable; do not obscure required Google attribution.",
15
+ "A satellite zoom is not real drone footage."
16
+ ]
17
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "map-route-journey",
3
+ "title": "Google Road Route Journey",
4
+ "category": "map",
5
+ "description": "Fit the complete Google Directions road geometry and animate a marker between verified GPS stops with smooth travel and endpoint holds.",
6
+ "use": "Bridge Vlog scenes with a map route; Google road geometry serves as the displayed route trajectory.",
7
+ "duration": "4–10s depending on stops",
8
+ "durationSeconds": 8,
9
+ "view": "route",
10
+ "parameters": ["waypoints", "travelMode", "routeAnimation", "routeColor", "routeWeight", "duration"],
11
+ "snippet": "## Road-Route\nlayout:parallel\n- map view:route mapType:roadmap duration:8 routeAnimation:{startHold:0.5,endHold:0.7,easing:easeInOut} routeColor:\"#4285F4\" routeWeight:5 routeMarker:\"📍\" waypoints:[37.7749,-122.4194,\"Start\";37.7849,-122.4094,\"Finish\"]",
12
+ "notes": [
13
+ "Replace example waypoints with source-backed GPS in chronological order.",
14
+ "Do not force center or zoom: the renderer fits Google's full road polyline automatically.",
15
+ "duration is editorial screen time, not Google travel ETA; record route geometry source as google_directions.",
16
+ "Use the verified transport mode where known; the default is DRIVING."
17
+ ]
18
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "map-streetview-explore",
3
+ "title": "Google Street View Explore",
4
+ "category": "map",
5
+ "description": "Animate a small panorama-heading sweep at a verified Google Street View location.",
6
+ "use": "Briefly reveal the street-level setting for a source-backed filmed stop.",
7
+ "duration": "3–4s",
8
+ "durationSeconds": 3.5,
9
+ "view": "streetview",
10
+ "parameters": ["streetView.location", "streetView.radius", "streetView.pov.heading", "streetView.pov.pitch", "duration"],
11
+ "snippet": "## Street-View\nlayout:parallel\n- map view:streetview duration:3.5 streetView:{location:{lat:37.7749,lng:-122.4194},radius:70,pov:{heading:tween(195,240,easeInOut),pitch:0}}",
12
+ "notes": [
13
+ "Verify a StreetViewPanorama exists near the source GPS before using this card.",
14
+ "Keep the heading sweep near 30–60 degrees and confirm the panorama is actually loaded.",
15
+ "Street View is Google imagery, not contemporaneous camera footage; retain attribution."
16
+ ]
17
+ }
@@ -13,13 +13,16 @@ Markcut turns a Markdown video definition into a compiled stream tree and a play
13
13
  |---|---|
14
14
  | Understand a folder of photos or clips | Inspect the files; use `markcut vision <folder>` if scene selection needs visual/media understanding. |
15
15
  | Make or revise a video | Load the project-selected template, author/edit its Markdown scenes, run `markcut verify <file>`, and **inspect real playback before claiming a finished video**. |
16
+ | Browse reusable motion/map recipes | Use `markcut recipes list --json` to see both Markcut-owned native scenes and installed Shotcraft reference cards; `markcut recipes show <qualified-id>` to inspect the selected card. Only `executable:true` cards provide ready-to-customize Markcut snippets. Read [Recipe catalog](docs/recipes.md) for source ownership, parameters and selection rules. |
16
17
  | Quickly assess story structure | `markcut preview <file> --storyboard` (placeholder media, not a final-video quality check). |
18
+ | Inspect a film editor's creative decisions | Link a companion via YAML frontmatter edl: ./video.edl.json (or use automatic same-basename sidecar discovery). The Previewer's top-right video selector lists Original, each named Markdown variant, and Editor Decisions (when available). Use markcut edl video.md to generate playable video.edl.md; no separate EDL/video version check. |
17
19
  | Watch a native work-in-progress video | `markcut preview <file>`; test real visuals, sound, and seeking. |
18
20
  | Watch a hosted preview without reviewing | Call `markcut.preview({path,readonly:true})`; no approval, comment submission, Git checkpoint, Relay change, or iPhone review request. |
19
21
  | Ask a person to review in ChatGPT | Call the available `markcut.preview({path})` tool; handle revision-specific feedback and approval. |
20
22
  | Ask for human review from Codex/terminal via iPhone | Use `markcut preview <video.md> --delivery event --event-template <relay-event.json>` on Neo Master. Neo Master stores the Preview and APNs notifies iPhone; the phone publishes the Event when the person submits. |
21
23
  | Deliver a finished MP4 | `markcut render <file> --output <path>`; inspect the resulting video and sound. |
22
24
  | Visualize a route or trip | Use a Markdown `map` stream; load [route/map reference](docs/map-dynamic-camera.md). |
25
+ | Preview or animate a 3D model | Use a `model3d` stream for a GLB/GLTF asset; frame-controlled turntable or orbit can render to MP4. See [3D models](docs/markdown-descriptive.md#native-3d-models-model3d). USDZ needs GLB conversion first. |
23
26
 
24
27
  `markcut` means the `npx @lalalic/markcut` CLI in the examples below. For supported flags and generation adapters, consult `npx @lalalic/markcut --help`, `npx @lalalic/markcut vision --help`, and `npx @lalalic/markcut --show-clis` rather than guessing. Media generation is handled by the configured Markcut pipeline; this Skill does not select a project's private vision provider.
25
28
 
@@ -58,7 +61,7 @@ Asset paths are relative to the Markdown document. A `prompt` without `src` asks
58
61
  1. **Structure gate:** `npx @lalalic/markcut verify video.md`, then `npx @lalalic/markcut preview video.md --storyboard` when rapid scene review is useful. Storyboard placeholders do not verify generated media or final audio.
59
62
  2. **Playback gate:** `npx @lalalic/markcut preview video.md`. Play and seek representative scenes; check black tails, media loading, narration, BGM, subtitles, route movement, and timing. For browser failures, load [Preview Troubleshooting](references/preview-troubleshooting.md) on demand.
60
63
  3. **Human review gate:** Use Neo's `markcut.preview({path: "/absolute/path/video.md"})` when the user wants to review the hosted ChatGPT video player. For playback only, use `readonly:true` instead; do not supply `review`. This is **not** the CLI preview. Managed requests correlate through `review.relay`, not a top-level `relay` field. The tool compiles/publishes a revision for playback; it does not rewrite the source. Comments with `decision: changes_requested` require editing that Markdown and calling `markcut.preview` again. `decision: approved` applies **only** to the identified revision/content hash; never apply an old approval to changed content. Follow [Review Contract](review.md) for actual video assessment.
61
- 4. **Codex / terminal human-review gate:** `npx @lalalic/markcut preview /absolute/video.md --delivery event --event-template /absolute/relay-event.json` on Neo Master. The Event Template must match Relay's canonical `task.interactive_decision` Contract (`type`, `source`, `data.interactive.{jobId,taskId,executionId,invocationId}` only, without review-result fields). The CLI reuses the MCP compiler, publishes immutable preview assets, persists the review request on Neo Master and dispatches an APNs notification through the existing Neo Mobile provider. Exit receipt `review_requested` confirms only that **the iPhone inbox accepted the request**; human decisions arrive asynchronously on Events Bus. The phone need not be online. APNs delivery is best-effort; Neo Mobile synchronizes persisted requests on foreground. There is no automatic text fallback. Do not claim approval or Relay worker continuation from the receipt. For retries with an uncertain phone acknowledgment, pass a stable `--request-id UUID`. See [Codex/mobile review CLI](references/mobile-event-preview-cli.md).
64
+ 4. **Codex / terminal human-review gate:** `npx @lalalic/markcut preview /absolute/video.md --delivery event --event-template /absolute/relay-event.json` on Neo Master. The Event Template must match Relay's canonical `task.interactive_decision` Contract (`type`, `source`, `data.interactive.{jobId,taskId,executionId}` only, without review-result fields). The CLI reuses the MCP compiler, publishes immutable preview assets, persists the review request on Neo Master and dispatches an APNs notification through the existing Neo Mobile provider. Exit receipt `review_requested` confirms only **durable wrapper delivery storage**, not that the phone has acquired it; human decisions arrive asynchronously on Events Bus. The phone need not be online. APNs delivery is best-effort; Neo Mobile synchronizes persisted requests on foreground. There is no automatic text fallback. Do not claim approval or Relay worker continuation from the receipt. For retries with an uncertain phone acknowledgment, pass a stable `--request-id UUID`. See [Codex/mobile review CLI](references/mobile-event-preview-cli.md).
62
65
  5. **Delivery gate:** `npx @lalalic/markcut render video.md --output out/video.mp4`. Confirm the MP4 exists and examine playback, including the final audio and subtitles. A valid Markdown file, compile success, or hosted-player resource alone is not proof of a finished video.
63
66
 
64
67
  If the user asks only for a script or structure, stop at the requested stage. Do not trigger expensive generation or claim final video delivery without a requested rendered artifact. A project-specific agent owns its own editorial or approval decisions; Markcut supplies authoring, playback and revision capabilities.
@@ -77,6 +80,7 @@ If the user asks only for a script or structure, stop at the requested stage. Do
77
80
  |---|---|
78
81
  | Markdown grammar, nodes, variants and asset syntax | [docs/markdown-descriptive.md](docs/markdown-descriptive.md) |
79
82
  | Map/GPS videos and camera movement | [docs/map-dynamic-camera.md](docs/map-dynamic-camera.md) |
83
+ | Reusable recipes (Markcut native + installed Shotcraft) | [docs/recipes.md](docs/recipes.md) |
80
84
  | JSX components and package examples | [docs/components.md](docs/components.md) |
81
85
  | Sound effects | [docs/sound-effects.md](docs/sound-effects.md) |
82
86
  | Review criteria, evidence and feedback contract | [review.md](review.md) |
@@ -250,6 +250,30 @@ ending: ...
250
250
 
251
251
  All video configuration comes from the root config line (section 10), NOT from frontmatter.
252
252
 
253
+ ### Editor Decisions (built-in EDL companion)
254
+
255
+ A video may link a Markcut Editor Decision List in its YAML frontmatter:
256
+
257
+ ```yaml
258
+ ---
259
+ edl: ./video.edl.json
260
+ ---
261
+ ```
262
+
263
+ The companion uses Markcut's Editor Decision Schema v1 (`src/editor-decision/editor-decision.schema.json`). It holds editorial intent and source-grounded per-shot choices: shot ID, original media source ID or path, in/out seconds, optional playback speed, shot purpose, cut rationale, visual relationship, and sound decision. The executable video Markdown remains the authority for the finished film; EDL is not a second editable render definition and no EDL/film version-fingerprint comparison is performed.
264
+
265
+ The EDL basename defaults to `<video-name>.edl.json` when a companion exists, even without a frontmatter field. A declared missing EDL is an error. The Previewer has one video selector in the top-right corner: Original, each named Markdown variant, and Editor Decisions. It does not show separate view tabs or a delivery-mode label. The Editor Decisions view uses the original clips and overlays the documented decisions.
266
+
267
+ Generate a standalone Markcut EDL viewing file:
268
+
269
+ ```sh
270
+ markcut edl video.md # produces video.edl.md
271
+ markcut verify video.edl.md
272
+ markcut preview video.edl.md
273
+ ```
274
+
275
+ The converter does not change the original video.md or video.edl.json.
276
+
253
277
  ### 12. Minimal Valid Document
254
278
 
255
279
  ```markdown
@@ -763,4 +787,47 @@ layout:series transition:fade transitionTime:1.2
763
787
  - script "..." # don't set duration for script/audio, markcut resolver will determine the duration of the scene based on the final audio length
764
788
  start:1.2 # let vision play for 1.2s before the script/audio start, so that the transition effect can be completed
765
789
 
766
- ~~~
790
+ ~~~
791
+
792
+ ## Native 3D models (`model3d`)
793
+
794
+ Render **GLB/GLTF** models as a native Remotion/Three.js scene (frame-synchronized,
795
+ seekable, and renderable to MP4). **USDZ is not supported by the browser loader**;
796
+ convert to GLB first. Assets follow the normal Markcut contract: keep local
797
+ `.glb` files inside the folder containing `video.md` (or a subfolder), and use
798
+ relative paths. Never place private model files in a public Git repository.
799
+
800
+ ```md
801
+ # video
802
+ width:720 height:720 fps:30 layout:series
803
+
804
+ ## Turntable
805
+ - model3d src:assets/toy.glb duration:8 motion:turntable turns:1 autoFit:true background:#f4f4f4 camera:{"position":[0,0,4.5],"fov":40}
806
+
807
+ ## Camera orbit
808
+ - model3d src:assets/toy.glb duration:5 motion:orbit turns:0.5 rotation:[0,20,0] scale:1.1
809
+
810
+ ## Still model
811
+ - model3d src:assets/toy.glb duration:2 motion:none
812
+ ```
813
+
814
+ Attributes: `src` (required `.glb`/`.gltf`), `duration` (seconds; default 4),
815
+ `motion` (`none`, `turntable` rotating the model, `orbit` revolving the camera),
816
+ `turns` (revolutions over scene duration), `rotation:[x,y,z]` (**degrees**, Y-up),
817
+ `position:[x,y,z]`, `scale` (positive multiplier), `autoFit` (default true:
818
+ centers and normalizes bounding box to two world units),
819
+ `camera:{"position":[x,y,z],"fov":40}`, `background` (CSS color or `transparent`).
820
+ Animation is deterministic: `useCurrentFrame()` drives the angle, so pausing and
821
+ seeking don't depend on browser wall clock.
822
+
823
+ GLB/GLTF supports embedded mesh/material, textures and **already-existing**
824
+ skinning. Model3D does not generate rigs, deform mouths, synthesize lip-sync,
825
+ perform interactive mouse orbit controls, or run Blender; these require a
826
+ separate authoring or viewer layer. Hosted preview snapshots a `.glb` asset through the existing NeoY Markcut
827
+ revision media store (max 512 MB; subject to NeoY file access). Standalone
828
+ `.gltf` with external textures and `.bin` files requires packaging as GLB
829
+ before hosted review. Do not publish private assets without owner authorization.
830
+ For MP4, the CLI selects Chromium `--gl=angle` automatically for streams
831
+ containing `model3d`. `--gl=swangle` is a possible software fallback on a
832
+ headless GPU-less machine. Do not equate compilation with successful WebGL
833
+ rendering; inspect actual frames and seek.
@@ -0,0 +1,45 @@
1
+ # Recipe catalog — Markcut + installed video-shotcraft
2
+
3
+ Markcut exposes one **read-only, source-attributed catalog** for choosing reusable video shots. Markcut owns its native property-based recipes in `recipes/markcut/*.json`; the installed `video-shotcraft` Skill owns its shot cards. The catalog reads Shotcraft's `gallery/api/library.json` and corresponding `references/shots/<category>/<card>.md` **on demand**. It does not copy, convert or execute external demos.
4
+
5
+ ## CLI and agent integration
6
+
7
+ ```bash
8
+ markcut recipes # Combined human-readable list
9
+ markcut recipes list --json # All cards with source / status / styles / paths
10
+ markcut recipes list --source markcut --category map
11
+ markcut recipes list --source shotcraft --category camera
12
+ markcut recipes list --search zoom
13
+ markcut recipes show markcut:map-route-journey
14
+ markcut recipes show shotcraft:cursor-flyover
15
+ markcut recipes show shotcraft:cursor-flyover --json
16
+ ```
17
+
18
+ The JSON API includes `recipes[]`, `count`, and `sources.{markcut,shotcraft}`. Every recipe is namespaced: `markcut:<name>` or `shotcraft:<name>`; callers should persist the **qualified ID**, not a bare name. The same bare name can exist in both libraries. The `source`, `implementation`, `executable`, `category`, `duration`, `description`, and `sourceFile` fields let Editor plan safely. Shotcraft cards also include `styles[]` (Gallery variants), and `show` resolves the latest full source card text from its owning Skill.
19
+
20
+ | Source | Implementation | Action |
21
+ |---|---|---|
22
+ | `markcut` | `native-markcut`, `executable:true` | Copy its `snippet` into a Markcut `video.md`, customize the properties and source GPS/media, then `markcut verify` + real Preview. |
23
+ | `shotcraft` | `reference-shot-card`, `executable:false` | Read the original card's intent, tuning/known pitfalls, and its demo code; **adapt** the motion to supported Markcut nodes/JSX. A Shotcraft card is not itself a playable Markcut scene. |
24
+
25
+ Shotcraft is optional. The catalog looks for an installed Skill at `~/.agents/skills/video-shotcraft`, `~/.codex/skills/video-shotcraft`, then `~/.claude/skills/video-shotcraft`. If it is elsewhere, set `MARKCUT_SHOTCRAFT_SKILL_DIR=/absolute/path/to/video-shotcraft` (or `VIDEO_SHOTCRAFT_ROOT`). If missing or unreadable, Markcut's own recipes still list and work; the `sources.shotcraft.status` field reports the condition. No runtime Neo installation, external network, image generation or Shotcraft dependency is required just to list Markcut recipes.
26
+
27
+ ## Native Google map recipes (property-only)
28
+
29
+ | ID | Map view | Typical length | Important parameters |
30
+ |---|---|---|---|
31
+ | `markcut:map-location-reveal` | `overview` | 3s | `center`, `camera.zoom`, `duration`, `mapType` |
32
+ | `markcut:map-route-journey` | `route` | 4–10s | `waypoints`, `routeAnimation`, `travelMode`, `routeColor` |
33
+ | `markcut:map-cinematic-follow` | `cinematic` | 3–5s | `waypoints`, `cinematic`, `camera`, `duration` |
34
+ | `markcut:map-streetview-explore` | `streetview` | 3–4s | `streetView.location`, `streetView.pov`, `radius`, `duration` |
35
+
36
+ Map examples in the registry use public sample coordinates, **not** the user's original GPS. They must be replaced with a Run's verified geographic evidence. Use Google Directions road geometry as the displayed Vlog trajectory between GPS stops per the owner's convention; preserve `google_directions` source attribution internally. Street View coverage is not guaranteed. Native maps still depend on a valid Google Maps key, billing, API availability and nonblank imagery. The Cinematic default is a moving 2D satellite map, not guaranteed real 3D or aerial footage.
37
+
38
+ The recipes are **selection/authoring aids**. They do not change the authoritative source `video.md`, do not bypass the story-driven Editor decision, and do not bypass `markcut verify`, Hosted Preview, video playback, media authorization or release checks.
39
+
40
+ ## Maintaining the registry
41
+
42
+ - Add a new JSON file under `recipes/markcut/` named `<recipe-name>.json`; this file is the **single source of truth** for Markcut-owned recipe metadata. Include `name`, `title`, `category`, `description`, `parameters[]`, `durationSeconds`, and an actual compiling Markdown `snippet` (plus `view` for native map cards).
43
+ - Add compilation/validation tests when introducing a new native node or template. Do not promise arbitrary React effect support when an implementation is only a recipe suggestion.
44
+ - Shotcraft recipes are owned by the installed Skill; no Markcut-side copy or manual reindex is needed. If Shotcraft changes its Gallery JSON, the next `markcut recipes list` reads the new cards automatically.
45
+ - Recipe registration is catalog-only. It does not create new Markcut streaming APIs, render paths, media generation services, or a second Shotcraft runtime.
@@ -1,6 +1,6 @@
1
1
  # Codex / terminal → Neo Mobile Event Preview
2
2
 
3
- On **Neo Master**, with a current managed Relay Task execution context, create a JSON Event Template according to `agents-relay/skills/agents-relay/contracts/event-contract.md`. **Do not invent Job/Task/Execution identity.** Use the exact execution identity supplied by Relay, and a stable, unique `invocationId` for each new video review request. Do not prefill `decision`, `feedback`, `comments`, `revision`, `contentHash`, `revisionId`, `previewId`, `requestId`, or `idempotencyKey`.
3
+ On **Neo Master**, with a current managed Relay Task execution context, create a JSON Event Template according to `agents-relay/skills/agents-relay/contracts/event-contract.md`. **Do not invent Job/Task/Execution identity.** Use the exact execution identity supplied by Relay, without manufacturing an invocation ID; the Task execution ID is authoritative. Do not prefill `decision`, `feedback`, `comments`, `revision`, `contentHash`, `revisionId`, `previewId`, `requestId`, or `idempotencyKey`.
4
4
 
5
5
  Example illustrative template file (`/tmp/review-event.json`; replace placeholders with actual Relay Task values):
6
6
 
@@ -12,8 +12,7 @@ Example illustrative template file (`/tmp/review-event.json`; replace placeholde
12
12
  "interactive": {
13
13
  "jobId": "<jobId>",
14
14
  "taskId": "<taskId>",
15
- "executionId": "<executionId>",
16
- "invocationId": "<unique-review-request-id>"
15
+ "executionId": "<executionId>"
17
16
  }
18
17
  }
19
18
  }
@@ -26,8 +25,13 @@ markcut verify /absolute/video.md
26
25
  markcut preview /absolute/video.md --delivery event --event-template /tmp/review-event.json
27
26
  ```
28
27
 
29
- The CLI submits to Neo Master’s durable review inbox. The existing APNs provider notifies the registered iPhone; the phone syncs outstanding reviews when opened or when a push arrives. **There is no phone MCP dependency.** Options: `--title`, `--group-id`, `--group-title`, `--request-id <UUID>`, `--timeout-ms`.
28
+ The CLI submits the request through Neo's installed wrapper. The wrapper keeps a
29
+ 30-day pending-delivery queue; NeoY sends an APNs wake-up hint. The phone
30
+ acquires through authenticated `review.preview.acquire` and stores its own
31
+ history. Options: `--delivery`, `--event-template`, `--timeout-ms`.
30
32
 
31
- It starts the same detached Markcut MCP compile worker, waits for an immutable revision, and calls the phone's `review.request`. On phone acceptance it prints JSON, including `status: "review_requested"`, `requestId`, `contentHash`, and `revisionId`. It **does not wait for a human decision**. The phone can be offline or Neo can be suspended. The Master stores the review, with APNs as a best-effort wake-up hint. A rejected/missing ACK exits nonzero. If reattempting after an uncertain ACK, supply the **same** request UUID to avoid duplicate phone requests. Phone users can inspect the compiled scenes and submit `approved` or `changes_requested`, which publishes `task.interactive_decision` through the existing authenticated Events MCP. The Event's `data.interactive` includes the exact reviewed hash, scene/timestamp comments, and idempotency key.
33
+ It starts the same detached Markcut MCP compile worker, waits for an immutable revision, and stores the request in Neo Wrapper. On durable storage it prints JSON, including `status: "review_requested"`, `requestId`, `contentHash`, and `revisionId`. It **does not wait for a human decision**. The phone can be offline or Neo can be suspended. The wrapper stores the delivery request, with APNs as a best-effort wake-up hint.
34
+ Neo Mobile acknowledges only after its local persistent import, and retains
35
+ its own history. If the wrapper cannot persist the request, CLI delivery fails. Phone users can inspect the compiled scenes and submit `approved` or `changes_requested`, which publishes `task.interactive_decision` through the existing authenticated Events MCP. The Event's `data.interactive` includes the exact reviewed hash, scene/timestamp comments, and idempotency key.
32
36
 
33
37
  Relay's Event receiver and Graph decide whether to resume/revise the original Task. **A successful phone enqueue is not a human approval or a resumed Codex thread.** Do not mark the Task complete until a real human decision was correlated to the correct immutable revision and the downstream workflow actually completed. For a local browser-only preview, omit `--delivery event` and use normal `markcut preview`.
@@ -7,6 +7,7 @@ import type {
7
7
  Image,
8
8
  Include,
9
9
  MapStream,
10
+ Model3D,
10
11
  Rhythm,
11
12
  Root,
12
13
  Scene,
@@ -18,7 +19,7 @@ import { uid, walkDown } from "../utils/index";
18
19
  import { BUILTIN_COMPONENT_NAMES } from "../components/builtin-registry";
19
20
 
20
21
  export interface CompileOptions {
21
- defaults?: Partial<Record<"image" | "video" | "audio" | "component" | "rhythm" | "include" | "map", number>>;
22
+ defaults?: Partial<Record<"image" | "video" | "audio" | "component" | "rhythm" | "include" | "map" | "model3d", number>>;
22
23
  /** Google Maps API key, injected onto map nodes during compilation. */
23
24
  googleMapsApiKey?: string;
24
25
  }
@@ -88,6 +89,19 @@ export interface DescriptiveImage extends DescriptiveBaseNode {
88
89
  fit?: "contain" | "cover" | "fill";
89
90
  }
90
91
 
92
+ export interface DescriptiveModel3D extends DescriptiveBaseNode {
93
+ type: "model3d";
94
+ src: string;
95
+ motion?: "none" | "turntable" | "orbit";
96
+ turns?: number;
97
+ rotation?: [number, number, number];
98
+ position?: [number, number, number];
99
+ scale?: number;
100
+ autoFit?: boolean;
101
+ camera?: { position?: [number, number, number]; fov?: number };
102
+ background?: string;
103
+ }
104
+
91
105
  export interface DescriptiveComponent extends DescriptiveBaseNode {
92
106
  type: "component";
93
107
  /** Inline JSX usage expression, compiled at runtime with frontmatter imports in scope.
@@ -208,6 +222,7 @@ export type DescriptiveNode =
208
222
  | DescriptiveVideo
209
223
  | DescriptiveAudio
210
224
  | DescriptiveImage
225
+ | DescriptiveModel3D
211
226
  | DescriptiveComponent
212
227
  | DescriptiveRhythm
213
228
  | DescriptiveInclude
@@ -313,7 +328,7 @@ export function resolveAllTemplateVars(
313
328
  }
314
329
 
315
330
  interface CompileContext {
316
- defaults: Record<"image" | "video" | "audio" | "component" | "rhythm" | "include" | "map" | "effect", number>;
331
+ defaults: Record<"image" | "video" | "audio" | "component" | "rhythm" | "include" | "map" | "model3d" | "effect", number>;
317
332
  googleMapsApiKey: string;
318
333
  }
319
334
 
@@ -350,6 +365,7 @@ const DEFAULTS: CompileContext["defaults"] = {
350
365
  rhythm: 4,
351
366
  include: 3,
352
367
  map: 4,
368
+ model3d: 4,
353
369
  effect: 2,
354
370
  };
355
371
 
@@ -611,6 +627,25 @@ function compileLeaf(node: Exclude<DescriptiveNode, DescriptiveContainer | Descr
611
627
  };
612
628
  return { stream, duration: end ?? 0 };
613
629
  }
630
+ case "model3d": {
631
+ const stream: Model3D = {
632
+ ...base,
633
+ type: "model3d",
634
+ src: node.src,
635
+ motion: node.motion ?? "none",
636
+ turns: node.turns ?? 1,
637
+ rotation: node.rotation ?? [0, 0, 0],
638
+ position: node.position ?? [0, 0, 0],
639
+ scale: node.scale ?? 1,
640
+ autoFit: node.autoFit ?? true,
641
+ camera: node.camera ? {
642
+ position: node.camera.position ?? [0, 0, 4.5],
643
+ fov: node.camera.fov ?? 40,
644
+ } : undefined,
645
+ background: node.background,
646
+ };
647
+ return { stream, duration: end ?? 0 };
648
+ }
614
649
  case "component": {
615
650
  // Collect extra properties from descriptive node (e.g. `source` from ~~~md source fences)
616
651
  const KNOWN_COMPONENT_KEYS = new Set([
@@ -1271,6 +1306,7 @@ const PRIMARY_CONTENT_KEY: Record<string, string> = {
1271
1306
  audio: "script",
1272
1307
  component: "jsx",
1273
1308
  image: "src",
1309
+ model3d: "src",
1274
1310
  video: "src",
1275
1311
  };
1276
1312
 
@@ -5,6 +5,7 @@ import type {
5
5
  DescriptiveImage,
6
6
  DescriptiveInclude,
7
7
  DescriptiveMap,
8
+ DescriptiveModel3D,
8
9
  DescriptiveMapWaypoint,
9
10
  DescriptiveNode,
10
11
  DescriptiveRhythm,
@@ -35,6 +36,7 @@ export type { ParseContext };
35
36
 
36
37
  const TYPE_TOKENS: Record<string, string> = {
37
38
  image: "image",
39
+ model3d: "model3d",
38
40
  video: "video",
39
41
  audio: "audio",
40
42
  component: "component",
@@ -104,6 +106,7 @@ function preserveVariantAttrs(node: Record<string, unknown>, attrs: Record<strin
104
106
  "view", "camera", "cinematic", "streetView", "routeAnimation",
105
107
  "name", "title", "transition", "transitionTime", "layout",
106
108
  "componentName", "props", "speaker", "isNarration",
109
+ "motion", "turns", "rotation", "position", "scale", "autoFit", "background",
107
110
  ]);
108
111
  for (const [k, v] of Object.entries(attrs)) {
109
112
  if (!STANDARD.has(k)) {
@@ -182,6 +185,33 @@ function parseNodeLine(content: string, lineNum?: number): DescriptiveNode {
182
185
  preserveVariantAttrs(node, attrs);
183
186
  return node;
184
187
  }
188
+ case "model3d": {
189
+ const src = firstPositional ?? (attrs.src as string | undefined);
190
+ if (!src) throw new DslError("model3d requires src (.glb or .gltf)", ctx);
191
+ const node: DescriptiveModel3D = {
192
+ type: "model3d",
193
+ id: attrs.id as any,
194
+ src,
195
+ duration: attrs.duration as any,
196
+ start: attrs.start as any,
197
+ motion: attrs.motion as any,
198
+ turns: attrs.turns as any,
199
+ rotation: attrs.rotation as any,
200
+ position: attrs.position as any,
201
+ scale: attrs.scale as any,
202
+ autoFit: attrs.autoFit as any,
203
+ camera: attrs.camera as any,
204
+ background: attrs.background as any,
205
+ instruction: attrs.instruction as any,
206
+ visible: attrs.visible as any,
207
+ isBackground: attrs.isBackground as any,
208
+ style: attrs.style as any,
209
+ effects: attrs.effects as any,
210
+ on: attrs.on as any,
211
+ };
212
+ preserveVariantAttrs(node, attrs);
213
+ return node;
214
+ }
185
215
  case "video": {
186
216
  const src = firstPositional ?? (attrs.src as string | undefined);
187
217
  const prompt = attrs.prompt as string | undefined;