@lalalic/markcut 3.2.14 → 3.2.15

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 (44) hide show
  1. package/.gitattributes +1 -0
  2. package/docs/evidence-markcut-neutral-preview.md +83 -0
  3. package/docs/evidence-markcut-real-e2e.json +267 -0
  4. package/docs/mcp-static-preview.md +57 -0
  5. package/examples/mcp-preview-review/README.md +6 -0
  6. package/examples/mcp-preview-review/video-a-v1.md +9 -0
  7. package/examples/mcp-preview-review/video-a-v2.md +9 -0
  8. package/examples/mcp-preview-review/video-a-v3.md +9 -0
  9. package/examples/mcp-preview-review/video-a-v3.wav +0 -0
  10. package/examples/mcp-preview-review/video-a-v4.md +13 -0
  11. package/examples/mcp-preview-review/video-a-v4.mp4 +0 -0
  12. package/examples/mcp-preview-review/video-a-v4.srt +11 -0
  13. package/examples/mcp-preview-review/video-a-v4.vtt +10 -0
  14. package/examples/mcp-preview-review/video-a-v4.wav +0 -0
  15. package/examples/mcp-preview-review/video-b-v1.md +6 -0
  16. package/examples/mcp-preview-review/video-b-v2.md +6 -0
  17. package/examples/mcp-preview-review/video-b-v3.md +6 -0
  18. package/package.json +3 -2
  19. package/scripts/build-mcp-preview.sh +7 -0
  20. package/scripts/launch-mcp.sh +6 -0
  21. package/scripts/verify-mcp-preview.mjs +124 -0
  22. package/skills/markcut/SKILL.md +14 -8
  23. package/src/mcp/bridge.mjs +166 -14
  24. package/src/mcp/browser-speech-preview.ts +60 -0
  25. package/src/mcp/compile-operation.mjs +52 -0
  26. package/src/mcp/compile-worker.mjs +20 -0
  27. package/src/mcp/map-footage.mjs +52 -0
  28. package/src/mcp/preview.mjs +225 -73
  29. package/src/mcp/remote-assets.mjs +185 -0
  30. package/src/mcp/remotion-app.bundle.js +4213 -0
  31. package/src/mcp/remotion-app.tsx +72 -0
  32. package/src/mcp/server.mjs +51 -46
  33. package/src/mcp/web-audio-preview.ts +51 -0
  34. package/src/player/SharedPlayer.tsx +15 -0
  35. package/src/player/browser.tsx +2 -16
  36. package/src/player/bundle/player.js +2053 -1989
  37. package/src/player/components/SceneThumbnails.tsx +9 -6
  38. package/src/types/Map.tsx +96 -47
  39. package/tests/mcp-browser-speech.test.ts +8 -0
  40. package/tests/mcp-map-footage.test.ts +24 -0
  41. package/tests/mcp-preview-bridge.test.ts +202 -0
  42. package/tests/mcp-preview.test.ts +76 -165
  43. package/tests/mcp-remote-assets.test.ts +59 -0
  44. package/tests/mcp-static-preview.test.ts +69 -0
