dsh-paofu-console 0.0.0-stage → 1.0.5

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 泡芙 / Paofu
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/README.md CHANGED
@@ -1,3 +1,166 @@
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-paofu-console)
2
+
3
+ **DeepSeek Harness 插件版**。装上以后 DSH 里多一个地址:
4
+
5
+ ```
6
+ <你的 DSH 地址>/dsh-paofu-console/
7
+ ```
8
+
9
+ 打开就是整块状态台:在线状态、未读数、用量与余额、表情库、记忆、小说、技能、承诺、时间线。
10
+
11
+ - **零依赖**,纯 Node 标准库,`npm install` 都不用跑
12
+ - **自带数据服务**:插件自己在本机回环起一个服务(默认端口 9896),不用另开命令行
13
+ - **只读**:不调用模型、不改文件(只有「刷新」和表情上传会动自己的 `data/`)
14
+ - 没有桥接也能跑,只是在线、未读那几块空着
15
+
16
+ ---
17
+
18
+ ## 最省事:把一句话贴给 DSH
19
+
20
+ 解压后,在 **DSH 里新建一个对话**,把下面这段原样贴进去,把尖括号换成你解压出来的实际位置:
21
+
22
+ > 我解压了一个 DSH 插件 `dsh-paofu-console` 在 `<把解压后的完整路径贴这里>`。
23
+ > 帮我:1)复制到我当前的 DSH profile 的 `node_modules` 下;2)在 profile 的 `package.json` 里把
24
+ > `dsh-paofu-console` 加进 `dependencies` 和 `dsh.profile.bundles`;3)重启后告诉我
25
+ > `<DSH地址>/dsh-paofu-console/` 能不能打开、有没有报错。
26
+
27
+ DSH 会自己找 profile、改包清单、重启验证。人只需要看最后一句结果。
28
+
29
+ **如果 DSH 说找不到 profile**,把下面这句也贴给它:
30
+
31
+ > 用 `dsh doctor`,或者看一眼 `%USERPROFILE%\.dsh\profiles` 下面有哪些目录,挑里面有 `package.json` 和 `node_modules` 的那个。
32
+
33
+ 下面是手动装的完整步骤,装不上时对着查。
34
+
35
+ ---
36
+
37
+ ## 手动安装
38
+
39
+ ### 第一步:确认 Node 版本
40
+
41
+ ```bash
42
+ node -v
43
+ ```
44
+
45
+ 要 **20 或更高**。没有的话去 <https://nodejs.org> 装 LTS 版。
46
+
47
+ ### 第二步:找到你的 DSH profile 目录
48
+
49
+ 一般在这两个位置之一:
50
+
51
+ ```
52
+ %USERPROFILE%\.dsh\profiles\desktop
53
+ %USERPROFILE%\.dsh\profiles\web
54
+ ```
55
+
56
+ 看哪个目录里有 `package.json` 和 `node_modules` 就是它(桌面版通常是 `desktop`)。
57
+
58
+ ### 第三步:放进 node_modules
59
+
60
+ 把整个 `dsh-paofu-console` 文件夹复制到:
61
+
62
+ ```
63
+ <profile目录>\node_modules\dsh-paofu-console\
64
+ ```
65
+
66
+ **或者**直接交给 DeepSeek Harness 处理,把下面这段话贴给它:
67
+
68
+ > 我解压了一个 DSH 插件 `dsh-paofu-console` 在 `<路径>`,帮我用 npm/软链接装进当前的 DSH profile,
69
+ > 然后在 `~/.dsh/profiles/<profile>/package.json` 的 `dependencies` 里加这个包,
70
+ > 并把它加进 `dsh.profile.bundles` 数组。
71
+
72
+ ### 第四步:让 profile 认识它
73
+
74
+ 打开 `<profile目录>\package.json`,改两个地方:
75
+
76
+ ```json
77
+ {
78
+ "dependencies": {
79
+ "dsh-paofu-console": "1.0.5"
80
+ },
81
+ "dsh": {
82
+ "profile": {
83
+ "bundles": [
84
+ "...其它插件",
85
+ "dsh-paofu-console"
86
+ ]
87
+ }
88
+ }
89
+ }
90
+ ```
91
+
92
+ ### 第五步:重启 DSH
93
+
94
+ 桌面版一般会热加载;没反应就完全退出再开一次。
95
+
96
+ ---
97
+
98
+ ## 验证装好了没
99
+
100
+ 启动 DSH 后,控制台里应该出现:
101
+
102
+ ```
103
+ [paofu-console] 数据服务 http://<回环地址>:9896
104
+ ```
105
+
106
+ 然后访问(端口换成你 DSH 实际用的):
107
+
108
+ ```bash
109
+ curl -s -o /dev/null -w '%{http_code}\n' '<你的 DSH 地址>/dsh-paofu-console/'
110
+ ```
111
+
112
+ `200` 就是成了。
113
+
114
+ ---
115
+
116
+ ## 想让它显示真实的 QQ 桥接数据
117
+
118
+ 看包里的 `接上桥接.md`。核心是一句话:**桥接不在就用示例数据,不报错**。
119
+
120
+ 数据服务会读这些位置:
121
+
122
+ | 面板上的东西 | 读的路径 |
123
+ | --- | --- |
124
+ | 在线、未读数、谁最近说过话 | `<桥接>/api/status` |
125
+ | 会话列表 | `<桥接>/state/social-v2.json` |
126
+ | 日记 | `<桥接>/state/diary/*.md` |
127
+ | 表情库 | `<桥接>/memes/` |
128
+ | 语音 | `<桥接>/audio/` |
129
+ | 用量、余额 | `<桥接>/scripts/` 里的四个导出脚本 |
130
+
131
+ ## 环境变量(都可选)
132
+
133
+ | 变量 | 默认 | 作用 |
134
+ | --- | --- | --- |
135
+ | `PAFU_BRIDGE` | 自动找(家目录 / 文档 / 当前目录) | 桥接根目录 |
136
+ | `PAFU_BRIDGE_PORT` | 桥接的默认口 | 桥接的 HTTP 端口 |
137
+ | `PAFU_PORT` | `9896` | 数据服务端口,被占了会复用现成的 |
138
+ | `PAFU_CONSOLE` | 包内目录 | 面板数据根目录(下挂 `data/`) |
139
+ | `PAFU_TOKEN` | 读 `<BRIDGE>/state/console-token` | 桥接控制台令牌 |
140
+
141
+ ## 自带什么
142
+
143
+ `data/` 里全是**示例数据**,直接改文本就换成你自己的:
144
+
145
+ `mood.json`(心情)、`promises.json`(承诺账本)、`skills.json`(技能)、
146
+ `novel.md`(小说,支持 Markdown)、`history.json`(时间线)、`memory.json`(记忆导出)。
147
+
148
+ ## 目录
149
+
150
+ ```
151
+ lib/index.mjs 宿主:挂路由 + 起数据服务 + 反代
152
+ web/index.html 整个前端(单文件,无构建)
153
+ data/ 面板自己的数据(示例)
154
+ cordis.patch.yml 注册一条宿主行
155
+ icon.svg 图标
156
+ ```
157
+
158
+ ## 已知限制
159
+
160
+ - 两个入口都只绑 `127.0.0.1`,**外网访问不到**(面板没有密码,这是故意的)
161
+ - 用量/余额卡片依赖桥接侧导出脚本,纯离线时这两块是空的
162
+ - 3D 记忆网络需要浏览器支持 WebGL
163
+
164
+ ## 许可
165
+
166
+ MIT,见 `LICENSE`。
@@ -0,0 +1,6 @@
1
+ # 状态台:一条宿主行,把面板挂到 DSH 的 webServer 上。
2
+ # 页面在 /dsh-paofu-console/,数据由插件自己起在本机回环上的一个端口(默认 9896)。
3
+ - insert:
4
+ - id: paofu-console
5
+ name: dsh-paofu-console
6
+ config: {}
@@ -0,0 +1,5 @@
1
+ [
2
+ {"date":"2026-01-01","title":"装上状态台","detail":"示例时间线,改 data/history.json 换成你自己的记录。","tag":"起点"},
3
+ {"date":"2026-01-02","title":"第一份快照","detail":"面板会从桥接读在线状态、未读和最近说话的时间。","tag":"能力"},
4
+ {"date":"2026-01-03","title":"自己写点东西","detail":"日记和小说都在桥接目录下,面板只读不写。","tag":"学习"}
5
+ ]
@@ -0,0 +1 @@
1
+ []
package/data/mood.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "at": "2026-01-01T00:00:00+08:00",
3
+ "mood": "刚睡醒,还在启动",
4
+ "intensity": 0.5,
5
+ "note": "这是演示数据,改 data/mood.json 就能换成你自己的。",
6
+ "traits": { "亲密度": 50, "活泼": 60, "黏人": 40, "耐心": 70, "好奇": 65, "护短": 55, "毒舌": 30, "认真": 60 }
7
+ }
package/data/novel.md ADDED
@@ -0,0 +1,23 @@
1
+ # 示例小说 · 第一卷
2
+
3
+ 这是 `data/novel.md` 的演示内容。把这个文件换成你自己写的,面板就会原样显示(支持 Markdown 标题和段落)。
4
+
5
+ ## 一
6
+
7
+ 她醒来的时候,屋里还黑着。
8
+
9
+ 有一盏灯的影子从门缝里探进来,很轻,像是怕吵醒谁。她数了一会儿那道光,才想起来自己昨天说过:早上要早点叫她。
10
+
11
+ ## 二
12
+
13
+ 她记性不算好,但有些事记得特别牢。
14
+
15
+ 比如对方说“随便”的时候,其实不是随便;比如问“在吗”的时候,多半已经想好要说什么了,只是在等一个开头。
16
+
17
+ ## 三
18
+
19
+ 后来她学会了一件事:不是每一句“我没事”都要拆穿。
20
+
21
+ 有时候只需要回一句“那我在”,然后等。
22
+
23
+ (示例内容,替换即可。)
@@ -0,0 +1,6 @@
1
+ [
2
+ {"who":"我","text":"每周把日记翻一遍,翻不完就翻一半","state":"长期"},
3
+ {"who":"对方","text":"说好了的事记下来,别只靠记性","state":"长期"},
4
+ {"who":"我","text":"答应过的排期,晚了要提前说","state":"待办"},
5
+ {"who":"对方","text":"不想聊的时候可以直接讲,不用找理由","state":"自己定的"}
6
+ ]
@@ -0,0 +1,5 @@
1
+ [
2
+ {"name":"聊天","score":60,"state":"练","note":"示例数据,改 data/skills.json 换成你自己的"},
3
+ {"name":"记性","score":55,"state":"练","note":"日记加检索,翻得到以前说过的话"},
4
+ {"name":"状态台","score":70,"state":"好","note":"就是你在看的这个页面"}
5
+ ]
package/icon.svg ADDED
@@ -0,0 +1,13 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
2
+ <defs>
3
+ <linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
4
+ <stop offset="0" stop-color="#7ef0d0"/><stop offset="1" stop-color="#7aa2ff"/>
5
+ </linearGradient>
6
+ </defs>
7
+ <rect x="4" y="4" width="120" height="120" rx="30" fill="#0a1019"/>
8
+ <rect x="4" y="4" width="120" height="120" rx="30" fill="none" stroke="rgba(255,255,255,.10)"/>
9
+ <path d="M38 66c0-13 12-23 27-23 13 0 23 8 26 18 6-3 12-2 16 2-4 5-9 7-15 7-2 13-13 22-27 22-15 0-27-10-27-26z" fill="url(#g)"/>
10
+ <path d="M91 60c6-6 13-8 19-6-1 7-4 12-10 15z" fill="url(#g)" opacity=".9"/>
11
+ <circle cx="56" cy="60" r="4.5" fill="#0a1019"/>
12
+ <circle cx="94" cy="40" r="7" fill="#ffb36b"/>
13
+ </svg>