dsh-ppt 0.5.0 → 0.5.1

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 (4) hide show
  1. package/CHANGELOG.md +78 -73
  2. package/README.en.md +165 -169
  3. package/README.md +167 -171
  4. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,75 +1,80 @@
1
- # Changelog
2
-
1
+ # Changelog
2
+
3
+ ## 0.5.1(2026-09-28)
4
+
5
+ - 兼容验证更新到 Harness 0.2.0-rc.1:70 项测试与 18 插件共同加载检查通过(`ppt_create` / `ppt_themes` 与 `dsh-ppt` 技能注册正常)。
6
+ - 运行时代码未变;同步中英文兼容性声明。
7
+
3
8
  ## 0.5.0(2026-09-27)
4
9
 
5
- - 包含新的演讲者预览、缩略图和计时控件。浏览器不支持或拒绝全屏时显示操作提示,不再无声失败。
6
-
7
- - **演讲者视图升级**:独立窗口内显示真实当前页与下一页预览(复用幻灯片渲染)、全片缩略图条(点击跳页)、wall clock + 计时(P 暂停 / T 重置)、备注字号 +/-、黑屏 / 白屏(B / W)、结束放映一键退出。
8
- - **通信更稳**:演讲者窗口改用 Blob URL + postMessage 同步,不再依赖同源 document 直连,file:// 打开的 deck 也能正常联动;窗口被直接关闭后 0.8 秒内自动恢复普通模式。
9
- - **观众端**:黑屏 / 白屏时隐藏 HUD;观众端备注与 HUD 默认隐藏逻辑保持不变。
10
- - 播放器保留 0.4.5 的全部修复,70 项测试通过。
11
- ## 0.4.5(2026-09-23)
12
-
13
- - **播放器交互修复(由合成用户复测驱动)**:备注面板不再遮挡页脚 HUD,新增关闭按钮并支持 Esc;无备注页显示「本页无备注」占位;`G` 改为缩略图网格总览(当前页高亮、页码同步、点击跳页、Esc 退出、页码角标);`?` 打开快捷键帮助;表格页补页面标题、数字列右对齐、表格边界与内容列对齐、表头对比度达标;窄屏字号下限 14px、HUD 按钮 44px;新增环绕提示、ArrowUp/Down 翻页、数字 1-9 跳页、focus-visible 与 reduced-motion 处理。
14
- - **演讲者视图(V)**:独立窗口显示当前页 / 下一页 / 备注 / 计时 / 进度,支持 +/- 字号、T 重置计时、P 暂停、方向键翻页、Esc 关闭;打开后主窗口隐藏备注与 HUD,观众端不泄露备注,关闭后状态自动恢复。
15
- - **主题预览**:`ppt_themes { preview: true, outputDir: "..." }` 生成 `themes-preview.html`(5 套主题并排对比)与每套主题一张 `theme-<id>.svg` 色板卡,可直接用于 README / npm 首屏。
16
- - 测试 70 项通过;三个合成用户(非技术运营 / 键盘党 / 培训讲师)真实浏览器复测通过,无 P0/P1。
17
-
18
- ## 0.4.4(2026-09-21)
19
-
20
- - Markdown 与结构化长表格自动按每页 8 行数据分页,续页重复表头,备注仅放第一页;修复无小标题、首个 H1 下表格被丢弃。
21
- - 不再静默裁掉中间幻灯片、额外列或长单元格:总页数超过 maxSlides、超过 8 列或单元格超过 60 字符时,生成前提示调整。短行补空白,HTML 与 PPTX 保留同一份数据。
22
- - 续页标题跟随中文、英文或双语设置。新增 7 项回归,67 项测试通过;生成产物检查覆盖全部 17 行数据。
23
-
24
- ## 0.4.3(2026-09-18)
25
-
26
- - 修复:中文分句导致正文丢内容;`--content deck.md` 不读文件;>8 条要点静默丢弃;`deck.json` 版本写死;英文 deck 被标 zh-CN。
27
- - 稳健性:三件套改为 tmp + rename 原子提交(失败回滚);过滤 Windows 保留名;文件名探测改一次目录快照。
28
- - 测试 48 → 60 项。
29
- ## 0.4.2(2026-09-11)
30
-
31
- - 适配并验证官方 Harness 0.1.5-rc.1:整套同载、工具/技能契约与 Web 鉴权检查通过。
32
- - Node 要求与宿主统一为 `^22.19.0 || >=24.0.0`;更新中英文兼容性说明。
33
-
34
- ## 0.4.1
35
-
36
- - 修复中文正文分页:中英文标点都作为句子边界,无标题纯文本严格按「每 5 句一页」分页,不再把整段中文当一句而截断丢正文。
37
- - CLI `--content <path>` 与 `--content @<path>` 行为一致:路径存在即读取文件,README / SKILL.md 示例可直接复制运行。
38
- - 单节要点超过 8 条时自动续页(第二页起标题带「(续)」),不再静默丢弃第 9 条之后的要点。
39
- - manifest `version` 改从 `package.json` 读取,消除与发版号的漂移;测试同步改为动态断言。
40
- - PPTX 文本与备注 run 的语言跟随 `lang`(zh-CN / en-US),英文 deck 不再被 PowerPoint 标成中文。
41
-
42
- ## 0.4.0
43
-
44
- - **动效(motion,默认开)**:HTML 放映页间淡入 + 要点按序逐条入场(打印自动兜底为静态);PPTX 每页原生淡入转场,`bullets` 页按段落构建、放映时点击一次出现一条要点(PowerPoint「出现,按段落」标准时序)。
45
- - **`motion` 开关**:`ppt_create` 新增 `motion: 'on' | 'off'`,CLI 新增 `--motion on|off`;`off` 时产物不含任何动画代码,适合严肃/打印场景。manifest 记录该开关。
46
- - **技能文件瘦身**:SKILL.md 收敛为触发条件 + 执行纪律 + 六步流水线 + 按需装载索引 + 质量门禁;新增 `references/syntax.md`(Markdown 解析、表格/金句/备注语法、结构化 slides、motion)与 `references/troubleshooting.md`;写作规则去重归口 `references/copywriting.md`,hyperframes 视觉联动并入 `references/themes.md`。
47
- - 动效相关测试 8 例(转场/时序树/点击节点计数/静态开关/CLI/工具层),全套 42/42 通过。
48
-
49
- ## 0.3.0
50
-
51
- - **演讲者备注**:结构化 `slides` 的 `notes` 字段与 Markdown `<!-- 备注: ... -->` 注释都会成为该页备注;HTML 放映按 `S` 键(或右下角「备注」按钮)呼出备注面板;PPTX 生成原生 `notesSlide` + `notesMaster` 部件,PowerPoint 演示者视图直接可用。
52
- - **新增 `quote` 金句版式**:`>` 引用块自动识别,末行 `—— 出处` 识别为署名;HTML 与 PPTX 双端实现。
53
- - **新增 `table` 表格版式**:Markdown 表格(`| ... |`)自动识别,PPTX 用原生 `a:tbl` 图形帧(主题色表头 + 隔行着色),限 9 行 8 列。
54
- - 版式集合扩为 `cover | section | bullets | statement | quote | table | closing`;结构化 `slides` 增加 `rows` 字段。
55
- - 无表格数据的 `table` 页自动退化为要点页,避免空白版式。
56
- - 新特性测试 8 例(解析/规范化/HTML/PPTX 部件/端到端)。
57
-
58
- ## 0.2.1
59
-
60
- - 修复 PPTX zip 中央目录 local header 偏移恒为 0 导致 PowerPoint 提示修复的问题(issue #1/#3,社区 PR #2 同修法)。
61
-
62
- ## 0.2.0
63
-
64
- - 新增 `defaultTheme` / `defaultLang` 配置,作为 `ppt_create` 未显式传参时的默认值。
65
- - 配置校验:`defaultLang` 仅接受 `zh` / `en` / `bilingual`。
66
- - 更新测试覆盖与双语文档。
67
-
68
- ## 0.1.0
69
-
70
- - 首发:`dsh-ppt` 技能 + 工具插件。
71
- - `ppt_create`:Markdown / 结构化 slides → HTML 网页放映 + PPTX 导出 + manifest。
72
- - `ppt_themes`:5 套内置视觉主题(Swiss Pulse / Velvet Standard / Data Drift / Soft Signal / Maximalist Type)。
73
- - 中英双语界面(zh / en / bilingual)。
74
- - 裸 SKILL.md + `build-deck.mjs` CLI,跨 Claude Code / Cursor / Gemini CLI / Codex / DSH。
75
- - 零运行时依赖:OOXML 与 zip 由 `node:zlib` 手写生成。
10
+ - 包含新的演讲者预览、缩略图和计时控件。浏览器不支持或拒绝全屏时显示操作提示,不再无声失败。
11
+
12
+ - **演讲者视图升级**:独立窗口内显示真实当前页与下一页预览(复用幻灯片渲染)、全片缩略图条(点击跳页)、wall clock + 计时(P 暂停 / T 重置)、备注字号 +/-、黑屏 / 白屏(B / W)、结束放映一键退出。
13
+ - **通信更稳**:演讲者窗口改用 Blob URL + postMessage 同步,不再依赖同源 document 直连,file:// 打开的 deck 也能正常联动;窗口被直接关闭后 0.8 秒内自动恢复普通模式。
14
+ - **观众端**:黑屏 / 白屏时隐藏 HUD;观众端备注与 HUD 默认隐藏逻辑保持不变。
15
+ - 播放器保留 0.4.5 的全部修复,70 项测试通过。
16
+ ## 0.4.5(2026-09-23)
17
+
18
+ - **播放器交互修复(由合成用户复测驱动)**:备注面板不再遮挡页脚 HUD,新增关闭按钮并支持 Esc;无备注页显示「本页无备注」占位;`G` 改为缩略图网格总览(当前页高亮、页码同步、点击跳页、Esc 退出、页码角标);`?` 打开快捷键帮助;表格页补页面标题、数字列右对齐、表格边界与内容列对齐、表头对比度达标;窄屏字号下限 14px、HUD 按钮 44px;新增环绕提示、ArrowUp/Down 翻页、数字 1-9 跳页、focus-visible 与 reduced-motion 处理。
19
+ - **演讲者视图(V)**:独立窗口显示当前页 / 下一页 / 备注 / 计时 / 进度,支持 +/- 字号、T 重置计时、P 暂停、方向键翻页、Esc 关闭;打开后主窗口隐藏备注与 HUD,观众端不泄露备注,关闭后状态自动恢复。
20
+ - **主题预览**:`ppt_themes { preview: true, outputDir: "..." }` 生成 `themes-preview.html`(5 套主题并排对比)与每套主题一张 `theme-<id>.svg` 色板卡,可直接用于 README / npm 首屏。
21
+ - 测试 70 项通过;三个合成用户(非技术运营 / 键盘党 / 培训讲师)真实浏览器复测通过,无 P0/P1。
22
+
23
+ ## 0.4.4(2026-09-21)
24
+
25
+ - Markdown 与结构化长表格自动按每页 8 行数据分页,续页重复表头,备注仅放第一页;修复无小标题、首个 H1 下表格被丢弃。
26
+ - 不再静默裁掉中间幻灯片、额外列或长单元格:总页数超过 maxSlides、超过 8 列或单元格超过 60 字符时,生成前提示调整。短行补空白,HTML 与 PPTX 保留同一份数据。
27
+ - 续页标题跟随中文、英文或双语设置。新增 7 项回归,67 项测试通过;生成产物检查覆盖全部 17 行数据。
28
+
29
+ ## 0.4.3(2026-09-18)
30
+
31
+ - 修复:中文分句导致正文丢内容;`--content deck.md` 不读文件;>8 条要点静默丢弃;`deck.json` 版本写死;英文 deck 被标 zh-CN。
32
+ - 稳健性:三件套改为 tmp + rename 原子提交(失败回滚);过滤 Windows 保留名;文件名探测改一次目录快照。
33
+ - 测试 48 → 60 项。
34
+ ## 0.4.2(2026-09-11)
35
+
36
+ - 适配并验证官方 Harness 0.1.5-rc.1:整套同载、工具/技能契约与 Web 鉴权检查通过。
37
+ - Node 要求与宿主统一为 `^22.19.0 || >=24.0.0`;更新中英文兼容性说明。
38
+
39
+ ## 0.4.1
40
+
41
+ - 修复中文正文分页:中英文标点都作为句子边界,无标题纯文本严格按「每 5 句一页」分页,不再把整段中文当一句而截断丢正文。
42
+ - CLI `--content <path>` 与 `--content @<path>` 行为一致:路径存在即读取文件,README / SKILL.md 示例可直接复制运行。
43
+ - 单节要点超过 8 条时自动续页(第二页起标题带「(续)」),不再静默丢弃第 9 条之后的要点。
44
+ - manifest `version` 改从 `package.json` 读取,消除与发版号的漂移;测试同步改为动态断言。
45
+ - PPTX 文本与备注 run 的语言跟随 `lang`(zh-CN / en-US),英文 deck 不再被 PowerPoint 标成中文。
46
+
47
+ ## 0.4.0
48
+
49
+ - **动效(motion,默认开)**:HTML 放映页间淡入 + 要点按序逐条入场(打印自动兜底为静态);PPTX 每页原生淡入转场,`bullets` 页按段落构建、放映时点击一次出现一条要点(PowerPoint「出现,按段落」标准时序)。
50
+ - **`motion` 开关**:`ppt_create` 新增 `motion: 'on' | 'off'`,CLI 新增 `--motion on|off`;`off` 时产物不含任何动画代码,适合严肃/打印场景。manifest 记录该开关。
51
+ - **技能文件瘦身**:SKILL.md 收敛为触发条件 + 执行纪律 + 六步流水线 + 按需装载索引 + 质量门禁;新增 `references/syntax.md`(Markdown 解析、表格/金句/备注语法、结构化 slides、motion)与 `references/troubleshooting.md`;写作规则去重归口 `references/copywriting.md`,hyperframes 视觉联动并入 `references/themes.md`。
52
+ - 动效相关测试 8 例(转场/时序树/点击节点计数/静态开关/CLI/工具层),全套 42/42 通过。
53
+
54
+ ## 0.3.0
55
+
56
+ - **演讲者备注**:结构化 `slides` 的 `notes` 字段与 Markdown `<!-- 备注: ... -->` 注释都会成为该页备注;HTML 放映按 `S` 键(或右下角「备注」按钮)呼出备注面板;PPTX 生成原生 `notesSlide` + `notesMaster` 部件,PowerPoint 演示者视图直接可用。
57
+ - **新增 `quote` 金句版式**:`>` 引用块自动识别,末行 `—— 出处` 识别为署名;HTML 与 PPTX 双端实现。
58
+ - **新增 `table` 表格版式**:Markdown 表格(`| ... |`)自动识别,PPTX 用原生 `a:tbl` 图形帧(主题色表头 + 隔行着色),限 9 行 8 列。
59
+ - 版式集合扩为 `cover | section | bullets | statement | quote | table | closing`;结构化 `slides` 增加 `rows` 字段。
60
+ - 无表格数据的 `table` 页自动退化为要点页,避免空白版式。
61
+ - 新特性测试 8 例(解析/规范化/HTML/PPTX 部件/端到端)。
62
+
63
+ ## 0.2.1
64
+
65
+ - 修复 PPTX zip 中央目录 local header 偏移恒为 0 导致 PowerPoint 提示修复的问题(issue #1/#3,社区 PR #2 同修法)。
66
+
67
+ ## 0.2.0
68
+
69
+ - 新增 `defaultTheme` / `defaultLang` 配置,作为 `ppt_create` 未显式传参时的默认值。
70
+ - 配置校验:`defaultLang` 仅接受 `zh` / `en` / `bilingual`。
71
+ - 更新测试覆盖与双语文档。
72
+
73
+ ## 0.1.0
74
+
75
+ - 首发:`dsh-ppt` 技能 + 工具插件。
76
+ - `ppt_create`:Markdown / 结构化 slides → HTML 网页放映 + PPTX 导出 + manifest。
77
+ - `ppt_themes`:5 套内置视觉主题(Swiss Pulse / Velvet Standard / Data Drift / Soft Signal / Maximalist Type)。
78
+ - 中英双语界面(zh / en / bilingual)。
79
+ - 裸 SKILL.md + `build-deck.mjs` CLI,跨 Claude Code / Cursor / Gemini CLI / Codex / DSH。
80
+ - 零运行时依赖:OOXML 与 zip 由 `node:zlib` 手写生成。
package/README.en.md CHANGED
@@ -1,174 +1,170 @@
1
- # dsh-ppt
1
+ # dsh-ppt
2
2
 
3
3
  ## 0.5.0 update (2026-09-27)
4
4
 
5
5
  Includes presenter previews, thumbnails and timer controls. Unsupported or rejected fullscreen requests now show an actionable message instead of silently failing.
6
6
 
7
- Validation host: Harness 0.1.7-rc.2 built from official sources, retaining the local tool-scheduler fix. Build and automated checks pass; interactive coverage and external-service limits are recorded in this release round.
8
-
9
- ![npm](https://img.shields.io/npm/v/dsh-ppt) ![downloads](https://img.shields.io/npm/dm/dsh-ppt) ![license](https://img.shields.io/github/license/STARDUSTLC666/dsh-ppt) ![stars](https://img.shields.io/github/stars/STARDUSTLC666/dsh-ppt?style=social)
10
-
11
- [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
12
-
13
- > **One sentence or one document → a complete presentation**: HTML web slideshow + PPTX export, 5 visual themes, slide transitions + bullet entrance animations, bilingual Chinese/English.
14
-
15
- DeepSeek Harness (DSH) presentation skill + tool plugin: turns a sentence, a paragraph, or a Markdown document into a ready-to-present **HTML slideshow** and an editable **PPTX**. Pure Node, **zero runtime dependencies**, one codebase for Windows / macOS / Linux.
16
-
17
- ## Capabilities
18
-
19
- | Capability | Description |
20
- | --- | --- |
21
- | `ppt_create` tool | Markdown / structured slides → `*.html` + `*.pptx` + `*.json` |
22
- | `ppt_themes` tool | Lists the 5 built-in themes and their best use cases; pass `preview: true` with `outputDir` to write a side-by-side gallery plus one SVG palette card per theme |
23
- | 7 layouts | cover / section / bullets / statement / **quote** / **table** / closing |
24
- | Speaker notes | `<!-- note: ... -->` comments or the `notes` field: press `S` in the HTML player; native PPTX notes slides (presenter view) |
25
- | Motion | On by default: HTML slide-in transitions + staggered bullet entrances; native PPTX fade transitions + click-to-reveal bullets. `motion: 'off'` / `--motion off` for a fully static deck |
26
- | Markdown extras | Tables (`\| ... \|`), blockquotes (`>`), and note comments are auto-detected into matching layouts |
27
- | `dsh-ppt` skill | A complete six-step SOP registered into DSH |
28
- | Standalone SKILL.md | Copy `skills/dsh-ppt/` into Claude Code / Cursor / Gemini CLI / Codex for cross-harness use |
29
- | Visual engine | Reuses the hyperframes visual style library; HTML and PPTX share the same theme source |
30
-
31
- Example:
32
-
33
- > Turn this sentence into a deck: "AI support cuts first response time to 8 seconds", with a dark tech theme.
34
- >
35
- > Turn `docs/quarterly-review.md` into a bilingual presentation and export PPTX.
36
-
37
- ## Compatibility
38
-
39
- 2026-09-21: the current release package was installed through the official CLI in an isolated profile and co-loaded with the other two most-downloaded plugins on source-built Harness `0.1.6-alpha.2`. All 18 plugin tools registered; calendar/email configuration checks, PPT theme listing and 17-row table generation passed. The host is based on the official alpha.2 release plus the tool-scheduler `Symbol.for` fix (`93badd88`). This run did not connect to live mail or calendar services.
40
-
41
- Verified with official `@deepseek-ai/dsh@0.1.5-rc.1` and Node `24.16.0` on 2026-09-11: all 18 components load alongside Modlens, with passing tool-schema, skill-registration and offline read-only invocation checks. Uses the `cordis.patch.yml` + `dsh.bundle.patch` bundle model. Node requirements match this Harness release: 22.19 or later within 22.x, or 24 or later. Live external-service workflows require separate configuration and validation.
42
-
43
- ## Installation
44
-
45
- ```bash
46
- dsh plugin --profile web add dsh-ppt
47
- ```
48
-
49
- After restart, the `ppt_create` / `ppt_themes` tools and the `dsh-ppt` skill are available. The plugin ships with an empty config and **won't crash startup**.
50
-
51
- ## Uninstall
52
-
53
- ```bash
54
- dsh plugin --profile web remove dsh-ppt
55
- ```
56
-
57
- Then restart the web service. To clean up fully, also remove the plugin entry from your profile `cordis.patch.yml` if you overrode it.
58
-
59
-
60
- ## Quick start
61
-
62
- ### Inside DSH (recommended)
63
-
64
- ```
65
- 1. ppt_themes { preview: true, outputDir: "dist" } # themes + gallery
66
- 2. ppt_create {
67
- title: "Fewer Meetings",
68
- content: "# Problem\n- Too many meetings\n\n# Solution\n- Async decisions",
69
- theme: "data",
70
- lang: "en"
71
- }
72
- 3. Open the returned HTML path in a browser; edit the PPTX in PowerPoint / WPS / Keynote
73
- ```
74
-
75
- ### Any harness (standalone SKILL.md)
76
-
77
- Copy `skills/dsh-ppt/` to any Agent Skills directory, then:
78
-
79
- ```bash
80
- node <skill-dir>/scripts/build-deck.mjs \
81
- --title "Product Launch" \
82
- --content deck.md \
83
- --theme data \
84
- --lang en \
85
- --out dist/deck
86
- ```
87
-
88
- Artifacts:
89
-
90
- Existing artifacts are not overwritten by default: if any member of the trio already exists, the whole set receives a shared `-1`, `-2`, ... suffix. Replacement requires explicit `overwrite: true` (or `--overwrite` in the CLI).
91
-
92
- | File | Purpose |
93
- | --- | --- |
94
- | `*.html` | Standalone slideshow: arrow keys, V presenter view (separate window with real current/next previews, thumbnail strip, notes, timer, progress, pause, font size, blank screen), S notes, G thumbnail overview, F fullscreen, P print, ? shortcuts, Esc close |
95
- | `*.pptx` | Editable 16:9 presentation (hand-written OOXML, zip via `node:zlib`, no third-party deps) |
96
- | `*.json` | Structured manifest (version, theme, language, slides) |
97
-
98
- ## Built-in themes
99
-
100
- | ID | Name | Mood | Best for |
101
- | --- | --- | --- | --- |
102
- | `data` | Data Drift (default) | Futuristic / immersive | AI, tech launches, research |
103
- | `swiss` | Swiss Pulse | Precise / rational | Data, SaaS, developer tools |
104
- | `velvet` | Velvet Standard | Premium / restrained | Executive decks, brand, investor pitches |
105
- | `soft` | Soft Signal | Warm / human | Brand stories, training, personal talks |
106
- | `bold` | Maximalist Type | Loud / kinetic | Product launches, events, big moments |
107
-
108
- Themes are derived from [dsh-hyperframes](https://github.com/STARDUSTLC666/dsh-hyperframes) `visual-styles.md`. Full palettes: `skills/dsh-ppt/references/themes.md`. Run `ppt_themes { preview: true, outputDir: "dist" }` for a side-by-side gallery and SVG palette cards.
109
-
110
- ## Markdown input rules
111
-
112
- - The first `# heading` becomes the cover title; its first paragraph becomes the cover subtitle.
113
- - Each `## section` becomes one slide: lists produce `bullets` slides; empty sections produce `section` dividers.
114
- - Plain text without headings: the first paragraph is the cover, then every 5 sentences become one slide.
115
- - A single sentence automatically produces a complete 3-slide structure: cover → core idea → closing.
116
- - Long tables paginate automatically with repeated headers and up to 8 data rows per page. Notes stay on the first page. Tables support 8 columns and 60 characters per cell; oversized input returns an actionable error. Short rows are padded consistently in all artifacts.
117
- - `maxSlides` counts pages after expansion. Exceeding it fails before writing files; raise the limit (up to 120) or split the deck. Middle slides are never silently discarded.
118
- - For precise control, use structured `slides` (`cover | section | bullets | statement | quote | table | closing`), with `rows` for tables and `notes` for speaker notes.
119
-
120
- ## Configuration
121
-
122
- No required configuration. Optional:
123
-
124
- ```yaml
125
- - id: dsh-ppt
126
- config:
127
- outputDir: E:\decks # optional; defaults to the session working directory
128
- maxSlides: 40 # optional; default 60 (3–120)
129
- defaultTheme: data # optional; used when ppt_create has no theme
130
- defaultLang: en # optional; used when ppt_create has no lang (zh/en/bilingual)
131
- ```
132
-
133
- The `DSH_PPT_OUTPUT_DIR` env var can also set the default output directory; the `ppt_create` `outputDir`/`theme`/`lang` arguments have the highest priority.
134
-
135
- Output paths resolve against each tool call's `exec.agent.session.header.cwd`: omitted paths use the session directory, relative paths (including plugin configuration) resolve within it, and absolute paths keep their meaning. Direct calls without a session fall back to the process working directory; concurrent sessions never change process cwd. Tools check `exec.signal` before and after loading the engine, so cancelled calls do not proceed to generation. Rendering and writing are synchronous and finish the artifact trio once started.
136
-
137
- ## Bilingual support
138
-
139
- - `lang` argument: `zh` (default) / `en` / `bilingual` controls the player UI, page numbers, and closing defaults.
140
- - Content language is up to the author: for a bilingual deck, prefer "Chinese title + English subtitle" or generate two decks from the same outline.
141
- - Plugin docs come in Chinese (README.md) and English (this file); CLI and skill error messages are in Chinese.
142
-
143
- ## Engineering quality
144
-
145
- - Pure Node, zero runtime dependencies: HTML template, OOXML, and zip are hand-written using only `node:fs` / `node:path` / `node:zlib`.
146
- - The skill and tools share one engine (`skills/dsh-ppt/scripts/deck-core.mjs`), so DSH and bare-skill output are identical.
147
- - Unit tests cover registration contracts, JSON Schema, theme resolution, Markdown parsing, artifact generation, PPTX part integrity, and the CLI.
148
- - No `eval` / `child_process` / secrets; artifacts are only written to the user-specified local directory.
149
-
150
- ## Development
151
-
152
- ```sh
153
- pnpm install
154
- pnpm run build # tsc → lib/
155
- pnpm test # build + node --test (registration/config/engine/CLI)
156
- pnpm run smoke:cli # bare CLI smoke test, generates .smoke-deck
157
- ```
158
-
159
- ## Known limitations
160
-
161
- - The PPTX uses a blank layout plus text boxes: text is editable in PowerPoint / WPS, but no smart master placeholders yet.
162
- - A one-sentence input produces a minimal 3-slide structure; for richer decks, expand the content into a Markdown outline first.
163
- - `bilingual` only localizes the player UI; it does not translate content.
164
- - Charts and images are not supported yet; speaker notes and HTML/PPTX motion are already supported.
165
-
166
- ## License
167
-
168
- MIT. Community plugin, not affiliated with DeepSeek; `@deepseek-ai/*` is an officially reserved namespace.
169
-
170
- ## Related projects
171
-
172
- - [dsh-hyperframes](https://github.com/STARDUSTLC666/dsh-hyperframes) — HTML video skills (source of this plugin's visual styles)
173
- - [dsh-remotion](https://github.com/STARDUSTLC666/dsh-remotion) — React programmatic video skills
174
- - [dsh-email](https://github.com/STARDUSTLC666/dsh-email) — Email toolset
7
+ Validation host: Harness `0.2.0-rc.1` built from official sources (commit `407e65c8`) with Node `24.16.0` on 2026-09-28. All 70 plugin tests pass in an isolated environment; all 18 plugins mount together in one host registering 1 skills and 2 tools, with tool schemas and health-check contracts passing. No live ports or external services were exercised in this round.
8
+
9
+ ![npm](https://img.shields.io/npm/v/dsh-ppt) ![downloads](https://img.shields.io/npm/dm/dsh-ppt) ![license](https://img.shields.io/github/license/STARDUSTLC666/dsh-ppt) ![stars](https://img.shields.io/github/stars/STARDUSTLC666/dsh-ppt?style=social)
10
+
11
+ [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
12
+
13
+ > **One sentence or one document → a complete presentation**: HTML web slideshow + PPTX export, 5 visual themes, slide transitions + bullet entrance animations, bilingual Chinese/English.
14
+
15
+ DeepSeek Harness (DSH) presentation skill + tool plugin: turns a sentence, a paragraph, or a Markdown document into a ready-to-present **HTML slideshow** and an editable **PPTX**. Pure Node, **zero runtime dependencies**, one codebase for Windows / macOS / Linux.
16
+
17
+ ## Capabilities
18
+
19
+ | Capability | Description |
20
+ | --- | --- |
21
+ | `ppt_create` tool | Markdown / structured slides → `*.html` + `*.pptx` + `*.json` |
22
+ | `ppt_themes` tool | Lists the 5 built-in themes and their best use cases; pass `preview: true` with `outputDir` to write a side-by-side gallery plus one SVG palette card per theme |
23
+ | 7 layouts | cover / section / bullets / statement / **quote** / **table** / closing |
24
+ | Speaker notes | `<!-- note: ... -->` comments or the `notes` field: press `S` in the HTML player; native PPTX notes slides (presenter view) |
25
+ | Motion | On by default: HTML slide-in transitions + staggered bullet entrances; native PPTX fade transitions + click-to-reveal bullets. `motion: 'off'` / `--motion off` for a fully static deck |
26
+ | Markdown extras | Tables (`\| ... \|`), blockquotes (`>`), and note comments are auto-detected into matching layouts |
27
+ | `dsh-ppt` skill | A complete six-step SOP registered into DSH |
28
+ | Standalone SKILL.md | Copy `skills/dsh-ppt/` into Claude Code / Cursor / Gemini CLI / Codex for cross-harness use |
29
+ | Visual engine | Reuses the hyperframes visual style library; HTML and PPTX share the same theme source |
30
+
31
+ Example:
32
+
33
+ > Turn this sentence into a deck: "AI support cuts first response time to 8 seconds", with a dark tech theme.
34
+ >
35
+ > Turn `docs/quarterly-review.md` into a bilingual presentation and export PPTX.
36
+
37
+ ## Compatibility
38
+
39
+ ## Installation
40
+
41
+ ```bash
42
+ dsh plugin --profile web add dsh-ppt
43
+ ```
44
+
45
+ After restart, the `ppt_create` / `ppt_themes` tools and the `dsh-ppt` skill are available. The plugin ships with an empty config and **won't crash startup**.
46
+
47
+ ## Uninstall
48
+
49
+ ```bash
50
+ dsh plugin --profile web remove dsh-ppt
51
+ ```
52
+
53
+ Then restart the web service. To clean up fully, also remove the plugin entry from your profile `cordis.patch.yml` if you overrode it.
54
+
55
+
56
+ ## Quick start
57
+
58
+ ### Inside DSH (recommended)
59
+
60
+ ```
61
+ 1. ppt_themes { preview: true, outputDir: "dist" } # themes + gallery
62
+ 2. ppt_create {
63
+ title: "Fewer Meetings",
64
+ content: "# Problem\n- Too many meetings\n\n# Solution\n- Async decisions",
65
+ theme: "data",
66
+ lang: "en"
67
+ }
68
+ 3. Open the returned HTML path in a browser; edit the PPTX in PowerPoint / WPS / Keynote
69
+ ```
70
+
71
+ ### Any harness (standalone SKILL.md)
72
+
73
+ Copy `skills/dsh-ppt/` to any Agent Skills directory, then:
74
+
75
+ ```bash
76
+ node <skill-dir>/scripts/build-deck.mjs \
77
+ --title "Product Launch" \
78
+ --content deck.md \
79
+ --theme data \
80
+ --lang en \
81
+ --out dist/deck
82
+ ```
83
+
84
+ Artifacts:
85
+
86
+ Existing artifacts are not overwritten by default: if any member of the trio already exists, the whole set receives a shared `-1`, `-2`, ... suffix. Replacement requires explicit `overwrite: true` (or `--overwrite` in the CLI).
87
+
88
+ | File | Purpose |
89
+ | --- | --- |
90
+ | `*.html` | Standalone slideshow: arrow keys, V presenter view (separate window with real current/next previews, thumbnail strip, notes, timer, progress, pause, font size, blank screen), S notes, G thumbnail overview, F fullscreen, P print, ? shortcuts, Esc close |
91
+ | `*.pptx` | Editable 16:9 presentation (hand-written OOXML, zip via `node:zlib`, no third-party deps) |
92
+ | `*.json` | Structured manifest (version, theme, language, slides) |
93
+
94
+ ## Built-in themes
95
+
96
+ | ID | Name | Mood | Best for |
97
+ | --- | --- | --- | --- |
98
+ | `data` | Data Drift (default) | Futuristic / immersive | AI, tech launches, research |
99
+ | `swiss` | Swiss Pulse | Precise / rational | Data, SaaS, developer tools |
100
+ | `velvet` | Velvet Standard | Premium / restrained | Executive decks, brand, investor pitches |
101
+ | `soft` | Soft Signal | Warm / human | Brand stories, training, personal talks |
102
+ | `bold` | Maximalist Type | Loud / kinetic | Product launches, events, big moments |
103
+
104
+ Themes are derived from [dsh-hyperframes](https://github.com/STARDUSTLC666/dsh-hyperframes) `visual-styles.md`. Full palettes: `skills/dsh-ppt/references/themes.md`. Run `ppt_themes { preview: true, outputDir: "dist" }` for a side-by-side gallery and SVG palette cards.
105
+
106
+ ## Markdown input rules
107
+
108
+ - The first `# heading` becomes the cover title; its first paragraph becomes the cover subtitle.
109
+ - Each `## section` becomes one slide: lists produce `bullets` slides; empty sections produce `section` dividers.
110
+ - Plain text without headings: the first paragraph is the cover, then every 5 sentences become one slide.
111
+ - A single sentence automatically produces a complete 3-slide structure: cover → core idea → closing.
112
+ - Long tables paginate automatically with repeated headers and up to 8 data rows per page. Notes stay on the first page. Tables support 8 columns and 60 characters per cell; oversized input returns an actionable error. Short rows are padded consistently in all artifacts.
113
+ - `maxSlides` counts pages after expansion. Exceeding it fails before writing files; raise the limit (up to 120) or split the deck. Middle slides are never silently discarded.
114
+ - For precise control, use structured `slides` (`cover | section | bullets | statement | quote | table | closing`), with `rows` for tables and `notes` for speaker notes.
115
+
116
+ ## Configuration
117
+
118
+ No required configuration. Optional:
119
+
120
+ ```yaml
121
+ - id: dsh-ppt
122
+ config:
123
+ outputDir: E:\decks # optional; defaults to the session working directory
124
+ maxSlides: 40 # optional; default 60 (3–120)
125
+ defaultTheme: data # optional; used when ppt_create has no theme
126
+ defaultLang: en # optional; used when ppt_create has no lang (zh/en/bilingual)
127
+ ```
128
+
129
+ The `DSH_PPT_OUTPUT_DIR` env var can also set the default output directory; the `ppt_create` `outputDir`/`theme`/`lang` arguments have the highest priority.
130
+
131
+ Output paths resolve against each tool call's `exec.agent.session.header.cwd`: omitted paths use the session directory, relative paths (including plugin configuration) resolve within it, and absolute paths keep their meaning. Direct calls without a session fall back to the process working directory; concurrent sessions never change process cwd. Tools check `exec.signal` before and after loading the engine, so cancelled calls do not proceed to generation. Rendering and writing are synchronous and finish the artifact trio once started.
132
+
133
+ ## Bilingual support
134
+
135
+ - `lang` argument: `zh` (default) / `en` / `bilingual` controls the player UI, page numbers, and closing defaults.
136
+ - Content language is up to the author: for a bilingual deck, prefer "Chinese title + English subtitle" or generate two decks from the same outline.
137
+ - Plugin docs come in Chinese (README.md) and English (this file); CLI and skill error messages are in Chinese.
138
+
139
+ ## Engineering quality
140
+
141
+ - Pure Node, zero runtime dependencies: HTML template, OOXML, and zip are hand-written using only `node:fs` / `node:path` / `node:zlib`.
142
+ - The skill and tools share one engine (`skills/dsh-ppt/scripts/deck-core.mjs`), so DSH and bare-skill output are identical.
143
+ - Unit tests cover registration contracts, JSON Schema, theme resolution, Markdown parsing, artifact generation, PPTX part integrity, and the CLI.
144
+ - No `eval` / `child_process` / secrets; artifacts are only written to the user-specified local directory.
145
+
146
+ ## Development
147
+
148
+ ```sh
149
+ pnpm install
150
+ pnpm run build # tsc → lib/
151
+ pnpm test # build + node --test (registration/config/engine/CLI)
152
+ pnpm run smoke:cli # bare CLI smoke test, generates .smoke-deck
153
+ ```
154
+
155
+ ## Known limitations
156
+
157
+ - The PPTX uses a blank layout plus text boxes: text is editable in PowerPoint / WPS, but no smart master placeholders yet.
158
+ - A one-sentence input produces a minimal 3-slide structure; for richer decks, expand the content into a Markdown outline first.
159
+ - `bilingual` only localizes the player UI; it does not translate content.
160
+ - Charts and images are not supported yet; speaker notes and HTML/PPTX motion are already supported.
161
+
162
+ ## License
163
+
164
+ MIT. Community plugin, not affiliated with DeepSeek; `@deepseek-ai/*` is an officially reserved namespace.
165
+
166
+ ## Related projects
167
+
168
+ - [dsh-hyperframes](https://github.com/STARDUSTLC666/dsh-hyperframes) — HTML video skills (source of this plugin's visual styles)
169
+ - [dsh-remotion](https://github.com/STARDUSTLC666/dsh-remotion) — React programmatic video skills
170
+ - [dsh-email](https://github.com/STARDUSTLC666/dsh-email) — Email toolset
package/README.md CHANGED
@@ -1,176 +1,172 @@
1
- [English](README.en.md)
2
-
3
- # dsh-ppt
1
+ [English](README.en.md)
2
+
3
+ # dsh-ppt
4
4
 
5
5
  ## 0.5.0 更新(2026-09-27)
6
6
 
7
7
  包含新的演讲者预览、缩略图和计时控件。浏览器不支持或拒绝全屏时显示操作提示,不再无声失败。
8
8
 
9
- 验证宿主:官方源码构建的 Harness 0.1.7-rc.2(保留本地工具调度器修复)。构建与自动测试通过;实际操作和外部服务限制见本轮验收记录。
10
-
11
- > **一句话 / 一篇文档 → 完整演示文稿**:HTML 网页放映 + PPTX 导出,5 套视觉主题,页间转场 + 要点入场动画,中英双语。
12
-
13
- ![npm version](https://img.shields.io/npm/v/dsh-ppt?label=npm&color=blue) ![npm downloads](https://img.shields.io/npm/dm/dsh-ppt) ![license](https://img.shields.io/npm/l/dsh-ppt) ![stars](https://img.shields.io/github/stars/STARDUSTLC666/dsh-ppt?style=social)
14
-
15
- [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
16
-
17
- DSH(DeepSeek Harness)演示文稿技能 + 工具插件:把一句话、一段文字或一篇 Markdown 文档变成可直接放映的 **HTML 网页** 与可编辑的 **PPTX**。纯 Node 实现,**零运行时依赖**,Windows / macOS / Linux 同一份代码。
18
-
19
- ## 能力一览
20
-
21
- | 能力 | 说明 |
22
- | --- | --- |
23
- | `ppt_create` 工具 | Markdown / 结构化 slides → `*.html` + `*.pptx` + `*.json` 三件套 |
24
- | `ppt_themes` 工具 | 列出 5 套内置主题与适用场景;传 `preview: true, outputDir: "dist"` 生成主题对比页 + 每套一张 SVG 色板卡(可直接进 README/npm 首屏) |
25
- | 7 种页型 | 封面 / 章节 / 要点 / 核心观点 / **金句** / **表格** / 结束页 |
26
- | 演讲者备注 | `<!-- 备注: ... -->` 或 `notes` 字段:HTML 按 `S` 呼出,PPTX 原生备注页(演示者视图) |
27
- | 动效(motion) | 默认开:HTML 页间淡入 + 要点逐条入场;PPTX 原生转场 + 要点逐条点击显现;`motion: 'off'` / `--motion off` 产出纯静态 |
28
- | Markdown 进阶 | 表格(`\| ... \|`)、引用金句(`>`)、备注注释自动识别成对应页型 |
29
- | `dsh-ppt` 技能 | 完整 SOP 注册进 DSH:从一句话到成品 deck 的六步流水线 |
30
- | 裸 SKILL.md | 把 `skills/dsh-ppt/` 复制到 Claude Code / Cursor / Gemini CLI / Codex 即可跨 harness 使用 |
31
- | 视觉引擎 | 复用 hyperframes 视觉风格库,5 套主题 HTML 与 PPTX 同源同色 |
32
-
33
- 示例对话:
34
-
35
- > 把这句话做成 PPT:「AI 客服把首次响应时间压缩到 8 秒」,主题用科技感深色。
36
- >
37
- > 把 `docs/季度汇报.md` 做成双语演示文稿,导出 PPTX。
38
-
39
- ## 兼容性
40
-
41
- 2026-09-21:当前发布包经官方 CLI 安装到隔离 profile,在源码构建的 Harness `0.1.6-alpha.2` 上与另外两个下载量前三插件共同加载,18 个插件工具注册正常;日历/邮件配置自检、PPT 主题查询和 17 行表格生成通过。测试本体基于官方 alpha.2 发布提交,另含工具调度器 `Symbol.for` 修复(`93badd88`)。本轮未连接真实邮箱或日历服务。
42
-
43
- 已在官方 `@deepseek-ai/dsh@0.1.5-rc.1`、Node `24.16.0` 上验证(2026-09-11):18 个组件与 Modlens 同载,工具 schema、技能注册及离线只读调用检查通过。采用 `cordis.patch.yml` + `dsh.bundle.patch` 组合包模型。Node 要求与该版本 Harness 一致:22.19 及以上的 22.x,或 24 及以上。外部服务的实际业务操作需按各组件配置单独验证。
44
-
45
- ## 安装
46
-
47
- ```bash
48
- dsh plugin --profile web add dsh-ppt
49
- ```
50
-
51
- 重启后即可使用 `ppt_create` / `ppt_themes` 工具,并自动加载 `dsh-ppt` 技能。插件自带空配置,**不会弄崩启动**。
52
-
53
- ## 快速开始
54
-
55
- ### DSH 内(推荐)
56
-
57
- ```
58
- 1. ppt_themes { preview: true, outputDir: "dist" } # 看 5 套主题 + 生成对比页
59
- 2. ppt_create {
60
- title: "把会议减半",
61
- content: "# 问题\n- 周会太多\n\n# 方案\n- 异步决策",
62
- theme: "data",
63
- lang: "zh"
64
- }
65
- 3. 打开返回的 HTML 路径(浏览器放映),PPTX 用 PowerPoint / WPS / Keynote 编辑
66
- ```
67
-
68
- ### 任意 harness(裸 SKILL.md)
69
-
70
- 把 `skills/dsh-ppt/` 复制到任意 Agent Skills 目录,然后:
71
-
72
- ```bash
73
- node <skill-dir>/scripts/build-deck.mjs \
74
- --title "产品发布" \
75
- --content deck.md \
76
- --theme data \
77
- --lang zh \
78
- --out dist/deck
79
- ```
80
-
81
- 输出三件套:
82
-
83
- 默认不会覆盖已有同名产物:三件套中任一文件存在时会整组追加 `-1`、`-2`… 后缀;只有显式传 `overwrite: true`(CLI 为 `--overwrite`)才会覆盖。
84
-
85
- | 文件 | 用途 |
86
- | --- | --- |
87
- | `*.html` | 独立网页放映:← → 翻页,V 演讲者视图(独立窗口:真实当前页/下一页预览、缩略图跳页、备注、计时、进度、暂停、字号、黑/白屏),S 备注,G 缩略图总览,F 全屏,P 打印,? 快捷键,Esc 关闭 |
88
- | `*.pptx` | 16:9 可编辑演示文稿(OOXML 由插件手写,zip 用 node:zlib,无第三方依赖) |
89
- | `*.json` | 结构化 manifest(版本、主题、语言、每页内容) |
90
-
91
- ## 内置主题
92
-
93
- | ID | 名称 | 情绪 | 适用 |
94
- | --- | --- | --- | --- |
95
- | `data` | 数据漂移(默认) | 未来 / 沉浸 | AI、技术发布、研究 |
96
- | `swiss` | 瑞士脉冲 | 精准 / 理性 | 数据、SaaS、开发者工具 |
97
- | `velvet` | 天鹅绒标准 | 高级 / 克制 | 高管汇报、品牌、融资路演 |
98
- | `soft` | 柔和信号 | 温暖 / 人本 | 品牌故事、培训、个人分享 |
99
- | `bold` | 极繁大字 | 大声 / 动能 | 产品发布、活动、大事件 |
100
-
101
- 主题灵感来自 [hyperframes](https://github.com/STARDUSTLC666/dsh-hyperframes) 的 `visual-styles.md`,完整色板见 `skills/dsh-ppt/references/themes.md`。也可运行 `ppt_themes { preview: true, outputDir: "dist" }` 生成并排对比页与 SVG 色板卡。
102
-
103
- ## Markdown 输入规则
104
-
105
- - 第一个 `# 标题` → 封面标题;其下第一段 → 封面副标题。
106
- - 每个 `## 小节` → 一页:有列表生成 `bullets` 页,无内容生成 `section` 过渡页。
107
- - 没有标题的纯文本 → 第一段作封面,后续每 5 句一页。
108
- - 只有一句话 → 自动生成「封面 → 核心观点 → 结束页」三页完整结构。
109
- - 长表格自动分页:每页重复表头,最多 8 行数据;备注只放第一页。最多 8 列、每格 60 字符,超限会提示拆分。短行补空白,三种产物保留相同数据。
110
- - `maxSlides` 计算分页后的总页数;超过限制时先报错,不落盘、不静默删掉中间页。可提高配置上限(最多 120)或拆分文稿。
111
- - 需要精确控制时用结构化 `slides`(`cover | section | bullets | statement | quote | table | closing`),表格使用 `rows`,备注使用 `notes`。
112
-
113
- ## 配置
114
-
115
- 插件无必填配置。可选:
116
-
117
- ```yaml
118
- - id: dsh-ppt
119
- config:
120
- outputDir: E:\decks # 可选;默认会话工作目录
121
- maxSlides: 40 # 可选;默认 60(3–120)
122
- defaultTheme: data # 可选;ppt_create 未指定 theme 时使用
123
- defaultLang: zh # 可选;ppt_create 未指定 lang 时使用(zh/en/bilingual)
124
- ```
125
-
126
- 也可用环境变量 `DSH_PPT_OUTPUT_DIR` 指定默认输出目录;`ppt_create` 的 `outputDir`/`theme`/`lang` 参数优先级最高。
127
-
128
- 输出目录按每次工具调用的 `exec.agent.session.header.cwd` 解析:不指定目录时写入当前会话工作目录,相对目录(包括插件配置)相对此目录解析,绝对目录保持原意。直接调用工具而未提供会话时,回退到进程工作目录;并行会话不会修改进程 cwd。工具在加载引擎前和加载完成后检查 `exec.signal`,取消的调用不会继续生成文件;生成和写入阶段为同步操作,开始后会完成本次三件套。
129
-
130
-
131
- ## 卸载
132
-
133
- ```bash
134
- dsh plugin --profile web remove dsh-ppt
135
- ```
136
-
137
- 卸载后重启 Web 服务。如需彻底清理,可再手动删除自己 profile `cordis.patch.yml` 中的对应插件行。
138
-
139
- ## 中英双语
140
-
141
- - `lang` 参数:`zh`(默认)/ `en` / `bilingual`,控制播放器界面、页码与结束页默认文案。
142
- - 内容语言由你撰写:双语 deck 推荐「中文标题 + 英文副标题」,或同一大纲分别生成中英两份。
143
- - 插件文档提供中英两版(README.md / README.en.md);CLI 与技能的报错提示为中文。
144
-
145
- ## 工程质量
146
-
147
- - 纯 Node,零运行时依赖:HTML 模板、OOXML、zip 全部手写,只用 `node:fs` / `node:path` / `node:zlib`。
148
- - 技能与工具共用一个引擎(`skills/dsh-ppt/scripts/deck-core.mjs`),不会出现「DSH 一个效果、裸技能另一个效果」。
149
- - 单元测试覆盖注册契约、JSON Schema、主题解析、Markdown 解析、三件套落盘、PPTX 部件完整性、CLI。
150
- - 无 `eval` / `child_process` / 密钥;产物只写用户指定的本地目录。
151
-
152
- ## 开发
153
-
154
- ```sh
155
- pnpm install
156
- pnpm run build # tsc → lib/
157
- pnpm test # 构建 + node --test(注册/配置/引擎/CLI)
158
- pnpm run smoke:cli # 裸 CLI 冒烟,生成 .smoke-deck
159
- ```
160
-
161
- ## 已知限制
162
-
163
- - PPTX 采用空白版式 + 文本框实现:PowerPoint / WPS 中可正常编辑文字,但暂不生成智能母版占位符。
164
- - 一句话输入自动生成三页最小结构;更丰富的内容需要先扩写成 Markdown 大纲再调用 `ppt_create`。
165
- - `bilingual` 只双语化播放器界面,不自动翻译内容。
166
- - 暂不支持图表与图片;演讲者备注及 HTML/PPTX 动效已经支持。
167
-
168
- ## 协议
169
-
170
- MIT。社区插件,与 DeepSeek 官方无关;`@deepseek-ai/*` 为官方保留命名空间。
171
-
172
- ## 相关项目
173
-
174
- - [dsh-hyperframes](https://github.com/STARDUSTLC666/dsh-hyperframes) — HTML 视频创作技能(本插件视觉风格来源)
175
- - [dsh-remotion](https://github.com/STARDUSTLC666/dsh-remotion) — React 编程式视频技能
176
- - [dsh-email](https://github.com/STARDUSTLC666/dsh-email) — 邮件六件套
9
+ 验证宿主:官方源码构建的 Harness `0.2.0-rc.1`(commit `407e65c8`)+ Node `24.16.0`(2026-09-28)。70 项插件测试在隔离环境全部通过;同一个宿主里 18 个插件共同加载,注册 1 个技能、2 个工具,工具 schema 与健康检查契约通过。本轮未启用真实端口与外部服务。
10
+
11
+ > **一句话 / 一篇文档 → 完整演示文稿**:HTML 网页放映 + PPTX 导出,5 套视觉主题,页间转场 + 要点入场动画,中英双语。
12
+
13
+ ![npm version](https://img.shields.io/npm/v/dsh-ppt?label=npm&color=blue) ![npm downloads](https://img.shields.io/npm/dm/dsh-ppt) ![license](https://img.shields.io/npm/l/dsh-ppt) ![stars](https://img.shields.io/github/stars/STARDUSTLC666/dsh-ppt?style=social)
14
+
15
+ [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
16
+
17
+ DSH(DeepSeek Harness)演示文稿技能 + 工具插件:把一句话、一段文字或一篇 Markdown 文档变成可直接放映的 **HTML 网页** 与可编辑的 **PPTX**。纯 Node 实现,**零运行时依赖**,Windows / macOS / Linux 同一份代码。
18
+
19
+ ## 能力一览
20
+
21
+ | 能力 | 说明 |
22
+ | --- | --- |
23
+ | `ppt_create` 工具 | Markdown / 结构化 slides → `*.html` + `*.pptx` + `*.json` 三件套 |
24
+ | `ppt_themes` 工具 | 列出 5 套内置主题与适用场景;传 `preview: true, outputDir: "dist"` 生成主题对比页 + 每套一张 SVG 色板卡(可直接进 README/npm 首屏) |
25
+ | 7 种页型 | 封面 / 章节 / 要点 / 核心观点 / **金句** / **表格** / 结束页 |
26
+ | 演讲者备注 | `<!-- 备注: ... -->` 或 `notes` 字段:HTML 按 `S` 呼出,PPTX 原生备注页(演示者视图) |
27
+ | 动效(motion) | 默认开:HTML 页间淡入 + 要点逐条入场;PPTX 原生转场 + 要点逐条点击显现;`motion: 'off'` / `--motion off` 产出纯静态 |
28
+ | Markdown 进阶 | 表格(`\| ... \|`)、引用金句(`>`)、备注注释自动识别成对应页型 |
29
+ | `dsh-ppt` 技能 | 完整 SOP 注册进 DSH:从一句话到成品 deck 的六步流水线 |
30
+ | 裸 SKILL.md | 把 `skills/dsh-ppt/` 复制到 Claude Code / Cursor / Gemini CLI / Codex 即可跨 harness 使用 |
31
+ | 视觉引擎 | 复用 hyperframes 视觉风格库,5 套主题 HTML 与 PPTX 同源同色 |
32
+
33
+ 示例对话:
34
+
35
+ > 把这句话做成 PPT:「AI 客服把首次响应时间压缩到 8 秒」,主题用科技感深色。
36
+ >
37
+ > 把 `docs/季度汇报.md` 做成双语演示文稿,导出 PPTX。
38
+
39
+ ## 兼容性
40
+
41
+ ## 安装
42
+
43
+ ```bash
44
+ dsh plugin --profile web add dsh-ppt
45
+ ```
46
+
47
+ 重启后即可使用 `ppt_create` / `ppt_themes` 工具,并自动加载 `dsh-ppt` 技能。插件自带空配置,**不会弄崩启动**。
48
+
49
+ ## 快速开始
50
+
51
+ ### DSH 内(推荐)
52
+
53
+ ```
54
+ 1. ppt_themes { preview: true, outputDir: "dist" } # 看 5 套主题 + 生成对比页
55
+ 2. ppt_create {
56
+ title: "把会议减半",
57
+ content: "# 问题\n- 周会太多\n\n# 方案\n- 异步决策",
58
+ theme: "data",
59
+ lang: "zh"
60
+ }
61
+ 3. 打开返回的 HTML 路径(浏览器放映),PPTX 用 PowerPoint / WPS / Keynote 编辑
62
+ ```
63
+
64
+ ### 任意 harness(裸 SKILL.md)
65
+
66
+ 把 `skills/dsh-ppt/` 复制到任意 Agent Skills 目录,然后:
67
+
68
+ ```bash
69
+ node <skill-dir>/scripts/build-deck.mjs \
70
+ --title "产品发布" \
71
+ --content deck.md \
72
+ --theme data \
73
+ --lang zh \
74
+ --out dist/deck
75
+ ```
76
+
77
+ 输出三件套:
78
+
79
+ 默认不会覆盖已有同名产物:三件套中任一文件存在时会整组追加 `-1`、`-2`… 后缀;只有显式传 `overwrite: true`(CLI 为 `--overwrite`)才会覆盖。
80
+
81
+ | 文件 | 用途 |
82
+ | --- | --- |
83
+ | `*.html` | 独立网页放映:← → 翻页,V 演讲者视图(独立窗口:真实当前页/下一页预览、缩略图跳页、备注、计时、进度、暂停、字号、黑/白屏),S 备注,G 缩略图总览,F 全屏,P 打印,? 快捷键,Esc 关闭 |
84
+ | `*.pptx` | 16:9 可编辑演示文稿(OOXML 由插件手写,zip 用 node:zlib,无第三方依赖) |
85
+ | `*.json` | 结构化 manifest(版本、主题、语言、每页内容) |
86
+
87
+ ## 内置主题
88
+
89
+ | ID | 名称 | 情绪 | 适用 |
90
+ | --- | --- | --- | --- |
91
+ | `data` | 数据漂移(默认) | 未来 / 沉浸 | AI、技术发布、研究 |
92
+ | `swiss` | 瑞士脉冲 | 精准 / 理性 | 数据、SaaS、开发者工具 |
93
+ | `velvet` | 天鹅绒标准 | 高级 / 克制 | 高管汇报、品牌、融资路演 |
94
+ | `soft` | 柔和信号 | 温暖 / 人本 | 品牌故事、培训、个人分享 |
95
+ | `bold` | 极繁大字 | 大声 / 动能 | 产品发布、活动、大事件 |
96
+
97
+ 主题灵感来自 [hyperframes](https://github.com/STARDUSTLC666/dsh-hyperframes) 的 `visual-styles.md`,完整色板见 `skills/dsh-ppt/references/themes.md`。也可运行 `ppt_themes { preview: true, outputDir: "dist" }` 生成并排对比页与 SVG 色板卡。
98
+
99
+ ## Markdown 输入规则
100
+
101
+ - 第一个 `# 标题` → 封面标题;其下第一段 → 封面副标题。
102
+ - 每个 `## 小节` → 一页:有列表生成 `bullets` 页,无内容生成 `section` 过渡页。
103
+ - 没有标题的纯文本 → 第一段作封面,后续每 5 句一页。
104
+ - 只有一句话 → 自动生成「封面 → 核心观点 → 结束页」三页完整结构。
105
+ - 长表格自动分页:每页重复表头,最多 8 行数据;备注只放第一页。最多 8 列、每格 60 字符,超限会提示拆分。短行补空白,三种产物保留相同数据。
106
+ - `maxSlides` 计算分页后的总页数;超过限制时先报错,不落盘、不静默删掉中间页。可提高配置上限(最多 120)或拆分文稿。
107
+ - 需要精确控制时用结构化 `slides`(`cover | section | bullets | statement | quote | table | closing`),表格使用 `rows`,备注使用 `notes`。
108
+
109
+ ## 配置
110
+
111
+ 插件无必填配置。可选:
112
+
113
+ ```yaml
114
+ - id: dsh-ppt
115
+ config:
116
+ outputDir: E:\decks # 可选;默认会话工作目录
117
+ maxSlides: 40 # 可选;默认 60(3–120)
118
+ defaultTheme: data # 可选;ppt_create 未指定 theme 时使用
119
+ defaultLang: zh # 可选;ppt_create 未指定 lang 时使用(zh/en/bilingual)
120
+ ```
121
+
122
+ 也可用环境变量 `DSH_PPT_OUTPUT_DIR` 指定默认输出目录;`ppt_create` 的 `outputDir`/`theme`/`lang` 参数优先级最高。
123
+
124
+ 输出目录按每次工具调用的 `exec.agent.session.header.cwd` 解析:不指定目录时写入当前会话工作目录,相对目录(包括插件配置)相对此目录解析,绝对目录保持原意。直接调用工具而未提供会话时,回退到进程工作目录;并行会话不会修改进程 cwd。工具在加载引擎前和加载完成后检查 `exec.signal`,取消的调用不会继续生成文件;生成和写入阶段为同步操作,开始后会完成本次三件套。
125
+
126
+
127
+ ## 卸载
128
+
129
+ ```bash
130
+ dsh plugin --profile web remove dsh-ppt
131
+ ```
132
+
133
+ 卸载后重启 Web 服务。如需彻底清理,可再手动删除自己 profile `cordis.patch.yml` 中的对应插件行。
134
+
135
+ ## 中英双语
136
+
137
+ - `lang` 参数:`zh`(默认)/ `en` / `bilingual`,控制播放器界面、页码与结束页默认文案。
138
+ - 内容语言由你撰写:双语 deck 推荐「中文标题 + 英文副标题」,或同一大纲分别生成中英两份。
139
+ - 插件文档提供中英两版(README.md / README.en.md);CLI 与技能的报错提示为中文。
140
+
141
+ ## 工程质量
142
+
143
+ - 纯 Node,零运行时依赖:HTML 模板、OOXML、zip 全部手写,只用 `node:fs` / `node:path` / `node:zlib`。
144
+ - 技能与工具共用一个引擎(`skills/dsh-ppt/scripts/deck-core.mjs`),不会出现「DSH 一个效果、裸技能另一个效果」。
145
+ - 单元测试覆盖注册契约、JSON Schema、主题解析、Markdown 解析、三件套落盘、PPTX 部件完整性、CLI。
146
+ - 无 `eval` / `child_process` / 密钥;产物只写用户指定的本地目录。
147
+
148
+ ## 开发
149
+
150
+ ```sh
151
+ pnpm install
152
+ pnpm run build # tsc → lib/
153
+ pnpm test # 构建 + node --test(注册/配置/引擎/CLI)
154
+ pnpm run smoke:cli # 裸 CLI 冒烟,生成 .smoke-deck
155
+ ```
156
+
157
+ ## 已知限制
158
+
159
+ - PPTX 采用空白版式 + 文本框实现:PowerPoint / WPS 中可正常编辑文字,但暂不生成智能母版占位符。
160
+ - 一句话输入自动生成三页最小结构;更丰富的内容需要先扩写成 Markdown 大纲再调用 `ppt_create`。
161
+ - `bilingual` 只双语化播放器界面,不自动翻译内容。
162
+ - 暂不支持图表与图片;演讲者备注及 HTML/PPTX 动效已经支持。
163
+
164
+ ## 协议
165
+
166
+ MIT。社区插件,与 DeepSeek 官方无关;`@deepseek-ai/*` 为官方保留命名空间。
167
+
168
+ ## 相关项目
169
+
170
+ - [dsh-hyperframes](https://github.com/STARDUSTLC666/dsh-hyperframes) — HTML 视频创作技能(本插件视觉风格来源)
171
+ - [dsh-remotion](https://github.com/STARDUSTLC666/dsh-remotion) — React 编程式视频技能
172
+ - [dsh-email](https://github.com/STARDUSTLC666/dsh-email) — 邮件六件套
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ppt",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "DSH 演示文稿插件:Markdown 生成网页放映与可编辑 PPTX,长表格自动分页,内置 5 套主题、备注与转场动画。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",