dsh-plugin-deck-studio 0.2.5 → 0.2.8

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.
Files changed (51) hide show
  1. package/cordis.example.yml +88 -30
  2. package/cordis.patch.yml +81 -30
  3. package/index.js +187 -28
  4. package/lib/capabilities.js +234 -0
  5. package/lib/citation-check.js +93 -0
  6. package/lib/config.js +30 -7
  7. package/lib/deck-brief.js +35 -1
  8. package/lib/deck-docs.js +45 -7
  9. package/lib/deck-templates.js +8 -1
  10. package/lib/deck-workspace.js +27 -1
  11. package/lib/designs.js +15 -0
  12. package/lib/fact-labels.js +81 -0
  13. package/lib/first-draft.js +119 -0
  14. package/lib/image-review.js +523 -0
  15. package/lib/page-contract.js +112 -0
  16. package/lib/proposal-decision.js +249 -75
  17. package/lib/review-agent.js +168 -0
  18. package/lib/review-personas.js +59 -3
  19. package/lib/review-protocol.js +411 -0
  20. package/lib/review-readers.js +300 -0
  21. package/lib/review-score.js +198 -0
  22. package/lib/title-chain.js +122 -0
  23. package/lib/tools.js +983 -85
  24. package/package.json +4 -3
  25. package/seeds/docs/assets/screenshots/07-new-deck.png +0 -0
  26. package/seeds/docs/assets/screenshots/08-presentation.png +0 -0
  27. package/seeds/docs/assets/screenshots/09-style-library.png +0 -0
  28. package/seeds/docs/assets/screenshots/10-style-management.png +0 -0
  29. package/seeds/docs/assets/screenshots/f186-01-agent-style-create.png +0 -0
  30. package/seeds/docs/assets/screenshots/f186-02-designs-card.png +0 -0
  31. package/seeds/docs/assets/screenshots/f187-01-review-readers.png +0 -0
  32. package/seeds/docs/assets/screenshots/f187-02-gap-report.png +0 -0
  33. package/seeds/docs/assets/screenshots/i14-01-create.png +0 -0
  34. package/seeds/docs/assets/screenshots/i14-02-first-draft.png +0 -0
  35. package/seeds/docs/assets/screenshots/i14-03-rendered.png +0 -0
  36. package/seeds/docs/assets/screenshots/i14-04-image-review.png +0 -0
  37. package/seeds/docs/assets/screenshots/i14-05-p01-page.png +0 -0
  38. package/seeds/docs/assets/screenshots/manual/07-new-deck.png +0 -0
  39. package/seeds/docs/compat.md +3 -3
  40. package/seeds/docs/install.en.md +29 -14
  41. package/seeds/docs/install.md +29 -15
  42. package/seeds/docs/sample-deck.en.md +1 -1
  43. package/seeds/docs/sample-deck.md +1 -1
  44. package/seeds/docs/styles.en.md +5 -4
  45. package/seeds/docs/styles.md +17 -7
  46. package/seeds/samples/DSA-01.jpg +0 -0
  47. package/seeds/samples/DSA-02.jpg +0 -0
  48. package/seeds/samples/DSA-03.jpg +0 -0
  49. package/seeds/styles/DSA.json +22 -0
  50. package/ui/workbench.css +5 -0
  51. package/ui/workbench.html +111 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-deck-studio",
3
- "version": "0.2.5",
3
+ "version": "0.2.8",
4
4
  "private": false,
5
5
  "description": "Deckline:DSH 的 image deck / PPT 工作台插件——原生 Chat + 整页图片 deck 工作区 + 设计风格库;用对话做 PPT、按页出图、版本可追踪、导出 PDF/PPTX。",
6
6
  "license": "MIT",
@@ -9,6 +9,7 @@
9
9
  "exports": {
10
10
  ".": "./index.js",
11
11
  "./client": "./client.js",
12
+ "./capabilities": "./lib/capabilities.js",
12
13
  "./package.json": "./package.json"
13
14
  },
14
15
  "keywords": [
@@ -30,7 +31,7 @@
30
31
  ],
31
32
  "engines": {
32
33
  "node": "^22.19.0 || >=24.0.0",
33
- "dsh": ">=0.1.7-0 <0.3.0"
34
+ "dsh": ">=0.2.1-rc.2 <0.3.0"
34
35
  },
35
36
  "scripts": {
36
37
  "verify": "node verify/smoke.mjs",
@@ -61,7 +62,7 @@
61
62
  "url": "https://github.com/yuna78/dsh-deck-studio/issues"
62
63
  },
63
64
  "peerDependencies": {
64
- "@deepseek-ai/dsh": ">=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0"
65
+ "@deepseek-ai/dsh": ">=0.2.1-rc.2 <0.3.0"
65
66
  },
66
67
  "author": "Yuna",
