what-was-that 0.1.10 → 0.1.12
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.md +18 -9
- package/dsh.plugin.json +1 -1
- package/lib/client.js +1 -1
- package/lib/index.js +3 -3
- package/package.json +2 -5
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<p>
|
|
4
4
|
<a href="https://github.com/topics/dsh-plugin"><code>dsh-plugin</code></a>
|
|
5
5
|
<a href="https://github.com/SH-9999/what-was-that"><code>DeepSeek Harness 插件</code></a>
|
|
6
|
-
<a href="https://www.npmjs.com/package/what-was-that"><code>npm: v0.1.
|
|
6
|
+
<a href="https://www.npmjs.com/package/what-was-that"><code>npm: v0.1.12</code></a>
|
|
7
7
|
<a href="https://github.com/SH-9999/what-was-that/actions"><code>CI: typecheck · test · build</code></a>
|
|
8
8
|
<a href="https://github.com/SH-9999/what-was-that/blob/main/LICENSE"><code>MIT License</code></a>
|
|
9
9
|
<a href="https://github.com/SH-9999/what-was-that"><code>静态插件</code></a>
|
|
@@ -17,15 +17,24 @@
|
|
|
17
17
|
|
|
18
18
|
## 📦 本仓库:已发布到 npm 的静态插件
|
|
19
19
|
|
|
20
|
-
从最初的动态插件原型(粘贴 JS),重写为规范的 **TypeScript 静态插件包**,现已发布到 npm(`what-was-that@0.1.
|
|
20
|
+
从最初的动态插件原型(粘贴 JS),重写为规范的 **TypeScript 静态插件包**,现已发布到 npm(`what-was-that@0.1.12`)。
|
|
21
21
|
|
|
22
|
-
### ✅ 适配 DSH 0.1.
|
|
22
|
+
### ✅ 适配 DSH 0.1.7-rc.2(v0.1.12)
|
|
23
23
|
|
|
24
|
-
v0.1.
|
|
24
|
+
v0.1.12 已对照 **DeepSeek Harness 0.1.7-rc.2** 逐项核对并修复:
|
|
25
25
|
|
|
26
|
-
- **修复
|
|
26
|
+
- **修复 Typert strict codec 的形状变更(v0.1.12,本次唯一硬伤)**:自 **0.1.6-alpha.2** 起,strict codec 里的 schema 由直接挂载 `schema: <zod schema>` 改为惰性工厂 `create: () => <zod schema>`;dsh 的宿主 registry(`validateCodec`)与客户端网关(`requireStrictCodec`)都会拒绝没有 `create()` 的 strict codec。旧写法会让宿主 `ctx.typert.register` 与客户端 `$mount` 双双抛 `strict codec has no create() factory`,症状是**章鱼能出现、但红色角标 / 气泡解释 / 选词卡片 / 设置里的模型列表全部失效**(客户端永远拿不到 `wwt` 句柄)。现改为 `create: () => schema`,宿主与客户端两半一并恢复。
|
|
27
|
+
- **精简未使用的依赖声明**:移除 `dsh.client.inject` 与 `peerDependencies` 中从未被引用的 `@deepseek-ai/dsh-client-locale`(插件文案为硬编码中文,不读取 locale 服务)。无功能影响。
|
|
28
|
+
- 兼容性结论:槽位 API(`slots.inject` / `slots.register`)、三个挂载点(`shell.overlay` / `conversation.chat.assistant-actions` / `settings.section`)、`ctx.remote.$mount` + `ctx.reflect.get('remote.wwt')`、`fs` / `typert` / `agentDefaultModel` / `llm` / `session/event` 服务、`ctx.effect`、以及 client 的 ModuleLoader 握手格式,在 0.1.7-rc.2 下**逐项核对全部匹配**,无需改动。
|
|
29
|
+
|
|
30
|
+
### ✅ 适配 DSH 0.1.5-rc.1(v0.1.11)
|
|
31
|
+
|
|
32
|
+
v0.1.11 已验证兼容 **DeepSeek Harness 0.1.5-rc.1**(0.1.5 系列首个候选版,汇总了自 0.1.2-rc.1 以来的全部变更),主要变更:
|
|
33
|
+
|
|
34
|
+
- **修复 `llm` 流 finish chunk 的 `reason` 形状变化**(v0.1.11):0.1.5 中流式输出的结束 chunk `reason` 由字符串改为对象(`{ kind: 'error' | 'aborted', failure }`),旧版 `chunk.reason === 'error'` 的字符串比较永远不成立,导致 AI 深挖/解释**失败时**被误报为「模型没有返回内容」。现改为比较 `chunk.reason?.kind`,失败原因提示恢复准确(「模型调用未完成(error / aborted)」)。
|
|
35
|
+
- **修复 host 端 `fs` 服务注入**(v0.1.10 起):0.1.5 中 `fs` 是独立的 cordis 服务,`ctx.get('fs')` 在插件 apply 阶段只有在 `inject` 中显式声明才能拿到。host 入口 `inject` 从 `['typert']` 改为 `['typert', 'fs']`,**修复了启动时的 `wwt: no fs service` 警告**,本地词库(lexicon.json)与宠物 SVG 现在都能在启动阶段正常加载(此前只有运行时 remote 调用才能拿到 fs)。
|
|
27
36
|
- **client 端依赖对齐**:移除 `dsh.client.inject` 与 `peerDependencies` 中 0.1.5 已不存在的 `@deepseek-ai/dsh-client-runtime` 包(0.1.5 的 client 运行时已并入 `dsh-client-modules` 模块系统)。client 端使用的 `slots` / `remote` / `connection` 三个服务在 0.1.5 中分别由 `dsh-client-ui-renderer`(slots 已打包进平台 seed)、`dsh-api-gateway`、`dsh-client-connection` 提供,无需改动。
|
|
28
|
-
- 兼容性结论:**槽位 API 与 0.1.5 官方文档逐字一致**(`slots.inject` + `slots.register(spec, renderFn)`),`shell.overlay` / `conversation.chat.assistant-actions` / `settings.section`
|
|
37
|
+
- 兼容性结论:**槽位 API 与 0.1.5 官方文档逐字一致**(`slots.inject` + `slots.register(spec, renderFn)`),`shell.overlay` / `conversation.chat.assistant-actions` / `settings.section` 三个挂载点在新版中全部保留;Typert Remote(`$mount` + `ctx.reflect.get('remote.wwt')`)与 `ctx.typert.register` 严格 manifest 机制在 0.1.5-rc.1 下全部有效。
|
|
29
38
|
|
|
30
39
|
### 相对原型阶段的改进
|
|
31
40
|
- ✅ **TypeScript 源码**(`src/`),不再是一大段粘贴的字符串
|
|
@@ -54,7 +63,7 @@ what-was-that/
|
|
|
54
63
|
|
|
55
64
|
### 安装(给 DSH 用户)
|
|
56
65
|
|
|
57
|
-
已发布到 npm:`what-was-that@0.1.
|
|
66
|
+
已发布到 npm:`what-was-that@0.1.12`(压缩包仅 **214 KB**,轻量无负担)。在 DSH 的 profile 里一条命令装入并启用:
|
|
58
67
|
|
|
59
68
|
```bash
|
|
60
69
|
# 要求:机器上已安装 pnpm(dsh plugin 命令依赖它)
|
|
@@ -63,7 +72,7 @@ dsh plugin --profile web add what-was-that
|
|
|
63
72
|
|
|
64
73
|
装完**重启 `dsh web`** 并硬刷新(Ctrl+Shift+R),右下角出现小章鱼即成功。
|
|
65
74
|
|
|
66
|
-
> 适用版本:**DSH ≥ 0.1.
|
|
75
|
+
> 适用版本:**DSH ≥ 0.1.6-alpha.2**(自该版本起 Typert strict codec 使用惰性工厂 `create()`;v0.1.12 已按此对齐)。仍在 **0.1.5 系列**(codec 为 `schema`)的用户请继续使用 **v0.1.11**。
|
|
67
76
|
|
|
68
77
|
> 没有 pnpm 时,也可以把 `lib/` 产物放进 profile 手动挂载(`cordis.patch.yml` 声明了挂载点),无需编译。
|
|
69
78
|
|
|
@@ -96,7 +105,7 @@ node build.mjs # 打包 lib/index.js + lib/client.js,并复制 assets
|
|
|
96
105
|
- 🔒 **隐私红线**:不把完整回复发回模型;AI 深挖只发点中的词 ±80 字,带缓存
|
|
97
106
|
|
|
98
107
|
### 轻量优先
|
|
99
|
-
- 📦 **npm 包很小**——压缩包仅 **
|
|
108
|
+
- 📦 **npm 包很小**——压缩包仅 **214 KB**(解压 1.3 MB,含词库 255 条 + 四态形象 + 全部构建产物),比一张照片还小
|
|
100
109
|
- 🪶 **零运行时依赖**——只用 DSH 自带接口
|
|
101
110
|
- 🧾 **极小透明 SVG**(每张 15–20 KB)
|
|
102
111
|
- ⚡ **启动快、占用小**
|
package/dsh.plugin.json
CHANGED
package/lib/client.js
CHANGED
|
@@ -14592,7 +14592,7 @@ var modelsResultSchema = external_exports.object({
|
|
|
14592
14592
|
});
|
|
14593
14593
|
var setRouteResultSchema = external_exports.object({ ok: external_exports.boolean() });
|
|
14594
14594
|
function strict(typeSymbol, schema) {
|
|
14595
|
-
return { mode: "strict", typeSymbol, schema };
|
|
14595
|
+
return { mode: "strict", typeSymbol, create: () => schema };
|
|
14596
14596
|
}
|
|
14597
14597
|
var WWT_INVOCATIONS = [
|
|
14598
14598
|
{
|
package/lib/index.js
CHANGED
|
@@ -14705,7 +14705,7 @@ var modelsResultSchema = external_exports.object({
|
|
|
14705
14705
|
});
|
|
14706
14706
|
var setRouteResultSchema = external_exports.object({ ok: external_exports.boolean() });
|
|
14707
14707
|
function strict(typeSymbol, schema) {
|
|
14708
|
-
return { mode: "strict", typeSymbol, schema };
|
|
14708
|
+
return { mode: "strict", typeSymbol, create: () => schema };
|
|
14709
14709
|
}
|
|
14710
14710
|
var WWT_INVOCATIONS = [
|
|
14711
14711
|
{
|
|
@@ -14922,8 +14922,8 @@ function apply(ctx) {
|
|
|
14922
14922
|
for await (const chunk of stream) {
|
|
14923
14923
|
if (chunk.type === "text-delta" && typeof chunk.text === "string") out += chunk.text;
|
|
14924
14924
|
else if (chunk.type === "reasoning-delta" && typeof chunk.text === "string") reasoning += chunk.text;
|
|
14925
|
-
else if (chunk.type === "finish" && (chunk.reason === "error" || chunk.reason === "aborted")) {
|
|
14926
|
-
return { ok: false, error: "\u6A21\u578B\u8C03\u7528\u672A\u5B8C\u6210\uFF08" + chunk.reason + "\uFF09" };
|
|
14925
|
+
else if (chunk.type === "finish" && (chunk.reason?.kind === "error" || chunk.reason?.kind === "aborted")) {
|
|
14926
|
+
return { ok: false, error: "\u6A21\u578B\u8C03\u7528\u672A\u5B8C\u6210\uFF08" + chunk.reason.kind + "\uFF09" };
|
|
14927
14927
|
}
|
|
14928
14928
|
}
|
|
14929
14929
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "what-was-that",
|
|
3
3
|
"description": "A tiny octopus desktop pet that explains AI-jargon in plain language for the DeepSeek Harness web GUI.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.12",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/SH-9999/what-was-that",
|
|
7
7
|
"repository": {
|
|
@@ -40,8 +40,7 @@
|
|
|
40
40
|
"client": {
|
|
41
41
|
"platform": "web",
|
|
42
42
|
"inject": [
|
|
43
|
-
"@deepseek-ai/dsh-client-ui-slots"
|
|
44
|
-
"@deepseek-ai/dsh-client-locale"
|
|
43
|
+
"@deepseek-ai/dsh-client-ui-slots"
|
|
45
44
|
]
|
|
46
45
|
}
|
|
47
46
|
},
|
|
@@ -63,7 +62,6 @@
|
|
|
63
62
|
"@deepseek-ai/dsh-typert-protocol": "*",
|
|
64
63
|
"@deepseek-ai/dsh-typert-registry": "*",
|
|
65
64
|
"@deepseek-ai/dsh-client-ui-slots": "*",
|
|
66
|
-
"@deepseek-ai/dsh-client-locale": "*",
|
|
67
65
|
"react": "^18.2.0"
|
|
68
66
|
},
|
|
69
67
|
"peerDependenciesMeta": {
|
|
@@ -72,7 +70,6 @@
|
|
|
72
70
|
"@deepseek-ai/dsh-typert-protocol": { "optional": true },
|
|
73
71
|
"@deepseek-ai/dsh-typert-registry": { "optional": true },
|
|
74
72
|
"@deepseek-ai/dsh-client-ui-slots": { "optional": true },
|
|
75
|
-
"@deepseek-ai/dsh-client-locale": { "optional": true },
|
|
76
73
|
"react": { "optional": true }
|
|
77
74
|
},
|
|
78
75
|
"dependencies": {
|