@takboo/dsh-coopanion 0.4.20 → 0.4.22
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 +3 -2
- package/THIRD_PARTY_NOTICES.md +4 -0
- package/assets/coopanion.png +0 -0
- package/assets/coopanion.svg +9 -0
- package/dist/build-info.json +2 -2
- package/dist/index.js +12 -4
- package/dist/index.js.map +2 -2
- package/dist/model.js +12 -4
- package/dist/model.js.map +2 -2
- package/docs/characters.md +1 -1
- package/docs/companionship-contract.md +1 -1
- package/docs/compatibility.md +7 -1
- package/docs/development.md +9 -2
- package/docs/market/takboo__dsh-coopanion.yml +1 -0
- package/docs/multi-display-contract.md +1 -1
- package/docs/release-notes.md +15 -0
- package/docs/releasing.md +10 -0
- package/docs/usage.md +5 -5
- package/npm-shrinkwrap.json +2 -2
- package/package.json +5 -1
- package/scripts/check-package.mjs +9 -0
- package/scripts/compatibility/check.mjs +10 -2
- package/scripts/compatibility/discover.mjs +8 -0
- package/scripts/compatibility/planning.mjs +1 -1
- package/scripts/compatibility/published.mjs +157 -0
- package/scripts/compatibility/report.mjs +39 -9
- package/scripts/compatibility/runner.mjs +6 -3
- package/scripts/verify-engineering.sh +1 -1
- package/src/model.ts +15 -6
- package/tests/compatibility-monitor.mjs +32 -0
- package/tests/install.mjs +11 -0
- package/tests/model.test.ts +12 -1
- package/tests/multi-display-ui.mjs +2 -0
- package/tests/npc-drag-ui.mjs +59 -9
- package/tests/ui.mjs +13 -0
- package/web/live-mouth.js +34 -0
- package/web/pet.js +11 -7
- package/web/upstream/UPSTREAM.md +1 -1
- package/web/upstream/kit/body.js +7 -5
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
[](https://github.com/takboo/dsh-coopanion/releases/latest)
|
|
8
8
|
[](https://github.com/takboo/dsh-coopanion/actions/workflows/ci.yml)
|
|
9
9
|
[](LICENSE)
|
|
10
|
+
[](https://dshfind.com/zh/plugins/takboo/dsh-coopanion?ref=badge)
|
|
10
11
|
|
|
11
12
|
[**下载插件**](https://github.com/takboo/dsh-coopanion/releases/latest/download/dsh-coopanion.tgz) · [快速开始](#开始一起工作) · [使用指南](docs/usage.md) · [更新记录](https://github.com/takboo/dsh-coopanion/releases/latest)
|
|
12
13
|
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
打开侧边栏 **插件 → 添加插件**,在「包名或地址」中填入:
|
|
59
60
|
|
|
60
61
|
```text
|
|
61
|
-
@takboo/dsh-coopanion@0.4.
|
|
62
|
+
@takboo/dsh-coopanion@0.4.22
|
|
62
63
|
```
|
|
63
64
|
|
|
64
65
|
点击安装,完成后启用 `dsh-coopanion`,再完全退出并重新打开 Harness。
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
使用 **Desktop 自带的 `dsh` 命令**。先启动 Desktop 一次完成初始化,完全退出应用后执行:
|
|
71
72
|
|
|
72
73
|
```bash
|
|
73
|
-
dsh plugin --profile desktop add @takboo/dsh-coopanion@0.4.
|
|
74
|
+
dsh plugin --profile desktop add @takboo/dsh-coopanion@0.4.22
|
|
74
75
|
```
|
|
75
76
|
|
|
76
77
|
完成后重新打开 Desktop。其他 profile 的安装方法见[使用指南](docs/usage.md#通过-dsh-命令行安装)。
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -12,6 +12,10 @@ The textures and thumbnails in `web/upstream/whale/`, and the generated tray ico
|
|
|
12
12
|
|
|
13
13
|
This integration follows the project user's existing statement that the community character is reusable. AGPL does not relicense these textures. The complete original upstream rights notice is preserved verbatim in [web/upstream/THIRD_PARTY_NOTICES.md](web/upstream/THIRD_PARTY_NOTICES.md). Its sections on speech-recognition libraries/models describe the upstream package; this plugin does not bundle those components.
|
|
14
14
|
|
|
15
|
+
## Coopanion distribution icon
|
|
16
|
+
|
|
17
|
+
`assets/coopanion.svg` is original project artwork made from geometric shapes, licensed under AGPL-3.0-or-later. `assets/coopanion.png` is its 180 × 180 raster export for the package manifest and the market card. Regenerate it with `rsvg-convert -o assets/coopanion.png assets/coopanion.svg`. The tray keeps its separate artwork and notice above.
|
|
18
|
+
|
|
15
19
|
## Electron
|
|
16
20
|
|
|
17
21
|
Electron 44.7.0 is installed as a dependency and retains its MIT license and Chromium's accompanying notices. Runtime download and verification remain unchanged.
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="180" height="180" viewBox="0 0 180 180">
|
|
2
|
+
<rect x="1" y="1" width="178" height="178" rx="38" fill="#182951"/>
|
|
3
|
+
<path fill="#9de5ff" d="M40 101c0-26 22-46 49-46 24 0 43 14 48 35 8-10 17-14 27-13-1 16-9 26-24 31-5 23-24 36-48 36-29 0-52-17-52-43Z"/>
|
|
4
|
+
<path fill="#54a5f2" d="M41 111c13 11 31 15 53 15 16 0 30-4 44-13-7 20-24 31-46 31-25 0-45-12-51-33Z"/>
|
|
5
|
+
<circle cx="72" cy="93" r="5" fill="#182951"/>
|
|
6
|
+
<path d="M64 108c4 5 10 6 15 1" fill="none" stroke="#182951" stroke-width="3.5" stroke-linecap="round"/>
|
|
7
|
+
<path fill="#ffe1a0" d="m128 30 4 10 10 4-10 4-4 10-4-10-10-4 10-4Z"/>
|
|
8
|
+
<circle cx="107" cy="31" r="3" fill="#e1f7ff"/>
|
|
9
|
+
</svg>
|
package/dist/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
|
-
"commit": "
|
|
3
|
+
"commit": "ca3bab64ab1751dfbb4841c05c3e9e843738be83",
|
|
4
4
|
"dirty": false,
|
|
5
|
-
"productDigest": "
|
|
5
|
+
"productDigest": "4f7f1995ab4b7e56c5a3c0584d264a1857258a9f86dfda60440ea387c6150877"
|
|
6
6
|
}
|
package/dist/index.js
CHANGED
|
@@ -1019,7 +1019,7 @@ var PetModel = class {
|
|
|
1019
1019
|
if (old) this.remove(old);
|
|
1020
1020
|
}
|
|
1021
1021
|
const project = session.header.cwd ? basename(session.header.cwd) : "\u672A\u6307\u5B9A\u9879\u76EE";
|
|
1022
|
-
item = { id: session.id, label: project, project, cwd: session.header.cwd ?? "", prompt: "", createdAt: session.header.createdAt, updatedAt: session.header.createdAt, mood: "idle", text: ready, reply: "", replyId: "", unread: 0, revision: 0, active: false, streaming: false, speechId: "" };
|
|
1022
|
+
item = { id: session.id, label: project, project, cwd: session.header.cwd ?? "", prompt: "", createdAt: session.header.createdAt, updatedAt: session.header.createdAt, mood: "idle", text: ready, reply: "", replyId: "", unread: 0, revision: 0, active: false, streaming: false, speechId: "", speechRevision: 0 };
|
|
1023
1023
|
this.sessions.set(session.id, item);
|
|
1024
1024
|
this.tasks.set(session.id, { completion: new CompletionTracker(), ended: -1, seq: -1, turn: 0, active: false, tools: /* @__PURE__ */ new Map(), approvals: /* @__PURE__ */ new Set(), questions: /* @__PURE__ */ new Set(), requests: /* @__PURE__ */ new Set(), celebrateUntil: 0 });
|
|
1025
1025
|
this.selected ??= session.id;
|
|
@@ -1066,8 +1066,16 @@ var PetModel = class {
|
|
|
1066
1066
|
}
|
|
1067
1067
|
const chunk = frame.chunk;
|
|
1068
1068
|
if (chunk.type === "text-delta" || chunk.type === "block-end" && chunk.block.type === "text") {
|
|
1069
|
-
|
|
1070
|
-
|
|
1069
|
+
const previousBlock = stream.blocks.get(chunk.index) ?? "";
|
|
1070
|
+
if (chunk.type === "text-delta") {
|
|
1071
|
+
stream.blocks.set(chunk.index, (previousBlock + chunk.text).slice(0, 1200));
|
|
1072
|
+
if (chunk.text.trim()) item.speechRevision++;
|
|
1073
|
+
} else if (chunk.block.type === "text") {
|
|
1074
|
+
const block = chunk.block.text.slice(0, 1200);
|
|
1075
|
+
stream.blocks.set(chunk.index, block);
|
|
1076
|
+
const text = block.trim();
|
|
1077
|
+
if (text && text !== previousBlock.trim()) item.speechRevision++;
|
|
1078
|
+
}
|
|
1071
1079
|
stream.text = [...stream.blocks.entries()].sort(([a], [b]) => a - b).map(([, text]) => text).join("\n").slice(0, 1200);
|
|
1072
1080
|
if (stream.text.trim()) {
|
|
1073
1081
|
if (!task.tools.size && !task.approvals.size) this.present(item, "talking", "\u6B63\u5728\u7EC4\u7EC7\u56DE\u590D\u2026");
|
|
@@ -1314,7 +1322,7 @@ var PetModel = class {
|
|
|
1314
1322
|
snapshot() {
|
|
1315
1323
|
const item = this.selected ? this.sessions.get(this.selected) : void 0;
|
|
1316
1324
|
this.settle();
|
|
1317
|
-
return { mood: item?.mood ?? "idle", text: item?.text ?? ready, sessionId: item?.id ?? null, revision: item?.revision ?? 0, active: item?.active ?? false, streaming: item?.streaming ?? false, speechId: item?.speechId ?? "", results: [...this.results.values()].map((r) => ({ ...r })), sessions: [...this.sessions.values()].map((s) => ({ ...s })) };
|
|
1325
|
+
return { mood: item?.mood ?? "idle", text: item?.text ?? ready, sessionId: item?.id ?? null, revision: item?.revision ?? 0, active: item?.active ?? false, streaming: item?.streaming ?? false, speechId: item?.speechId ?? "", speechRevision: item?.speechRevision ?? 0, results: [...this.results.values()].map((r) => ({ ...r })), sessions: [...this.sessions.values()].map((s) => ({ ...s })) };
|
|
1318
1326
|
}
|
|
1319
1327
|
};
|
|
1320
1328
|
function toolLabel(name2) {
|