67
68
  "files": [
@@ -7,10 +7,10 @@
7
7
 
8
8
  | 项 | 值 | 说明 |
9
9
  |---|---|---|
10
- | `peerDependencies["@deepseek-ai/dsh"]` | `>=0.1.7-0 <0.2.0 \|\| >=0.2.0-0 <0.3.0 \|\| >=0.2.1-0 <0.3.0` | 装到 0.3+ 会被 DSH 的 peer 检查拦下 |
11
- | `engines.dsh` | `>=0.1.7-0 <0.3.0` | 元数据口径,同 peer |
10
+ | `peerDependencies["@deepseek-ai/dsh"]` | `>=0.2.1-rc.2 <0.3.0` | 装到 0.3+ 会被 DSH 的 peer 检查拦下 |
11
+ | `engines.dsh` | `>=0.2.1-rc.2 <0.3.0` | 插件0.2.6起:内置审稿使用0.2.1 API,旧DSH请升级或保留插件0.2.5 |
12
12
  | `engines.node` | `^22.19.0 \|\| >=24.0.0` | 与 DSH 运行时要求一致;**Node 23 不在范围内** |
13
- | 已验证版本 | `0.1.7-rc.2`(旧基线)· `0.2.1-rc.2`(2026-10-21:隔离环境 + 本地全局升级后真机回归) | 见下表 |
13
+ | 已验证版本 | `0.2.1-rc.2`(0.2.6:内置审稿真实服务19项、产品模型评审;此前版本还有0.1.7旧基线) | 历史批次不代表本版继续支持0.1.7 |
14
14
 
15
15
  ## 回归记录
16
16
 
@@ -6,15 +6,27 @@ assets / conversations on the right. It is not a standalone app — it runs on a
6
6
 
7
7
  > Target users: people who build content and presentations with DSH. After setup you can edit a deck
8
8
  > from its script, render slide images on request (single page or a named batch), manage governance documents, register your own
9
- > design styles (with sample images) and start from 8 preset styles.
9
+ > design styles (with sample images) and start from 9 preset styles.
10
+
11
+ ## Assistant capabilities (0.2.7+)
12
+
13
+ The Deckline preset explicitly mounts Web search/fetch, scoped file/image reading and search, scratch-file write/edit, a read-only research subagent, questions, todos, file delivery, time context and compaction. No shell, arbitrary-preset delegation or developer skills; internal audience reviewers remain tool-free.
14
+
15
+ Search uses the host Web settings. The default DeepSeek backend requires its account/`DEEPSEEK_API_KEY`; a third-party chat key does not configure search. HTTP fetch reads public destinations. Missing credentials must produce an explicit error, not fabricated results.
16
+
17
+ Generic reads are limited to the session workspace and explicit `deck-capabilities.config.readRoots`; secret paths and symlinks are denied. Authorize exact external material paths rather than an entire home directory. DSH image attachments use explicit `attachmentRoots` within its attachment objects subtree, for `read_image` only; this does not authorize the whole DSH directory. Image input also requires a vision-capable model route. Generic writes/edits are restricted to `.deck-assistant-scratch` under the workspace. Formal scripts, intent and revisions must use deck tools. Narrow directory searches to clean material directories if secret/symlink checks reject a broad scan.
18
+
19
+ If a handwritten profile overrides `preset-deck-studio.config.plugins`, merge the capability entries from the updated `cordis.example.yml`, restart and check a new session. Do not mount the whole standard preset or shell as a workaround.
10
20
 
11
21
  ## 0. Prerequisites
12
22
 
23
+ Plugin 0.2.6+ requires DSH 0.2.1-rc.2 or a newer 0.2.x release. Restart DSH after upgrading. Remove any manually declared `preset-deck-critic` entry from your profile; legacy `review.presetId` is ignored. Reviews now run internally without selecting another mode.
24
+
13
25
  | Dependency | Version | Notes |
14
26
  |---|---|---|
15
27
  | Node.js | `^22.19` or `≥ 24` | Same as the DSH runtime; Node 23 is not supported |
16
28
  | pnpm | 10+ | DSH uses pnpm to manage profile dependencies |
17
- | DSH | `≥ 0.1.7 < 0.3` | `npm i -g @deepseek-ai/dsh`; verified on 0.1.7-rc.2 / 0.2.1-rc.2, see [compat.md](compat.md) |
29
+ | DSH | `≥ 0.2.1-rc.2 < 0.3` (plugin 0.2.6+) | `npm i -g @deepseek-ai/dsh`; verified on 0.2.1-rc.2, see [compat.md](compat.md) |
18
30
  | An LLM provider key | — | e.g. `DEEPSEEK_API_KEY` / `OPENAI_API_KEY` (configured in the profile, see DSH docs) |
19
31
  | An image node key | — | For real renders; the fake mode lets you try the flow first (section 4) |
20
32
 
@@ -77,16 +89,18 @@ The minimum (append to the profile's `cordis.patch.yml`):
77
89
  config:
78
90
  displayName: 'Deckline'
79
91
  userName: 'Yuna'
80
- # where new decks are created; empty = the plugin's internal .deck/projects/<id>/source
81
- projectsRoot: '/absolute/path/to/your/sharing'
92
+ # root for new deck source files; empty = <dataRoot>/projects/<deck-id>/source
93
+ projectsRoot: '/absolute/path/to/your/decks'
94
+ # workspacePath: '/absolute/path/to/your/workspace' # DSH chat workspace, not storage
82
95
  decks:
83
96
  - id: my-deck
84
97
  label: 'My deck'
85
98
  sourceRoot: '/absolute/path/to/my-deck'
86
99
  ```
87
100
 
88
- > `decks[].sourceRoot` is read-only: Deckline never writes to the source directory; all edits and
89
- > revisions live in `.deck/`. You can also start with **+ New Deck** if you have no deck yet.
101
+ > `decks[].sourceRoot` is a managed source and always read-only: Deckline never writes to it; working copies,
102
+ > revisions and renders live under `dataRoot`. A locally created deck is different: after user confirmation,
103
+ > script / intent source files may be written back to that local project directory. You can also start with **+ New Deck** if you have no deck yet.
90
104
 
91
105
  ### Per-deck project rules (optional)
92
106
 
@@ -125,14 +139,15 @@ creating a deck, check this table first.
125
139
  - **`dataRoot` defaults to `$DSH_HOME/deckline`** (usually `~/.dsh/deckline`) — never inside the plugin
126
140
  package, so plugin upgrades do not touch it. Override with `dataRoot: '/your/path'` in the profile patch,
127
141
  or the `DSH_DECK_DATA_ROOT` env var.
128
- - **`projectsRoot`** decides where new decks are created; if unset they go to `<dataRoot>/projects/<deckId>/source`.
129
- - **Managed source decks are read-only**: Deckline never writes to a deck registered via `decks[].sourceRoot`.
142
+ - **`projectsRoot`** decides where locally created deck source files live; if unset they go to `<dataRoot>/projects/<deckId>/source`. It does not select the chat workspace.
143
+ - **`workspacePath`** selects the DSH workspace used for conversation binding; it is independent of `projectsRoot` / `dataRoot`. If unset, Deckline resolves it from the startup and source directories.
144
+ - **Managed source decks are read-only**: Deckline never writes to a deck registered via `decks[].sourceRoot`; a confirmed local deck may write back to its own source files.
130
145
  - **Backup**: archive `dataRoot` and `projectsRoot` together (documents + images + events):
131
146
  ```sh
132
147
  tar czf deckline-backup-$(date +%Y%m%d).tgz "$DSH_HOME/deckline" "<your projectsRoot>"
133
148
  ```
134
- - The workbench **Settings** panel shows the current data directory; a dev profile may point `dataRoot` at
135
- a directory inside the source tree (e.g. `.deck/`) explicitly.
149
+ - The workbench **Settings** panel shows the current data directory; keep `dataRoot` outside the source tree
150
+ in normal installs so runtime data is portable and plugin upgrades cannot overwrite it.
136
151
 
137
152
  ## 3. Start
138
153
 
@@ -216,7 +231,7 @@ bottom of the preview (paste / pick files work the same way).
216
231
 
217
232
  Samples live under `designs/<ABBR>/` (ABBR is your style abbreviation):
218
233
 
219
- - canvas directory (recommended): `.deck/projects/<canvasDeckId>/source/designs/<ABBR>/`;
234
+ - canvas directory (recommended): `<dataRoot>/projects/<canvasDeckId>/source/designs/<ABBR>/`;
220
235
  - or `designs/<ABBR>/` inside any managed deck source (Deckline scans and merges them).
221
236
 
222
237
  Refresh the page afterwards. png / jpg / webp are supported; names are free-form
@@ -224,9 +239,9 @@ Refresh the page afterwards. png / jpg / webp are supported; names are free-form
224
239
 
225
240
  ### Use preset styles (no prompt writing needed)
226
241
 
227
- **+ Import preset styles** on the Designs page imports all 8 bundled styles (business consulting /
242
+ **+ Import preset styles** on the Designs page imports all 9 bundled styles (business consulting /
228
243
  premium dark / Japanese minimal / magazine editorial / tech blueprint / hand-drawn whiteboard /
229
- Swiss minimal / aurora gradient), each with samples. See [styles.md](styles.md).
244
+ Swiss minimal / aurora gradient / deep-sea amber), each with samples. See [styles.md](styles.md).
230
245
 
231
246
  ## 6. Troubleshooting
232
247
 
@@ -235,7 +250,7 @@ Swiss minimal / aurora gradient), each with samples. See [styles.md](styles.md).
235
250
  | Port already in use | `dsh --profile deckline --port 13100`; or kill the old process with `lsof -tiTCP:13090 -sTCP:LISTEN` |
236
251
  | Page 404 / blank | Make sure the plugin bundle is enabled: `dsh --profile deckline --dump-config \| grep deck-studio` |
237
252
  | No "render" button / render fails | Check the key state in Settings; confirm `render.mode: real`; `curl` the node endpoint |
238
- | New decks land in the wrong place | Set `projectsRoot`; otherwise they go to the plugin data directory `.deck/projects/` |
253
+ | New decks land in the wrong place | Set `projectsRoot`; otherwise they go to `<dataRoot>/projects/` (by default `<DSH_HOME>/deckline/projects/`) |
239
254
  | Where are data / samples | See section 2.5: source decks in `projectsRoot`, working copies / renders in `dataRoot` (default `~/.dsh/deckline`) |
240
255
  | Upgrading the plugin | `dsh plugin --profile deckline install <spec>`, or `add` the new version again |
241
256
 
@@ -7,15 +7,26 @@ Deckline(`dsh-plugin-deck-studio`)是 DeepSeek Harness(DSH)的 **image d
7
7
  它不是独立 App,必须挂在 DSH 的 profile 上运行。
8
8
 
9
9
  > 目标用户:用 DSH 做内容/演示的人。装完后你可以:读 script 改 deck、按页出图(可点名批量连出)、管理治理文档、
10
- > 登记自己的设计风格(上传样张),并用 8 个预设风格直接开工。
10
+ > 登记自己的设计风格(上传样张),并用 9 个预设风格直接开工。
11
+
12
+ ## 主助手基础能力(0.2.7起)
13
+
14
+ Deckline制作模式显式提供联网搜索/抓取、文件/图片读取与检索、辅助草稿写编辑、只读研究子Agent、提问/待办/文件交付、时间与上下文压缩。不开放shell、任意preset委派或开发技能;内部听众审稿仍零工具。
15
+
16
+ - `web_search`使用DSH宿主的搜索设置;默认DeepSeek后端需相应账户或`DEEPSEEK_API_KEY`。使用第三方LLM key不代表搜索已配置。`web_fetch`默认读取公开HTTP(S)网页。缺凭证/失败明确报错,不能靠加提示词修复。
17
+ - 通用读只允许当前会话工作区与`deck-capabilities.config.readRoots`显式授权路径;秘密文件和symlink拒绝。读取其他资料请在profile精确授权,勿授权整个home;DSH图片附件使用`attachmentRoots`精确授权其objects子树下的图片文件/目录,仅`read_image`可用,不授权整个DSH目录。视觉读取还要求当前模型路由支持image输入。
18
+ - 通用`write/edit`仅限工作区`.deck-assistant-scratch`辅助目录;脚本/意图/版本须用deck工具,不可绕过确认。宽泛目录搜索因秘密文件/链接被拒时缩小到干净资料目录。
19
+ - 手写profile若覆盖`preset-deck-studio.config.plugins`,请合并新版`cordis.example.yml`的基础能力条目,重启后用新会话核对工具。不要把完整标准preset或Bash直接挂进来。
11
20
 
12
21
  ## 0. 前置条件
13
22
 
23
+ 插件0.2.6起需要 DSH 0.2.1-rc.2 或更新的0.2.x;升级后重启 DSH。若手写 profile 仍声明 `preset-deck-critic`,请移除;旧 `review.presetId` 已忽略,评审改由插件内部调度,不需选审稿模式。
24
+
14
25
  | 依赖 | 版本 | 说明 |
15
26
  |---|---|---|
16
27
  | Node.js | `^22.19` 或 `≥ 24` | 与 DSH 运行时一致;Node 23 不在支持范围 |
17
28
  | pnpm | 10+ | DSH 用 pnpm 管理 profile 依赖 |
18
- | DSH | `≥ 0.1.7 < 0.3`(0.1.5 不支持) | **用 npm 全局安装的发行版**:`npm i -g @deepseek-ai/dsh@0.2.1-rc.2`;已验证 0.2.1-rc.2,见 [compat.md](compat.md)。从源码自编译的 dsh 若缺内置包(如 `@deepseek-ai/dsh-agent-preset`)会启动失败,见 4.3 |
29
+ | DSH | `≥ 0.2.1-rc.2 < 0.3`(插件0.2.6起) | **用 npm 全局安装的发行版**:`npm i -g @deepseek-ai/dsh@0.2.1-rc.2`;已验证 0.2.1-rc.2,见 [compat.md](compat.md)。从源码自编译的 dsh 若缺内置包(如 `@deepseek-ai/dsh-agent-preset`)会启动失败,见 4.3 |
19
30
  | 一个 LLM provider key | — | 例:`DEEPSEEK_API_KEY` / `OPENAI_API_KEY`(profile 里配置,见 DSH 文档) |
20
31
  | 一个 image 节点 key | — | 生成整页图用;可先用 fake 模式体验(见第 4 节) |
21
32
 
@@ -111,15 +122,17 @@ Deckline 的配置都在 **profile patch 层**:`~/.dsh/profiles/deckline/cordi
111
122
  config:
112
123
  displayName: 'Deckline'
113
124
  userName: '' # 留空 = 首页只显示「欢迎你」;填了就显示「XX,欢迎你」
114
- # 新建 deck 落盘根:留空 = 插件内部 .deck/projects/<id>/source
115
- projectsRoot: '/absolute/path/to/your/sharing'
125
+ # 新建 deck 源文件根:留空 = <dataRoot>/projects/<deck-id>/source
126
+ projectsRoot: '/absolute/path/to/your/decks'
127
+ # workspacePath: '/absolute/path/to/your/workspace' # DSH 会话工作区,不是保存位置
116
128
  decks:
117
129
  - id: my-deck
118
130
  label: '我的 deck'
119
131
  sourceRoot: '/absolute/path/to/my-deck'
120
132
  ```
121
133
 
122
- > `decks[].sourceRoot` 只读:Deckline 永远不写源目录,编辑产物和版本都在 `.deck/` 里。
134
+ > `decks[].sourceRoot` 是受控源,始终只读:Deckline 不会写入它;编辑工作副本、版本和出图落在 `dataRoot`。
135
+ > 通过「+ 新建 Deck」创建的本机 deck 是另一种情况:用户确认后,script / intent 等源文件可以回写到该本机项目目录。
123
136
  > 没有现成 deck 也可以先用「+ 新建 Deck」建一个。
124
137
 
125
138
  ### 每个 deck 的项目规则(可选)
@@ -155,13 +168,14 @@ Deckline 的数据分两处:**你的 deck 源**(`projectsRoot`,纯 md +
155
168
 
156
169
  - **`dataRoot` 默认 `$DSH_HOME/deckline`**(通常是 `~/.dsh/deckline`)——不在插件包里,升级插件不会覆盖;
157
170
  可在 profile patch 配 `dataRoot: '/your/path'`,或环境变量 `DSH_DECK_DATA_ROOT` 覆盖。
158
- - **`projectsRoot`** 决定新建 deck 落在哪;不配置时落在 `<dataRoot>/projects/<deckId>/source`。
159
- - **受控源 deck 只读**:`decks[].sourceRoot` 指向的已有 deck 目录,插件永远不写。
171
+ - **`projectsRoot`** 决定本机新建 deck 的源文件落在哪;不配置时落在 `<dataRoot>/projects/<deckId>/source`。它不决定聊天会话绑定的工作区。
172
+ - **`workspacePath`** 只决定会话绑定哪个 DSH workspace,与 `projectsRoot` / `dataRoot` 相互独立;未配置时插件按启动目录和源目录自动选择工作区。
173
+ - **受控源 deck 只读**:`decks[].sourceRoot` 指向的已有 deck 目录,插件永远不写;本机新建 deck 在用户确认后可回写自己的源文件。
160
174
  - **备份**:把 `dataRoot` 和 `projectsRoot` 一起打包即可(文档 + 图 + 事件都在里面):
161
175
  ```sh
162
176
  tar czf deckline-backup-$(date +%Y%m%d).tgz "$DSH_HOME/deckline" "<你的 projectsRoot>"
163
177
  ```
164
- - 工作台「设置」面板会显示当前数据目录;本仓库开发时数据根在仓库 `.deck/`(profile 里显式配置)。
178
+ - 工作台「设置」面板会显示当前数据目录;开发环境也建议使用独立的 `dataRoot`,不要把运行数据写进仓库。
165
179
  - **preset 工具实例要和根挂载用同一个数据根**(F-98):DSH 面板路由与 Agent 工具是两个实例,根挂载里覆盖了
166
180
  `dataRoot` / `projectsRoot` 时,preset 的 `deck-studio-tools` 也要写同一组值(推荐 YAML 锚点),
167
181
  否则新建 deck 只进一边的注册表,Agent 会报「未知 deck:…」。
@@ -194,7 +208,7 @@ Deckline 支持:
194
208
  3. 填:**模式**(fake / real)、**生图节点 endpoint**、**模型**、**key 环境变量名**(或 **key 文件路径**)、**出图尺寸**;
195
209
  4. 点 **保存并生效**。
196
210
 
197
- 保存后写入本机数据目录 `~/.dsh/deckline/render-settings.json`(开发调试时也可用 profile 显式配 `dataRoot`,例如仓库内 `.deck/`;
211
+ 保存后写入本机数据目录 `<dataRoot>/render-settings.json`(默认 `~/.dsh/deckline/render-settings.json`;
198
212
  已 gitignore):节点可直存 API key(0600,界面只显示「已保存」,payload 不回显),也可改用变量名 / key 文件;
199
213
  下次启动自动生效,并覆盖 profile 里的 render 配置。
200
214
 
@@ -252,7 +266,7 @@ export DSH_DECK_IMAGE_API_KEY="sk-…" # 只放在你的 shell / 密钥
252
266
  - 没配 key / 仍是 fake 模式时,设置面板会直接给出提示。
253
267
  - 模型名填你的中转实际开放的模型;常见 OpenAI 兼容名 `gpt-image-2` 系列的模型 id 以节点 `/v1/models` 为准。
254
268
  - 工作台「设置 → 出图节点」可以直接切换线路,也能**新增 / 编辑 / 删除节点**:填 名称 + 接口地址 + API Key +
255
- 模型名即可(key 存本机 `.deck/render-settings.json`,0600,不进 git;也可改用 env / key 文件);
269
+ 模型名即可(key 存本机 `<dataRoot>/render-settings.json`,0600,不进 git;也可改用 env / key 文件);
256
270
  切换写当前 deck 的 `render-selection.json`,下一次出图生效,不用重启。
257
271
  - **修图**(`deck_image_edit`)需要节点支持 `POST /v1/images/edits`(multipart:`image` + `prompt` + `size` + `model`)。
258
272
  回车节点通常和出图同源;不填 `editEndpoint` 就按上面的规则派生,派生不出来(自定义路径)时工具会明确报错、不猜地址。
@@ -273,15 +287,15 @@ export DSH_DECK_IMAGE_API_KEY="sk-…" # 只放在你的 shell / 密钥
273
287
 
274
288
  样张存在 `designs/<ABBR>/` 下(ABBR 是你的风格缩写):
275
289
 
276
- - 画布目录(推荐):`.deck/projects/<canvasDeckId>/source/designs/<ABBR>/`;
290
+ - 画布目录(推荐):`<dataRoot>/projects/<canvasDeckId>/source/designs/<ABBR>/`;
277
291
  - 或任何受控 deck 源里的 `designs/<ABBR>/`(Deckline 会自动扫描并合并展示)。
278
292
 
279
293
  放完刷新页面即可。支持 png / jpg / webp;命名随意(`sample-01.jpg` 之类便于排序)。
280
294
 
281
295
  ### 用预设风格(不用自己写 prompt)
282
296
 
283
- Designs 页 **+ 导入预设风格** 会一次导入 8 个自带风格(商务咨询 / 高端深色 fancy / 日系极简 /
284
- 杂志编辑 / 科技蓝图 / 手绘白板 / 瑞士极简 / 渐变极光),每个都带样张,见 [docs/styles.md](styles.md)。
297
+ Designs 页 **+ 导入预设风格** 会一次导入 9 个自带风格(商务咨询 / 高端深色 fancy / 日系极简 /
298
+ 杂志编辑 / 科技蓝图 / 手绘白板 / 瑞士极简 / 渐变极光 / 深海琥珀),每个都带样张,见 [docs/styles.md](styles.md)。
285
299
 
286
300
  ## 6. 排障
287
301
 
@@ -290,7 +304,7 @@ Designs 页 **+ 导入预设风格** 会一次导入 8 个自带风格(商
290
304
  | 端口被占 | `dsh --profile deckline --port 13100`;或 `lsof -tiTCP:13090 -sTCP:LISTEN` 杀掉旧进程 |
291
305
  | 页面 404 / 白屏 | 确认插件组合包已启用:`dsh --profile deckline --dump-config \| grep deck-studio` |
292
306
  | 没有「生图」按钮 / 出图失败 | 设置面板看 key 是否配置;确认 `render.mode: real`;节点 endpoint 可 `curl` 通 |
293
- | 新 deck 目录落错位置 | 配 `projectsRoot`;否则落在插件数据目录 `.deck/projects/` |
307
+ | 新 deck 目录落错位置 | 配 `projectsRoot`;否则落在 `<dataRoot>/projects/`(默认 `<DSH_HOME>/deckline/projects/`) |
294
308
  | 数据 / 样张在哪 | 见 §2.5:源 deck 在 `projectsRoot`,工作副本 / 出图在 `dataRoot`(默认 `~/.dsh/deckline`) |
295
309
  | 升级插件 | `dsh plugin --profile deckline install <spec>`,或重新 `add` 新版本 |
296
310
 
@@ -314,7 +328,7 @@ dsh --profile deck-studio --no-open # 本仓开发 profile(端口
314
328
  | 左侧 DSH 外壳栏(工作区 / 会话) | 收起隐藏,只留 Deckline 导航 | profile 里 `hideShellSidebar: false` |
315
329
  | Decks 页 | 自动登记 **Deckline 示例手册**(仓库 `samples/deckline-intro`,只读) | 配了任意 `decks[]` 就不登记;或 `bootstrap: false` |
316
330
  | 资源库 | 自动拷入品牌素材(logo / mark)到 `<dataRoot>/resources` | 该目录非空时不动;或 `bootstrap: false` |
317
- | Designs 页 | 自动导入 8 个预设风格(含样张) | 已有风格时不重复;或 `bootstrap: false` |
331
+ | Designs 页 | 自动导入 9 个预设风格(含样张) | 已有风格时不重复;或 `bootstrap: false` |
318
332
  | 问候语 / 新 deck 作者 | 首次启动弹「先记个名字」,存 `<dataRoot>/user.json`;首页显示「XX,欢迎你」,新 deck 的 owner / 封面作者默认用它 | 点「稍后」不写;之后可在 profile 里用 `userName` 覆盖 |
319
333
 
320
334
  自举只在「空」的时候发生,重复启动不会覆盖你已有的内容;想彻底关掉,在 profile patch 里给根挂载加
@@ -44,7 +44,7 @@ Field cheat sheet (copy-paste ready): [`samples/deckline-intro/popup.md`](../sam
44
44
  CHANGELOG.md —— v0.1.0 能力清单与边界
45
45
  docs/productization.md —— 产品化定位、路线图、发布范围、一期边界
46
46
  docs/install.md —— 安装、profile 配置、出图节点与 key 放置、fake 模式
47
- docs/styles.md —— 8 个预设风格 + 自定义风格方法
47
+ docs/styles.md —— 9 个预设风格 + 自定义风格方法
48
48
  docs/sample-deck.md —— 用示例 deck 跑通流程(本页步骤来源)
49
49
 
50
50
  【2. 代码(真实链接)】
@@ -41,7 +41,7 @@
41
41
  CHANGELOG.md —— v0.1.0 能力清单与边界
42
42
  docs/productization.md —— 产品化定位、路线图、发布范围、一期边界
43
43
  docs/install.md —— 安装、profile 配置、出图节点与 key 放置、fake 模式
44
- docs/styles.md —— 8 个预设风格 + 自定义风格方法
44
+ docs/styles.md —— 9 个预设风格 + 自定义风格方法
45
45
  docs/sample-deck.md —— 用示例 deck 跑通流程(本页步骤来源)
46
46
 
47
47
  【2. 代码(真实链接)】
@@ -6,7 +6,7 @@ language for the images.
6
6
 
7
7
  ## 1. Use preset styles (recommended starting point)
8
8
 
9
- Designs page → **+ Import preset styles** imports the 8 styles below in one click (each ships with
9
+ Designs page → **+ Import preset styles** imports the 9 styles below in one click (each ships with
10
10
  3 real baseline samples: cover / info page / data page). It is idempotent — existing abbreviations are
11
11
  skipped, never duplicated.
12
12
 
@@ -20,6 +20,7 @@ skipped, never duplicated.
20
20
  | SKT | Hand-drawn whiteboard (workshop) | Whiteboard + markers + sticky notes + handwritten headings | Workshops, co-creation, training |
21
21
  | SWS | Swiss minimal (black/white/red) | Pure white + oversized black type + true red + generous whitespace | Minimal manifestos, big-type posters |
22
22
  | GRD | Aurora gradient (modern SaaS) | Violet-cyan aurora gradients + glow + 3D abstraction + glass cards | Product launches, internet style |
23
+ | DSA | Deep Sea Amber (deep teal + gold hairlines) | Near-ink teal base + champagne-gold hairlines + serif headlines + generous whitespace | Premium talks, dark narratives, big-type covers |
23
24
 
24
25
  Definitions: `plugin/deck-studio/seeds/styles/<ABBR>.json`; samples:
25
26
  `plugin/deck-studio/seeds/samples/<ABBR>-0{1,2,3}.jpg` (3 baseline samples, 1280-wide previews).
@@ -42,8 +43,8 @@ bottom of the preview (paste / pick files work the same way).
42
43
  ### Way 2: drop files directly
43
44
 
44
45
  Put images under `designs/<ABBR>/` (canvas directory
45
- `.deck/projects/<canvasDeckId>/source/designs/<ABBR>/`, or `designs/<ABBR>/` inside any managed deck
46
- source). png / jpg / webp are supported; refresh the page afterwards.
46
+ `<dataRoot>/projects/<canvasDeckId>/source/designs/<ABBR>/`). Existing `designs/<ABBR>/` directories in managed sources are also scanned read-only.
47
+ Prefer uploading new samples through the canvas rather than modifying managed sources. png / jpg / webp are supported; refresh the page afterwards.
47
48
 
48
49
  Fields of `style.json` (the plugin also writes one automatically):
49
50
 
@@ -104,7 +105,7 @@ node scripts/f74-regenerate-presets.mjs --only=BIZ --limit=1
104
105
  ```
105
106
 
106
107
  What the script does: sync `styleBrief` from `seeds/styles/<ABBR>.json` into the online design's
107
- `style.json` → back up old samples to `.deck/tmp/f74-old-samples/<ABBR>/` → render one image per
108
+ `style.json` → back up old samples to `<dataRoot>/tmp/f74-old-samples/<ABBR>/` → render one image per
108
109
  `baselineBriefs` entry (prompt recorded in `samples.jsonl`) → downscale and write back into `seeds/samples/`.
109
110
  Refresh the Designs page afterwards; no service restart needed.
110
111
 
@@ -7,7 +7,7 @@ Agent 出图时会以这份描述作为画面语言的基础。
7
7
 
8
8
  ## 一、用预设风格(推荐先从这里开始)
9
9
 
10
- Designs 页 → **+ 导入预设风格**:一次导入下面 8 个风格(每个都带 3 张真实基线样张:封面 / 信息页 / 数据页),幂等——
10
+ Designs 页 → **+ 导入预设风格**:一次导入下面 9 个风格(每个都带 3 张真实基线样张:封面 / 信息页 / 数据页),幂等——
11
11
  已存在的缩写自动跳过,不会重复创建。
12
12
 
13
13
  | 缩写 | 名称 | 画面语言 | 适合 |
@@ -20,12 +20,22 @@ Designs 页 → **+ 导入预设风格**:一次导入下面 8 个风格(
20
20
  | SKT | 手绘白板(工作坊) | 白板 + 马克笔 + 便签 + 手写标题 | 研讨、共创、培训 |
21
21
  | SWS | 瑞士极简(黑白红) | 纯白 + 超大黑体 + 正红 + 大留白 | 极简宣言、大字报 |
22
22
  | GRD | 渐变极光(深色玻璃 · 编辑感) | 近黑炭底 + 紫青极光丝带 + 玻璃面板 + 香槟金细线 | 深色封面、编辑感信息页 |
23
+ | DSA | 深海琥珀(深青 + 香槟金细线) | 深青近墨底 + 香槟金细线 + 衬线大标题 + 大留白 | 高端分享、深色叙事、封面大标题 |
23
24
 
24
25
  定义文件:`plugin/deck-studio/seeds/styles/<ABBR>.json`;样张:`plugin/deck-studio/seeds/samples/<ABBR>-0{1,2,3}.jpg`
25
26
  (3 张基线样张,1280 宽预览)。导入逻辑幂等:再点一次只会跳过已存在的风格。
26
27
 
27
28
  ## 二、自己加一个风格
28
29
 
30
+ ### 方式 0:普通会话里直接说(F-186,做完才发现风格时最省事)
31
+
32
+ 没先选风格也做了 deck,觉得这套视觉语言想复用?直接在 Deckline 会话里说「这个风格好看,帮我登记一下」:
33
+
34
+ 1. Agent 先读页面实际视觉,写一套风格提示词(颜色 / 材质 / 字体 / 版式);
35
+ 2. `deck_style_create` 建 design(缩写不用你给,自动生成),并把已出图页面的**成品图复制**成样张——默认挑 3 张(封面 / 信息页 / 数据对比页各一,三张才说明风格在各类版面上都成立;不重新出图、不花额度);
36
+ 3. 登记完即可在新建 Deck 时选到,也可以用 `deck_design_bind` 把当前 deck 关联过去;
37
+ 4. 想给已有风格再加样张:让它传 `designId` + `pages` 补(只加样张,不动名称和提示词)。
38
+
29
39
  ### 方式 1:界面里加(可以贴图)
30
40
 
31
41
  1. Designs 页 → **+ 添加风格**;
@@ -37,8 +47,8 @@ Designs 页 → **+ 导入预设风格**:一次导入下面 8 个风格(
37
47
 
38
48
  ### 方式 2:直接放文件
39
49
 
40
- 把图片放进 `designs/<ABBR>/` 目录(画布目录 `.deck/projects/<canvasDeckId>/source/designs/<ABBR>/`,
41
- 或任何受控 deck 源里的 `designs/<ABBR>/`)。支撑 png / jpg / webp,刷新页面即可。
50
+ 把图片放进 `designs/<ABBR>/` 目录(画布目录 `<dataRoot>/projects/<canvasDeckId>/source/designs/<ABBR>/`,
51
+ 插件也会只读扫描已有源目录中的 `designs/<ABBR>/`)。新增样张优先通过画布上传,避免修改受控源。支持 png / jpg / webp,刷新页面即可。
42
52
 
43
53
  `style.json` 的字段(插件也会自动写一份):
44
54
 
@@ -59,7 +69,7 @@ Designs 页 → **+ 导入预设风格**:一次导入下面 8 个风格(
59
69
  ```
60
70
 
61
71
  - `styleBrief`:**风格提示词本体**。Agent 出样张时自动带上(`composeSamplePrompt`),只需要再补「这张要试的画面」(brief)。
62
- 预设包里的 8 个风格都已按真实样张补齐;改风格用 `deck_style_update` / 界面「复制」后改。
72
+ 预设包里的 9 个风格都已按真实样张补齐;改风格用 `deck_style_update` / 界面「复制」后改。
63
73
  注意:`reference` 只给人看,不进 image prompt——写机构 / 客户品牌名会触发 image adapter 内容过滤(表现为 180s 超时)。
64
74
  - `baselineBriefs`:预设自带的 3 张基线样张的版面 brief(封面 / 信息页 / 数据页),供重制脚本与「导入预设」使用。
65
75
 
@@ -83,18 +93,18 @@ Designs 页 → **+ 导入预设风格**:一次导入下面 8 个风格(
83
93
 
84
94
  ## 五、预设基线样张(3 张打底)与重制
85
95
 
86
- 8 个预设风格每个都有 3 张基线样张(封面 / 信息页 / 数据页),作用是:**一眼看清这个风格能做成什么样**,
96
+ 9 个预设风格每个都有 3 张基线样张(封面 / 信息页 / 数据页),作用是:**一眼看清这个风格能做成什么样**,
87
97
  同时给 Agent 一个「同风格但不同版面」的参照。重制流程:
88
98
 
89
99
  ```bash
90
- # 8 个预设 × 3 张(1920×1080 出图 → 压 1280 宽 JPEG 回写 seeds/samples)
100
+ # 9 个预设 × 3 张(1920×1080 出图 → 压 1280 宽 JPEG 回写 seeds/samples)
91
101
  node scripts/f74-regenerate-presets.mjs
92
102
  # 只重制一个风格 / 只试一张
93
103
  node scripts/f74-regenerate-presets.mjs --only=BIZ --limit=1
94
104
  ```
95
105
 
96
106
  脚本做的事:把 `seeds/styles/<ABBR>.json` 的 `styleBrief` 同步进线上 design 的 `style.json` →
97
- 旧样张备份到 `.deck/tmp/f74-old-samples/<ABBR>/` → 按 `baselineBriefs` 逐张出图(prompt 落 `samples.jsonl`)→
107
+ 旧样张备份到 `<dataRoot>/tmp/f74-old-samples/<ABBR>/` → 按 `baselineBriefs` 逐张出图(prompt 落 `samples.jsonl`)→
98
108
  预览回写 `seeds/samples/`。重制后刷新 Designs 页即可看到新样张;不用重启服务。
99
109
 
100
110
  > 样张里的文字是示意(图像模型会糊字),不承诺逐字复刻;也不要把真实客户资料、品牌 logo 放进样例图。
Binary file
Binary file
Binary file
@@ -0,0 +1,22 @@
1
+ {
2
+ "abbr": "DSA",
3
+ "name": "深海琥珀(深青 + 香槟金细线)",
4
+ "description": "深青近墨底 + 香槟金细线 + 衬线中文大标题 + 大面积留白 + 右侧竖排英文小字;信息页用暖米色直角卡片承载要点。克制、单一层次。",
5
+ "constraints": "不要亮色 / 高饱和色块;不要渐变、光晕、玻璃拟态;不要金色填充块或粗金边;不要无衬线做大标题;不要图标堆砌、插画、3D;不要满版密排或多栏密集网格;不要重投影卡片。",
6
+ "reference": "高端分享会 / 深色咨询风(深海青底 + 香槟金细线),非客户素材",
7
+ "styleBrief": "深青(deep teal)近墨底铺满整页,无渐变、无明显纹理,压暗整体明度。香槟金(champagne gold)极细线条只做结构与框定:1px 页边细框、细横线分隔,不用金色填充块、不做粗金边。中文大标题用高对比衬线(宋体系),字重中等偏粗、字号大、行距紧,左对齐,是页面唯一视觉重心;正文用低对比灰青小字,行距舒展。大面积留白不少于 40%,元素集中在左半区或上下角,不做满版密排。英文小字竖排在页面右侧边缘,字号小、字距拉开、自上而下,作版式标注。信息页用暖米色(warm ivory)直角卡片承载要点,无阴影或极弱阴影,卡片内字用深青 / 近黑。整体克制、单一层次,靠留白与细线建立秩序,不靠图标与插画。",
8
+ "baselineBriefs": [
9
+ {
10
+ "title": "封面(深青金线)",
11
+ "brief": "深青近墨底满版铺底,无渐变;1px 香槟金页边细框 + 一条细金横线。左对齐两行中文衬线大标题(第二行略小、含一个金色词或金色细下划线),标题上方一枚加宽字距的金色小标签;右下角一行低对比灰青小字注记与页码;右侧边缘竖排英文小字;留白不少于 40%,不放大图、不放插画。"
12
+ },
13
+ {
14
+ "title": "数据对比页",
15
+ "brief": "深青近墨底 + 金色细框;左上两行中文衬线标题 + 一行灰青小字结论;中部并排两块暖米色直角卡片(各含一个大数字 / 短标签 / 两行说明,数字用深青近黑),两块卡片之间一条金色细竖线分隔,卡片无阴影或极弱阴影;底部细金横线 + 页码;右侧竖排英文小字。"
16
+ },
17
+ {
18
+ "title": "要点 / 决策页",
19
+ "brief": "深青近墨底 + 金色细框;左上中文衬线大标题,下方 3 组要点用细金横线分隔,每组一行加宽字距的小标签 + 两行低对比灰青说明,不用图标、不用色块;右侧竖排英文小字标注;页面下部大面积留白,底部金线 + 页码。"
20
+ }
21
+ ]
22
+ }
package/ui/workbench.css CHANGED
@@ -86,6 +86,11 @@
86
86
  .doc-head{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:10px}
87
87
  .doc-head h2{margin:6px 0 0;font-family:"Noto Serif SC",Georgia,serif;font-size:22px;color:var(--ink)}
88
88
  .doc-head .doc-file{margin-left:auto;color:#8a9599;font-size:10.5px;align-self:center}
89
+ /* F-187:审稿页的相关文件切换(听众读后感 / 意图差距 / 工程口径 …) */
90
+ .doc-head .doc-files{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;max-width:70%}
91
+ .doc-file-chip{border:1px solid #d7dee0;background:#fff;color:#5a6a70;border-radius:999px;padding:3px 10px;font-size:10.5px;cursor:pointer}
92
+ .doc-file-chip:hover{border-color:#0f6f7a;color:#0f6f7a}
93
+ .doc-file-chip.active{background:#0f6f7a;border-color:#0f6f7a;color:#fff}
89
94
  .doc-status{font-size:10.5px;padding:2px 9px;border-radius:9px;border:1px solid var(--line);color:#6c7a7e;white-space:nowrap}
90
95
  .doc-status.ok{color:#2f7a52;border-color:color-mix(in srgb,#2f7a52 40%,transparent);background:#eef6f0}
91
96
  .doc-status.partial,.doc-status.draft{color:var(--gold);border-color:color-mix(in srgb,var(--gold) 45%,transparent);background:#fbf4e8}