dsh-bat-think 0.0.0-stage → 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 the dsh-bat-think authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE.md ADDED
@@ -0,0 +1,15 @@
1
+ # Notice
2
+
3
+ This plugin bundles **fan art of Batman**.
4
+
5
+ - Batman and related characters, names and logos are trademarks of DC Comics
6
+ (Warner Bros. Discovery). They are not covered by this repository's MIT
7
+ license.
8
+ - The artwork in `assets/` is an original fan drawing by the plugin author. It
9
+ is not an official DC asset, and nothing here is affiliated with, endorsed
10
+ by, or sponsored by DC Comics or Warner Bros. Discovery.
11
+ - The MIT license covers the plugin code only. If you fork or redistribute the
12
+ artwork, keep this notice and respect DC's rights in the character.
13
+ - This plugin is a personal fan project. It reads only the local DeepSeek
14
+ Harness session data it needs (running state, token usage) and sends nothing
15
+ anywhere.
package/README.md CHANGED
@@ -1,3 +1,83 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # dsh-bat-think
2
+
3
+ A Batman desktop pet for the DeepSeek Harness Web GUI. It lives in the
4
+ frame-wide `shell.overlay` seat: it floats above the conversation without
5
+ covering controls, and only its own pixels take pointer events.
6
+
7
+ ![Batman at his laptop with a thought bubble](https://raw.githubusercontent.com/kuoci/dsh-bat-think/main/assets/screenshots/preview.png)
8
+
9
+ ## What it does
10
+
11
+ - **Idle:** Batman works at his laptop (`idle.png`) and breathes gently.
12
+ - **Thinking:** while an Agent is running it switches to the mouse-in-hand
13
+ frame (`thinking.png`) and shows a bouncing three-dot thought bubble. Both
14
+ revert when the run ends.
15
+ - **Clicks:** while idle it says one of the `sayings` (`阿尔弗雷德!` /
16
+ `正在归档……` / `我要夜巡了`). While the Agent runs, a click hides the bubble
17
+ and says `thinkingAck` (「稍等」); the bubble returns a few seconds later if
18
+ the run is still going.
19
+ - **API usage:** click the laptop to open a small card with the current model,
20
+ output / input / cache-read tokens, context occupancy, and a total across
21
+ loaded sessions. Click the laptop again or `×` to close it.
22
+ - **Stickers:** the dice button in the hover toolbar puts a random accessory
23
+ from `assets/accessories/` on the pet. Accessories share the artwork's
24
+ 512×512 canvas, so they land exactly where they were drawn, and they breathe,
25
+ drag and scale with the pet. Clicking a sticker's pixels removes it.
26
+ - **Placement:** drag the pet anywhere (remembered); hover for `−` / `+` to
27
+ resize (96–320 px) and `×` to tuck it into a small round chip.
28
+
29
+ ## Install
30
+
31
+ From the DSH CLI:
32
+
33
+ ```bash
34
+ dsh plugin --profile <your-profile> add dsh-bat-think
35
+ ```
36
+
37
+ Or open **Plugins → Add plugin** in the GUI and give it `dsh-bat-think`, then
38
+ refresh the window (Ctrl+R). The pet appears in the bottom-right corner.
39
+
40
+ Requires a DSH release whose Web GUI has the `shell.overlay` slot (the
41
+ `@deepseek-ai/dsh-client-ui-layout` package). No build step: the bundle ships
42
+ plain ES modules and PNGs.
43
+
44
+ ## Customize without code
45
+
46
+ Everything the pet shows comes from `assets/`:
47
+
48
+ | File | When it shows |
49
+ | --- | --- |
50
+ | `assets/idle.png` | normal |
51
+ | `assets/thinking.png` | while an Agent is running |
52
+ | `assets/accessories/*.png` | picked by the dice |
53
+
54
+ - Both frames should be transparent PNGs on the same canvas, with the character
55
+ aligned, so switching does not jump.
56
+ - `assets/pet.json` holds the display name, default width (`size`), speech lines
57
+ (`sayings`, `thinkingAck`), the accessory list, and the `canvas` contract:
58
+ `{ "width": 512, "height": 512, "crop": [left, top, width, height] }` records
59
+ which part of the 512×512 canvas the frames crop, which is what lets
60
+ accessories land at their drawn position. If you replace the frames with an
61
+ uncropped 512×512 image, set `crop` to `[0, 0, 512, 512]`.
62
+ - Drop a new PNG into `assets/accessories/` and restart DSH: the folder is
63
+ scanned at runtime. Without a restart, add the filename to `accessories` in
64
+ `pet.json`.
65
+
66
+ ## Layout
67
+
68
+ - `index.js` — Host half: serves `assets/` at `/dsh-bat-think/*`, plus a live
69
+ JSON listing of `assets/accessories/`.
70
+ - `client.js` — Client half: the `shell.overlay` entry, the pet component, the
71
+ thought bubble, the usage card and the sticker layer.
72
+ - `cordis.patch.yml` — inserts the `dsh-bat-think` plugin row.
73
+
74
+ ## Remove
75
+
76
+ Disable **Batman desktop pet** in Settings → Plugins, or remove the bundle. The
77
+ pet keeps only local UI state: `dsh-bat-think:position`, `:size`, `:collapsed`,
78
+ `:accessory` in `localStorage` and `:greeted` in `sessionStorage`.
79
+
80
+ ## License
81
+
82
+ MIT for the code. The character art is fan art and is **not** covered by the
83
+ MIT license — see [NOTICE.md](NOTICE.md).
package/README.zh.md ADDED
@@ -0,0 +1,52 @@
1
+ # dsh-bat-think
2
+
3
+ 一只住在 DeepSeek Harness Web GUI 里的蝙蝠侠桌宠。它挂在整窗的 `shell.overlay` 层上,浮在对话区之上,只有自己身体范围会接收鼠标。
4
+
5
+ ![敲着电脑、头顶冒着思考气泡的蝙蝠侠](https://raw.githubusercontent.com/kuoci/dsh-bat-think/main/assets/screenshots/preview.png)
6
+
7
+ ## 会做什么
8
+
9
+ - **日常**:敲电脑(`idle.png`),轻轻呼吸;
10
+ - **思考**:Agent 在跑(回复、调工具)时换成拿鼠标那张(`thinking.png`),头顶冒三点跳动的思考气泡,跑完自动变回;
11
+ - **点击**:空闲时随机说一句 `sayings`(阿尔弗雷德!/ 正在归档…… / 我要夜巡了);思考时点击先收起气泡、改说「稍等」,几秒后还在跑就把气泡换回来;
12
+ - **API 用量**:点它脚边的电脑弹出小面板——当前模型、输出 / 输入 / 缓存读取 token、上下文占用,以及已加载会话的合计;再点电脑或点 `×` 关闭;
13
+ - **配件**:悬停工具栏里的骰子会从 `assets/accessories/` 随机戴一个贴纸。配件和立绘共用 512×512 画布,所以**按原坐标贴合**,并跟着立绘一起呼吸、拖动、缩放;点贴纸图案本身摘掉;
14
+ - **摆放**:拖动换位置(记住);悬停 `−` / `+` 调大小(96–320 px),`×` 收成小圆头像。
15
+
16
+ ## 安装
17
+
18
+ ```bash
19
+ dsh plugin --profile <你的 profile> add dsh-bat-think
20
+ ```
21
+
22
+ 或在图形界面里 **插件 → 添加插件**,填 `dsh-bat-think`,然后刷新窗口(Ctrl+R)。宠物会出现在右下角。
23
+
24
+ 要求宿主的 Web GUI 提供 `shell.overlay` 插槽(即装有 `@deepseek-ai/dsh-client-ui-layout`)。无需构建:包里就是普通 ES 模块和 PNG。
25
+
26
+ ## 不改代码的定制
27
+
28
+ 所有画面都来自 `assets/`:
29
+
30
+ | 文件 | 什么时候显示 |
31
+ | --- | --- |
32
+ | `assets/idle.png` | 平时 |
33
+ | `assets/thinking.png` | Agent 在跑时 |
34
+ | `assets/accessories/*.png` | 骰子随机挑 |
35
+
36
+ - 两张立绘用同一块画布、透明 PNG、角色对齐,切换才不会跳;
37
+ - `assets/pet.json` 里是名字、默认宽度(`size`)、台词(`sayings`、`thinkingAck`)、配件列表,以及 `canvas` 契约:`{ "width": 512, "height": 512, "crop": [左, 上, 宽, 高] }` 记录立绘是从 512×512 画布哪一块裁出来的——配件就是靠它对齐的。如果你换成不裁的 512×512 整图,把 `crop` 改成 `[0, 0, 512, 512]`;
38
+ - 新配件:PNG 丢进 `assets/accessories/`,重启 DSH 后会自动扫描;不想重启就在 `pet.json` 的 `accessories` 里加文件名。
39
+
40
+ ## 结构
41
+
42
+ - `index.js` —— Host 半部分:把 `assets/` 挂到 `/dsh-bat-think/*`,并提供配件目录的实时 JSON 列表;
43
+ - `client.js` —— Client 半部分:`shell.overlay` 插槽、宠物组件、思考气泡、用量面板、贴纸层;
44
+ - `cordis.patch.yml` —— 插入 `dsh-bat-think` 插件行。
45
+
46
+ ## 卸载
47
+
48
+ 设置 → 插件 → 关掉「蝙蝠侠桌宠」,或移除 bundle。插件只在本地存了几个 UI 状态:`dsh-bat-think:position`、`:size`、`:collapsed`、`:accessory`(`localStorage`)和 `:greeted`(`sessionStorage`)。
49
+
50
+ ## 许可
51
+
52
+ 代码 MIT;角色立绘是饭制同人画,**不在 MIT 覆盖范围内**,见 [NOTICE.md](NOTICE.md)。
Binary file
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "蝙蝠侠",
3
+ "size": 132,
4
+ "frames": {
5
+ "idle": [
6
+ "idle.png"
7
+ ],
8
+ "thinking": [
9
+ "thinking.png"
10
+ ]
11
+ },
12
+ "fps": {
13
+ "idle": 3
14
+ },
15
+ "sayings": [
16
+ "阿尔弗雷德!",
17
+ "正在归档……",
18
+ "我要夜巡了"
19
+ ],
20
+ "thinkingAck": "稍等",
21
+ "accessories": [
22
+ "super-shield.png",
23
+ "grapple-rope.png"
24
+ ],
25
+ "canvas": {
26
+ "width": 512,
27
+ "height": 512,
28
+ "crop": [
29
+ 130,
30
+ 84,
31
+ 247,
32
+ 353
33
+ ]
34
+ }
35
+ }
Binary file