@openclaw/feishu 2026.5.24-beta.2 → 2026.5.26-beta.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.
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { isRecord, normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
2
+ import { isRecord, normalizeOptionalString, normalizeStringEntries, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { DEFAULT_ACCOUNT_ID, createAccountListHelpers, hasConfiguredAccountValue, normalizeAccountId, normalizeOptionalAccountId, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
4
4
  import { coerceSecretRef } from "openclaw/plugin-sdk/provider-auth";
5
5
  //#region extensions/feishu/src/comment-target.ts
@@ -125,7 +125,7 @@ function isReasonableFeishuLinkToken(token) {
125
125
  return typeof token === "string" && token.length >= FEISHU_LINK_TOKEN_MIN_LENGTH && token.length <= FEISHU_LINK_TOKEN_MAX_LENGTH;
126
126
  }
127
127
  function parseCommentLinkedDocumentPath(pathname) {
128
- const segments = pathname.split("/").map((segment) => segment.trim()).filter(Boolean);
128
+ const segments = normalizeStringEntries(pathname.split("/"));
129
129
  const offset = segments[0]?.toLowerCase() === "space" ? 1 : 0;
130
130
  const kind = COMMENT_LINK_KIND_ALIASES.get(segments[offset]?.toLowerCase() ?? "");
131
131
  const token = normalizeString(segments[offset + 1]);
package/dist/api.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
2
2
  import { n as getFeishuThreadBindingManager, r as testing, t as createFeishuThreadBindingManager } from "./thread-bindings-D24m3Cjy.js";
3
3
  import { n as handleFeishuSubagentEnded, r as handleFeishuSubagentSpawning, t as handleFeishuSubagentDeliveryTarget } from "./subagent-hooks-fuyBHOVu.js";
4
- import { r as listEnabledFeishuAccounts } from "./accounts-CRcvqpsl.js";
5
- import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./channel-Br99IozO.js";
4
+ import { r as listEnabledFeishuAccounts } from "./accounts-CXnY5H8g.js";
5
+ import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./channel-DavfT_AA.js";
6
6
  import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.js";
7
- import { a as jsonToolResult, d as registerFeishuChatTools, f as createFeishuToolClient, m as resolveFeishuToolAccount, n as registerFeishuDriveTools, o as toolExecutionErrorResult, p as resolveAnyEnabledFeishuToolsConfig, s as unknownToolActionResult } from "./drive-DMbtRzY9.js";
8
- import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
7
+ import { a as jsonToolResult, d as registerFeishuChatTools, f as createFeishuToolClient, m as resolveFeishuToolAccount, n as registerFeishuDriveTools, o as toolExecutionErrorResult, p as resolveAnyEnabledFeishuToolsConfig, s as unknownToolActionResult } from "./drive-DwgWWkJi.js";
8
+ import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { existsSync } from "node:fs";
10
10
  import { homedir } from "node:os";
11
11
  import { basename, isAbsolute, resolve } from "node:path";
@@ -680,7 +680,7 @@ function normalizeConvertedBlockTree(blocks, firstLevelIds) {
680
680
  const parentId = typeof block?.parent_id === "string" ? block.parent_id : "";
681
681
  return !childIds.has(blockId) && (!parentId || !byId.has(parentId));
682
682
  }).toSorted((a, b) => (originalOrder.get(a.block_id ?? "__missing__") ?? 0) - (originalOrder.get(b.block_id ?? "__missing__") ?? 0)).map((block) => block.block_id).filter((blockId) => typeof blockId === "string");
683
- const rootIds = (firstLevelIds && firstLevelIds.length > 0 ? firstLevelIds : inferredTopLevelIds).filter((id, index, arr) => typeof id === "string" && byId.has(id) && arr.indexOf(id) === index);
683
+ const uniqueRootIds = uniqueStrings((firstLevelIds && firstLevelIds.length > 0 ? firstLevelIds : inferredTopLevelIds).filter((id) => typeof id === "string" && byId.has(id)));
684
684
  const orderedBlocks = [];
685
685
  const visited = /* @__PURE__ */ new Set();
686
686
  const visit = (blockId) => {
@@ -691,12 +691,12 @@ function normalizeConvertedBlockTree(blocks, firstLevelIds) {
691
691
  orderedBlocks.push(block);
692
692
  for (const childId of normalizeChildIds(block?.children)) visit(childId);
693
693
  };
694
- for (const rootId of rootIds) visit(rootId);
694
+ for (const rootId of uniqueRootIds) visit(rootId);
695
695
  for (const block of blocks) if (typeof block?.block_id === "string") visit(block.block_id);
696
696
  else orderedBlocks.push(block);
697
697
  return {
698
698
  orderedBlocks,
699
- rootIds: rootIds.filter((id) => typeof id === "string")
699
+ rootIds: uniqueRootIds
700
700
  };
701
701
  }
702
702
  async function insertBlocks(client, docToken, blocks, parentBlockId, index) {