package/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ src/mcp/remotion-app.bundle.js -whitespace linguist-generated=true
@@ -0,0 +1,83 @@
1
+ # Markcut neutral immutable multi-preview: implementation and evidence
2
+
3
+ Recorded 2026-10-12 UTC. Source: this Markcut-only checkout. This report does **not** claim complete acceptance: real application-host review delivery and independent external review remain **BLOCKED**.
4
+
5
+ ## Scope, architecture and fixes
6
+
7
+ - Previously `ensureVideoPreview` killed the existing player on each different path and returned the shared `http://127.0.0.1:4571/` URL. Now a single loopback 4571 gateway maintains distinct `/p/<UUID>/` URLs, assigns each immutable revision an SHA-256 content hash, starts up to six existing CLI player subprocesses on 4580–4598 and proxies player HTML, JS, APIs, and assets without changing the original CLI implementation.
8
+ - Each content-hash revision gets a frozen sibling Markdown snapshot. Real E2E exposed mutable generated scene IDs in `/api/video-data`, even for unchanged Markdown; the manager now pins the compiled JSON response at preview creation. It does not use the original Markdown path for playback after snapshotting. Relative external assets are resolved by existing player behavior and may change outside the Markdown snapshot; *complete external-media immutability* is not guaranteed.
9
+ - Duplicate same-file/concurrent requests reuse a single content-hash in-flight Promise and active revision. At most six active revisions may exist; capacity errors are explicit. Each revision uses one subprocess, so the bound is six subprocesses, **not** one render subprocess.
10
+ - Input must be an absolute existing readable `.md` file (realpath, regular-file check, <=1MiB). Snapshots use exclusive file creation; existing snapshots must be regular, non-symlink files with the same bytes. Gateway accepts only loopback connections, rejects foreign-Origin browser requests and proxies known revisions only; it must not be exposed to an untrusted network. As with existing CLI semantics, any local user authorized to call the MCP tool can preview readable absolute files.
11
+ - Gateway fails rather than adopting or killing unrelated services already occupying 4571. On MCP normal exit, SIGINT/SIGTERM, or stdin close, owned process group's termination stops the gateway and descendants. Snapshots and revision compiler dirs are removed on graceful gateway shutdown; an abrupt SIGKILL/crash can leave snapshot/cache artifacts. Restart is **ephemeral**: old preview URLs return HTTP 404 and a new invocation creates a new UUID. **Historical URL persistence across server restart is explicitly NOT advertised.**
12
+ - Review UI uses **one authoritative outbound host event request**, `ui/message`, carrying neutral `decision`, `feedback` (required for changes), `previewId`, `revisionId`, and `contentHash`. Duplicate clicks are blocked in the UI. The legacy standalone `markcut.preview.submit` tool remains as side-effect-free validation and does not deliver host review events. No Relay job/task identifiers, database APIs, or Relay state changes are present in Markcut.
13
+
14
+ ## Commands and actual test evidence
15
+
16
+ ```sh
17
+ npm ci --no-audit --no-fund
18
+ node --check src/mcp/managed-player.mjs
19
+ node --check src/mcp/preview.mjs
20
+ node --check src/mcp/bridge.mjs
21
+ node --check src/mcp/server.mjs
22
+ npm test -- --run tests/mcp-preview.test.ts
23
+ node scripts/verify-mcp-preview.mjs
24
+ npm run typecheck
25
+ npm test
26
+ ```
27
+
28
+ - `npm ci`: PASS, 462 packages installed.
29
+ - Focused MCP tests: **PASS 8/8**, including the single `ui/message` path, revision identity, duplicate-click prevention and failure handling. VM harness is *not* real host proof.
30
+ - Real MCP + HTTP: **PASS 14/14** (last run exit 0). Full original machine outputs, IDs, URLs, content hashes, process listings and assertions in `docs/evidence-markcut-real-e2e.json`. The script launches a real MCP stdio server and two real Markdown player instances; it does not mock network or tool calls. Actual A-v1 UUID `5cdb7daa-332f-4e44-b319-88b1635175b1`, B-v1 UUID `d251d006-0956-464b-b1d3-b2b677a67334`, A-v2 UUID `4d64c6ae-1af9-4122-8fa1-ac943a611cae`. A-v1: `http://127.0.0.1:4571/p/5cdb7daa-332f-4e44-b319-88b1635175b1/`; B-v1: `http://127.0.0.1:4571/p/d251d006-0956-464b-b1d3-b2b677a67334/`; A-v2: `http://127.0.0.1:4571/p/4d64c6ae-1af9-4122-8fa1-ac943a611cae/`. A-v1 SHA256 `1f612ea3c2796d617df80e31a3890b27d6b093399395eff5759e0b8d79dfd07b`; B-v1 SHA256 `d48c6a5da387d62cf15acecf0f34c6b3c4b3666b756cba418192445f7158c64b`; A-v2 SHA256 `9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5`.
31
+ - Real player calls returned HTTP 200, `{"ready":true}`, `/api/video-data` with distinct `Alpha v1` vs `Beta v1` source identity; HTML and `player.js` both HTTP 200. A-v1 compiled response remained *byte-identical* after A-v2; B-v1 retained its content. Twelve parallel repeated requests yielded one instance. Six-slot test observed one manager plus six player subprocesses (seven active), after shutdown zero remaining. Conflict test preserved foreign port owner. After restart, old A-v1 URL returned HTTP 404. Cross-origin unauthorized request returned 403.
32
+ - `npm run typecheck`: **FAIL** due to existing unrelated type errors including `src/descriptive/resolve.test.ts` implicit anys, missing `dirname`, and `src/player/components/LabelControls.tsx` possibly-undefined errors. No TypeScript project source files were modified in this task. This has not been independently confirmed against a pristine baseline.
33
+ - `npm test`: **PENDING at report creation**, running long Remotion integration tests (see final run status below). Do not interpret the focused test pass as a full-suite pass.
34
+
35
+ ### Acceptance decision matrix
36
+
37
+ | Scenario | Result | Evidence / limitation |
38
+ |---|---|---|
39
+ | Two independent concurrently live Markdown video previews | PASS | Real MCP+HTTP A/B; different URLs/scene content |
40
+ | Immutable historical revision within process lifetime | PASS | Real A-v2, A-v1 compiled JSON byte-identical |
41
+ | Revisit A and B; repeated same path | PASS | Real HTTP + reused UUID |
42
+ | Concurrent repeated calls; bounded children | PASS | 12 parallel requests → one revision; six slots max |
43
+ | Invalid paths and safe snapshot access | PASS | Real MCP invalid cases; safe regular-file snapshots |
44
+ | Port collision | PASS | Foreign service not terminated or adopted |
45
+ | Graceful cleanup and process leak check | PASS | Six child processes + manager → zero after close |
46
+ | Restart and historical URL semantics | PASS | Old URL 404 (persistence NOT advertised) |
47
+ | Standalone MCP; original CLI interface preserved | PASS for stdio MCP; CLI code unchanged | Real client and unmodified CLI source; no separate legacy CLI playback smoke test |
48
+ | Generic event-only UI contract (single path) | PASS unit test | No duplicate `tools/call`; neutral identity and feedback |
49
+ | Generic event delivery **from real application host** | **BLOCKED** | Actual host event not observed; see manual verification |
50
+ | Independent specialist review | **BLOCKED** | Must be scheduled by Relay owner; no independent reviewer run here |
51
+ | Full test suite and typecheck | **See test status** | Typecheck errors recorded above |
52
+
53
+ ### Reproducible real application-host review verification (required before accepting this objective)
54
+
55
+ 1. Install/configure the MCP Apps-capable *real application host* to launch `node src/mcp/server.mjs` from this checkout (not a mock harness); enable transport/host debug logs.
56
+ 2. Call the real `markcut.preview` tool with `{"path":"/absolute/path/to/A.md"}` and open its embedded player UI. Verify the preview identity, readiness, and distinct revision URL.
57
+ 3. Click **Approve** **once** and inspect host-inbound RPC: exactly one `ui/message` request containing one serialized user text message with `decision:"approved"`, `previewId`, `revisionId`, and `contentHash`. Verify host turns it into exactly one user-visible review event; inspect events/turn logs, **not** just client success UI.
58
+ 4. Open a new revision, enter feedback, click **Request changes** and verify exactly one host event with `decision:"changes_requested"` and the exact feedback. Double-click should not duplicate; reject empty feedback. Neither path should emit `tools/call markcut.preview.submit`; neither event should have `jobId`/`taskId`.
59
+ 5. If `ui/message` is unsupported or not delivered by the host, capture RPC rejection or absent event and keep **BLOCKED**. Never infer host delivery from a VM/unit test or HTTP success.
60
+
61
+ ### Residual limitations
62
+
63
+ - The resource lifecycle intentionally limits simultaneous preview revisions to six and requires stopping/restarting the MCP-managed server to free all slots; no per-preview close/reclaim control.
64
+ - URLs and gateway state do not persist across service restart. Live snapshot content and pinned compiled JSON are stable, but media files read outside the snapshot may change.
65
+ - Abrupt crashes and SIGKILL may leave generated cache/snapshots in input folders; normal termination cleans managed revision files.
66
+ - Child preview backend ports 4580–4598 use the existing player server and are loopback-accessible directly; this is a local trusted-host tool, not a network multi-tenant security boundary.
67
+ - Independent review and real host event are required acceptance gates and remain BLOCKED, regardless of successful localhost E2E.
68
+
69
+ ## Final full-suite result (supersedes earlier pending status)
70
+
71
+ - `npm test` — **FAIL**, exit code 1. **454 passed, 11 failed, 2 skipped** (16 files: 3 failed, 13 passed); runtime 386.27s. The focused MCP test suite remains 8/8 PASS and real MCP+HTTP test suite 14/14 PASS.
72
+ - Nine failures originate in `tests/render.test.ts`: audio track rendering, audio extraction, full-feature audio, combined feature renders, STT, parallel audio/image/subtitle, and video trimming. One failure is `src/descriptive/compiler.test.ts` expecting unique generated IDs, and one is `src/descriptive/markdown.test.ts` expecting an empty standalone script to throw. No source in these test areas was modified during the Markcut preview work; baseline equivalence is unverified.
73
+ - Raw stderr and stdout: local Neo shell job `1791827301578-0896f7bff8-markcut-relevant-full-test`, `~/Library/Application Support/NeoY/core/jobs/1791827301578-0896f7bff8-markcut-relevant-full-test.{stderr,stdout}.log`.
74
+ - Final acceptance of full regression and independent review remains **BLOCKED/FAIL**; the passing focused/real preview checks do not override it.
75
+
76
+ ## Fresh validation, execution attempt 2 (2026-10-12 14:53 America/Toronto)
77
+
78
+ - `node scripts/verify-mcp-preview.mjs > /tmp/markcut-postfix-e2e.log 2>&1`: PASS (exit 0), real MCP + HTTP. Latest raw results committed in `docs/evidence-markcut-real-e2e.json`.
79
+ - `npm test -- --run tests/mcp-preview.test.ts`: PASS (8/8).
80
+ - `node --check src/mcp/managed-player.mjs`: PASS.
81
+ - Concurrent child-port reservation hardened: one candidate port cannot be issued twice during asynchronous snapshot creation, and reservation released on exit/failure/shutdown.
82
+ - Full suite previously FAILED (454 pass, 11 fail, 2 skip); typecheck previously FAILED; see original report for exact errors. These results are NOT superseded by focused checks.
83
+ - Actual external MCP application host `ui/message` delivery: BLOCKED (no observed host-inbound event). Independent review: BLOCKED pending Relay-managed reviewer.
@@ -0,0 +1,267 @@
1
+ {
2
+ "timestamp": "2026-10-13T16:43:56.983Z",
3
+ "dir": "/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S",
4
+ "checks": [
5
+ {
6
+ "label": "A-v1 and B-v1 parallel real MCP calls",
7
+ "status": "PASS",
8
+ "detail": {
9
+ "A": "http://127.0.0.1:4571/p/cfdd7ccf-8dc6-4359-93da-d19f57bb77fe/",
10
+ "B": "http://127.0.0.1:4571/p/619e0d46-19d9-4fba-b682-6746a5f62060/"
11
+ }
12
+ },
13
+ {
14
+ "label": "HTTP readiness and identity A/B",
15
+ "status": "PASS",
16
+ "detail": {
17
+ "AIdentity": "Alpha v1",
18
+ "BIdentity": "Beta v1"
19
+ }
20
+ },
21
+ {
22
+ "label": "HTTP player HTML and bundled JavaScript per revision",
23
+ "status": "PASS",
24
+ "detail": ""
25
+ },
26
+ {
27
+ "label": "revisit both URLs",
28
+ "status": "PASS",
29
+ "detail": ""
30
+ },
31
+ {
32
+ "label": "repeat identical path deduplicates",
33
+ "status": "PASS",
34
+ "detail": "cfdd7ccf-8dc6-4359-93da-d19f57bb77fe"
35
+ },
36
+ {
37
+ "label": "A-v2 revision, immutable A-v1",
38
+ "status": "PASS",
39
+ "detail": {
40
+ "A1": "http://127.0.0.1:4571/p/cfdd7ccf-8dc6-4359-93da-d19f57bb77fe/",
41
+ "A2": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/"
42
+ }
43
+ },
44
+ {
45
+ "label": "parallel repeat calls",
46
+ "status": "PASS",
47
+ "detail": {
48
+ "calls": 12,
49
+ "instances": 1
50
+ }
51
+ },
52
+ {
53
+ "label": "invalid paths rejected by actual MCP",
54
+ "status": "PASS",
55
+ "detail": ""
56
+ },
57
+ {
58
+ "label": "cross-origin browser request rejected",
59
+ "status": "PASS",
60
+ "detail": ""
61
+ },
62
+ {
63
+ "label": "bounded six revisions and graceful seventh refusal",
64
+ "status": "PASS",
65
+ "detail": "6 active slots maximum"
66
+ },
67
+ {
68
+ "label": "cleanup manager and child processes",
69
+ "status": "PASS",
70
+ "detail": ""
71
+ },
72
+ {
73
+ "label": "foreign process on 4571 is not killed or reused",
74
+ "status": "PASS",
75
+ "detail": ""
76
+ },
77
+ {
78
+ "label": "restart expires old URLs (no historical persistence advertised)",
79
+ "status": "PASS",
80
+ "detail": {
81
+ "old": "http://127.0.0.1:4571/p/cfdd7ccf-8dc6-4359-93da-d19f57bb77fe/",
82
+ "oldStatus": 404,
83
+ "new": "http://127.0.0.1:4571/p/75f9c9fa-4965-4585-adc3-c06ed5798540/"
84
+ }
85
+ },
86
+ {
87
+ "label": "restart cleanup",
88
+ "status": "PASS",
89
+ "detail": ""
90
+ }
91
+ ],
92
+ "previews": [
93
+ {
94
+ "id": "cfdd7ccf-8dc6-4359-93da-d19f57bb77fe",
95
+ "revisionId": "cfdd7ccf-8dc6-4359-93da-d19f57bb77fe",
96
+ "contentHash": "1f612ea3c2796d617df80e31a3890b27d6b093399395eff5759e0b8d79dfd07b",
97
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
98
+ "previewUrl": "http://127.0.0.1:4571/p/cfdd7ccf-8dc6-4359-93da-d19f57bb77fe/",
99
+ "resourceUri": "ui://markcut/video-preview-v3.html/1f612ea3c2796d617df80e31a3890b27d6b093399395eff5759e0b8d79dfd07b"
100
+ },
101
+ {
102
+ "id": "619e0d46-19d9-4fba-b682-6746a5f62060",
103
+ "revisionId": "619e0d46-19d9-4fba-b682-6746a5f62060",
104
+ "contentHash": "d48c6a5da387d62cf15acecf0f34c6b3c4b3666b756cba418192445f7158c64b",
105
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/B.md",
106
+ "previewUrl": "http://127.0.0.1:4571/p/619e0d46-19d9-4fba-b682-6746a5f62060/",
107
+ "resourceUri": "ui://markcut/video-preview-v3.html/d48c6a5da387d62cf15acecf0f34c6b3c4b3666b756cba418192445f7158c64b"
108
+ },
109
+ {
110
+ "id": "cfdd7ccf-8dc6-4359-93da-d19f57bb77fe",
111
+ "revisionId": "cfdd7ccf-8dc6-4359-93da-d19f57bb77fe",
112
+ "contentHash": "1f612ea3c2796d617df80e31a3890b27d6b093399395eff5759e0b8d79dfd07b",
113
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
114
+ "previewUrl": "http://127.0.0.1:4571/p/cfdd7ccf-8dc6-4359-93da-d19f57bb77fe/",
115
+ "resourceUri": "ui://markcut/video-preview-v3.html/1f612ea3c2796d617df80e31a3890b27d6b093399395eff5759e0b8d79dfd07b"
116
+ },
117
+ {
118
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
119
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
120
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
121
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
122
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
123
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
124
+ },
125
+ {
126
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
127
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
128
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
129
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
130
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
131
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
132
+ },
133
+ {
134
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
135
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
136
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
137
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
138
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
139
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
140
+ },
141
+ {
142
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
143
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
144
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
145
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
146
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
147
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
148
+ },
149
+ {
150
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
151
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
152
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
153
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
154
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
155
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
156
+ },
157
+ {
158
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
159
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
160
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
161
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
162
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
163
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
164
+ },
165
+ {
166
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
167
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
168
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
169
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
170
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
171
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
172
+ },
173
+ {
174
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
175
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
176
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
177
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
178
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
179
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
180
+ },
181
+ {
182
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
183
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
184
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
185
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
186
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
187
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
188
+ },
189
+ {
190
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
191
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
192
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
193
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
194
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
195
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
196
+ },
197
+ {
198
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
199
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
200
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
201
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
202
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
203
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
204
+ },
205
+ {
206
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
207
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
208
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
209
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
210
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
211
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
212
+ },
213
+ {
214
+ "id": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
215
+ "revisionId": "bf57e7e0-5dd6-4605-a6a9-13950be26ecc",
216
+ "contentHash": "9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5",
217
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/A.md",
218
+ "previewUrl": "http://127.0.0.1:4571/p/bf57e7e0-5dd6-4605-a6a9-13950be26ecc/",
219
+ "resourceUri": "ui://markcut/video-preview-v3.html/9a0fe26791bed4f8aa7d0d75b9badeee025acc2784a0628e23bcd99d5aa5b6c5"
220
+ },
221
+ {
222
+ "id": "bad49c87-ac78-4923-a053-129a5c898925",
223
+ "revisionId": "bad49c87-ac78-4923-a053-129a5c898925",
224
+ "contentHash": "383b5cbc87c3faa165c604858360cadd038e00abd457307f570018fd536d2466",
225
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/extra0.md",
226
+ "previewUrl": "http://127.0.0.1:4571/p/bad49c87-ac78-4923-a053-129a5c898925/",
227
+ "resourceUri": "ui://markcut/video-preview-v3.html/383b5cbc87c3faa165c604858360cadd038e00abd457307f570018fd536d2466"
228
+ },
229
+ {
230
+ "id": "b2000092-cd9a-4ca5-a8ae-66c3a0473656",
231
+ "revisionId": "b2000092-cd9a-4ca5-a8ae-66c3a0473656",
232
+ "contentHash": "8f21105b4b452cb0f94626b35ddc5c95636b70a847abe35b28c601cf471261e0",
233
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/extra1.md",
234
+ "previewUrl": "http://127.0.0.1:4571/p/b2000092-cd9a-4ca5-a8ae-66c3a0473656/",
235
+ "resourceUri": "ui://markcut/video-preview-v3.html/8f21105b4b452cb0f94626b35ddc5c95636b70a847abe35b28c601cf471261e0"
236
+ },
237
+ {
238
+ "id": "5f1c58c6-e635-4630-929d-fbec0b162607",
239
+ "revisionId": "5f1c58c6-e635-4630-929d-fbec0b162607",
240
+ "contentHash": "9103393b1898e5a18c68c371adf7d2342def8eb43ebbf55f508714a22c881c75",
241
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/extra2.md",
242
+ "previewUrl": "http://127.0.0.1:4571/p/5f1c58c6-e635-4630-929d-fbec0b162607/",
243
+ "resourceUri": "ui://markcut/video-preview-v3.html/9103393b1898e5a18c68c371adf7d2342def8eb43ebbf55f508714a22c881c75"
244
+ },
245
+ {
246
+ "id": "75f9c9fa-4965-4585-adc3-c06ed5798540",
247
+ "revisionId": "75f9c9fa-4965-4585-adc3-c06ed5798540",
248
+ "contentHash": "d48c6a5da387d62cf15acecf0f34c6b3c4b3666b756cba418192445f7158c64b",
249
+ "path": "/private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/B.md",
250
+ "previewUrl": "http://127.0.0.1:4571/p/75f9c9fa-4965-4585-adc3-c06ed5798540/",
251
+ "resourceUri": "ui://markcut/video-preview-v3.html/d48c6a5da387d62cf15acecf0f34c6b3c4b3666b756cba418192445f7158c64b"
252
+ }
253
+ ],
254
+ "processes": {
255
+ "active": [
256
+ "29155 29154 /opt/homebrew/Cellar/node/25.6.0/bin/node /Users/chengli/Workspace/.worktrees/orchestrator/markcut-pr17-current/src/mcp/managed-player.mjs",
257
+ "29156 29155 /opt/homebrew/Cellar/node/25.6.0/bin/node /Users/chengli/Workspace/.worktrees/orchestrator/markcut-pr17-current/src/player/server.mjs /private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/.markcut-preview-aa3f8b91210d4b7e2be35610da5ccf2c9327a913d9ff1757743e7a663f50340a.md --port=4580",
258
+ "29157 29155 /opt/homebrew/Cellar/node/25.6.0/bin/node /Users/chengli/Workspace/.worktrees/orchestrator/markcut-pr17-current/src/player/server.mjs /private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/.markcut-preview-1bdc848d2672b02acbcf513394af7a3f17c41644515e16658a7773edb153c2fc.md --port=4581",
259
+ "29187 29155 /opt/homebrew/Cellar/node/25.6.0/bin/node /Users/chengli/Workspace/.worktrees/orchestrator/markcut-pr17-current/src/player/server.mjs /private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/.markcut-preview-002bc32e4c460e35384669cc42d21e27731cd4aeaf212c3c219391aa04e5ba27.md --port=4582",
260
+ "29196 29155 /opt/homebrew/Cellar/node/25.6.0/bin/node /Users/chengli/Workspace/.worktrees/orchestrator/markcut-pr17-current/src/player/server.mjs /private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/.markcut-preview-51f8390c693223212f57d2c66df81bd7ea3ede26e9f28e0606dff57c933fc9b4.md --port=4583",
261
+ "29214 29155 /opt/homebrew/Cellar/node/25.6.0/bin/node /Users/chengli/Workspace/.worktrees/orchestrator/markcut-pr17-current/src/player/server.mjs /private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/.markcut-preview-6bb4dea906864d49de4a8d3208b7de4a9f58e09e2745cc6e983dd4fbe4a55fd7.md --port=4584",
262
+ "29302 29155 /opt/homebrew/Cellar/node/25.6.0/bin/node /Users/chengli/Workspace/.worktrees/orchestrator/markcut-pr17-current/src/player/server.mjs /private/var/folders/pr/rymvcpd54mzdg4kv34r3ht300000gn/T/markcut-real-e2e-Ychg1S/.markcut-preview-d6777c6b00501eff0cb6968cc749914b457ecc8be820b0d3937221cd08d59e28.md --port=4585"
263
+ ],
264
+ "afterClose": []
265
+ },
266
+ "completedAt": "2026-10-13T16:44:03.536Z"
267
+ }
@@ -0,0 +1,57 @@
1
+ # Markcut MCP Static Preview Architecture
2
+
3
+ **Compile-and-release**: markcut.preview compiles Markdown, publishes an immutable JSON and media snapshot to NeoY File Server, and returns. It does not spawn a persistent Player Manager or per-Revision Player. Native CLI preview remains separate.
4
+
5
+ ## Files
6
+ - Keep only current story.md, directory.md and video.md in a Vlog run. Story/directory are not necessarily Markcut video DSL.
7
+ - Latest compiled stream: <run>/.markcut/<basename>/default/compiled.json
8
+ - General immutable cache: <run>/.markcut/cache/<hash>.json
9
+ - Per-video index: <run>/.markcut/<basename>/default/cache-index.json
10
+ - NeoY HTTPS published resources: /files/_neoy/markcut/cache/<hash>.json, /generated/<hash> for frozen local media, and /player/<bundle-hash>.js for the shared MCP player.
11
+
12
+ ## Lifecycle
13
+ - Input fingerprint covers absolute source path, Markdown, audio and referenced local media metadata. Repeating identical input reuses the cache.
14
+ - Compile with a deterministic seed so parsing does not modify the source Markdown.
15
+ - Publish media and immutable JSON before atomically updating the latest compiled file.
16
+ - Retain latest plus nine older successful compiled results per Video. Compilation errors leave the previous latest intact.
17
+ - Local media files are snapshotted and older retained previews can play, seek and show maps without a local preview process.
18
+ - Old Preview review buttons become read-only; review submissions check the current published hash. Human/Relay review authorization remains separate.
19
+ - Source files are latest-only, not historically versioned. No user-facing History UI.
20
+ - External HTTPS media are not frozen; local media snapshots provide exact replay where required.
21
+
22
+ ## Verification
23
+ Run focused Vitest tests and node scripts/verify-mcp-preview.mjs, then independently inspect the real ChatGPT hosted iframe with Browser Workspace. A passing compiler, a compiled tool result, and a working hosted MCP player are distinct gates. Do not approve automatically.
24
+
25
+
26
+ ## Asynchronous compilation and in-app progress (v21)
27
+
28
+ markcut.preview validates the Markdown source, writes a transient operation record,
29
+ spawns a detached compiler worker, and returns immediately with operationId,
30
+ operationUrl, state=compiling, path and resourceUri.
31
+
32
+ The worker publishes its status through NeoY File Server under
33
+ /files/_neoy/markcut/operations/<uuid>.json. It reports actual stages:
34
+ checking-cache, parsing-markdown, resolving-assets-and-generating-media,
35
+ compiling-scenes, freezing-preview-assets and publishing-static-preview.
36
+ The iframe shows the current stage and elapsed seconds, without a fabricated percent.
37
+
38
+ Ready status includes a compiledUrl. Failed status includes an error. The iframe
39
+ polls once per second and hides playback and review controls until the immutable
40
+ compiled JSON is available. The compiler then exits, with no long-lived manager.
41
+
42
+ Status files older than 24 hours are opportunistically pruned during new operations.
43
+ The existing immutable compiled cache keeps up to ten results per Video.
44
+ Source hashes are checked at worker start and again before publishing.
45
+
46
+ The real hosted ChatGPT iframe was observed while an isolated 30-second MCP probe
47
+ still reported compiling. That validation establishes early mounting, not a
48
+ production video or Google Maps pixel-level verification.
49
+
50
+
51
+ ## Current hosted Player (v24)
52
+
53
+ The immutable MCP player shares the native Remotion player and scene navigator. The header contains Markcut/title, optional browser-TTS toggle, and version. The human may Send feedback with scene/time context or Approve a specific revision. These review decisions use MCP Apps `ui/message`; the agent performs all Markdown changes and repeats `markcut.preview` to show a new revision. Host end-to-end continuation is not yet production-verified.
54
+
55
+ During compilation, Google Maps route/cinematic scenes are optionally rendered by Remotion to MP4 and published as immutable generated media. On successful render the compiled stream references video nodes, and the public JSON omits the Google Maps API key. If no key is available or rendering fails, the original live Map component is retained. The compiler's launch environment must supply `GOOGLE_MAPS_API_KEY`; the NeoY MCP entrypoint is `scripts/launch-mcp.sh` which loads the login environment. This is separate from the local CLI preview.
56
+
57
+ Player Browser TTS is a **playback-only** mode: it uses existing VTT text for speech and captions, defaulting on when VTT exists. Turning it off restores generated audio. STT is not used in this mode; compilation-time TTS is currently unchanged.
@@ -0,0 +1,6 @@
1
+ # MCP Preview manual regression fixtures
2
+
3
+ Synthetic A/B scenes, v4 HTTPS WAV/MP4/SRT and multi-revision review examples.
4
+ For local preview, call markcut.preview with an absolute Markdown path.
5
+ For public-preview URL tests, mount this directory as markcut-review with neoy.setup.
6
+ Review and playback verification is manual; fixture availability is not approval.
@@ -0,0 +1,9 @@
1
+ # video
2
+ seed:355483143
3
+ width:640 height:480 fps:30 layout:series
4
+ ## Opening_Long
5
+ - component duration:2 jsx:"<div style={{fontSize:64}}>A — Long opening for manual review</div>"
6
+ ## Canal_View
7
+ - component duration:2 jsx:"<div style={{fontSize:64}}>A — Canal view</div>"
8
+ ## Background_Title
9
+ - component duration:2 jsx:"<div style={{fontSize:64}}>A — Autumn along the canal</div>"
@@ -0,0 +1,9 @@
1
+ # video
2
+ seed:355483143
3
+ width:640 height:480 fps:30 layout:series
4
+ ## Opening-Long
5
+ - component duration:2 jsx:"<div style={{fontSize:64}}>A — Long opening for manual review</div>"
6
+ ## Canal-View
7
+ - component duration:2 jsx:"<div style={{fontSize:64}}>A — Canal view</div>"
8
+ ## Background-Title
9
+ - component duration:2 jsx:"<div style={{fontSize:64}}>A — Autumn along the canal</div>"
@@ -0,0 +1,9 @@
1
+ # video
2
+ seed:2449698215
3
+ width:640 height:480 fps:30 layout:series
4
+ ## Opening-Blue
5
+ - component duration:2 jsx:"<div style={{background:'#174EA6',color:'#FFFFFF',width:'100%',height:'100%',display:'flex',alignItems:'center',justifyContent:'center',fontSize:52,fontWeight:'bold'}}>PREVIEW A - OPENING</div>"
6
+ ## Canal-View
7
+ - component duration:2 jsx:"<div style={{background:'#008577',width:'100%',height:'100%',display:'flex',alignItems:'center',justifyContent:'center'}}><img src='data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20640%20480%22%3E%3Crect%20width%3D%22640%22%20height%3D%22480%22%20fill%3D%22%23b5e1f2%22%2F%3E%3Ccircle%20cx%3D%22505%22%20cy%3D%22105%22%20r%3D%2254%22%20fill%3D%22%23ffd36a%22%2F%3E%3Cpath%20d%3D%22M0%20285L155%20115L295%20283L430%20155L640%20320V480H0Z%22%20fill%3D%22%23488398%22%2F%3E%3Cpath%20d%3D%22M0%20339L160%20213L322%20370L492%20240L640%20353V480H0Z%22%20fill%3D%22%232b6479%22%2F%3E%3Cpath%20d%3D%22M0%20370Q155%20330%20320%20390T640%20365V480H0Z%22%20fill%3D%22%231c8596%22%2F%3E%3Cpath%20d%3D%22M0%20420Q180%20389%20320%20425T640%20411%22%20fill%3D%22none%22%20stroke%3D%22%23a6e4e2%22%20stroke-width%3D%2210%22%2F%3E%3C%2Fsvg%3E' alt='Mountain lake illustration' style={{width:'100%',height:'100%',objectFit:'cover'}} /></div>"
8
+ ## Background-Title
9
+ - component duration:2 jsx:"<div style={{background:'#733BBC',color:'#FFFFFF',width:'100%',height:'100%',display:'flex',alignItems:'center',justifyContent:'center',fontSize:44}}>A - AUTUMN TITLE</div>"
@@ -0,0 +1,13 @@
1
+ # video
2
+ seed:1758416490
3
+ width:640 height:480 fps:30 layout:series
4
+ subtitle:"https://neoy.qili2.com/files/markcut-review/video-a-v4.srt"
5
+
6
+ ## Opening-Blue
7
+ - component duration:2 jsx:"<div style={{background:'#174EA6',color:'#FFFFFF',width:'100%',height:'100%',display:'flex',alignItems:'center',justifyContent:'center',fontSize:36,fontWeight:'bold'}}>PREVIEW A - REMOTE URL TEST</div>"
8
+
9
+ ## Remote-Video
10
+ - component duration:2 jsx:"<video src='https://neoy.qili2.com/files/markcut-review/video-a-v4.mp4' autoPlay muted loop playsInline style={{width:'100%',height:'100%',objectFit:'cover'}} />"
11
+
12
+ ## Background-Title
13
+ - component duration:2 jsx:"<div style={{background:'#733BBC',color:'#FFFFFF',width:'100%',height:'100%',display:'flex',alignItems:'center',justifyContent:'center',fontSize:34}}>REMOTE AUDIO + VIDEO + SRT</div>"
@@ -0,0 +1,11 @@
1
+ 1
2
+ 00:00:00,000 --> 00:00:02,000
3
+ Opening: remote media test
4
+
5
+ 2
6
+ 00:00:02,000 --> 00:00:04,000
7
+ Video scene from NeoY URL
8
+
9
+ 3
10
+ 00:00:04,000 --> 00:00:06,000
11
+ Audio and transcript complete
@@ -0,0 +1,10 @@
1
+ WEBVTT
2
+
3
+ 00:00:00.000 --> 00:00:02.000
4
+ Opening: remote media test
5
+
6
+ 00:00:02.000 --> 00:00:04.000
7
+ Video scene from NeoY URL
8
+
9
+ 00:00:04.000 --> 00:00:06.000
10
+ Audio and transcript complete
@@ -0,0 +1,6 @@
1
+ # video
2
+ width:640 height:480 fps:30 layout:series
3
+ ## Mountain_B
4
+ - component duration:2 jsx:"<div style={{fontSize:64}}>B — Independent mountain preview</div>"
5
+ ## Mountain_End
6
+ - component duration:2 jsx:"<div style={{fontSize:64}}>B — Must stay independent from A</div>"
@@ -0,0 +1,6 @@
1
+ # video
2
+ width:640 height:480 fps:30 layout:series
3
+ ## Mountain-B
4
+ - component duration:2 jsx:"<div style={{fontSize:64}}>B — Independent mountain preview</div>"
5
+ ## Mountain-End
6
+ - component duration:2 jsx:"<div style={{fontSize:64}}>B — Must stay independent from A</div>"
@@ -0,0 +1,6 @@
1
+ # video
2
+ width:640 height:480 fps:30 layout:series
3
+ ## Mountain-Orange
4
+ - component duration:2 jsx:"<div style={{background:'#BD4B12',color:'#FFFFFF',width:'100%',height:'100%',display:'flex',alignItems:'center',justifyContent:'center',fontSize:52,fontWeight:'bold'}}>preview b - mountain</div>"
5
+ ## Mountain-End
6
+ - component duration:2 jsx:"<div style={{background:'#27442B',color:'#FFFFFF',width:'100%',height:'100%',display:'flex',alignItems:'center',justifyContent:'center',fontSize:50}}>b - independent</div>"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lalalic/markcut",
3
- "version": "3.2.14",
3
+ "version": "3.2.15",
4
4
  "description": "Markdown-to-video engine. Describe scenes in markdown, get a rendered video.",
