@ninkch/dsh-infinite-canvas 0.0.0-stage → 0.16.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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,83 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # Infinite Canvas for DeepSeek Harness
2
+
3
+ **A node-based short-drama studio inside DeepSeek Harness.** Start from a one-line idea, walk out with a storyboarded, voiced, subtitled video cut — right on an infinite canvas.
4
+
5
+ English | [简体中文](./README.zh-CN.md)
6
+
7
+ <!-- Badges: add CI / npm / license badges here after publishing -->
8
+
9
+ ## What is this?
10
+
11
+ Infinite Canvas is a [DeepSeek Harness](https://github.com/deepseek-ai) plugin that turns the web GUI's sidebar into a full creation studio. Instead of chat round-trips, you work the way directors do: nodes on an infinite canvas, wired into a pipeline — script, storyboard, character & scene assets, image generation, video generation, and a final cut with transitions, subtitles and dubbing.
12
+
13
+ Everything runs locally in your Harness. Bring your own generation APIs, or use the built-in demo mode to learn the whole flow with zero configuration.
14
+
15
+ ## How it works
16
+
17
+ ```mermaid
18
+ flowchart LR
19
+ A[Script node<br>AI screenplay] --> B[Storyboard node<br>AI shot list]
20
+ B --> C[Expand to canvas<br>1 shot = 1 node group]
21
+ C --> D[Image gen<br>multi-reference]
22
+ D --> E[Video gen<br>first frame + refs]
23
+ E --> F[Final cut<br>transitions · subtitles · voices]
24
+ F --> G[Export<br>WebM preview / FilmCraft MP4]
25
+ ```
26
+
27
+ ## Highlights
28
+
29
+ ### Consistent characters, scene after scene
30
+ A per-project **series bible** (style baseline + character/scene/prop cards) is injected into every AI call, so wardrobes, locations and props stay coherent across shots and episodes. After each storyboard run, a local consistency check flags any name that isn't registered yet.
31
+
32
+ ### References that actually bind
33
+ Reference images connect as an ordered, visible list — `[图1] 角色:Lin Ning`, `[图2] 场景:The Old House` — and that exact order is what reaches the model. Multi-character frames stay unambiguous, and Volcano Engine **Seedance**'s native `[图N]` convention is supported end to end (first frame, up to 4 reference images, official task API).
34
+
35
+ ### From shots to a watchable cut
36
+ The **Final Cut node** stitches shot videos in order — crossfade or black transitions, burned-in subtitles, original audio and TTS voices mixed in — and exports a preview cut instantly. For real post-production, one click writes a **FCP7 XML timeline + SRT** to disk and hands the render to [ArtCraft](#artcraft-bridge) (FilmCraft) for a true MP4.
37
+
38
+ ### An editor-grade canvas
39
+ Pan, zoom, marquee select, alignment guides, groups that fold, a minimap, 60-step undo/redo, per-node media history (last 8 results), mask-based inpainting, and middle-click everything — the canvas part should feel like an editor, not a chat sidebar.
40
+
41
+ ### Bring your own models
42
+ Text models come from Harness itself (no extra keys). Image, video and TTS backends are **multi-config** — define as many endpoints as you want, mark a default, and pick per node. No backend configured? Demo mode synthesizes placeholder images and animated videos locally so the entire pipeline is testable offline.
43
+
44
+ ## Quick start
45
+
46
+ 1. Install the plugin (bundle folder) and restart Harness once.
47
+ 2. Click the **Infinite Canvas** button in the left sidebar.
48
+ 3. Add a **Script** node, type a logline, hit *AI write script*.
49
+ 4. Connect it to a **Storyboard** node → *AI break into shots* → *Expand to canvas*.
50
+ 5. Drop character images onto the placeholder asset nodes, hit *Run workflow*, then open a **Final Cut** node and export.
51
+
52
+ > Without any generation API configured, every step runs in demo mode — the full pipeline works offline.
53
+
54
+ ## Generation backends
55
+
56
+ | Kind | Protocol | Notes |
57
+ |---|---|---|
58
+ | Text | Harness LLM service | Script & storyboard writers; pick any configured model, or override per node |
59
+ | Image | OpenAI-compatible `/images/generations`, multi-reference via `/images/edits` | Size (1K/2K/4K) × ratio; mask inpainting via `edits` + PNG mask |
60
+ | Video | Generic submit+poll, or **Volcano Seedance official tasks** | duration 4–10s, 480P/720P/1080P, ratio, first frame, up to 4 reference images |
61
+ | TTS | OpenAI-compatible `/audio/speech` | Per-shot voices mixed into the final cut |
62
+
63
+ ## ArtCraft bridge
64
+
65
+ When the companion [`dsh-artcraft`](../dsh-artcraft/README.md) plugin is installed, the canvas talks to the local **PhotoCraft / FilmCraft / EffectCraft** toolchain over same-origin HTTP: assets sync to a per-project data folder, images get headless PhotoCraft grading (single or batch), and final cuts export as FCP7 XML + SRT for FilmCraft to render as MP4. Status lights, graceful degradation and a full contract live in [`docs/artcraft-handoff.md`](./docs/artcraft-handoff.md).
66
+
67
+ ## Data & privacy
68
+
69
+ - Canvas documents, projects, settings and the series bible live in browser `localStorage` (`dsh-ic:*`); assets live in IndexedDB (`dsh-infinite-canvas`).
70
+ - AI text generation runs through the Harness host process (your configured models, no extra keys).
71
+ - Image/video/TTS calls go directly from the browser to the endpoints you configure — mind CORS and key handling.
72
+ - Nothing is uploaded anywhere by the plugin itself.
73
+
74
+ ## Requirements & limitations
75
+
76
+ - DeepSeek Harness 0.2.0-rc.2+; demo video export needs MediaRecorder (Chromium).
77
+ - The preview cut is real-time recorded WebM; for MP4 masters with multi-track editing, pair with ArtCraft FilmCraft or any NLE.
78
+ - Image `edits`/mask inpainting requires a model that supports the endpoint (e.g. gpt-image-1).
79
+ - Host-side plugin updates need one Harness restart; the web half hot-reloads.
80
+
81
+ ## License
82
+
83
+ Apache-2.0
@@ -0,0 +1,83 @@
1
+ # 无限画布(DeepSeek Harness 版)
2
+
3
+ **DeepSeek Harness 内的节点式短剧工作室。** 从一句话创意出发,在无限画布上完成剧本、分镜、角色资产、画面生成、视频生成,直到带转场、字幕、配音的成片。
4
+
5
+ [English](./README.md) | 简体中文
6
+
7
+ <!-- 徽标位:发布后在顶部添加 CI / npm / license 徽标 -->
8
+
9
+ ## 这是什么?
10
+
11
+ 无限画布是一个 [DeepSeek Harness](https://github.com/deepseek-ai) 插件:它在 Web 界面左侧栏加入一个完整的创作工作室。你不需要在对话里反复描述需求,而是像导演一样工作——无限画布上的节点连成流水线:剧本、分镜、角色与场景资产、图片生成、视频生成,最终在成片节点完成转场、字幕与配音。
12
+
13
+ 全部本地运行于你的 Harness。生成后端自带或自配均可;未配置任何 API 时有内置演示模式,整条流水线离线可学可测。
14
+
15
+ ## 工作方式
16
+
17
+ ```mermaid
18
+ flowchart LR
19
+ A[剧本节点<br>AI 编剧] --> B[分镜表节点<br>AI 拆分镜]
20
+ B --> C[铺开到画布<br>1 镜 = 1 组节点]
21
+ C --> D[图片生成<br>多参考图]
22
+ D --> E[视频生成<br>首帧 + 参考图]
23
+ E --> F[成片<br>转场 · 字幕 · 配音]
24
+ F --> G[导出<br>WebM 预览 / FilmCraft MP4]
25
+ ```
26
+
27
+ ## 核心亮点
28
+
29
+ ### 角色一致,跨镜跨集
30
+ 项目级**设定集**(风格基调 + 角色/场景/道具卡)会注入每一次 AI 调用,服装、场景、道具在镜头之间、剧集之间保持一致。每次生成分镜后,本地一致性检查会标出尚未登记的名称。
31
+
32
+ ### 参考图真正"绑定"
33
+ 参考图以**有序、可见**的列表接入——`[图1] 角色:林宁`、`[图2] 场景:老屋`——这个顺序就是发给模型的顺序。多角色画面不再混淆;火山引擎 **Seedance** 的原生 `[图N]` 约定全链路支持(首帧、最多 4 张参考图、官方任务 API)。
34
+
35
+ ### 从分镜到能看的成片
36
+ **成片节点**按顺序拼接分镜视频——叠化/黑场转场、字幕烧录、原声与 TTS 配音混音——即时导出预览版。要做真正的后期,一键把 **FCP7 XML 时间线 + SRT** 写到磁盘,交给 [ArtCraft](#artcraft-桥接)(FilmCraft)渲染成 MP4。
37
+
38
+ ### 剪辑器级画布
39
+ 平移缩放、框选、对齐参考线、可折叠分组、小地图、60 步撤销重做、节点媒体历史(最近 8 次)、蒙版局部重绘——画布的手感应该是剪辑软件,而不是聊天侧栏。
40
+
41
+ ### 模型自带
42
+ 文本模型直接用 Harness 配置(无需额外 Key)。图片、视频、TTS 后端支持**多配置**——配任意多个接口、设默认、节点上按需选择。什么都没配?演示模式在本地合成占位图与动画视频,整条流水线离线可跑。
43
+
44
+ ## 快速开始
45
+
46
+ 1. 安装插件(bundle 目录),重启一次 Harness。
47
+ 2. 点左侧栏的 **无限画布** 按钮。
48
+ 3. 加一个 **剧本** 节点,输入一句话创意,点 *AI 生成剧本*。
49
+ 4. 连到 **分镜表** 节点 → *AI 生成分镜* → *铺开到画布*。
50
+ 5. 给占位资产节点上传角色图,点 *运行工作流*,再打开 **成片** 节点导出。
51
+
52
+ > 未配置任何生成 API 时,每一步都走演示模式——整条流水线离线可用。
53
+
54
+ ## 生成后端
55
+
56
+ | 类型 | 协议 | 说明 |
57
+ |---|---|---|
58
+ | 文本 | Harness LLM 服务 | 剧本与分镜写手;可选任意已配置模型,节点上可覆盖 |
59
+ | 图片 | OpenAI 兼容 `/images/generations`,多参考走 `/images/edits` | 清晰度(1K/2K/4K)× 比例;蒙版重绘走 `edits` + PNG 蒙版 |
60
+ | 视频 | 通用提交+轮询,或 **火山 Seedance 官方任务** | 时长 4–10s、480P/720P/1080P、比例、首帧、最多 4 张参考图 |
61
+ | TTS | OpenAI 兼容 `/audio/speech` | 逐段配音,混入成片 |
62
+
63
+ ## ArtCraft 桥接
64
+
65
+ 安装配套的 [`dsh-artcraft`](../dsh-artcraft/README.md) 插件后,画布通过同源 HTTP 调用本地 **PhotoCraft / FilmCraft / EffectCraft** 工具链:资产同步到按项目隔离的数据目录,图片走 PhotoCraft 无头调色(单张或批量),成片导出 FCP7 XML + SRT 交给 FilmCraft 渲染 MP4。状态灯、优雅降级与完整契约见 [`docs/artcraft-handoff.md`](./docs/artcraft-handoff.md)。
66
+
67
+ ## 数据与隐私
68
+
69
+ - 画布文档、项目、设置与设定集存于浏览器 `localStorage`(`dsh-ic:*`);资产存于 IndexedDB(`dsh-infinite-canvas`)。
70
+ - AI 文本经 Harness 宿主进程调用(使用你已配置的模型,无需额外 Key)。
71
+ - 图片/视频/TTS 请求由浏览器直连你配置的地址——请注意 CORS 与密钥保管。
72
+ - 插件自身不向任何第三方上传数据。
73
+
74
+ ## 环境与限制
75
+
76
+ - DeepSeek Harness 0.2.0-rc.2+;演示视频导出依赖 MediaRecorder(Chromium)。
77
+ - 预览成片为实时录制的 WebM;要多轨精修的 MP4 母版,请配合 ArtCraft FilmCraft 或任意非线性编辑软件。
78
+ - 图片 `edits`/蒙版重绘需要模型支持该端点(如 gpt-image-1)。
79
+ - 插件 Host 半侧更新需重启一次 Harness;网页半侧热更新。
80
+
81
+ ## 许可
82
+
83
+ Apache-2.0