@biunow/agent-biutalk 1.1.7 → 2.0.0
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/_shared/.tmp-panel-smoke/art/smoke.mp4 +0 -0
- package/_shared/.tmp-panel-smoke/art-pipe/out/biuart-01_cave-mwq5kfpm.mp4 +0 -0
- package/_shared/.tmp-panel-smoke/art-pipe/panel-delivery.json +7 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/film/index.html +7 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/film/main.js +68 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/film/panel-beats.json +20 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/CREDITS +20 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/build.sh +17 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/ease.js +43 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/events.json +1 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/film.js +533 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/fonts/OFL-Archivo.txt +93 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/fonts/OFL-DMSerifDisplay.txt +93 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/fonts/OFL-UnifrakturMaguntia.txt +94 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/fonts/fonts.css +3 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/index.html +6 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/lines.json +10 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/main.js +15 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/mix.py +116 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/music/score.py +168 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/music/score_meta.json +59 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/score.json +235 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/stills/styleframe.jpg +0 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/tools/fonts.sh +17 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/tools/subs.py +11 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/tools/words.py +20 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/voices/dur.json +10 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/voices/words.json +213 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-demo/voices/words_rel.json +56 -0
- package/_shared/.tmp-panel-smoke/reel-pipe/style-ref.json +5 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/film/index.html +7 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/film/main.js +68 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/film/panel-beats.json +20 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/out/video.mp4 +0 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/panel-delivery.json +8 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/CREDITS +20 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/build.sh +17 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/ease.js +43 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/events.json +1 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/film.js +533 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/fonts/OFL-Archivo.txt +93 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/fonts/OFL-DMSerifDisplay.txt +93 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/fonts/OFL-UnifrakturMaguntia.txt +94 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/fonts/fonts.css +3 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/index.html +6 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/lines.json +10 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/main.js +15 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/mix.py +116 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/music/score.py +168 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/music/score_meta.json +59 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/score.json +235 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/stills/styleframe.jpg +0 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/tools/fonts.sh +17 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/tools/subs.py +11 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/tools/words.py +20 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/voices/dur.json +10 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/voices/words.json +213 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-demo/voices/words_rel.json +56 -0
- package/_shared/.tmp-panel-smoke/reel-pipe2/style-ref.json +5 -0
- package/_shared/.tmp-panel-smoke/remo-pipe/brief.md +2 -0
- package/_shared/.tmp-panel-smoke/remo-pipe/remo-job.json +4 -0
- package/_shared/.tmp-panel-smoke/remo-pipe2/brief.md +1 -0
- package/_shared/.tmp-panel-smoke/remo-pipe2/out/final.mp4 +0 -0
- package/_shared/.tmp-panel-smoke/remo-pipe2/panel-delivery.json +8 -0
- package/_shared/.tmp-panel-smoke/remo-pipe2/remo-job.json +4 -0
- package/_shared/.tmp-panel-smoke/vibe-pipe-ok/ep00-demo.mp4 +0 -0
- package/_shared/.tmp-panel-smoke/vibe-pipe-ok/out/ep00-demo.mp4 +0 -0
- package/_shared/.tmp-panel-smoke/vibe-pipe-ok/panel-delivery.json +7 -0
- package/_shared/.tmp-panel-smoke/vibe-pipe-ok/publish.json +10 -0
- package/_shared/.tmp-panel-smoke/vibe-still.jpg +0 -0
- package/_shared/.tmp-panel-smoke/vibe-still.log +6 -0
- package/_shared/.tmp-panel-smoke/vibe-still.log.err +0 -0
- package/_shared/.tmp-panel-smoke/vibe-still2.log +26 -0
- package/_shared/.tmp-panel-smoke/vibe-still2.log.err +0 -0
- package/_shared/lib/film-locate.mjs +203 -0
- package/_shared/lib/voice-catalog.mjs +127 -0
- package/_shared/scripts/apply-upload-limits.mjs +62 -0
- package/_shared/scripts/patch-film-hosts.mjs +233 -0
- package/_shared/scripts/patch-voice-options.mjs +41 -0
- package/_shared/scripts/sync-local-agents.mjs +67 -0
- package/_shared/scripts/wire-film-bridge.mjs +24 -0
- package/_shared/scripts/wire-voice-plus.mjs +68 -0
- package/_shared/studio/assert-panel-permit.mjs +67 -0
- package/_shared/studio/composer.css +559 -0
- package/_shared/studio/composer.js +728 -0
- package/_shared/studio/optimize-prompt.mjs +84 -0
- package/_shared/studio/optimize-prompt.test.mjs +47 -0
- package/_shared/studio/recipes.mjs +87 -0
- package/_shared/studio/select-menu.js +450 -0
- package/_shared/studio/to-english-prompt.mjs +165 -0
- package/_shared/studio/to-english-prompt.test.mjs +72 -0
- package/bin/server.js +22 -22
- package/data/looks.json +8 -0
- package/lib/film-bridge.mjs +1 -0
- package/lib/host.mjs +131 -264
- package/lib/voice-bridge.mjs +2 -0
- package/manifest.json +4 -3
- package/package.json +1 -1
- package/skills/biutalk/EXEC.md +69 -0
- package/skills/biutalk/SKILL.md +12 -10
- package/skills/biutalk/scripts/doctor.mjs +124 -0
- package/skills/biutalk/scripts/qc.mjs +129 -0
- package/skills/biutalk/scripts/scaffold.mjs +205 -0
- package/studio/app.js +16 -1
- package/studio/composer.css +94 -0
- package/studio/composer.js +257 -9
- package/studio/index.html +5 -1
- package/studio/to-english-prompt.mjs +16 -0
package/lib/host.mjs
CHANGED
|
@@ -10,6 +10,8 @@ import { fileURLToPath } from 'node:url';
|
|
|
10
10
|
import { spawn } from 'node:child_process';
|
|
11
11
|
import crypto from 'node:crypto';
|
|
12
12
|
import { optimizePrompt } from '../studio/optimize-prompt.mjs';
|
|
13
|
+
import { isIntermediateMp4, rescueMissingFilm, findLatestMp4, locateFilm, locateJobFilm, chooseDeliverableFilm, filmHitFields } from './film-bridge.mjs';
|
|
14
|
+
import { buildVoiceOptionsFromEnv } from './voice-bridge.mjs';
|
|
13
15
|
|
|
14
16
|
export function env() {
|
|
15
17
|
return {
|
|
@@ -100,13 +102,13 @@ export async function readBody(req, limit = 32 * 1024 * 1024) {
|
|
|
100
102
|
}
|
|
101
103
|
|
|
102
104
|
export async function readJsonBody(req) {
|
|
103
|
-
//
|
|
105
|
+
// 本地上传:视频≤200MB base64 后约 267MB;合计≤250MB,JSON body 放宽到 300MB
|
|
104
106
|
let buf;
|
|
105
107
|
try {
|
|
106
|
-
buf = await readBody(req,
|
|
108
|
+
buf = await readBody(req, 300 * 1024 * 1024);
|
|
107
109
|
} catch (error) {
|
|
108
110
|
if (error.status === 413) {
|
|
109
|
-
throw Object.assign(new Error('
|
|
111
|
+
throw Object.assign(new Error('附件过大:图文/PDF≤50MB,音频≤100MB,视频≤200MB,合计≤250MB'), { status: 413 });
|
|
110
112
|
}
|
|
111
113
|
throw error;
|
|
112
114
|
}
|
|
@@ -251,6 +253,19 @@ export async function reportProgress(cfg, payload) {
|
|
|
251
253
|
}
|
|
252
254
|
}
|
|
253
255
|
|
|
256
|
+
/** 面板重载后会签发新 taskId,必须回填,避免后续进度再次创建镜像任务。 */
|
|
257
|
+
export async function reportJobProgress(cfg, jobs, jobId, payload) {
|
|
258
|
+
const result = await reportProgress(cfg, {
|
|
259
|
+
...payload,
|
|
260
|
+
taskId: jobs.get(jobId)?.panelTaskId,
|
|
261
|
+
});
|
|
262
|
+
const taskId = String(result?.taskId || '').trim();
|
|
263
|
+
if (taskId && taskId !== jobs.get(jobId)?.panelTaskId) {
|
|
264
|
+
jobs.update(jobId, { panelTaskId: taskId });
|
|
265
|
+
}
|
|
266
|
+
return result;
|
|
267
|
+
}
|
|
268
|
+
|
|
254
269
|
/** Ask panel host to open a DSH conversation with this Agent's skill + prompt. */
|
|
255
270
|
export async function requestKickoff(cfg, payload) {
|
|
256
271
|
if (!cfg.callbackUrl || !cfg.callbackToken) return null;
|
|
@@ -294,238 +309,84 @@ export async function requestRunPermit(cfg, { projectPath, jobId }) {
|
|
|
294
309
|
|
|
295
310
|
/** Seed packaged skill into project so cwd-local DSH discovery finds it. */
|
|
296
311
|
export function seedSkillIntoProject(projectDir, packageRoot, skillId) {
|
|
297
|
-
const src = path.join(packageRoot, 'skills', skillId
|
|
298
|
-
if (!projectDir || !fs.existsSync(src)) return null;
|
|
312
|
+
const src = path.join(packageRoot, 'skills', skillId);
|
|
313
|
+
if (!projectDir || !fs.existsSync(path.join(src, 'SKILL.md'))) return null;
|
|
299
314
|
const destDir = ensureDir(path.join(projectDir, '.agents', 'skills', skillId));
|
|
300
|
-
|
|
301
|
-
fs.
|
|
302
|
-
return
|
|
315
|
+
// 整个 skill 目录一起播种:EXEC.md 与 scripts 才能被项目内 Agent 直接调用
|
|
316
|
+
fs.cpSync(src, destDir, { recursive: true, force: true });
|
|
317
|
+
return path.join(destDir, 'SKILL.md');
|
|
303
318
|
}
|
|
304
319
|
|
|
305
320
|
/** explainroo 的成片是 out/video.mp4。build/segments/seg-05.mp4 和 draft 渲完会删,不能当成片。 */
|
|
306
|
-
export function isIntermediateMp4(filePath) {
|
|
307
|
-
const base = path.basename(String(filePath || '')).toLowerCase();
|
|
308
|
-
if (/^seg[-_]\d+\.mp4$/.test(base)) return true;
|
|
309
|
-
if (/^draft([-.]|$)/.test(base)) return true;
|
|
310
|
-
const parts = String(filePath || '').split(/[/\\]/).map((part) => part.toLowerCase());
|
|
311
|
-
return parts.includes('build') || parts.includes('segments');
|
|
312
|
-
}
|
|
313
321
|
|
|
314
|
-
|
|
315
|
-
export function rescueMissingFilm(filePath) {
|
|
316
|
-
const file = String(filePath || '');
|
|
317
|
-
if (!file) return '';
|
|
318
|
-
if (fs.existsSync(file) && !isIntermediateMp4(file)) return file;
|
|
319
|
-
const dir = path.dirname(file);
|
|
320
|
-
if (!fs.existsSync(dir)) return '';
|
|
321
|
-
const stem = path.basename(file, path.extname(file)).toLowerCase();
|
|
322
|
-
if (!stem) return '';
|
|
323
|
-
let best = null;
|
|
324
|
-
let names = [];
|
|
325
|
-
try { names = fs.readdirSync(dir); } catch { return ''; }
|
|
326
|
-
for (const name of names) {
|
|
327
|
-
if (!name.toLowerCase().endsWith('.mp4')) continue;
|
|
328
|
-
if (!name.toLowerCase().startsWith(stem)) continue;
|
|
329
|
-
const full = path.join(dir, name);
|
|
330
|
-
if (isIntermediateMp4(full)) continue;
|
|
331
|
-
let st;
|
|
332
|
-
try { st = fs.statSync(full); } catch { continue; }
|
|
333
|
-
if (!st.isFile()) continue;
|
|
334
|
-
if (!best || st.mtimeMs > best.mtimeMs) best = { path: full, mtimeMs: st.mtimeMs, size: st.size };
|
|
335
|
-
}
|
|
336
|
-
return best ? best.path : '';
|
|
337
|
-
}
|
|
322
|
+
export { isIntermediateMp4, rescueMissingFilm, findLatestMp4, locateFilm, locateJobFilm, chooseDeliverableFilm, filmHitFields };
|
|
338
323
|
|
|
339
|
-
|
|
340
|
-
const found = [];
|
|
341
|
-
if (!rootDir || !fs.existsSync(rootDir)) return found;
|
|
342
|
-
const walk = (dir, depth) => {
|
|
343
|
-
if (depth > maxDepth) return;
|
|
344
|
-
let entries;
|
|
345
|
-
try {
|
|
346
|
-
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
347
|
-
} catch {
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
for (const ent of entries) {
|
|
351
|
-
if (ent.name === 'node_modules' || ent.name === '.git' || ent.name === '.venv') continue;
|
|
352
|
-
const full = path.join(dir, ent.name);
|
|
353
|
-
if (ent.isDirectory()) walk(full, depth + 1);
|
|
354
|
-
else if (ent.isFile() && /\.mp4$/i.test(ent.name)) {
|
|
355
|
-
try {
|
|
356
|
-
const st = fs.statSync(full);
|
|
357
|
-
found.push({ path: full, mtime: st.mtimeMs, size: st.size });
|
|
358
|
-
} catch {
|
|
359
|
-
/* skip */
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
};
|
|
364
|
-
walk(rootDir, 0);
|
|
365
|
-
return found;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
function pickFilm(found) {
|
|
369
|
-
if (!found.length) return null;
|
|
370
|
-
found.sort((a, b) => {
|
|
371
|
-
const ai = isIntermediateMp4(a.path) ? 1 : 0;
|
|
372
|
-
const bi = isIntermediateMp4(b.path) ? 1 : 0;
|
|
373
|
-
if (ai !== bi) return ai - bi;
|
|
374
|
-
return b.mtime - a.mtime;
|
|
375
|
-
});
|
|
376
|
-
const best = found[0];
|
|
377
|
-
if (!best || isIntermediateMp4(best.path)) return null;
|
|
378
|
-
return best;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
/** Newest deliverable MP4. Root-level `<name>.mp4` wins over `out/video.mp4`. */
|
|
382
|
-
export function findLatestMp4(rootDir, { maxDepth = 6, sinceMs = 0 } = {}) {
|
|
383
|
-
const since = Number(sinceMs) || 0;
|
|
384
|
-
const found = collectMp4(rootDir, maxDepth).filter((hit) => !since || hit.mtime >= since);
|
|
385
|
-
return pickFilm(found);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
/** roots: directory string, or { dir, sinceMs, maxDepth }. */
|
|
389
|
-
export function locateFilm(roots) {
|
|
390
|
-
const found = [];
|
|
391
|
-
for (const root of roots || []) {
|
|
392
|
-
const dir = typeof root === 'string' ? root : root?.dir;
|
|
393
|
-
const sinceMs = typeof root === 'string' ? 0 : Number(root?.sinceMs) || 0;
|
|
394
|
-
const maxDepth = typeof root === 'string' ? 6 : root?.maxDepth || 6;
|
|
395
|
-
found.push(...collectMp4(dir, maxDepth).filter((hit) => !sinceMs || hit.mtime >= sinceMs));
|
|
396
|
-
}
|
|
397
|
-
return pickFilm(found);
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
export function locateJobFilm(job, cfg) {
|
|
401
|
-
if (!job) return null;
|
|
402
|
-
const roots = Array.isArray(job.filmRoots) && job.filmRoots.length
|
|
403
|
-
? [...job.filmRoots]
|
|
404
|
-
: [];
|
|
405
|
-
const dir = job.projectPath || (job.artifact && !String(job.artifact).toLowerCase().endsWith('.mp4') ? job.artifact : '');
|
|
406
|
-
if (dir && !roots.some((root) => (typeof root === 'string' ? root : root?.dir) === dir)) {
|
|
407
|
-
roots.unshift({ dir, sinceMs: 0 });
|
|
408
|
-
}
|
|
409
|
-
const sinceMs = Date.parse(job.createdAt);
|
|
410
|
-
if (cfg?.engineRoot && Number.isFinite(sinceMs)) {
|
|
411
|
-
const engineFilms = path.join(cfg.engineRoot, 'films');
|
|
412
|
-
if (!roots.some((root) => (typeof root === 'string' ? root : root?.dir) === engineFilms)) {
|
|
413
|
-
roots.push({ dir: engineFilms, sinceMs });
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
return locateFilm(roots);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
/** Poll until an MP4 appears; updates job + panel progress. */
|
|
324
|
+
/** 监视成片:支持改名 / 二次生成;首次就绪后仍短时跟踪更新的文件。 */
|
|
420
325
|
export function watchForFilm(cfg, jobs, jobId, {
|
|
421
326
|
projectPath,
|
|
422
327
|
title,
|
|
423
328
|
intervalMs = 4000,
|
|
424
329
|
timeoutMs = 2 * 60 * 60 * 1000,
|
|
330
|
+
followNewerMs = 20 * 60 * 1000,
|
|
425
331
|
} = {}) {
|
|
426
332
|
const started = Date.now();
|
|
333
|
+
let firstReadyAt = 0;
|
|
334
|
+
const adopt = async (hit) => {
|
|
335
|
+
if (!hit?.path) return false;
|
|
336
|
+
const job = jobs.get(jobId);
|
|
337
|
+
if (!job) return false;
|
|
338
|
+
if (job.outputMp4 === hit.path && job.status === 'done' && job.phase === 'film') return true;
|
|
339
|
+
const fields = filmHitFields(hit);
|
|
340
|
+
jobs.update(jobId, fields);
|
|
341
|
+
await reportJobProgress(cfg, jobs, jobId, {
|
|
342
|
+
title: title || jobs.get(jobId)?.title,
|
|
343
|
+
progress: 100,
|
|
344
|
+
message: fields.message,
|
|
345
|
+
done: true,
|
|
346
|
+
artifact: hit.path,
|
|
347
|
+
});
|
|
348
|
+
if (!firstReadyAt) firstReadyAt = Date.now();
|
|
349
|
+
return true;
|
|
350
|
+
};
|
|
427
351
|
const tick = async () => {
|
|
428
352
|
const job = jobs.get(jobId);
|
|
429
353
|
if (!job || job.status === 'failed' || job.status === 'cancelled') return;
|
|
430
|
-
const
|
|
431
|
-
|
|
432
|
-
if (
|
|
433
|
-
const
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
status: 'done',
|
|
439
|
-
progress: 100,
|
|
440
|
-
phase: 'film',
|
|
441
|
-
message,
|
|
442
|
-
outputMp4: rescued,
|
|
443
|
-
artifact: rescued,
|
|
444
|
-
filmBytes: size,
|
|
445
|
-
filmAt: new Date().toISOString(),
|
|
446
|
-
});
|
|
447
|
-
await reportProgress(cfg, {
|
|
448
|
-
taskId: jobs.get(jobId)?.panelTaskId,
|
|
449
|
-
title: title || jobs.get(jobId)?.title,
|
|
450
|
-
progress: 100,
|
|
451
|
-
message,
|
|
452
|
-
done: true,
|
|
453
|
-
artifact: rescued,
|
|
454
|
-
});
|
|
354
|
+
const probe = { ...job, projectPath: projectPath || job.projectPath, artifact: job.artifact };
|
|
355
|
+
const hit = chooseDeliverableFilm(probe, cfg);
|
|
356
|
+
if (hit) {
|
|
357
|
+
const changed = hit.path !== String(job.outputMp4 || '');
|
|
358
|
+
await adopt(hit);
|
|
359
|
+
const followUntil = (firstReadyAt || Date.now()) + followNewerMs;
|
|
360
|
+
if (Date.now() < followUntil || changed) {
|
|
361
|
+
setTimeout(() => void tick(), intervalMs);
|
|
455
362
|
return;
|
|
456
363
|
}
|
|
364
|
+
return;
|
|
457
365
|
}
|
|
458
|
-
|
|
459
|
-
if (hit && !isIntermediateMp4(hit.path)) {
|
|
460
|
-
const message = `成片已就绪 · ${path.basename(hit.path)}`;
|
|
366
|
+
if (Date.now() - started > timeoutMs) {
|
|
461
367
|
jobs.update(jobId, {
|
|
462
368
|
status: 'done',
|
|
463
369
|
progress: 100,
|
|
464
|
-
phase: '
|
|
465
|
-
message,
|
|
466
|
-
outputMp4: hit.path,
|
|
467
|
-
artifact: hit.path,
|
|
468
|
-
filmBytes: hit.size,
|
|
469
|
-
filmAt: new Date().toISOString(),
|
|
370
|
+
phase: 'stalled',
|
|
371
|
+
message: '等待成片超时 · 可打开工程目录或 DSH 会话查看',
|
|
470
372
|
});
|
|
471
|
-
await
|
|
472
|
-
taskId: jobs.get(jobId)?.panelTaskId,
|
|
473
|
-
title: title || jobs.get(jobId)?.title,
|
|
373
|
+
await reportJobProgress(cfg, jobs, jobId, {
|
|
474
374
|
progress: 100,
|
|
475
|
-
message,
|
|
375
|
+
message: '等待成片超时',
|
|
476
376
|
done: true,
|
|
477
|
-
artifact:
|
|
377
|
+
artifact: projectPath || job.projectPath,
|
|
478
378
|
});
|
|
479
379
|
return;
|
|
480
380
|
}
|
|
481
|
-
if (
|
|
482
|
-
if (hit) {
|
|
483
|
-
const message = `成片已就绪 · ${path.basename(hit.path)}`;
|
|
484
|
-
jobs.update(jobId, {
|
|
485
|
-
status: 'done',
|
|
486
|
-
progress: 100,
|
|
487
|
-
phase: 'film',
|
|
488
|
-
message,
|
|
489
|
-
outputMp4: hit.path,
|
|
490
|
-
artifact: hit.path,
|
|
491
|
-
filmBytes: hit.size,
|
|
492
|
-
filmAt: new Date().toISOString(),
|
|
493
|
-
});
|
|
494
|
-
await reportProgress(cfg, {
|
|
495
|
-
taskId: jobs.get(jobId)?.panelTaskId,
|
|
496
|
-
title: title || jobs.get(jobId)?.title,
|
|
497
|
-
progress: 100,
|
|
498
|
-
message,
|
|
499
|
-
done: true,
|
|
500
|
-
artifact: hit.path,
|
|
501
|
-
});
|
|
502
|
-
} else {
|
|
503
|
-
jobs.update(jobId, {
|
|
504
|
-
status: 'done',
|
|
505
|
-
progress: 100,
|
|
506
|
-
phase: 'stalled',
|
|
507
|
-
message: '等待成片超时 · 可打开工程目录或 DSH 会话查看',
|
|
508
|
-
});
|
|
509
|
-
await reportProgress(cfg, {
|
|
510
|
-
taskId: jobs.get(jobId)?.panelTaskId,
|
|
511
|
-
progress: 100,
|
|
512
|
-
message: '等待成片超时',
|
|
513
|
-
done: true,
|
|
514
|
-
artifact: projectPath,
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
return;
|
|
518
|
-
}
|
|
519
|
-
if (job.status === 'running' || job.phase === 'dsh') {
|
|
381
|
+
if (job.status === 'running' || job.phase === 'dsh' || job.phase === 'inpanel') {
|
|
520
382
|
jobs.update(jobId, {
|
|
521
|
-
phase: 'dsh',
|
|
383
|
+
phase: job.phase === 'inpanel' ? 'inpanel' : 'dsh',
|
|
522
384
|
message: job.kickoffOk === false
|
|
523
385
|
? (job.message || '等待手动开拍 / 成片')
|
|
524
|
-
: '
|
|
386
|
+
: (job.message && String(job.message).includes('面板') ? job.message : '创作中 · 完成后将自动显示成片'),
|
|
525
387
|
progress: Math.min(90, Math.max(Number(job.progress) || 50, 50)),
|
|
526
388
|
});
|
|
527
|
-
await
|
|
528
|
-
taskId: jobs.get(jobId)?.panelTaskId,
|
|
389
|
+
await reportJobProgress(cfg, jobs, jobId, {
|
|
529
390
|
progress: jobs.get(jobId)?.progress ?? 55,
|
|
530
391
|
message: jobs.get(jobId)?.message,
|
|
531
392
|
});
|
|
@@ -576,54 +437,33 @@ export function createAgentServer({ root, studioDir, api }) {
|
|
|
576
437
|
const jobs = new JobStore(cfg.workspace);
|
|
577
438
|
const studio = studioDir || path.join(root, 'studio');
|
|
578
439
|
|
|
579
|
-
//
|
|
440
|
+
// 进程重启后:重扫成片(改名/二次生成/路径失效),否则恢复 watch
|
|
580
441
|
for (const j of jobs.list()) {
|
|
581
|
-
const
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
442
|
+
const hit = chooseDeliverableFilm(j, cfg);
|
|
443
|
+
const missing = j.outputMp4 && !fs.existsSync(j.outputMp4);
|
|
444
|
+
const bad = j.outputMp4 && isIntermediateMp4(j.outputMp4);
|
|
445
|
+
const shouldAdopt = hit && (
|
|
446
|
+
missing || bad || !j.outputMp4 || j.outputMp4 !== hit.path
|
|
447
|
+
|| j.status === 'running'
|
|
448
|
+
);
|
|
449
|
+
if (shouldAdopt && hit) {
|
|
450
|
+
const fields = filmHitFields(hit);
|
|
451
|
+
jobs.update(j.id, fields);
|
|
452
|
+
if (j.status === 'running') {
|
|
453
|
+
void reportJobProgress(cfg, jobs, j.id, {
|
|
454
|
+
title: j.title,
|
|
591
455
|
progress: 100,
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
artifact: late.path,
|
|
596
|
-
filmBytes: late.size,
|
|
597
|
-
filmAt: new Date().toISOString(),
|
|
456
|
+
message: fields.message,
|
|
457
|
+
done: true,
|
|
458
|
+
artifact: hit.path,
|
|
598
459
|
});
|
|
599
|
-
continue;
|
|
600
460
|
}
|
|
601
|
-
|
|
461
|
+
continue;
|
|
602
462
|
}
|
|
603
463
|
const waiting = j.status === 'running' || (j.outputMp4 && isIntermediateMp4(j.outputMp4));
|
|
604
464
|
if (!waiting) continue;
|
|
605
465
|
const projectPath = j.projectPath || (j.artifact && !String(j.artifact).endsWith('.mp4') ? j.artifact : null);
|
|
606
|
-
|
|
607
|
-
if (hit && !isIntermediateMp4(hit.path)) {
|
|
608
|
-
jobs.update(j.id, {
|
|
609
|
-
status: 'done',
|
|
610
|
-
progress: 100,
|
|
611
|
-
phase: 'film',
|
|
612
|
-
message: `成片已就绪 · ${path.basename(hit.path)}`,
|
|
613
|
-
outputMp4: hit.path,
|
|
614
|
-
artifact: hit.path,
|
|
615
|
-
filmBytes: hit.size,
|
|
616
|
-
filmAt: new Date().toISOString(),
|
|
617
|
-
});
|
|
618
|
-
void reportProgress(cfg, {
|
|
619
|
-
taskId: j.panelTaskId,
|
|
620
|
-
title: j.title,
|
|
621
|
-
progress: 100,
|
|
622
|
-
message: `成片已就绪 · ${path.basename(hit.path)}`,
|
|
623
|
-
done: true,
|
|
624
|
-
artifact: hit.path,
|
|
625
|
-
});
|
|
626
|
-
} else if (projectPath && fs.existsSync(projectPath)) {
|
|
466
|
+
if (projectPath && fs.existsSync(projectPath)) {
|
|
627
467
|
jobs.update(j.id, {
|
|
628
468
|
phase: 'dsh',
|
|
629
469
|
message: '进程已恢复 · 继续等待成片',
|
|
@@ -637,8 +477,7 @@ export function createAgentServer({ root, studioDir, api }) {
|
|
|
637
477
|
message: '进程中断 · 无法恢复监视(工程目录缺失)',
|
|
638
478
|
progress: Number(j.progress) || 0,
|
|
639
479
|
});
|
|
640
|
-
void
|
|
641
|
-
taskId: j.panelTaskId,
|
|
480
|
+
void reportJobProgress(cfg, jobs, j.id, {
|
|
642
481
|
progress: Number(j.progress) || 0,
|
|
643
482
|
message: '进程中断 · 任务已标记失败',
|
|
644
483
|
failed: true,
|
|
@@ -674,33 +513,37 @@ export function createAgentServer({ root, studioDir, api }) {
|
|
|
674
513
|
});
|
|
675
514
|
}
|
|
676
515
|
|
|
516
|
+
if (pathname === '/api/voice-options' && req.method === 'GET') {
|
|
517
|
+
return sendJson(res, 200, buildVoiceOptionsFromEnv(process.env));
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
|
|
677
521
|
if (pathname === '/api/jobs' && req.method === 'GET') {
|
|
678
|
-
|
|
522
|
+
const list = jobs.list().map((j) => {
|
|
523
|
+
const hit = chooseDeliverableFilm(j, cfg);
|
|
524
|
+
if (hit && (!j.outputMp4 || !fs.existsSync(j.outputMp4) || isIntermediateMp4(j.outputMp4) || hit.path !== j.outputMp4)) {
|
|
525
|
+
jobs.update(j.id, filmHitFields(hit));
|
|
526
|
+
return fillFromBrief(jobs.get(j.id) || j);
|
|
527
|
+
}
|
|
528
|
+
return fillFromBrief(j);
|
|
529
|
+
});
|
|
530
|
+
return sendJson(res, 200, { jobs: list });
|
|
679
531
|
}
|
|
680
532
|
if (req.method === 'GET' && /^\/api\/jobs\/[^/]+\/film$/.test(pathname)) {
|
|
681
533
|
const id = decodeURIComponent(pathname.slice('/api/jobs/'.length, -'/film'.length));
|
|
682
534
|
const job = jobs.get(id);
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
const
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
jobs.update(job.id, {
|
|
691
|
-
status: 'done',
|
|
692
|
-
progress: 100,
|
|
693
|
-
phase: 'film',
|
|
694
|
-
message: `成片已就绪 · ${path.basename(late.path)}`,
|
|
695
|
-
outputMp4: late.path,
|
|
696
|
-
artifact: late.path,
|
|
697
|
-
filmBytes: late.size,
|
|
698
|
-
filmAt: new Date().toISOString(),
|
|
699
|
-
});
|
|
700
|
-
file = late.path;
|
|
535
|
+
if (!job) return sendJson(res, 404, { error: 'job not found' });
|
|
536
|
+
let file = String(job.outputMp4 || '');
|
|
537
|
+
if (!file || !fs.existsSync(file) || isIntermediateMp4(file)) {
|
|
538
|
+
const hit = chooseDeliverableFilm(job, cfg);
|
|
539
|
+
if (hit) {
|
|
540
|
+
jobs.update(id, filmHitFields(hit));
|
|
541
|
+
file = hit.path;
|
|
701
542
|
}
|
|
702
543
|
}
|
|
703
|
-
if (!file || !file.toLowerCase().endsWith('.mp4') || !fs.existsSync(file))
|
|
544
|
+
if (!file || !file.toLowerCase().endsWith('.mp4') || !fs.existsSync(file)) {
|
|
545
|
+
return sendJson(res, 404, { error: '成片还没有' });
|
|
546
|
+
}
|
|
704
547
|
return serveLocalFile(req, res, file);
|
|
705
548
|
}
|
|
706
549
|
if (pathname.startsWith('/api/jobs/') && req.method === 'GET') {
|
|
@@ -716,6 +559,30 @@ export function createAgentServer({ root, studioDir, api }) {
|
|
|
716
559
|
return sendJson(res, 200, { ok: true, id });
|
|
717
560
|
}
|
|
718
561
|
|
|
562
|
+
|
|
563
|
+
if (pathname === '/api/panel/run' && req.method === 'POST') {
|
|
564
|
+
try {
|
|
565
|
+
const { startPanelRun } = await import('../_shared/lib/panel-run-route.mjs');
|
|
566
|
+
const body = await readJsonBody(req);
|
|
567
|
+
const result = await startPanelRun({
|
|
568
|
+
cfg,
|
|
569
|
+
jobs,
|
|
570
|
+
packageRoot: root,
|
|
571
|
+
skillId: cfg.agentId,
|
|
572
|
+
body,
|
|
573
|
+
reportProgress,
|
|
574
|
+
reportJobProgress,
|
|
575
|
+
requestRunPermit,
|
|
576
|
+
seedSkillIntoProject,
|
|
577
|
+
ensureDir,
|
|
578
|
+
writeJson,
|
|
579
|
+
});
|
|
580
|
+
sendJson(res, 202, result);
|
|
581
|
+
} catch (error) {
|
|
582
|
+
sendJson(res, error.status || 400, { error: error.message || String(error), code: error.code });
|
|
583
|
+
}
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
719
586
|
if (pathname === '/api/optimize-prompt' && req.method === 'POST') {
|
|
720
587
|
if (cfg.member !== true) {
|
|
721
588
|
sendJson(res, 403, { error: '会员专属,请先开通会员' });
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"id": "biutalk",
|
|
4
4
|
"name": "BiuTalk",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "2.0.0",
|
|
6
6
|
"publisher": "Biunow",
|
|
7
7
|
"description": "BiuTalk 解说视频 Studio:模板、尺寸、附件与本地渲染引擎。",
|
|
8
8
|
"entry": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"shared": [
|
|
19
19
|
"ffmpeg@7",
|
|
20
20
|
"chromium@131",
|
|
21
|
+
"bn-npm@1",
|
|
21
22
|
"biutalk-npm@1"
|
|
22
23
|
]
|
|
23
24
|
},
|
|
@@ -47,8 +48,8 @@
|
|
|
47
48
|
"requiresEntitlement": "export"
|
|
48
49
|
},
|
|
49
50
|
"integrity": {
|
|
50
|
-
"sha256": "
|
|
51
|
-
"signature": "
|
|
51
|
+
"sha256": "573d415d25944080682c802819a8bbeee6c1f7cc82747d853afb066e9b16dd5b",
|
|
52
|
+
"signature": "TZiertAVK9k1WRdfPGUuYsqaQEGp57lKOEEvWBejTK7+KCRhUc7aRsnVvNYgJSep7fGqU82+vsMzj3dVVGiCBg==",
|
|
52
53
|
"signedBy": "publisher-key"
|
|
53
54
|
}
|
|
54
55
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# BiuTalk 执行卡(先读这张)
|
|
2
|
+
|
|
3
|
+
变量:`SKILL` = 本文件所在目录;`ENGINE` = `brief.json.engineRoot` 或面板 settings.engineRoots.biutalk;成片工程 = 含 `video.json` 的目录(通常是 `videos/<projectSlug>`)。
|
|
4
|
+
|
|
5
|
+
## 0. 开工前
|
|
6
|
+
- 没有 `run-permit.json` 不许开工;直聊无 permit → `POST /agents/gate/begin` 后停止。
|
|
7
|
+
- `brief.json` 是合同:不追问 intake,不改 title / look / size / pace。
|
|
8
|
+
- 只读:`brief.json`、`PROMPT.md`、`PROJECT_CARD.md`。
|
|
9
|
+
- **禁止整份打开** `ENGINE/AGENTS.md`(71KB)。需要 API 细节时按关键词检索 20–40 行:
|
|
10
|
+
`rg -n "### Text|### Shapes|s\.box|s\.arrow" "$ENGINE/AGENTS.md"`(Windows 用 `Select-String -Context 2,12`)。
|
|
11
|
+
- 一次只写一个文件:先 `script.md`,再 `scenes.js`。
|
|
12
|
+
|
|
13
|
+
## 1. 预检(必须 ok:true)
|
|
14
|
+
```bash
|
|
15
|
+
node "$SKILL/scripts/doctor.mjs" --project . --engine "$ENGINE" --json
|
|
16
|
+
```
|
|
17
|
+
`ok:false` 按 `hint` 修。模型未下载只在首次 `voice` 时联网拉取,不算失败。
|
|
18
|
+
|
|
19
|
+
## 2. 工程骨架(幂等,只跑一次)
|
|
20
|
+
```bash
|
|
21
|
+
node "$SKILL/scripts/scaffold.mjs" --project . --engine "$ENGINE" --json
|
|
22
|
+
```
|
|
23
|
+
输出 `projectPath`、`mainFile: scenes.js`、`scriptFile: script.md`。已有 `video.json` 不覆盖;重置才加 `--force`。
|
|
24
|
+
|
|
25
|
+
## 3. 口播稿 script.md(先写,决定全片时长)
|
|
26
|
+
- 每镜 `## scene-id`,id 必须与 `scenes.js` 函数同名;从 `hook / steps / outro` 起步。
|
|
27
|
+
- 每镜 1–3 句、4–15 秒;全片 45–120 秒。中文约 200 字/分钟,英文 150 词/分钟。
|
|
28
|
+
- 短句、口语、只讲事实;不编数字,不用破折号、口号、三段排比。
|
|
29
|
+
- 每个句子至少一个 `[#marker]`,让画面按时切换。
|
|
30
|
+
- 易读错处写成 `{CLI|C L I}`、`{v2.1|version two point one}`、`{example.com|example dot com}`。
|
|
31
|
+
- 场景参数:`## intro {hold=1.5 min=3 transition=wipe}`;`>` 开头的行不朗读。
|
|
32
|
+
|
|
33
|
+
## 4. 画面 scenes.js(只改这个文件)
|
|
34
|
+
- 一个函数一镜,所有元素给 `at`(秒 / 单词 / `#marker`),需要时给 `out`。
|
|
35
|
+
- 复用模板已有写法;禁止新建渲染器,禁止改引擎 `core/` 或 `video.json` 之外的配置。
|
|
36
|
+
- 布局在 `s.safe` 内:标题 80–110px,标签 40–56px,小字 ≥32px;同屏 ≤6 个元素;每 2–4 秒出现新变化。
|
|
37
|
+
- 常用 API:`s.title / s.subtitle / s.text({size,font,at,out})`、`s.box / s.icon / s.arrow(idA,idB)`、`s.number`、`s.row / s.col / s.grid`。
|
|
38
|
+
- 关键帧优先 `at: 'word'` 或 `at: '#marker'`,不要写死秒数。
|
|
39
|
+
|
|
40
|
+
## 5. 配音 → 机检(不看图)
|
|
41
|
+
```bash
|
|
42
|
+
node "$ENGINE/bin/explainroo.js" voice .
|
|
43
|
+
node "$ENGINE/bin/explainroo.js" check . --json
|
|
44
|
+
node "$SKILL/scripts/qc.mjs" --project . --engine "$ENGINE" --json
|
|
45
|
+
```
|
|
46
|
+
`check` 的 error / warn 必须清零;`qc.ok:false` 只读 `findings[].hint` 修,不要描述图片。
|
|
47
|
+
|
|
48
|
+
需要人看画面时只生成静帧和接触表,交给用户看:
|
|
49
|
+
```bash
|
|
50
|
+
node "$ENGINE/bin/explainroo.js" still .
|
|
51
|
+
node "$ENGINE/bin/explainroo.js" sheet .
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 6. 草稿 → 终版 → 验收
|
|
55
|
+
```bash
|
|
56
|
+
node "$ENGINE/bin/explainroo.js" render . --draft --workers 6
|
|
57
|
+
node "$SKILL/scripts/qc.mjs" --project . --engine "$ENGINE" --video ./out/draft.mp4 --json
|
|
58
|
+
node "$ENGINE/bin/explainroo.js" render . --workers 6
|
|
59
|
+
node "$ENGINE/bin/explainroo.js" verify . --json
|
|
60
|
+
```
|
|
61
|
+
`qc.ok:true` 且 `verify` 无 error 才算完成;无音轨、响度偏差、黑帧按 hint 修。
|
|
62
|
+
|
|
63
|
+
## 7. 交付
|
|
64
|
+
- 成片:`out/video.mp4`(多尺寸为 `out/video-<size>.mp4`),同目录带 `.srt` 和 `.cover.jpg`。
|
|
65
|
+
- 回复只给:路径、时长、分辨率、`qc.ok`、verify 的响度与口播清晰度。不贴渲染日志。
|
|
66
|
+
|
|
67
|
+
## 硬禁令
|
|
68
|
+
- 不生图、不下载素材、不换主题;不整份读 AGENTS.md;不先渲整片;不加 watermark。
|
|
69
|
+
- 输出最多 20 行。
|
package/skills/biutalk/SKILL.md
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: biutalk
|
|
3
|
-
description: Create narrated explainer videos with the explainroo engine from a BN Panel brief or a user topic. Use when the user opens BiuTalk Studio, mentions explainer/解说视频, or points at a workspace brief.json /
|
|
3
|
+
description: Create narrated explainer videos with the explainroo engine from a BN Panel brief or a user topic. Use when the user opens BiuTalk Studio, mentions explainer/解说视频, or points at a workspace brief.json / PROMPT.md / START_IN_DSH.md.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# BiuTalk (BN Panel)
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## 授权门(强制)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
没有有效 `run-permit.json` 不开造。直聊无 permit:调用 `POST /agents/gate/begin`(`agentId: biutalk`),引导用户去 Studio 立项,然后停止。
|
|
11
|
+
校验:`node studio/assert-panel-permit.mjs --project <cwd> --agent biutalk`。
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
## 执行卡
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
**先读同目录 `EXEC.md`(约 3KB),按它的 7 步走。** 不要整份读 explainroo 的 `AGENTS.md`(71KB);需要 Scene API 细节时按关键词检索 20–40 行。
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
固定路径:
|
|
18
|
+
- 预检 `node "$SKILL/scripts/doctor.mjs" --project . --engine "$ENGINE" --json`
|
|
19
|
+
- 骨架 `node "$SKILL/scripts/scaffold.mjs" --project . --engine "$ENGINE" --json`
|
|
20
|
+
- 机检 `node "$SKILL/scripts/qc.mjs" --project . --engine "$ENGINE" [--video ./out/video.mp4] --json`
|
|
21
|
+
- 引擎 CLI 永远用 `node "$ENGINE/bin/explainroo.js" <cmd>`。
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
2. 若已有 `ENGINE_ROOT`(explainroo),严格按该仓库 `AGENTS.md`:`script.md` → `scenes.js` → `voice` → `check` → `render`。
|
|
20
|
-
3. 尊重 brief:`look`、`size`、`pace`、`prompt`、`urls`、上传素材。
|
|
21
|
-
4. 不编造事实。完成后告知用户 MP4 路径(通常在 `out/`)。
|
|
23
|
+
`brief.json` 是合同:不追问 intake,不改 look / size / pace / title。只改 `script.md` 和 `scenes.js`,不上生图,不加 watermark。完成后只回复成片路径、时长、分辨率、`qc.ok`。
|