@lightcone-ai/daemon 0.15.28 → 0.15.30
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.
|
@@ -1443,6 +1443,7 @@ export async function detailSections({
|
|
|
1443
1443
|
const totalDurationMs = sections.reduce((sum, item) => sum + item.dwell_ms, 0);
|
|
1444
1444
|
|
|
1445
1445
|
return {
|
|
1446
|
+
detail_sections_version: 1,
|
|
1446
1447
|
sections,
|
|
1447
1448
|
outro_video_id: toSafeString(strategy?.outro_video_id || strategy?.outroVideoId) || DEFAULT_OUTRO_VIDEO_ID,
|
|
1448
1449
|
total_duration_ms: totalDurationMs,
|
package/package.json
CHANGED
|
@@ -38,7 +38,14 @@ export async function launchChromiumMobile({
|
|
|
38
38
|
hasTouch = true,
|
|
39
39
|
headless = false,
|
|
40
40
|
channel = 'chrome',
|
|
41
|
-
launchArgs = [
|
|
41
|
+
launchArgs = [
|
|
42
|
+
'--no-sandbox',
|
|
43
|
+
'--disable-dev-shm-usage',
|
|
44
|
+
'--kiosk',
|
|
45
|
+
'--disable-infobars',
|
|
46
|
+
'--no-first-run',
|
|
47
|
+
'--no-default-browser-check',
|
|
48
|
+
],
|
|
42
49
|
playwrightModule = 'playwright',
|
|
43
50
|
launchOptions = {},
|
|
44
51
|
contextOptions = {},
|
package/src/chat-bridge.js
CHANGED
|
@@ -1472,7 +1472,7 @@ server.tool('record_url_narration',
|
|
|
1472
1472
|
'Record a silent video of a URL by orchestrating Xvfb + Chromium + ffmpeg, driven by a video plan. Outputs a silent mp4 plus an events.json timestamp log that compose_video can use to align audio segments.\n\nUse this as the canonical recording step for URL-narration videos. Falls back: if the page needs interactions outside the visual_action vocabulary (clicks, waits, OCR loops), use Monitor (Bash) with custom Playwright instead.\n\nRuntime requirements: this tool only works on a Linux daemon machine with Xvfb + ffmpeg (x11grab) + Chromium installed. macOS / Windows daemons will fail at startup.',
|
|
1473
1473
|
{
|
|
1474
1474
|
url: z.string().describe('Page URL to record'),
|
|
1475
|
-
plan: z.record(z.any()).describe('
|
|
1475
|
+
plan: z.record(z.any()).describe('Must be the full output from detail_sections (not plan_video). detail_sections output includes detail_sections_version, sections[], audio metadata, and dwell_ms per phase.'),
|
|
1476
1476
|
output_path: z.string().optional().describe('Workspace-relative output mp4 path. Default tmp/wx3_video/recorded-{ts}.mp4'),
|
|
1477
1477
|
events_path: z.string().optional().describe('Workspace-relative events.json path. Default ${output_path}.events.json'),
|
|
1478
1478
|
viewport: z.object({
|
|
@@ -1481,7 +1481,6 @@ server.tool('record_url_narration',
|
|
|
1481
1481
|
}).optional().describe('Default 1080x1920 (mobile portrait). Override only if the plan requires a different shape.'),
|
|
1482
1482
|
fps: z.number().optional().describe('Default 30. Do not change unless needed.'),
|
|
1483
1483
|
settle_ms: z.number().optional().describe('Default 4000. Settle wait after navigation before recording starts.'),
|
|
1484
|
-
page_zoom: z.number().optional().describe('Browser zoom factor applied before recording. Default 1.1 (10% zoom in). Set to 1.0 to disable. Plan Y coordinates are automatically scaled by this factor.'),
|
|
1485
1484
|
},
|
|
1486
1485
|
async (args) => {
|
|
1487
1486
|
if (isBlockedCvmaxEditorVideoTool('record_url_narration')) {
|
|
@@ -1512,7 +1511,7 @@ server.tool('compose_video',
|
|
|
1512
1511
|
text: z.string().describe('Subtitle text for this segment (the narration sentence).'),
|
|
1513
1512
|
start_ms: z.number().describe('Subtitle start time in milliseconds.'),
|
|
1514
1513
|
end_ms: z.number().describe('Subtitle end time in milliseconds.'),
|
|
1515
|
-
})).optional().describe('Subtitle segments to burn into the video. Pass each phase
|
|
1514
|
+
})).optional().describe('Subtitle segments to burn into the video. Pass each phase sentence text (from detail_sections sections[].sentence) with cumulative start/end time derived from dwell_ms. Omit to produce no subtitles.'),
|
|
1516
1515
|
outro_path: z.string().optional().describe('Optional outro mp4 path. If omitted, uses ~/.lightcone/assets/outros/default.mp4 when present.'),
|
|
1517
1516
|
target: z.enum(['short_video_cn', 'douyin', 'xhs']).optional().describe('Transcode target profile. Defaults to short_video_cn.'),
|
|
1518
1517
|
},
|
|
@@ -48,6 +48,19 @@ function derivePhaseCount({ plan, recorderOutput }) {
|
|
|
48
48
|
return null;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
const PIPELINE_SENTINEL_KEY = 'detail_sections_version';
|
|
52
|
+
|
|
53
|
+
function assertPipelineCompliance(plan) {
|
|
54
|
+
if (!isPlainObject(plan)) return;
|
|
55
|
+
if (!plan[PIPELINE_SENTINEL_KEY]) {
|
|
56
|
+
throw new Error(
|
|
57
|
+
'pipeline_violation: plan must come from detail_sections output. '
|
|
58
|
+
+ 'Required pipeline: analyze_page → plan_video → detail_sections → record_url_narration → compose_video → submit_to_library. '
|
|
59
|
+
+ 'Do not hand-write phases or bypass detail_sections.'
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
51
64
|
export function validateRecordUrlNarrationArgs(args = {}) {
|
|
52
65
|
const normalizedUrl = normalizeText(args.url);
|
|
53
66
|
if (!normalizedUrl) {
|
|
@@ -113,6 +126,12 @@ export async function runRecordUrlNarrationTool({
|
|
|
113
126
|
return toolError(`Error: ${error.message}`);
|
|
114
127
|
}
|
|
115
128
|
|
|
129
|
+
try {
|
|
130
|
+
assertPipelineCompliance(validatedInput.plan);
|
|
131
|
+
} catch (error) {
|
|
132
|
+
return toolError(`Error: ${error.message}`);
|
|
133
|
+
}
|
|
134
|
+
|
|
116
135
|
try {
|
|
117
136
|
const result = await runMandatoryLocalToolFn({
|
|
118
137
|
toolName: 'record_url_narration',
|
|
@@ -141,7 +160,6 @@ export async function runRecordUrlNarrationTool({
|
|
|
141
160
|
viewport: finalInput.viewport,
|
|
142
161
|
fps: finalInput.fps,
|
|
143
162
|
settle_ms: finalInput.settle_ms,
|
|
144
|
-
page_zoom: finalInput.page_zoom,
|
|
145
163
|
});
|
|
146
164
|
|
|
147
165
|
return {
|