@lalalic/markcut 3.2.18 → 3.2.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lalalic/markcut",
3
- "version": "3.2.18",
3
+ "version": "3.2.20",
4
4
  "description": "Markdown-to-video engine. Describe scenes in markdown, get a rendered video.",
5
5
  "bin": {
6
6
  "markcut": "bin/markcut"
@@ -78,10 +78,18 @@ npx @lalalic/markcut spots --waypoints "lat,lng;lat,lng" # discover POIs along a
78
78
 
79
79
  ---
80
80
 
81
+ ## Preview troubleshooting
82
+
83
+ For native previews, Maps, playback, audio/subtitles or hosted ChatGPT MCP iframe issues, load [Preview Troubleshooting](references/preview-troubleshooting.md). Treat native playback, MCP compilation and hosted iframe rendering as separate verification gates.
84
+
81
85
  ## MCP Video Preview and Human Review (Player v24)
82
86
 
83
87
  Use the model-visible `markcut.preview({path})` tool when a human needs to **watch and review a Markcut video** in ChatGPT. It is a video player, **not** a generic Markdown renderer and not the same as the local `npx @lalalic/markcut preview <file>` command.
84
88
 
89
+ - **Early review:** Visioner, Director or another upstream agent may create a **temporary**
90
+ Markcut `video.md` from permitted source clips to preview candidate material or a rough
91
+ sequence before the canonical edit exists. Keep it separate from final production files;
92
+ feedback guides the current agent and does not approve the eventual final video.
85
93
  - Supply an absolute `.md` path (or a supported NeoY mounted HTTPS Markdown URL). An optional `relay` object correlates an Agents Relay task but is not needed for standalone review.
86
94
  - The MCP call returns promptly with an asynchronous compilation operation. The hosted iframe shows actual compilation stages, then loads a published immutable compiled JSON and media snapshot. There is no persistent player-manager process.
87
95
  - Player controls include Play/Pause, Seek, volume/audio, fullscreen and a **horizontal clickable scene list** sourced from compiled scene metadata. The title bar displays **Markcut · video title**, a **Browser TTS** switch, and the player version at right.
@@ -0,0 +1,58 @@
1
+ # Markcut native/MCP preview troubleshooting
2
+
3
+ Use for Markcut map, route, cinematic, playback, audio, subtitle, blank iframe and MCP App issues. **Do not equate compiled preview metadata with verified rendering.** Read the bound project's AGENTS/README and the Browser Workspace skill first; load XChat bootstrap only in XChat-managed sessions. For Relay-managed work, reuse the existing Job/Task/PR rather than creating duplicates.
4
+
5
+ ## Workspace and native preview
6
+
7
+ All episode/demo files and evidence must stay in a named vlog run, e.g. PROJECT/vlog/runs/episode-preview-validation/{video.md,source-manifest.json,qa.md,assets/,output/,reviews/}. Avoid scattering templates. Keep original GPS private and distinguish observed photo stops from inferred connecting routes. Shared player changes belong in an isolated Markcut Git worktree.
8
+
9
+ Start native Markcut with the **same absolute video.md** used later for MCP:
10
+
11
+ cd <markcut-repo>
12
+ node src/render/cli.mjs preview <project-repo>/vlog/runs/<run>/video.md --port=3014 --no-browser
13
+
14
+ Use a managed shell session for long-running sessions; stop only the debug process you started. Avoid localhost:3000/Root: that is **Remotion Studio**, not the native Markcut player. Historically even "markcut preview --help" unexpectedly launched Studio.
15
+
16
+ Start a dedicated Browser Workspace session: webhelm session start --url http://localhost:3014/; use webhelm session exec <session-id> with page_info(), snapshot(), js(), and cdp(). Inspect **actual** visuals, play/pause/seek, Google tiles, markers, polyline, route movement and cinematic camera. For a 12-second route demo, inspect 6–9s for route and 9–12s for cinematic; for other videos use their actual scene boundaries. Save screenshots in the run's output/. Differences in pixels can support animation evidence but do not prove route correctness. Inspect VTT text, audio element readyState/paused/muted/currentTime and verify audible sound separately.
17
+
18
+ If time freezes, inspect document.visibilityState: background Chrome tabs may be throttled. Use cdp("Page.bringToFront") and retest. Inspect window.remotion_delayRenderHandles and remotion_renderReady, but do not infer deadlock from a hidden tab alone.
19
+
20
+ ## Browser Workspace DevTools
21
+
22
+ Install a console capture **before navigating**, then check after the relevant scene loads:
23
+
24
+ cdp("Page.addScriptToEvaluateOnNewDocument", source="""
25
+ window.__markcutErrors=[];
26
+ for(const level of ['error','warn']) {
27
+ const original=console[level];
28
+ console[level]=function(...args) {
29
+ window.__markcutErrors.push({level,message:args.map(String).join(' ')});
30
+ return original.apply(this,args);
31
+ };
32
+ }
33
+ """)
34
+ goto_url("http://localhost:3014/")
35
+ print(js("window.__markcutErrors"))
36
+
37
+ Save these Python statements in a file and use webhelm session exec <id> --code-file <path> when quoting is difficult. For DevTools/Network use cdp() and sanitized resource entries; **never print Google key= query values**, access tokens, private coordinates or cookies.
38
+
39
+ Observed signatures:
40
+ - ApiNotActivatedMapError: confirm API key's Google Cloud project, enable Maps JavaScript API on that project; inspect billing/referrer permissions based on evidence.
41
+ - Legacy Directions Service not enabled + DIRECTIONS_ROUTE REQUEST_DENIED: modernize from DirectionsService to google.maps.routes.Route.computeRoutes and enable Routes API for the owning Cloud project. Routes API may incur costs. Check ComputeRoutes RPC status **and** actual rendered path. Cache identical requests across Remotion seek/remount to reduce bills.
42
+ - DirectionsService deprecated or Remotion license warning alone is not the root cause. HTTP 200 and a static image do not prove an animated route.
43
+
44
+ ## MCP tool and fresh ChatGPT thread/turn
45
+
46
+ Only after native preview passes, call the **actual NeoY markcut.preview** on that same absolute run video.md. Confirm returned resource URI/player version, revision/content hash, scene duration, map props, audio/VTT. This is a **compilation/resource gate**, not hosted-player approval.
47
+
48
+ For fresh MCP verification, when available use the NeoY chatgpt.thread capability (synchronous platform CLI), record verified thread ID and URL; an existing thread can use chatgpt.turn when suitable. Tell the new thread to call markcut.preview, **describe the image and play/seek 6–12 seconds in its own embedded player**, report errors, and **not approve**. Use a new thread for stale preview resource/cache, iframe isolation, or version testing. A thread still generating or displaying "Connection interrupted" may not have mounted the MCP App. Never claim map failure when only a DIL iframe exists: record "hosted iframe not instantiated" and retry/reload conservatively.
49
+
50
+ Open the resulting ChatGPT URL in an **exclusive Browser Workspace session**. Confirm iframe[title="Markcut Preview"], not just localhost. Via cdp("Target.getTargets") identify the web-sandbox.oaiusercontent.com **iframe target**. The actual Markcut DOM can be in that target's nested same-origin about:blank iframe. Use js(expression,target_id=<iframe-target>) to inspect nestedFrame.contentDocument, its body, buttons, .gm-style, map tiles, VTT/audio and errors. Do not bypass cross-origin protections. Observe actual picture at 6–9 and 9–12 seconds, and real pause/seek, not just DOM metadata. Never click Approve or Request changes for a diagnostic.
51
+
52
+ Capture nested iframe Console errors and Network failure statuses. Inspect effective outer sandbox response/host CSP as well as nested document: no CSP meta in about:blank **does not** prove Google Maps is allowed.
53
+
54
+ **2026-10-15 observed MCP-only failure:** native player showed Google tiles and Route.computeRoutes HTTP 200, whereas fresh hosted iframe Console repeatedly said "The Google Maps JavaScript API failed to load. Error: The Google Maps JavaScript API could not load." At ~6–7s it showed zero map nodes/tiles and repeated Maps JS requests. The exact CSP/network rejection was **not proven**. Do not mark MCP fixed because native passes.
55
+
56
+ ## Verification evidence and cleanup
57
+
58
+ Record native / MCP compiler / hosted iframe as independent PASS/FAIL/UNKNOWN gates in the run's qa.md. Include UTC/local timestamp, commit/build version, thread ID, session ID, source video.md, scene time range, screenshots, sanitized errors/status, tests, unresolved blockers. Keep private GPS and keys out of logs and public mounts. After a fix rebuild Markcut native player and MCP bundle, verify deployed resource/version, repeat browser checks in a fresh thread if cache persists. Relay still owns task review/completion and approval is separate. Always webhelm session stop <id>, close exclusive tabs, and stop only your debug process.