@chance722/dsh-inbox 0.2.6 → 0.2.8
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 +21 -21
- package/README.md +170 -187
- package/README.zh.md +168 -186
- package/cordis.patch.yml +32 -32
- package/lib/cli.js +1 -0
- package/lib/client.js +4 -1
- package/lib/index.js +93 -12
- package/lib/types/client/messages.d.ts +2 -0
- package/lib/types/host/remote/merge.d.ts +10 -0
- package/lib/types/host/vault/spec.d.ts +38 -0
- package/lib/types/host/vault/vault.d.ts +20 -2
- package/lib/types/shared/panel-wire.d.ts +25 -2
- package/package.json +104 -104
package/README.zh.md
CHANGED
|
@@ -1,186 +1,168 @@
|
|
|
1
|
-
# dsh-inbox
|
|
2
|
-
|
|
3
|
-
(`dsh`)的**本地收件箱插件**:把随手复制的东西收进一个仓库,需要的时候找得回来——包括**在对话里让助手替你取**。
|
|
6
|
-
|
|
7
|
-
[English](README.md) | 中文
|
|
8
|
-
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
|
20
|
-
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
pnpm build # lib/index.js(宿主)+ lib/client.js(面板)+ lib/cli.js(init)+ lib/types
|
|
170
|
-
pnpm typecheck
|
|
171
|
-
pnpm test # vitest
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
改客户端代码:`pnpm build` 后刷新页面即可(dsh 的 client-hmr 会自己重载);改宿主代码要重启服务。细节见 [docs/help/dev-setup.md](docs/help/dev-setup.md),阶段与验收记录在[开发总线](docs/feature/dev-bus.md)。
|
|
175
|
-
|
|
176
|
-
日常想在**线上发布版**和**本地改动**之间切换(默认 profile 是 `web`,换 profile 加 `DSH_PROFILE`):
|
|
177
|
-
|
|
178
|
-
```powershell
|
|
179
|
-
pnpm dev:status # 现在用的是哪一个:本仓库 / 线上包
|
|
180
|
-
pnpm dev:npm # 切到 npm 上发布的版本(体验发布版)
|
|
181
|
-
pnpm dev:local # 切回当前仓库(会先 pnpm build 再链接)
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
## 许可
|
|
185
|
-
|
|
186
|
-
MIT
|
|
1
|
+
# dsh-inbox
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
给 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(`dsh`)的**本地收件箱插件**:把随手复制的东西收进一个仓库,需要的时候找得回来——包括**在对话里让助手替你取**。
|
|
6
|
+
|
|
7
|
+
[English](README.md) | 中文
|
|
8
|
+
|
|
9
|
+
## 它是什么
|
|
10
|
+
|
|
11
|
+
一天里复制过的东西——一条待读的链接、一张截图、一段配置、一个账号密码——散落在剪贴板历史、收藏夹和临时文件里。dsh-inbox 把它们收进一个本地仓库:粘贴即存、自动分类、侧栏里能翻能搜;要找回什么,直接问助手「我上个月存的那篇讲缓存的文章呢」。
|
|
12
|
+
|
|
13
|
+
数据全部落在本机;只有你让助手查的时候,模型才看得到内容。
|
|
14
|
+
|
|
15
|
+
## 主要功能
|
|
16
|
+
|
|
17
|
+
| 功能 | 说明 |
|
|
18
|
+
|---|---|
|
|
19
|
+
| **两个入口** | 输入框里 `/inbox <文字或链接>`(图片附在输入框上一起收),或面板里粘贴 / 拖拽 / 选择文件 |
|
|
20
|
+
| **自动分类** | 链接按平台与类型分(60 多个站点:B 站、YouTube、公众号、掘金、知乎…)、文本按密钥形状分、图片按比例加「疑似证件」标签;规则判不出的交给模型兜底,有每日上限 |
|
|
21
|
+
| **面板** | 待看 / 类目 / 标签筛选 + 跨标题正文链接备注的搜索;两种列表密度;详情里能改名称、类目、备注、标签,能标待看、删除与恢复;**跟着 dsh 的主题和语言走** |
|
|
22
|
+
| **每条都有名字** | 链接抓页面自己的标题(不花模型 token)、图片文件用原文件名,你自己起的名字永远优先。读不到的页面——反爬页、死链——名字位留链接本身,不猜一个 |
|
|
23
|
+
| **类目是谁判的** | 类目旁的颜色标签:规则判定 / 模型判定 / 手动判定(你改过的,后续不会覆盖) |
|
|
24
|
+
| **对话里取回** | 问「我的收件箱 / 仓库 / inbox 里有哪些还没看的链接」即可,助手按关键词/类目/标签/待看/类型查(最多 10 条 + 还剩几条,带图的直接显示缩略图),按 id 打开一条(正文最多 1000 字、链接、备注、标签、附件信息);回答上方的「打开 ↗」会跳到右侧「仓库」里那一条 |
|
|
25
|
+
| **看图** | 默认图片字节不进对话;你说「帮我看这张图是什么」时,才会把那一张发给自己看(一次性、显式要) |
|
|
26
|
+
| **密钥安全** | 账密正文**加密落盘**(主密码派生密钥,两者都不落盘);列表只显示你起的名字;明文永不进对话、永不发给模型 |
|
|
27
|
+
| **双向同步** | 配 WebDAV 目录或 S3 桶:改动后几秒自动推送,「刷新」= 先推后拉完整同步、按 `id` + 时间合并;清空回收站连云端一起删;两台机器用同一个「目录」就互通 |
|
|
28
|
+
| **对话卡片** | 工具结果渲染成卡片:链接可点,图片标记在本机渲染成缩略图 |
|
|
29
|
+
| **网关兼容** | 有些对象存储网关把 AccessKey 绑在「应用」上、按客户端标识认人——插件**按协议各存一份客户端标识** |
|
|
30
|
+
|
|
31
|
+
## 界面
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
## 两种用法
|
|
36
|
+
|
|
37
|
+
**① 存:在对话里转存**
|
|
38
|
+
|
|
39
|
+
输入框里写 `/inbox` 再跟文字或链接,图片直接附在输入框上——**这条命令不会发给模型**,只进仓库。适合存账号密码、临时链接这类东西。
|
|
40
|
+
|
|
41
|
+
**② 取:在对话里问**
|
|
42
|
+
|
|
43
|
+
不用记命令,正常说话就行:
|
|
44
|
+
|
|
45
|
+
> 我收件库里那个小程序码是哪张?
|
|
46
|
+
>
|
|
47
|
+
> 上周存的讲缓存的文章给我看看
|
|
48
|
+
>
|
|
49
|
+
> 帮我把还没看过的链接列一下
|
|
50
|
+
|
|
51
|
+
同一段对话里的两次提问(真机截图):
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
## 安装
|
|
58
|
+
|
|
59
|
+
前置:Node ≥ 22 和一个能用的 `dsh`;没装 pnpm 时安装命令会顺手装好。**目前只在 Windows 上验收过**,macOS / Linux 未验证。
|
|
60
|
+
|
|
61
|
+
```powershell
|
|
62
|
+
# 安装(`dsh web` 就是 `dsh --profile web`,所以装进你日常启动的那个 profile)
|
|
63
|
+
npx @chance722/dsh-inbox init --profile web --install-pnpm
|
|
64
|
+
|
|
65
|
+
# 全新机器(还没跑过 dsh、没有这个 profile)多带一个 --create-profile
|
|
66
|
+
npx @chance722/dsh-inbox init --profile web --create-profile --install-pnpm
|
|
67
|
+
|
|
68
|
+
# 更新(init 只管装和接线,重复跑不会升级;刚发布的几分钟内请写确切版本:@0.2.8)
|
|
69
|
+
dsh plugin --profile web add @chance722/dsh-inbox@latest
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
装完**重启 dsh**,然后照旧启动。左栏出现 **Inbox**;新会话里问「我的收件箱里有哪些还没看的链接」,助手就会去查。
|
|
73
|
+
|
|
74
|
+
`init` 还会把 dsh 自带的 `standard` preset 复制到 `~/.dsh/.agent-presets/inbox/` 并加上本插件、把默认 preset 指向它——助手能看见收件箱工具就是靠这一步。那份快照不会跟着 dsh 以后升级 `standard` 一起变;它和 profile 都能退掉(见「卸载」)。
|
|
75
|
+
|
|
76
|
+
想让日常 dsh 保持干净:`npx @chance722/dsh-inbox init --create-profile`,然后 `dsh --profile inbox --no-open --port 3102`。
|
|
77
|
+
|
|
78
|
+
其它选项:`--profile <名字>`、`--install-pnpm`、`--no-default`、`--help`。
|
|
79
|
+
|
|
80
|
+
### 从本地仓库装
|
|
81
|
+
|
|
82
|
+
```powershell
|
|
83
|
+
git clone <本仓库> dsh-inbox ; cd dsh-inbox
|
|
84
|
+
pnpm install ; pnpm build
|
|
85
|
+
node lib/cli.js init --package <本仓库的绝对路径>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 卸载
|
|
89
|
+
|
|
90
|
+
```powershell
|
|
91
|
+
# 1. 从你装进去的那个 profile 里摘掉(同时会从 dsh.profile.bundles 移除)
|
|
92
|
+
dsh plugin --profile <你装的 profile> remove @chance722/dsh-inbox
|
|
93
|
+
|
|
94
|
+
# 2. 删掉 init 建的东西
|
|
95
|
+
rm -r ~/.dsh/.agent-presets/inbox # 那个 preset 副本
|
|
96
|
+
# 默认 preset:把 ~/.dsh/settings.yaml 里 agent-presets.default 删掉(继承部署默认),
|
|
97
|
+
# 或改成 standard;init 每次都留了 settings.yaml.bak-* 备份,也可以直接还原
|
|
98
|
+
|
|
99
|
+
# 3. 想连这个 profile 一起删(只为这个插件建过才需要)
|
|
100
|
+
rm -r ~/.dsh/profiles/<你装的 profile>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**卸载不会删掉你的仓库。** 连记录一起删:`rm -r ~/.dsh/storages/dsh_inbox`。
|
|
104
|
+
|
|
105
|
+
## 东西存在哪
|
|
106
|
+
|
|
107
|
+
全部在 `%DSH_HOME%` 下(Windows 上就是 `C:\Users\<你>\.dsh`):
|
|
108
|
+
|
|
109
|
+
| 什么 | 在哪 |
|
|
110
|
+
|---|---|
|
|
111
|
+
| 记录:文本、链接、类目、备注、标签、待看… | `storages\dsh_inbox\items\*.json`(一条一个文件) |
|
|
112
|
+
| 附件索引(mime / 尺寸 / 原文件名) | `storages\dsh_inbox\attachments\*.json` |
|
|
113
|
+
| 图片 / 视频 / 文件的**字节** | `attachments\`(dsh 自己的附件仓库,按内容寻址,永不自动删) |
|
|
114
|
+
| 远端密码 / S3 AccessKey Secret | dsh 的凭证库 `.credentials.yaml` |
|
|
115
|
+
| 远端设置(地址、桶、客户端标识…) | dsh 的 settings |
|
|
116
|
+
|
|
117
|
+
### 云端长什么样
|
|
118
|
+
|
|
119
|
+
配了远端(WebDAV 目录或 S3 桶)、目录填 `/inbox` 时:
|
|
120
|
+
|
|
121
|
+
| 远端路径 | 是什么 |
|
|
122
|
+
|---|---|
|
|
123
|
+
| `inbox/<你扔的文件>` | **投放区**:任何设备往这儿扔文件,本机拉取时读它们并入库 |
|
|
124
|
+
| `inbox/sync/items/<记录 id>.json` | 一条记录的**机器可读版**(同步的真相来源) |
|
|
125
|
+
| `inbox/sync/items/<记录 id>.txt` | 同一条记录的**可读版**(云盘里直接能看:正文、备注、附件指向) |
|
|
126
|
+
| `inbox/sync/attachments/<附件 id>.<扩展名>` | 附件**字节**(图片 / 视频 / PDF 直接能打开) |
|
|
127
|
+
| `inbox/sync/attachments/<附件 id>.meta.json` | 附件元数据(原文件名、宽高、字节数、摘要) |
|
|
128
|
+
| 0 字节、以 `/` 结尾的 key | 云盘自己建的目录占位,不是插件写的 |
|
|
129
|
+
|
|
130
|
+
### 同步怎么走
|
|
131
|
+
|
|
132
|
+
- **自动**:入库或改动后几秒推一次(防抖);「刷新」= 先推 → 再拉 → 重读列表。
|
|
133
|
+
- **合并**:按 `id` + 更新时间逐条判——谁新谁赢,不留冲突副本;需要的附件字节一起下来。
|
|
134
|
+
- **两台机器**:用同一个「目录」就互通(留空 / `/` / `inbox` 同义)。换过目录的机器留在别处的记录,可以在设置里打开「**同时合并别的同步目录**」一起拉回来。
|
|
135
|
+
- **删除**:「删除」只进回收站,别的设备会知道它被删了;「清空回收站」才连云端那份一起删,而且**清掉就是清掉**——另一套同步目录里那份副本不会再把它塞回来。
|
|
136
|
+
|
|
137
|
+
## 隐私与安全
|
|
138
|
+
|
|
139
|
+
- **账密加密落盘**:账密正文以密文保存(AES-256-GCM,密钥由主密码派生)。主密码和密钥都不落盘——每次重启都要在「设置 → 账密加密」解锁一次;密码忘了就解不开,没有找回。没设主密码时,账密**不会被存进去**。
|
|
140
|
+
- **加密的边界**:只加密账密的**正文**。备注、类目、标签、时间与附件的**字节**不在内——附件里装着密钥,它就是明文。
|
|
141
|
+
- **列表与对话脱敏**:密钥类记录在列表里只显示你起的名字;明文永不进对话、永不发给模型。
|
|
142
|
+
- **图片**:分类时会把图片发给模型判断;对话里默认只回 `[attachment:id]` 标记。只有你明确让助手「看这张图」时,它才会把那一张发给自己看。
|
|
143
|
+
- **模型看不到你的仓库**,除非你让它查(它调工具时才读得到),且分类请求先过脱敏。
|
|
144
|
+
- **云端要有访问控制**:同步上去的内容里只有账密正文是密文,其余(文本、链接、备注、附件字节)是明文;主密码与密钥从不同步。
|
|
145
|
+
- **装它会改到面板之外的一处**:抓链接标题是本插件唯一的对外请求(一次 GET,只在本机捕获的链接上发,同步拉进来的不抓)。它用的是**浏览器形状**的身份,由本包的 `cordis.patch.yml` 覆盖 `web-fetch-http.userAgent` 写成。这层身份是整个 profile 的,模型的 web 工具也一起用;**你自己的 `cordis.patch.yml` 覆盖得掉**。细节见 [docs/help/link-title-fetch.md](docs/help/link-title-fetch.md)。
|
|
146
|
+
|
|
147
|
+
## 开发
|
|
148
|
+
|
|
149
|
+
```powershell
|
|
150
|
+
pnpm install
|
|
151
|
+
pnpm build # lib/index.js(宿主)+ lib/client.js(面板)+ lib/cli.js(init)+ lib/types
|
|
152
|
+
pnpm typecheck
|
|
153
|
+
pnpm test # vitest
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
改客户端代码:`pnpm build` 后页面会自己重载(dsh 的 client-hmr);改宿主代码要重启服务。细节见 [docs/help/dev-setup.md](docs/help/dev-setup.md),阶段记录在[开发总线](docs/feature/dev-bus.md)。
|
|
157
|
+
|
|
158
|
+
日常想在**线上发布版**和**本地改动**之间切换(默认 profile 是 `web`,换 profile 加 `DSH_PROFILE`):
|
|
159
|
+
|
|
160
|
+
```powershell
|
|
161
|
+
pnpm dev:status # 现在用的是哪一个:本仓库 / 线上包
|
|
162
|
+
pnpm dev:npm # 切到 npm 上发布的版本(体验发布版)
|
|
163
|
+
pnpm dev:local # 切回当前仓库(会先 pnpm build 再链接)
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## 许可
|
|
167
|
+
|
|
168
|
+
MIT
|
package/cordis.patch.yml
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
# The dsh-inbox bundle patch. Loaded when this package is named in the profile's
|
|
2
|
-
# `dsh.profile.bundles`; it inserts one host row, and the browser half arrives
|
|
3
|
-
# through the same package's `dsh.client` declaration (the client-modules node
|
|
4
|
-
# half scans enabled rows for packages that declare one).
|
|
5
|
-
#
|
|
6
|
-
# Row ids are addressed by later layers (the profile's cordis.patch.yml, --patch
|
|
7
|
-
# overlays), so `dsh-inbox` is the id other people should target to reconfigure us.
|
|
8
|
-
|
|
9
|
-
- insert:
|
|
10
|
-
- id: dsh-inbox
|
|
11
|
-
name: '@chance722/dsh-inbox'
|
|
12
|
-
|
|
13
|
-
# The identity this profile fetches pages with, restated here because our own
|
|
14
|
-
# link-title fetch needs a browser-shaped one: sites gate on the *shape* of this
|
|
15
|
-
# string, and bilibili answers the `Mozilla/5.0 (compatible; ...)` form with an
|
|
16
|
-
# anti-bot page that carries a real-looking `<title>` (measured 2026-09-21:
|
|
17
|
-
# 20/29 refused for the compatible form, 0/15 for the one below). Details,
|
|
18
|
-
# measurements and the refusal heuristics live in docs/help/link-title-fetch.md.
|
|
19
|
-
#
|
|
20
|
-
# It still says who is asking — `dsh-inbox` sits where a browser puts
|
|
21
|
-
# `Chrome/140.0.0.0` — with no version token, because one that goes stale on every
|
|
22
|
-
# release is worse than none. A parenthetical `(+url)` or a suffix after a browser
|
|
23
|
-
# token lands in the refused bucket exactly like `(compatible; ...)` does, so
|
|
24
|
-
# there is none of either.
|
|
25
|
-
#
|
|
26
|
-
# Scope: this is the profile's fetch identity, so the model's own web tools use it
|
|
27
|
-
# too. The user's own cordis.patch.yml is applied after this layer and wins,
|
|
28
|
-
# which is how anyone picks a different identity without touching the package.
|
|
29
|
-
- id: web-fetch-http
|
|
30
|
-
name: '@deepseek-ai/dsh-web-fetch-http'
|
|
31
|
-
config:
|
|
32
|
-
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) dsh-inbox Safari/537.36'
|
|
1
|
+
# The dsh-inbox bundle patch. Loaded when this package is named in the profile's
|
|
2
|
+
# `dsh.profile.bundles`; it inserts one host row, and the browser half arrives
|
|
3
|
+
# through the same package's `dsh.client` declaration (the client-modules node
|
|
4
|
+
# half scans enabled rows for packages that declare one).
|
|
5
|
+
#
|
|
6
|
+
# Row ids are addressed by later layers (the profile's cordis.patch.yml, --patch
|
|
7
|
+
# overlays), so `dsh-inbox` is the id other people should target to reconfigure us.
|
|
8
|
+
|
|
9
|
+
- insert:
|
|
10
|
+
- id: dsh-inbox
|
|
11
|
+
name: '@chance722/dsh-inbox'
|
|
12
|
+
|
|
13
|
+
# The identity this profile fetches pages with, restated here because our own
|
|
14
|
+
# link-title fetch needs a browser-shaped one: sites gate on the *shape* of this
|
|
15
|
+
# string, and bilibili answers the `Mozilla/5.0 (compatible; ...)` form with an
|
|
16
|
+
# anti-bot page that carries a real-looking `<title>` (measured 2026-09-21:
|
|
17
|
+
# 20/29 refused for the compatible form, 0/15 for the one below). Details,
|
|
18
|
+
# measurements and the refusal heuristics live in docs/help/link-title-fetch.md.
|
|
19
|
+
#
|
|
20
|
+
# It still says who is asking — `dsh-inbox` sits where a browser puts
|
|
21
|
+
# `Chrome/140.0.0.0` — with no version token, because one that goes stale on every
|
|
22
|
+
# release is worse than none. A parenthetical `(+url)` or a suffix after a browser
|
|
23
|
+
# token lands in the refused bucket exactly like `(compatible; ...)` does, so
|
|
24
|
+
# there is none of either.
|
|
25
|
+
#
|
|
26
|
+
# Scope: this is the profile's fetch identity, so the model's own web tools use it
|
|
27
|
+
# too. The user's own cordis.patch.yml is applied after this layer and wins,
|
|
28
|
+
# which is how anyone picks a different identity without touching the package.
|
|
29
|
+
- id: web-fetch-http
|
|
30
|
+
name: '@deepseek-ai/dsh-web-fetch-http'
|
|
31
|
+
config:
|
|
32
|
+
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) dsh-inbox Safari/537.36'
|
package/lib/cli.js
CHANGED
|
@@ -327,6 +327,7 @@ ${hint}`);
|
|
|
327
327
|
\xB7 \u7528\u4F60\u5E73\u65F6\u90A3\u6761\u547D\u4EE4\u542F\u52A8\u5B83\uFF1A${profile === "web" ? "dsh web" : `dsh --profile ${profile}`}
|
|
328
328
|
\xB7 \u65B0\u5EFA\u4E00\u4E2A\u4F1A\u8BDD\uFF0C\u5B83\u5C31\u4F1A\u5E26\u4E0A\u6536\u4EF6\u7BB1\u5DE5\u5177\uFF1B\u60F3\u8BA9\u52A9\u624B\u67E5\u4ED3\u5E93\uFF0C\u76F4\u63A5\u95EE\u300C\u6211\u7684\u6536\u4EF6\u7BB1\u91CC\u6709\u54EA\u4E9B\u8FD8\u6CA1\u770B\u7684\u94FE\u63A5\u300D
|
|
329
329
|
\xB7 \u9762\u677F\uFF08\u4FA7\u680F Inbox\uFF09\u4E0D\u9700\u8981 preset\uFF0C\u88C5\u5B8C\u5C31\u5728
|
|
330
|
+
\xB7 \u4EE5\u540E\u8981\u66F4\u65B0\u5230\u7EBF\u4E0A\u6700\u65B0\u7248\uFF1Adsh plugin --profile ${profile} add ${PACKAGE_NAME}@latest\uFF08\u91CD\u590D\u8DD1 init \u53EA\u4F1A\u91CD\u590D\u68C0\u67E5\uFF0Cpnpm \u56DE\u4E00\u53E5 "Already up to date"\uFF0C\u4E0D\u4F1A\u5347\u7EA7\uFF09
|
|
330
331
|
`
|
|
331
332
|
);
|
|
332
333
|
return 0;
|
package/lib/client.js
CHANGED
|
@@ -869,6 +869,7 @@ window.__ModuleLoader__.load({
|
|
|
869
869
|
"sync.detailPulled": "\u62C9\u53D6 {count} \u6761 \xB7 \u4E91\u7AEF {records} \u6761\u8BB0\u5F55 / {files} \u4E2A\u9644\u4EF6",
|
|
870
870
|
"sync.detailAdded": "\uFF08\u5176\u4E2D {count} \u6761\u662F\u65B0\u8BB0\u5F55\uFF09",
|
|
871
871
|
"sync.detailDeleted": "\uFF08\u5176\u4E2D {count} \u6761\u662F\u5220\u9664\uFF0C\u4F1A\u8FDB\u56DE\u6536\u7AD9\uFF09",
|
|
872
|
+
"sync.detailPurged": "\uFF08\u6E05\u7A7A\u8FC7 {count} \u6761\uFF1A\u4E91\u7AEF\u7684\u65E7\u526F\u672C\u6CA1\u6709\u62C9\u56DE\u6765\uFF09",
|
|
872
873
|
"sync.pullForeignSync": " \xB7 \u26A0\uFE0F \u53E6\u6709 {records} \u6761\u8BB0\u5F55\u5728\u522B\u7684\u540C\u6B65\u76EE\u5F55\uFF1A{roots}",
|
|
873
874
|
"sync.detailForeign": " \xB7 \u26A0\uFE0F \u522B\u7684\u540C\u6B65\u76EE\u5F55\uFF1A{roots}\uFF08{records} \u6761\u8BB0\u5F55\uFF1B\u672C\u673A {ours}\uFF09",
|
|
874
875
|
// The toast: two numbers, nothing else. Everything else about a sync is
|
|
@@ -1132,6 +1133,7 @@ window.__ModuleLoader__.load({
|
|
|
1132
1133
|
"sync.detailPulled": "pulled {count} \xB7 the cloud holds {records} records / {files} attachments",
|
|
1133
1134
|
"sync.detailAdded": " ({count} of them new)",
|
|
1134
1135
|
"sync.detailDeleted": " ({count} of them deletions \u2014 they land in the recycle bin)",
|
|
1136
|
+
"sync.detailPurged": " ({count} emptied out of the bin: their older cloud copies stayed out)",
|
|
1135
1137
|
"sync.pullForeignSync": " \xB7 \u26A0\uFE0F {records} records live in another sync directory: {roots}",
|
|
1136
1138
|
"sync.detailForeign": " \xB7 \u26A0\uFE0F another sync directory: {roots} ({records} records; ours is {ours})",
|
|
1137
1139
|
"sync.shortPushed": "pushed {count}",
|
|
@@ -3298,7 +3300,8 @@ window.__ModuleLoader__.load({
|
|
|
3298
3300
|
});
|
|
3299
3301
|
const gained = (result.added ?? 0) === 0 ? "" : t("sync.detailAdded", { count: result.added ?? 0 });
|
|
3300
3302
|
const deleted = (result.deletions ?? 0) === 0 ? "" : t("sync.detailDeleted", { count: result.deletions ?? 0 });
|
|
3301
|
-
|
|
3303
|
+
const purged = (result.purged ?? 0) === 0 ? "" : t("sync.detailPurged", { count: result.purged ?? 0 });
|
|
3304
|
+
return `${head}${gained}${deleted}${purged}${warningsOf(result, true)}`;
|
|
3302
3305
|
}
|
|
3303
3306
|
function EncryptionSettings({ call }) {
|
|
3304
3307
|
const [status, setStatus] = import_react8.default.useState();
|