@chbo297/infoflow 2026.5.7 → 2026.5.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/README.md CHANGED
@@ -43,22 +43,30 @@ BAIDU_NPM_REGISTRY=http://registry.npm.baidu-int.com bash scripts/deploy.sh
43
43
 
44
44
  方式 A:通过独立 tools 包安装并部署(推荐,支持 `update` 子命令)
45
45
 
46
+ <!-- sync:infoflow-plugin-version -->
46
47
  ```bash
47
48
  # 正式版(latest)
48
- npx -y @chbo297/infoflow-openclaw-tools update --version 2026.5.6 --registry https://registry.npmjs.org
49
+ npx -y @chbo297/infoflow-openclaw-tools update --version 2026.5.8 --registry https://registry.npmjs.org
50
+ ```
51
+ <!-- /sync:infoflow-plugin-version -->
49
52
 
50
- # Beta 版(示例)
51
- npx -y @chbo297/infoflow-openclaw-tools@beta update --version 2026.5.7-beta.2 --registry https://registry.npmjs.org
53
+ ```bash
54
+ # Beta 版(示例,版本号请按实际预发包替换)
55
+ npx -y @chbo297/infoflow-openclaw-tools@beta update --version 2026.5.8-beta.1 --registry https://registry.npmjs.org
52
56
  ```
53
57
 
54
58
  方式 B:通过 OpenClaw 插件命令安装
55
59
 
60
+ <!-- sync:infoflow-plugin-version -->
56
61
  ```bash
57
62
  # 正式版
58
- openclaw plugins install @chbo297/infoflow@2026.5.6
63
+ openclaw plugins install @chbo297/infoflow@2026.5.8
64
+ ```
65
+ <!-- /sync:infoflow-plugin-version -->
59
66
 
60
- # Beta 版(示例)
61
- openclaw plugins install @chbo297/infoflow@2026.5.7-beta.2
67
+ ```bash
68
+ # Beta 版(示例,版本号请按实际预发包替换)
69
+ openclaw plugins install @chbo297/infoflow@2026.5.8-beta.1
62
70
  ```
63
71
 
64
72
  安装后建议检查插件状态:
@@ -72,9 +80,11 @@ openclaw plugins inspect infoflow
72
80
 
73
81
  发布到 npm 后,可直接通过独立 tools 包执行安装/升级:
74
82
 
83
+ <!-- sync:infoflow-plugin-version -->
75
84
  ```bash
76
- npx -y @chbo297/infoflow-openclaw-tools update --version 2026.5.6 --registry https://registry.npmjs.org
85
+ npx -y @chbo297/infoflow-openclaw-tools update --version 2026.5.8 --registry https://registry.npmjs.org
77
86
  ```
87
+ <!-- /sync:infoflow-plugin-version -->
78
88
 
79
89
  常用参数:
80
90
 
@@ -97,29 +107,34 @@ npx -y @chbo297/infoflow-openclaw-tools update --version 2026.5.6 --registry htt
97
107
 
98
108
  ### 版本升级、打 tag、推送与 npm 发布流程
99
109
 
100
- 每次发布新版本(例如 `2026.5.6`)建议按以下顺序执行:
110
+ 每次发布新版本时,先将 `package.json` 的 `version` 设为待发版本号,再按下述顺序执行。上文「首次安装 / npx 更新」与下文发版流程中,各 bash 代码块外侧有一对用于自动替换的 HTML 注释标记;发版前请执行 **`npm run sync-readme-install-version`**,脚本会按当前 `package.json` 的 `version` 更新这些块内的版本号,以免 README 与 npm 不一致。
101
111
 
112
+ <!-- sync:infoflow-plugin-version -->
102
113
  ```bash
103
114
  # 1) 修改版本号(会同步 package-lock.json)
104
- npm version 2026.5.6 --no-git-tag-version
115
+ npm version 2026.5.8 --no-git-tag-version
116
+
117
+ # 2) 同步 README 中标记块内的推荐安装命令与下文中的 tag / commit 示例版本号
118
+ npm run sync-readme-install-version
105
119
 
106
- # 2) 发布前校验
120
+ # 3) 发布前校验
107
121
  npm run typecheck
108
122
  npm run test
109
123
  npm run build
110
124
 
111
- # 3) 提交版本变更
112
- git add package.json package-lock.json README.md scripts src
113
- git commit -m "2026.5.6"
125
+ # 4) 提交版本变更(含 README、CHANGELOG 等)
126
+ git add package.json package-lock.json README.md CHANGELOG.md scripts src
127
+ git commit -m "2026.5.8"
114
128
 
115
- # 4) 打 tag 并推送代码与 tag
116
- git tag 2026.5.6
129
+ # 5) 打 tag 并推送代码与 tag
130
+ git tag 2026.5.8
117
131
  git push origin main
118
- git push origin 2026.5.6
132
+ git push origin 2026.5.8
119
133
 
120
- # 5) 发布 npm(可按需指定 registry)
134
+ # 6) 发布 npm(可按需指定 registry)
121
135
  npm publish
122
136
  # 或
123
137
  # npm publish --registry https://registry.npmjs.org
124
138
  ```
