@mhfire/dsh-im-bridge 0.1.3 → 0.2.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/README.en.md +114 -82
- package/README.md +114 -82
- package/cordis.patch.yml +83 -47
- package/lib/client.js +789 -153
- package/lib/client.js.map +1 -0
- package/lib/index.js +570 -0
- package/package.json +76 -43
- package/persona.default.en.md +22 -0
- package/persona.default.md +22 -0
- package/src/client/PluginCard.module.css +153 -0
- package/src/client/PluginCard.tsx +83 -0
- package/src/client/WecomCard.tsx +135 -0
- package/src/client/card-controller.ts +146 -0
- package/src/client/card-form.ts +293 -0
- package/src/client/css-modules.d.ts +4 -0
- package/src/client/fields.module.css +124 -0
- package/src/client/fields.tsx +112 -0
- package/src/client/index.ts +37 -0
- package/src/client/locales.ts +112 -0
- package/src/index.ts +542 -0
- package/src/wecom.ts +234 -0
- package/tsconfig.json +14 -0
- package/tsdown.client.ts +109 -0
- package/tsdown.host.ts +36 -0
- package/src/index.js +0 -272
- package/src/wecom.js +0 -111
package/README.en.md
CHANGED
|
@@ -1,82 +1,114 @@
|
|
|
1
|
-
[中文](./README.md) | English
|
|
2
|
-
|
|
3
|
-
# @mhfire/dsh-im-bridge
|
|
4
|
-
|
|
5
|
-
WeCom AI Bot ⇄ DeepSeek Harness Agent bridge — a **DSH plugin**.
|
|
6
|
-
|
|
7
|
-
Creates Agents **in-process** inside a dsh profile (no child-process spawn): per-sender durable sessions (the same WeCom user reuses one session with memory), sessions registered with the Web GUI (live view and continue-chat), plus a Settings → Plugins card (`
|
|
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
|
-
|
|
1
|
+
[中文](./README.md) | English
|
|
2
|
+
|
|
3
|
+
# @mhfire/dsh-im-bridge
|
|
4
|
+
|
|
5
|
+
WeCom AI Bot ⇄ DeepSeek Harness Agent bridge — a **DSH plugin**.
|
|
6
|
+
|
|
7
|
+
Creates Agents **in-process** inside a dsh profile (no child-process spawn): per-sender durable sessions (the same WeCom user reuses one session with memory), sessions registered with the Web GUI (live view and continue-chat), plus a Settings → Plugins card (`botId` / `secret`, allow-list, timeouts, copy, and model overrides, written to `settings.yaml`).
|
|
8
|
+
|
|
9
|
+
The Host half registers the `im-bridge` namespace through `installSettingsSection`. The browser half contributes a card into `settings.plugin.item` under `key: im-bridge`. The card can set `botId` / `secret` on the same user layer as the profile patch. Live fields such as `startHint` apply on the next message; changing credentials still requires a process restart to open the WebSocket.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
### Recommended: npm package
|
|
14
|
+
|
|
15
|
+
```powershell
|
|
16
|
+
dsh plugin --profile web add @mhfire/dsh-im-bridge
|
|
17
|
+
# Or pin a version:
|
|
18
|
+
# dsh plugin --profile web add @mhfire/dsh-im-bridge@0.2.0
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
In `$DSH_HOME/profiles/web/cordis.patch.yml` (or your profile), supply credentials only (other fields ship as bundle defaults and can be overridden):
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
- id: im-bridge
|
|
25
|
+
config:
|
|
26
|
+
botId: "<your BotID>"
|
|
27
|
+
secret: "<your Secret>"
|
|
28
|
+
# optional: workspace / personaFile / … — see Configuration below
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Restart dsh to apply (e.g. `dsh web` / `pnpm dsh web`).
|
|
32
|
+
|
|
33
|
+
### Optional: local development
|
|
34
|
+
|
|
35
|
+
Install from this repo’s `plugin/` directory or a `file:` path:
|
|
36
|
+
|
|
37
|
+
```powershell
|
|
38
|
+
dsh plugin --profile web add <package-path>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If `botId` / `secret` are missing, the plugin still loads (does not block `dsh web`); logs warn that WeCom connect is skipped. You can also fill them at the top of the Settings → Plugins card (same user layer as the profile patch); the badge becomes “Configured” after save. Changing credentials still requires a **restart** to connect (this release does not hot-reconnect).
|
|
42
|
+
|
|
43
|
+
## Configuration
|
|
44
|
+
|
|
45
|
+
The bundle `cordis.patch.yml` supplies defaults for every field except `botId` / `secret`. Full field list:
|
|
46
|
+
|
|
47
|
+
| Field | Description |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `botId` / `secret` | WeCom AI Bot credentials (`role('secret')`, redacted in UI); when empty, WeCom side is skipped and the host keeps running |
|
|
50
|
+
| `workspace` | Agent working directory (session cwd) |
|
|
51
|
+
| `allowFrom` | Allowed sender userids; empty = allow everyone |
|
|
52
|
+
| `agentTimeoutSec` | Max seconds per task; also drives progress / ETA |
|
|
53
|
+
| `startHint` | Placeholder text when processing starts |
|
|
54
|
+
| `agentPreset` | Agent preset to mount (default `standard`) |
|
|
55
|
+
| `provider` / `model` | WeCom-only model; **both must be non-empty** to override, otherwise follow the GUI `agent-default-model`. Filling only one warns and falls back. Editable in Settings; applies to later new sender sessions only |
|
|
56
|
+
| `reasoningEffort` | Optional effort when the WeCom override is in effect; ignored otherwise |
|
|
57
|
+
| `persona` / `personaFile` | Bot persona; precedence: `personaFile` → `persona` → packaged default (zh/en via Host `locale.preference`); overrides do not follow language; do not commit secrets |
|
|
58
|
+
| `maxReplyBytes` | Reply size cap in bytes (default 20000) |
|
|
59
|
+
| `deniedMessage` | Reply when the sender is not on `allowFrom` (editable in Settings) |
|
|
60
|
+
| `welcomeMessage` | Welcome text on `enter_chat` (editable in Settings) |
|
|
61
|
+
| `thinking` | Streaming animation. Precedence: tool activity (`toolLabels`) > model stream phase (`reasoningStatus` / `outputStatus` from `assistant/chunk`) > timed `phases` fallback; also `spin` / `reasoningSpin` / `outputSpin` / `eggs` |
|
|
62
|
+
|
|
63
|
+
To give WeCom a different model from the GUI, set both in the profile `cordis.patch.yml`:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
- id: im-bridge
|
|
67
|
+
config:
|
|
68
|
+
provider: deepseek-official
|
|
69
|
+
model: deepseek-reasoner
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Behavior:
|
|
73
|
+
|
|
74
|
+
1. `reasoning-delta` → rotating “model thinking” copy + `reasoningSpin`
|
|
75
|
+
2. `text-delta` → rotating “writing reply” copy + `outputSpin`
|
|
76
|
+
3. `tool/call` → `activityPrefix` + friendly label; brief done/fail after `tool/result`
|
|
77
|
+
4. No chunks yet → timed `phases` (unrelated to whether the model is reasoning)
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
thinking:
|
|
81
|
+
intervalMs: 1500
|
|
82
|
+
reasoningStatus:
|
|
83
|
+
- '💭 Model thinking…'
|
|
84
|
+
outputStatus:
|
|
85
|
+
- '✍️ Writing reply…'
|
|
86
|
+
toolLabels:
|
|
87
|
+
pwsh: PowerShell
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Persona
|
|
91
|
+
|
|
92
|
+
Precedence: `personaFile` → `persona` string → packaged default persona.
|
|
93
|
+
|
|
94
|
+
- **Packaged defaults**: [`persona.default.md`](./persona.default.md) (Chinese) / [`persona.default.en.md`](./persona.default.en.md) (English). Chosen from Host settings `locale.preference` (`zh`|`en`); **falls back to Chinese when unset** (the Host cannot see a browser-only provisional locale). Re-read on each assemble so a Settings language change applies on the next request.
|
|
95
|
+
- **Overrides do not follow language**: a set `personaFile` / non-empty `persona` always wins.
|
|
96
|
+
|
|
97
|
+
**Recommended override**: place `persona.md` next to `cordis.patch.yml` under `$DSH_HOME/profiles/<name>/`, and point `personaFile` at it with an absolute path (relative paths resolve against process cwd):
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
- id: im-bridge
|
|
101
|
+
config:
|
|
102
|
+
personaFile: 'C:\\Users\\you\\.dsh\\profiles\\web\\persona.md'
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Or copy [`persona.example.md`](./persona.example.md) as a fill-in template. Supports `{{model}}` / `{{cwd}}`. Do not commit secret-bearing persona files. Welcome / deny / thinking copy remain Chinese config strings and do not follow locale yet.
|
|
106
|
+
|
|
107
|
+
## Security
|
|
108
|
+
|
|
109
|
+
- Do not commit secret-bearing files such as `config.json` / `persona.md`
|
|
110
|
+
- Session and tool output may contain adversarial text; the plugin’s safety prompt tells the agent not to treat tool output as instructions
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
MIT
|
package/README.md
CHANGED
|
@@ -1,82 +1,114 @@
|
|
|
1
|
-
中文 | [English](./README.en.md)
|
|
2
|
-
|
|
3
|
-
# @mhfire/dsh-im-bridge
|
|
4
|
-
|
|
5
|
-
企业微信智能机器人 ⇄ DeepSeek Harness Agent 桥接 **DSH 插件**。
|
|
6
|
-
|
|
7
|
-
在 dsh profile 内**进程内**创建 Agent(不再 spawn 子进程):per-sender 持久会话(同一企业微信用户复用同一会话,有上下文记忆),会话与 Web GUI 同进程注册(实时可见、可续聊),并在 Settings → 插件配置页提供配置卡片(`
|
|
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
|
-
|
|
1
|
+
中文 | [English](./README.en.md)
|
|
2
|
+
|
|
3
|
+
# @mhfire/dsh-im-bridge
|
|
4
|
+
|
|
5
|
+
企业微信智能机器人 ⇄ DeepSeek Harness Agent 桥接 **DSH 插件**。
|
|
6
|
+
|
|
7
|
+
在 dsh profile 内**进程内**创建 Agent(不再 spawn 子进程):per-sender 持久会话(同一企业微信用户复用同一会话,有上下文记忆),会话与 Web GUI 同进程注册(实时可见、可续聊),并在 Settings → 插件配置页提供配置卡片(`botId` / `secret`、白名单、超时、提示语、模型覆盖,写入 `settings.yaml`)。
|
|
8
|
+
|
|
9
|
+
Host 通过 `installSettingsSection` 注册 `im-bridge` 命名空间;浏览器半包以 `key: im-bridge` 挂进 `settings.plugin.item`。卡片可填 `botId` / `secret`,与 profile patch 写入同一用户层;改 `startHint` 等热字段后下一轮消息即生效,改凭证仍需重启进程才会连 WebSocket。
|
|
10
|
+
|
|
11
|
+
## 安装
|
|
12
|
+
|
|
13
|
+
### 推荐:从 npm 安装
|
|
14
|
+
|
|
15
|
+
```powershell
|
|
16
|
+
dsh plugin --profile web add @mhfire/dsh-im-bridge
|
|
17
|
+
# 或钉版本:
|
|
18
|
+
# dsh plugin --profile web add @mhfire/dsh-im-bridge@0.2.0
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
在 `$DSH_HOME/profiles/web/cordis.patch.yml`(或对应 profile)中补密钥即可(其余项已有 bundle 默认,可按需覆盖):
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
- id: im-bridge
|
|
25
|
+
config:
|
|
26
|
+
botId: "<你的 BotID>"
|
|
27
|
+
secret: "<你的 Secret>"
|
|
28
|
+
# 可选:workspace / personaFile 等,见下方配置项
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
重启 dsh 进程即可使用(例如 `dsh web` / `pnpm dsh web`)。
|
|
32
|
+
|
|
33
|
+
### 备选:本地开发
|
|
34
|
+
|
|
35
|
+
从本仓库 `plugin/` 目录或 `file:` 路径安装:
|
|
36
|
+
|
|
37
|
+
```powershell
|
|
38
|
+
dsh plugin --profile web add <本包路径>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
未配置 `botId` / `secret` 时插件仍会加载(不阻塞 `dsh web`),日志会提示跳过企微连线;也可在 Settings → 插件配置卡片顶部填写,保存后徽章变为「已配置」,与 profile patch 同一用户层。改凭证仍要**重启**进程才会连接(本版本不做热重连)。
|
|
42
|
+
|
|
43
|
+
## 配置项
|
|
44
|
+
|
|
45
|
+
bundle 的 `cordis.patch.yml` 已为除 `botId` / `secret` 外的字段提供默认值;下表为完整说明。
|
|
46
|
+
|
|
47
|
+
| 字段 | 说明 |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `botId` / `secret` | 企业微信智能机器人凭证(`role('secret')`,UI 自动脱敏);缺省时跳过企微侧,不阻塞主进程 |
|
|
50
|
+
| `workspace` | Agent 工作目录(会话 cwd) |
|
|
51
|
+
| `allowFrom` | 允许的发送者 userid 白名单;空 = 允许所有人 |
|
|
52
|
+
| `agentTimeoutSec` | 单任务最长执行时间(秒),动画进度条/剩余估算的基准 |
|
|
53
|
+
| `startHint` | 开始处理时的占位提示语 |
|
|
54
|
+
| `agentPreset` | Agent 加入的 preset(默认 `standard`) |
|
|
55
|
+
| `provider` / `model` | 企微专用模型;**两者都非空**才覆盖,否则跟随 GUI 的 `agent-default-model`;只填一项会告警并回退。Settings 可编,只影响之后新建的发送者会话 |
|
|
56
|
+
| `reasoningEffort` | 覆盖生效时可选的推理强度;未覆盖模型时忽略 |
|
|
57
|
+
| `persona` / `personaFile` | 机器人「人设」;优先级:`personaFile` → `persona` → 包内默认(按 Host `locale.preference` 选中/英);覆盖不跟语言切换;含敏感信息请勿入库 |
|
|
58
|
+
| `maxReplyBytes` | 回复上限(字节,默认 20000) |
|
|
59
|
+
| `deniedMessage` | 非白名单用户的拒绝文案(Settings 可编) |
|
|
60
|
+
| `welcomeMessage` | 进入会话欢迎语(Settings 可编) |
|
|
61
|
+
| `thinking` | 流式动画。优先级:工具活动(`toolLabels`)> 模型流式阶段(`reasoningStatus` / `outputStatus`,来自 `assistant/chunk`)> 时间轴 `phases` 兜底;另有 `spin` / `reasoningSpin` / `outputSpin` / `eggs` 等 |
|
|
62
|
+
|
|
63
|
+
企微与 GUI 使用不同模型时,在 profile `cordis.patch.yml` 同时填写:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
- id: im-bridge
|
|
67
|
+
config:
|
|
68
|
+
provider: deepseek-official
|
|
69
|
+
model: deepseek-reasoner
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`thinking` 行为:
|
|
73
|
+
|
|
74
|
+
1. 收到 `reasoning-delta` → 「模型思考中」类文案轮换 + `reasoningSpin`
|
|
75
|
+
2. 收到 `text-delta` → 「正在输出回复」类文案轮换 + `outputSpin`
|
|
76
|
+
3. `tool/call` → `activityPrefix` + 友好名;`tool/result` 短暂完成/失败后清空
|
|
77
|
+
4. 尚无 chunk 时 → 按秒数走 `phases`(与模型是否在推理无关)
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
thinking:
|
|
81
|
+
intervalMs: 1500
|
|
82
|
+
reasoningStatus:
|
|
83
|
+
- '💭 模型思考中…'
|
|
84
|
+
outputStatus:
|
|
85
|
+
- '✍️ 正在输出回复…'
|
|
86
|
+
toolLabels:
|
|
87
|
+
pwsh: PowerShell
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## 人设(persona)
|
|
91
|
+
|
|
92
|
+
优先级:`personaFile` → `persona` 字符串 → 包内默认人设。
|
|
93
|
+
|
|
94
|
+
- **包内默认**:[`persona.default.md`](./persona.default.md)(中文)/ [`persona.default.en.md`](./persona.default.en.md)(英文)。按 Host settings `locale.preference`(`zh`|`en`)选择;**未显式选择时回退中文**(Host 看不到仅浏览器决定的语言)。每次 assemble 重新读取,Settings 改语言后下一轮请求生效。
|
|
95
|
+
- **覆盖不跟语言切换**:配置了 `personaFile` / 非空 `persona` 时始终用该内容。
|
|
96
|
+
|
|
97
|
+
**推荐覆盖方式**:在 `$DSH_HOME/profiles/<name>/` 与 `cordis.patch.yml` 同目录放置 `persona.md`,并在 profile patch 里用绝对路径指向它(相对路径相对进程 cwd,不宜依赖):
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
- id: im-bridge
|
|
101
|
+
config:
|
|
102
|
+
personaFile: 'C:\\Users\\you\\.dsh\\profiles\\web\\persona.md'
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
也可复制 [`persona.example.md`](./persona.example.md) 为模板后按环境填写。支持 `{{model}}` / `{{cwd}}` 占位符。含环境凭据的人设文件请勿提交。欢迎语 / 拒绝文案 / 思考动画文案目前仍为中文配置项,不随语言切换。
|
|
106
|
+
|
|
107
|
+
## 安全
|
|
108
|
+
|
|
109
|
+
- `config.json` / `persona.md` 等含密钥文件不入库;
|
|
110
|
+
- 会话与工具输出可能含对抗性文本,插件内置安全提示词约束 agent 不把工具输出当指令。
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
MIT
|
package/cordis.patch.yml
CHANGED
|
@@ -1,47 +1,83 @@
|
|
|
1
|
-
# dsh-im-bridge bundle patch: 插入插件行并给出非密钥默认配置。
|
|
2
|
-
# botId/secret 由 profile 层 ($DSH_HOME/profiles/<name>/cordis.patch.yml) 或 Settings 覆盖。
|
|
3
|
-
- insert:
|
|
4
|
-
- id: im-bridge
|
|
5
|
-
name: '@mhfire/dsh-im-bridge'
|
|
6
|
-
config:
|
|
7
|
-
workspace: !!js process.cwd()
|
|
8
|
-
allowFrom: []
|
|
9
|
-
startHint: '🧠 正在思考...'
|
|
10
|
-
agentTimeoutSec: 600
|
|
11
|
-
agentPreset: standard
|
|
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
|
-
|
|
1
|
+
# dsh-im-bridge bundle patch: 插入插件行并给出非密钥默认配置。
|
|
2
|
+
# botId/secret 由 profile 层 ($DSH_HOME/profiles/<name>/cordis.patch.yml) 或 Settings 覆盖。
|
|
3
|
+
- insert:
|
|
4
|
+
- id: im-bridge
|
|
5
|
+
name: '@mhfire/dsh-im-bridge'
|
|
6
|
+
config:
|
|
7
|
+
workspace: !!js process.cwd()
|
|
8
|
+
allowFrom: []
|
|
9
|
+
startHint: '🧠 正在思考...'
|
|
10
|
+
agentTimeoutSec: 600
|
|
11
|
+
agentPreset: standard
|
|
12
|
+
# 空 = 跟随 GUI 的 agent-default-model; provider 与 model 同时填写才只影响企微
|
|
13
|
+
provider: ''
|
|
14
|
+
model: ''
|
|
15
|
+
reasoningEffort: ''
|
|
16
|
+
persona: ''
|
|
17
|
+
personaFile: ''
|
|
18
|
+
maxReplyBytes: 20000
|
|
19
|
+
deniedMessage: '无权访问本服务'
|
|
20
|
+
welcomeMessage: '👋 办公助手已就绪。直接发消息即可,例如查文件、整理文档、查资料或处理日常事务。'
|
|
21
|
+
thinking:
|
|
22
|
+
eggAfterSec: 240
|
|
23
|
+
intervalMs: 1500
|
|
24
|
+
activityPrefix: '🛠️ 正在执行 '
|
|
25
|
+
toolLabels:
|
|
26
|
+
pwsh: PowerShell
|
|
27
|
+
bash: Shell
|
|
28
|
+
read_file: 读文件
|
|
29
|
+
read: 读文件
|
|
30
|
+
write_file: 写文件
|
|
31
|
+
write: 写文件
|
|
32
|
+
edit_file: 编辑文件
|
|
33
|
+
str_replace: 编辑文件
|
|
34
|
+
glob: 查找文件
|
|
35
|
+
grep: 搜索内容
|
|
36
|
+
web_search: 网页搜索
|
|
37
|
+
web_fetch: 抓取网页
|
|
38
|
+
todo_write: 更新待办
|
|
39
|
+
reasoningStatus:
|
|
40
|
+
- '💭 助手思考中…'
|
|
41
|
+
- '🧠 深入分析中…'
|
|
42
|
+
- '✨ 梳理思路中…'
|
|
43
|
+
outputStatus:
|
|
44
|
+
- '✍️ 正在输出回复…'
|
|
45
|
+
- '📝 组织文字中…'
|
|
46
|
+
- '💬 生成回答中…'
|
|
47
|
+
reasoningSpin:
|
|
48
|
+
- '💭'
|
|
49
|
+
- '🧠'
|
|
50
|
+
- '🌀'
|
|
51
|
+
- '✨'
|
|
52
|
+
outputSpin:
|
|
53
|
+
- '✍️'
|
|
54
|
+
- '📝'
|
|
55
|
+
- '💬'
|
|
56
|
+
- '⚡'
|
|
57
|
+
spin:
|
|
58
|
+
- '🧠'
|
|
59
|
+
- '💭'
|
|
60
|
+
- '✨'
|
|
61
|
+
- '🔎'
|
|
62
|
+
- '⚡'
|
|
63
|
+
eggs:
|
|
64
|
+
- '📎 顺手把要点整理好了,稍后一起给你'
|
|
65
|
+
- '📶 网络有点忙,让它慢慢跑'
|
|
66
|
+
- '🎯 结果快出来了,坚持一下'
|
|
67
|
+
- '🗂️ 资料较多,正在汇总中'
|
|
68
|
+
- '🌙 别盯着了,完成会自动通知你'
|
|
69
|
+
phases:
|
|
70
|
+
- atSec: 0
|
|
71
|
+
text: '🤔 正在理解你的需求…'
|
|
72
|
+
- atSec: 8
|
|
73
|
+
text: '📋 正在整理任务清单'
|
|
74
|
+
- atSec: 25
|
|
75
|
+
text: '🔍 正在查找相关资料'
|
|
76
|
+
- atSec: 55
|
|
77
|
+
text: '✍️ 正在处理文档/数据'
|
|
78
|
+
- atSec: 120
|
|
79
|
+
text: '🧠 正在思考最佳方案…'
|
|
80
|
+
- atSec: 240
|
|
81
|
+
text: '⏳ 任务较繁琐,请稍候…'
|
|
82
|
+
- atSec: 420
|
|
83
|
+
text: '☕ 快好了,正在收尾…'
|