openclaw-lark-multi-agent 1.4.2 → 1.4.4
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 +7 -6
- package/README.zh-CN.md +8 -2
- package/config.example.json +1 -1
- package/dist/cli.js +1 -1
- package/dist/feishu-bot.d.ts +23 -10
- package/dist/feishu-bot.js +396 -99
- package/dist/live-status.d.ts +17 -0
- package/dist/live-status.js +27 -0
- package/dist/message-store.d.ts +30 -0
- package/dist/message-store.js +162 -8
- package/dist/openclaw-client.d.ts +4 -0
- package/dist/openclaw-client.js +75 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ This project is a bridge layer for OpenClaw. It does **not** implement an agent
|
|
|
10
10
|
|
|
11
11
|
Lark/Feishu gives each bot its own app identity, but OpenClaw normally exposes one assistant identity per channel account. This bridge lets you create several Lark bots such as:
|
|
12
12
|
|
|
13
|
-
- `GPT Bot` → `
|
|
13
|
+
- `GPT Bot` → `phgeek-gw/gpt-5.6-sol`
|
|
14
14
|
- `Gemini Bot` → `github-copilot/gemini-3.1-pro-preview`
|
|
15
15
|
- `Claude Bot` → `github-copilot/claude-opus-4.7`
|
|
16
16
|
|
|
@@ -37,7 +37,7 @@ All of them connect to the same OpenClaw Gateway while keeping sessions, queues,
|
|
|
37
37
|
- Feishu image download and OpenClaw multimodal attachment forwarding
|
|
38
38
|
- Bridge attachment marker protocol for generated files/images/documents
|
|
39
39
|
- Feishu CardKit v2 Markdown rendering, including native table elements for pipe tables
|
|
40
|
-
- Live status card: in non-verbose mode each run shows a
|
|
40
|
+
- Live status card: in non-verbose mode each run shows a self-updating Feishu interactive card (title + recent activity window with per-line timestamps + elapsed footer, refreshed once per second), which collapses to tool-call count + elapsed on a clean finish; the final answer is sent separately at the bottom with a model footer
|
|
41
41
|
- Bridge-level slash commands and escaped OpenClaw slash commands
|
|
42
42
|
- `/discuss` mode for barrier-style multi-bot group discussion, including per-round markers and no-reply status notices
|
|
43
43
|
- `/chairman` role: a single per-group chairman that answers plain messages when no bot is in Free mode, and acts as host, challenger, and summarizer inside `/discuss`
|
|
@@ -149,7 +149,7 @@ Edit `config.json`:
|
|
|
149
149
|
"name": "GPT",
|
|
150
150
|
"appId": "cli_xxx",
|
|
151
151
|
"appSecret": "YOUR_LARK_APP_SECRET",
|
|
152
|
-
"model": "
|
|
152
|
+
"model": "phgeek-gw/gpt-5.6-sol"
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
"name": "Gemini",
|
|
@@ -463,7 +463,7 @@ While running, the card shows:
|
|
|
463
463
|
- a rolling window of the most recent activity lines (tool start `▸`, tool end
|
|
464
464
|
`✓`, and intermediate assistant text `•`), each prefixed with the relative
|
|
465
465
|
time `mm:ss` since the run started;
|
|
466
|
-
- a footer with elapsed time
|
|
466
|
+
- a footer with elapsed time.
|
|
467
467
|
|
|
468
468
|
The card is created lazily (a fast reply that finishes within the create delay
|
|
469
469
|
never spawns a card, to avoid flicker) and is updated with `im.message.patch`,
|
|
@@ -479,8 +479,9 @@ When the run ends:
|
|
|
479
479
|
header, so the steps leading up to the failure stay visible for debugging.
|
|
480
480
|
|
|
481
481
|
The final answer is always delivered separately through the normal interactive-card
|
|
482
|
-
delivery path, so
|
|
483
|
-
|
|
482
|
+
delivery path, so it is created at completion time and remains below any user messages
|
|
483
|
+
inserted during the run. Its footer shows only the bound model name. The live-status
|
|
484
|
+
card remains a distinct earlier message and owns tool-call count + elapsed time.
|
|
484
485
|
|
|
485
486
|
Live status is on by default and can be toggled per bot/chat with
|
|
486
487
|
`/livestatus [on|off]`. It can be disabled globally by setting
|
package/README.zh-CN.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
Lark/飞书里每个机器人都有自己的 App 身份,但 OpenClaw 通常在一个 channel account 下暴露一个助手身份。这个桥接层可以让你创建多个飞书机器人,例如:
|
|
12
12
|
|
|
13
|
-
- `GPT Bot` → `
|
|
13
|
+
- `GPT Bot` → `phgeek-gw/gpt-5.6-sol`
|
|
14
14
|
- `Gemini Bot` → `github-copilot/gemini-3.1-pro-preview`
|
|
15
15
|
- `Claude Bot` → `github-copilot/claude-opus-4.7`
|
|
16
16
|
|
|
@@ -127,7 +127,7 @@ cp config.example.json config.json
|
|
|
127
127
|
"name": "GPT",
|
|
128
128
|
"appId": "cli_xxx",
|
|
129
129
|
"appSecret": "YOUR_LARK_APP_SECRET",
|
|
130
|
-
"model": "
|
|
130
|
+
"model": "phgeek-gw/gpt-5.6-sol"
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
"name": "Gemini",
|
|
@@ -408,6 +408,12 @@ v1 行为边界:如果消息已经进入 OpenClaw 正在处理,暂不 abort
|
|
|
408
408
|
|
|
409
409
|
如果 Agent 需要发送生成的文件、图片或文档,应使用 bridge attachment marker 协议,而不是直接调用飞书消息工具。桥接层会从可见回复中剥离 marker,校验文件路径位于配置的附件目录下,然后上传/发送附件,并写入本地上下文。Markdown 文档也可以通过这个路径转换成飞书云文档。
|
|
410
410
|
|
|
411
|
+
## Live Status 与最终回复
|
|
412
|
+
|
|
413
|
+
非 verbose 模式下,执行过程显示一张可更新的 live status 卡片。运行中显示最近活动和耗时;完成后收缩为“累计工具调用次数 + 总耗时”。
|
|
414
|
+
|
|
415
|
+
最终回复不会覆盖旧的 live status,而是在任务完成时新发一张卡片,因此用户执行途中插入的新消息不会排在最终答案之后。最终回复卡片底部只显示本次使用的模型名;工具调用次数和耗时只保留在 live status 中。
|
|
416
|
+
|
|
411
417
|
## 数据模型
|
|
412
418
|
|
|
413
419
|
SQLite 状态位于配置的数据目录。主要表:
|
package/config.example.json
CHANGED
package/dist/cli.js
CHANGED
package/dist/feishu-bot.d.ts
CHANGED
|
@@ -35,6 +35,13 @@ export declare class FeishuBot {
|
|
|
35
35
|
private sendQueue;
|
|
36
36
|
/** Per-chat delayed runtime failure notifications, canceled if a real reply arrives. */
|
|
37
37
|
private delayedFailureTimers;
|
|
38
|
+
/** Ephemeral model footer overrides used by final-message wrappers. Keeping
|
|
39
|
+
* replyMessage/sendMessage two-argument APIs avoids contaminating ordinary
|
|
40
|
+
* command/error/card sends with model attribution. */
|
|
41
|
+
private replyModelFooters;
|
|
42
|
+
private sendModelFooters;
|
|
43
|
+
/** Per-chat durable outbox retry timer. */
|
|
44
|
+
private deliveryRetryTimers;
|
|
38
45
|
/** Last time a real assistant-visible reply was successfully handed to the delivery pipeline. */
|
|
39
46
|
private lastRealDeliveryAt;
|
|
40
47
|
/** Per-chat: whether we've already sent the high-context alert this cycle. */
|
|
@@ -118,6 +125,11 @@ export declare class FeishuBot {
|
|
|
118
125
|
private cleanMentions;
|
|
119
126
|
private stripLeadingCommandMentions;
|
|
120
127
|
private buildMarkdownCard;
|
|
128
|
+
private deliveryOwnsVisiblePayload;
|
|
129
|
+
private completionSummary;
|
|
130
|
+
/** Best-effort terminal cleanup for status-only rows and legacy v1.4.3
|
|
131
|
+
* outbox entries that once targeted the live-status card. */
|
|
132
|
+
private patchLiveStatusDoneSummary;
|
|
121
133
|
private formatUserVisibleError;
|
|
122
134
|
private isBridgeControlReply;
|
|
123
135
|
private isLegacyBridgeControlMessage;
|
|
@@ -126,16 +138,14 @@ export declare class FeishuBot {
|
|
|
126
138
|
* Heuristic: does this reply look truncated / cut off mid-task? Used as the
|
|
127
139
|
* SOLE auto-retry trigger — if true, we ask the session a one-line “done?” probe.
|
|
128
140
|
*
|
|
129
|
-
* Signals
|
|
130
|
-
* 1.
|
|
131
|
-
* 2.
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* treated as likely unfinished. A false positive only costs one cheap,
|
|
138
|
-
* invisible confirmation probe; the session itself is the real arbiter.
|
|
141
|
+
* Signals are intentionally HIGH PRECISION. A reply is suspicious only when:
|
|
142
|
+
* 1. Its Markdown/code structure is visibly unclosed; or
|
|
143
|
+
* 2. It ends on punctuation/words that grammatically demand continuation.
|
|
144
|
+
*
|
|
145
|
+
* Merely lacking a final punctuation mark is NOT enough. Short answers,
|
|
146
|
+
* headings, model lists, paths, hashes, commands, English labels, and normal
|
|
147
|
+
* chat prose routinely end without punctuation; treating all of them as
|
|
148
|
+
* truncated caused obvious false-positive confirmation probes.
|
|
139
149
|
*/
|
|
140
150
|
private looksTruncated;
|
|
141
151
|
/** Current context usage percent for a session (totalTokens / contextTokens),
|
|
@@ -178,6 +188,7 @@ export declare class FeishuBot {
|
|
|
178
188
|
private deliverySourceId;
|
|
179
189
|
private sendSystemDelivery;
|
|
180
190
|
private enqueueAndDispatchDelivery;
|
|
191
|
+
private scheduleDeliveryRetry;
|
|
181
192
|
private dispatchPendingDeliveries;
|
|
182
193
|
private hasFreeModeBot;
|
|
183
194
|
private mentionedBotNames;
|
|
@@ -218,6 +229,7 @@ export declare class FeishuBot {
|
|
|
218
229
|
private replyTextMessage;
|
|
219
230
|
private editTextMessage;
|
|
220
231
|
private deleteMessageById;
|
|
232
|
+
private replyFinalMessage;
|
|
221
233
|
private replyMessage;
|
|
222
234
|
private extractBridgeAttachments;
|
|
223
235
|
/**
|
|
@@ -262,6 +274,7 @@ export declare class FeishuBot {
|
|
|
262
274
|
/**
|
|
263
275
|
* Send a proactive message to a chat (not a reply).
|
|
264
276
|
*/
|
|
277
|
+
private sendFinalMessage;
|
|
265
278
|
private sendMessage;
|
|
266
279
|
/**
|
|
267
280
|
* Enqueue a message send to guarantee ordering per chat.
|