openclaw-lark-multi-agent 1.8.4 → 1.8.6

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
@@ -101,17 +101,24 @@ lma install-windows-service
101
101
 
102
102
  ### Real-time steering
103
103
 
104
- When the agent is mid-run and a new message arrives, the bridge calls the
105
- bundled `lma-steer` plugin. The plugin resolves the active embedded run and only
106
- returns `steered` after queueing the message into that run. LMA then retains its
107
- durable pending trigger until a matching `session.message` proves transcript
108
- commitment/consumption, and only then switches Feishu from Typing to Get.
109
-
110
- OpenClaw's public `chat.send { queueMode: "steer" }` returns `started` even when
111
- a message falls through to a later ordinary run, so LMA does not use that
112
- ambiguous response as proof of realtime insertion. If the plugin is unavailable,
113
- there is no active run, or injection is rejected, the message safely stays in
114
- the normal queue and is never falsely shown as inserted.
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-steer-plugin [--no-force] # required for realtime mid-run insertion
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 messages use the bundled `lma-steer` plugin because public
475
- `chat.send { queueMode: "steer" }` cannot distinguish true in-run insertion from
476
- a later ordinary run. LMA keeps the durable trigger until `session.message`
477
- confirms consumption; this is also the signal for the visible Typing-to-Get
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
- 执行中插入的消息使用内置 `lma-steer` 插件。插件会解析当前 active embedded run,只有消息确实排入该 run 时才返回 `steered`。LMA 仍会保留本地 pending trigger,直到匹配的 `session.message` 确认消息已写入转录并被消费后才清除,同时把飞书标记从 Typing 切换为 Get。公开的 `chat.send { queueMode: "steer" }` 即使退化为稍后的普通 run 也只返回 `started`,因此不再把它当作实时插入成功的证据。插件不可用、没有 active run 或拒绝插入时,消息会安全保留在普通队列中,不会伪报已插入。
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-steer-plugin [--no-force]
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-steer-plugin
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 bundled lma-steer plugin used for observable realtime mid-run
210
- * insertion. LMA remains functional without it, but busy messages queue until
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 cmdInstallSteerPlugin(args) {
214
- console.warn("Note: lma-steer is required for confirmed realtime mid-run insertion; without it, busy messages remain safely queued.");
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-steer-plugin arguments: ${args.join(" ")}`);
221
- // Resolve the bundled plugin dir relative to this CLI file: dist/cli.js -> ../plugins/lma-steer.
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-steer");
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-steer plugin not found or not built at: ${pluginDir}`);
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-steer plugin from: ${pluginDir}`);
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-steer-plugin`);
246
+ console.error(`then rerun: ${CLI_NAME} install-core-plugin`);
247
247
  process.exit(res.code);
248
248
  }
249
- console.log(`\nlma-steer plugin installed. Restart the OpenClaw gateway to load it, e.g.:`);
250
- console.log(` systemctl --user restart openclaw-gateway.service`);
251
- console.log(`Then verify:`);
252
- console.log(` openclaw gateway call lma.steer --params '{"sessionKey":"test","text":"ping"}'`);
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 cmdInstallSteerPlugin(args);
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") {
@@ -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
  /**