139
+ <!-- /sync:infoflow-plugin-version -->
125
140
 
package/dist/src/bot.js CHANGED
@@ -309,6 +309,21 @@ function buildProactivePrompt() {
309
309
  buildReplyJudgmentRules(),
310
310
  ].join("\n");
311
311
  }
312
+ /**
313
+ * Appended last to every group-chat GroupSystemPrompt. Keeps the visible group reply
314
+ * conclusion-oriented: no raw tool transcripts or retrieval dumps; multi-step work
315
+ * stays in subagent (or equivalent) with only a synthesized answer to the group.
316
+ */
317
+ function buildGroupOutputHygienePrompt() {
318
+ return [
319
+ "# Group chat output (hard constraint)",
320
+ "",
321
+ "- Reply to the group with **only the final user-facing answer** in one concise message (or a few short messages if the channel requires splitting).",
322
+ "- **Do not** include tool-call traces, raw intermediate search/retrieval payloads, or long scratchpad-style reasoning in the group-visible text.",
323
+ "- If the task needs exploration across multiple steps, do that work in a **subagent** (or equivalent isolated context) and return **only** the merged conclusion to the group.",
324
+ "- If the user explicitly asks for your reasoning or steps, satisfy that with a **brief** numbered or bulleted summary **inside the same** conclusion-style reply — still **not** raw tool logs or full intermediate dumps.",
325
+ ].join("\n");
326
+ }
312
327
  // ---------------------------------------------------------------------------
313
328
  // Group reply tracking (in-memory) for follow-up window
314
329
  // ---------------------------------------------------------------------------
@@ -922,6 +937,12 @@ export async function handleInfoflowMessage(params) {
922
937
  ? `${existing}\n\n---\n\n${groupCfg.systemPrompt}`
923
938
  : groupCfg.systemPrompt;
924
939
  }
940
+ // Default output hygiene for every dispatched group message (always last)
941
+ const hygiene = buildGroupOutputHygienePrompt();
942
+ const beforeHygiene = ctxPayload.GroupSystemPrompt ?? "";
943
+ ctxPayload.GroupSystemPrompt = beforeHygiene
944
+ ? `${beforeHygiene}\n\n---\n\n${hygiene}`
945
+ : hygiene;
925
946
  }
926
947
  // Build unified target: "group:<id>" for group chat, username for private chat
927
948
  const to = isGroup && groupId !== undefined ? `group:${groupId}` : fromuser;
@@ -1000,3 +1021,5 @@ export const _extractMentionIds = extractMentionIds;
1000
1021
  export const _checkWatchRegex = checkWatchRegex;
1001
1022
  /** @internal — Check if message is a reply to one of the bot's own messages. Only exported for tests. */
1002
1023
  export const _checkReplyToBot = checkReplyToBot;
1024
+ /** @internal — Group output hygiene fragment appended to GroupSystemPrompt. Only exported for tests. */
1025
+ export const _buildGroupOutputHygienePrompt = buildGroupOutputHygienePrompt;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chbo297/infoflow",
3
- "version": "2026.5.7",
3
+ "version": "2026.5.8",
4
4
  "description": "OpenClaw Infoflow (如流) channel plugin for Baidu enterprise messaging",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -47,7 +47,8 @@
47
47
  "scripts": {
48
48
  "build": "rm -rf dist && tsc -p tsconfig.build.json",
49
49
  "typecheck": "tsc --noEmit",
50
- "test": "vitest run"
50
+ "test": "vitest run",
51
+ "sync-readme-install-version": "node scripts/sync-readme-install-version.mjs"
51
52
  },
52
53
  "devDependencies": {
53
54
  "typescript": "^6.0.3",