@ninkch/dsh-infinite-canvas 0.18.3 → 0.18.5
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 +12 -0
- package/README.zh-CN.md +12 -0
- package/assets/canvas-craft/SKILL.md +78 -4
- package/assets/canvas-studio/SKILL.md +76 -19
- package/client.js +1814 -270
- package/docs/artcraft-handoff.md +59 -36
- package/docs/guide.en.md +12 -0
- package/docs/guide.zh-CN.md +12 -0
- package/docs/images/harness-right-pane.png +0 -0
- package/docs/images/overview-en.png +0 -0
- package/docs/images/overview-zh.png +0 -0
- package/docs/images/panel-assets-en.png +0 -0
- package/docs/images/panel-assets-zh.png +0 -0
- package/docs/images/panel-bible-en.png +0 -0
- package/docs/images/panel-bible-zh.png +0 -0
- package/docs/images/panel-projects-en.png +0 -0
- package/docs/images/panel-projects-zh.png +0 -0
- package/docs/images/panel-settings-en.png +0 -0
- package/docs/images/panel-settings-zh.png +0 -0
- package/docs/images/pipeline-zh.png +0 -0
- package/docs/images/provider-detail.png +0 -0
- package/docs/images/scene1-zh.png +0 -0
- package/docs/images/video-node-refs.png +0 -0
- package/docs/migration-0.18.md +25 -8
- package/docs/release.md +28 -14
- package/index.js +462 -111
- package/package.json +3 -2
package/docs/artcraft-handoff.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# ArtCraft ↔ 无限画布
|
|
1
|
+
# ArtCraft ↔ 无限画布 对接手册(画布侧调用契约)
|
|
2
2
|
|
|
3
|
-
> 供 dsh-artcraft
|
|
4
|
-
>
|
|
5
|
-
>
|
|
3
|
+
> 供 dsh-artcraft 侧对照实施/实测。本文只描述**画布侧发起的调用与期望**。
|
|
4
|
+
> **契约基线(BLK-02 修复后,2026-10-19)**:ArtCraft 是纯桥接插件,**没有自己的数据根**;
|
|
5
|
+
> 画布一律传 **`base`(项目绝对目录)+ `path`(相对路径)**,绝不发「无 base 的相对 `rel`」。
|
|
6
|
+
> 历史版本(≤0.17.18)基于 `<artcraft dataRoot>/<项目slug>/` 的约定已废弃,见 §7。
|
|
6
7
|
|
|
7
8
|
## 1. 环境配置(artcraft.config.json)
|
|
8
9
|
|
|
9
10
|
```jsonc
|
|
10
11
|
{
|
|
11
|
-
"dataRoot": "C:/craft-workspace", // 任意可写目录;画布按 <dataRoot>/<项目slug>/ 隔离
|
|
12
12
|
"bins": {
|
|
13
13
|
"photocraft": "C:/craft/photocraft-...-portable", // 目录(自动拼 photocraft-cli.exe)或完整 exe 或 PATH 裸名
|
|
14
14
|
"filmcraft": "C:/craft/filmcraft-...-portable",
|
|
@@ -18,29 +18,36 @@
|
|
|
18
18
|
}
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
-
|
|
22
|
-
- `
|
|
21
|
+
- **没有 `dataRoot` 配置项**(0.3.x 起移除)。产物落在哪,完全由调用方传的 `base`/`cwd` 决定。
|
|
22
|
+
- 画布对 `bins.*.found` 的判定完全信任 `GET /artcraft/api/status`;`note` 字段会原文展示给用户(红灯原因)。
|
|
23
|
+
- `/status` 返回 `plugin / version / platform / config / bins / control / jobs / tools`,**不含 dataRoot**;
|
|
24
|
+
画布不再读取 `status.dataRoot`(旧代码读它是恒空,导致「数据目录不一致」提醒永不触发)。
|
|
23
25
|
|
|
24
26
|
## 2. 画布会发起的 HTTP 调用(逐条)
|
|
25
27
|
|
|
26
28
|
| # | 调用 | 触发时机 | 画布侧超时 | 期望响应 |
|
|
27
29
|
|---|---|---|---|---|
|
|
28
|
-
| 1 | `GET /api/status` | 设置卡片/各 Craft 入口挂载时(静默探测) | 20s | `
|
|
29
|
-
| 2 | `POST /api/fs?action=write&
|
|
30
|
-
| 3 | `POST /api/
|
|
31
|
-
| 4 | `GET /api/
|
|
32
|
-
| 5 | `POST /api/job
|
|
33
|
-
| 6 | `GET /api/
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
| 1 | `GET /api/status` | 设置卡片/各 Craft 入口挂载时(静默探测) | 20s | `bins.*.found/note`、`version` |
|
|
31
|
+
| 2 | `POST /api/fs?action=write&base=<绝对目录>&path=<相对路径>` | 资产同步 / timeline.xml / srt | 180s | `{ok,path,size}`;**body 为原始 Blob**(视频可达数十 MB) |
|
|
32
|
+
| 3 | `POST /api/fs`(JSON `{base,path,text}`) | timeline.xml / subs.srt(文本) | 60s | `{ok,path,size}` |
|
|
33
|
+
| 4 | `GET /api/fs?op=readtext&base=<绝对目录>&path=<相对路径>` | 读回文本 | 20s | `{path,text}` |
|
|
34
|
+
| 5 | `POST /api/job`(含 `cwd` = 项目绝对目录、`outputs` 用相对路径) | PhotoCraft 处理 / FilmCraft 导出 | 30s | `{id,…}` |
|
|
35
|
+
| 6 | `GET /api/job?id=…&tail=…` | 轮询(PhotoCraft 1.5s / FilmCraft 2s) | 20s | `{status,stdout,stderr,outputs:[{rel,exists,size}]}` |
|
|
36
|
+
| 7 | `POST /api/job/cancel` | 用户点取消 | 20s | 任意 |
|
|
37
|
+
| 8 | `GET /api/file?base=<绝对目录>&path=<相对路径>` | 回收产物(graded 图 / final.mp4) | 180s | 原始字节 + 按扩展名 content-type |
|
|
38
|
+
|
|
39
|
+
- **`base` 必须是绝对路径**,由画布 Host 的 `projectDirGet` RPC 解析:`<画布数据根>/projects/<项目物理文件夹>`;
|
|
40
|
+
`path` 是相对 `base` 的正斜杠路径,形如 `craft/media/x.png`、`craft/timeline.xml`、`craft/out/final.mp4`。
|
|
41
|
+
- **画布绝不发「只有 `rel`、没有 `base`」的相对路径**:那样会被 ArtCraft 按**插件进程 cwd** 解析,
|
|
42
|
+
返回 200 却把文件写到 `C:\Users\PC\.dsh\profiles\desktop\`(BLK-02 的现场缺陷)。
|
|
36
43
|
- 画布在 status 不可达/404 时全部 Craft 入口置灰并提示,不会发后续调用。
|
|
37
44
|
|
|
38
|
-
## 3. 画布发起的确切 CLI 命令行(cwd =
|
|
45
|
+
## 3. 画布发起的确切 CLI 命令行(args 内一律绝对路径,`cwd` = 项目绝对目录)
|
|
39
46
|
|
|
40
47
|
### 3.1 PhotoCraft 单图处理(T4,已实现)
|
|
41
48
|
|
|
42
49
|
```
|
|
43
|
-
photocraft-cli run
|
|
50
|
+
photocraft-cli run <项目绝对目录>\craft\media\<assetId>.<ext> --cmd <命令ID> --params <JSON字符串> --out <项目绝对目录>\craft\out\graded\<assetId>-graded<ext>
|
|
44
51
|
```
|
|
45
52
|
|
|
46
53
|
- 已内置命令(下拉可选,用户可自定义任意 cmd):
|
|
@@ -51,7 +58,7 @@ photocraft-cli run <项目slug>/media/<assetId>.<ext> --cmd <命令ID> --params
|
|
|
51
58
|
### 3.2 PhotoCraft 批量(配方已确认,UI 未接)
|
|
52
59
|
|
|
53
60
|
```
|
|
54
|
-
photocraft-cli batch --actions
|
|
61
|
+
photocraft-cli batch --actions <项目绝对目录>\craft\grade.json --in <项目绝对目录>\craft\media --out <项目绝对目录>\craft\out\graded
|
|
55
62
|
```
|
|
56
63
|
|
|
57
64
|
grade.json:`{ "actions": [ { "cmd": "...", "params": {...} }, … ] }`
|
|
@@ -61,38 +68,42 @@ grade.json:`{ "actions": [ { "cmd": "...", "params": {...} }, … ] }`
|
|
|
61
68
|
画布写入两个文件后发起(args 为 JSON 数组,用户可在确认框编辑):
|
|
62
69
|
|
|
63
70
|
```
|
|
64
|
-
写入
|
|
65
|
-
写入
|
|
66
|
-
|
|
67
|
-
filmcraft-cli --project
|
|
71
|
+
写入 <项目绝对目录>\craft\timeline.xml (FCP7 XML xmeml v1,单视频轨顺序片段)
|
|
72
|
+
写入 <项目绝对目录>\craft\subs.srt (按片段顺序的字幕)
|
|
73
|
+
然后(cwd = 项目绝对目录,outputs = craft/out/final.mp4):
|
|
74
|
+
filmcraft-cli --project <项目绝对目录>\craft\drama.fcproj --import <项目绝对目录>\craft\timeline.xml --export <项目绝对目录>\craft\out\final.mp4
|
|
68
75
|
```
|
|
69
76
|
|
|
77
|
+
- xmeml 的 `<pathurl>` 用 `file://localhost/<媒体绝对路径>`,媒体绝对路径 = 项目绝对目录 + `craft/media/<文件名>`。
|
|
78
|
+
|
|
70
79
|
**需实测回填的问题**:
|
|
71
80
|
1. `--project` 指向的 `.fcproj` 不存在时是否自动创建?还是需要先 `init`?
|
|
72
81
|
2. 导入时间线的确切子命令形态(`--import` 一次调用?还是 `import` 子命令 + `export` 子命令两步)?
|
|
73
82
|
3. `--export` 的格式参数(h264 预设名/质量参数/CRF?音频是否自动混入源片段音轨?)
|
|
74
|
-
4. xmeml 的 `<pathurl>file://localhost/…` 引用是否能自动 relink 到 media/ 下文件(含中文/空格/URL 编码)?
|
|
83
|
+
4. xmeml 的 `<pathurl>file://localhost/…` 引用是否能自动 relink 到 craft/media/ 下文件(含中文/空格/URL 编码)?
|
|
75
84
|
5. 字幕:是否支持 `--subs <srt>` 之类参数烧录/挂载?(画布已生成 subs.srt,参数确定后追加)
|
|
76
85
|
|
|
77
86
|
### 3.4 EffectCraft(T6 骨架,画布 UI 未接)
|
|
78
87
|
|
|
79
88
|
```
|
|
80
|
-
effectcraft-cli render --comp Main --out
|
|
89
|
+
effectcraft-cli render --comp Main --out <项目绝对目录>\craft\out\intro.mp4 <项目绝对目录>\craft\intro.ecproj
|
|
81
90
|
```
|
|
82
91
|
|
|
83
92
|
## 4. 目录与命名约定(画布侧已实现,artcraft 无需感知,但排错时有用)
|
|
84
93
|
|
|
85
94
|
```
|
|
86
|
-
|
|
87
|
-
media
|
|
88
|
-
craft/timeline.xml
|
|
89
|
-
craft/subs.srt
|
|
90
|
-
craft/grade.json
|
|
91
|
-
out/graded/<assetId>-graded<ext>
|
|
92
|
-
out/final.mp4
|
|
95
|
+
<画布数据根>/projects/<项目物理文件夹>/
|
|
96
|
+
craft/media/<资产名>-<id尾4><ext> 画布资产(ext 由 mime 优先推断)
|
|
97
|
+
craft/timeline.xml FCP7 XML(xmeml v1,30fps,单视频轨)
|
|
98
|
+
craft/subs.srt 成片字幕(与片段顺序一致)
|
|
99
|
+
craft/grade.json (批量调色预留)
|
|
100
|
+
craft/out/graded/<assetId>-graded<ext>
|
|
101
|
+
craft/out/final.mp4
|
|
102
|
+
image/ text/ video/ … Host 落的资产文件(0.18 起按类型分目录)
|
|
93
103
|
```
|
|
94
104
|
|
|
95
|
-
-
|
|
105
|
+
- **目录基准是项目 id 对应的物理文件夹**,由 Host 维护(`canvas.meta.json` 的 `folder` 字段);
|
|
106
|
+
清单缺条目时回退为项目 id。**不再使用项目名 slug**(slug 只存在浏览器 localStorage,Host 与 ArtCraft 都无法可靠重建)。
|
|
96
107
|
- 同名重复同步 = **覆盖写**(幂等)。
|
|
97
108
|
|
|
98
109
|
## 5. 退出码与错误约定(画布轮询依赖)
|
|
@@ -103,8 +114,20 @@ effectcraft-cli render --comp Main --out <项目slug>/out/intro.mp4 <项目slug>
|
|
|
103
114
|
|
|
104
115
|
## 6. 联调流程建议
|
|
105
116
|
|
|
106
|
-
1. `artcraft.config.json`
|
|
107
|
-
2. 画布资产页点"同步全部资产到磁盘"→ 检查
|
|
108
|
-
|
|
109
|
-
|
|
117
|
+
1. `artcraft.config.json` 配好 bins → `GET /api/status` 各灯绿。
|
|
118
|
+
2. 画布资产页点"同步全部资产到磁盘"→ 检查 `<画布数据根>/projects/<项目>/craft/media/` 出现文件
|
|
119
|
+
(**不是** DSH profile 目录)。
|
|
120
|
+
3. 资产卡 → PhotoCraft 处理 → 选"智能锐化" → 开始处理 → 确认 `craft/out/graded/` 产物入库。
|
|
121
|
+
4. 搭一个最小分镜流(2 个视频片段)→ 成片节点 FilmCraft 导出 → 用 `artcraft_cli {bin:"filmcraft",args:["commands"]}`
|
|
122
|
+
(或本地 `filmcraft-cli commands`)核对 3.3 的五个问题 → 回填确认框默认 args。
|
|
110
123
|
5. 全绿后把实测参数发回画布侧更新默认模板。
|
|
124
|
+
|
|
125
|
+
## 7. 历史约定(已废弃,排错时仅作线索)
|
|
126
|
+
|
|
127
|
+
| 已废弃 | 现状 |
|
|
128
|
+
|---|---|
|
|
129
|
+
| `artcraft.config.json` 的 `dataRoot` | 0.3.x 移除;画布不再读取 |
|
|
130
|
+
| `GET /status` 的 `dataRoot.path/exists` | 不再返回;画布改用自己的 `projectDirGet` |
|
|
131
|
+
| `?action=write&rel=<项目slug>/…`(无 base) | 被按插件进程 cwd 解析 → 200 静默错位(BLK-02);已全部改为 `base`+`path` |
|
|
132
|
+
| `?op=readtext&rel=…`、`/file?rel=…` | 同上,全部改 `base`+`path` |
|
|
133
|
+
| `<artcraft dataRoot>/<项目slug>/` 目录布局 | 改为 `<画布数据根>/projects/<物理文件夹>/craft/`;历史 slug 目录不迁移、标遗留 |
|
package/docs/guide.en.md
CHANGED
|
@@ -28,6 +28,18 @@ Two ways to drive it, best combined:
|
|
|
28
28
|
|
|
29
29
|
3. First time: finish the basics in the **Settings** tab (see section 5), then start from the chat.
|
|
30
30
|
|
|
31
|
+
### 2.1 Keep the canvas beside the chat (right-pane tab)
|
|
32
|
+
|
|
33
|
+
You don't have to flip between the **Chat** and **Canvas** views: the canvas also opens as a tab in the **Harness right pane**, so you can talk on the left and storyboard on the right at the same time.
|
|
34
|
+
|
|
35
|
+
1. Open the right pane (titled **开始 / Start**).
|
|
36
|
+
2. Click the **无限画布 / Infinite Canvas** card — the canvas opens as a tab beside the conversation, sharing the same projects, nodes and assets as the full-page panel.
|
|
37
|
+
3. Drag the pane wider, or use the pane's fullscreen button, for more canvas room.
|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+
> **One live canvas at a time** (shared node graph and generation state). If the full-page panel is also open, opening it in the pane **moves** the canvas there instead of duplicating it — the other side shows a "move the canvas here" button to bring it back.
|
|
42
|
+
|
|
31
43
|
---
|
|
32
44
|
|
|
33
45
|
## 3. The core: driving the canvas from chat (a full episode)
|
package/docs/guide.zh-CN.md
CHANGED
|
@@ -28,6 +28,18 @@
|
|
|
28
28
|
|
|
29
29
|
3. 首次使用先到**设置**页签完成基础配置(见第 5 节),回到对话即可开工。
|
|
30
30
|
|
|
31
|
+
### 2.1 让画布停在对话旁边(右栏页签)
|
|
32
|
+
|
|
33
|
+
不想在「对话」和「画布」两个视图之间来回切:画布也能作为 **Harness 右侧面板的一个页签**打开,左边对话、右边分镜同屏工作。
|
|
34
|
+
|
|
35
|
+
1. 打开右侧面板(标题为**开始**)。
|
|
36
|
+
2. 点 **无限画布** 卡片 → 画布作为页签出现在对话右侧,与全屏面板共享同一批项目/节点/资产。
|
|
37
|
+
3. 把右栏拖宽,或用右栏的全屏按钮,可获得更大画布区域。
|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+
> **同一时刻只有一个画布实例**(共享节点图与生成状态)。若全屏面板也开着,在右栏打开会把画布**移动**过来而不是复制一份,另一侧显示「把画布切换到这里」按钮;点它即可切回去。
|
|
42
|
+
|
|
31
43
|
---
|
|
32
44
|
|
|
33
45
|
## 3. 核心:用对话驱动画布(以第一集完整制作为例)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/migration-0.18.md
CHANGED
|
@@ -10,9 +10,21 @@ upgrading an existing deployment and moving data to a new machine.
|
|
|
10
10
|
|---|---|
|
|
11
11
|
| Asset metadata in **each browser's IndexedDB** | **`<dataRoot>/canvas.db`** (SQLite, WAL) — one source of truth for every browser |
|
|
12
12
|
| Project documents in `~/.dsh/infinite-canvas/projects/*.json` + a mirror in the data directory | Stored in `canvas.db`; the old files are frozen and no longer written |
|
|
13
|
-
| Media in `<dataRoot>/projects/<project>/<kind>/…` + metadata mirror `assets.json` | New uploads go to `<dataRoot>/
|
|
13
|
+
| Media in `<dataRoot>/projects/<project>/<kind>/…` + metadata mirror `assets.json` | New uploads go to `<dataRoot>/projects/<project>/<kind>/…` and are recorded in `canvas.db`; legacy files stay where they are and keep working |
|
|
14
14
|
| Copying the data directory was not enough to migrate | The data directory **is** the complete data package — copy it, point the data root at it, done |
|
|
15
15
|
|
|
16
|
+
## A note on `objects/` (versions 0.18.0–0.18.4)
|
|
17
|
+
|
|
18
|
+
For a few 0.18 releases, newly uploaded media was stored content-addressed under
|
|
19
|
+
`<dataRoot>/objects/<sha2>/<sha256>` instead of the project folder. That **write
|
|
20
|
+
path has since been retired** — current versions never create new objects — but
|
|
21
|
+
**media uploaded during 0.18.0–0.18.4 still lives there and is still served** by
|
|
22
|
+
`GET /api/object`. Keep the `objects/` directory when you copy or back up your data
|
|
23
|
+
root, otherwise those older assets will fail to load.
|
|
24
|
+
|
|
25
|
+
Deleting an asset still reclaims its object when no other asset references it, so
|
|
26
|
+
the directory does not grow unbounded.
|
|
27
|
+
|
|
16
28
|
## Upgrade the production machine
|
|
17
29
|
|
|
18
30
|
1. **Update the plugin to 0.18.0** (in DSH: check updates on the Infinite Canvas
|
|
@@ -37,7 +49,10 @@ upgrading an existing deployment and moving data to a new machine.
|
|
|
37
49
|
back into `canvas.db`). If you must copy a running directory, copy all
|
|
38
50
|
`canvas.db*` files (`canvas.db`, `canvas.db-wal`, `canvas.db-shm`).
|
|
39
51
|
2. Copy the **entire data directory** to the new machine (e.g. `D:\canvas-data`),
|
|
40
|
-
including `objects
|
|
52
|
+
including `objects/` — the historical object store (see the note above) is still
|
|
53
|
+
needed for media uploaded on 0.18.0–0.18.4. If you started on 0.18.0–0.18.4 and
|
|
54
|
+
never upgraded in between, your newest assets may be in `objects/`; after the
|
|
55
|
+
upgrade, keep that folder.
|
|
41
56
|
3. On the new machine, install the plugin (0.18+), open Infinite Canvas →
|
|
42
57
|
Settings → data root → point it at the copied directory. The database mounts
|
|
43
58
|
as-is; if the directory is an old ≤ 0.17 layout (no `canvas.db`), the one-shot
|
|
@@ -58,13 +73,15 @@ tunnel behind access control if the content matters.
|
|
|
58
73
|
Downgrade the plugin to 0.17.x and it reads the legacy stores again. Everything
|
|
59
74
|
that existed before the upgrade is still in its original location (old project
|
|
60
75
|
JSON files, `assets.json`, media files) — 0.18 freezes them rather than deleting.
|
|
61
|
-
Data created **after** upgrading lives only in `canvas.db
|
|
62
|
-
not appear under 0.17.x, so treat rollback as
|
|
76
|
+
Data created **after** upgrading lives only in `canvas.db` (and, for media uploaded
|
|
77
|
+
on 0.18.0–0.18.4, `objects/`) and will not appear under 0.17.x, so treat rollback as
|
|
78
|
+
a one-way door for new data.
|
|
63
79
|
|
|
64
80
|
## Backup
|
|
65
81
|
|
|
66
82
|
With the Harness stopped, backing up the data directory is a plain file copy:
|
|
67
|
-
`canvas.db` (plus `-wal`/`-shm` if present) and
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
83
|
+
`canvas.db` (plus `-wal`/`-shm` if present), `projects/`, and — if you ever ran
|
|
84
|
+
0.18.0–0.18.4 — the historical `objects/` directory. To verify integrity after
|
|
85
|
+
restoring, open the canvas and spot-check a few assets; the database can be rebuilt
|
|
86
|
+
from a frozen ≤ 0.17 layout plus browser-side uploads if ever needed. Unreferenced
|
|
87
|
+
objects are reclaimed automatically when the asset that pointed at them is deleted.
|
package/docs/release.md
CHANGED
|
@@ -49,21 +49,35 @@ node scripts/smoke-render.mjs # 渲染冒烟:抓渲染期 ReferenceError(
|
|
|
49
49
|
|
|
50
50
|
## 3. 发布前校验(脚本全绿才算过)
|
|
51
51
|
|
|
52
|
+
**唯一入口**:
|
|
53
|
+
|
|
52
54
|
```
|
|
53
|
-
node scripts/
|
|
54
|
-
node scripts/
|
|
55
|
-
node scripts/
|
|
56
|
-
node scripts/test-tools.mjs # 对话工具 schema 校验(标准 JSON Schema,防方言错误)
|
|
57
|
-
node scripts/test-mentions.mjs # @引用解析单测(解析/高亮转义/设定集匹配/[图N]绑定/命名)
|
|
58
|
-
node scripts/audit.mjs # 机械化体检(i18n 键对齐/CSS 类/节点类型覆盖/RPC 与工具一致)
|
|
59
|
-
node scripts/test-host-hardening.mjs # Host 加固回归(读流错误接管/项目合并与墓碑/来源校验等)
|
|
60
|
-
node scripts/test-llm-stream.mjs # LLM 流式与推理模型重试(思考实时推送/按配置上限重试)
|
|
61
|
-
node scripts/test-sync-bible.mjs # 同步合并回归(设定集拉回/边墓碑防复活)
|
|
62
|
-
node scripts/test-user-scenarios.mjs # 用户实测场景定向复验(轮询无损/自动连线/设定集读写)
|
|
63
|
-
node scripts/test-dataroot.mjs # 数据目录回归(项目名文件夹/文档镜像/资产索引/一键导入)
|
|
64
|
-
node scripts/test-image-proxy.mjs # 图片 API 代理回归(CORS 规避:JSON/二进制/状态码透传/超时)
|
|
55
|
+
node scripts/regress.mjs --strict # 发版门禁:四态输出,SKIP 也算失败
|
|
56
|
+
node scripts/regress.mjs # 日常开发:条件用例缺前置记 SKIP,不算失败
|
|
57
|
+
node scripts/regress.mjs --list # 看当前清单
|
|
65
58
|
```
|
|
66
59
|
|
|
60
|
+
清单以 `scripts/regress.mjs` 的 `SUITE` 为**唯一事实源**(与 `RELEASING.md` §标准发版流程第 1 步逐项一致),
|
|
61
|
+
**当前项数与分组以 `node scripts/regress.mjs --list` 实时输出为准——runbook 不写死项数**(门禁新增脚本时这里是必漏之地)。
|
|
62
|
+
|
|
63
|
+
| 分组 | 脚本 |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| 静态审计 | `audit.mjs` |
|
|
66
|
+
| 渲染与组件 | `smoke-render.mjs`、`test-drag-alt.mjs`、`test-download-ext.mjs`、`test-craft-base.mjs` |
|
|
67
|
+
| 核心链路(历史事故区) | `test-compose.mjs`、`test-tools.mjs`、`test-mentions.mjs`、`test-llm-stream.mjs`、`test-sync-bible.mjs`、`test-user-scenarios.mjs`、`test-host-hardening.mjs` |
|
|
68
|
+
| 存储与数据目录 | `test-db.mjs`、`test-delete-project.mjs`、`test-dataroot.mjs` |
|
|
69
|
+
| 网络与条件用例 | `test-image-proxy.mjs`、`test-update.mjs`(需网络)、`test-real-project.mjs`、`test-real-project-graph.mjs`(需真实数据根) |
|
|
70
|
+
| 打包 | `check-pack.mjs` |
|
|
71
|
+
|
|
72
|
+
**为什么要有 regress**:此前最危险的成片链路(`test-compose.mjs`)**不在任何门禁清单里**——历史上
|
|
73
|
+
`bc77bb8e fix(finalcut): 每次合成都崩(ReferenceError: dur is not defined)` 正是只在用户点"合成"时炸、
|
|
74
|
+
静态审计抓不到的典型,而修复它时这条链路连跑都没人跑。
|
|
75
|
+
|
|
76
|
+
**条件用例纪律**:`test-real-project.mjs` / `test-real-project-graph.mjs` 读真实数据根
|
|
77
|
+
(默认 `D:/data/canvas-data`,可用 `DSH_IC_DATA_ROOT` 覆盖)、`test-update.mjs` 打真实 npm registry。
|
|
78
|
+
缺前置时它们会打印"跳过"并 exit 0 —— 这是**假绿**,所以发版一律 `--strict`(SKIP 判失败),
|
|
79
|
+
且 SKIP 时必须打印"原因 + 缺失的前置"。
|
|
80
|
+
|
|
67
81
|
`check-pack` 防的三类事故:漏打包(如 locale/icon 没进包)、多打包(`.github`/`scripts` 混入)、元数据漂移(版本/exports/`dsh.bundle.patch`)。
|
|
68
82
|
|
|
69
83
|
## 4. 层②:Beta 集成测试(已随令牌时代退场,存档)
|
|
@@ -112,9 +126,9 @@ git push origin main dev
|
|
|
112
126
|
## 7. 发布日检查清单
|
|
113
127
|
|
|
114
128
|
- [ ] dev 全部改动已提交并推送
|
|
115
|
-
- [ ]
|
|
129
|
+
- [ ] `node scripts/regress.mjs --strict` 全绿(项数以 `node scripts/regress.mjs --list` 为准,不在此写死;SKIP 算失败)+ 涉及 UI 的重启实测通过
|
|
116
130
|
- [ ] `package.json` version = 目标版本号(自查,勿依赖守卫)
|
|
117
131
|
- [ ] **用户明确批准版本号**
|
|
118
|
-
- [ ] 合并 main
|
|
132
|
+
- [ ] 合并 main(**`git push origin main` 由维护者本人执行**)→ 建 GitHub Release `vX.Y.Z`(指向 main)
|
|
119
133
|
- [ ] Actions 绿 + `npm view`(官方源)版本正确
|
|
120
134
|
- [ ] 汇报版本号 + "重启 Harness 后生效"
|