5
5
  "bin": {
6
6
  "markcut": "bin/markcut"
@@ -23,6 +23,7 @@
23
23
  "templates": "node src/render/cli.mjs templates",
24
24
  "preview": "node src/render/cli.mjs preview",
25
25
  "mcp": "node src/mcp/server.mjs",
26
+ "build:mcp": "scripts/build-mcp-preview.sh",
26
27
  "verify": "node src/render/cli.mjs verify",
27
28
  "resolve": "node src/render/cli.mjs resolve",
28
29
  "render:pixelle": "remotion render examples/pixelle/index.tsx Root out/pixelle-asset-default.mp4 --props=./examples/pixelle/asset-default.json",
@@ -31,7 +32,7 @@
31
32
  "test": "vitest run --config tests/vitest.config.ts",
32
33
  "test:integration": "vitest run --config tests/vitest.config.ts tests/render.test.ts",
33
34
  "test:watch": "vitest --config tests/vitest.config.ts",
34
- "build": "scripts/build-pipeline.sh && scripts/build-player.sh",
35
+ "build": "scripts/build-pipeline.sh && scripts/build-player.sh && scripts/build-mcp-preview.sh",
35
36
  "vision": "node src/render/cli.mjs vision",
36
37
  "markcut": "bin/markcut",
37
38
  "push": "GIT_SSH_COMMAND=\"ssh -i ~/.ssh/id_ed25519_1 -o IdentitiesOnly=yes\" git push"
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ cd "$(dirname "$0")/.."
4
+ ./node_modules/.bin/esbuild src/mcp/remotion-app.tsx \
5
+ --bundle --minify --format=iife --platform=browser --target=es2020 \
6
+ --define:process.env.NODE_ENV='"production"' \
7
+ --outfile=src/mcp/remotion-app.bundle.js
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ # NeoY stdio entrypoint: load the user's login environment so the compiler
3
+ # receives GOOGLE_MAPS_API_KEY without embedding it in MCP config or JSON.
4
+ set -euo pipefail
5
+ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
6
+ exec /bin/zsh -lc 'exec node "$1"' _ "$ROOT/src/mcp/server.mjs"