dsh-plugin-maoxuan-pet 0.2.1 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.2.2 — 2026-11-01
4
+
5
+ 展示层维护版:README 从技术说明改成安装页,npm 页面的介绍随之更新。
6
+
7
+ ### 文档
8
+ - README 开头一句话说清是什么(对齐市场 PR #11067 的条目文案),之后按「安装 → 界面截图 → 四帧立绘 → 能力表 → 配置 → 语料 → 已知限制 → License」排列。
9
+ - 删掉架构图、Bubble 字段表、`template × axis` 矩阵、开发验证与踩坑记录;这些只在末尾链到 `docs/` 与 `verify/`。
10
+ - 删掉「已知限制」里的立绘生成说明与「逐字可辨」表述;素材记录统一放 `assets/PROVENANCE.md`,版权声明放 `NOTICE`。
11
+ - 截图与四帧立绘改用 GitHub raw 绝对地址(npm 页面同样能显示);`README.en.md` 同步同结构。
12
+ - `docs/RELEASE.md` 的当前版本同步到 `0.2.2`。
13
+
3
14
  ## 0.2.1 — 2026-11-01
4
15
 
5
16
  上架插件市场后的首个维护版:图标重做 + 整包瘦身 + 打包门禁补强。
package/README.en.md CHANGED
@@ -1,55 +1,46 @@
1
- # dsh-maoxuan-pet · Xiao Mao, the whale-girl desktop pet
1
+ # Xiao Mao, the whale-girl desktop pet — one essay an hour in the corner of DSH
2
2
 
3
- [![verify](https://github.com/yuna78/dsh-maoxuan-pet/actions/workflows/verify.yml/badge.svg)](https://github.com/yuna78/dsh-maoxuan-pet/actions/workflows/verify.yml) [![npm](https://img.shields.io/npm/v/dsh-plugin-maoxuan-pet.svg)](https://www.npmjs.com/package/dsh-plugin-maoxuan-pet)
4
-
5
- A floating pet living in the DeepSeek Harness (dsh) web shell. Every hour she reads one
6
- essay from *Selected Works of Mao Zedong*, turns it into **one ≤200-character nudge** for a
7
- founder — a verbatim quote or excerpt, one line of pressure in her own voice, and one rule
8
- with a way to verify it — and shows it in a red-book speech bubble.
9
-
10
- ![bubble](docs/screenshot-hero.png)
11
-
12
- > 中文说明见 [README.md](README.md)。
13
-
14
- ## What it does
15
-
16
- | Piece | Behaviour |
17
- |---|---|
18
- | Pet | 4 sprite frames (idle / talk / blink / read), draggable, position remembered |
19
- | Bubble | dark-red "book cover" with a gold spine; anchored to the **left** of the pet, so the pet never moves; `收起` / `再督促` are text-only buttons |
20
- | Reading | opening the card marks that bubble read — the unread badge disappears; the bubble you are reading never gets swapped out |
21
- | History | `‹ ›` walks back through previous bubbles; with nothing unread you still see the last one produced |
22
- | Timing | one generation per hour (`everySeconds`), quiet hours, `maxBubbles` history cap |
23
- | Preset | `maoxuan-pet` — a "Selected Works startup advisor" preset with the bundled corpus registered as the `maoxuan-vademecum` skill |
3
+ A red-book speech bubble plus four sprite frames: every card = a cited line from a Mao essay
4
+ (with source date) + one line of pressure for you + one rule you can verify today, capped at
5
+ **200 characters** in total.
24
6
 
25
7
  ## Install
26
8
 
27
9
  ```bash
28
10
  dsh plugin --profile web add dsh-plugin-maoxuan-pet
29
- # restart dsh web (Ctrl+C, then `dsh web` again), reload the page
11
+ # then restart dsh web (Ctrl+C, then `dsh web` again) and reload the page
30
12
  ```
31
13
 
32
- Requirements: dsh `>=0.2.1-rc.2 <0.3.0`, Node `^22.19.0 || >=24.0.0`. Web shell only.
14
+ Requirements: DSH `>=0.2.1-rc.2 <0.3.0`, Node `^22.19.0 || >=24.0.0`. Web shell only.
15
+ Source install / uninstall / troubleshooting: [docs/INSTALL.md](docs/INSTALL.md).
33
16
 
34
- ## How a bubble is produced
17
+ ## Screenshot
35
18
 
36
- ```
37
- everySeconds → pick next verified essay → template rotates quote/excerpt/summary
38
- → spawn `dsh --profile headless --json "<prompt>"` (60s-ish, one model call)
39
- → parse JSON {pua, lesson, axis, gist}
40
- → quote/excerpt must match the corpus verbatim, otherwise fall back to summary
41
- → fitLesson(): cite + pua + lesson ≤ 200 chars
42
- → persist to $DSH_HOME/storages/dsh-maoxuan-pet.json (atomic write)
43
- → client polls /api/dsh-maoxuan-pet.state every 20s
44
- ```
19
+ ![red-book bubble](https://raw.githubusercontent.com/yuna78/dsh-maoxuan-pet/main/docs/screenshot-hero.png)
20
+
21
+ The bubble hangs to the **left** of the pet, so the pet never moves. Opening the card marks it
22
+ read (the unread badge disappears); `‹ ›` walks back through history; `收起` / `再督促` are
23
+ text-only buttons. New bubbles pop up on the hour.
24
+
25
+ ## Xiao Mao
45
26
 
46
- If the model call fails (no credentials, timeout, non-JSON), the plugin degrades to a **local
47
- excerpt** and labels it `离线摘录` in the footer — it never invents a quote.
27
+ | standing | talking | blinking | reading |
28
+ |:--:|:--:|:--:|:--:|
29
+ | ![idle](https://raw.githubusercontent.com/yuna78/dsh-maoxuan-pet/main/assets/pet-idle.png) | ![talk](https://raw.githubusercontent.com/yuna78/dsh-maoxuan-pet/main/assets/pet-talk.png) | ![blink](https://raw.githubusercontent.com/yuna78/dsh-maoxuan-pet/main/assets/pet-blink.png) | ![read](https://raw.githubusercontent.com/yuna78/dsh-maoxuan-pet/main/assets/pet-read.png) |
48
30
 
49
- - Templates: `quote` (golden line) / `excerpt` (verbatim whole sentences) / `summary` (her own gist).
50
- - Lesson axes: 客户 customers / 项目 projects / 组织 organisation / 现金流 cash flow / 决策 decisions / 自律 self-discipline.
51
- - The 200-character cap is a hard invariant, not a suggestion: `fitLesson()` shrinks the lesson,
52
- never the quote.
31
+ The four frames share one canvas and one foot line, so switching never makes her jump. A
32
+ fan-made character; not affiliated with DeepSeek.
33
+
34
+ ## What it does
35
+
36
+ | Ability | Behaviour |
37
+ |---|---|
38
+ | **One essay an hour** | 33 bundled public-domain essays of Mao Zedong, rotated so she doesn't reread the last one; templates rotate between `quote` / `excerpt` / `summary` |
39
+ | **Never invents a quote** | `quote` / `excerpt` must match the corpus verbatim, otherwise she falls back to `summary`; if the model retells the original, the whole card is dropped |
40
+ | **Six angles** | customers / projects / organisation / cash flow / decisions / self-discipline — one per card, with a hard rule and a way to verify it |
41
+ | **You can ask back** | ships the `maoxuan-pet` ("Selected Works startup advisor") preset and the `maoxuan-vademecum` skill; start a new session and ask "given Mao, what should I do next?" |
42
+ | **Doesn't nag** | quiet hours (02:00–08:00 by default), daily cap (24), remembered position, unread badge clears only when read, `‹ ›` history |
43
+ | **Degrades gracefully** | no credentials / timeout / non-JSON → a local excerpt labelled 「离线摘录」, never passed off as model output |
53
44
 
54
45
  ## Config
55
46
 
@@ -60,24 +51,30 @@ excerpt** and labels it `离线摘录` in the footer — it never invents a quot
60
51
  everySeconds: 3600 # hourly
61
52
  firstDelaySeconds: 90
62
53
  quietHours: [2, 8] # no pings between 02:00 and 08:00 local time
54
+ dailyLimit: 24
63
55
  maxBubbles: 40
64
56
  headless: true # false = only local excerpts, zero model calls
57
+ dshBin: dsh
65
58
  profile: headless
66
59
  timeoutMs: 180000
67
60
  businessContext: "40, indie developer, small-tool SaaS"
68
61
  ```
69
62
 
70
- ## Verification
63
+ ## Corpus
71
64
 
72
- ```bash
73
- node verify/smoke.mjs # 24 structural checks
74
- node verify/contract.mjs # 38 pure-function tests
75
- node verify/host.test.mjs # 18 fake-ctx end-to-end tests (no network, no subprocess)
76
- node tools/audit-corpus-coverage.mjs # quote must be verbatim in all 33 essays
77
- npm pack --dry-run # 59 files / 1.3 MB, no .dsh-dev / assets/raw / verify
78
- ```
65
+ - 33 essays, all `verified: true`, covering volumes I–V;
66
+ - texts come from the [Chinese Marxist Internet Archive](https://www.marxists.org/chinese/maozedong/index.htm), bundled for personal study only;
67
+ - refresh / extend: `npm run corpus`;
68
+ - licensing and redistribution limits: [NOTICE](NOTICE) and [corpus/README.md](corpus/README.md).
79
69
 
80
- CI runs the same set on Node 22 and 24. See [verify/README.md](verify/README.md).
70
+ ## Known limitations
71
+
72
+ - web shell only (`dsh.client.platform: web`) — no pet in the terminal / TUI;
73
+ - the timer only runs while this `dsh web` process is alive; a stopped process does not catch up,
74
+ and on restart `nextRunAt` decides whether to run once more;
75
+ - each headless generation is a fresh session (no shared context): stable, but she "doesn't
76
+ remember what she said yesterday" — hence the last 6 nudges are passed into the prompt to avoid
77
+ repeats.
81
78
 
82
79
  ## License and third-party content
83
80
 
@@ -86,9 +83,15 @@ CI runs the same set on Node 22 and 24. See [verify/README.md](verify/README.md)
86
83
  [Chinese Marxist Internet Archive](https://www.marxists.org/chinese/maozedong/index.htm) and
87
84
  are bundled for personal study only. See [NOTICE](NOTICE). Delete `corpus/articles/` to drop it;
88
85
  quote/excerpt templates then degrade safely to summary.
89
- - **Sprites**: AI-generated (gpt-image-2), a fan-made "whale girl" character — not affiliated with
86
+ - **Sprites and icon** (`assets/`): a fan-made "whale girl" character — not affiliated with
90
87
  DeepSeek. See [assets/PROVENANCE.md](assets/PROVENANCE.md).
91
88
 
92
89
  This plugin is a reading/nudging tool that treats the essays as a source of product and
93
90
  entrepreneurship method. It is not affiliated with DeepSeek or any publisher, and it is not
94
91
  political advocacy.
92
+
93
+ ---
94
+
95
+ Package `dsh-plugin-maoxuan-pet` · [中文](README.md) · technical details in [docs/](docs/): [API-CONTRACT.md](docs/API-CONTRACT.md) · [CONTENT-FRAMEWORK.md](docs/CONTENT-FRAMEWORK.md) · [verify/README.md](verify/README.md)
96
+
97
+ [![verify](https://github.com/yuna78/dsh-maoxuan-pet/actions/workflows/verify.yml/badge.svg)](https://github.com/yuna78/dsh-maoxuan-pet/actions/workflows/verify.yml) [![npm](https://img.shields.io/npm/v/dsh-plugin-maoxuan-pet.svg)](https://www.npmjs.com/package/dsh-plugin-maoxuan-pet)
package/README.md CHANGED
@@ -1,117 +1,42 @@
1
- # dsh-maoxuan-pet · 鲸鱼娘·小毛
1
+ # 鲸鱼娘 · 小毛 —— 住在 DSH 右下角、每小时陪你读一篇毛选的桌宠
2
2
 
3
- [English](README.en.md) · 中文
4
-
5
- [![verify](https://github.com/yuna78/dsh-maoxuan-pet/actions/workflows/verify.yml/badge.svg)](https://github.com/yuna78/dsh-maoxuan-pet/actions/workflows/verify.yml) [![npm](https://img.shields.io/npm/v/dsh-plugin-maoxuan-pet.svg)](https://www.npmjs.com/package/dsh-plugin-maoxuan-pet)
6
-
7
- > 一只穿红军制服、抱着《毛泽东选集》的鲸鱼娘,住在 DSH 的 Web 界面右下角。
8
- > 每小时读一篇毛选,把它变成一句针对**你的**创业处境的思想 + 一句督促,
9
- > 并且随时可以开一个新会话问她:根据毛选,我这一步该怎么走。
10
-
11
- | 需求 | 实现 |
12
- |---|---|
13
- | 宠物形态、鲸鱼娘、红军制服、手捧毛选 | `assets/` 里 4 帧 AI 立绘(idle / talk / blink / read,256×539 RGBA,红封面竖排「毛泽东选集」可辨),`client.js` 在 `shell.overlay` 槽位渲染悬浮宠物 |
14
- | 每小时帮我读毛选 | Host 定时器按小时读 `corpus/` 里的下一篇(轮转、避开刚读过的) |
15
- | 每小时生成思想 / PUA 我的话,出现在气泡里 | 每次生成 `spawn` 一个 `dsh --profile headless` 对话,拿到结构化 JSON 后推给气泡 |
16
- | 有个 preset,能直接问「根据毛选我该怎么做」 | `maoxuan-pet`「毛选创业参谋」preset + 运行时注册的 `maoxuan-vademecum` skill 指向内置语料 |
17
-
18
- ## 它到底怎么工作
19
-
20
- ```
21
- ┌─ DSH Web (dsh web) ───────────────────────────────────────────┐
22
- │ │
23
- │ index.js (Host) │
24
- │ ├─ 状态:$DSH_HOME/storages/dsh-maoxuan-pet.json (原子写) │
25
- │ ├─ 定时器:ctx.timeout 链 → quietHours / dailyLimit 约束 │
26
- │ ├─ 语料:corpus/index.json → 轮转挑一篇 verified 的 │
27
- │ ├─ 生成:spawn `dsh --profile headless --json "<prompt>"` │
28
- │ │ └ 失败/超时/非 JSON → 本地摘录降级(标注“离线摘录”) │
29
- │ ├─ 路由:/api/dsh-maoxuan-pet.{state,generate,dismiss, │
30
- │ │ asset,corpus} │
31
- │ └─ skill:把 corpus/ 注册成 maoxuan-vademecum │
32
- │ │
33
- │ client.js (Web) │
34
- │ └─ shell.overlay → 宠物 + 气泡,20s 轮询 / 生成中 3s 轮询 │
35
- │ │
36
- │ cordis.patch.yml │
37
- │ ├─ 插件行 dsh-maoxuan-pet │
38
- │ └─ preset-maoxuan-pet「毛选创业参谋」(persona + skill + 工具) │
39
- └───────────────────────────────────────────────────────────────┘
40
- ```
41
-
42
- 气泡里的每条内容都是**结构化**的,而且**整条不超过 200 字**:
43
-
44
- | 字段 | 含义 |
45
- |---|---|
46
- | `template` | 三种模板轮转:`quote` 金句 / `excerpt` 文章节选 / `summary` 小毛概括 |
47
- | `cite` | 上面那一句(逐字核对过;`summary` 是小毛的概括,不加引号),带来源链接 |
48
- | `axis` | 启示落点,六选一:客户 / 项目 / 组织 / 现金流 / 决策 / 自律 |
49
- | `pua` | 小毛对你说的一句话(≤40 字,第一人称;**模型复述原文时会整条丢弃**,气泡只留引文 + 启示) |
50
- | `lesson` | 启示:一条硬规则 + 怎么验证(≤100 字,围绕 `axis`) |
51
- | `chars` | 引文 + pua + 启示的实际字数,Host 保证 ≤200 |
52
- | `mode` | `headless` = 模型生成;`offline` = 本地摘录降级(UI 会标「离线摘录」) |
53
-
54
- 框架是这样设计的(`template × axis` 矩阵,而不是每次同一套):
55
-
56
- ```
57
- 取材 3 种:原文金句 / 文章节选(逐字取整句)/ 小毛概括(模型自己概括)
58
- 落点 6 种:客户 · 项目 · 组织 · 现金流 · 决策 · 自律
59
- 语气 3 种:sharp 硬话 · calm 冷静 · urgent 催
60
- ```
61
-
62
- - 模板游标 `templateCursor` 持久化在状态里,按 3 种循环;不会因为历史条数封顶而卡住;
63
- - `axis` 在 prompt 里指定,并尽量避开上一条的落点;
64
- - 引文句式/节选都在 `corpus/articles/<id>.md` 里做 `isVerbatim` 逐字校验,校验不过就退到 `summary`,绝不编造;
65
- - 所有字段最后过一遍 `fitLesson`,把「引文 + pua + 启示」压进 200 字。
66
-
67
- 为什么落点是 6 类名词、而「动作」不单列一类、字数预算怎么分、真实生成样例长什么样,
68
- 见 [docs/CONTENT-FRAMEWORK.md](docs/CONTENT-FRAMEWORK.md)。语料能不能支撑 Quote 模板,跑一条审计就知道:
69
-
70
- ```bash
71
- node tools/audit-corpus-coverage.mjs # 33 篇:金句逐字命中 33/33,节选可用 32/33
72
- ```
73
-
74
- ### 界面行为(这一版按用户逐条反馈定的)
75
-
76
- (效果图见下方[「长什么样」](#长什么样))
77
-
78
- - **红皮书卡片**:深红封面 + 烫金书脊,正文米白;卡片里不出现蓝/紫/绿,落点 chip 用同一族暖金。滚动条也换成烫金滑块 + 深红轨道。
79
- - **宠物不动**:卡片绝对定位在宠物左侧(宠物被拖到靠左边缘时自动翻到右侧),点开/收起只让气泡出现或消失,宠物坐标不变。
80
- - **打开即已读**:卡片真正显示的那一刻才把这条标已读,宠物右上角的未读数随之消失;正在读的那条会被"钉住",Host 把 `current` 推进到下一条时,眼前的文字不会跳。
81
- - **没有未读也有内容**:全部读过后再点开,仍然停在上一次产出的那张卡,`‹ ›` 可以往前翻历史。
82
- - **定时弹出**:整点生成的新气泡会自己弹出来;手动关掉的那条不会自己再弹,等下一条。
83
- - **按钮无盒子**:`收起` / `再督促` 是纯文字 + 下划线,没有背景和边框。
3
+ 红皮书气泡 + 四帧立绘;每条内容 = 原文引文(带来源日期)+ 一句说给你听的督促 + 一条能当天验证的启示,整条 ≤ 200 字。
84
4
 
85
5
  ## 安装
86
6
 
87
- 从 npm(推荐):
88
-
89
7
  ```bash
90
8
  dsh plugin --profile web add dsh-plugin-maoxuan-pet
91
- # 然后 Ctrl+C 停掉 dsh web,再重新 `dsh web`,刷新页面
92
9
  ```
93
10
 
94
- 从源码(本目录):
11
+ 装完按 **Ctrl+C 停掉 `dsh web`,再重新 `dsh web`**,刷新页面——右下角就有小毛了。
95
12
 
96
- ```bash
97
- node install.mjs --dry-run # 先看要改什么
98
- node install.mjs # 写入 profile 清单 + pnpm link
99
- ```
13
+ - 要求:DSH `>=0.2.1-rc.2 <0.3.0`、Node `^22.19.0 || >=24.0.0`,仅 Web 界面;
14
+ - 从源码安装、卸载、排错:[docs/INSTALL.md](docs/INSTALL.md)。
100
15
 
101
- 两种方式装完都要**手动重启** `dsh web`(Ctrl+C 后重新 `dsh web`),刷新页面。
16
+ ## 界面
102
17
 
103
- 完整步骤、回滚、排错见 [docs/INSTALL.md](docs/INSTALL.md);内部接口见 [docs/API-CONTRACT.md](docs/API-CONTRACT.md)。
18
+ ![红皮书气泡](https://raw.githubusercontent.com/yuna78/dsh-maoxuan-pet/main/docs/screenshot-hero.png)
104
19
 
105
- ### 长什么样
20
+ 深红封面 + 烫金书脊的气泡挂在宠物左边,宠物自己不动;打开即已读(右上角未读数消失),`‹ ›` 可以往回翻历史,`收起` / `再督促` 是纯文字按钮。整点生成的新气泡会自己弹出来。
106
21
 
107
- ![红皮书气泡](docs/screenshot-hero.png)
22
+ ## 小毛
108
23
 
109
- 深红封面 + 烫金书脊的气泡挂在宠物左侧,宠物自己不动;打开即已读(右上角未读数消失),
110
- `‹ ›` 可以往回翻历史;定时生成的新气泡会自己弹出来,`收起` / `再督促` 是纯文字按钮。
24
+ | 站着 | 说话 | 眨眼 | 看书 |
25
+ |:--:|:--:|:--:|:--:|
26
+ | ![idle](https://raw.githubusercontent.com/yuna78/dsh-maoxuan-pet/main/assets/pet-idle.png) | ![talk](https://raw.githubusercontent.com/yuna78/dsh-maoxuan-pet/main/assets/pet-talk.png) | ![blink](https://raw.githubusercontent.com/yuna78/dsh-maoxuan-pet/main/assets/pet-blink.png) | ![read](https://raw.githubusercontent.com/yuna78/dsh-maoxuan-pet/main/assets/pet-read.png) |
111
27
 
112
- 截图由 `scripts/hero-shot.mjs` 生成(需要本地 headless Chrome + 一个 dsh web 实例),
113
- 换版式时重拍即可。
28
+ 四帧切换时身体不跳(共用同一画布与脚底线)。民间同人设定,与 DeepSeek 官方无关。
114
29
 
30
+ ## 它能做什么
31
+
32
+ | 能力 | 说明 |
33
+ |---|---|
34
+ | **每小时读一篇** | 内置 33 篇毛选公开语料,轮转挑一篇没刚读过的;`quote` 金句 / `excerpt` 节选 / `summary` 小毛概括 三种模板轮转 |
35
+ | **不编造原文** | `quote` / `excerpt` 必须逐字命中语料全文,不命中就降级成 `summary`;模型复述原文会被识别并整条丢弃 |
36
+ | **六个落点** | 客户 / 项目 / 组织 / 现金流 / 决策 / 自律——每次只给一个,配「一条硬规则 + 怎么验证」 |
37
+ | **能追问** | 自带 `maoxuan-pet`(毛选创业参谋)preset 与 `maoxuan-vademecum` skill,可开新会话问「根据毛选,我这一步该怎么走」 |
38
+ | **不打扰** | 免打扰时段(默认 02:00–08:00)、每日上限(默认 24 条)、位置本地记忆、已读才消徽标、`‹ ›` 可回翻 |
39
+ | **掉线也不空转** | 无凭据 / 超时 / 非 JSON 时降级为本地摘录,并在页脚标注「离线摘录」,不冒充模型生成 |
115
40
 
116
41
  ## 配置
117
42
 
@@ -132,65 +57,28 @@ node install.mjs # 写入 profile 清单 + pnpm link
132
57
  用户是一位正在创业的独立开发者……
133
58
  ```
134
59
 
135
- ## 用 preset 问「根据毛选我应该怎么做」
136
-
137
- 新建会话 → preset 选 **「毛选创业参谋」**(id `maoxuan-pet`)→ 直接问。它会:
138
-
139
- 1. 加载 `maoxuan-vademecum` skill(知道语料在哪、怎么检索);
140
- 2. 用 `read` 打开对应篇目**全文**,取逐字原文;
141
- 3. 按固定结构回答:原文金句(篇名 + 时间)→ 当时的问题与论证 → 方法 → 你的处境 → 今天能做的一步;
142
- 4. 核不到原文就明说,不编造。
143
-
144
- `maoxuan-vademecum` skill 是运行时由 Host 注册的(内容来自 `skill/maoxuan-vademecum/SKILL.md` + 语料索引),所以它永远指向当前安装目录,不写死路径。
145
-
146
60
  ## 毛选语料
147
61
 
148
- - **33 篇,全部 `verified: true`**,覆盖第一至第五卷(目录页实际解析出 329 篇,按“与创业最相关”白名单取 33 篇全文);
149
- - 来源:中文马克思主义文库公开电子文本(https://www.marxists.org/chinese/maozedong/index.htm),GB2312 页面按 gb18030 解码,逐篇记录 URL 与抓取时间;
150
- - 结构:`corpus/index.json` 索引 + `corpus/articles/<id>.md` 全文;每条带 `quote`(逐字核对)、`summary`、`businessAngle`、`verified`;
151
- - 重新抓取 / 扩充:`npm run corpus`(见 `scripts/fetch-corpus.mjs`);
152
- - 版权:文本版权归原权利人,此处仅用于个人学习研究,不用于售卖,详见 `corpus/README.md` 与 `LICENSE`。
153
-
154
- ## 开发与验证
155
-
156
- ```bash
157
- npm test # node verify/smoke.mjs
158
- npm run test:contract
159
- node verify/host.test.mjs # 假 ctx 端到端:路由、状态、降级、原子写
160
- node --check index.js
161
- node --check client.js
162
- ```
163
-
164
- 验证边界见 [verify/README.md](verify/README.md):单元与端到端测试不联网、不启动子进程、不花模型调用。
165
-
166
- 真实链路另做过一次隔离启动验证(`DSH_HOME=/tmp/... dsh web --port 3099`,不碰当前 GUI 的 profile):
167
-
168
- | 验证 | 结果 |
169
- |---|---|
170
- | `--dump-config` 组装 | 插件行与 `preset-maoxuan-pet` 都在组合后的配置里 |
171
- | `GET /api/dsh-maoxuan-pet.state` | 200,`corpus.count=33`,`nextRunAt` 已排定 |
172
- | `GET /api/dsh-maoxuan-pet.asset?name=idle` | 200,`image/png`,256×539 RGBA |
173
- | 页面 boot payload | 含 `dsh-plugin-maoxuan-pet/client.js`,实际拉到的 bundle 里含本插件代码且可解析 |
174
- | `POST /api/dsh-maoxuan-pet.generate`(真实 headless) | 61s,`mode: "headless"`,返回结构化气泡(篇名/金句/思想/启示/督促/动作) |
175
- | 失败降级 | 无凭据时 5.5s 内降级为 `mode: "offline"` 并写入 `lastError` |
176
-
177
- ### 两个真实踩到的坑(已在 docs/API-CONTRACT.md §6 详述)
178
-
179
- 1. 自定义路由必须显式 `requestBody: 'buffered'`,否则 GET 会被 Host 直接 400、handler 不被调用;
180
- 2. `ctx.timeout()` 必须在 `inject` 里声明 `'timer'`,否则真实 `dsh web` 启动 fatal。
62
+ - **33 篇,全部 `verified: true`**,覆盖第一至第五卷;
63
+ - 来源:中文马克思主义文库公开电子文本(https://www.marxists.org/chinese/maozedong/index.htm),仅作个人学习、研究之用;
64
+ - 重新抓取 / 扩充:`npm run corpus`;
65
+ - 版权与再分发限制见 [NOTICE](NOTICE) 和 [corpus/README.md](corpus/README.md)。
181
66
 
182
67
  ## 已知限制
183
68
 
184
- - 只支持 Web 界面(`dsh.client.platform: web`),终端/TUI 里没有宠物;
69
+ - 只支持 Web 界面(`dsh.client.platform: web`),终端 / TUI 里没有宠物;
185
70
  - 定时器只在这个 `dsh web` 进程活着时走;进程停了不会补跑,重启后按 `nextRunAt` 决定是否补一次;
186
- - headless 生成每次是一个独立会话(不复用上下文),好处是稳定、坏处是“它不记得昨天说过什么”——所以 prompt 里带了最近 6 条督促用来避免重复;
187
- - 生图是 AI 生成,中文“毛泽东选集”可能不是逐字可辨,详见 `assets/PROVENANCE.md`;
188
- - DeepSeek「鲸鱼娘」是民间同人设定,本项目不是官方素材,也不代表 DeepSeek 立场。
71
+ - headless 生成每次是独立会话(不复用上下文):稳定,但「不记得昨天说过什么」——所以 prompt 里带最近 6 条督促来避免重复。
189
72
 
190
73
  ## License
191
74
 
192
75
  - **代码**:MIT,见 [LICENSE](LICENSE)。
193
- - **内置毛选语料**(`corpus/`):**不是 MIT**。文本来自[中文马克思主义文库·毛泽东](https://www.marxists.org/chinese/maozedong/index.htm),著作权归原作者与出版方,
194
- 本项目仅作个人学习、研究之用的整理,不构成再出版或商业授权。详见 [NOTICE](NOTICE) 与 [corpus/README.md](corpus/README.md)。
195
- - **立绘**(`assets/`):AI 生成(gpt-image-2,2026-10-31),民间同人形象「鲸鱼娘·小毛」,与 DeepSeek 官方无关。生成记录见 [assets/PROVENANCE.md](assets/PROVENANCE.md)。
76
+ - **内置毛选语料**(`corpus/`):**不是 MIT**。文本来自[中文马克思主义文库·毛泽东](https://www.marxists.org/chinese/maozedong/index.htm),著作权归原作者与出版方,本项目仅作个人学习、研究之用的整理,不构成再出版或商业授权。详见 [NOTICE](NOTICE) 与 [corpus/README.md](corpus/README.md)。
77
+ - **立绘与图标**(`assets/`):民间同人形象「鲸鱼娘·小毛」,与 DeepSeek 官方无关;素材记录见 [assets/PROVENANCE.md](assets/PROVENANCE.md)。
196
78
  - 本项目与 DeepSeek、毛泽东著作出版方均无隶属关系;内容用于产品与创业方法论的阅读辅助,不作政治宣传。
79
+
80
+ ---
81
+
82
+ 包名 `dsh-plugin-maoxuan-pet` · [English](README.en.md) · 技术细节(架构、接口契约、内容规范、验证方式)见 [docs/](docs/):[API-CONTRACT.md](docs/API-CONTRACT.md) · [CONTENT-FRAMEWORK.md](docs/CONTENT-FRAMEWORK.md) · [verify/README.md](verify/README.md)
83
+
84
+ [![verify](https://github.com/yuna78/dsh-maoxuan-pet/actions/workflows/verify.yml/badge.svg)](https://github.com/yuna78/dsh-maoxuan-pet/actions/workflows/verify.yml) [![npm](https://img.shields.io/npm/v/dsh-plugin-maoxuan-pet.svg)](https://www.npmjs.com/package/dsh-plugin-maoxuan-pet)
package/docs/RELEASE.md CHANGED
@@ -8,7 +8,7 @@
8
8
  | 项 | 现状(2026-11-01 核对) |
9
9
  |---|---|
10
10
  | 包名 | `dsh-plugin-maoxuan-pet`(unscoped,npm 上未占用) |
11
- | 版本 | `0.2.1` |
11
+ | 版本 | `0.2.2` |
12
12
  | 代码许可 | MIT(`LICENSE`);语料与立绘的非 MIT 声明见 `NOTICE` |
13
13
  | 打包清单 | `npm pack --dry-run` → 59 files / 1.26 MB(含 33 篇语料;0.2.1 起立绘降到 256×539,包体从 4.2 MB 降下来) |
14
14
  | GitHub 账号 | `gh auth status` → `yuna78`(scopes 含 `repo`) |
@@ -93,7 +93,7 @@ cd .. && node build-registry.mjs --write # 重算 registry.json / README 表
93
93
  node -e "const r=require('./registry.json');console.log(r.plugins.find(p=>p.name==='dsh-plugin-maoxuan-pet'))"
94
94
  ```
95
95
 
96
- 期望字段:`openSource: true`、`npm: "0.2.1"`、`market: { title: "yuna78/dsh-maoxuan-pet", version: "0.2.1" }`。
96
+ 期望字段:`openSource: true`、`npm: "0.2.2"`、`market: { title: "yuna78/dsh-maoxuan-pet", version: "0.2.2" }`。
97
97
 
98
98
  ## 5. 版本号规则
99
99
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-maoxuan-pet",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "DSH 悬浮宠物「鲸鱼娘·小毛」:每小时读一篇毛选,给创业中的你说一句能动手的督促;内置毛选公开语料与 maoxuan-pet preset。",
5
5
  "keywords": [
6
6
  "dsh",