openclaw-lark-multi-agent 1.0.5 → 1.0.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.
@@ -102,6 +102,7 @@ export declare class FeishuBot {
102
102
  private inferFeishuFileType;
103
103
  private isImagePath;
104
104
  private errorSummary;
105
+ private stripReadOnlyDocxFields;
105
106
  private createFeishuDocFromMarkdown;
106
107
  private sendBridgeAttachment;
107
108
  private sendBridgeFileAttachment;
@@ -1227,6 +1227,20 @@ export class FeishuBot {
1227
1227
  const msg = data?.msg || data?.message || err?.message || String(err);
1228
1228
  return `${code}${msg}`.slice(0, 800);
1229
1229
  }
1230
+ stripReadOnlyDocxFields(value) {
1231
+ if (Array.isArray(value))
1232
+ return value.map((item) => this.stripReadOnlyDocxFields(item));
1233
+ if (value && typeof value === "object") {
1234
+ const out = {};
1235
+ for (const [key, child] of Object.entries(value)) {
1236
+ if (key === "merge_info")
1237
+ continue;
1238
+ out[key] = this.stripReadOnlyDocxFields(child);
1239
+ }
1240
+ return out;
1241
+ }
1242
+ return value;
1243
+ }
1230
1244
  async createFeishuDocFromMarkdown(filePath) {
1231
1245
  const rawTitle = basename(filePath).replace(/\.[^.]+$/, "").trim() || "Markdown Document";
1232
1246
  const markdown = readFileSync(filePath, "utf8");
@@ -1238,7 +1252,7 @@ export class FeishuBot {
1238
1252
  throw new Error(`Feishu doc create returned no document_id for ${filePath}`);
1239
1253
  const converted = await docx.document.convert({ data: { content_type: "markdown", content: markdown } });
1240
1254
  const convertedData = converted?.data || converted;
1241
- const blocks = convertedData?.blocks || [];
1255
+ const blocks = this.stripReadOnlyDocxFields(convertedData?.blocks || []);
1242
1256
  const firstLevelBlockIds = convertedData?.first_level_block_ids || [];
1243
1257
  if (Array.isArray(blocks) && blocks.length > 0) {
1244
1258
  await docx.documentBlockDescendant.create({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-lark-multi-agent",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Multi-bot Lark/Feishu bridge for OpenClaw, with per-bot model routing and isolated sessions",
5
5
  "type": "module",
6
6
  "scripts": {