dsh-caduceus 0.1.0 → 0.1.1
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.md +99 -72
- package/README.zh.md +122 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,96 +1,123 @@
|
|
|
1
1
|
# dsh-caduceus
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[中文](README.zh.md) / **English**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-caduceus)
|
|
6
|
+
[](https://github.com/ArtomYuan/dsh-caduceus)
|
|
7
|
+
[](LICENSE)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
**Use DeepSeek Harness in Feishu/Lark the way you use an agent — one topic, one session, a visible title, one card per turn.**
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
> Scope: the engine is still dsh. The agent loop, tools, sandbox and skills are unchanged; this package adds the conversation semantics and the chat surface around them.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
dsh plugin --profile web add dsh-caduceus --allow-build=protobufjs
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### 路径 2:先授权再装(不带 flag 也能装)
|
|
13
|
+
## What you get
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
- **One scope, one session** — p2p, topic, and group-per-user sessions are kept separate.
|
|
16
|
+
- **Visible titles** — generated from the first prompt and shown on the turn card.
|
|
17
|
+
- **One card per turn** — status and answer live in the same card, edited in place; the final answer is not a second message.
|
|
18
|
+
- **11 commands** — `/new`, `/sessions`, `/rename`, `/resume`, `/adopt`, `/status`, `/stop`, `/doctor`, `/selfcheck`, `/persona`, `/help`.
|
|
19
|
+
- **Persona** — `SOUL.md` is synced into the `AGENTS.md` block, automatically at startup.
|
|
20
|
+
- **Observability** — two-stage self-check, `/doctor`, and in-chat degradation warnings.
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
## Looks like
|
|
25
23
|
|
|
26
|
-
```
|
|
27
|
-
|
|
24
|
+
```text
|
|
25
|
+
飞书会话 · 过程
|
|
26
|
+
会话:重构登录流程 · **运行中** · 步数 4 · 工具 3 · 已运行 12s
|
|
27
|
+
最近:bash
|
|
28
|
+
(the answer streams inside this card; at turn end the same card is frozen as 完成)
|
|
28
29
|
```
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
This is a text sketch, not a screenshot. At turn end the card shows the terminal state and the complete answer; a degraded card (preset not mounted) is marked `(preset 未挂载)`.
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
npm pack
|
|
34
|
-
dsh plugin --profile web add ./dsh-caduceus-0.1.0.tgz --allow-build=protobufjs
|
|
35
|
-
```
|
|
33
|
+
## Requirements
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
| Requirement | Version / note |
|
|
36
|
+
|:--|:--|
|
|
37
|
+
| dsh | `>=0.2.1-rc.2` |
|
|
38
|
+
| Node.js | `>=22.13` |
|
|
39
|
+
| pnpm | `>=10` (pnpm 11 tested) |
|
|
40
|
+
| Feishu / Lark app | One app can have **one long-connection consumer** at a time |
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
`ERR_PNPM_ALLOW_BUILD_MISSING_PACKAGE` 并安装失败。
|
|
41
|
-
- **为什么需要放行**:`protobufjs` 是飞书 SDK 的传递依赖;pnpm ≥10 默认不执行依赖包的安装/构建脚本,
|
|
42
|
-
未放行时安装会以 `ERR_PNPM_IGNORED_BUILDS: Ignored build scripts: protobufjs@7.6.6` 失败。
|
|
43
|
-
- **确认装上了**:安装后执行
|
|
42
|
+
## Install
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
dsh --profile web --dump-config | grep dsh-caduceus
|
|
47
|
-
```
|
|
44
|
+
1. Add the package (the build flag is required, see the note below):
|
|
48
45
|
|
|
49
|
-
|
|
46
|
+
```bash
|
|
47
|
+
dsh plugin --profile web add dsh-caduceus --allow-build=protobufjs
|
|
48
|
+
```
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
2. In the profile's `cordis.patch.yml`, give the `caduceus-gateway` row your Feishu credentials
|
|
51
|
+
(`appId` / `appSecret`, or `FEISHU_APP_ID` / `FEISHU_APP_SECRET`).
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
3. Restart dsh from the host side. The log should contain `feishu long connection started`.
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
> **pnpm ≥10 note**: `protobufjs` is a transitive dependency of the Feishu SDK, and pnpm ≥10 does not
|
|
56
|
+
> run dependency install/build scripts by default. Use `--allow-build=protobufjs` **with the equals
|
|
57
|
+
> sign**; the space form (`--allow-build protobufjs`) fails with
|
|
58
|
+
> `ERR_PNPM_ALLOW_BUILD_MISSING_PACKAGE`. Without the flag the install fails with
|
|
59
|
+
> `ERR_PNPM_IGNORED_BUILDS: Ignored build scripts: protobufjs@7.6.6`.
|
|
60
|
+
> Alternatively, pre-authorize in the profile's `pnpm-workspace.yaml`:
|
|
56
61
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
| `groupSessionsPerUser` | `true` | 普通群按发送者隔离会话;话题不受影响 |
|
|
62
|
-
| `busyMode` | `queue` | 群里忙时的投递:`queue` / `steer` / `interrupt` |
|
|
63
|
-
| `cardThrottleMs` | `400` | 过程卡 patch 节流(毫秒) |
|
|
64
|
-
| `personaAutoSync` | `true` | 启动时把 SOUL 同步到 `$DSH_HOME/AGENTS.md` |
|
|
65
|
-
| `agentPreset` | `standard` | 新会话挂载的 dsh agent preset |
|
|
66
|
-
| `logLevel` | `info` | 文件日志级别:`info` / `debug` |
|
|
62
|
+
```yaml
|
|
63
|
+
onlyBuiltDependencies:
|
|
64
|
+
- protobufjs
|
|
65
|
+
```
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
> Confirm the install with `dsh --profile web --dump-config | grep dsh-caduceus` — expect at least 2 lines.
|
|
69
68
|
|
|
70
|
-
##
|
|
69
|
+
## Configure
|
|
71
70
|
|
|
72
|
-
|
|
|
71
|
+
| Key | Default | Description |
|
|
72
|
+
|:--|:--|:--|
|
|
73
|
+
| `appId` / `appSecret` | — | Feishu app credentials; `FEISHU_APP_ID` / `FEISHU_APP_SECRET` also work |
|
|
74
|
+
| `defaultCwd` | process cwd | Working directory for new sessions |
|
|
75
|
+
| `groupSessionsPerUser` | `true` | Isolate ordinary groups per sender; topics are unaffected |
|
|
76
|
+
| `busyMode` | `queue` | Busy delivery: `queue` / `steer` / `interrupt` |
|
|
77
|
+
| `cardThrottleMs` | `400` | Process-card patch throttle (ms) |
|
|
78
|
+
| `personaAutoSync` | `true` | Sync SOUL into `$DSH_HOME/AGENTS.md` at startup |
|
|
79
|
+
| `agentPreset` | `standard` | dsh agent preset mounted for new sessions |
|
|
80
|
+
| `logLevel` | `info` | File log level: `info` / `debug` |
|
|
81
|
+
|
|
82
|
+
## Commands
|
|
83
|
+
|
|
84
|
+
| Command | Description |
|
|
73
85
|
|:--|:--|
|
|
74
|
-
| `/new` |
|
|
75
|
-
| `/sessions [--all]` |
|
|
76
|
-
| `/rename
|
|
77
|
-
| `/resume [id
|
|
78
|
-
| `/adopt <id
|
|
79
|
-
| `/
|
|
80
|
-
| `/
|
|
81
|
-
| `/
|
|
82
|
-
| `/
|
|
83
|
-
| `/persona [show\|sync]` |
|
|
84
|
-
| `/help` |
|
|
85
|
-
|
|
86
|
-
##
|
|
87
|
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
86
|
+
| `/new` | Materialize a new session immediately; keep the old one |
|
|
87
|
+
| `/sessions [--all]` | List the current session, or every session of this chat |
|
|
88
|
+
| `/rename <title>` | Rename the current session |
|
|
89
|
+
| `/resume [id\|tail]` | Resume the previous session, or switch by full id / ≥8-char tail |
|
|
90
|
+
| `/adopt <id\|tail>` | Adopt an unowned historical session into the current scope |
|
|
91
|
+
| `/status` | Current session status plus the self-check summary |
|
|
92
|
+
| `/stop` | Interrupt the running turn |
|
|
93
|
+
| `/doctor [--json]` | Health report: runtime / Feishu / persona / session / storage / versions |
|
|
94
|
+
| `/selfcheck` | Re-run both self-check stages and print every item |
|
|
95
|
+
| `/persona [show\|sync]` | Show or sync the SOUL persona block |
|
|
96
|
+
| `/help` | Command table |
|
|
97
|
+
|
|
98
|
+
## Troubleshooting
|
|
99
|
+
|
|
100
|
+
- **No `feishu long connection started` in the log**: run `/doctor` first, then check the file log at `$DSH_HOME/caduceus/caduceus.log`.
|
|
101
|
+
- **`/doctor`**: shows runtime, Feishu, persona, session and storage checks; `/doctor --json` gives the same report for scripts or support.
|
|
102
|
+
- **In-chat warnings**: self-check failures are posted into the conversation as `⚠ 自检异常 …(详情 /doctor)`; recovery posts `✓ 自检已恢复`.
|
|
103
|
+
- **`preset:applied` fails**: the agent was created without a preset, so it has no tools and no persona. Check `agentPreset` and that the `agentPresets` service is available.
|
|
104
|
+
- **`persona:fresh` fails**: `SOUL.md` and the block in `$DSH_HOME/AGENTS.md` differ. Run `/persona sync` or let the next startup auto-sync.
|
|
105
|
+
- **Install failed with `ERR_PNPM_IGNORED_BUILDS` / `ERR_PNPM_ALLOW_BUILD_MISSING_PACKAGE`**: see the pnpm note under Install.
|
|
106
|
+
|
|
107
|
+
## Limitations
|
|
108
|
+
|
|
109
|
+
- One Feishu/Lark app supports one long-connection consumer; do not run the same app in two dsh instances.
|
|
110
|
+
- Command turns (`/doctor`, `/status`, `/sessions`, …) do not go through the agent, so tool counts may read `pending` until a normal message is sent.
|
|
111
|
+
- The persona projection targets `$DSH_HOME/AGENTS.md`; a legacy block in `$DSH_AGENTS_HOME/AGENTS.md` is only reported and never deleted.
|
|
112
|
+
- The file log rotates at 5 MB and keeps 3 files.
|
|
113
|
+
- There is no separate Web UI install wizard; installation is through the dsh CLI.
|
|
114
|
+
|
|
115
|
+
## Docs
|
|
116
|
+
|
|
117
|
+
- [docs/DESIGN.md](docs/DESIGN.md) — design and surface semantics
|
|
118
|
+
- [docs/VERIFY.md](docs/VERIFY.md) — isolated-profile verification steps
|
|
119
|
+
- [docs/](docs/) — slice notes (`SLICE*.md`)
|
|
120
|
+
|
|
121
|
+
## License
|
|
122
|
+
|
|
123
|
+
[MIT](LICENSE) © 2026 ArtomYuan
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# dsh-caduceus
|
|
2
|
+
|
|
3
|
+
[English](README.md) / **中文**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-caduceus)
|
|
6
|
+
[](https://github.com/ArtomYuan/dsh-caduceus)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
**在飞书/Lark 里像用 agent 一样用 DeepSeek Harness——一个话题一个会话,标题可见,每回合一张卡。**
|
|
10
|
+
|
|
11
|
+
> 作用域:引擎仍是 dsh。agent loop、工具、沙箱、skills 都不变;本包只提供会话语义与聊天界面。
|
|
12
|
+
|
|
13
|
+
## What you get(能拿到什么)
|
|
14
|
+
|
|
15
|
+
- **一个 scope 一个会话** — 私聊、话题、普通群按发送者隔离。
|
|
16
|
+
- **标题可见** — 由第一条 prompt 生成,显示在回合卡上。
|
|
17
|
+
- **每回合一张卡** — 状态与答案在同一张卡里,原地编辑;终稿不再另发一条消息。
|
|
18
|
+
- **11 条命令** — `/new`、`/sessions`、`/rename`、`/resume`、`/adopt`、`/status`、`/stop`、`/doctor`、`/selfcheck`、`/persona`、`/help`。
|
|
19
|
+
- **人格** — `SOUL.md` 同步到 `AGENTS.md` 的标记块,启动时自动执行。
|
|
20
|
+
- **可观测性** — 两阶段自检、`/doctor`、对话内的降级提示。
|
|
21
|
+
|
|
22
|
+
## Looks like(长什么样)
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
飞书会话 · 过程
|
|
26
|
+
会话:重构登录流程 · **运行中** · 步数 4 · 工具 3 · 已运行 12s
|
|
27
|
+
最近:bash
|
|
28
|
+
(正文在这张卡里滚动;收尾时同一张卡定格为「完成」)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
这是文本示意,不是截图。收尾时卡内显示终态与完整答案;降级(preset 未挂载)时状态行会标 `(preset 未挂载)`。
|
|
32
|
+
|
|
33
|
+
## Requirements(前置要求)
|
|
34
|
+
|
|
35
|
+
| 要求 | 版本 / 说明 |
|
|
36
|
+
|:--|:--|
|
|
37
|
+
| dsh | `>=0.2.1-rc.2` |
|
|
38
|
+
| Node.js | `>=22.13` |
|
|
39
|
+
| pnpm | `>=10`(实测 11) |
|
|
40
|
+
| 飞书/Lark 应用 | 一个应用同一时间只能有**一路长连接**消费者 |
|
|
41
|
+
|
|
42
|
+
## Install(安装)
|
|
43
|
+
|
|
44
|
+
1. 装包(必须带 build flag,说明见下):
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
dsh plugin --profile web add dsh-caduceus --allow-build=protobufjs
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
2. 在 profile 的 `cordis.patch.yml` 里,给 `caduceus-gateway` 这一行填飞书凭证
|
|
51
|
+
(`appId` / `appSecret`,或用 `FEISHU_APP_ID` / `FEISHU_APP_SECRET`)。
|
|
52
|
+
|
|
53
|
+
3. 由宿主侧重启 dsh。日志里应出现 `feishu long connection started`。
|
|
54
|
+
|
|
55
|
+
> **pnpm ≥10 注意**:`protobufjs` 是飞书 SDK 的传递依赖;pnpm ≥10 默认不执行依赖包的安装/构建脚本。
|
|
56
|
+
> 必须用**等号**形式 `--allow-build=protobufjs`;空格形式(`--allow-build protobufjs`)会报
|
|
57
|
+
> `ERR_PNPM_ALLOW_BUILD_MISSING_PACKAGE`。不带 flag 会以
|
|
58
|
+
> `ERR_PNPM_IGNORED_BUILDS: Ignored build scripts: protobufjs@7.6.6` 失败。
|
|
59
|
+
> 也可以在 profile 的 `pnpm-workspace.yaml` 里预先放行:
|
|
60
|
+
|
|
61
|
+
```yaml
|
|
62
|
+
onlyBuiltDependencies:
|
|
63
|
+
- protobufjs
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
> 安装后用 `dsh --profile web --dump-config | grep dsh-caduceus` 确认——应至少 2 行。
|
|
67
|
+
|
|
68
|
+
## Configure(配置)
|
|
69
|
+
|
|
70
|
+
| 配置 | 默认 | 说明 |
|
|
71
|
+
|:--|:--|:--|
|
|
72
|
+
| `appId` / `appSecret` | — | 飞书应用凭证;也可用 `FEISHU_APP_ID` / `FEISHU_APP_SECRET` |
|
|
73
|
+
| `defaultCwd` | 当前进程 cwd | 新建会话的工作目录 |
|
|
74
|
+
| `groupSessionsPerUser` | `true` | 普通群按发送者隔离会话;话题不受影响 |
|
|
75
|
+
| `busyMode` | `queue` | 忙碌时投递:`queue` / `steer` / `interrupt` |
|
|
76
|
+
| `cardThrottleMs` | `400` | 过程卡 patch 节流(毫秒) |
|
|
77
|
+
| `personaAutoSync` | `true` | 启动时把 SOUL 同步到 `$DSH_HOME/AGENTS.md` |
|
|
78
|
+
| `agentPreset` | `standard` | 新会话挂载的 dsh agent preset |
|
|
79
|
+
| `logLevel` | `info` | 文件日志级别:`info` / `debug` |
|
|
80
|
+
|
|
81
|
+
## 命令
|
|
82
|
+
|
|
83
|
+
| 命令 | 说明 |
|
|
84
|
+
|:--|:--|
|
|
85
|
+
| `/new` | 立即创建新会话;旧会话保留 |
|
|
86
|
+
| `/sessions [--all]` | 列出当前会话,或本聊天的全部会话 |
|
|
87
|
+
| `/rename <标题>` | 重命名当前会话 |
|
|
88
|
+
| `/resume [id\|尾号]` | 恢复上一条,或按完整 id / ≥8 位尾号切换 |
|
|
89
|
+
| `/adopt <id\|尾号>` | 把无归属的历史会话收养到当前 scope |
|
|
90
|
+
| `/status` | 当前会话状态 + 自检摘要 |
|
|
91
|
+
| `/stop` | 中断正在运行的一轮 |
|
|
92
|
+
| `/doctor [--json]` | 体检报告:运行时 / 飞书 / 人格 / 会话 / 存储 / 版本 |
|
|
93
|
+
| `/selfcheck` | 立即重跑两阶段自检并输出逐项明细 |
|
|
94
|
+
| `/persona [show\|sync]` | 查看或同步 SOUL 人格块 |
|
|
95
|
+
| `/help` | 命令表 |
|
|
96
|
+
|
|
97
|
+
## Troubleshooting(故障排查)
|
|
98
|
+
|
|
99
|
+
- **日志里没有 `feishu long connection started`**:先发 `/doctor`,再看文件日志 `$DSH_HOME/caduceus/caduceus.log`。
|
|
100
|
+
- **`/doctor`**:逐项显示运行时、飞书、人格、会话、存储状态;`/doctor --json` 可给脚本或求助对象。
|
|
101
|
+
- **对话内提示**:自检失败会发 `⚠ 自检异常 …(详情 /doctor)`;恢复会发 `✓ 自检已恢复`。
|
|
102
|
+
- **`preset:applied` 失败**:agent 没挂 preset,等于没工具、没人格;检查 `agentPreset` 与 `agentPresets` 服务。
|
|
103
|
+
- **`persona:fresh` 失败**:`SOUL.md` 与 `$DSH_HOME/AGENTS.md` 的块不一致;发 `/persona sync` 或等下次启动自动同步。
|
|
104
|
+
- **安装报 `ERR_PNPM_IGNORED_BUILDS` / `ERR_PNPM_ALLOW_BUILD_MISSING_PACKAGE`**:见 Install 的 pnpm 说明。
|
|
105
|
+
|
|
106
|
+
## Limitations(限制)
|
|
107
|
+
|
|
108
|
+
- 一个飞书/Lark 应用只支持一路长连接消费者;不要在两个 dsh 实例里跑同一个应用。
|
|
109
|
+
- 命令回合(`/doctor`、`/status`、`/sessions` 等)不经过 agent,工具数在发正常消息前可能显示 `pending`。
|
|
110
|
+
- 人格投影目标是 `$DSH_HOME/AGENTS.md`;旧位置 `$DSH_AGENTS_HOME/AGENTS.md` 的块只会被提示,不会自动删除。
|
|
111
|
+
- 文件日志 5 MB 轮转,保留 3 份。
|
|
112
|
+
- 没有独立的 Web UI 安装向导;安装走 dsh CLI。
|
|
113
|
+
|
|
114
|
+
## Docs(文档)
|
|
115
|
+
|
|
116
|
+
- [docs/DESIGN.md](docs/DESIGN.md) — 设计与界面语义
|
|
117
|
+
- [docs/VERIFY.md](docs/VERIFY.md) — 隔离 profile 验证步骤
|
|
118
|
+
- [docs/](docs/) — 各刀记录(`SLICE*.md`)
|
|
119
|
+
|
|
120
|
+
## License(许可)
|
|
121
|
+
|
|
122
|
+
[MIT](LICENSE) © 2026 ArtomYuan
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-caduceus",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Feishu/Lark surface plugin for DeepSeek Harness (dsh): one topic per session, SOUL persona sync, streaming process cards, /status and /doctor.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"dist/",
|
|
38
38
|
"cordis.patch.yml",
|
|
39
39
|
"README.md",
|
|
40
|
-
"LICENSE"
|
|
40
|
+
"LICENSE",
|
|
41
|
+
"README.zh.md"
|
|
41
42
|
],
|
|
42
43
|
"engines": {
|
|
43
44
|
"node": ">=22.13",
|