dsh-ppt-master-wrapper 6.9.0-r1 → 6.9.0-r2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +4 -3
- package/README.md +4 -3
- package/index.js +27 -7
- package/lib/client.js +1 -1
- package/package.json +1 -1
- package/scripts/check-dsh-compat.mjs +8 -5
package/README.en.md
CHANGED
|
@@ -194,7 +194,7 @@ dsh-ppt-master-wrapper/
|
|
|
194
194
|
├── lib/ # client half / tools / venv / skill provider / scope
|
|
195
195
|
├── skills/ppt-master/ # ★ upstream vendor tree (byte-for-byte)
|
|
196
196
|
├── scripts/ # sync-upstream / verify-plugin / check-dsh-compat
|
|
197
|
-
├── tests/ # full node:test suite (
|
|
197
|
+
├── tests/ # full node:test suite (734 cases)
|
|
198
198
|
├── docs/superpowers/ # design & plan documents (development history)
|
|
199
199
|
├── .github/ # CI and issue/PR templates
|
|
200
200
|
└── README / AGENTS.md / CONTRIBUTING.md / NOTICE / LICENSE
|
|
@@ -208,11 +208,11 @@ dsh-ppt-master-wrapper/
|
|
|
208
208
|
|
|
209
209
|
```bash
|
|
210
210
|
node scripts/check-dsh-compat.mjs # contract check: spec §7.7 six (+⑦) design-precondition probes
|
|
211
|
-
node --test tests/*.test.mjs # full suite (
|
|
211
|
+
node --test tests/*.test.mjs # full suite (734/734 with a real SDK on the machine)
|
|
212
212
|
node scripts/verify-plugin.mjs --upstream .upstream/refs/tags/<ref>@<sha> # integrity check (needs the cache dir)
|
|
213
213
|
```
|
|
214
214
|
|
|
215
|
-
Machines without the host SDK (CI included): build the default stub tree with `node tests/helpers/stub-sdk.mjs .ci-stub`, then run the first two commands with `DSH_NODE_MODULES=$PWD/.ci-stub/node_modules` (expected: 732/
|
|
215
|
+
Machines without the host SDK (CI included): build the default stub tree with `node tests/helpers/stub-sdk.mjs .ci-stub`, then run the first two commands with `DSH_NODE_MODULES=$PWD/.ci-stub/node_modules` (expected: 734/732/2 skipped — skips are declared explicitly); mechanisms and red-light signatures in [AGENTS.md](AGENTS.md) §4, CI in `.github/workflows/ci.yml`.
|
|
216
216
|
|
|
217
217
|
## Version history
|
|
218
218
|
|
|
@@ -235,6 +235,7 @@ Machines without the host SDK (CI included): build the default stub tree with `n
|
|
|
235
235
|
| `v6.8.0-r4` | Environment declaration and repository conventions: `engines.node` corrected from `>=20.0.0` to `>=22.12.0` (the load path needs `require(esm)`); the CI compatibility job becomes `node22-compat` pinned to that floor; release notes are now "formal summary + one line per PR + bilingual". No runtime behaviour change |
|
|
236
236
|
| `v6.9.0` | Upstream sync: vendored v6.9.0 (byte-for-byte). Image→PPTX gains OCR text evidence — `image_ocr.py scan` OCRs normalized page images into reviewable text blocks (line boxes, estimated font size, sampled ink), and the text layer becomes native text over a text-removed base, with `merge-base` re-reading the base and exiting 3 when text is left inside removal boxes; new `image_layers.py` (`check` verifies a layer is registered against the page, `diff-matte` derives a layer from the page's own pixels, `mono-matte` cuts a single-color graphic from a key plate) and `image_normalization.py`; the profile is no longer tied to one host, since any vision host with a reference-image path works (text removal defaults to `-b openai`, registered layers to `-b gemini`). `image_gen.py` adds `--gif-frames` for animated GIFs and the `gpt-image-2.6` family, and writes each image once in its filename's format (a `.jpg` keeps Gemini's JPEG bytes instead of a PNG round trip). Narration adds `--provider openai` (`gpt-realtime-2.1-mini` over the Realtime WebSocket, replacing `tts-1` and `gpt-4o-mini-tts`, which retire on 2027-01-06). Overwrite fixes: an export `-o` pointing at the source PPTX, and `source_to_md` outputs resolving or hardlinking to an input, are refused before anything is written; re-installing a template replaces its `Installed-from` line instead of stacking another. The dependency list is unchanged (19 entries, no venv rebuild), and the `__pycache__` that leaked into the v6.8.0 vendor tree is removed |
|
|
237
237
|
| `v6.9.0-r1` | npm channel and publish traceability. `package.json` gains `publishConfig` (pinning `registry.npmjs.org`, because the default registry here is a mirror and mirrors cannot publish); the bilingual READMEs promote npm to method one and note the semver trap (`6.9.0-r1` is a **prerelease**, `^6.9.0` does not include it, so pin the full version); the maintainer manual gains an npm release procedure. Publishing moves to `.github/workflows/publish.yml`, which runs `npm stage publish` in CI — this machine's egress is capped at ~23 KB/s and cannot upload the 17.7 MB tarball (three attempts all ended in ECONNRESET mid-transfer), while the runner's egress is fine — with the maintainer completing the release through `npm stage approve` under 2FA. That workflow now checks out `refs/tags/v<version>` from a required `version` input and asserts `package.json.version` matches: the previous version built from whatever `main` was at dispatch time, which is exactly why the published 6.9.0 and tag `v6.9.0` are not the same tree. It also enables `--provenance` (`id-token: write`), so npm signs an attestation binding the package to the commit and workflow. No runtime behaviour change |
|
|
238
|
+
| `v6.9.0-r2` | Load-time resolution back on the normal path (**runtime behaviour change**): inside the host process `DSH_HOME`, `DSH_PROFILE` and `DSH_PROFILE_DIR` are **always empty** — `dsh-shell-env` synthesizes them per shell call only, and `dsh-app-boot`'s `.env` layering rejects the `DSH_*` prefix as bootstrap-only. The previous build trusted those variables alone, so activation threw "all four location tiers missed" on a Desktop launch and on any plain-terminal `dsh` start, leaving the plugin disabled (that is the `1 entry did not activate` line). It now tries a plain `@deepseek-ai/schemastery` bare import first — a normally installed plugin is resolved by Node from the profile's `node_modules`, exactly like every official plugin — and falls back to the env chain, which now serves only the symlinked `link:` development checkout |
|
|
238
239
|
|
|
239
240
|
> Versioning: the `base` mirrors upstream releases; wrapper revisions append `-rN`. Itemized details in [AGENTS.md](AGENTS.md) §5.
|
|
240
241
|
|
package/README.md
CHANGED
|
@@ -195,7 +195,7 @@ dsh-ppt-master-wrapper/
|
|
|
195
195
|
├── lib/ # 客户端半边 / 工具 / venv / skill provider / scope
|
|
196
196
|
├── skills/ppt-master/ # ★ 上游 vendor 树(逐字节,零改写)
|
|
197
197
|
├── scripts/ # sync-upstream / verify-plugin / check-dsh-compat
|
|
198
|
-
├── tests/ # node:test 全套(
|
|
198
|
+
├── tests/ # node:test 全套(734 用例)
|
|
199
199
|
├── docs/superpowers/ # 设计与计划文档(开发史)
|
|
200
200
|
├── .github/ # CI 与 issue/PR 模板
|
|
201
201
|
└── README / AGENTS.md / CONTRIBUTING.md / NOTICE / LICENSE
|
|
@@ -209,11 +209,11 @@ dsh-ppt-master-wrapper/
|
|
|
209
209
|
|
|
210
210
|
```bash
|
|
211
211
|
node scripts/check-dsh-compat.mjs # 契约检查:spec §7.7 六项(+⑦)设计成立性前置
|
|
212
|
-
node --test tests/*.test.mjs # 全套测试(本机真实 SDK 环境
|
|
212
|
+
node --test tests/*.test.mjs # 全套测试(本机真实 SDK 环境 734/734)
|
|
213
213
|
node scripts/verify-plugin.mjs --upstream .upstream/refs/tags/<ref>@<sha> # 完整性校验(需缓存目录)
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
-
无宿主 SDK 的机器(含 CI):`node tests/helpers/stub-sdk.mjs .ci-stub` 建默认 stub 树,以 `DSH_NODE_MODULES=$PWD/.ci-stub/node_modules` 跑前两条(预期 732/
|
|
216
|
+
无宿主 SDK 的机器(含 CI):`node tests/helpers/stub-sdk.mjs .ci-stub` 建默认 stub 树,以 `DSH_NODE_MODULES=$PWD/.ci-stub/node_modules` 跑前两条(预期 734/732/2 skip,skip 为显式声明);机制与红灯形态见 [AGENTS.md](AGENTS.md) §4,CI 见 `.github/workflows/ci.yml`。
|
|
217
217
|
|
|
218
218
|
## 版本历史
|
|
219
219
|
|
|
@@ -236,6 +236,7 @@ node scripts/verify-plugin.mjs --upstream .upstream/refs/tags/<ref>@<sha> #
|
|
|
236
236
|
| `v6.8.0-r4` | 环境声明与仓库约定修订:`engines.node` 由 `>=20.0.0` 校正为 `>=22.12.0`(装载链路需 `require(esm)`);CI 兼容 job 改为 `node22-compat` 并钉死该下限;release 说明格式约定为「严谨总结 + 每 PR 一行 + 中英双语」。无运行时行为变更 |
|
|
237
237
|
| `v6.9.0` | 上游同步:vendor v6.9.0(逐字节)。Image→PPTX 新增 OCR 文本证据——`image_ocr.py scan` 把归一化页图 OCR 成可复核文本块(行框、估算字号、取样墨色),文字层成为「去文字底板」之上的原生文本,`merge-base` 会回读底板、发现文本框内残留文字时以 exit 3 报出;新增 `image_layers.py`(`check` 校验图层与页面配准、`diff-matte` 由页面自身像素导出图层、`mono-matte` 从色板切单色图形)与 `image_normalization.py`;profile 不再绑定单一宿主,任意带参考图路径的视觉宿主均可(文本去除默认 `-b openai`、注册图层默认 `-b gemini`)。`image_gen.py` 支持 `--gif-frames` 生成动态 GIF 与 `gpt-image-2.6` 系列,每张图按其文件名格式只写一次(`.jpg` 保留 Gemini 原始 JPEG 字节,不再 PNG 往返留孤儿);旁白新增 `--provider openai`(`gpt-realtime-2.1-mini` 走 Realtime WebSocket,替代 2027-01-06 退役的 `tts-1`/`gpt-4o-mini-tts`)。覆盖写入修复:导出 `-o` 指向源 PPTX、`source_to_md` 输出指向输入(含硬链接别名)均在写盘前拒绝;模板重装改写 `Installed-from` 行而非叠加。依赖清单 19 条逐字不变(venv 无需重建),另清理 6.8.0 误入 vendor 的 `__pycache__` |
|
|
238
238
|
| `v6.9.0-r1` | npm 渠道与发布可追溯性。`package.json` 增 `publishConfig`(钉死 `registry.npmjs.org`——本机默认 registry 是镜像站,镜像不能发布);双语 README 安装段把 npm 提为方式一,并补 semver 提示(`6.9.0-r1` 属**预发布**,`^6.9.0` 不含它,锁定修订版须写全版本号);维护者手册新增 npm 发布流程。发布改由 `.github/workflows/publish.yml` 在 CI 侧执行 `npm stage publish`——维护机出口上行被限到 ~23 KB/s,17.7 MB 的 tarball 传不完(三次实测均中途 ECONNRESET),runner 上行正常;维护者带 2FA `npm stage approve` 完成发布。该 workflow 现按必填 `version` 输入检出 `refs/tags/v<version>` 并断言 `package.json.version` 与之一致:旧版从触发那一刻的 main 取码,正是这一点让已发布的 6.9.0 与 tag `v6.9.0` 不是同一棵树;同时对 `npm stage publish` 启用 `--provenance`(`id-token: write`),由 npm 签发把包绑定到 commit 与 workflow 的签名证明。无运行时行为变更 |
|
|
239
|
+
| `v6.9.0-r2` | 装载期解析回到正路(**运行时行为有变**):宿主进程里 `DSH_HOME` / `DSH_PROFILE` / `DSH_PROFILE_DIR` **恒为空**——它们只由 `dsh-shell-env` 在每次 shell 调用时现造,`dsh-app-boot` 的 `.env` 分层又把 `DSH_*` 前缀列为 bootstrap-only 直接拒绝;原实现只认这三个环境变量,故 Desktop 直启、或从普通终端启动 `dsh` 时装载即抛「定位链四级均未命中」,整个插件不启用(即 `1 entry did not activate` 那一行)。现改为**先裸导入** `@deepseek-ai/schemastery`(装好的插件由 Node 从 profile 的 `node_modules` 解析,与官方插件同一条路径),未命中才落回 env 定位链——那条链现在只服务 `link:` 的符号链接开发形态 |
|
|
239
240
|
|
|
240
241
|
> 版本规则:`base` 镜像上游 release,包装层修订追加 `-rN`。逐项明细见 [AGENTS.md](AGENTS.md) §5。
|
|
241
242
|
|
package/index.js
CHANGED
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* `ctx.skills`, exposes the three model-facing tools on `ctx.tools`, and declares
|
|
4
4
|
* the cordis `Config` schema behind the venv-isolation settings page.
|
|
5
5
|
*
|
|
6
|
-
* Zero *declared* npm dependencies (package.json carries none). The Config schema
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* the package is
|
|
6
|
+
* Zero *declared* npm dependencies (package.json carries none). The Config schema is
|
|
7
|
+
* built from the host-provided `@deepseek-ai/schemastery`, resolved in two steps: a
|
|
8
|
+
* plain ESM bare import first (a normally installed plugin is resolved by Node from
|
|
9
|
+
* the profile's `node_modules`), then — only for a symlinked `link:` checkout, where
|
|
10
|
+
* the package is unreachable from inside the package — the env location chain plus
|
|
11
|
+
* `createRequire` anchored there, spec §5.1/§6.1⓪.
|
|
11
12
|
* Resolution failure is **fail-loud at module load**: the whole plugin (and with it
|
|
12
13
|
* the vendor skill surface) is unavailable, never a Config-less degradation.
|
|
13
14
|
*
|
|
@@ -94,6 +95,14 @@ function locateDshModules() {
|
|
|
94
95
|
/**
|
|
95
96
|
* 解析宿主 `@deepseek-ai/schemastery`(async;顶层 `await` 调用,见下)。
|
|
96
97
|
*
|
|
98
|
+
* 解析顺序两段:
|
|
99
|
+
* ① **裸导入**。装好的插件由 Node 从 profile 的 `node_modules` 解析(提升或 peer 安装
|
|
100
|
+
* 都命中),**不依赖任何环境变量**——`DSH_HOME` / `DSH_PROFILE` / `DSH_PROFILE_DIR`
|
|
101
|
+
* 只由 `dsh-shell-env` 在每次 shell 调用时现造,宿主进程里恒为空,`dsh-app-boot` 的
|
|
102
|
+
* `.env` 分层又把 `DSH_*` 前缀列入 bootstrap-only 直接拒绝。`exports.import` 指向 ESM
|
|
103
|
+
* 构建,顺带绕开下面 CJS 路径的 `require(esm)` 竞态(issue #36)。
|
|
104
|
+
* ② 裸导入未命中(`link:` 的符号链接 checkout:包内向上找不到 profile)→ env 定位链。
|
|
105
|
+
*
|
|
97
106
|
* `createRequire` **必须以定位到的 node_modules 为锚**(锚点取该目录下的占位文件路径,
|
|
98
107
|
* 且先经 `resolve` 落成绝对路径——定位命中的 `dir` 可能是相对拼写):
|
|
99
108
|
* 锚在 `index.js` 上即便 `DSH_PROFILE_DIR` 正确也会 `MODULE_NOT_FOUND`(本机实测)——
|
|
@@ -120,13 +129,24 @@ function locateDshModules() {
|
|
|
120
129
|
* @throws {Error} 定位链未命中或宿主未安装该包。
|
|
121
130
|
*/
|
|
122
131
|
async function loadSchemastery() {
|
|
132
|
+
let bareImportFailure = null;
|
|
133
|
+
try {
|
|
134
|
+
// `.default` 对两种形态都成立:ESM 构建 `export { Schema as default }`,CJS 替身
|
|
135
|
+
// 经 ESM 装载时 `module.exports` 也落在 `default` 上。
|
|
136
|
+
return (await import('@deepseek-ai/schemastery')).default;
|
|
137
|
+
} catch (error) {
|
|
138
|
+
bareImportFailure = error;
|
|
139
|
+
}
|
|
140
|
+
|
|
123
141
|
const { dir, via, attempted } = locateDshModules();
|
|
124
142
|
|
|
125
143
|
if (dir === null) {
|
|
126
144
|
throw new Error(
|
|
127
|
-
`@deepseek-ai/schemastery
|
|
145
|
+
`@deepseek-ai/schemastery 未能解析:裸导入未命中(${bareImportFailure?.code ?? bareImportFailure}),`
|
|
146
|
+
+ `宿主 node_modules 定位链四级均未命中`
|
|
128
147
|
+ `(已探测:${attempted.length > 0 ? attempted.join(';') : '无任何级别可探测'})。`
|
|
129
|
-
+ '
|
|
148
|
+
+ '正常安装下即表示 profile 未提升该包(重装依赖即可);'
|
|
149
|
+
+ '或设置 DSH_NODE_MODULES / DSH_PROFILE_DIR / DSH_HOME(+DSH_PROFILE) '
|
|
130
150
|
+ '指向已安装该包的宿主 profile。',
|
|
131
151
|
);
|
|
132
152
|
}
|
package/lib/client.js
CHANGED
|
@@ -63,7 +63,7 @@ window.__ModuleLoader__.load({
|
|
|
63
63
|
* `t('version.skillDirValue')` 取用——直接渲染常量会让英文界面显示中文占位串、
|
|
64
64
|
* 并使该字典键成为死键(T2 审查 Important-1)。
|
|
65
65
|
*/
|
|
66
|
-
const PLUGIN_VERSION = '6.9.0-
|
|
66
|
+
const PLUGIN_VERSION = '6.9.0-r2';
|
|
67
67
|
const UPSTREAM_VERSION = '6.9.0';
|
|
68
68
|
const SKILL_DIR_TAIL = '<包根>/skills/ppt-master';
|
|
69
69
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-ppt-master-wrapper",
|
|
3
|
-
"version": "6.9.0-
|
|
3
|
+
"version": "6.9.0-r2",
|
|
4
4
|
"description": "DeepSeek Harness plugin wrapping the upstream ppt-master skill set: byte-for-byte vendored skills, zero runtime dependencies, optional venv isolation and a Plugins-page configuration card.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -157,7 +157,9 @@ const SLOT_NAME = 'plugins.bundle.config';
|
|
|
157
157
|
const CLIENT_LOCALE_NS = 'dsh-ppt-master-config';
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
|
-
* ④
|
|
160
|
+
* ④ 的静态文本判据(受控解析通道的两半):正向标记必须出现(兜底通道仍在),**静态**
|
|
161
|
+
* ESM 裸导入必须缺席——v6.9.0-r2 起动态裸导入是主路径(`loadSchemastery` 第一段),静态
|
|
162
|
+
* 形态仍只在符号链接装载下必炸,故禁的只是它。
|
|
161
163
|
*
|
|
162
164
|
* ④ 的**实跑**证据(入口装载成功)同时是 ① 的前提:`Config.toJSON()` 的引用图由同一个
|
|
163
165
|
* 受控解析出的 schemastery 产出,替身若失真(例如把所有叶都标 volatile)则 ① 会自我
|
|
@@ -459,8 +461,9 @@ function readBundleInsertIds() {
|
|
|
459
461
|
/**
|
|
460
462
|
* §7.7④ 的静态文本证据:插件入口必须经**受控解析通道**取宿主 schemastery。
|
|
461
463
|
*
|
|
462
|
-
* 正向=`createRequire` +
|
|
463
|
-
*
|
|
464
|
+
* 正向=`createRequire` + 包名标记在场(兜底通道未被拆掉);负向=无 `@deepseek-ai/schemastery`
|
|
465
|
+
* 的**静态** ESM 裸导入(符号链接装载路径下静态裸导入必然 ERR_MODULE_NOT_FOUND,spec
|
|
466
|
+
* §5.1/§6.1⓪;动态裸导入自 v6.9.0-r2 起是主路径,不在禁列)。
|
|
464
467
|
* 与**实跑**(入口在本环境装载成功=受控解析命中)合成本项证据;不另立 env 通道。
|
|
465
468
|
*
|
|
466
469
|
* @returns {{ ok: true } | { ok: false, reason: string }}
|
|
@@ -1219,8 +1222,8 @@ export async function runCompatCheck(options = {}) {
|
|
|
1219
1222
|
problems.push(`§7.7④ 受控解析通道静态断言失败: ${channel.reason}`);
|
|
1220
1223
|
} else {
|
|
1221
1224
|
notes.push(
|
|
1222
|
-
'§7.7④ schemastery 可解析性: index.js
|
|
1223
|
-
+ 'node_modules
|
|
1225
|
+
'§7.7④ schemastery 可解析性: index.js 含受控解析通道(动态裸导入为主 + createRequire '
|
|
1226
|
+
+ '锚定定位到的宿主 node_modules 兜底、无静态 ESM 裸导入——静态源码文本断言)'
|
|
1224
1227
|
+ (pluginLoaded
|
|
1225
1228
|
? '+ 本环境入口实跑装载成功(受控解析命中)'
|
|
1226
1229
|
: ';**本环境入口实跑装载失败**——受控解析未命中(见 problems),本项仅静态半成立'),
|