openclaw-lark-multi-agent 1.4.3 → 1.4.5
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 +38 -19
- package/README.zh-CN.md +14 -0
- package/dist/cli.js +4 -4
- package/dist/compact-progress.d.ts +4 -4
- package/dist/compact-progress.js +5 -5
- package/dist/feishu-bot.d.ts +28 -14
- package/dist/feishu-bot.js +322 -282
- package/dist/message-store.d.ts +4 -3
- package/dist/openclaw-client.d.ts +32 -25
- package/dist/openclaw-client.js +327 -158
- package/package.json +2 -2
- package/plugins/lma-steer/README.md +23 -30
- package/dist/session-file-compactor.d.ts +0 -39
- package/dist/session-file-compactor.js +0 -176
package/dist/message-store.d.ts
CHANGED
|
@@ -41,12 +41,13 @@ export interface DeliveryOutboxItem {
|
|
|
41
41
|
content: string;
|
|
42
42
|
attachmentsJson: string;
|
|
43
43
|
replyToMessageId: string;
|
|
44
|
-
/** Delivery mode. `patch_live_status`
|
|
45
|
-
*
|
|
44
|
+
/** Delivery mode. New final replies use `send`; `patch_live_status` is kept
|
|
45
|
+
* for status-only cleanup and restart compatibility with legacy outbox rows. */
|
|
46
46
|
deliveryMode?: "send" | "patch_live_status";
|
|
47
47
|
/** Existing interactive-card message id to patch for patch_live_status. */
|
|
48
48
|
targetMessageId?: string;
|
|
49
|
-
/** Persisted JSON
|
|
49
|
+
/** Persisted JSON delivery metadata (for example final-reply model footer,
|
|
50
|
+
* or legacy live-status cleanup metadata). */
|
|
50
51
|
deliveryMetaJson?: string;
|
|
51
52
|
/** Durable stage checkpoint: final text/card is already visible. */
|
|
52
53
|
textDelivered?: boolean;
|
|
@@ -21,7 +21,7 @@ export type ChatAttachment = {
|
|
|
21
21
|
fileName?: string;
|
|
22
22
|
content: string;
|
|
23
23
|
};
|
|
24
|
-
export declare const GATEWAY_PROTOCOL_MIN =
|
|
24
|
+
export declare const GATEWAY_PROTOCOL_MIN = 4;
|
|
25
25
|
export declare const GATEWAY_PROTOCOL_MAX = 4;
|
|
26
26
|
/**
|
|
27
27
|
* OpenClaw Gateway WebSocket client.
|
|
@@ -40,11 +40,14 @@ export declare class OpenClawClient {
|
|
|
40
40
|
/** Callbacks for tool events (verbose mode) */
|
|
41
41
|
private toolEventCallbacks;
|
|
42
42
|
private lastToolNamesByItemId;
|
|
43
|
+
/** Deduplicates 2026.8 canonical `agent.stream=tool` events against legacy
|
|
44
|
+
* `stream=item` mirrors when a runtime emits both representations. */
|
|
45
|
+
private recentToolEventKeys;
|
|
43
46
|
private sessionMessageCallbacks;
|
|
44
47
|
private progressCallbacks;
|
|
45
|
-
/** Per-session steered messages awaiting consumption confirmation.
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
+
/** Per-session steered messages awaiting consumption confirmation. Each
|
|
49
|
+
* accepted message is retained independently so identical/overlapping text
|
|
50
|
+
* cannot overwrite another correlation. */
|
|
48
51
|
private pendingSteerTexts;
|
|
49
52
|
/** Sessions where verbose mode should deliver visible transcript text even when mixed with tool blocks. */
|
|
50
53
|
private verboseTranscriptSessions;
|
|
@@ -57,9 +60,11 @@ export declare class OpenClawClient {
|
|
|
57
60
|
/** Session keys whose transcript/session.message updates are currently suppressed. */
|
|
58
61
|
private suppressedSessions;
|
|
59
62
|
private suppressedSessionTimers;
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
/** Run ids whose final delivery is owned by chatSend/collectReply. Delivery
|
|
64
|
+
* ownership must be run-scoped: a concurrent queueMode=steer admission may
|
|
65
|
+
* fall through to a separate ordinary run in the same session. */
|
|
66
|
+
private ownedDeliveryRuns;
|
|
67
|
+
private ownedDeliveryRunTimers;
|
|
63
68
|
/** Session keys whose proactive messages must be dropped by the bridge (e.g. discussion scheduler owns delivery). */
|
|
64
69
|
private mutedProactiveSessions;
|
|
65
70
|
private mutedProactiveSessionCounts;
|
|
@@ -83,6 +88,7 @@ export declare class OpenClawClient {
|
|
|
83
88
|
private extractVisibleAssistantText;
|
|
84
89
|
private isVerboseTranscriptEnabled;
|
|
85
90
|
private clearVerboseAssistantState;
|
|
91
|
+
private claimToolEvent;
|
|
86
92
|
private pruneVerboseCaches;
|
|
87
93
|
private flushVerboseAssistantState;
|
|
88
94
|
private handleVerboseAssistantStream;
|
|
@@ -128,21 +134,19 @@ export declare class OpenClawClient {
|
|
|
128
134
|
label?: string;
|
|
129
135
|
}): Promise<any>;
|
|
130
136
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
* - "no_active_run" -> no active run; caller should fall back to normal queueing
|
|
139
|
-
* - "rejected" -> active run refused the injection (compacting/not streaming)
|
|
140
|
-
* - "unavailable" -> the lma-steer plugin/method is not available (e.g. not
|
|
141
|
-
* installed or gateway not restarted); caller falls back.
|
|
137
|
+
* Submit a mid-run message through OpenClaw's public atomic steer path.
|
|
138
|
+
* OpenClaw 2026.8 deprecated the synchronous plugin primitive previously used
|
|
139
|
+
* by `lma-steer`: its boolean only represented immediate eligibility and could
|
|
140
|
+
* still be rejected asynchronously. `chat.send queueMode=steer` owns admission
|
|
141
|
+
* and transcript persistence. LMA still treats the RPC result as provisional;
|
|
142
|
+
* the Feishu reaction flips to Get only after a matching `session.message`
|
|
143
|
+
* confirms that the input was committed/consumed.
|
|
142
144
|
*/
|
|
143
145
|
steer(sessionKey: string, text: string, displayText?: string): Promise<{
|
|
144
|
-
status: "steered" | "
|
|
145
|
-
|
|
146
|
+
status: "steered" | "unavailable";
|
|
147
|
+
runId?: string;
|
|
148
|
+
/** Cancel provisional transcript correlation when LMA falls back to a normal run. */
|
|
149
|
+
cancelPending?: () => void;
|
|
146
150
|
}>;
|
|
147
151
|
/** Callbacks fired when a steered message is confirmed consumed by the model
|
|
148
152
|
* (matching sessionUser event). Keyed by bare/short session key. Multiple may
|
|
@@ -154,8 +158,9 @@ export declare class OpenClawClient {
|
|
|
154
158
|
* is actually consumed by the active run. The bridge uses this to flip the
|
|
155
159
|
* Feishu reaction from "Typing" (awaiting insertion) to "Get" (inserted).
|
|
156
160
|
* Return true from the callback to consume/remove it (one-shot). */
|
|
157
|
-
onSteerConsumed(sessionKey: string, cb: (text: string) => boolean | void): void;
|
|
161
|
+
onSteerConsumed(sessionKey: string, matchText: string, cb: (text: string) => boolean | void): () => void;
|
|
158
162
|
private shortKey;
|
|
163
|
+
private canonicalSessionKey;
|
|
159
164
|
private registerPendingSteer;
|
|
160
165
|
/**
|
|
161
166
|
* Called when a sessionUser event is seen for a session. If its text matches a
|
|
@@ -175,7 +180,9 @@ export declare class OpenClawClient {
|
|
|
175
180
|
ensureModel(sessionKey: string, expectedModel: string): Promise<boolean>;
|
|
176
181
|
deleteSession(key: string, deleteTranscript?: boolean): Promise<any>;
|
|
177
182
|
resetSession(key: string): Promise<any>;
|
|
178
|
-
compactSession(key: string
|
|
183
|
+
compactSession(key: string, options?: {
|
|
184
|
+
maxLines?: number;
|
|
185
|
+
}): Promise<any>;
|
|
179
186
|
/**
|
|
180
187
|
* Send a message to a session and get the agent reply.
|
|
181
188
|
* deliver=false prevents OpenClaw from auto-posting to channels.
|
|
@@ -187,9 +194,8 @@ export declare class OpenClawClient {
|
|
|
187
194
|
private emitProactiveForSession;
|
|
188
195
|
private suppressSessionKeys;
|
|
189
196
|
private releaseSuppressedSessionKeysAfter;
|
|
190
|
-
private
|
|
191
|
-
private
|
|
192
|
-
private isOwnedDeliverySession;
|
|
197
|
+
private ownDeliveryRun;
|
|
198
|
+
private releaseOwnedDeliveryRunAfter;
|
|
193
199
|
private addMutedProactiveKey;
|
|
194
200
|
private releaseMutedProactiveKey;
|
|
195
201
|
muteProactiveDelivery(sessionKey: string): (delayMs?: number) => void;
|
|
@@ -253,6 +259,7 @@ export declare class OpenClawClient {
|
|
|
253
259
|
*/
|
|
254
260
|
subscribeSession(sessionKey: string, onMessage: (text: string, meta?: {
|
|
255
261
|
sourceType?: string;
|
|
262
|
+
runId?: string;
|
|
256
263
|
}) => void): Promise<void>;
|
|
257
264
|
setVerboseTranscriptDelivery(sessionKey: string, enabled: boolean): void;
|
|
258
265
|
unsubscribeSession(sessionKey: string): Promise<void>;
|