@lalalic/markcut 3.2.55 → 3.2.57
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 +1 -1
- package/skills/markcut/SKILL.md +2 -1
- package/skills/markcut/docs/map-dynamic-camera.md +20 -0
- package/src/descriptive/compiler.ts +3 -0
- package/src/descriptive/dsl.ts +5 -0
- package/src/descriptive/markdown.ts +2 -1
- package/src/mcp/bridge.mjs +16 -11
- package/src/mcp/mobile-review-cli.mjs +4 -9
- package/src/mcp/preview.mjs +5 -1
- package/src/mcp/remotion-app.bundle.js +394 -395
- package/src/mcp/review-delivery.mjs +5 -7
- package/src/mcp/server.mjs +12 -6
- package/src/player/pipeline.mjs +83 -76
- package/src/render/cli.mjs +13 -3
- package/src/render/google-map-health.mjs +10 -0
- package/src/schema/index.ts +5 -0
- package/src/types/Map.tsx +28 -37
- package/src/utils/route-legs.ts +47 -8
- package/tests/google-map-dsl-validity.test.ts +13 -0
- package/tests/map-route-animation-dsl.test.ts +9 -0
- package/tests/mcp-preview-bridge.test.ts +23 -6
- package/tests/mcp-preview-delivery.test.ts +5 -7
- package/tests/mcp-preview.test.ts +6 -0
- package/tests/mobile-preview-cli.test.ts +4 -4
- package/tests/render-native-google-map.test.ts +39 -0
- package/tests/route-legs.test.ts +34 -0
package/package.json
CHANGED
package/skills/markcut/SKILL.md
CHANGED
|
@@ -15,6 +15,7 @@ Markcut turns a Markdown video definition into a compiled stream tree and a play
|
|
|
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
16
|
| Quickly assess story structure | `markcut preview <file> --storyboard` (placeholder media, not a final-video quality check). |
|
|
17
17
|
| Watch a native work-in-progress video | `markcut preview <file>`; test real visuals, sound, and seeking. |
|
|
18
|
+
| Watch a hosted preview without reviewing | Call `markcut.preview({path,readonly:true})`; no approval, comment submission, Git checkpoint, Relay change, or iPhone review request. |
|
|
18
19
|
| Ask a person to review in ChatGPT | Call the available `markcut.preview({path})` tool; handle revision-specific feedback and approval. |
|
|
19
20
|
| 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. |
|
|
20
21
|
| Deliver a finished MP4 | `markcut render <file> --output <path>`; inspect the resulting video and sound. |
|
|
@@ -56,7 +57,7 @@ Asset paths are relative to the Markdown document. A `prompt` without `src` asks
|
|
|
56
57
|
|
|
57
58
|
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.
|
|
58
59
|
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.
|
|
59
|
-
3. **Human review gate:** Use Neo's `markcut.preview({path: "/absolute/path/video.md"})` when the user wants the hosted ChatGPT video player. This is **not** the CLI preview. 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.
|
|
60
|
+
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.
|
|
60
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).
|
|
61
62
|
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.
|
|
62
63
|
|
|
@@ -326,3 +326,23 @@ layout:parallel
|
|
|
326
326
|
- **Media assets** — photo thumbnails (`waypoint.media`), images, bgm etc. should live in the md file's folder (e.g. `assets/...`). See the asset-path rules in `markdown-descriptive.md` §14 (verify enforces md-folder-relative paths).
|
|
327
327
|
- **Don't set duration from script length** — the resolver computes it from TTS audio.
|
|
328
328
|
- **3D (Map3D)** is experimental and opt-in (`cinematic.fallback:"none"`); the default `fallback:"2d"` gives the safe drone-chase look.
|
|
329
|
+
|
|
330
|
+
## Google Maps four-view production gate (2026-11-11)
|
|
331
|
+
|
|
332
|
+
When working with native Google maps, prefer `view:overview|route|cinematic|streetview` directly in the authoritative `video.md`, rather than replacing them with schematic visuals. Use the source-linked Vlog GPS waypoints; never invent a track. A four-scene tested authoring reference lives in Vlog `templates/google-map-four-scenes.md`. The Google `streetview` node uses Maps JavaScript `StreetViewPanorama`, **not** the separately enabled Street View Static REST API.
|
|
333
|
+
|
|
334
|
+
**Fixed root cause:** Hosted Preview already stamped `GOOGLE_MAPS_API_KEY` during compilation, but `markcut render`'s Markdown pipeline previously called `compileDescriptiveRoot(final)` without options, leaving native maps unkeyed. The CLI now supplies `{googleMapsApiKey:process.env.GOOGLE_MAPS_API_KEY}` and refuses an unkeyed native map or fatal Google/Routes render error. The produced H.264 container alone is not proof that Google tiles, computed route or panorama are visible. Inspect real moving preview frames and confirm each view individually.
|
|
335
|
+
|
|
336
|
+
**Critical differences:** `route` is Google-computed navigational path between observed GPS positions, *not* proof of which road the creator traveled. `cinematic` defaults to 2D Google satellite pan/tilt/heading rather than actual drone/3D terrain. `streetview` needs a covered nearby panorama, otherwise the scene is invalid for that spot. For four-mode Vlog scenes, use `markcut verify /absolute/video.md` then the Neo-hosted `markcut.preview` UI. Its internal MP4 map cache is a playback optimization and must never replace the editable Markdown deliverable. Check Google Maps JavaScript API billing, restrictions, quotas and Routes API permissions before live rendering; preserve provider attribution and content-use terms for any public video.
|
|
337
|
+
|
|
338
|
+
### 9:16 framing and human-paced route animation
|
|
339
|
+
|
|
340
|
+
For native Google `view:route`, the camera auto-fits the **full provider-returned road polyline** when available, with 19% padding for vertical mobile layouts; it falls back to fit filmed GPS stops while waiting for Google Routes. Do not set `zoom`/`center` on this mode unless you intentionally override the fit. Google road detours can extend outside the source stop bounds. Travel marker positions interpolate along polyline **distance**, not vertex indices, to avoid jerky movement. Route duration is **editorial screen time**; Google leg duration merely determines the proportions of time allocated to individual legs.
|
|
341
|
+
|
|
342
|
+
```md
|
|
343
|
+
## Map-Route
|
|
344
|
+
layout:parallel
|
|
345
|
+
- map view:route mapType:roadmap duration:8 routeAnimation:{startHold:0.5,endHold:0.7,easing:easeInOut} waypoints:[45.3,-75.9,"A";45.33,-75.87,"B"]
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
This holds 0.5s at the start, animates the road route with gently eased start/finish, and holds 0.7s at the destination. If a map has children with `at:"Stop"` + timed duration (explicit intermediate dwell), the marker holds at the chosen stop and uses linear travel in the remaining time to keep manual stop times aligned. `fps:24` or `fps:30` produces smoother map footage than 12fps test renders. Cinematic remains a follow camera; consider `headingFollow:false` and a slow heading tween at sharp turns. Always keep original Google Maps branding, legal attribution and required map data notices visible; do not hide them in CSS, crop them out, or place captions over them.
|
|
@@ -163,6 +163,7 @@ export interface DescriptiveMap extends DescriptiveBaseNode {
|
|
|
163
163
|
region?: string;
|
|
164
164
|
travelMode?: "DRIVING" | "WALKING" | "BICYCLING" | "TRANSIT";
|
|
165
165
|
routeMarker?: string;
|
|
166
|
+
routeAnimation?: {startHold?: number; endHold?: number; easing?: "linear" | "easeInOut"};
|
|
166
167
|
camera?: {
|
|
167
168
|
zoom?: DescriptiveTweenable;
|
|
168
169
|
center?: { lat: DescriptiveTweenable; lng: DescriptiveTweenable };
|
|
@@ -658,6 +659,7 @@ function compileLeaf(node: Exclude<DescriptiveNode, DescriptiveContainer | Descr
|
|
|
658
659
|
region: node.region,
|
|
659
660
|
travelMode: node.travelMode ?? "DRIVING",
|
|
660
661
|
routeMarker: node.routeMarker ?? "🚗",
|
|
662
|
+
routeAnimation: node.routeAnimation,
|
|
661
663
|
camera: node.camera,
|
|
662
664
|
cinematic: node.cinematic,
|
|
663
665
|
streetView: node.streetView,
|
|
@@ -943,6 +945,7 @@ function compileMap(
|
|
|
943
945
|
region: node.region,
|
|
944
946
|
travelMode: node.travelMode ?? "DRIVING",
|
|
945
947
|
routeMarker: node.routeMarker ?? "🚗",
|
|
948
|
+
routeAnimation: node.routeAnimation,
|
|
946
949
|
camera: node.camera,
|
|
947
950
|
cinematic: node.cinematic,
|
|
948
951
|
streetView: node.streetView,
|
package/src/descriptive/dsl.ts
CHANGED
|
@@ -496,6 +496,11 @@ export function parseKeyValueTokens(
|
|
|
496
496
|
// If the value looks like an inline JSON object/array, parse it as props
|
|
497
497
|
if (strVal.startsWith("{") || strVal.startsWith("[")) {
|
|
498
498
|
val = parseProps(strVal);
|
|
499
|
+
if (["camera", "cinematic", "streetView"].includes(key) &&
|
|
500
|
+
strVal.trim() !== "{}" && typeof val === "object" && val !== null &&
|
|
501
|
+
!Array.isArray(val) && Object.keys(val).length === 0) {
|
|
502
|
+
fail(`invalid structured ${key} value`, { ...ctx, token });
|
|
503
|
+
}
|
|
499
504
|
} else {
|
|
500
505
|
val = parseNumberMaybe(strVal);
|
|
501
506
|
}
|
|
@@ -101,7 +101,7 @@ function preserveVariantAttrs(node: Record<string, unknown>, attrs: Record<strin
|
|
|
101
101
|
"foreground", "visible", "isBackground", "instruction", "style", "effects", "on",
|
|
102
102
|
"spots", "waypoints", "routeColor", "routeWeight", "routeMarker",
|
|
103
103
|
"travelMode", "zoom", "center", "mapType", "data", "prompt",
|
|
104
|
-
"view", "camera", "cinematic", "streetView",
|
|
104
|
+
"view", "camera", "cinematic", "streetView", "routeAnimation",
|
|
105
105
|
"name", "title", "transition", "transitionTime", "layout",
|
|
106
106
|
"componentName", "props", "speaker", "isNarration",
|
|
107
107
|
]);
|
|
@@ -342,6 +342,7 @@ function parseNodeLine(content: string, lineNum?: number): DescriptiveNode {
|
|
|
342
342
|
start: attrs.start as any,
|
|
343
343
|
view: attrs.view as any,
|
|
344
344
|
routeMarker: attrs.routeMarker as any,
|
|
345
|
+
routeAnimation: attrs.routeAnimation as any,
|
|
345
346
|
travelMode: attrs.travelMode as any,
|
|
346
347
|
routeColor: attrs.routeColor as any,
|
|
347
348
|
routeWeight: attrs.routeWeight as any,
|
package/src/mcp/bridge.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export function buildPreviewBridgeScript() {
|
|
2
2
|
return `
|
|
3
3
|
const feedback=document.getElementById('feedback'),status=document.getElementById('status'),pathLabel=document.getElementById('path-label');
|
|
4
|
-
let nextId=0,identity=null,busy=false,expectedPath=null,activePath=null,activeRelay=null,activeReview={delivery:"text"},expectedDelivery="text",submittedRevision=null,submission=null;
|
|
4
|
+
let nextId=0,identity=null,busy=false,expectedPath=null,activePath=null,activeRelay=null,activeReview={delivery:"text"},expectedDelivery="text",expectedReadonly=false,submittedRevision=null,submission=null;
|
|
5
5
|
const comments=[];
|
|
6
6
|
let currentScene={sceneId:null,sceneName:null,sceneStart:0,timeSeconds:0},selectedId=0,nextCommentId=0;
|
|
7
7
|
const mode=document.getElementById('comment-mode');
|
|
8
|
+
const isViewOnly=()=>expectedReadonly||activeReview?.readonly===true;
|
|
8
9
|
const sceneKey=c=>String(c?.sceneName||c?.sceneId||'Overall');
|
|
9
10
|
function updateDeliveryMode(){
|
|
10
11
|
const el=document.getElementById('review-delivery-mode');
|
|
11
12
|
if(!el)return;
|
|
12
|
-
// Never claim a bound Event destination until the authoritative provider
|
|
13
|
-
// result actually supplies the authenticated event template.
|
|
14
13
|
const bound=activeReview?.delivery==='event'&&Boolean(activeReview.eventTemplate);
|
|
14
|
+
if(isViewOnly()){el.textContent='Read-only mode';el.title='Watch without submitting review';return;}
|
|
15
15
|
el.textContent=bound?'Event mode':expectedDelivery==='event'?'Event mode · unavailable':'Text mode';
|
|
16
16
|
el.title=bound?'Review decisions publish via the bound Events provider':
|
|
17
17
|
expectedDelivery==='event'?'Waiting for authenticated event delivery configuration':
|
|
@@ -130,6 +130,7 @@ function applyToolInput(params){
|
|
|
130
130
|
if(typeof input.path!=='string')return;
|
|
131
131
|
expectedPath=input.path;
|
|
132
132
|
expectedDelivery=input.review?.delivery==='event'?'event':'text';
|
|
133
|
+
expectedReadonly=input.readonly===true;
|
|
133
134
|
updateDeliveryMode();
|
|
134
135
|
// The selection has no authority to change delivery; only the compiled
|
|
135
136
|
// operation result supplies the provider-bound review configuration.
|
|
@@ -152,11 +153,11 @@ function eventEnvelope(template,review){
|
|
|
152
153
|
const match=template.source.match(/^job\\/([^/]+)\\/task\\/([^/]+)\\/execution\\/([^/]+)$/);
|
|
153
154
|
const fixed=template.data.interactive;
|
|
154
155
|
if(!match || !fixed || fixed.jobId!==match[1] || fixed.taskId!==match[2] ||
|
|
155
|
-
fixed.executionId!==match[3] ||
|
|
156
|
-
['decision','feedback','comments','revision','revisionId','contentHash','commitSha','previewId','requestId','idempotencyKey']
|
|
156
|
+
fixed.executionId!==match[3] ||
|
|
157
|
+
['decision','feedback','comments','revision','revisionId','contentHash','commitSha','invocationId','previewId','requestId','idempotencyKey']
|
|
157
158
|
.some(key=>Object.prototype.hasOwnProperty.call(fixed,key)))throw new Error('Invalid bound interactive decision');
|
|
158
159
|
return {type:template.type,source:template.source,data:{...template.data,interactive:{
|
|
159
|
-
...fixed,
|
|
160
|
+
...fixed,
|
|
160
161
|
previewId:review.previewId,requestId:review.requestId,decision:review.decision,
|
|
161
162
|
feedback:review.feedback||review.comments.map(c=>c.text).join('\\n'),
|
|
162
163
|
comments:review.comments,idempotencyKey:review.idempotencyKey
|
|
@@ -164,8 +165,7 @@ function eventEnvelope(template,review){
|
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
async function sendReviewEvent(result){
|
|
167
|
-
if(
|
|
168
|
-
result.commitSha=activeReview.commitSha;
|
|
168
|
+
if(!activeReview.eventTemplate)throw new Error('Review event template unavailable');
|
|
169
169
|
const event=eventEnvelope(activeReview.eventTemplate,result);
|
|
170
170
|
// MCP Apps tools/call is host-mediated; an unavailable or unauthorized Events
|
|
171
171
|
// provider MUST fail, never be substituted with ui/message.
|
|
@@ -233,8 +233,13 @@ async function currentRevisionMatches(path,hash){
|
|
|
233
233
|
return latest.contentHash===hash && (!latest.requestId || !identity?.requestId || latest.requestId===identity.requestId);
|
|
234
234
|
}
|
|
235
235
|
function reviewReadonly(readonly,message){
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
const viewOnly=isViewOnly();
|
|
237
|
+
for(const id of ['approve','changes']){
|
|
238
|
+
const button=document.getElementById(id);
|
|
239
|
+
button.disabled=viewOnly||readonly;
|
|
240
|
+
button.style.display=viewOnly?'none':'';
|
|
241
|
+
}
|
|
242
|
+
document.getElementById('comment-entry').style.display=viewOnly?'none':'';
|
|
238
243
|
if(readonly&&message)status.textContent=message;
|
|
239
244
|
}
|
|
240
245
|
async function renderRevision(data){
|
|
@@ -296,7 +301,7 @@ async function initialize(){
|
|
|
296
301
|
catch(e){status.textContent=e.message||'MCP initialization failed';}
|
|
297
302
|
}
|
|
298
303
|
async function submit(decision){
|
|
299
|
-
if(busy)return;
|
|
304
|
+
if(busy||isViewOnly())return;
|
|
300
305
|
if(document.getElementById(decision==='approved'?'approve':'changes').disabled){
|
|
301
306
|
status.textContent='Review disabled for this revision or delivery configuration.';return;
|
|
302
307
|
}
|
|
@@ -10,20 +10,17 @@ const delay = ms => new Promise(done => setTimeout(done,ms));
|
|
|
10
10
|
|
|
11
11
|
export function parseEventPreviewOptions(argv) {
|
|
12
12
|
if (argv[0] !== 'preview' || !argv[1] || argv[1].startsWith('--')) throw new Error('Usage: markcut preview <file.md> --delivery event --event-template <file.json>');
|
|
13
|
-
const allowed=new Set(['--delivery','--event-template','--timeout-ms'
|
|
13
|
+
const allowed=new Set(['--delivery','--event-template','--timeout-ms']);
|
|
14
14
|
const options={file:resolve(argv[1])};
|
|
15
15
|
for(let i=2;i<argv.length;i+=2){
|
|
16
16
|
const flag=argv[i],value=argv[i+1];
|
|
17
17
|
if(!allowed.has(flag) || !value || value.startsWith('--'))throw new Error('Missing or unsupported preview event flag: '+flag);
|
|
18
|
-
const key={'--delivery':'delivery','--event-template':'eventTemplatePath','--timeout-ms':'timeoutMs'
|
|
18
|
+
const key={'--delivery':'delivery','--event-template':'eventTemplatePath','--timeout-ms':'timeoutMs'}[flag];
|
|
19
19
|
if(Object.hasOwn(options,key))throw new Error('Duplicate flag: '+flag);
|
|
20
20
|
options[key]=value;
|
|
21
21
|
}
|
|
22
22
|
if(!['text','event'].includes(options.delivery) || (options.delivery==='event')!==Boolean(options.eventTemplatePath))
|
|
23
23
|
throw new Error('Event delivery requires --event-template; Text delivery must omit it');
|
|
24
|
-
if(options.delivery==='event' && !/^[a-f0-9]{40}$/.test(options.commitSha||''))
|
|
25
|
-
throw new Error('Event review requires --commit-sha with full 40-character Git SHA');
|
|
26
|
-
if(options.delivery==='text' && options.commitSha)throw new Error('Text previews do not bind a Git Commit SHA');
|
|
27
24
|
const limit=options.timeoutMs===undefined ? 300000 : Number(options.timeoutMs);
|
|
28
25
|
if(!Number.isSafeInteger(limit) || limit<1000 || limit>1800000)throw new Error('--timeout-ms must be 1000..1800000');
|
|
29
26
|
options.timeoutMs=limit;
|
|
@@ -57,8 +54,6 @@ export function buildReviewRequest(options,config,state,operationId){
|
|
|
57
54
|
throw Error('Compiled Preview has no immutable revision identity');
|
|
58
55
|
const request={id:operationId,previewId:data.id,title:basename(options.file,'.md'),delivery:config.delivery};
|
|
59
56
|
if(config.delivery==='event'){
|
|
60
|
-
if(!/^[a-f0-9]{40}$/.test(options.commitSha||''))throw Error('Git Commit SHA required for Event Review');
|
|
61
|
-
request.commitSha=options.commitSha;
|
|
62
57
|
request.mediaHash=data.contentHash; // Transport-only lookup for the compiled player, never the review identity.
|
|
63
58
|
const fixed=config.eventTemplate.data.interactive;
|
|
64
59
|
request.eventTemplate=config.eventTemplate;
|
|
@@ -84,7 +79,7 @@ export async function submitNeoReview(request,{fetchImpl=fetch,url=neoReviewEndp
|
|
|
84
79
|
|
|
85
80
|
export async function runMobilePreview(argv){
|
|
86
81
|
const opts=parseEventPreviewOptions(argv);
|
|
87
|
-
const config=opts.delivery==='event' ? normalizeReviewConfig({delivery:'event',
|
|
82
|
+
const config=opts.delivery==='event' ? normalizeReviewConfig({delivery:'event',
|
|
88
83
|
eventTemplate:JSON.parse(readFileSync(resolve(opts.eventTemplatePath),'utf8'))}) : {delivery:'text'};
|
|
89
84
|
const [{startCompileOperation},{EXPORT_ROOT}]=await Promise.all([
|
|
90
85
|
import('./compile-operation.mjs'),import('./remote-assets.mjs'),
|
|
@@ -103,7 +98,7 @@ export async function runMobilePreview(argv){
|
|
|
103
98
|
const request=buildReviewRequest(opts,config,state,operation.operationId);
|
|
104
99
|
const receipt=await submitNeoReview(request);
|
|
105
100
|
return {status:'review_requested',operationId:operation.operationId,requestId:request.id,
|
|
106
|
-
...(opts.delivery==='event' ? {
|
|
101
|
+
...(opts.delivery==='event' ? {} : {contentHash:state.result.contentHash,revisionId:state.result.revisionId}),
|
|
107
102
|
...(config.delivery==='event' ? {jobId:config.eventTemplate.data.interactive.jobId} : {}),
|
|
108
103
|
delivery:config.delivery,notification:receipt.accepted?'apns_submitted':'inbox_stored'};
|
|
109
104
|
}
|
package/src/mcp/preview.mjs
CHANGED
|
@@ -9,10 +9,11 @@ import { externalizePreviewMedia, publicOrigin, resolveMountedFile, resolvePrevi
|
|
|
9
9
|
import {fingerprintInputs} from "./source-fingerprint.mjs";
|
|
10
10
|
|
|
11
11
|
export const TOOL_NAME = "markcut.preview";
|
|
12
|
-
export const RESOURCE_URI = "ui://markcut/video-preview-
|
|
12
|
+
export const RESOURCE_URI = "ui://markcut/video-preview-v46.html";
|
|
13
13
|
const PREVIEW_VERSION = RESOURCE_URI.match(/video-preview-(v\d+)/)?.[1] ?? "unknown";
|
|
14
14
|
// Legacy entrypoints remain registered, but serve the current implementation.
|
|
15
15
|
export const LEGACY_RESOURCE_URIS = [
|
|
16
|
+
"ui://markcut/video-preview-v45.html",
|
|
16
17
|
"ui://markcut/video-preview-v44.html",
|
|
17
18
|
"ui://markcut/video-preview-v3.html",
|
|
18
19
|
"ui://markcut/video-preview-v4.html",
|
|
@@ -121,6 +122,9 @@ export async function readPreviewAudio(path) {
|
|
|
121
122
|
const markdown = await readFile(path, "utf8");
|
|
122
123
|
const match = markdown.match(/^audio:\s*([^\r\n]+)\s*$/m);
|
|
123
124
|
const filename = match ? match[1].trim() : `${basename(path, ".md")}.wav`;
|
|
125
|
+
// Hidden generated Markdown has no implicit sibling audio; explicit audio
|
|
126
|
+
// declarations still use the normal safe-local-filename validation.
|
|
127
|
+
if (!match && filename.startsWith(".")) return {};
|
|
124
128
|
if (!/^[\w. -]+\.(wav|mp3|m4a|ogg)$/i.test(filename) || filename.startsWith(".")) throw new Error("audio must be a local audio filename in the Markdown directory");
|
|
125
129
|
const file = resolve(dirname(path), filename);
|
|
126
130
|
try { await access(file, fsConstants.R_OK); } catch (e) { if (!match && e.code === "ENOENT") return {}; throw e; }
|