@colinlu50/openclaw-lark-stream 260330.1.0 → 260330.1.1

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.en.md CHANGED
@@ -23,6 +23,8 @@ The official plugin delivers LLM block results all at once after completion. Thi
23
23
 
24
24
  ## 📢 News
25
25
 
26
+ - **2026.3.30**
27
+ - ⚠️ **OpenClaw 3.28 is not currently supported** due to compatibility issues. Please downgrade to **3.24**. (Support expected before Apr 4)
26
28
  - **2026.3.27**
27
29
  - Compatible with OpenClaw >= 2026.3.22
28
30
  - Added AskUserQuestion interactive tool
@@ -35,6 +37,12 @@ The official plugin delivers LLM block results all at once after completion. Thi
35
37
 
36
38
  Requires [OpenClaw](https://openclaw.ai) and Node.js (>= v22).
37
39
 
40
+ > [!WARNING]
41
+ > **OpenClaw 3.28 is not currently supported** due to compatibility issues (support expected before Apr 4). If you've already upgraded to 3.28, please downgrade to **3.24** before installing:
42
+ > ```bash
43
+ > npm install -g openclaw@2026.3.24
44
+ > ```
45
+
38
46
  The install script automatically detects your OpenClaw version and installs the right plugin:
39
47
  - OpenClaw **>= 2026.3.22** → installs the latest version (reasoning streaming, AskUserQuestion, etc.)
40
48
  - OpenClaw **< 2026.3.22** → installs the legacy-compatible version
@@ -69,9 +77,9 @@ Streaming is enabled by default after installation. To disable:
69
77
 
70
78
  ```bash
71
79
  openclaw config set channels.feishu.streaming false
72
- openclaw config set channels.feishu.replyMode.direct card
73
- openclaw config set channels.feishu.replyMode.group card
74
- openclaw config set channels.feishu.replyMode.default card
80
+ openclaw config set channels.feishu.replyMode.direct static
81
+ openclaw config set channels.feishu.replyMode.group static
82
+ openclaw config set channels.feishu.replyMode.default static
75
83
  openclaw gateway restart
76
84
  ```
77
85
 
package/README.md CHANGED
@@ -27,6 +27,8 @@
27
27
 
28
28
  ## 📢 News
29
29
 
30
+ - **2026.3.30**
31
+ - ⚠️ **暂不支持 OpenClaw 3.28**,该版本存在兼容性问题,建议回退到 **3.24** 版本(预计 4.4 前支持)
30
32
  - **2026.3.27**
31
33
  - 适配 OpenClaw >= 2026.3.22
32
34
  - 新增 AskUserQuestion 交互式提问工具
@@ -39,6 +41,12 @@
39
41
 
40
42
  需要 [OpenClaw](https://openclaw.ai) 和 Node.js(>= v22)。
41
43
 
44
+ > [!WARNING]
45
+ > **暂不支持 OpenClaw 3.28**,该版本存在兼容性问题(预计 4.4 前支持)。如已升级到 3.28,请回退到 **3.24** 版本后再安装:
46
+ > ```bash
47
+ > npm install -g openclaw@2026.3.24
48
+ > ```
49
+
42
50
  安装脚本会自动检测 OpenClaw 版本并安装对应的插件版本:
43
51
  - OpenClaw **>= 2026.3.22** → 自动安装最新版(支持推理流式、AskUserQuestion 等)
44
52
  - OpenClaw **< 2026.3.22** → 自动安装兼容旧版的插件
@@ -73,9 +81,9 @@ openclaw gateway restart
73
81
 
74
82
  ```bash
75
83
  openclaw config set channels.feishu.streaming false
76
- openclaw config set channels.feishu.replyMode.direct card
77
- openclaw config set channels.feishu.replyMode.group card
78
- openclaw config set channels.feishu.replyMode.default card
84
+ openclaw config set channels.feishu.replyMode.direct static
85
+ openclaw config set channels.feishu.replyMode.group static
86
+ openclaw config set channels.feishu.replyMode.default static
79
87
  openclaw gateway restart
80
88
  ```
81
89
 
@@ -56,20 +56,27 @@ async function runInstall() {
56
56
  }
57
57
  console.log(`\n✅ Plugin installed successfully.`);
58
58
 
59
- // 4. Ensure plugins.allow includes our plugin ID
59
+ // 4. Disable built-in feishu plugin & enable our plugin
60
+ disableBuiltinFeishu();
60
61
  ensurePluginAllowed("openclaw-lark-stream");
61
62
 
62
63
  // 5. Bot configuration (interactive)
63
64
  await configureBotIfNeeded();
64
65
 
65
- // 6. Restart gateway
66
+ // 6. Restart gateway (install first to register service, then restart)
66
67
  console.log("\nRestarting gateway...");
68
+ try {
69
+ execSync("openclaw gateway install", { stdio: "inherit" });
70
+ } catch { /* older versions may not support this */ }
67
71
  try {
68
72
  execSync("openclaw gateway restart", { stdio: "inherit" });
69
73
  } catch {
70
74
  console.log("Gateway restart failed. You can manually run: openclaw gateway restart");
71
75
  }
72
76
 
77
+ // 7. Health check
78
+ await healthCheck();
79
+
73
80
  console.log("\n🎉 All done!");
74
81
  }
75
82
 
@@ -231,6 +238,52 @@ function readConfig() {
231
238
  * Remove all plugin directories, staging leftovers, and stale config
232
239
  * references so that openclaw has a clean state for the next install.
233
240
  */
241
+ /**
242
+ * Disable the built-in feishu plugin and explicitly enable ours,
243
+ * mirroring the official @larksuite/openclaw-lark installer behavior.
244
+ */
245
+ function disableBuiltinFeishu() {
246
+ const cfg = readConfig();
247
+ if (!cfg.plugins) cfg.plugins = {};
248
+ if (!cfg.plugins.entries) cfg.plugins.entries = {};
249
+
250
+ // Disable built-in feishu plugin
251
+ if (!cfg.plugins.entries.feishu) cfg.plugins.entries.feishu = { enabled: false };
252
+ cfg.plugins.entries.feishu.enabled = false;
253
+
254
+ // Enable our plugin
255
+ if (!cfg.plugins.entries["openclaw-lark-stream"]) {
256
+ cfg.plugins.entries["openclaw-lark-stream"] = { enabled: true };
257
+ } else {
258
+ cfg.plugins.entries["openclaw-lark-stream"].enabled = true;
259
+ }
260
+
261
+ writeFileSync(CONFIG_FILE, JSON.stringify(cfg, null, 2) + "\n", "utf8");
262
+ console.log("Disabled built-in feishu plugin, enabled openclaw-lark-stream.");
263
+ }
264
+
265
+ /**
266
+ * Post-install health check — wait for gateway to come up.
267
+ */
268
+ async function healthCheck() {
269
+ await new Promise((r) => setTimeout(r, 1000));
270
+ for (let i = 0; i < 5; i++) {
271
+ try {
272
+ const output = execSync("openclaw health --json", { encoding: "utf8", timeout: 5000 });
273
+ const jsonMatch = output.match(/\{[\s\S]*\}/);
274
+ if (jsonMatch) {
275
+ const health = JSON.parse(jsonMatch[0]);
276
+ if (health && health.ok === true) {
277
+ console.log("✅ OpenClaw is all set.");
278
+ return;
279
+ }
280
+ }
281
+ } catch { /* retry */ }
282
+ await new Promise((r) => setTimeout(r, 2000));
283
+ }
284
+ console.warn("⚠️ Health check failed. Run `openclaw health` to diagnose.");
285
+ }
286
+
234
287
  /**
235
288
  * Ensure the plugin ID is in plugins.allow so openclaw doesn't warn.
236
289
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colinlu50/openclaw-lark-stream",
3
- "version": "260330.1.0",
3
+ "version": "260330.1.1",
4
4
  "description": "OpenClaw Lark/Feishu channel plugin",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",