@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
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* BiuTalk 预检:先暴露引擎 / 模型 / ffmpeg / Chrome 缺口,避免配音或渲染到一半才失败。
|
|
4
|
+
* node doctor.mjs --project <dir> --engine <dir> [--json]
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { spawnSync } from 'node:child_process';
|
|
9
|
+
|
|
10
|
+
const argv = process.argv.slice(2);
|
|
11
|
+
const opt = (name, def = '') => {
|
|
12
|
+
const i = argv.indexOf(name);
|
|
13
|
+
return i >= 0 ? argv[i + 1] ?? def : def;
|
|
14
|
+
};
|
|
15
|
+
const has = (name) => argv.includes(name);
|
|
16
|
+
const json = has('--json');
|
|
17
|
+
|
|
18
|
+
const project = path.resolve(opt('--project', process.cwd()));
|
|
19
|
+
const engine = path.resolve(opt('--engine', process.env.ENGINE_ROOT || ''));
|
|
20
|
+
|
|
21
|
+
const checks = [];
|
|
22
|
+
const add = (id, ok, detail = '', hint = '', warnOnly = false) => {
|
|
23
|
+
checks.push({ id, ok: !!ok, detail, ...(ok ? {} : { hint }), ...(warnOnly ? { warnOnly: true } : {}) });
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const [maj, min] = process.versions.node.split('.').map(Number);
|
|
27
|
+
add('node', maj > 20 || (maj === 20 && min >= 11), `v${process.versions.node}`, 'explainroo 需要 Node.js 20.11 或更新');
|
|
28
|
+
|
|
29
|
+
add('project', fs.existsSync(project) && fs.statSync(project).isDirectory(), project, '项目目录不存在');
|
|
30
|
+
let writable = false;
|
|
31
|
+
if (fs.existsSync(project)) {
|
|
32
|
+
const probe = path.join(project, '.biutalk-write-test');
|
|
33
|
+
try {
|
|
34
|
+
fs.writeFileSync(probe, 'ok');
|
|
35
|
+
fs.rmSync(probe, { force: true });
|
|
36
|
+
writable = true;
|
|
37
|
+
} catch {
|
|
38
|
+
writable = false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
add('projectWritable', writable, writable ? 'ok' : '不可写', '检查项目目录权限');
|
|
42
|
+
|
|
43
|
+
const bin = engine ? path.join(engine, 'bin', 'explainroo.js') : '';
|
|
44
|
+
add('engine', !!engine && fs.existsSync(engine), engine || '(空)', '设置面板 settings.engineRoots.biutalk 指向 explainroo-main');
|
|
45
|
+
add('engineBin', !!bin && fs.existsSync(bin), bin || '(空)', '引擎缺少 bin/explainroo.js');
|
|
46
|
+
add('engineAgents', !!engine && fs.existsSync(path.join(engine, 'AGENTS.md')), path.join(engine, 'AGENTS.md'), '引擎目录不完整');
|
|
47
|
+
add('engineNpm', !!engine && fs.existsSync(path.join(engine, 'node_modules')), path.join(engine, 'node_modules'), '在引擎目录执行 npm install');
|
|
48
|
+
|
|
49
|
+
const briefPath = path.join(project, 'brief.json');
|
|
50
|
+
if (fs.existsSync(briefPath)) {
|
|
51
|
+
let brief = null;
|
|
52
|
+
try {
|
|
53
|
+
brief = JSON.parse(fs.readFileSync(briefPath, 'utf8').replace(/^\uFEFF/, ''));
|
|
54
|
+
} catch {
|
|
55
|
+
brief = null;
|
|
56
|
+
}
|
|
57
|
+
add('brief', !!brief, brief ? `look=${brief.look || '-'} size=${brief.size || '-'} pace=${brief.pace ?? '-'}` : 'brief.json 无法解析', '重新在 Studio 立项');
|
|
58
|
+
const videoDirs = [];
|
|
59
|
+
const videos = path.join(project, 'videos');
|
|
60
|
+
if (fs.existsSync(videos)) {
|
|
61
|
+
for (const ent of fs.readdirSync(videos, { withFileTypes: true })) {
|
|
62
|
+
if (ent.isDirectory() && fs.existsSync(path.join(videos, ent.name, 'video.json'))) videoDirs.push(ent.name);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (fs.existsSync(path.join(project, 'video.json'))) videoDirs.unshift('.');
|
|
66
|
+
add('videoProject', videoDirs.length > 0, videoDirs.join(', ') || '未初始化', '运行 scaffold.mjs 创建 explainroo 工程');
|
|
67
|
+
} else {
|
|
68
|
+
checks.push({ id: 'brief', ok: true, detail: '直聊模式(无 brief.json)', warnOnly: true });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// 引擎自带 doctor 才是模型 / Chrome / ffmpeg 的真实来源;失败不阻塞工程准备。
|
|
72
|
+
if (bin && fs.existsSync(bin)) {
|
|
73
|
+
const r = spawnSync(process.execPath, [bin, 'doctor', '--json'], {
|
|
74
|
+
cwd: engine,
|
|
75
|
+
encoding: 'utf8',
|
|
76
|
+
timeout: 90000,
|
|
77
|
+
windowsHide: true,
|
|
78
|
+
});
|
|
79
|
+
let report = null;
|
|
80
|
+
try {
|
|
81
|
+
report = JSON.parse(String(r.stdout || '').trim());
|
|
82
|
+
} catch {
|
|
83
|
+
report = null;
|
|
84
|
+
}
|
|
85
|
+
if (report?.checks) {
|
|
86
|
+
for (const c of report.checks) {
|
|
87
|
+
const name = String(c.name || '');
|
|
88
|
+
const map = {
|
|
89
|
+
ffmpeg: { id: 'ffmpeg', hint: '安装 ffmpeg 并加入 PATH' },
|
|
90
|
+
chrome: { id: 'chrome', hint: '在引擎目录执行 npx playwright install chromium,或安装 Chrome' },
|
|
91
|
+
'voice model': { id: 'voiceModel', hint: '首次 voice 会自动下载约 400MB;可先跑 explainroo doctor --fetch' },
|
|
92
|
+
'speech check model': { id: 'speechModel', hint: '首次 check / verify 会自动下载;可先跑 explainroo doctor --fetch' },
|
|
93
|
+
'language model': { id: 'languageModel', hint: '非英语片首次 check 时下载 Whisper small' },
|
|
94
|
+
'espeak-ng': { id: 'espeak', hint: '仅西班牙语 / 法语 / 意大利语 / 葡萄牙语 / 印地语需要' },
|
|
95
|
+
};
|
|
96
|
+
const hit = map[name];
|
|
97
|
+
if (!hit) continue;
|
|
98
|
+
const modelLike = hit.id.endsWith('Model') || hit.id === 'espeak';
|
|
99
|
+
add(hit.id, !!c.ok, String(c.detail || ''), hit.hint, modelLike);
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
add('engineDoctor', true, '引擎 doctor 未返回 JSON(不影响创作)', '', true);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const failCount = checks.filter((c) => !c.ok && !c.warnOnly).length;
|
|
107
|
+
const warnCount = checks.filter((c) => !c.ok && c.warnOnly).length;
|
|
108
|
+
const result = {
|
|
109
|
+
ok: failCount === 0,
|
|
110
|
+
failCount,
|
|
111
|
+
warnCount,
|
|
112
|
+
project,
|
|
113
|
+
engine: engine || null,
|
|
114
|
+
checks,
|
|
115
|
+
};
|
|
116
|
+
if (json) console.log(JSON.stringify(result, null, 2));
|
|
117
|
+
else {
|
|
118
|
+
for (const c of checks) {
|
|
119
|
+
const tag = c.ok ? '[ok] ' : c.warnOnly ? '[warn]' : '[FAIL]';
|
|
120
|
+
console.log(`${tag} ${c.id}${c.detail ? ` — ${c.detail}` : ''}${c.hint ? ` → ${c.hint}` : ''}`);
|
|
121
|
+
}
|
|
122
|
+
console.log(result.ok ? '预检通过' : `预检失败 ${failCount} 项`);
|
|
123
|
+
}
|
|
124
|
+
process.exit(result.ok ? 0 : 1);
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* BiuTalk 机器质检(无视觉模型):
|
|
4
|
+
* check → 布局 / 时长 / 发音问题
|
|
5
|
+
* verify → 成片音轨、响度、黑帧、口播清晰度
|
|
6
|
+
* node qc.mjs --project <dir> --engine <dir> [--video <mp4>] [--json]
|
|
7
|
+
*/
|
|
8
|
+
import fs from 'node:fs';
|
|
9
|
+
import path from 'node:path';
|
|
10
|
+
import { spawnSync } from 'node:child_process';
|
|
11
|
+
|
|
12
|
+
const argv = process.argv.slice(2);
|
|
13
|
+
const opt = (name, def = '') => {
|
|
14
|
+
const i = argv.indexOf(name);
|
|
15
|
+
return i >= 0 ? argv[i + 1] ?? def : def;
|
|
16
|
+
};
|
|
17
|
+
const has = (name) => argv.includes(name);
|
|
18
|
+
const json = has('--json');
|
|
19
|
+
|
|
20
|
+
const project = path.resolve(opt('--project', process.cwd()));
|
|
21
|
+
const engine = path.resolve(opt('--engine', process.env.ENGINE_ROOT || ''));
|
|
22
|
+
const video = opt('--video', '') ? path.resolve(opt('--video')) : '';
|
|
23
|
+
|
|
24
|
+
const findings = [];
|
|
25
|
+
const add = (code, severity, hint, extra = {}) =>
|
|
26
|
+
findings.push({ code, severity, hint: String(hint || '').slice(0, 240), ...extra });
|
|
27
|
+
|
|
28
|
+
const bin = engine ? path.join(engine, 'bin', 'explainroo.js') : '';
|
|
29
|
+
if (!bin || !fs.existsSync(bin)) {
|
|
30
|
+
console.log(JSON.stringify({ ok: false, findings: [{ code: 'ENGINE_MISSING', severity: 'error', hint: '设置 --engine 指向 explainroo-main' }] }));
|
|
31
|
+
process.exit(2);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// --project 可能是立项目录(video.json 在 videos/<slug>/ 里),统一解析到真正的工程目录
|
|
35
|
+
function resolveProject(dir) {
|
|
36
|
+
if (fs.existsSync(path.join(dir, 'video.json'))) return dir;
|
|
37
|
+
const videos = path.join(dir, 'videos');
|
|
38
|
+
if (!fs.existsSync(videos)) return '';
|
|
39
|
+
const found = fs
|
|
40
|
+
.readdirSync(videos, { withFileTypes: true })
|
|
41
|
+
.filter((e) => e.isDirectory() && fs.existsSync(path.join(videos, e.name, 'video.json')))
|
|
42
|
+
.map((e) => {
|
|
43
|
+
const full = path.join(videos, e.name);
|
|
44
|
+
return { full, mtime: fs.statSync(full).mtimeMs };
|
|
45
|
+
})
|
|
46
|
+
.sort((a, b) => b.mtime - a.mtime);
|
|
47
|
+
return found[0]?.full || '';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const projectDir = resolveProject(project);
|
|
51
|
+
if (!projectDir) {
|
|
52
|
+
console.log(JSON.stringify({ ok: false, findings: [{ code: 'NO_PROJECT', severity: 'error', hint: '没有 video.json;先跑 scaffold.mjs' }] }));
|
|
53
|
+
process.exit(2);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const run = (args) => {
|
|
57
|
+
const r = spawnSync(process.execPath, [bin, ...args], {
|
|
58
|
+
cwd: engine,
|
|
59
|
+
encoding: 'utf8',
|
|
60
|
+
timeout: 20 * 60 * 1000,
|
|
61
|
+
maxBuffer: 32 * 1024 * 1024,
|
|
62
|
+
windowsHide: true,
|
|
63
|
+
});
|
|
64
|
+
let data = null;
|
|
65
|
+
const out = String(r.stdout || '').trim();
|
|
66
|
+
try {
|
|
67
|
+
data = JSON.parse(out.slice(out.indexOf('{')));
|
|
68
|
+
} catch {
|
|
69
|
+
data = null;
|
|
70
|
+
}
|
|
71
|
+
return { status: r.status, data, stderr: String(r.stderr || r.error?.message || '').trim() };
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const meta = { project: projectDir };
|
|
75
|
+
const check = run(['check', projectDir, '--json']);
|
|
76
|
+
if (check.data?.issues) {
|
|
77
|
+
meta.duration = check.data.duration;
|
|
78
|
+
meta.scenes = check.data.scenes;
|
|
79
|
+
for (const issue of check.data.issues) {
|
|
80
|
+
const level = issue.level === 'error' ? 'error' : issue.level === 'warn' ? 'warn' : 'hint';
|
|
81
|
+
add(level === 'error' ? 'CHECK_ERROR' : level === 'warn' ? 'CHECK_WARN' : 'CHECK_HINT', level, issue.message, {
|
|
82
|
+
scene: issue.scene || null,
|
|
83
|
+
t: issue.t ?? null,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
87
|
+
add('CHECK_FAILED', 'error', `check 未返回 JSON:${check.stderr || `exit ${check.status}`}`, {});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (video) {
|
|
91
|
+
if (!fs.existsSync(video)) {
|
|
92
|
+
add('MISSING_VIDEO', 'error', video);
|
|
93
|
+
} else {
|
|
94
|
+
const verify = run(['verify', projectDir, '--file', video, '--json']);
|
|
95
|
+
if (verify.data) {
|
|
96
|
+
meta.video = {
|
|
97
|
+
file: verify.data.file,
|
|
98
|
+
duration: verify.data.duration,
|
|
99
|
+
width: verify.data.video?.width || null,
|
|
100
|
+
height: verify.data.video?.height || null,
|
|
101
|
+
};
|
|
102
|
+
meta.loudness = verify.data.loudness || null;
|
|
103
|
+
meta.speech = verify.data.speech ? { matchRate: verify.data.speech.matchRate } : null;
|
|
104
|
+
for (const issue of verify.data.issues || []) {
|
|
105
|
+
const level = issue.level === 'error' ? 'error' : issue.level === 'warn' ? 'warn' : 'hint';
|
|
106
|
+
add(level === 'error' ? 'VERIFY_ERROR' : level === 'warn' ? 'VERIFY_WARN' : 'VERIFY_HINT', level, issue.message, {});
|
|
107
|
+
}
|
|
108
|
+
if (!verify.data.video) add('NO_VIDEO_STREAM', 'error', '成片没有视频流');
|
|
109
|
+
if (!verify.data.audio) add('NO_AUDIO', 'error', '成片没有音轨;voice 未完成或混音失败');
|
|
110
|
+
if (verify.data.video && verify.data.video.width < 720) add('RESOLUTION_LOW', 'error', `分辨率 ${verify.data.video.width}`);
|
|
111
|
+
} else {
|
|
112
|
+
add('VERIFY_FAILED', 'error', `verify 未返回 JSON:${verify.stderr || `exit ${verify.status}`}`, {});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const counts = findings.reduce((acc, f) => ({ ...acc, [f.severity]: (acc[f.severity] || 0) + 1 }), {});
|
|
118
|
+
const result = { ok: !findings.some((f) => f.severity === 'error'), counts, ...meta, findings };
|
|
119
|
+
|
|
120
|
+
if (json) console.log(JSON.stringify(result, null, 2));
|
|
121
|
+
else {
|
|
122
|
+
console.log(`${result.ok ? 'QC 通过' : 'QC 失败'} · ${projectDir}`);
|
|
123
|
+
if (meta.duration) console.log(`时长 ${Number(meta.duration).toFixed(1)}s · ${meta.scenes ?? '?'} 镜`);
|
|
124
|
+
for (const f of findings) {
|
|
125
|
+
const tag = f.severity === 'error' ? '[FAIL]' : f.severity === 'warn' ? '[warn]' : '[hint]';
|
|
126
|
+
console.log(`${tag} ${f.code}${f.scene ? ` ${f.scene}` : ''} — ${f.hint}`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
process.exit(result.ok ? 0 : 1);
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* BiuTalk 工程骨架:定位 / 创建 explainroo 工程,回填 brief,生成 PROJECT_CARD。
|
|
4
|
+
* node scaffold.mjs --project <dir> --engine <dir> [--force] [--json]
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { spawnSync } from 'node:child_process';
|
|
9
|
+
|
|
10
|
+
const argv = process.argv.slice(2);
|
|
11
|
+
const opt = (name, def = '') => {
|
|
12
|
+
const i = argv.indexOf(name);
|
|
13
|
+
return i >= 0 ? argv[i + 1] ?? def : def;
|
|
14
|
+
};
|
|
15
|
+
const has = (name) => argv.includes(name);
|
|
16
|
+
const json = has('--json');
|
|
17
|
+
|
|
18
|
+
const project = path.resolve(opt('--project', process.cwd()));
|
|
19
|
+
const engine = path.resolve(opt('--engine', process.env.ENGINE_ROOT || ''));
|
|
20
|
+
const force = has('--force');
|
|
21
|
+
|
|
22
|
+
const done = (body, code = 0) => {
|
|
23
|
+
if (json) console.log(JSON.stringify(body, null, 2));
|
|
24
|
+
else if (body.ok) console.log(`工程:${body.projectPath}\n主文件:${body.mainFile}\n脚本:${body.scriptFile}`);
|
|
25
|
+
else console.log(`失败:${body.error}${body.hint ? `\n→ ${body.hint}` : ''}`);
|
|
26
|
+
process.exit(code);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const readJson = (file, fallback = null) => {
|
|
30
|
+
try {
|
|
31
|
+
return JSON.parse(fs.readFileSync(file, 'utf8').replace(/^\uFEFF/, ''));
|
|
32
|
+
} catch {
|
|
33
|
+
return fallback;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const slugify = (value) =>
|
|
38
|
+
String(value || 'video')
|
|
39
|
+
.toLowerCase()
|
|
40
|
+
.replace(/[^a-z0-9\u4e00-\u9fff]+/gi, '-')
|
|
41
|
+
.replace(/^-|-$/g, '')
|
|
42
|
+
.slice(0, 48) || 'video';
|
|
43
|
+
|
|
44
|
+
const brief = readJson(path.join(project, 'brief.json')) || {};
|
|
45
|
+
const title = String(brief.title || brief.prompt || path.basename(project)).slice(0, 120);
|
|
46
|
+
const look = String(brief.look || brief.theme || 'paper');
|
|
47
|
+
const size = String(brief.size || 'youtube');
|
|
48
|
+
const pace = Number(brief.pace) || 1;
|
|
49
|
+
const lang = String(brief.language || (/[\u4e00-\u9fff]/.test(`${title}${brief.prompt || ''}`) ? 'zh' : 'en'));
|
|
50
|
+
const projectSlug = String(brief.projectSlug || slugify(title));
|
|
51
|
+
|
|
52
|
+
function findProject() {
|
|
53
|
+
const direct = path.join(project, 'video.json');
|
|
54
|
+
if (fs.existsSync(direct)) return project;
|
|
55
|
+
const videos = path.join(project, 'videos');
|
|
56
|
+
if (!fs.existsSync(videos)) return '';
|
|
57
|
+
const found = fs
|
|
58
|
+
.readdirSync(videos, { withFileTypes: true })
|
|
59
|
+
.filter((e) => e.isDirectory() && fs.existsSync(path.join(videos, e.name, 'video.json')))
|
|
60
|
+
.map((e) => {
|
|
61
|
+
const dir = path.join(videos, e.name);
|
|
62
|
+
return { dir, mtime: fs.statSync(dir).mtimeMs };
|
|
63
|
+
})
|
|
64
|
+
.sort((a, b) => b.mtime - a.mtime);
|
|
65
|
+
return found[0]?.dir || '';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const bin = engine ? path.join(engine, 'bin', 'explainroo.js') : '';
|
|
69
|
+
let projectPath = findProject();
|
|
70
|
+
let created = false;
|
|
71
|
+
|
|
72
|
+
if (!projectPath) {
|
|
73
|
+
if (!bin || !fs.existsSync(bin)) {
|
|
74
|
+
done({ ok: false, error: '找不到 explainroo 引擎', hint: '设置面板 settings.engineRoots.biutalk,或传入 --engine' }, 1);
|
|
75
|
+
}
|
|
76
|
+
projectPath = path.join(project, 'videos', projectSlug);
|
|
77
|
+
const args = [bin, 'init', projectPath, '--theme', look, '--title', title, '--size', size, '--pace', String(pace), '--language', lang];
|
|
78
|
+
const r = spawnSync(process.execPath, args, { cwd: engine, encoding: 'utf8', timeout: 120000, windowsHide: true });
|
|
79
|
+
if (r.status !== 0) {
|
|
80
|
+
// init 已存在会报错;此时按已有工程处理
|
|
81
|
+
if (!fs.existsSync(path.join(projectPath, 'video.json'))) {
|
|
82
|
+
done(
|
|
83
|
+
{
|
|
84
|
+
ok: false,
|
|
85
|
+
error: String(r.stderr || r.error?.message || 'init 失败').trim().slice(0, 400),
|
|
86
|
+
hint: '确认 --theme / --size / --language 合法;引擎需要先 npm install',
|
|
87
|
+
},
|
|
88
|
+
1,
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
created = fs.existsSync(path.join(projectPath, 'video.json'));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const videoJsonPath = path.join(projectPath, 'video.json');
|
|
96
|
+
const videoJson = readJson(videoJsonPath) || {};
|
|
97
|
+
const merged = {
|
|
98
|
+
...videoJson,
|
|
99
|
+
title,
|
|
100
|
+
theme: look,
|
|
101
|
+
size,
|
|
102
|
+
pace,
|
|
103
|
+
watermark: false,
|
|
104
|
+
};
|
|
105
|
+
fs.writeFileSync(videoJsonPath, `${JSON.stringify(merged, null, 2)}\n`);
|
|
106
|
+
|
|
107
|
+
const scriptPath = path.join(projectPath, 'script.md');
|
|
108
|
+
const scriptExists = fs.existsSync(scriptPath);
|
|
109
|
+
const scriptText = scriptExists ? fs.readFileSync(scriptPath, 'utf8') : '';
|
|
110
|
+
const isTemplate =
|
|
111
|
+
!scriptExists ||
|
|
112
|
+
/Most people never think about what happens/.test(scriptText) ||
|
|
113
|
+
/Spoken draft\. Creative direction is in brief\.json/.test(scriptText);
|
|
114
|
+
|
|
115
|
+
const scenesPath = path.join(projectPath, 'scenes.js');
|
|
116
|
+
const scenesText = fs.existsSync(scenesPath) ? fs.readFileSync(scenesPath, 'utf8') : '';
|
|
117
|
+
const isScenesTemplate = !scenesText || /mouse-pointer-click/.test(scenesText) || /The full scene API is in AGENTS\.md/.test(scenesText);
|
|
118
|
+
|
|
119
|
+
if ((isTemplate && isScenesTemplate) || force) {
|
|
120
|
+
const spoken = String(brief.prompt || title).replace(/\s+/g, ' ').trim().slice(0, 280);
|
|
121
|
+
const zh = lang === 'zh';
|
|
122
|
+
fs.writeFileSync(
|
|
123
|
+
scriptPath,
|
|
124
|
+
[
|
|
125
|
+
`# ${title}`,
|
|
126
|
+
'',
|
|
127
|
+
'> 口播草稿:每镜 ##scene-id 必须与 scenes.js 函数同名;[#marker] 标出画面切换点。',
|
|
128
|
+
'',
|
|
129
|
+
'## hook',
|
|
130
|
+
spoken || (zh ? `今天讲一讲:${title}` : `Today we cover: ${title}`),
|
|
131
|
+
'',
|
|
132
|
+
'## steps',
|
|
133
|
+
zh ? '我们分几步看清楚它是什么、关键点是什么、以及怎么用。' : 'We will cover what it is, why it matters, and how to use it.',
|
|
134
|
+
'',
|
|
135
|
+
'## outro {hold=1.5}',
|
|
136
|
+
zh ? '以上就是本期要点,感谢收看。' : 'That is the idea. Thanks for watching.',
|
|
137
|
+
'',
|
|
138
|
+
].join('\n'),
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
// 模板 scenes.js 用到了 hook/steps/outro 的 #marker;草稿稿没有 marker 时替换为不依赖 marker 的最小骨架
|
|
142
|
+
if (isScenesTemplate || force) {
|
|
143
|
+
fs.writeFileSync(
|
|
144
|
+
scenesPath,
|
|
145
|
+
`// 最小骨架:一镜一个函数。真实分镜请按 EXEC.md 第 4 步重写。
|
|
146
|
+
export default {
|
|
147
|
+
hook(s) {
|
|
148
|
+
s.title(${JSON.stringify(title)}, { y: s.safe.y + s.safe.h * 0.38, at: 0 });
|
|
149
|
+
s.icon('sparkles', { y: s.safe.y + s.safe.h * 0.7, size: 130, at: 1, color: 'accent' });
|
|
150
|
+
},
|
|
151
|
+
steps(s) {
|
|
152
|
+
s.text(${JSON.stringify(zh ? '三个要点' : 'Three steps')}, { font: 'display', size: 76, y: s.safe.y + 50, at: 0 });
|
|
153
|
+
const spots = s.row(3, { width: Math.min(1180, s.safe.w - 260) }).map((x) => ({ x, y: s.cy }));
|
|
154
|
+
s.box(${JSON.stringify(zh ? '是什么' : 'What it is')}, { ...spots[0], icon: 'search', color: 'blue', at: 0.4 });
|
|
155
|
+
s.box(${JSON.stringify(zh ? '为什么重要' : 'Why it matters')}, { ...spots[1], icon: 'lightbulb', color: 'green', at: 1.1 });
|
|
156
|
+
s.box(${JSON.stringify(zh ? '怎么用' : 'How to use it')}, { ...spots[2], icon: 'hand', color: 'purple', at: 1.8 });
|
|
157
|
+
},
|
|
158
|
+
outro(s) {
|
|
159
|
+
s.number(3, { suffix: ${JSON.stringify(zh ? ' 个要点' : ' steps')}, y: s.safe.y + s.safe.h * 0.42, at: 0.2 });
|
|
160
|
+
s.subtitle(${JSON.stringify(zh ? '以上就是本期要点' : 'That is the idea')}, { at: 1.2, y: s.safe.y + s.safe.h * 0.62 });
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
`,
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const totalSec = brief.durationSec ?? null;
|
|
169
|
+
const card = `# BiuTalk 工程卡
|
|
170
|
+
|
|
171
|
+
- engine: ${engine}
|
|
172
|
+
- projectPath: ${projectPath}
|
|
173
|
+
- mainFile: scenes.js(只改这个)
|
|
174
|
+
- scriptFile: script.md(先写口播,再写画面)
|
|
175
|
+
- look: ${look}
|
|
176
|
+
- size: ${size}
|
|
177
|
+
- pace: ${pace}
|
|
178
|
+
- 目标时长: ${totalSec ? `${totalSec}s` : '45–120s'}
|
|
179
|
+
|
|
180
|
+
## 只读这些
|
|
181
|
+
- brief.json / PROMPT.md / 本卡。
|
|
182
|
+
- 引擎细节按关键词检索 AGENTS.md,禁止整份打开。
|
|
183
|
+
|
|
184
|
+
## 禁止
|
|
185
|
+
- 改引擎 core/、styles/、video.json 的 theme/size(除本脚本回填)。
|
|
186
|
+
- 生图 API、PNG 素材、watermark。
|
|
187
|
+
- 先渲整片;必须 voice → check → 静帧 → draft → final。
|
|
188
|
+
|
|
189
|
+
## 质检
|
|
190
|
+
- node "$SKILL/scripts/qc.mjs" --project . --engine "$ENGINE" --json
|
|
191
|
+
- node "$ENGINE/bin/explainroo.js" check . --json
|
|
192
|
+
`;
|
|
193
|
+
fs.writeFileSync(path.join(projectPath, 'PROJECT_CARD.md'), card);
|
|
194
|
+
|
|
195
|
+
done({
|
|
196
|
+
ok: true,
|
|
197
|
+
created,
|
|
198
|
+
projectPath,
|
|
199
|
+
mainFile: 'scenes.js',
|
|
200
|
+
scriptFile: 'script.md',
|
|
201
|
+
look,
|
|
202
|
+
size,
|
|
203
|
+
pace,
|
|
204
|
+
language: lang,
|
|
205
|
+
});
|
package/studio/app.js
CHANGED
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
el.textContent = value;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
const { api, fileToBase64, uploadBlockReason, bindPlusMenu, bindCount, renderJobs, addChip, titleFromPrompt, esc } = Composer;
|
|
10
|
+
const { api, fileToBase64, uploadBlockReason, bindPlusMenu, bindCount, renderJobs, addChip, titleFromPrompt, esc , openVoicePicker} = Composer;
|
|
11
11
|
|
|
12
12
|
const state = {
|
|
13
|
+
voice: null,
|
|
13
14
|
look: 'paper',
|
|
14
15
|
size: 'youtube',
|
|
15
16
|
pace: 1,
|
|
@@ -124,6 +125,19 @@
|
|
|
124
125
|
plus.close();
|
|
125
126
|
$('files').click();
|
|
126
127
|
};
|
|
128
|
+
if ($('voiceBtn')) {
|
|
129
|
+
$('voiceBtn').onclick = () => {
|
|
130
|
+
plus.close();
|
|
131
|
+
void openVoicePicker(state, (voice) => {
|
|
132
|
+
if (typeof showHealth === 'function') {
|
|
133
|
+
showHealth(voice ? ('已选语音 · ' + (voice.voiceName || voice.voiceId)) : '');
|
|
134
|
+
}
|
|
135
|
+
}).catch((err) => {
|
|
136
|
+
const errEl = $('err');
|
|
137
|
+
if (errEl) { errEl.hidden = false; errEl.textContent = err.message || '选音失败'; }
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
}
|
|
127
141
|
$('paceToggle').onclick = () => {
|
|
128
142
|
const steps = [0.8, 1.0, 1.2, 1.4];
|
|
129
143
|
const i = steps.findIndex((x) => Math.abs(x - state.pace) < 0.05);
|
|
@@ -177,6 +191,7 @@
|
|
|
177
191
|
pace: state.pace,
|
|
178
192
|
urls: state.urls,
|
|
179
193
|
files: state.files,
|
|
194
|
+
voice: state.voice || undefined,
|
|
180
195
|
}),
|
|
181
196
|
});
|
|
182
197
|
await refreshJobs();
|
package/studio/composer.css
CHANGED
|
@@ -171,6 +171,9 @@ button:disabled { cursor: not-allowed; opacity: .5; }
|
|
|
171
171
|
}
|
|
172
172
|
.size-label { font-size: 11px; color: var(--muted-2); margin-left: 4px; }
|
|
173
173
|
.size-pick { width: 200px; flex: none; }
|
|
174
|
+
/* .sm{display:block} 会盖掉原生 [hidden];档位/尺寸按栏目显隐时必须压住 */
|
|
175
|
+
.size-pick[hidden],
|
|
176
|
+
.sm[hidden] { display: none !important; }
|
|
174
177
|
.theme-pick { width: 186px; flex: none; }
|
|
175
178
|
.primary {
|
|
176
179
|
border: 0; background: var(--ink); color: var(--accent); border-radius: 99px;
|
|
@@ -330,9 +333,74 @@ button:disabled { cursor: not-allowed; opacity: .5; }
|
|
|
330
333
|
color: #f4f1ea; font-size: 20px; line-height: 1; cursor: pointer;
|
|
331
334
|
}
|
|
332
335
|
.film-modal video { display: block; width: 100%; max-height: min(72vh, 640px); background: #000; }
|
|
336
|
+
/* 拆解结果弹层:跟随应用浅色主题,滚动条与卡片自绘 */
|
|
337
|
+
.film-modal.breakdown { padding: 28px; }
|
|
338
|
+
.film-modal.breakdown .film-modal-card {
|
|
339
|
+
width: min(1080px, 100%); max-height: min(88vh, 920px);
|
|
340
|
+
overflow: auto; overscroll-behavior: contain;
|
|
341
|
+
background: var(--paper); color: var(--ink);
|
|
342
|
+
border: 1px solid var(--line-strong); border-radius: 16px;
|
|
343
|
+
box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
|
|
344
|
+
scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .22) transparent;
|
|
345
|
+
}
|
|
346
|
+
.film-modal.breakdown .film-modal-card::-webkit-scrollbar { width: 10px; height: 10px; }
|
|
347
|
+
.film-modal.breakdown .film-modal-card::-webkit-scrollbar-track { background: transparent; }
|
|
348
|
+
.film-modal.breakdown .film-modal-card::-webkit-scrollbar-thumb {
|
|
349
|
+
background: rgba(0, 0, 0, .18); border-radius: 999px;
|
|
350
|
+
border: 3px solid transparent; background-clip: content-box;
|
|
351
|
+
}
|
|
352
|
+
.film-modal.breakdown .film-modal-card::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .34); background-clip: content-box; }
|
|
353
|
+
.film-modal.breakdown .film-modal-bar {
|
|
354
|
+
position: sticky; top: 0; z-index: 3;
|
|
355
|
+
padding: 12px 16px; color: var(--ink);
|
|
356
|
+
background: rgba(246, 246, 243, .94); backdrop-filter: blur(8px);
|
|
357
|
+
border-bottom: 1px solid var(--line);
|
|
358
|
+
}
|
|
359
|
+
.film-modal.breakdown .film-modal-x { color: var(--ink-soft); }
|
|
360
|
+
.film-modal.breakdown .film-modal-x:hover { background: var(--paper-2); }
|
|
361
|
+
.breakdown-body { padding: 2px 16px 22px; }
|
|
362
|
+
.bd-group { margin-top: 20px; }
|
|
363
|
+
.bd-group h3 {
|
|
364
|
+
display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
|
|
365
|
+
font-size: 12px; font-weight: 650; letter-spacing: .02em; color: var(--ink);
|
|
366
|
+
}
|
|
367
|
+
.bd-group h3::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--accent-deep); }
|
|
368
|
+
.bd-img {
|
|
369
|
+
display: block; width: 100%; max-height: 460px; object-fit: contain;
|
|
370
|
+
margin-bottom: 12px; border-radius: 12px; cursor: zoom-in;
|
|
371
|
+
background: #fff; border: 1px solid var(--line);
|
|
372
|
+
transition: border-color .15s ease;
|
|
373
|
+
}
|
|
374
|
+
.bd-img:hover { border-color: var(--accent-deep); }
|
|
375
|
+
.bd-json {
|
|
376
|
+
margin: 0 0 12px; padding: 12px 14px; border-radius: 12px;
|
|
377
|
+
background: #fff; border: 1px solid var(--line); color: var(--ink-soft);
|
|
378
|
+
font-size: 12px; line-height: 1.75; white-space: pre-wrap; word-break: break-all;
|
|
379
|
+
}
|
|
380
|
+
.bd-empty { color: var(--ink-soft); font-size: 12px; }
|
|
381
|
+
.bd-actions { margin: 12px 0 2px; }
|
|
382
|
+
.bd-go {
|
|
383
|
+
border: 1px solid var(--accent-deep); border-radius: 999px; padding: 9px 20px; cursor: pointer;
|
|
384
|
+
background: var(--accent-soft); color: var(--ink); font-size: 12px; font-weight: 650;
|
|
385
|
+
transition: filter .15s ease;
|
|
386
|
+
}
|
|
387
|
+
.bd-go:hover { filter: brightness(.97); }
|
|
388
|
+
.bd-viewer {
|
|
389
|
+
position: fixed; inset: 0; z-index: 95; padding: 32px; cursor: zoom-out;
|
|
390
|
+
display: grid; place-items: center; background: rgba(12, 12, 12, .93);
|
|
391
|
+
}
|
|
392
|
+
.bd-viewer[hidden] { display: none; }
|
|
393
|
+
.bd-viewer img { max-width: 100%; max-height: 100%; border-radius: 8px; }
|
|
394
|
+
.asset.ref { background: var(--accent-soft); border-color: var(--accent-deep); }
|
|
395
|
+
button.job-play {
|
|
396
|
+
appearance: none; border: 0; background: none; font: inherit; color: inherit;
|
|
397
|
+
cursor: pointer; padding: 0; text-align: left; width: 100%;
|
|
398
|
+
}
|
|
399
|
+
.job-fill { color: #8a877e; font-size: 11px; }
|
|
333
400
|
|
|
334
401
|
/* SelectMenu */
|
|
335
402
|
.sm { position: relative; display: block; min-width: 0; }
|
|
403
|
+
.sm[hidden] { display: none !important; }
|
|
336
404
|
.sm-trigger {
|
|
337
405
|
width: 100%; display: flex; align-items: center; gap: 8px; text-align: left;
|
|
338
406
|
background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
|
|
@@ -463,3 +531,29 @@ button:disabled { cursor: not-allowed; opacity: .5; }
|
|
|
463
531
|
.sm-entry-err { flex: 1 0 100%; margin: 0; font-size: 11px; line-height: 1.3; color: var(--danger); }
|
|
464
532
|
|
|
465
533
|
.file-hidden { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
|
|
534
|
+
|
|
535
|
+
.job-detail-card { width: min(520px, 100%); background: #fff; color: var(--ink); }
|
|
536
|
+
.job-detail-card .film-modal-bar { color: var(--ink); border-bottom: 1px solid var(--line); }
|
|
537
|
+
.job-detail-card .film-modal-x { color: var(--ink-soft); }
|
|
538
|
+
.job-detail-body { padding: 14px 16px 18px; display: grid; gap: 10px; }
|
|
539
|
+
.job-detail-body .jd-msg { font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
|
|
540
|
+
.job-detail-body .jd-meta { font-size: 11px; white-space: pre-wrap; word-break: break-all; }
|
|
541
|
+
.job-detail-body .jd-follow { display: grid; gap: 8px; padding-top: 4px; border-top: 1px dashed var(--line); }
|
|
542
|
+
.job-detail-body .jd-follow-hint { margin: 0; font-size: 11.5px; }
|
|
543
|
+
.job-detail-body .jd-follow-actions { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
544
|
+
.job-detail-body .jd-follow-btn {
|
|
545
|
+
border: 1px solid var(--line); background: #fff; border-radius: 8px;
|
|
546
|
+
padding: 6px 10px; font: inherit; font-size: 12px; cursor: pointer;
|
|
547
|
+
}
|
|
548
|
+
.job-detail-body .jd-follow-btn:hover { border-color: var(--ink); }
|
|
549
|
+
.job-detail-body .jd-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
|
|
550
|
+
.job-detail-body .jd-actions button {
|
|
551
|
+
border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 12px; font-size: 12px;
|
|
552
|
+
}
|
|
553
|
+
.job-detail-body .jd-actions .primary, .voice-picker-modal .primary {
|
|
554
|
+
background: var(--ink); color: #fff; border-color: var(--ink);
|
|
555
|
+
}
|
|
556
|
+
.vp-field { display: grid; gap: 6px; font-size: 12px; }
|
|
557
|
+
.vp-field select {
|
|
558
|
+
width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; background: #fff;
|
|
559
|
+
}
|