@rubytech/create-maxy-code 0.1.557 → 0.1.558
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/payload/platform/plugins/admin/PLUGIN.md +2 -1
- package/payload/platform/plugins/admin/mcp/dist/content-producer-authoring-skills.d.ts +1 -1
- package/payload/platform/plugins/admin/mcp/dist/content-producer-authoring-skills.d.ts.map +1 -1
- package/payload/platform/plugins/admin/mcp/dist/content-producer-authoring-skills.js +7 -0
- package/payload/platform/plugins/admin/mcp/dist/content-producer-authoring-skills.js.map +1 -1
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +43 -1
- package/payload/platform/plugins/admin/skills/video-production/SKILL.md +106 -0
- package/payload/platform/plugins/admin/skills/video-production/__tests__/registration.sh +54 -0
- package/payload/platform/plugins/admin/skills/video-production/references/reel-authoring.md +83 -0
- package/payload/platform/plugins/admin/skills/video-production/render.mjs +429 -0
- package/payload/platform/plugins/admin/skills/whats-new/SKILL.md +7 -0
- package/payload/platform/plugins/docs/PLUGIN.md +1 -0
- package/payload/platform/plugins/docs/references/video-production.md +37 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +32 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
- package/payload/platform/templates/specialists/agents/content-producer.md +8 -0
- package/payload/server/public/assets/{AdminLoginScreens-DrF7rAcb.js → AdminLoginScreens-BUv_EOfw.js} +1 -1
- package/payload/server/public/assets/AdminLoginScreens-BUv_EOfw.js.br +0 -0
- package/payload/server/public/assets/AdminLoginScreens-BUv_EOfw.js.gz +0 -0
- package/payload/server/public/assets/{admin-CCB9k3GB.js → admin-BUor8KRy.js} +1 -1
- package/payload/server/public/assets/admin-BUor8KRy.js.br +0 -0
- package/payload/server/public/assets/admin-BUor8KRy.js.gz +0 -0
- package/payload/server/public/assets/chat-D7LjNerV.js +1 -0
- package/payload/server/public/assets/chat-D7LjNerV.js.br +0 -0
- package/payload/server/public/assets/chat-D7LjNerV.js.gz +0 -0
- package/payload/server/public/assets/data-BU60tJiv.js +1 -0
- package/payload/server/public/assets/data-BU60tJiv.js.br +0 -0
- package/payload/server/public/assets/data-BU60tJiv.js.gz +0 -0
- package/payload/server/public/assets/{operator-B0oOVB8R.js → operator-t15ZvJER.js} +1 -1
- package/payload/server/public/assets/operator-t15ZvJER.js.br +0 -0
- package/payload/server/public/assets/operator-t15ZvJER.js.gz +0 -0
- package/payload/server/public/assets/{page-DrbfHSQ9.js → page-CogD1Hho.js} +1 -1
- package/payload/server/public/assets/page-CogD1Hho.js.br +0 -0
- package/payload/server/public/assets/page-CogD1Hho.js.gz +0 -0
- package/payload/server/public/assets/{page-Dfce3YQd.js → page-DcKH1PVD.js} +1 -1
- package/payload/server/public/assets/page-DcKH1PVD.js.br +0 -0
- package/payload/server/public/assets/page-DcKH1PVD.js.gz +0 -0
- package/payload/server/public/assets/{public-DJwMfl-4.js → public-UlLvs9vV.js} +1 -1
- package/payload/server/public/assets/public-UlLvs9vV.js.br +0 -0
- package/payload/server/public/assets/public-UlLvs9vV.js.gz +0 -0
- package/payload/server/public/assets/useVoiceRecorder-q9U5ahfg.js +2 -0
- package/payload/server/public/assets/useVoiceRecorder-q9U5ahfg.js.br +0 -0
- package/payload/server/public/assets/useVoiceRecorder-q9U5ahfg.js.gz +0 -0
- package/payload/server/public/chat.html +3 -3
- package/payload/server/public/data.html +3 -3
- package/payload/server/public/index.html +4 -4
- package/payload/server/public/operator.html +4 -4
- package/payload/server/public/public.html +3 -3
- package/payload/server/server.js +93 -42
- package/payload/server/public/assets/AdminLoginScreens-DrF7rAcb.js.br +0 -0
- package/payload/server/public/assets/AdminLoginScreens-DrF7rAcb.js.gz +0 -0
- package/payload/server/public/assets/admin-CCB9k3GB.js.br +0 -0
- package/payload/server/public/assets/admin-CCB9k3GB.js.gz +0 -0
- package/payload/server/public/assets/chat-BgOUm7r1.js +0 -1
- package/payload/server/public/assets/chat-BgOUm7r1.js.br +0 -0
- package/payload/server/public/assets/chat-BgOUm7r1.js.gz +0 -0
- package/payload/server/public/assets/data-YEC6LkxI.js +0 -1
- package/payload/server/public/assets/data-YEC6LkxI.js.br +0 -0
- package/payload/server/public/assets/data-YEC6LkxI.js.gz +0 -0
- package/payload/server/public/assets/operator-B0oOVB8R.js.br +0 -0
- package/payload/server/public/assets/operator-B0oOVB8R.js.gz +0 -0
- package/payload/server/public/assets/page-Dfce3YQd.js.br +0 -0
- package/payload/server/public/assets/page-Dfce3YQd.js.gz +0 -0
- package/payload/server/public/assets/page-DrbfHSQ9.js.br +0 -0
- package/payload/server/public/assets/page-DrbfHSQ9.js.gz +0 -0
- package/payload/server/public/assets/public-DJwMfl-4.js.br +0 -0
- package/payload/server/public/assets/public-DJwMfl-4.js.gz +0 -0
- package/payload/server/public/assets/useVoiceRecorder-9qVOHhkb.js +0 -2
- package/payload/server/public/assets/useVoiceRecorder-9qVOHhkb.js.br +0 -0
- package/payload/server/public/assets/useVoiceRecorder-9qVOHhkb.js.gz +0 -0
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Frame-accurate MP4 capture over the Chrome DevTools Protocol. No npm packages —
|
|
3
|
+
// Node 22's built-in fetch and WebSocket are the whole transport.
|
|
4
|
+
//
|
|
5
|
+
// node render.mjs --mode reel --target <path|file:|http:> --out <dir> --name <slug> \
|
|
6
|
+
// --width 1080 --height 1920 [--dsf 1] [--mobile] [--pre '<js>'] [--port 9333]
|
|
7
|
+
//
|
|
8
|
+
// node render.mjs --mode page --target <path|file:|http:> --out <dir> --name <slug> \
|
|
9
|
+
// --width 1920 --height 1080 --frames 900 [--dsf 1] [--mobile] \
|
|
10
|
+
// [--pre '<js>'] [--port 9333]
|
|
11
|
+
//
|
|
12
|
+
// The two modes differ in one thing: how the clock advances.
|
|
13
|
+
// reel — the page defines window.__frames and window.__seek(i); every frame is
|
|
14
|
+
// computed from the index alone, so the timeline is deterministic.
|
|
15
|
+
// page — Chrome's virtual time clock is advanced one frame at a time, so a page
|
|
16
|
+
// we do not control is captured with its own animation playing.
|
|
17
|
+
//
|
|
18
|
+
// This script owns the whole run: resolve the browser, launch it, capture, encode,
|
|
19
|
+
// poster, probe, stills, tear down, census. Splitting encode or cleanup out leaves
|
|
20
|
+
// the frame directory with no owner, which is how /tmp fills up with frames.
|
|
21
|
+
|
|
22
|
+
import {
|
|
23
|
+
writeFileSync, mkdirSync, rmSync, existsSync, readFileSync,
|
|
24
|
+
appendFileSync, statSync, readdirSync,
|
|
25
|
+
} from "node:fs";
|
|
26
|
+
import { spawn, execFileSync } from "node:child_process";
|
|
27
|
+
import { join } from "node:path";
|
|
28
|
+
import { tmpdir } from "node:os";
|
|
29
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
30
|
+
|
|
31
|
+
// ---------------------------------------------------------------- arguments
|
|
32
|
+
|
|
33
|
+
const argv = process.argv.slice(2);
|
|
34
|
+
const arg = (flag, fallback = null) => {
|
|
35
|
+
const i = argv.indexOf(flag);
|
|
36
|
+
return i >= 0 && i + 1 < argv.length ? argv[i + 1] : fallback;
|
|
37
|
+
};
|
|
38
|
+
const flag = f => argv.includes(f);
|
|
39
|
+
|
|
40
|
+
const mode = arg("--mode");
|
|
41
|
+
const target = arg("--target");
|
|
42
|
+
const outDir = arg("--out");
|
|
43
|
+
const name = arg("--name");
|
|
44
|
+
const width = Number(arg("--width", 1080));
|
|
45
|
+
const height = Number(arg("--height", 1920));
|
|
46
|
+
const dsf = Number(arg("--dsf", 1));
|
|
47
|
+
const mobile = flag("--mobile");
|
|
48
|
+
const pre = arg("--pre");
|
|
49
|
+
const port = arg("--port", "9333");
|
|
50
|
+
const framesArg = arg("--frames");
|
|
51
|
+
|
|
52
|
+
const FRAME_MS = 1000 / 30;
|
|
53
|
+
const FRAMES_ROOT = join(tmpdir(), "video-production");
|
|
54
|
+
const T0 = Date.now();
|
|
55
|
+
|
|
56
|
+
// ---------------------------------------------------------------- logging
|
|
57
|
+
// Same fail-open shape as the platform hooks: always stdout, plus a durable
|
|
58
|
+
// breadcrumb in $LOG_DIR when that is a real directory. An unwritable log
|
|
59
|
+
// never fails a render.
|
|
60
|
+
|
|
61
|
+
const LOG_FILE =
|
|
62
|
+
process.env.LOG_DIR && existsSync(process.env.LOG_DIR)
|
|
63
|
+
? join(process.env.LOG_DIR, "video-render.log")
|
|
64
|
+
: null;
|
|
65
|
+
|
|
66
|
+
function log(line) {
|
|
67
|
+
const s = `${new Date().toISOString()} ${line}`;
|
|
68
|
+
console.log(s);
|
|
69
|
+
if (LOG_FILE) { try { appendFileSync(LOG_FILE, s + "\n"); } catch { /* fail open */ } }
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function die(line) { log(line); process.exit(1); }
|
|
73
|
+
|
|
74
|
+
const run = name || "unnamed";
|
|
75
|
+
|
|
76
|
+
if (!mode || !["reel", "page"].includes(mode)) die(`[video-render] op=bad-args run=${run} reason=mode-must-be-reel-or-page`);
|
|
77
|
+
if (!target) die(`[video-render] op=bad-args run=${run} reason=target-required`);
|
|
78
|
+
if (!outDir) die(`[video-render] op=bad-args run=${run} reason=out-required`);
|
|
79
|
+
if (!name) die(`[video-render] op=bad-args run=${run} reason=name-required`);
|
|
80
|
+
// --name is joined into four filesystem paths and both output filenames, so it is
|
|
81
|
+
// a path component, not a label. A slash or a dot-dot would escape them.
|
|
82
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(name)) {
|
|
83
|
+
die(`[video-render] op=bad-args run=${run} reason=name-must-be-a-slug value=${JSON.stringify(name)}`);
|
|
84
|
+
}
|
|
85
|
+
if (mode === "page" && !framesArg) die(`[video-render] op=bad-args run=${run} reason=frames-required-in-page-mode`);
|
|
86
|
+
|
|
87
|
+
const url =
|
|
88
|
+
/^(https?|file):/.test(target) ? target : pathToFileURL(target).href;
|
|
89
|
+
|
|
90
|
+
log(`[video-render] op=request run=${run} mode=${mode} target=${url} w=${width} h=${height} dsf=${dsf} fps=30`);
|
|
91
|
+
|
|
92
|
+
// ---------------------------------------------------------------- census
|
|
93
|
+
|
|
94
|
+
// frameDirs/frameBytes are the strict leak signal: a capture directory outlives
|
|
95
|
+
// its run only when a render died without tearing down, so a healthy end reports
|
|
96
|
+
// zero for both. stillDirs/stillBytes are counted separately because verification
|
|
97
|
+
// stills are deliberately retained for the agent to read after the run — counting
|
|
98
|
+
// them as frames would make every successful render look like a leak.
|
|
99
|
+
function census(phase) {
|
|
100
|
+
let chromiumLive = 0, frameDirs = 0, frameBytes = 0, stillDirs = 0, stillBytes = 0;
|
|
101
|
+
try {
|
|
102
|
+
// A read, never a kill. This process's own argv carries no such string,
|
|
103
|
+
// so it cannot count itself.
|
|
104
|
+
chromiumLive = Number(execFileSync("bash", ["-c",
|
|
105
|
+
'pgrep -f "remote-debugging-port=" 2>/dev/null | wc -l']).toString().trim());
|
|
106
|
+
} catch { /* pgrep absent or no matches */ }
|
|
107
|
+
try {
|
|
108
|
+
for (const d of readdirSync(FRAMES_ROOT)) {
|
|
109
|
+
const p = join(FRAMES_ROOT, d);
|
|
110
|
+
if (!statSync(p).isDirectory()) continue;
|
|
111
|
+
const isStills = d.endsWith("-stills");
|
|
112
|
+
let bytes = 0;
|
|
113
|
+
for (const f of readdirSync(p)) {
|
|
114
|
+
try { bytes += statSync(join(p, f)).size; } catch { /* raced */ }
|
|
115
|
+
}
|
|
116
|
+
if (isStills) { stillDirs++; stillBytes += bytes; }
|
|
117
|
+
else { frameDirs++; frameBytes += bytes; }
|
|
118
|
+
}
|
|
119
|
+
} catch { /* root absent on a first run */ }
|
|
120
|
+
log(`[video-census] phase=${phase} run=${run} chromiumLive=${chromiumLive} frameDirs=${frameDirs} frameBytes=${frameBytes} stillDirs=${stillDirs} stillBytes=${stillBytes}`);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
census("start");
|
|
124
|
+
|
|
125
|
+
// ---------------------------------------------------------------- preflight
|
|
126
|
+
|
|
127
|
+
const platformRoot =
|
|
128
|
+
process.env.PLATFORM_ROOT || fileURLToPath(new URL("../../../../", import.meta.url));
|
|
129
|
+
const binFile = join(platformRoot, "config", "chromium-binary.path");
|
|
130
|
+
|
|
131
|
+
if (!existsSync(binFile)) {
|
|
132
|
+
die(`[video-render] op=chromium-missing run=${run} file=${binFile}`);
|
|
133
|
+
}
|
|
134
|
+
const bin = readFileSync(binFile, "utf8").trim();
|
|
135
|
+
if (!bin || !existsSync(bin)) {
|
|
136
|
+
die(`[video-render] op=chromium-missing run=${run} file=${binFile} bin=${bin || "(empty)"}`);
|
|
137
|
+
}
|
|
138
|
+
log(`[video-render] op=chromium-resolve run=${run} bin=${bin} source=config`);
|
|
139
|
+
|
|
140
|
+
for (const tool of ["ffmpeg", "ffprobe"]) {
|
|
141
|
+
try { execFileSync("which", [tool], { stdio: "ignore" }); }
|
|
142
|
+
catch { die(`[video-render] op=tool-missing run=${run} tool=${tool}`); }
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const frameDir = join(FRAMES_ROOT, run);
|
|
146
|
+
const stillDir = join(FRAMES_ROOT, `${run}-stills`);
|
|
147
|
+
const profile = join(tmpdir(), `video-production-profile-${run}`);
|
|
148
|
+
rmSync(frameDir, { recursive: true, force: true });
|
|
149
|
+
rmSync(stillDir, { recursive: true, force: true });
|
|
150
|
+
rmSync(profile, { recursive: true, force: true });
|
|
151
|
+
mkdirSync(frameDir, { recursive: true });
|
|
152
|
+
mkdirSync(stillDir, { recursive: true });
|
|
153
|
+
mkdirSync(outDir, { recursive: true });
|
|
154
|
+
|
|
155
|
+
// ---------------------------------------------------------------- launch
|
|
156
|
+
// detached:true makes the child a process-group leader, which is what lets
|
|
157
|
+
// teardown kill the whole browser tree by group rather than leaving zygotes.
|
|
158
|
+
// Never pkill -f on the port: that pattern also matches the shell that ran it.
|
|
159
|
+
|
|
160
|
+
const child = spawn(bin, [
|
|
161
|
+
"--headless=new",
|
|
162
|
+
`--remote-debugging-port=${port}`,
|
|
163
|
+
"--remote-debugging-address=127.0.0.1",
|
|
164
|
+
`--user-data-dir=${profile}`,
|
|
165
|
+
"--no-sandbox",
|
|
166
|
+
"--disable-gpu",
|
|
167
|
+
"--disable-dev-shm-usage",
|
|
168
|
+
"--hide-scrollbars",
|
|
169
|
+
"--force-device-scale-factor=1",
|
|
170
|
+
"--no-first-run",
|
|
171
|
+
"--no-default-browser-check",
|
|
172
|
+
"--disable-background-networking",
|
|
173
|
+
"--disable-features=TranslateUI",
|
|
174
|
+
"--font-render-hinting=none",
|
|
175
|
+
`--window-size=${width},${height}`,
|
|
176
|
+
"about:blank",
|
|
177
|
+
], { detached: true, stdio: "ignore" });
|
|
178
|
+
child.unref();
|
|
179
|
+
const chromePid = child.pid;
|
|
180
|
+
log(`[video-render] op=chromium-start run=${run} pid=${chromePid} port=${port}`);
|
|
181
|
+
|
|
182
|
+
// ---------------------------------------------------------------- CDP
|
|
183
|
+
|
|
184
|
+
async function browserSocket(ms = 20000) {
|
|
185
|
+
const start = Date.now();
|
|
186
|
+
while (Date.now() - start < ms) {
|
|
187
|
+
try {
|
|
188
|
+
const r = await fetch(`http://127.0.0.1:${port}/json/version`);
|
|
189
|
+
if (r.ok) return (await r.json()).webSocketDebuggerUrl;
|
|
190
|
+
} catch { /* not up yet */ }
|
|
191
|
+
await new Promise(r => setTimeout(r, 300));
|
|
192
|
+
}
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const wsUrl = await browserSocket();
|
|
197
|
+
if (!wsUrl) {
|
|
198
|
+
killBrowser();
|
|
199
|
+
die(`[video-render] op=cdp-unreachable run=${run} port=${port}`);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const ws = new WebSocket(wsUrl);
|
|
203
|
+
await new Promise((res, rej) => {
|
|
204
|
+
ws.addEventListener("open", res, { once: true });
|
|
205
|
+
ws.addEventListener("error", rej, { once: true });
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
let msgId = 0, sessionId = null;
|
|
209
|
+
const waiting = new Map();
|
|
210
|
+
const listeners = new Map();
|
|
211
|
+
|
|
212
|
+
ws.addEventListener("message", e => {
|
|
213
|
+
const m = JSON.parse(e.data);
|
|
214
|
+
if (m.id && waiting.has(m.id)) { waiting.get(m.id)(m); waiting.delete(m.id); return; }
|
|
215
|
+
if (m.method && listeners.has(m.method)) {
|
|
216
|
+
const arr = listeners.get(m.method);
|
|
217
|
+
listeners.delete(m.method);
|
|
218
|
+
for (const fn of arr) fn(m.params);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
// Arm BEFORE sending the command that triggers the event, or the event can
|
|
223
|
+
// land between the send and the listen and the await never resolves.
|
|
224
|
+
function armed(method) {
|
|
225
|
+
let resolve;
|
|
226
|
+
const p = new Promise(r => { resolve = r; });
|
|
227
|
+
if (!listeners.has(method)) listeners.set(method, []);
|
|
228
|
+
listeners.get(method).push(resolve);
|
|
229
|
+
return p;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const send = (method, params = {}, timeoutMs = 90000) => new Promise((res, rej) => {
|
|
233
|
+
const n = ++msgId;
|
|
234
|
+
const t = setTimeout(() => { waiting.delete(n); rej(new Error(`cdp timeout: ${method}`)); }, timeoutMs);
|
|
235
|
+
waiting.set(n, m => {
|
|
236
|
+
clearTimeout(t);
|
|
237
|
+
m.error ? rej(new Error(`${method}: ${JSON.stringify(m.error)}`)) : res(m.result);
|
|
238
|
+
});
|
|
239
|
+
const msg = { id: n, method, params };
|
|
240
|
+
if (sessionId) msg.sessionId = sessionId;
|
|
241
|
+
ws.send(JSON.stringify(msg));
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
const ev = async expr =>
|
|
245
|
+
(await send("Runtime.evaluate", { expression: expr, returnByValue: true, awaitPromise: true }))
|
|
246
|
+
?.result?.value;
|
|
247
|
+
|
|
248
|
+
// Its own tab. Grabbing the first page target collides with any other CDP client
|
|
249
|
+
// already attached to this browser.
|
|
250
|
+
const { targetId } = await send("Target.createTarget", { url: "about:blank" });
|
|
251
|
+
sessionId = (await send("Target.attachToTarget", { targetId, flatten: true })).sessionId;
|
|
252
|
+
|
|
253
|
+
await send("Page.enable");
|
|
254
|
+
await send("Runtime.enable");
|
|
255
|
+
await send("Emulation.setDeviceMetricsOverride", {
|
|
256
|
+
width, height, deviceScaleFactor: dsf, mobile,
|
|
257
|
+
screenWidth: width, screenHeight: height,
|
|
258
|
+
});
|
|
259
|
+
// Load-bearing. Headless otherwise reports prefers-reduced-motion: reduce, and a
|
|
260
|
+
// page that honours it stops animating — a capture that is silently frozen.
|
|
261
|
+
await send("Emulation.setEmulatedMedia", {
|
|
262
|
+
features: [{ name: "prefers-reduced-motion", value: "no-preference" }],
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
// ---------------------------------------------------------------- teardown
|
|
266
|
+
|
|
267
|
+
function killBrowser() {
|
|
268
|
+
try { process.kill(-chromePid, "SIGTERM"); }
|
|
269
|
+
catch { try { process.kill(chromePid, "SIGTERM"); } catch { /* already gone */ } }
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
async function teardown() {
|
|
273
|
+
try { await send("Target.closeTarget", { targetId }, 10000); } catch { /* browser may be gone */ }
|
|
274
|
+
try { ws.close(); } catch { /* already closed */ }
|
|
275
|
+
log(`[video-render] op=chromium-stop run=${run} pid=${chromePid}`);
|
|
276
|
+
killBrowser();
|
|
277
|
+
// The delay is required. A synchronous check reports a premature alive=false.
|
|
278
|
+
await new Promise(r => setTimeout(r, 2000));
|
|
279
|
+
let alive = true;
|
|
280
|
+
try { process.kill(chromePid, 0); } catch { alive = false; }
|
|
281
|
+
if (alive) { try { process.kill(-chromePid, "SIGKILL"); } catch { /* raced */ } }
|
|
282
|
+
log(`[video-render] op=survives-stop run=${run} pid=${chromePid} alive=${alive}`);
|
|
283
|
+
rmSync(profile, { recursive: true, force: true });
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// A failed render must leave no more behind than a successful one. The frames
|
|
287
|
+
// captured before the failure have no consumer, and a 4600-frame run abandons
|
|
288
|
+
// gigabytes if they are kept.
|
|
289
|
+
async function abort(line) {
|
|
290
|
+
await teardown();
|
|
291
|
+
rmSync(frameDir, { recursive: true, force: true });
|
|
292
|
+
rmSync(stillDir, { recursive: true, force: true }); // no stills exist on an abort
|
|
293
|
+
log(`${line} framesDirRemoved=${!existsSync(frameDir)}`);
|
|
294
|
+
census("abort");
|
|
295
|
+
process.exit(1);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// ---------------------------------------------------------------- navigate
|
|
299
|
+
|
|
300
|
+
const loaded = armed("Page.loadEventFired");
|
|
301
|
+
try { await send("Page.navigate", { url }); }
|
|
302
|
+
catch (e) { await abort(`[video-render] op=navigate-failed run=${run} url=${url} error=${e.message}`); }
|
|
303
|
+
await loaded;
|
|
304
|
+
await new Promise(r => setTimeout(r, 1500)); // fonts
|
|
305
|
+
|
|
306
|
+
const stepTime = async ms => {
|
|
307
|
+
const expired = armed("Emulation.virtualTimeBudgetExpired");
|
|
308
|
+
await send("Emulation.setVirtualTimePolicy", { policy: "advance", budget: ms });
|
|
309
|
+
await expired;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
if (mode === "page") await stepTime(1); // arm the virtual clock
|
|
313
|
+
if (pre) {
|
|
314
|
+
try { await ev(pre); }
|
|
315
|
+
catch (e) { await abort(`[video-render] op=pre-failed run=${run} error=${e.message}`); }
|
|
316
|
+
if (mode === "page") await stepTime(60); // let the pre-actions settle
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// ---------------------------------------------------------------- the clock
|
|
320
|
+
|
|
321
|
+
let total, preShot, postShot;
|
|
322
|
+
if (mode === "reel") {
|
|
323
|
+
total = await ev("window.__frames");
|
|
324
|
+
if (!Number.isFinite(total) || total < 1) {
|
|
325
|
+
await abort(`[video-render] op=frames-missing run=${run} value=${JSON.stringify(total)}`);
|
|
326
|
+
}
|
|
327
|
+
preShot = async i => { await ev(`window.__seek(${i})`); };
|
|
328
|
+
postShot = async () => {};
|
|
329
|
+
} else {
|
|
330
|
+
total = Number(framesArg);
|
|
331
|
+
if (!Number.isFinite(total) || total < 1) {
|
|
332
|
+
await abort(`[video-render] op=bad-args run=${run} reason=frames-not-a-positive-number`);
|
|
333
|
+
}
|
|
334
|
+
preShot = async () => {};
|
|
335
|
+
postShot = async () => { await stepTime(FRAME_MS); };
|
|
336
|
+
}
|
|
337
|
+
log(`[video-render] op=frames-declared run=${run} frames=${total}`);
|
|
338
|
+
|
|
339
|
+
// ---------------------------------------------------------------- capture
|
|
340
|
+
|
|
341
|
+
async function shot(i) {
|
|
342
|
+
let last;
|
|
343
|
+
for (let attempt = 0; attempt < 4; attempt++) {
|
|
344
|
+
try {
|
|
345
|
+
const r = await send("Page.captureScreenshot",
|
|
346
|
+
{ format: "jpeg", quality: 92, captureBeyondViewport: false, fromSurface: true }, 25000);
|
|
347
|
+
if (r?.data) return Buffer.from(r.data, "base64");
|
|
348
|
+
last = new Error("no screenshot data");
|
|
349
|
+
} catch (e) { last = e; }
|
|
350
|
+
}
|
|
351
|
+
await abort(`[video-render] op=capture-failed run=${run} i=${i} error=${last?.message}`);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
let bytesMin = Infinity, bytesMax = 0, bytesTotal = 0;
|
|
355
|
+
for (let i = 0; i < total; i++) {
|
|
356
|
+
await preShot(i);
|
|
357
|
+
const buf = await shot(i);
|
|
358
|
+
writeFileSync(join(frameDir, `f-${String(i).padStart(5, "0")}.jpg`), buf);
|
|
359
|
+
if (buf.length < bytesMin) bytesMin = buf.length;
|
|
360
|
+
if (buf.length > bytesMax) bytesMax = buf.length;
|
|
361
|
+
bytesTotal += buf.length;
|
|
362
|
+
if (i % 60 === 0) log(`[video-render] op=capture run=${run} i=${i} bytes=${buf.length}`);
|
|
363
|
+
await postShot(i);
|
|
364
|
+
}
|
|
365
|
+
// The blank-render discriminator. A frozen capture encodes to a perfectly valid,
|
|
366
|
+
// perfectly useless MP4, and nothing else separates it from a good one.
|
|
367
|
+
log(`[video-render] op=capture-done run=${run} frames=${total} bytesMin=${bytesMin} bytesMax=${bytesMax} bytesTotal=${bytesTotal}`);
|
|
368
|
+
|
|
369
|
+
await teardown();
|
|
370
|
+
|
|
371
|
+
// ---------------------------------------------------------------- encode
|
|
372
|
+
|
|
373
|
+
const mp4 = join(outDir, `${name}.mp4`);
|
|
374
|
+
const poster = join(outDir, `${name}-poster.jpg`);
|
|
375
|
+
|
|
376
|
+
try {
|
|
377
|
+
execFileSync("ffmpeg", [
|
|
378
|
+
"-y", "-loglevel", "error", "-framerate", "30",
|
|
379
|
+
"-i", join(frameDir, "f-%05d.jpg"),
|
|
380
|
+
"-c:v", "libx264", "-crf", "21", "-preset", "slow",
|
|
381
|
+
"-pix_fmt", "yuv420p", "-movflags", "+faststart", "-an", mp4,
|
|
382
|
+
]);
|
|
383
|
+
} catch (e) {
|
|
384
|
+
die(`[video-render] op=encode-failed run=${run} error=${e.message}`);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// Read back what was produced. Never assert the encode arguments as the result.
|
|
388
|
+
let probe;
|
|
389
|
+
try {
|
|
390
|
+
probe = JSON.parse(execFileSync("ffprobe", [
|
|
391
|
+
"-v", "error", "-select_streams", "v:0",
|
|
392
|
+
"-show_entries", "stream=width,height,codec_name",
|
|
393
|
+
"-show_entries", "format=duration", "-of", "json", mp4,
|
|
394
|
+
]).toString());
|
|
395
|
+
} catch (e) {
|
|
396
|
+
die(`[video-render] op=probe-failed run=${run} error=${e.message}`);
|
|
397
|
+
}
|
|
398
|
+
const stream = probe.streams?.[0] ?? {};
|
|
399
|
+
const durationS = Number(probe.format?.duration ?? 0);
|
|
400
|
+
const fileBytes = statSync(mp4).size;
|
|
401
|
+
log(`[video-render] op=encode run=${run} durationS=${durationS.toFixed(2)} wxh=${stream.width}x${stream.height} codec=${stream.codec_name} fileBytes=${fileBytes}`);
|
|
402
|
+
|
|
403
|
+
try {
|
|
404
|
+
execFileSync("ffmpeg", ["-y", "-loglevel", "error", "-ss", String(durationS / 2),
|
|
405
|
+
"-i", mp4, "-frames:v", "1", "-q:v", "3", poster]);
|
|
406
|
+
} catch (e) {
|
|
407
|
+
die(`[video-render] op=poster-failed run=${run} error=${e.message}`);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// The agent must READ these. That is the step that catches a wrapped counter or a
|
|
411
|
+
// clipped headline, and no script can do it.
|
|
412
|
+
const stills = [];
|
|
413
|
+
for (const frac of [0.05, 0.35, 0.65, 0.95]) {
|
|
414
|
+
const at = join(stillDir, `s-${String(Math.round(frac * 100)).padStart(2, "0")}.jpg`);
|
|
415
|
+
try {
|
|
416
|
+
execFileSync("ffmpeg", ["-y", "-loglevel", "error", "-ss", String(durationS * frac),
|
|
417
|
+
"-i", mp4, "-frames:v", "1", "-q:v", "3", at]);
|
|
418
|
+
stills.push(at);
|
|
419
|
+
} catch { /* a still past the last keyframe is not fatal */ }
|
|
420
|
+
}
|
|
421
|
+
log(`[video-render] op=stills run=${run} count=${stills.length} paths=${stills.join(",")}`);
|
|
422
|
+
|
|
423
|
+
// ---------------------------------------------------------------- exit
|
|
424
|
+
|
|
425
|
+
rmSync(frameDir, { recursive: true, force: true });
|
|
426
|
+
const framesDirRemoved = !existsSync(frameDir);
|
|
427
|
+
log(`[video-render] op=exit run=${run} ranMs=${Date.now() - T0} framesDirRemoved=${framesDirRemoved} outputBytes=${fileBytes} mp4=${mp4} poster=${poster}`);
|
|
428
|
+
census("end");
|
|
429
|
+
process.exit(0);
|
|
@@ -9,6 +9,13 @@ Invoked by the admin agent directly.
|
|
|
9
9
|
|
|
10
10
|
This is the platform's release timeline, newest first. Each entry shows the date it shipped and the version it shipped in, so you can tell the operator how current their install is. To compare, read the installed version from `capabilities-here` and match it against the versions below. Keep answers high level and in plain English; this is a summary, not a full commit log.
|
|
11
11
|
|
|
12
|
+
## 2026-08-04 (0.1.558)
|
|
13
|
+
|
|
14
|
+
- The assistant can now produce short videos and social reels. Ask it for a video and it renders an MP4 from your images, text and audio, rather than assembling a one-off pipeline each time.
|
|
15
|
+
- A public Telegram bot can now reply. Bots opened on the public route were being given a reply tool that was never connected, so messages arrived, the conversation stayed alive, and nothing ever came back.
|
|
16
|
+
- Scrolling back through a very long conversation no longer stops part-way. A single very large message could stall the scroll-back at a fixed point, putting everything above it out of reach no matter how far you scrolled; on one 15 MB conversation that was everything before the last 1.4 MB.
|
|
17
|
+
- The Telegram health check now separates how long ago a conversation was started from how long ago it last said anything, and can see a conversation that has not spoken yet.
|
|
18
|
+
|
|
12
19
|
## 2026-08-04 (0.1.557)
|
|
13
20
|
|
|
14
21
|
- The status dot on a one-time routine that has already run now shows it as finished rather than live, matching the card text added in the previous release.
|
|
@@ -27,6 +27,7 @@ Load these when users ask about Maxy features or need guidance:
|
|
|
27
27
|
- **Projects** → `references/projects-guide.md` — creating projects, tracking health, phase transitions, completing
|
|
28
28
|
- **Workflows** → `references/workflows.md` — saving and running multi-step processes, declared inputs, scheduling, run history
|
|
29
29
|
- **Slides** → `references/slides.md` — generating, theming, and reviewing HTML slide decks with `/slides`
|
|
30
|
+
- **Making videos** → `references/video-production.md` — social reels and animated explainers as real MP4 files, portrait or landscape, made on the device with no upload
|
|
30
31
|
- **Calendar & booking** → `references/calendar-booking.md` — the admin calendar at `/calendar`, deploying a public booking page, setting availability, and how bookings become meetings
|
|
31
32
|
- **Troubleshooting** → `references/troubleshooting.md` — common issues and how to resolve them
|
|
32
33
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Making videos
|
|
2
|
+
|
|
3
|
+
{{productName}} makes real video files on your own device. No upload, no external service, no subscription. Ask for one in plain words.
|
|
4
|
+
|
|
5
|
+
> "Make me three social reels about the free trial."
|
|
6
|
+
>
|
|
7
|
+
> "Can I have that in portrait and landscape?"
|
|
8
|
+
>
|
|
9
|
+
> "Record that page playing its animation."
|
|
10
|
+
|
|
11
|
+
## What you get
|
|
12
|
+
|
|
13
|
+
An MP4 file, silent, at whatever size you need. Portrait (1080x1920) for stories and reels, landscape (1920x1080) for a website or a presentation, or any other shape you ask for. Each video comes with a poster image, which is the still that shows before someone presses play.
|
|
14
|
+
|
|
15
|
+
Ask for another shape at any time and the same content is recut for it. You do not have to describe it again.
|
|
16
|
+
|
|
17
|
+
## Two kinds of video
|
|
18
|
+
|
|
19
|
+
**Made from scratch.** The agent designs the video itself, in your brand's colours and type, and animates it frame by frame. This is what you want for a social reel, an explainer, or anything with a message to land.
|
|
20
|
+
|
|
21
|
+
**A recording of a page.** If you already have a page that animates, the agent can record it playing. Useful when the page is the thing you want to show.
|
|
22
|
+
|
|
23
|
+
## How long it takes
|
|
24
|
+
|
|
25
|
+
A short reel takes a few minutes. A long recording of a full page can take considerably longer. The agent tells you when it starts and comes back when it is done.
|
|
26
|
+
|
|
27
|
+
## What to check
|
|
28
|
+
|
|
29
|
+
The agent looks at four frames from every video it makes before telling you it is finished, so a video that came out blank or with text running off the edge gets caught and re-rendered. You should still watch it. Text that is correct but reads badly is a judgement only you can make.
|
|
30
|
+
|
|
31
|
+
## Where the files go
|
|
32
|
+
|
|
33
|
+
Finished videos land in your account's output folder, and the agent sends them to you in the chat. Ask for them on a web page and they get published to your site with everything on one page you can open on a phone.
|
|
34
|
+
|
|
35
|
+
## Fonts
|
|
36
|
+
|
|
37
|
+
Videos use the fonts installed on your device. If you want a specific brand font and it has never been used on this device before, say so — it may need installing first.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pty-spawner.d.ts","sourceRoot":"","sources":["../src/pty-spawner.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACvE,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAA;AAsB3B,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,iBAAiB,CAAA;AAC5D,OA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0BAA0B,EAAE,MAAM,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,oBAAoB,GAAG,uBAAuB,CAgDvF;AAED;;;;;;;;;sBASsB;AACtB,wBAAgB,kBAAkB,CAChC,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EACxB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,MAAM,GAChB,UAAU,CAoBZ;AAED;;;;;;;;qBAQqB;AACrB,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EACxB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,MAAM,GACd;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CASrC;AAED;2DAC2D;AAC3D,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,OAAO,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,cAAc,CAAA;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;iFASiF;AACjF,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAA;AAG5C,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,MAAM,GACb,gBAAgB,CAalB"}
|
|
@@ -38,6 +38,7 @@ import { buildWebchatChannelMcpServers, buildWebchatChannelArgv, webchatChannelM
|
|
|
38
38
|
// public-allowlist.ts; this file no longer names any of them directly.
|
|
39
39
|
import { publicAllowlistFor } from './public-allowlist.js';
|
|
40
40
|
import { buildWaChannelMcpServers, buildWaChannelArgv, waChannelMcpConfigPath } from './wa-channel-mcp.js';
|
|
41
|
+
import { buildTelegramChannelMcpServers, buildTelegramChannelArgv, telegramChannelMcpConfigPath } from './telegram-channel-mcp.js';
|
|
41
42
|
import { requirePlatformPort } from './channel-spawn-tee.js';
|
|
42
43
|
import { isDevChannelPrompt } from './wa-channel-mcp.js';
|
|
43
44
|
import { jsonlPathForSessionId, sidecarPathForSessionId, permissionModeLogPathForSessionId, mcpDebugLogPathForSessionId, printStreamPathForSessionId, projectsDirForCwd, } from './jsonl-path.js';
|
|
@@ -1638,6 +1639,37 @@ export async function spawnClaudeSession(deps, args) {
|
|
|
1638
1639
|
deps.logger(`op=wa-public-channel senderId=${args.waChannel.senderId} path=${waPath}`);
|
|
1639
1640
|
deps.logger(`op=channel-mcp-spawn channel=whatsapp-public node=${deps.nodeBin} exists=${existsSync(deps.nodeBin)}`);
|
|
1640
1641
|
}
|
|
1642
|
+
// Task 2403 — the telegram twin of the two attaches above, and the third arm
|
|
1643
|
+
// `publicAllowlistFor` has always had. Task 2368 moved a public telegram bot
|
|
1644
|
+
// from /rc-spawn (which attaches at http-server.ts) to this door and the
|
|
1645
|
+
// attach did not come with it, so the spawn was handed
|
|
1646
|
+
// --allowed-tools mcp__telegram-channel__reply for a server nothing
|
|
1647
|
+
// registered: the gateway queued every inbound waiting for a channel server
|
|
1648
|
+
// that never subscribed, and the session sat alive and idle with no way to
|
|
1649
|
+
// answer. Mirrors the webchat block, not the wa one — this builder takes no
|
|
1650
|
+
// accountId.
|
|
1651
|
+
if (args.telegramChannel) {
|
|
1652
|
+
const telegramPath = telegramChannelMcpConfigPath(sessionId, deps.mcpConfigDir ?? tmpdir());
|
|
1653
|
+
const telegramServers = buildTelegramChannelMcpServers({
|
|
1654
|
+
sessionId,
|
|
1655
|
+
senderId: args.telegramChannel.senderId,
|
|
1656
|
+
gatewayUrl: args.telegramChannel.gatewayUrl,
|
|
1657
|
+
serverPath: args.telegramChannel.serverPath,
|
|
1658
|
+
nodeBin: deps.nodeBin,
|
|
1659
|
+
// The enclosing guard is `args.role === 'public'`, so this is a fact
|
|
1660
|
+
// here, not a threaded value.
|
|
1661
|
+
role: 'public',
|
|
1662
|
+
// Task 2356 — the spawn-tee inputs, so this server's stderr lands in
|
|
1663
|
+
// logs/mcp-telegram-channel-<sessionId>.log.
|
|
1664
|
+
platformRoot: deps.platformRoot,
|
|
1665
|
+
logDir: deps.logDir,
|
|
1666
|
+
platformPort: requirePlatformPort(),
|
|
1667
|
+
});
|
|
1668
|
+
writeFileSync(telegramPath, JSON.stringify({ mcpServers: telegramServers }, null, 2), 'utf8');
|
|
1669
|
+
argv.push(...buildTelegramChannelArgv(telegramPath));
|
|
1670
|
+
deps.logger(`op=telegram-public-channel senderId=${args.telegramChannel.senderId} path=${telegramPath}`);
|
|
1671
|
+
deps.logger(`op=channel-mcp-spawn channel=telegram-public node=${deps.nodeBin} exists=${existsSync(deps.nodeBin)}`);
|
|
1672
|
+
}
|
|
1641
1673
|
}
|
|
1642
1674
|
// Task 502 — every pty-spawn passes `--strict-mcp-config` so Claude Code uses
|
|
1643
1675
|
// only explicit MCP sources and never auto-discovers a project `.mcp.json`.
|