openclaw-lark-multi-agent 1.8.3 → 1.8.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 +23 -17
- package/README.zh-CN.md +3 -1
- package/dist/cli.js +19 -20
- package/dist/feishu-bot.d.ts +10 -0
- package/dist/feishu-bot.js +611 -347
- package/dist/message-store.d.ts +63 -1
- package/dist/message-store.js +336 -8
- package/dist/openclaw-client.d.ts +50 -24
- package/dist/openclaw-client.js +355 -133
- package/dist/session-status.d.ts +2 -0
- package/dist/session-status.js +1 -0
- package/docs/releases/1.8.5.md +65 -0
- package/package.json +10 -4
- package/plugins/lma-core/README.md +83 -0
- package/plugins/lma-core/dist/compaction.js +82 -0
- package/plugins/lma-core/dist/go-policy.js +25 -0
- package/plugins/lma-core/dist/go-registry.js +37 -0
- package/plugins/lma-core/dist/go.js +42 -0
- package/plugins/lma-core/dist/index.js +29 -0
- package/plugins/lma-core/dist/steer.js +212 -0
- package/plugins/lma-core/dist/tooltrim.js +152 -0
- package/plugins/lma-core/openclaw.plugin.json +45 -0
- package/plugins/lma-core/package.json +15 -0
- package/plugins/lma-steer/README.md +7 -0
- package/scripts/audit-delivery-context.mjs +49 -0
package/README.md
CHANGED
|
@@ -101,17 +101,24 @@ lma install-windows-service
|
|
|
101
101
|
|
|
102
102
|
### Real-time steering
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
the
|
|
104
|
+
Mid-run messages use the coordinated **lma-core** plugin (protocol 2). Inputs
|
|
105
|
+
are durably reserved before network work; a short submit/query RPC and paced
|
|
106
|
+
recovery keep waiting beyond 3/8 seconds and hours of temporary non-readiness.
|
|
107
|
+
The plugin actually uses public `queueAgentHarnessMessage` with the runtime's
|
|
108
|
+
`onQueueAccepted` callback. **Only callback true permits Get**; SDK boolean true
|
|
109
|
+
is an attempt, not acceptance. Get is backend acceptance, not model consumption.
|
|
110
|
+
Missing callbacks/lost responses remain unknown and cannot be automatically
|
|
111
|
+
replayed. Only a proven never-dispatched input whose original run truly ended
|
|
112
|
+
can be explicitly handed to the ordinary queue once after confirmed idle.
|
|
113
|
+
|
|
114
|
+
Install the matching consolidated plugin with `lma install-core-plugin` (the
|
|
115
|
+
old `install-steer-plugin` command is now an alias). Retire old standalone
|
|
116
|
+
lma-steer/lma-go entries through supported plugin controls to avoid duplicate
|
|
117
|
+
RPC owners. Installation is not activation proof: after authorized plugin load,
|
|
118
|
+
check `lma.steer.capabilities` read-only for protocol 2 / durableAttempts true.
|
|
119
|
+
`atomicRunBound` is honestly **false**: session generation and lifecycle fences
|
|
120
|
+
are not a host final-effect original-run CAS; that stronger promise is not
|
|
121
|
+
required to enable normal current-session inputs. See [1.8.5 notes](docs/releases/1.8.5.md).
|
|
115
122
|
|
|
116
123
|
Useful CLI commands:
|
|
117
124
|
|
|
@@ -121,7 +128,7 @@ lma doctor
|
|
|
121
128
|
lma start [config]
|
|
122
129
|
lma init [--state-dir DIR] [--force]
|
|
123
130
|
lma install-systemd [--user|--system] [--state-dir DIR]
|
|
124
|
-
lma install-
|
|
131
|
+
lma install-core-plugin [--no-force] # coordinated persistent real-time insertion
|
|
125
132
|
```
|
|
126
133
|
|
|
127
134
|
## Quick start from source
|
|
@@ -471,11 +478,10 @@ when that list is non-empty. Exact refs and `provider/*` wildcards are accepted.
|
|
|
471
478
|
LMA now surfaces a model-policy rejection instead of logging a false “model
|
|
472
479
|
ensured” success.
|
|
473
480
|
|
|
474
|
-
Mid-run
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
transition. Without the plugin, messages remain safely queued.
|
|
481
|
+
Mid-run insertion uses lma-core's durable backend callback receipts, not a
|
|
482
|
+
boolean eligibility value or a text-matched transcript echo. Public
|
|
483
|
+
`chat.send { queueMode: "steer" }` cannot distinguish live insertion from ordinary
|
|
484
|
+
followup, so it is not used to manufacture a realtime-insertion receipt.
|
|
479
485
|
|
|
480
486
|
## Live status
|
|
481
487
|
|
package/README.zh-CN.md
CHANGED
|
@@ -422,7 +422,9 @@ LMA 以 Gateway protocol 4 为基线,并使用 `openclaw@2026.8.2` 构建和
|
|
|
422
422
|
|
|
423
423
|
新版把模型元数据与模型覆盖允许列表分开。如果 `agents.defaults.modelPolicy.allow` 非空,LMA 配置中的每个模型都必须被该列表的精确模型引用或 `provider/*` 通配符允许。遇到拒绝时,LMA 会直接报告 model policy 错误,不再错误记录“模型已确保”。
|
|
424
424
|
|
|
425
|
-
|
|
425
|
+
执行中插入使用配套 **lma-core / protocol 2** 插件。入站先持久预留消息;短 submit/query RPC 加 paced 恢复调度会跨过 3/8 秒乃至小时级未 ready 等待,不按消息年龄放弃。插件真实调用公开 `queueAgentHarnessMessage(..., { onQueueAccepted })`,**只有 backend callback true 才 Get**;同步 boolean true 只是尝试。Get 不是模型已消费;callback 缺失、断线或未知尝试不可自动重发。只有确定从未 dispatch 给 backend、原 run 已明确结束且会话确认 idle 时,才明示交回普通队列唯一执行一次。
|
|
426
|
+
|
|
427
|
+
安装入口为 `lma install-core-plugin`,旧 `lma install-steer-plugin` 现在是同一入口的兼容别名。通过支持的插件管理入口退役旧 standalone lma-steer/lma-go,避免重复 RPC owner。文件安装不等于运行生效;授权加载后应只读验证 `lma.steer.capabilities` 的 protocol 2 / durableAttempts / acceptanceCallback。`atomicRunBound:false` 如实披露:会话代际和 lifecycle 围栏不冒充 host 最终副作用处原 run CAS,但这不再成为禁用正常当前会话插入的自设前置。详见 [1.8.5 候选说明](docs/releases/1.8.5.md)。
|
|
426
428
|
|
|
427
429
|
## Live Status 与最终回复
|
|
428
430
|
|
package/dist/cli.js
CHANGED
|
@@ -22,7 +22,8 @@ Usage:
|
|
|
22
22
|
${CLI_NAME} init [--state-dir DIR] [--force]
|
|
23
23
|
${CLI_NAME} install-systemd [--user|--system] [--state-dir DIR] [--no-restart]
|
|
24
24
|
${CLI_NAME} install-windows-service [--state-dir DIR] [--no-start]
|
|
25
|
-
${CLI_NAME} install-
|
|
25
|
+
${CLI_NAME} install-core-plugin [--no-force]
|
|
26
|
+
${CLI_NAME} install-steer-plugin [--no-force] (compatibility alias)
|
|
26
27
|
${CLI_NAME} doctor [--state-dir DIR]
|
|
27
28
|
${CLI_NAME} --help
|
|
28
29
|
|
|
@@ -31,7 +32,7 @@ Examples:
|
|
|
31
32
|
${CLI_NAME} start ~/.openclaw/${APP_NAME}/config.json
|
|
32
33
|
${CLI_NAME} install-systemd --user
|
|
33
34
|
${CLI_NAME} install-windows-service
|
|
34
|
-
${CLI_NAME} install-
|
|
35
|
+
${CLI_NAME} install-core-plugin
|
|
35
36
|
|
|
36
37
|
(The command is also available as \`${APP_NAME}\` for back-compat.)
|
|
37
38
|
`);
|
|
@@ -206,29 +207,28 @@ function runCapture(cmd, args) {
|
|
|
206
207
|
}
|
|
207
208
|
}
|
|
208
209
|
/**
|
|
209
|
-
* Install the
|
|
210
|
-
*
|
|
211
|
-
* the active run completes.
|
|
210
|
+
* Install the coordinated consolidated plugin, including callback receipts.
|
|
211
|
+
* Keep the old command as an alias, not an installer for a retired boolean API.
|
|
212
212
|
*/
|
|
213
|
-
function
|
|
214
|
-
console.warn("Note: lma-
|
|
213
|
+
function cmdInstallCorePlugin(args) {
|
|
214
|
+
console.warn("Note: use the coordinated lma-core plugin for durable callback-confirmed insertion. Retire old lma-steer/lma-go entries through the supported plugin controls; do not load duplicate RPC owners.");
|
|
215
215
|
// Default to --force so reinstalling an updated bundled plugin overwrites the
|
|
216
216
|
// previously installed copy. Pass --no-force to keep an existing install.
|
|
217
217
|
const noForce = hasFlag(args, "--no-force");
|
|
218
218
|
hasFlag(args, "--force");
|
|
219
219
|
if (args.length > 0)
|
|
220
|
-
throw new Error(`Unknown install-
|
|
221
|
-
// Resolve the bundled plugin dir relative to this CLI file: dist/cli.js -> ../plugins/lma-
|
|
220
|
+
throw new Error(`Unknown install-core-plugin arguments: ${args.join(" ")}`);
|
|
221
|
+
// Resolve the bundled plugin dir relative to this CLI file: dist/cli.js -> ../plugins/lma-core.
|
|
222
222
|
const cliDir = dirname(fileURLToPath(import.meta.url));
|
|
223
|
-
const pluginDir = resolve(cliDir, "..", "plugins", "lma-
|
|
223
|
+
const pluginDir = resolve(cliDir, "..", "plugins", "lma-core");
|
|
224
224
|
if (!existsSync(resolve(pluginDir, "openclaw.plugin.json")) || !existsSync(resolve(pluginDir, "dist", "index.js"))) {
|
|
225
|
-
throw new Error(`bundled lma-
|
|
225
|
+
throw new Error(`bundled lma-core plugin not found or not built at: ${pluginDir}`);
|
|
226
226
|
}
|
|
227
227
|
const openclawBin = process.env.OPENCLAW_BIN || "openclaw";
|
|
228
228
|
const installArgs = ["plugins", "install", pluginDir];
|
|
229
229
|
if (!noForce)
|
|
230
230
|
installArgs.push("--force");
|
|
231
|
-
console.log(`Installing lma-
|
|
231
|
+
console.log(`Installing lma-core plugin from: ${pluginDir}`);
|
|
232
232
|
const res = runCapture(openclawBin, installArgs);
|
|
233
233
|
if (res.code !== 0) {
|
|
234
234
|
if (res.spawnError) {
|
|
@@ -243,14 +243,13 @@ function cmdInstallSteerPlugin(args) {
|
|
|
243
243
|
console.error(`\n"${openclawBin} plugins install" failed (exit ${res.code}).`);
|
|
244
244
|
console.error(`Make sure the OpenClaw CLI is installed and on PATH (or set OPENCLAW_BIN),`);
|
|
245
245
|
}
|
|
246
|
-
console.error(`then rerun: ${CLI_NAME} install-
|
|
246
|
+
console.error(`then rerun: ${CLI_NAME} install-core-plugin`);
|
|
247
247
|
process.exit(res.code);
|
|
248
248
|
}
|
|
249
|
-
console.log(`\nlma-
|
|
250
|
-
console.log(`
|
|
251
|
-
console.log(`
|
|
252
|
-
console.log(`
|
|
253
|
-
console.log(` (expect {"status":"no_active_run"} for an idle session)`);
|
|
249
|
+
console.log(`\nlma-core files installed; this is not runtime activation proof.`);
|
|
250
|
+
console.log(`Load/reload with the Gateway's supported plugin control path, then verify the read-only capability endpoint:`);
|
|
251
|
+
console.log(` openclaw gateway call lma.steer.capabilities --params '{}'`);
|
|
252
|
+
console.log(` (expect protocol:2, durableAttempts:true, acceptanceCallback:true, atomicRunBound:false)`);
|
|
254
253
|
}
|
|
255
254
|
function cmdDoctor(args) {
|
|
256
255
|
const stateDir = resolve(takeOption(args, "--state-dir") || DEFAULT_STATE_DIR);
|
|
@@ -274,8 +273,8 @@ async function main() {
|
|
|
274
273
|
return cmdInstallSystemd(args);
|
|
275
274
|
if (cmd === "install-windows-service")
|
|
276
275
|
return cmdInstallWindowsService(args);
|
|
277
|
-
if (cmd === "install-steer-plugin")
|
|
278
|
-
return
|
|
276
|
+
if (cmd === "install-core-plugin" || cmd === "install-steer-plugin")
|
|
277
|
+
return cmdInstallCorePlugin(args);
|
|
279
278
|
if (cmd === "doctor")
|
|
280
279
|
return cmdDoctor(args);
|
|
281
280
|
if (cmd === "start") {
|
package/dist/feishu-bot.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export declare class FeishuBot {
|
|
|
31
31
|
private recentVerboseToolMessages;
|
|
32
32
|
/** Per-chat processQueue lock to avoid duplicate concurrent chat.send runs */
|
|
33
33
|
private queueRuns;
|
|
34
|
+
private queueOwners;
|
|
34
35
|
/** Per-chat serial send queue to guarantee message order */
|
|
35
36
|
private sendQueue;
|
|
36
37
|
/** Per-chat delayed runtime failure notifications, canceled if a real reply arrives. */
|
|
@@ -61,6 +62,7 @@ export declare class FeishuBot {
|
|
|
61
62
|
private installGoReceiptCapture;
|
|
62
63
|
private goController;
|
|
63
64
|
/** Per-chat durable outbox retry timer. */
|
|
65
|
+
private localDeliveryRetryCustody;
|
|
64
66
|
private deliveryRetryTimers;
|
|
65
67
|
/** Last time a real assistant-visible reply was successfully handed to the delivery pipeline. */
|
|
66
68
|
private lastRealDeliveryAt;
|
|
@@ -116,6 +118,14 @@ export declare class FeishuBot {
|
|
|
116
118
|
static getByName(name: string): FeishuBot | undefined;
|
|
117
119
|
static findByOpenId(openId: string): FeishuBot | undefined;
|
|
118
120
|
private handleMessage;
|
|
121
|
+
private stopGeneration;
|
|
122
|
+
private reactionChecks;
|
|
123
|
+
private receiptReaction;
|
|
124
|
+
private reconcileReactions;
|
|
125
|
+
private insertionTimer?;
|
|
126
|
+
private insertionChecks;
|
|
127
|
+
private scheduleInsertionRecovery;
|
|
128
|
+
private reconcileInsertions;
|
|
119
129
|
private shouldUseLiveStatus;
|
|
120
130
|
private getUnhealthySessionStatus;
|
|
121
131
|
/**
|