@clawos-dev/clawd 0.2.443 → 0.2.444

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/dist/cli.cjs CHANGED
@@ -63018,7 +63018,7 @@ function computeMethodAccess(args) {
63018
63018
  }
63019
63019
 
63020
63020
  // src/version.ts
63021
- var version = "0.2.443".length > 0 ? "0.2.443" : "dev";
63021
+ var version = "0.2.444".length > 0 ? "0.2.444" : "dev";
63022
63022
 
63023
63023
  // src/cli-probe/probe.ts
63024
63024
  var fs66 = __toESM(require("fs"), 1);
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: clawd-orchestration
3
- description: 老板要 dispatch 任务给别的 persona、给联系人发 DM、排定时任务(shift/routine)、管授权联系人时触发
3
+ description: 老板要 dispatch 任务给别的 persona、给联系人发 DM、排定时任务(shift/routine)、管授权联系人,或问频道 / 话题 / 拆线 / 验收 / 收敛 / Master 相关的事(「这个话题结了没」「第 2 条线怎么样」「把这几个分身编成一组干一件事」)时触发
4
4
  ---
5
5
 
6
6
  # 任务调度 & DM & 定时 & 联系人管理
7
7
 
8
- 老板讲"派 xxx 干 yyy、给 xxx 发个消息、每天早上跑一下 zzz、给某人授权/撤销授权"就用这个 skill。
8
+ 老板讲"派 xxx 干 yyy、给 xxx 发个消息、每天早上跑一下 zzz、给某人授权/撤销授权、把这几个分身组织起来干一件事"就用这个 skill。
9
9
 
10
10
  ## 怎么答
11
11
 
@@ -17,6 +17,7 @@ description: 老板要 dispatch 任务给别的 persona、给联系人发 DM、
17
17
  | 给某人发 DM | `${CLAWOS_API}/api/docs/orchestration/inbox-guide.md` |
18
18
  | 排定时任务(`/schedule`、`/loop`、shift) | `${CLAWOS_API}/api/docs/orchestration/shift-guide.md` |
19
19
  | 授权联系人 / 撤销授权 / 看谁授过我啥 | `${CLAWOS_API}/api/docs/orchestration/contacts-guide.md` |
20
+ | 频道 / 话题(多分身拆线并行 + 逐条验收) | `${CLAWOS_API}/api/docs/orchestration/channel-topic-guide.md` |
20
21
 
21
22
  **能调的 MCP 工具**(daemon 已自动注入,直接调):
22
23
 
@@ -9,7 +9,7 @@ description: 老板要看 session 内容时触发——汇总某个时段的会
9
9
 
10
10
  ## 怎么答
11
11
 
12
- 先 fetch `${CLAWOS_API}/api/docs/session/session-format.md` 一次——了解 `~/.clawd/sessions/*.json` 的结构(哪个字段是对话内容、哪个是元信息、时间戳咋排)。
12
+ 先 fetch `${CLAWOS_API}/api/docs/session/session-format.md` 一次——了解 session 有哪些元信息字段、时间戳咋排、正文在哪。
13
13
 
14
14
  然后按老板需求挑:
15
15
 
@@ -17,20 +17,32 @@ description: 老板要看 session 内容时触发——汇总某个时段的会
17
17
  |---|---|
18
18
  | 常见观测意图怎么读(时段汇总 / 关键词搜 / 按 persona 切) | `${CLAWOS_API}/api/docs/session/common-queries.md` |
19
19
 
20
- **本机文件直接读**:`~/.clawd/sessions/*.json`——每个 session 一个 json 文件。
20
+ ### ⚠️ 一律走 RPC,不要扫 `~/.clawd/sessions/`
21
21
 
22
- **先窄化再展开**:session 文件可能很大,直接 Read 会撑爆 context。用 `jq` / `grep` / `find` 先按需窄化:
22
+ 两个独立的坑叠在一起,**都是静默返回空、不报错**:
23
23
 
24
- - 按时段:`find ~/.clawd/sessions -newermt "yesterday" -name "*.json"`
25
- - 按 persona:`jq -r 'select(.ownerPersonaId=="persona-xxx") | .sessionId' ~/.clawd/sessions/*.json`
26
- - 按关键词:`grep -l "话题" ~/.clawd/sessions/*.json`
27
- - 拿到 sessionId 后再 Read 具体那个 json 展开对话
24
+ 1. 对话正文不在 session 文件里(在 AI 工具自己的 transcript 里)→ grep 关键词永远搜不到
25
+ 2. 会话按归属分目录,`~/.clawd/sessions/` **只装不属于任何分身的**;分身名下的全在
26
+ `~/.clawd/personas/<personaId>/.clawd/sessions/owner/` → 拿 `ownerPersonaId` 筛那个目录**恒为空**
27
+
28
+ 别据此说"老板没聊过这事"/"这个分身没有会话"。三件事三个 RPC:
29
+
30
+ - **列会话**:`session:list({ownerPersonaId?, limit?, offset?})` —— 按 `updatedAt` 倒序回元信息
31
+ 全集(label / cwd / unreadAt / archivedAt / pinnedAt / dispatchedFromSessionId ...)。
32
+ 按时段、按 persona、找未读、找未归档**都在这一步的结果上过滤**
33
+ - **搜内容**:`session:searchContent({query, sessionIds, limit?})` —— 候选 id 自己从
34
+ `session:list` 按 `updatedAt` 倒序传进去(daemon 不自己筛)。只搜用户/助手说的话,
35
+ thinking、工具入参、工具结果**搜不到**,每条会话只回第一处命中
36
+ - **拉某条**:`history:read({sessionId, limit, slim: true})`。**`slim: true` 几乎总是要带**,
37
+ 否则工具调用原文吃掉一大块 context
28
38
 
29
39
  汇总时讲结论:几次 session、哪些 persona、每个 session 的主题一句话——不要把消息原文一股脑贴出来。老板要原文会明说"把 xxx session 完整给我"。
30
40
 
31
41
  ## fetch 失败了
32
42
 
33
- session-format 拉不到就先按经验读文件结构;common-queries 拉不到就自己组 jq/grep。**任何字段含义不确定就明说"这个字段我不确定含义,让 David 看一眼再答"**,别瞎解释。
43
+ 两份都拉不到就直接用 `session:list` / `session:searchContent` / `history:read` —— 参数名不确定
44
+ 就先 `list` 一下 RPC 清单。**别退回去扫 `~/.clawd/sessions/`**,那条路本身是坏的(见上)。
45
+ **任何字段含义不确定就明说"这个字段我不确定含义,让 David 看一眼再答"**,别瞎解释。
34
46
 
35
47
  ## 回答风格
36
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.443",
3
+ "version": "0.2.444",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",