{"_id":"@dxiaodai/dsh-tool-slidegen","name":"@dxiaodai/dsh-tool-slidegen","dist-tags":{"next":"0.1.0-rc.5","latest":"0.1.0-rc.5"},"versions":{"0.1.0-rc.5":{"name":"@dxiaodai/dsh-tool-slidegen","description":"Model-facing slidegen tool: deck markdown into a self-contained PPT-style presentation webpage with one-click style switching (independently published copy of the deepseek-harness slides package)","version":"0.1.0-rc.5","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/slides/tool-slidegen"},"type":"module","main":"lib/index.js","types":"lib/types/index.d.ts","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./package.json":"./package.json"},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-fs":"^0.1.0-rc.5","@deepseek-ai/dsh-sandbox":"^0.1.0-rc.5","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.5","@deepseek-ai/dsh-sandbox-policy":"^0.1.0-rc.5","@deepseek-ai/dsh-invariants":"^0.1.0-rc.5","@deepseek-ai/dsh-tools":"^0.1.0-rc.5","@deepseek-ai/cordis":"^4.0.1"},"devDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/cordis-plugin-include":"^1.0.6","@deepseek-ai/dsh-fs":"^0.1.0-rc.5","@deepseek-ai/dsh-llm":"^0.1.0-rc.5","@deepseek-ai/dsh-invariants":"^0.1.0-rc.5","@deepseek-ai/dsh-sandbox":"^0.1.0-rc.5","@deepseek-ai/dsh-sandbox-policy":"^0.1.0-rc.5","@deepseek-ai/dsh-session":"^0.1.0-rc.5","@deepseek-ai/dsh-tools":"^0.1.0-rc.5","@deepseek-ai/dsh-agent":"^0.1.0-rc.5","@deepseek-ai/dsh-system-prompt":"^0.1.0-rc.5"},"_id":"@dxiaodai/dsh-tool-slidegen@0.1.0-rc.5","bugs":{"url":"https://github.com/deepseek-ai/deepseek-harness/issues"},"homepage":"https://github.com/deepseek-ai/deepseek-harness#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-8r4fmFfVA9t8naBwojjPQpvk3auLv/y4h9ZIbM+oZvApxWKkGfbDSbsTDM2e3gRZY8t9s07jBbP0pubAIJWZ4w==","shasum":"d230339830a5fab95a8c92aea4bf48a744a0d91d","tarball":"https://registry.npmjs.org/@dxiaodai/dsh-tool-slidegen/-/dsh-tool-slidegen-0.1.0-rc.5.tgz","fileCount":18,"unpackedSize":117801,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGrp2UK4/QQTBxDTJg+yMvR5O9p0Dm8EJAUKz0PjdEcTAiEA59FXY/tXZ4JNUoYAb4O2D659seKdkdHERJmlu8KWzDM="}]},"_npmUser":{"name":"dxiaodai","email":"danieltoraji@163.com"},"directories":{},"maintainers":[{"name":"dxiaodai","email":"danieltoraji@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-tool-slidegen_0.1.0-rc.5_1786856060358_0.5090536472532476"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-16T04:54:20.232Z","0.1.0-rc.5":"2026-08-16T04:54:20.522Z","modified":"2026-08-16T04:54:20.696Z"},"maintainers":[{"name":"dxiaodai","email":"danieltoraji@163.com"}],"description":"Model-facing slidegen tool: deck markdown into a self-contained PPT-style presentation webpage with one-click style switching (independently published copy of the deepseek-harness slides package)","homepage":"https://github.com/deepseek-ai/deepseek-harness#readme","repository":{"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/slides/tool-slidegen"},"bugs":{"url":"https://github.com/deepseek-ai/deepseek-harness/issues"},"license":"MIT","readme":"# @dxiaodai/dsh-tool-slidegen\n\n[English](README.md) | 中文\n\n[deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) 中 `slidegen` 包的独立发布副本：代码与行为一致，仅以个人 npm scope 重新命名。\n\n面向模型的 `slidegen` 工具：输入 deck 文本，产出一个完全自包含的 PPT 风格演示网页，网页内置一键风格切换。\n\n## 功能\n\n在 `ctx.tools` 上注册一个工具 `slidegen(content, title?, filename?, theme?)`。模型把演示内容写成格式化 deck 文本（`---` 分页、`#` 开头为封面/分节页、`##` 为内容页，支持项目符号、编号列表、围栏代码块、引用、GFM 表格、图片、链接与行内强调），工具解析后渲染为单个自包含 HTML 文件（CSS/JS 全部内联、零外部依赖、可离线打开），并经 `ctx.fs` 能力写入会话工作区——与 `dsh-tool-fs` 同一写入链：`fs/write-intent` waterfall、无条件 `writeText`、`fs/observed` 事件。\n\n生成的网页内置八套主题与 🎨 风格面板：一键即可整体换肤（选择持久化在 `localStorage`）。同时支持键盘翻页（←/→/空格/Home/End）、点击/滑动翻页、幻灯片总览（O）、全屏（F）与打印导出 PDF。\n\n## Deck 格式\n\n模型可用的完整语法写在工具描述中；权威参考是生成后的 [docs/tool-catalog.md](../../../docs/tool-catalog.md#deepseek-aidsh-tool-slidegen) 中的 `slidegen` schema。指令：\n\n- `<!-- class: cover | section | center | invert -->` —— 单页样式提示（未知类名报错失败）。\n- `<!-- background: #hex -->` —— 单页背景色覆盖。\n- `<!-- theme: <id> -->` —— deck 默认风格，仅允许出现在第一页。\n\n## 配置\n\n`defaultTheme` 为必填项：每次组合都必须声明页面打开时的默认风格。单次调用的 `theme` 参数与第一页指令优先于该默认值，且浏览者随时可在页面内切换风格。\n\n## 校验\n\n除 schema 的类型/必填/枚举校验外，`execute` 还强制：deck 源文本不超过 250,000 字符与 200 页；文件名必须是相对 `.html`/`.htm` 路径，不含绝对路径、目录穿越、空段、Windows 保留设备名或控制字符；渲染文档不超过 16 MiB。所有模型内容在渲染时做 HTML 转义；链接目标做协议白名单检查（`javascript:` 等可执行协议被丢弃）。\n\n## 渲染\n\n规范返回值为 `{ path, slideCount, title, theme, themes, bytes }`；模型可见文本返回存储路径与一行操作说明。UI 卡片为 `generic`：进行中卡片携带目标文件的 `locations`，完成卡片保留标题并回退到原始结果内容。\n\n## 导出形态\n\n函数/命名空间插件：导出 `name` / `inject` / `apply`，不导出 default。多余的 `export default` 会经 Loader 的 `unwrapExports` 折叠模块并丢失 `inject`（见 [docs/postmortem/0001](../../../docs/postmortem/0001-acp-default-export-drops-inject.md)）。\n\n## 模型体验\n\n### 工具 schema\n\n#### 模型看到什么\n\n模型看到生成的 [`slidegen` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-slidegen)。\n\n#### Token 影响\n\n工具可见的每个请求都承担固定 schema 开销。描述内嵌 deck 语法，格式说明按请求计费一次，而非按调用计费。\n\n#### KV Cache 影响\n\n定义与可见性不变时前缀稳定。插件生命周期或作用域限制可能使该 schema 的复用失效。\n\n### 工具调用历史与结果\n\n#### 模型看到什么\n\n每次助手工具调用的参数中保留完整 deck 文本。成功时返回存储路径、页数与一行使用说明。稳定失败会指明出错页码或被拒绝的文件名；HTML 文件内容永不回显。\n\n#### Token 影响\n\n每个 deck 一次调用；生成的 HTML 是文件系统产物而非模型上下文，渲染输出不消耗 token。\n\n#### KV Cache 影响\n\ndeck 内容只在调用参数中出现一次；请求其余部分不变。\n\n## 已知限制与待办\n\n- 仅支持文本内容：暂无演讲者备注、演讲模式与定时切换。\n- 代码块暂不做语法高亮，以带样式的纯 `<pre>` 渲染。\n- 不做图片内嵌：图片按 URL 或相对路径引用，离线展示远程图片需要网络。\n","readmeFilename":"README.zh.md","_rev":"1-dd49ae4b77998a18175140408a7c7ab1"}