@ninkch/dsh-infinite-canvas 0.19.20 → 0.20.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/README.md +23 -0
- package/README.zh-CN.md +23 -0
- package/assets/canvas-layout/SKILL.md +19 -2
- package/assets/canvas-studio/SKILL.md +156 -378
- package/client.js +847 -61
- package/cordis.patch.yml +13 -0
- package/docs/UI-RULES.md +4 -0
- package/docs/auto-creation-design.md +68 -0
- package/docs/guide.en.md +13 -1
- package/docs/guide.zh-CN.md +14 -0
- package/index.js +1547 -30
- package/package.json +2 -1
- package/production.js +427 -0
package/README.md
CHANGED
|
@@ -63,6 +63,20 @@ Help & feedback:
|
|
|
63
63
|
|
|
64
64
|

|
|
65
65
|
|
|
66
|
+
## Production stage machine & auto creation (experimental)
|
|
67
|
+
|
|
68
|
+
Every canvas (one episode) carries a host-enforced **production stage** — `brief → bible → assets → script → storyboard → shots_ready → generating → qc → post → delivered` — with six code gates (bible-first, storyboard quality, one video per storyboard, no per-shot nodes, destructive-op confirmation, stage order). Gates refuse with the exact missing items and always accept an explicit-user override (audited). `canvas_production_status` is the only basis for claiming "done".
|
|
69
|
+
|
|
70
|
+
With the **Auto creation (experimental)** switch on (Settings → 自动创作), the agent runs a writers room from one sentence — research → two independent pitches → cross-critique → producer decision → bible → script → per-scene storyboards (quality-gated) → **budget sheet** — with zero paid calls; approve once and it generates videos per storyboard and builds a final-cut node. The transcript lands on the canvas as a 编剧室会议 node; questions are forbidden in this mode.
|
|
71
|
+
|
|
72
|
+
## Image models via `dsh-image-gen`
|
|
73
|
+
|
|
74
|
+
If the `dsh-image-gen` plugin is installed and configured, Settings shows 「图片模型(来自 dsh-image-gen)」: pick one of its providers/models and generate directly through its studio bridge — no base URL or API key in the canvas; credentials stay on the image-gen side.
|
|
75
|
+
|
|
76
|
+
## Precise layout
|
|
77
|
+
|
|
78
|
+
`canvas_layout_get` reads the whole board's geometry; `canvas_layout_node` batch-places nodes by coordinate (media nodes can resize, ratio-preserving) and can pin nodes so `canvas_relayout` never moves them. Relayout packs clusters in bands instead of one endless column and never covers pinned nodes.
|
|
79
|
+
|
|
66
80
|
## Work beside the chat
|
|
67
81
|
|
|
68
82
|
The canvas is not a separate window you have to switch to. It opens as a **tab in the Harness right pane**, so you can talk to the agent on the left and storyboard on the right **at the same time** — ask for a change in chat and watch the nodes update in place.
|
|
@@ -75,6 +89,15 @@ The canvas is not a separate window you have to switch to. It opens as a **tab i
|
|
|
75
89
|
|
|
76
90
|
> One live canvas at a time (shared node graph and generation state): opening it in the pane while the full-page panel is also open **moves** the canvas rather than duplicating it — the other side shows a "move the canvas here" button.
|
|
77
91
|
|
|
92
|
+
## Session ↔ canvas binding + project memory (multi-episode series)
|
|
93
|
+
|
|
94
|
+
Built for long-running series: **one workspace = one project, one session = one episode.**
|
|
95
|
+
|
|
96
|
+
- **Bind in the composer — only if you want to.** The canvas selector in the chat input row (same dropdown shape as 「选择工作区」) shows 选择画布 while unbound. Unbound menu = **仅会话 / 创建项目 / existing projects**: a project expands to its sub-canvases and clicking one binds the session (new sub-canvases can be created inline); touching nothing keeps the session unbound — coding and other non-canvas tasks stay untouched, and an unbind is never reversed by anything. Once bound, the project is locked: the menu shows only that project's sub-canvases (current highlighted, occupied marked 占用中) plus 新建子画布 / 打开画布 / 仅会话 (= unbind).
|
|
97
|
+
- **The chat agent operates exactly the bound canvas.** With the bundled「媒体创作」preset, the agent self-identifies via `canvas_my_canvas` ("this session = episode N of project X") and every `canvas_*` tool defaults to the bound canvas — write/connect/run/delete any node, update the bible, manage the episode. **Cross-canvas and cross-project operations are a code-level ban**: explicitly passing another project's or canvas's ids (including other canvases of the same project) is rejected with a locked error pointing at the unbind action. Unbound sessions are unrestricted.
|
|
98
|
+
- **Project memory keeps 100 episodes continuous.** Each episode's canvas has its own memory (plot decisions, character-state changes, foreshadowing ledger) plus a project-level scheduling index (titles / summaries / keywords / status). The agent is bound by skill discipline to read the index before writing an episode and write its memory back at every milestone, so episode 47 never re-invents what episode 12 decided. Browse any episode's memory in the canvas's **记忆** tab.
|
|
99
|
+
- **Everything lives in the workspace.** `project.json`, `canvases/`, `memory/`, `bindings.json` sit inside `<workspace>/.infinite-canvas/` — copy the folder, move the series. (Media files stay in the plugin's data root.)
|
|
100
|
+
|
|
78
101
|
## 3D Director Stage (previz)
|
|
79
102
|
|
|
80
103
|
A blocking & previz workspace that lives inside the same project: place real glTF characters and set dressing, frame them with real cameras, and send the result back to the canvas as an image or video node.
|
package/README.zh-CN.md
CHANGED
|
@@ -63,6 +63,20 @@
|
|
|
63
63
|
|
|
64
64
|

|
|
65
65
|
|
|
66
|
+
## 制作阶段机与自动创作(实验)
|
|
67
|
+
|
|
68
|
+
每个画布(一集)都有宿主强制的**制作阶段**:`brief → bible → assets → script → storyboard → shots_ready → generating → qc → post → delivered`,配合六道代码闸门(设定集先行 / 分镜质量 / 一表一视频 / 禁逐镜节点 / 破坏性确认 / 阶段越序)。闸门拒绝时会列出确切缺失项,并始终接受用户显式 override(进审计);宣称"完成"必须以 `canvas_production_status` 的 `ready:true` 为据。
|
|
69
|
+
|
|
70
|
+
打开「**自动创作(实验)**」开关(设置页)后,对话智能体从一句话创意跑通编剧室:调研 → 编剧A/B 独立提案 → 互评 → 监制决策 → 设定集 → 剧本 → 逐场分镜表(过质量闸门)→ **预算单**——全程零付费;批准一次后逐分镜表生成视频并建成片节点。讨论记录落在画布「编剧室会议」节点;该模式下**禁止向用户提问**。
|
|
71
|
+
|
|
72
|
+
## 图片模型:直接用 `dsh-image-gen`
|
|
73
|
+
|
|
74
|
+
装了 `dsh-image-gen` 并配置好模型后,设置页出现「图片模型(来自 dsh-image-gen)」:直接选它的服务商/模型生图——画布侧**无需**再填 baseURL/API Key,凭据留在 image-gen 侧。
|
|
75
|
+
|
|
76
|
+
## 精准布局
|
|
77
|
+
|
|
78
|
+
`canvas_layout_get` 读取全图几何;`canvas_layout_node` 按坐标批量摆放(媒体节点可改尺寸且保持画面比例),并可 `pinned` 钉住——`canvas_relayout` 永远不动钉住的节点,簇按带高打包、不再拍成一整列。
|
|
79
|
+
|
|
66
80
|
## 在对话旁边工作
|
|
67
81
|
|
|
68
82
|
画布不是必须切过去的另一个窗口——它可以作为 **Harness 右侧面板里的一个页签**打开,左边对话、右边分镜,**同时进行**:在对话里提要求,右边节点实时跟着变。
|
|
@@ -75,6 +89,15 @@
|
|
|
75
89
|
|
|
76
90
|
> 同一时刻只有一个画布实例(共享节点图与生成状态):在右栏打开时若全屏面板也开着,画布会**被移动到右栏**而不是复制一份——另一侧显示「把画布切换到这里」按钮。
|
|
77
91
|
|
|
92
|
+
## 会话↔画布绑定 + 项目记忆(多集连续创作)
|
|
93
|
+
|
|
94
|
+
为长篇系列设计:**一个工作区 = 一个项目,一个会话 = 一集。**
|
|
95
|
+
|
|
96
|
+
- **输入行绑定——想绑才绑**:对话输入行的画布选择器(「选择工作区」同款下拉格式)默认显示「选择画布」。未绑定态菜单 = **仅会话 / 创建项目 / 已有项目列表**:点项目展开其子画布,点画布即绑定(也可就地新建子画布);不点 = 仅会话,编码等任务零打扰,且解绑后不会被任何机制绑回。已绑定态项目锁定,只列本项目的子画布(当前项高亮、占用标「占用中」)+ 新建子画布 + 打开画布 + 仅会话(解绑)。
|
|
97
|
+
- **会话 Agent 只操作绑定的那张画布**:配合内置「媒体创作」预设,Agent 先用 `canvas_my_canvas` 自证身份(「本会话 = 某项目第 N 集」),之后所有 `canvas_*` 工具缺省即作用于本集画布——写节点/连线/触发/删除/改设定集全量可操作。**跨画布、跨项目是代码级禁令**:显式传其他项目/画布的 id(含同项目其他画布)会被工具直接拒绝(locked),文案指引先解绑;未绑定的会话不受任何限制。
|
|
98
|
+
- **项目记忆让 100 集连续不乱套**:每集画布有自己的记忆(剧情决策/人物状态变化/伏笔账本),项目级调度索引汇总全部集的标题/摘要/关键词/状态。技能纪律要求 Agent 开写前先读索引与本集记忆、每到一个里程碑必须回写——第 47 集不会重复发明第 12 集已经定下的东西。画布「记忆」页签可随时翻看任何一集的记忆全文。
|
|
99
|
+
- **数据跟着工作区走**:`project.json`、`canvases/`、`memory/`、`bindings.json` 全部在 `<工作区目录>/.infinite-canvas/` 里——拷走目录 = 搬走整部剧。(媒体文件仍在插件数据根目录。)
|
|
100
|
+
|
|
78
101
|
## 3D 导演台(预演)
|
|
79
102
|
|
|
80
103
|
同一项目里内置的摆位与预演工作台:把真实 glTF 角色与场景陈设摆进场景,用真实机位取景,再把结果作为图片或视频节点导回画布。
|
|
@@ -21,8 +21,8 @@ description: 画布节点布局纪律:一类型一列、竖向排列、绝不
|
|
|
21
21
|
2. **连线不改列**:连线只表达数据流(剧本→分镜、分镜→视频、资产→参考图)。
|
|
22
22
|
分镜表不会因为连了"某场文本"就移动到那一列旁边——它永远待在「分镜表」列里。
|
|
23
23
|
3. **绝不重叠**:任意两个节点框不得相交,最小间距 24px。
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
插件已内建自动挤开(节点变高、被拖动、被拉大时,相交的节点会被自动推到其下方)。
|
|
25
|
+
**批量/自动建点不要手动挪别人的节点**;用户要求"精准放到某处 / 对齐 / 分列"时,用下方「精确摆放」两个工具(明确意图允许重叠)。
|
|
26
26
|
4. **建点顺序就是叙事顺序**:同类型节点按 场次/序号 顺序创建,
|
|
27
27
|
后建的自动追加在列尾,列的竖向顺序天然等于叙事顺序。
|
|
28
28
|
**不要回填到列中间**(会造成列内乱序,后续只能靠 `canvas_relayout` 修正)。
|
|
@@ -36,6 +36,23 @@ description: 画布节点布局纪律:一类型一列、竖向排列、绝不
|
|
|
36
36
|
「铺开到场景 / 存为资产」放在生成按钮下方、正文之前,用户要找很久)。
|
|
37
37
|
输入类操作(上传、选模型、清空)不受此限,留在输入区。
|
|
38
38
|
|
|
39
|
+
## 一·五、精确摆放(0.20.0)
|
|
40
|
+
|
|
41
|
+
自动排版的列纪律只解决"批量建点不打架"。**用户或对话要求"把某个节点放到某处 / 对齐 / 按坐标调"时,必须用精确工具**:
|
|
42
|
+
|
|
43
|
+
- `canvas_layout_get`:先读全图几何(每个节点的 `nodeId/name/type/x/y/w/h/pinned` + 画布包围盒)。**不许靠猜坐标**。
|
|
44
|
+
- `canvas_layout_node`:一次批量摆放 `{ nodes: [{ nodeId, x, y, w?, h?, pinned? }] }`。
|
|
45
|
+
- `x/y` 任意有限数值(可为负);**允许重叠**——精确摆放是明确意图,不做碰撞拒绝;
|
|
46
|
+
- `w/h` 只有 `image` / `video` 媒体节点可改(w≥160、h≥120);
|
|
47
|
+
- `pinned: true` 钉住:`canvas_relayout` 重排时**跳过它**(保留你摆好的位置)。
|
|
48
|
+
- 何时用哪个:
|
|
49
|
+
| 需求 | 工具 |
|
|
50
|
+
|---|---|
|
|
51
|
+
| "把这三张参考图竖排在 x=100、间距 480" / "把视频列对齐到 x=2600" | `canvas_layout_get` + `canvas_layout_node` |
|
|
52
|
+
| "整块太乱了,大体理一下" | `canvas_relayout`(粗排兜底,尊重 pinned) |
|
|
53
|
+
|
|
54
|
+
精摆完把关键节点 `pinned:true`,后续任何 `canvas_relayout` 都不会冲掉你的布局。
|
|
55
|
+
|
|
39
56
|
## 二、标准建点节奏(保持列干净的写法)
|
|
40
57
|
|
|
41
58
|
```
|