@craft_eco/craft-mcp 0.1.22 → 0.1.25
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/README.md +8 -8
- package/bin/craft-mcp.mjs +6 -0
- package/dist-server/game-workflow/publication-materials.mjs +20 -18
- package/dist-server/game-workflow/publications.mjs +17 -15
- package/dist-server/game-workflow/publish-capture.mjs +57 -21
- package/dist-server/mcp/publication-page.mjs +50 -18
- package/dist-server/mcp/publish-panel.mjs +35 -28
- package/dist-server/mcp/server.mjs +5 -4
- package/dist-server/upstream/publication-transport.mjs +19 -19
- package/package.json +3 -2
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js +69 -5
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js.map +1 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +2 -0
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +1 -0
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/client.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/client.js +1 -0
- package/vendor/agent-cli/dist/src/session/client.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/link-session.js +4 -1
- package/vendor/agent-cli/dist/src/session/link-session.js.map +1 -1
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +1 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +1 -1
- package/vendor/agent-cli/dist/src/session/run-start-body.js +1 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.js.map +1 -1
- package/vendor/agent-cli/dist/src/shared/types.d.ts +4 -0
- package/vendor/agent-cli/dist/src/shared/types.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -9,13 +9,13 @@ Craft MCP 是面向支持本地 stdio MCP 的 AI IDE 的游戏制作服务,例
|
|
|
9
9
|
以下命令只打印本页后退出;如果正在读取 guide 的输出,直接继续配置步骤:
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
npx --yes --prefer-online --registry=https://registry.npmjs.org/ @craft_eco/craft-mcp@
|
|
12
|
+
npx --yes --prefer-online --registry=https://registry.npmjs.org/ @craft_eco/craft-mcp@stable guide
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
1. 识别当前 AI IDE 的 MCP
|
|
15
|
+
1. 识别当前 AI IDE 的 MCP 设置入口和配置格式,按下方示例配置 Craft。已有同包名、同 npm 源和同平台的 Craft 服务时,更新该服务的启动参数,保留其他服务。
|
|
16
16
|
2. 若无权修改宿主配置,展示匹配该宿主的配置让用户添加。不要把 JSON 写入 TOML,也不要覆盖用户整个配置文件。
|
|
17
17
|
3. 在 AI IDE 中启用并重连 MCP 服务。普通终端执行启动命令不代表宿主已加载工具;服务参数不添加 guide。
|
|
18
|
-
4. 调用 craft_game_info
|
|
18
|
+
4. 调用 craft_game_info,将实际版本与 `npm view @craft_eco/craft-mcp@stable version --prefer-online --registry=https://registry.npmjs.org/` 的结果对照,确认平台为 https://pre.craft.qq.com。制作游戏前完整读取 context.engine.entrypoint 返回的 AGENTS.md 及其按需引用。
|
|
19
19
|
5. 需要登录时调用 craft_auth_open,让用户只在返回的本机页面填写 CLI Key;凭据不进入聊天、游戏工程或共享配置。
|
|
20
20
|
|
|
21
21
|
### Codex:TOML 配置
|
|
@@ -25,11 +25,11 @@ npx --yes --prefer-online --registry=https://registry.npmjs.org/ @craft_eco/craf
|
|
|
25
25
|
```toml
|
|
26
26
|
[mcp_servers.craft]
|
|
27
27
|
command = "npx"
|
|
28
|
-
args = ["--yes","--prefer-online","--registry=https://registry.npmjs.org/","@craft_eco/craft-mcp@
|
|
28
|
+
args = ["--yes","--prefer-online","--registry=https://registry.npmjs.org/","@craft_eco/craft-mcp@stable"]
|
|
29
29
|
startup_timeout_sec = 120
|
|
30
30
|
|
|
31
31
|
[mcp_servers.craft.env]
|
|
32
|
-
CRAFT_WEB_URL = "https://
|
|
32
|
+
CRAFT_WEB_URL = "https://pre.craft.qq.com"
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Trae、WorkBuddy 与支持 mcpServers JSON 的宿主
|
|
@@ -45,10 +45,10 @@ CRAFT_WEB_URL = "https://test.craft.qq.com"
|
|
|
45
45
|
"--yes",
|
|
46
46
|
"--prefer-online",
|
|
47
47
|
"--registry=https://registry.npmjs.org/",
|
|
48
|
-
"@craft_eco/craft-mcp@
|
|
48
|
+
"@craft_eco/craft-mcp@stable"
|
|
49
49
|
],
|
|
50
50
|
"env": {
|
|
51
|
-
"CRAFT_WEB_URL": "https://
|
|
51
|
+
"CRAFT_WEB_URL": "https://pre.craft.qq.com"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -65,6 +65,6 @@ CRAFT_WEB_URL = "https://test.craft.qq.com"
|
|
|
65
65
|
|
|
66
66
|
私有上传使用 craft_game_upload;draft_ready 仅表示私有草稿已上传。公开发布使用 craft_game_publish_open 打开本地发布页,审阅具体文案、图片、目标版本和 revision,由用户确认后才上传公开图片并提审。
|
|
67
67
|
|
|
68
|
-
当前业务平台是 https://
|
|
68
|
+
当前业务平台是 https://pre.craft.qq.com。npm 程序公开可下载不代表生产环境或公开发布开关已启用;上传和提审需要匹配的 Web 服务与审核配置。
|
|
69
69
|
|
|
70
70
|
发布图片上传后可公开访问,游戏审核通过后可能公开。平台审核覆盖提交的文案与图片,不会扫描或执行整个游戏压缩包。
|
package/bin/craft-mcp.mjs
CHANGED
|
@@ -9,6 +9,12 @@ if (major < 22 || (major === 22 && minor < 12)) {
|
|
|
9
9
|
|
|
10
10
|
const args = process.argv.slice(2);
|
|
11
11
|
if (args.length === 0) {
|
|
12
|
+
// A supplied token or profile may belong to another environment. Use the
|
|
13
|
+
// packaged default only for ordinary startup without either override.
|
|
14
|
+
if (!process.env.CRAFT_WEB_URL && !process.env.CLIENT_DATA_DIR && !Object.hasOwn(process.env,'CRAFT_TOKEN')) {
|
|
15
|
+
const { craftDefaultPlatform } = JSON.parse(await readFile(new URL('../package.json',import.meta.url),'utf8'));
|
|
16
|
+
if (craftDefaultPlatform) process.env.CRAFT_WEB_URL = craftDefaultPlatform;
|
|
17
|
+
}
|
|
12
18
|
await import('../dist-server/mcp/start.mjs');
|
|
13
19
|
} else if (args.length === 1 && args[0] === 'guide') {
|
|
14
20
|
process.stdout.write(await readFile(new URL('../README.md', import.meta.url), 'utf8'));
|
|
@@ -8,29 +8,30 @@ import { imageExtension } from './asset-formats.mjs';
|
|
|
8
8
|
import { digest } from './request-store.mjs';
|
|
9
9
|
|
|
10
10
|
const text = (value, max, label) => {
|
|
11
|
-
if (typeof value !== 'string' || !value.trim() || [...value].length > max || /[\x00-\x08\x0b\x0c\x0e-\x1f]/.test(value)) throw new Error(
|
|
11
|
+
if (typeof value !== 'string' || !value.trim() || [...value].length > max || /[\x00-\x08\x0b\x0c\x0e-\x1f]/.test(value)) throw new Error(`请填写有效的${label},最多 ${max} 个字符。`);
|
|
12
12
|
return value.trim();
|
|
13
13
|
};
|
|
14
14
|
const imageLimit = 2 * 1024 * 1024;
|
|
15
|
+
const imageFormatMessage = '请选择 PNG 或 JPEG 格式的发布图片。';
|
|
15
16
|
|
|
16
17
|
export function publicationMaterials(input) {
|
|
17
18
|
const allowed = ['game_name','instructions','game_type','art_styles','play_tags','open_to_recreate','cover_path','cover_image_source'];
|
|
18
|
-
if (!input || Array.isArray(input) || typeof input !== 'object' || Object.keys(input).some(key=>!allowed.includes(key))) throw new Error('
|
|
19
|
-
const result = { game_name:text(input.game_name,40,'
|
|
20
|
-
for (const key of ['art_styles','play_tags']) {
|
|
19
|
+
if (!input || Array.isArray(input) || typeof input !== 'object' || Object.keys(input).some(key=>!allowed.includes(key))) throw new Error('发布资料格式无效。请检查资料后再提交。');
|
|
20
|
+
const result = { game_name:text(input.game_name,40,'游戏名称'), instructions:text(input.instructions,8000,'玩法说明'),game_type:text(input.game_type,100,'游戏类型') };
|
|
21
|
+
for (const [key,label] of [['art_styles','美术风格'],['play_tags','玩法标签']]) {
|
|
21
22
|
const values = input[key] ?? [];
|
|
22
|
-
if (!Array.isArray(values) || values.length > 12) throw new Error(
|
|
23
|
-
result[key] = [...new Set(values.map(value=>text(value,50,
|
|
23
|
+
if (!Array.isArray(values) || values.length > 12) throw new Error(`请选择有效的${label},最多 12 项。`);
|
|
24
|
+
result[key] = [...new Set(values.map(value=>text(value,50,label)))];
|
|
24
25
|
}
|
|
25
|
-
if (Buffer.byteLength(JSON.stringify({ game_type:result.game_type,art_styles:result.art_styles,play_tags:result.play_tags })) > 1900) throw new Error('
|
|
26
|
-
if (input.open_to_recreate !== undefined && typeof input.open_to_recreate !== 'boolean') throw new Error('
|
|
27
|
-
if (input.open_to_recreate === true) throw new Error('
|
|
26
|
+
if (Buffer.byteLength(JSON.stringify({ game_type:result.game_type,art_styles:result.art_styles,play_tags:result.play_tags })) > 1900) throw new Error('分类和标签超出平台长度限制。请减少标签后再试。');
|
|
27
|
+
if (input.open_to_recreate !== undefined && typeof input.open_to_recreate !== 'boolean') throw new Error('开放二创选项无效。请关闭开放二创后再试。');
|
|
28
|
+
if (input.open_to_recreate === true) throw new Error('当前版本不包含可编辑源码。请关闭开放二创后再试。');
|
|
28
29
|
result.open_to_recreate = input.open_to_recreate ?? false;
|
|
29
|
-
if (input.cover_image_source !== undefined && ![1,2].includes(input.cover_image_source)) throw new Error('
|
|
30
|
+
if (input.cover_image_source !== undefined && ![1,2].includes(input.cover_image_source)) throw new Error('封面来源无效。请重新选择封面。');
|
|
30
31
|
result.cover_image_source = input.cover_image_source ?? 2;
|
|
31
32
|
if (input.cover_path !== undefined) {
|
|
32
|
-
const value = text(input.cover_path,512,'
|
|
33
|
-
if (path.isAbsolute(value) || /[\\:\x00]/.test(value) || value.split('/').some(part=>!part || part.startsWith('.'))) throw new Error('
|
|
33
|
+
const value = text(input.cover_path,512,'封面路径');
|
|
34
|
+
if (path.isAbsolute(value) || /[\\:\x00]/.test(value) || value.split('/').some(part=>!part || part.startsWith('.'))) throw new Error('请使用工程内的相对路径指定 PNG 或 JPEG 封面。');
|
|
34
35
|
result.cover_path = value;
|
|
35
36
|
}
|
|
36
37
|
return result;
|
|
@@ -42,19 +43,20 @@ export async function readMaterial(root, relative, expected) {
|
|
|
42
43
|
let data;
|
|
43
44
|
try {
|
|
44
45
|
const stat = await handle.stat();
|
|
45
|
-
if (!stat.isFile() || stat.size < 1 || stat.size > imageLimit) throw new Error('
|
|
46
|
+
if (!stat.isFile() || stat.size < 1 || stat.size > imageLimit) throw new Error('请选择大小在 2 MiB 以内的非空发布图片。');
|
|
46
47
|
data = await handle.readFile();
|
|
47
|
-
if (data.length !== stat.size) throw new Error('
|
|
48
|
+
if (data.length !== stat.size) throw new Error('发布图片在读取时发生变化。请重新准备发布材料。');
|
|
48
49
|
} finally { await handle.close(); }
|
|
49
50
|
const image = inspectImage(data);
|
|
50
51
|
if (expected && (image.sha256 !== expected.sha256 || image.bytes !== expected.bytes ||
|
|
51
|
-
(expected.extension !== undefined && image.extension !== expected.extension))) throw new Error('
|
|
52
|
+
(expected.extension !== undefined && image.extension !== expected.extension))) throw new Error('发布材料已变化。请重新准备并确认材料。');
|
|
52
53
|
return image;
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
function inspectImage(data) {
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
let extension;
|
|
58
|
+
try { extension = imageExtension(data); } catch { throw new Error(imageFormatMessage); }
|
|
59
|
+
if (!['png','jpg'].includes(extension)) throw new Error(imageFormatMessage);
|
|
58
60
|
return { data,extension,sha256:createHash('sha256').update(data).digest('hex'),bytes:data.length };
|
|
59
61
|
}
|
|
60
62
|
|
|
@@ -64,7 +66,7 @@ export async function readPublishedCover(url, signal) {
|
|
|
64
66
|
signal:AbortSignal.any([signal,AbortSignal.timeout(15000)]) });
|
|
65
67
|
if (!response.ok) {
|
|
66
68
|
await response.body?.cancel();
|
|
67
|
-
throw new Error('
|
|
69
|
+
throw new Error('上次发布的封面下载失败。');
|
|
68
70
|
}
|
|
69
71
|
return inspectImage(await boundedBody(response,imageLimit));
|
|
70
72
|
} catch {
|
|
@@ -30,7 +30,7 @@ export class Publications {
|
|
|
30
30
|
async #record(name, id, owner) {
|
|
31
31
|
const record = await this.store.read(id);
|
|
32
32
|
if (this.platform.account().user_id !== owner || record.name !== name || record.owner !== owner || record.platform !== this.platform.base || record.revision !== publicationRevision(record)) {
|
|
33
|
-
throw new Error('
|
|
33
|
+
throw new Error('发布记录与当前项目、账号、平台或材料版本不一致。请回到 WorkBuddy 重新打开对应的发布页。');
|
|
34
34
|
}
|
|
35
35
|
return record;
|
|
36
36
|
}
|
|
@@ -47,13 +47,15 @@ export class Publications {
|
|
|
47
47
|
|
|
48
48
|
async prepare(check, project, input, owner, signal, stagedCover, previousCover) {
|
|
49
49
|
const materials = publicationMaterials(input);
|
|
50
|
-
if (stagedCover && materials.cover_path) throw new Error('
|
|
50
|
+
if (stagedCover && materials.cover_path) throw new Error('请选择一种发布封面来源。');
|
|
51
51
|
const source = await this.drafts.publicationSource(check.name,check.task_id,owner,signal);
|
|
52
|
-
if (source.state !== 'draft_ready' || !/^[0-9a-f]{64}$/.test(source.external_manifest_sha256 ?? '')) throw new Error('
|
|
52
|
+
if (source.state !== 'draft_ready' || !/^[0-9a-f]{64}$/.test(source.external_manifest_sha256 ?? '')) throw new Error('未收到当前验收版本的草稿上传回执或构建校验值。请回到 WorkBuddy 检查私有草稿的上传状态。');
|
|
53
53
|
const existing = await this.platform.publicationSession(owner)('status',{ version_id:source.version_id },signal);
|
|
54
|
-
if (existing.state !== 'not_submitted' && (existing.conversation_id !== source.conversation_id || existing.external_manifest_sha256 !== source.external_manifest_sha256)) throw new Error('
|
|
55
|
-
if (existing.state === 'share_completed') throw new Error('
|
|
56
|
-
|
|
54
|
+
if (existing.state !== 'not_submitted' && (existing.conversation_id !== source.conversation_id || existing.external_manifest_sha256 !== source.external_manifest_sha256)) throw new Error('平台返回的发布状态与已上传的游戏版本不一致。请回到 WorkBuddy 核对当前验收结果。');
|
|
55
|
+
if (existing.state === 'share_completed') throw Object.assign(new Error('当前版本已发布。请回到 WorkBuddy 重新验收同一个游戏,再用新的验收结果打开发布页。'),
|
|
56
|
+
{ detail:{ reason:'publication_version_already_published' } });
|
|
57
|
+
if (['sharing','share_repacking'].includes(existing.state)) throw Object.assign(new Error('当前版本正在审核或发布处理中。请回到 WorkBuddy 查看原发布记录,等待处理结果。'),
|
|
58
|
+
{ detail:{ reason:'publication_review_in_progress' } });
|
|
57
59
|
let reusedCover;
|
|
58
60
|
if (previousCover && !stagedCover && !materials.cover_path) {
|
|
59
61
|
if (previousCover.conversation_id !== source.conversation_id || previousCover.version_id === source.version_id ||
|
|
@@ -64,7 +66,7 @@ export class Publications {
|
|
|
64
66
|
const capture = await this.capture(check,this.evidence,signal);
|
|
65
67
|
if (capture.archive_sha256 !== source.archive_sha256 || !Number.isInteger(capture.playtest_seconds) || capture.playtest_seconds < 30 ||
|
|
66
68
|
!Array.isArray(capture.screenshots) || capture.screenshots.length < 1 || capture.screenshots.length > 5 ||
|
|
67
|
-
!Array.isArray(capture.audit_screenshots) || capture.audit_screenshots.length < 3 || capture.audit_screenshots.length > 30) throw new Error('
|
|
69
|
+
!Array.isArray(capture.audit_screenshots) || capture.audit_screenshots.length < 3 || capture.audit_screenshots.length > 30) throw new Error('试玩采集结果不完整,或与已上传的验收版本不一致。');
|
|
68
70
|
const id = randomUUID(), directory = path.join(this.store.directory,id);
|
|
69
71
|
await mkdir(directory,{ mode:0o700 });
|
|
70
72
|
const images = [];
|
|
@@ -81,7 +83,7 @@ export class Publications {
|
|
|
81
83
|
signal.throwIfAborted();
|
|
82
84
|
// Capture paths are produced inside the private evidence directory by our browser worker.
|
|
83
85
|
const relative = path.relative(this.evidence,file);
|
|
84
|
-
if (relative === '..' || relative.startsWith('..' + path.sep) || path.isAbsolute(relative)) throw new Error('
|
|
86
|
+
if (relative === '..' || relative.startsWith('..' + path.sep) || path.isAbsolute(relative)) throw new Error('截图文件不在本次验收的采集目录内。');
|
|
85
87
|
const source = await readMaterial(path.dirname(file),path.basename(file),metadata?.[index]);
|
|
86
88
|
if (purpose === 'screenshot' && seen.has(source.sha256)) continue;
|
|
87
89
|
seen.add(source.sha256);
|
|
@@ -90,7 +92,7 @@ export class Publications {
|
|
|
90
92
|
}
|
|
91
93
|
delete materials.cover_path;
|
|
92
94
|
signal.throwIfAborted();
|
|
93
|
-
if (this.platform.account().user_id !== owner) throw new Error('Craft
|
|
95
|
+
if (this.platform.account().user_id !== owner) throw new Error('Craft 登录账号已变更。请回到 WorkBuddy 重新打开发布页。');
|
|
94
96
|
const record = await this.store.create({ request_id:id,name:check.name,owner,platform:this.platform.base,engine:check.result.engine,
|
|
95
97
|
check_task_id:check.task_id,conversation_id:source.conversation_id,version_id:source.version_id,
|
|
96
98
|
external_manifest_sha256:source.external_manifest_sha256,archive_sha256:source.archive_sha256,
|
|
@@ -108,25 +110,25 @@ export class Publications {
|
|
|
108
110
|
}
|
|
109
111
|
record.reviewed_revision = record.revision;
|
|
110
112
|
await this.store.save(record);
|
|
111
|
-
if (this.platform.account().user_id !== owner) throw new Error('Craft
|
|
113
|
+
if (this.platform.account().user_id !== owner) throw new Error('审阅材料时 Craft 登录账号已变更。请回到 WorkBuddy 重新打开发布页。');
|
|
112
114
|
return { content:[{ type:'text',text:JSON.stringify({ ...view(record),review:'Show these final materials to the user. Confirm the exact revision, game version, public image uploads and open_to_recreate choice before submitting to ACE.' }) },...content] };
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
async #status(record, request, signal) {
|
|
116
118
|
const remote = await request('status',{ version_id:record.version_id },signal);
|
|
117
119
|
if (remote.state !== 'not_submitted' && (remote.version_id !== record.version_id || remote.conversation_id !== record.conversation_id ||
|
|
118
|
-
remote.external_manifest_sha256 !== record.external_manifest_sha256)) throw new Error('
|
|
120
|
+
remote.external_manifest_sha256 !== record.external_manifest_sha256)) throw new Error('平台返回的发布状态与当前项目或构建校验值不一致。');
|
|
119
121
|
return remote;
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
async submit(name, id, revision, confirmed, owner, signal) {
|
|
123
125
|
const record = await this.#record(name,id,owner);
|
|
124
|
-
if (confirmed !== true || revision !== record.revision || record.reviewed_revision !== revision) throw new Error('
|
|
126
|
+
if (confirmed !== true || revision !== record.revision || record.reviewed_revision !== revision) throw new Error('提交前请审阅发布图片,并确认当前这份材料。');
|
|
125
127
|
const request = this.platform.publicationSession(owner);
|
|
126
128
|
const previous = await this.#status(record,request,signal);
|
|
127
129
|
if (previous.client_request_id === record.request_id && previous.state !== 'external_draft') {
|
|
128
130
|
if (!previous.finalization_retry_required) return view(record,previous);
|
|
129
|
-
if (!record.share_input) throw new Error('
|
|
131
|
+
if (!record.share_input) throw new Error('缺少原始提交材料,暂时无法重试发布收尾。请回到 WorkBuddy 查看原发布记录。');
|
|
130
132
|
await request('submit',{ input:record.share_input },signal);
|
|
131
133
|
record.state = 'submitted';
|
|
132
134
|
await this.store.save(record);
|
|
@@ -139,7 +141,7 @@ export class Publications {
|
|
|
139
141
|
const receipt = await request('image',{ image:data,purpose:image.purpose,conversation_id:record.conversation_id,
|
|
140
142
|
version_id:record.version_id,external_manifest_sha256:record.external_manifest_sha256 },signal);
|
|
141
143
|
if (receipt.sha256 !== image.sha256 || receipt.bytes !== image.bytes ||
|
|
142
|
-
(record.image_receipts[image.file] && record.image_receipts[image.file].cover_url !== receipt.cover_url)) throw new Error('
|
|
144
|
+
(record.image_receipts[image.file] && record.image_receipts[image.file].cover_url !== receipt.cover_url)) throw new Error('平台返回的图片回执与已确认材料不一致。请先刷新进度。');
|
|
143
145
|
record.image_receipts[image.file] = receipt;
|
|
144
146
|
await this.store.save(record);
|
|
145
147
|
}
|
|
@@ -147,7 +149,7 @@ export class Publications {
|
|
|
147
149
|
const input = { client_request_id:record.request_id,conversation_id:record.conversation_id,version_id:record.version_id,
|
|
148
150
|
external_manifest_sha256:record.external_manifest_sha256,...record.materials,
|
|
149
151
|
cover_image_url:urls('cover')[0],screenshots:urls('screenshot'),audit_screenshot_urls:urls('audit-shot'),playtest_seconds:record.playtest_seconds };
|
|
150
|
-
if (record.share_input && JSON.stringify(record.share_input) !== JSON.stringify(input)) throw new Error('
|
|
152
|
+
if (record.share_input && JSON.stringify(record.share_input) !== JSON.stringify(input)) throw new Error('提交材料在确认后发生变化。请回到 WorkBuddy 查看原发布记录。');
|
|
151
153
|
record.share_input = input; record.state = 'submitting';
|
|
152
154
|
await this.store.save(record);
|
|
153
155
|
await request('submit',{ input },signal);
|
|
@@ -11,6 +11,11 @@ import { validateSteps } from './check.mjs';
|
|
|
11
11
|
const environmentKeys = new Set(['PATH','HOME','USERPROFILE','APPDATA','LOCALAPPDATA','SYSTEMROOT','WINDIR',
|
|
12
12
|
'COMSPEC','TEMP','TMP','TMPDIR','XDG_CACHE_HOME','NODE_PATH','PLAYWRIGHT_PACKAGE_ROOT',
|
|
13
13
|
'PLAYWRIGHT_BROWSERS_PATH','CRAFT_BROWSER_EXECUTABLE','CRAFT_RUNTIME_POLICY']);
|
|
14
|
+
const captureReasons = new Set([
|
|
15
|
+
'加载层未在采集期限内收起,首屏可能仍是进度条',
|
|
16
|
+
'截图时仍有资源请求未完成,加载相关画面未验证',
|
|
17
|
+
'字体或界面过渡未在采集期限内完成',
|
|
18
|
+
]);
|
|
14
19
|
|
|
15
20
|
// The SDK browser preparer merges the parent environment. Undefined overrides
|
|
16
21
|
// deliberately erase every other inherited key, including unknown credentials.
|
|
@@ -19,56 +24,87 @@ export function publishCaptureEnvironment(source = process.env) {
|
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
async function ordinaryJson(file, maximum = 256 * 1024) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
try {
|
|
28
|
+
const stat = await lstat(file);
|
|
29
|
+
if (!stat.isFile() || stat.isSymbolicLink() || stat.size > maximum) throw new Error('发布采集记录格式无效。');
|
|
30
|
+
return JSON.parse(await readFile(file,'utf8'));
|
|
31
|
+
} catch (cause) {
|
|
32
|
+
throw new Error('无法读取发布采集记录。',{ cause });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async function captureFailure(directory, timedOut) {
|
|
37
|
+
if (timedOut) return '发布试玩采集超时。';
|
|
38
|
+
// The private capture record may also include browser errors and game data.
|
|
39
|
+
// Only share the exact built-in reasons, never raw worker output.
|
|
40
|
+
const capture = await ordinaryJson(path.join(directory,'capture.json')).catch(()=>undefined);
|
|
41
|
+
const reasons = Array.isArray(capture?.unverified) ? [...new Set(capture.unverified.filter(reason=>captureReasons.has(reason)))] : [];
|
|
42
|
+
if (reasons.length) return '发布试玩采集未通过。' + reasons.join(';') + '。';
|
|
43
|
+
if (Array.isArray(capture?.errors) && capture.errors.length) return '发布试玩时游戏出现运行错误,请回到 WorkBuddy 检查游戏运行情况。';
|
|
44
|
+
return '未能完成发布试玩采集,请确认游戏可以正常运行。';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async function captureArchive(evidence, result, signal) {
|
|
48
|
+
try { return await checkedDraftArchive(evidence,result.snapshot_id,result.artifacts,signal); }
|
|
49
|
+
catch (cause) {
|
|
50
|
+
signal.throwIfAborted();
|
|
51
|
+
throw new Error('验收产物已变更或无法读取,请回到 WorkBuddy 重新验收游戏。',{ cause });
|
|
52
|
+
}
|
|
25
53
|
}
|
|
26
54
|
|
|
27
55
|
async function checkedImage(image, directory) {
|
|
28
56
|
if (!image || typeof image.path !== 'string' || path.dirname(image.path) !== directory ||
|
|
29
|
-
!/^shot-[0-8]\.jpg$/.test(path.basename(image.path))) throw new Error('
|
|
57
|
+
!/^shot-[0-8]\.jpg$/.test(path.basename(image.path))) throw new Error('发布截图记录无效。');
|
|
30
58
|
const stat = await lstat(image.path);
|
|
31
|
-
if (!stat.isFile() || stat.isSymbolicLink() || stat.size < 4 || stat.size > 2 * 1024 * 1024) throw new Error('
|
|
59
|
+
if (!stat.isFile() || stat.isSymbolicLink() || stat.size < 4 || stat.size > 2 * 1024 * 1024) throw new Error('发布截图无效或超过 2 MiB。');
|
|
32
60
|
const data = await readFile(image.path);
|
|
33
61
|
if (data[0] !== 0xff || data[1] !== 0xd8 || data[2] !== 0xff ||
|
|
34
|
-
data.length !== image.bytes || createHash('sha256').update(data).digest('hex') !== image.sha256) throw new Error('
|
|
62
|
+
data.length !== image.bytes || createHash('sha256').update(data).digest('hex') !== image.sha256) throw new Error('发布截图已变更,请重新采集。');
|
|
35
63
|
}
|
|
36
64
|
|
|
37
65
|
export async function capturePublishMaterial(check, evidence, signal) {
|
|
38
66
|
signal.throwIfAborted();
|
|
39
67
|
const result = check?.result;
|
|
40
68
|
if (check?.kind !== 'check' || check.status !== 'completed' || !result?.gate?.passed ||
|
|
41
|
-
!/^[0-9a-f-]{36}$/.test(check.task_id)) throw new Error('
|
|
42
|
-
engineDefinition(result.engine);
|
|
43
|
-
|
|
69
|
+
!/^[0-9a-f-]{36}$/.test(check.task_id)) throw new Error('采集发布截图前,请回到 WorkBuddy 完成游戏验收。');
|
|
70
|
+
try { engineDefinition(result.engine); }
|
|
71
|
+
catch (cause) { throw new Error('验收结果中的游戏引擎无效,请回到 WorkBuddy 重新验收游戏。',{ cause }); }
|
|
72
|
+
const archive = await captureArchive(evidence,result,signal);
|
|
44
73
|
const evidenceRoot = await realpath(evidence), snapshot = path.join(evidenceRoot,result.snapshot_id);
|
|
45
74
|
const original = await ordinaryJson(path.join(snapshot,'request.json'));
|
|
46
|
-
if (original.engine !== result.engine) throw new Error('
|
|
47
|
-
validateSteps(original.steps);
|
|
75
|
+
if (original.engine !== result.engine) throw new Error('发布采集与验收结果的游戏引擎不一致,请回到 WorkBuddy 重新验收游戏。');
|
|
76
|
+
try { validateSteps(original.steps); }
|
|
77
|
+
catch (cause) { throw new Error('验收结果中的试玩步骤无效,请回到 WorkBuddy 重新验收游戏。',{ cause }); }
|
|
48
78
|
const directory = path.join(snapshot,'publish-' + randomUUID());
|
|
49
79
|
await mkdir(directory,{ mode:0o700 });
|
|
50
80
|
const requestFile = path.join(directory,'request.json');
|
|
51
81
|
await atomicJson(requestFile,{ check_task_id:check.task_id, snapshot_id:result.snapshot_id, engine:result.engine,
|
|
52
82
|
evidence:evidenceRoot, artifacts:result.artifacts, archive_sha256:archive.sha256, steps:original.steps });
|
|
53
|
-
const safe = publishCaptureEnvironment();
|
|
54
|
-
const browser = await prepareBrowserEnvironment({ cwd:snapshot,env:safe,signal });
|
|
55
|
-
const env = Object.fromEntries(Object.entries({ ...safe,...browser }).filter(([,value])=>value !== undefined));
|
|
56
83
|
const resources = process.env.CRAFT_MCP_RESOURCES_DIR || fileURLToPath(new URL('../../resources/',import.meta.url));
|
|
57
84
|
const runner = path.join(resources,'game_visual_qa.mjs');
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
85
|
+
let run;
|
|
86
|
+
try {
|
|
87
|
+
const safe = publishCaptureEnvironment();
|
|
88
|
+
const browser = await prepareBrowserEnvironment({ cwd:snapshot,env:safe,signal });
|
|
89
|
+
const env = Object.fromEntries(Object.entries({ ...safe,...browser }).filter(([,value])=>value !== undefined));
|
|
90
|
+
run = await runProcess(process.execPath,[fileURLToPath(new URL('./publish-capture-worker.mjs',import.meta.url)),runner,requestFile],{
|
|
91
|
+
cwd:snapshot,env,signal,timeoutMs:200000,
|
|
92
|
+
});
|
|
93
|
+
} catch (cause) {
|
|
94
|
+
signal.throwIfAborted();
|
|
95
|
+
throw new Error('无法启动发布试玩采集,请确认本机浏览器可以正常使用。',{ cause });
|
|
96
|
+
}
|
|
61
97
|
signal.throwIfAborted();
|
|
62
|
-
if (run.exitCode !== 0 || run.timedOut || run.aborted) throw new Error(
|
|
98
|
+
if (run.exitCode !== 0 || run.timedOut || run.aborted) throw new Error(await captureFailure(directory,run.timedOut));
|
|
63
99
|
const receipt = await ordinaryJson(path.join(directory,'receipt.json'));
|
|
64
100
|
if (receipt.check_task_id !== check.task_id || receipt.snapshot_id !== result.snapshot_id ||
|
|
65
101
|
receipt.engine !== result.engine || receipt.archive_sha256 !== archive.sha256 ||
|
|
66
102
|
!Number.isFinite(receipt.playtest_seconds) || receipt.playtest_seconds < 30 ||
|
|
67
103
|
!Array.isArray(receipt.screenshots) || receipt.screenshots.length !== 4 ||
|
|
68
|
-
!Array.isArray(receipt.audit_screenshots) || receipt.audit_screenshots.length !== 9) throw new Error('
|
|
104
|
+
!Array.isArray(receipt.audit_screenshots) || receipt.audit_screenshots.length !== 9) throw new Error('发布试玩采集结果不完整。');
|
|
69
105
|
for (const image of [...receipt.screenshots,...receipt.audit_screenshots]) await checkedImage(image,directory);
|
|
70
|
-
const after = await
|
|
71
|
-
if (after.sha256 !== archive.sha256) throw new Error('
|
|
106
|
+
const after = await captureArchive(evidenceRoot,result,signal);
|
|
107
|
+
if (after.sha256 !== archive.sha256) throw new Error('采集期间验收产物已变更,请回到 WorkBuddy 重新验收游戏。');
|
|
72
108
|
return { ...receipt, screenshot_files:receipt.screenshots,audit_screenshot_files:receipt.audit_screenshots,
|
|
73
109
|
screenshots:receipt.screenshots.map(image=>image.path),audit_screenshots:receipt.audit_screenshots.map(image=>image.path),
|
|
74
110
|
receipt_path:path.join(directory,'receipt.json') };
|
|
@@ -6,30 +6,43 @@ const pageAbort = new AbortController();
|
|
|
6
6
|
const hashPattern = /^[a-f0-9]{64}$/;
|
|
7
7
|
const idPattern = /^[A-Za-z0-9_-]{1,128}$/;
|
|
8
8
|
const imageLimit = 2 * 1024 * 1024;
|
|
9
|
+
const publishedTargetHelp = '当前版本已发布。请回到 WorkBuddy 重新验收同一个游戏,再用新的验收结果打开发布页。';
|
|
9
10
|
let context, publication, reviewedRevision, busy = false, dirty = false, needsSync = false;
|
|
10
11
|
let disposed = false, formInitialized = false, reviewGeneration = 0, statusTimer;
|
|
12
|
+
let targetVersionPublished = false;
|
|
11
13
|
let coverData, coverId, coverURL, coverGeneration = 0, coverLoading = false, imagesReady = false;
|
|
12
14
|
const stateNames = { awaiting_confirmation:'等待审阅确认', submitting:'正在提交', submitted:'已提交,等待审核', sharing:'审核中',
|
|
13
15
|
share_repacking:'发布处理中', share_completed:'审核通过', share_failed:'发布未完成', share_delisted:'审核未通过或已下架',
|
|
14
16
|
different_publication:'目标版本存在另一条发布记录', not_submitted:'尚未提交', external_draft:'私有草稿' };
|
|
15
17
|
|
|
16
18
|
function message(text) { byId('message').textContent = text; }
|
|
19
|
+
function localizedText(value, fallback) {
|
|
20
|
+
return typeof value === 'string' && /\p{Script=Han}/u.test(value) && !/\n\s+at |file:\/\/\/|[A-Za-z]:\\|\b(?:ENOENT|EACCES|EPERM)\b/.test(value) ? value : fallback;
|
|
21
|
+
}
|
|
17
22
|
function showError(error) {
|
|
18
|
-
byId('error').textContent = error instanceof Error ? error.message : String(error);
|
|
23
|
+
byId('error').textContent = localizedText(error instanceof Error ? error.message : String(error),'发布操作未完成,请刷新进度后查看。');
|
|
19
24
|
byId('error').hidden = false;
|
|
20
25
|
}
|
|
21
26
|
function clearError() { byId('error').textContent = ''; byId('error').hidden = true; }
|
|
22
|
-
function errorText(data) {
|
|
27
|
+
function errorText(data, fallback) {
|
|
23
28
|
const detail = data && typeof data === 'object' ? data : {};
|
|
24
|
-
return [detail.error || detail.message
|
|
25
|
-
detail.request_id ? '请求 ID:' + detail.request_id : ''].filter(Boolean).join('\n');
|
|
29
|
+
return [localizedText(detail.error || detail.message,fallback),
|
|
30
|
+
idPattern.test(detail.request_id || '') ? '请求 ID:' + detail.request_id : ''].filter(Boolean).join('\n');
|
|
31
|
+
}
|
|
32
|
+
function isPublishedTaskFailure(task) {
|
|
33
|
+
const { reason,message:rawMessage } = task.error || {};
|
|
34
|
+
return task.kind === 'publish_prepare' && task.status === 'failed' && (reason === 'publication_version_already_published' ||
|
|
35
|
+
typeof rawMessage === 'string' && rawMessage.startsWith('This version is already published.'));
|
|
26
36
|
}
|
|
27
37
|
function taskError(task, fallback) {
|
|
28
|
-
const detail = errorText(task?.error || { error:fallback });
|
|
29
38
|
if (task?.kind === 'publish_prepare' && task.status === 'failed') {
|
|
30
|
-
|
|
39
|
+
if (isPublishedTaskFailure(task)) {
|
|
40
|
+
return Object.assign(new Error(publishedTargetHelp),{ targetVersionPublished:true });
|
|
41
|
+
}
|
|
42
|
+
if (task.error?.reason === 'publication_review_in_progress') return new Error(errorText(task.error,'当前版本正在审核,请回到 WorkBuddy 查看原发布记录。'));
|
|
43
|
+
return new Error(['发布材料准备失败。请重新点击「准备发布材料」重试。',errorText(task.error,'')].filter(Boolean).join('\n\n'));
|
|
31
44
|
}
|
|
32
|
-
return new Error(
|
|
45
|
+
return new Error(errorText(task?.error,task?.status === 'failed' && task.kind === 'publish_submit' ? '提交审核未完成,请刷新进度并查看原发布记录。' : fallback));
|
|
33
46
|
}
|
|
34
47
|
async function request(route, body, query) {
|
|
35
48
|
const url = new URL(apiBase + '/' + route, location.origin);
|
|
@@ -49,7 +62,7 @@ async function request(route, body, query) {
|
|
|
49
62
|
}
|
|
50
63
|
const data = await response.json().catch(() => null);
|
|
51
64
|
if (!response.ok || !data || typeof data !== 'object') {
|
|
52
|
-
const error = new Error(errorText(data)); error.httpStatus = response.status;
|
|
65
|
+
const error = new Error(errorText(data,body === undefined ? '暂时无法读取发布信息,请刷新进度后重试。' : '发布操作未完成,请先刷新进度。')); error.httpStatus = response.status;
|
|
53
66
|
error.needsSync = body !== undefined && (!data || typeof data !== 'object' || response.status >= 500); throw error;
|
|
54
67
|
}
|
|
55
68
|
return data;
|
|
@@ -67,10 +80,17 @@ function changeStep(current) {
|
|
|
67
80
|
if (index === current) item.setAttribute('aria-current','step'); else item.removeAttribute('aria-current');
|
|
68
81
|
});
|
|
69
82
|
}
|
|
83
|
+
function showPublishedTarget() {
|
|
84
|
+
targetVersionPublished = true;
|
|
85
|
+
if (!publication?.published) changeStep(0);
|
|
86
|
+
byId('status').textContent = '当前版本已发布';
|
|
87
|
+
byId('status').dataset.state = 'share_completed';
|
|
88
|
+
message(publishedTargetHelp);
|
|
89
|
+
}
|
|
70
90
|
function isInProgress() { return ['submitting','submitted','sharing','share_repacking'].includes(publication?.state); }
|
|
71
|
-
function isLocked() { return publication?.published === true || isInProgress() || publication?.state === 'different_publication'; }
|
|
91
|
+
function isLocked() { return targetVersionPublished || publication?.published === true || isInProgress() || publication?.state === 'different_publication'; }
|
|
72
92
|
function canConfirm() {
|
|
73
|
-
return Boolean(publication && reviewedRevision === publication.revision && imagesReady && !dirty && !needsSync &&
|
|
93
|
+
return Boolean(!targetVersionPublished && publication && reviewedRevision === publication.revision && imagesReady && !dirty && !needsSync &&
|
|
74
94
|
publication.materials?.open_to_recreate === false &&
|
|
75
95
|
(publication.state === 'awaiting_confirmation' || publication.finalization_retry_required === true));
|
|
76
96
|
}
|
|
@@ -78,7 +98,7 @@ function updateControls() {
|
|
|
78
98
|
byId('refresh').disabled = busy;
|
|
79
99
|
byId('materials-fields').disabled = busy || coverLoading || !context || needsSync || isLocked();
|
|
80
100
|
byId('previous-cover').hidden = context?.previous_publication?.cover_available !== true || Boolean(coverData);
|
|
81
|
-
byId('review').hidden = !publication || dirty || !['awaiting_confirmation'].includes(publication.state) && !publication.finalization_retry_required;
|
|
101
|
+
byId('review').hidden = targetVersionPublished || !publication || dirty || !['awaiting_confirmation'].includes(publication.state) && !publication.finalization_retry_required;
|
|
82
102
|
byId('review').disabled = busy || needsSync;
|
|
83
103
|
byId('confirm').disabled = busy || !canConfirm();
|
|
84
104
|
byId('submit').disabled = busy || !canConfirm() || !byId('confirm').checked;
|
|
@@ -150,11 +170,12 @@ function setPublication(value) {
|
|
|
150
170
|
value.name !== context.name || value.check_task_id !== context.check_task_id) throw new Error('发布回执与当前检查不一致,请返回 AI IDE 重新打开发布页面。');
|
|
151
171
|
if (reviewedRevision !== value.revision) { reviewedRevision = undefined; imagesReady = false; byId('confirm').checked = false; }
|
|
152
172
|
publication = value;
|
|
153
|
-
byId('status').textContent = stateNames
|
|
173
|
+
byId('status').textContent = Object.hasOwn(stateNames,value.state) ? stateNames[value.state] : '状态待确认';
|
|
154
174
|
byId('status').dataset.state = value.state;
|
|
155
|
-
byId('publication-progress').textContent = value.status_reason
|
|
175
|
+
byId('publication-progress').textContent = localizedText(value.status_reason,value.published ? '当前目标版本已通过审核。' :
|
|
156
176
|
value.finalization_retry_required ? '审核后的发布收尾尚未完成,可重试同一份已确认材料。' :
|
|
157
|
-
isInProgress() ? '材料已受理,正在查询同一发布记录的审核进度。请保留此页面,不要重复提交。' :
|
|
177
|
+
isInProgress() ? '材料已受理,正在查询同一发布记录的审核进度。请保留此页面,不要重复提交。' :
|
|
178
|
+
value.status_reason ? '请在 Craft 平台查看此版本的审核详情。' : '');
|
|
158
179
|
if (value.published) { changeStep(3); message('当前目标版本已通过审核,可以打开已发布游戏。'); }
|
|
159
180
|
else if (isInProgress()) { changeStep(3); message('已提交审核,正在等待当前版本的结果。'); }
|
|
160
181
|
else if (!dirty) changeStep(2);
|
|
@@ -265,6 +286,9 @@ async function loadState() {
|
|
|
265
286
|
byId('cover-help').textContent = previous?.cover_available === true ? coverHelp : coverHelp + coverFallback;
|
|
266
287
|
if (!formInitialized) fillForm(state.publication?.materials ?? previous?.materials);
|
|
267
288
|
if (state.publication) setPublication(state.publication);
|
|
289
|
+
if (targetVersionPublished || state.target_version_published || state.publication?.state === 'share_completed') {
|
|
290
|
+
showPublishedTarget(); return;
|
|
291
|
+
}
|
|
268
292
|
if (state.task_id) {
|
|
269
293
|
const task = await request('task',undefined,{ task_id:state.task_id });
|
|
270
294
|
if (task.status === 'running') { changeStep(1); message('正在恢复原发布任务…'); }
|
|
@@ -272,7 +296,9 @@ async function loadState() {
|
|
|
272
296
|
const result = await waitForTask(task);
|
|
273
297
|
setPublication(await request('status',undefined,{ publication_id:result.publication_id }));
|
|
274
298
|
if (!dirty) fillForm(publication.materials);
|
|
275
|
-
} else if (task.status !== 'completed' && !state.publication
|
|
299
|
+
} else if (task.status !== 'completed' && (!state.publication || isPublishedTaskFailure(task))) {
|
|
300
|
+
throw taskError(task,'原任务已中断,请回 WorkBuddy 查看。');
|
|
301
|
+
}
|
|
276
302
|
}
|
|
277
303
|
if (publication && !dirty && (publication.state === 'awaiting_confirmation' || publication.finalization_retry_required)) {
|
|
278
304
|
await reviewPublication(publication); message('材料已准备。请核对文案、封面和全部展示截图,再确认公开提交。');
|
|
@@ -285,7 +311,7 @@ async function loadState() {
|
|
|
285
311
|
}
|
|
286
312
|
function scheduleStatus() {
|
|
287
313
|
clearTimeout(statusTimer);
|
|
288
|
-
if (disposed || !publication || !isInProgress()) return;
|
|
314
|
+
if (disposed || targetVersionPublished || !publication || !isInProgress()) return;
|
|
289
315
|
statusTimer = setTimeout(async () => {
|
|
290
316
|
if (busy) { scheduleStatus(); return; }
|
|
291
317
|
try {
|
|
@@ -305,7 +331,13 @@ async function perform(action) {
|
|
|
305
331
|
if (busy || disposed) return;
|
|
306
332
|
busy = true; clearTimeout(statusTimer); clearError(); updateControls();
|
|
307
333
|
try { await action(); }
|
|
308
|
-
catch (error) {
|
|
334
|
+
catch (error) {
|
|
335
|
+
if (!disposed) {
|
|
336
|
+
if (error.needsSync) needsSync = true;
|
|
337
|
+
if (error.targetVersionPublished) showPublishedTarget();
|
|
338
|
+
else showError(error);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
309
341
|
finally { busy = false; updateControls(); scheduleStatus(); }
|
|
310
342
|
}
|
|
311
343
|
function clearCover(resetInput = true) {
|
|
@@ -335,7 +367,7 @@ byId('cover-file').addEventListener('change',async () => {
|
|
|
335
367
|
byId('clear-cover').onclick = () => { clearCover(); invalidateReview(); };
|
|
336
368
|
byId('materials-form').onsubmit = event => {
|
|
337
369
|
event.preventDefault();
|
|
338
|
-
if (coverLoading || !byId('materials-form').reportValidity()) return;
|
|
370
|
+
if (coverLoading || needsSync || isLocked() || !byId('materials-form').reportValidity()) return;
|
|
339
371
|
void perform(async () => {
|
|
340
372
|
const materials = materialInput();
|
|
341
373
|
reviewedRevision = undefined; imagesReady = false; byId('confirm').checked = false;
|