@openclaw/feishu 2026.5.31-beta.2 → 2026.5.31-beta.3

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/dist/api.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { r as listEnabledFeishuAccounts } from "./accounts-Bpe6CjpS.js";
2
- import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./channel-TXwK9jIG.js";
2
+ import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./channel-YU5bdC_o.js";
3
3
  import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
4
4
  import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.js";
5
5
  import { r as createFeishuClient } from "./client-BhMNZBJD.js";
6
6
  import { a as jsonToolResult, d as registerFeishuChatTools, f as createFeishuToolClient, h as resolveToolsConfig, m as resolveFeishuToolAccount, n as registerFeishuDriveTools, o as toolExecutionErrorResult, p as resolveAnyEnabledFeishuToolsConfig, s as unknownToolActionResult } from "./drive-BIrffRwc.js";
7
- import { n as getFeishuThreadBindingManager, r as testing, t as createFeishuThreadBindingManager } from "./thread-bindings-C58Uq5Y1.js";
8
- import { n as handleFeishuSubagentEnded, r as handleFeishuSubagentSpawning, t as handleFeishuSubagentDeliveryTarget } from "./subagent-hooks-Bw3Dg2mS.js";
7
+ import { n as getFeishuThreadBindingManager, r as testing, t as createFeishuThreadBindingManager } from "./thread-bindings-V0bwk0A1.js";
8
+ import { n as handleFeishuSubagentEnded, r as handleFeishuSubagentSpawning, t as handleFeishuSubagentDeliveryTarget } from "./subagent-hooks-1pqt5tAA.js";
9
9
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
10
10
  import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
11
11
  import { existsSync } from "node:fs";
@@ -832,10 +832,7 @@ async function repairFeishuDoctorState(params) {
832
832
  if (entry) removed.push(entry);
833
833
  }
834
834
  return removed;
835
- }, {
836
- skipMaintenance: true,
837
- allowDropAcpMetaSessionKeys: [...keys]
838
- });
835
+ }, { skipMaintenance: true });
839
836
  const removed = removedEntries.length;
840
837
  removedSessionEntries += removed;
841
838
  if (removed > 0) {
@@ -1125,6 +1122,11 @@ function resolveSafeFeishuButtonUrl(url) {
1125
1122
  function resolveFeishuButtonUrl(button) {
1126
1123
  return button.url ?? button.webApp?.url ?? button.web_app?.url;
1127
1124
  }
1125
+ function resolveFeishuCommandButtonValue(button) {
1126
+ if (button.action?.type === "callback") return;
1127
+ if (button.action?.type === "command") return button.action.command;
1128
+ return button.value;
1129
+ }
1128
1130
  function mapFeishuButtonType(style) {
1129
1131
  if (style === "primary" || style === "success") return "primary";
1130
1132
  if (style === "danger") return "danger";
@@ -1148,12 +1150,13 @@ function buildFeishuPayloadButton(button) {
1148
1150
  default_url: safeUrl
1149
1151
  });
1150
1152
  }
1151
- if (button.value) behaviors.push({
1153
+ const value = resolveFeishuCommandButtonValue(button);
1154
+ if (value) behaviors.push({
1152
1155
  type: "callback",
1153
1156
  value: createFeishuCardInteractionEnvelope({
1154
1157
  k: "quick",
1155
1158
  a: "feishu.payload.button",
1156
- q: button.value
1159
+ q: value
1157
1160
  })
1158
1161
  });
1159
1162
  if (behaviors.length === 0) return;
@@ -1731,7 +1734,7 @@ const meta = {
1731
1734
  order: 70,
1732
1735
  preferSessionLookupForAnnounceTarget: true
1733
1736
  };
1734
- const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-AAff9iBZ.js"), "feishuChannelRuntime");
1737
+ const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-BBY1Yd01.js"), "feishuChannelRuntime");
1735
1738
  function toFeishuMessageSendResult(result, kind) {
1736
1739
  const receipt = result.receipt ?? createFeishuSendReceipt({
1737
1740
  messageId: result.messageId,
@@ -2547,7 +2550,7 @@ const feishuPlugin = createChatChannelPlugin({
2547
2550
  })
2548
2551
  }),
2549
2552
  gateway: { startAccount: async (ctx) => {
2550
- const { monitorFeishuProvider } = await import("./monitor-Ccev4ogO.js");
2553
+ const { monitorFeishuProvider } = await import("./monitor-CMwQEm1t.js");
2551
2554
  const account = resolveFeishuRuntimeAccount({
2552
2555
  cfg: ctx.cfg,
2553
2556
  accountId: ctx.accountId
@@ -1,2 +1,2 @@
1
- import { t as feishuPlugin } from "./channel-TXwK9jIG.js";
1
+ import { t as feishuPlugin } from "./channel-YU5bdC_o.js";
2
2
  export { feishuPlugin };
@@ -1,5 +1,5 @@
1
1
  import { o as resolveFeishuAccount, s as resolveFeishuRuntimeAccount, y as parseFeishuCommentTarget } from "./accounts-Bpe6CjpS.js";
2
- import { h as listFeishuDirectoryPeers, m as listFeishuDirectoryGroups, o as buildFeishuPresentationCardElements } from "./channel-TXwK9jIG.js";
2
+ import { h as listFeishuDirectoryPeers, m as listFeishuDirectoryGroups, o as buildFeishuPresentationCardElements } from "./channel-YU5bdC_o.js";
3
3
  import { r as createFeishuClient } from "./client-BhMNZBJD.js";
4
4
  import { c as getChatInfo, l as getChatMembers, r as cleanupAmbientCommentTypingReaction, t as deliverCommentThreadText, u as getFeishuMemberInfo } from "./drive-BIrffRwc.js";
5
5
  import { chunkTextForOutbound } from "./runtime-api.js";
@@ -2,7 +2,7 @@ import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, r as pa
2
2
  import { t as messageActionTargetAliases } from "./security-audit-BIeA3W3Q.js";
3
3
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-ChjJKAJ9.js";
4
4
  import { t as collectFeishuSecurityAuditFindings } from "./security-audit-shared-BIHeF-S_.js";
5
- import { r as testing, t as createFeishuThreadBindingManager } from "./thread-bindings-C58Uq5Y1.js";
5
+ import { r as testing, t as createFeishuThreadBindingManager } from "./thread-bindings-V0bwk0A1.js";
6
6
  //#region extensions/feishu/contract-api.ts
7
7
  const feishuSessionBindingAdapterChannels = ["feishu"];
8
8
  //#endregion
@@ -3,7 +3,7 @@ import { l as fetchBotIdentityForMonitor } from "./monitor.state-r4OLFBfg.js";
3
3
  //#region extensions/feishu/src/monitor.ts
4
4
  let monitorAccountRuntimePromise;
5
5
  async function loadMonitorAccountRuntime() {
6
- monitorAccountRuntimePromise ??= import("./monitor.account-DYaT0fVd.js");
6
+ monitorAccountRuntimePromise ??= import("./monitor.account-DrLtrcbg.js");
7
7
  return await monitorAccountRuntimePromise;
8
8
  }
9
9
  async function monitorFeishuProvider(opts = {}) {
@@ -1,12 +1,12 @@
1
1
  import { _ as buildFeishuCommentTarget, f as isRecord$1, h as readString, l as encodeQuery, m as parseCommentContentElements, p as normalizeString, s as resolveFeishuRuntimeAccount, u as extractReplyText, v as normalizeCommentFileType } from "./accounts-Bpe6CjpS.js";
2
2
  import { i as resolveReceiveIdType } from "./targets-BUjQ1TcA.js";
3
- import { c as normalizeFeishuAllowEntry, d as resolveFeishuGroupConversationIngressAccess, f as resolveFeishuGroupSenderActivationIngressAccess, l as resolveFeishuDmIngressAccess, p as resolveFeishuReplyPolicy, s as hasExplicitFeishuGroupConfig, u as resolveFeishuGroupConfig } from "./channel-TXwK9jIG.js";
3
+ import { c as normalizeFeishuAllowEntry, d as resolveFeishuGroupConversationIngressAccess, f as resolveFeishuGroupSenderActivationIngressAccess, l as resolveFeishuDmIngressAccess, p as resolveFeishuReplyPolicy, s as hasExplicitFeishuGroupConfig, u as resolveFeishuGroupConfig } from "./channel-YU5bdC_o.js";
4
4
  import { c as decodeFeishuCardAction, o as buildFeishuCardActionTextFallback, s as createFeishuCardInteractionEnvelope } from "./send-result-D9rgEUlm.js";
5
5
  import { t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
6
6
  import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.js";
7
7
  import { a as getFeishuUserAgent, i as createFeishuWSClient, n as createEventDispatcher, r as createFeishuClient } from "./client-BhMNZBJD.js";
8
8
  import { c as getChatInfo, i as createCommentTypingReactionLifecycle, t as deliverCommentThreadText } from "./drive-BIrffRwc.js";
9
- import { t as createFeishuThreadBindingManager } from "./thread-bindings-C58Uq5Y1.js";
9
+ import { t as createFeishuThreadBindingManager } from "./thread-bindings-V0bwk0A1.js";
10
10
  import { createReplyPrefixContext, evaluateSupplementalContextVisibility, loadSessionStore, normalizeAgentId as normalizeAgentId$2, resolveChannelContextVisibilityMode, resolveSessionStoreEntry } from "./runtime-api.js";
11
11
  import { _ as normalizeFeishuExternalKey, a as sendCardFeishu, c as sendStructuredCardFeishu, d as isFeishuBroadcastMention, f as isMentionForwardRequest, g as shouldSuppressFeishuTextForVoiceMedia, h as sendMediaFeishu, i as resolveFeishuCardTemplate, l as parsePostContent, m as saveMessageResourceFeishu, n as getMessageFeishu, p as isFeishuGroupChatType, r as listFeishuThreadMessages, s as sendMessageFeishu, u as extractMentionTargets } from "./send-Cze2qlca.js";
12
12
  import { i as waitForAbortableDelay, r as raceWithTimeoutAndAbort } from "./probe-BjKRV7em.js";
@@ -1624,14 +1624,14 @@ function createFeishuReplyDispatcher(params) {
1624
1624
  startStreaming();
1625
1625
  flushStreamingCardUpdate(buildCombinedStreamText(reasoningText, streamText));
1626
1626
  };
1627
- const sendChunkedTextReply = async (params) => {
1628
- const chunkSource = params.useCard ? params.text : core.channel.text.convertMarkdownTables(params.text, tableMode);
1627
+ const sendChunkedTextReply = async (paramsLocal) => {
1628
+ const chunkSource = paramsLocal.useCard ? paramsLocal.text : core.channel.text.convertMarkdownTables(paramsLocal.text, tableMode);
1629
1629
  const chunks = resolveTextChunksWithFallback(chunkSource, core.channel.text.chunkTextWithMode(chunkSource, textChunkLimit, chunkMode));
1630
- for (const [index, chunk] of chunks.entries()) await params.sendChunk({
1630
+ for (const [index, chunk] of chunks.entries()) await paramsLocal.sendChunk({
1631
1631
  chunk,
1632
1632
  isFirst: index === 0
1633
1633
  });
1634
- if (params.infoKind === "final") deliveredFinalTexts.add(params.text);
1634
+ if (paramsLocal.infoKind === "final") deliveredFinalTexts.add(paramsLocal.text);
1635
1635
  };
1636
1636
  const sendMediaReplies = async (payload, options) => {
1637
1637
  const mediaUrls = resolveSendableOutboundReplyParts(payload).mediaUrls;
@@ -1829,13 +1829,13 @@ function createFeishuReplyDispatcher(params) {
1829
1829
  onReasoningEnd: reasoningPreviewEnabled ? () => {} : void 0,
1830
1830
  onToolStart: streamingEnabled ? (payload) => {
1831
1831
  if (!isChannelProgressDraftWorkToolName(payload.name)) return;
1832
- const statusLine = formatChannelProgressDraftLineForEntry(account.config, {
1832
+ const statusLineLocal = formatChannelProgressDraftLineForEntry(account.config, {
1833
1833
  event: "tool",
1834
1834
  name: payload.name,
1835
1835
  phase: payload.phase,
1836
1836
  args: payload.args
1837
1837
  }, { detailMode: payload.detailMode });
1838
- if (statusLine) updateStreamingStatusLine(statusLine);
1838
+ if (statusLineLocal) updateStreamingStatusLine(statusLineLocal);
1839
1839
  } : void 0,
1840
1840
  onAssistantMessageStart: streamingEnabled ? () => {
1841
1841
  updateStreamingStatusLine("", { startIfNeeded: false });
@@ -2685,16 +2685,16 @@ async function handleFeishuMessage(params) {
2685
2685
  normalizeEntry: normalizeFeishuAllowEntry
2686
2686
  }) : null;
2687
2687
  const pinnedMainDmSenderRecipient = pinnedMainDmOwner ? [ctx.senderOpenId, senderUserId].map((id) => id ? normalizeFeishuAllowEntry(id) : "").find((recipient) => recipient === pinnedMainDmOwner) : void 0;
2688
- const buildFeishuInboundLastRouteUpdate = (params) => {
2689
- const inboundLastRouteSessionKey = params.sessionKey === route.sessionKey ? resolveInboundLastRouteSessionKey({
2688
+ const buildFeishuInboundLastRouteUpdate = (paramsLocal) => {
2689
+ const inboundLastRouteSessionKey = paramsLocal.sessionKey === route.sessionKey ? resolveInboundLastRouteSessionKey({
2690
2690
  route,
2691
- sessionKey: params.sessionKey
2692
- }) : params.sessionKey;
2691
+ sessionKey: paramsLocal.sessionKey
2692
+ }) : paramsLocal.sessionKey;
2693
2693
  return {
2694
2694
  sessionKey: inboundLastRouteSessionKey,
2695
2695
  channel: "feishu",
2696
2696
  to: feishuTo,
2697
- accountId: params.accountId,
2697
+ accountId: paramsLocal.accountId,
2698
2698
  ...lastRouteThreadId ? { threadId: lastRouteThreadId } : {},
2699
2699
  mainDmOwnerPin: !isGroup && inboundLastRouteSessionKey === route.mainSessionKey && pinnedMainDmOwner ? {
2700
2700
  ownerRecipient: pinnedMainDmOwner,
@@ -4722,7 +4722,7 @@ function resolveFeishuDebounceMentions(params) {
4722
4722
  const botMentions = merged.filter((mention) => mention.id.open_id?.trim() === normalizedBotOpenId);
4723
4723
  return botMentions.length > 0 ? botMentions : void 0;
4724
4724
  }
4725
- function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, runtime, chatHistories, fireAndForget, handleMessage, resolveDebounceText: resolveText, hasProcessedMessage, recordProcessedMessage, getBotOpenId = () => void 0, getBotName = () => void 0, resolveSequentialKey = ({ accountId, event }) => `feishu:${accountId}:${event.message.chat_id?.trim() || "unknown"}` }) {
4725
+ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, runtime, chatHistories, fireAndForget, handleMessage, resolveDebounceText: resolveText, hasProcessedMessage, recordProcessedMessage, getBotOpenId = () => void 0, getBotName = () => void 0, resolveSequentialKey = ({ accountId: accountIdLocal, event }) => `feishu:${accountIdLocal}:${event.message.chat_id?.trim() || "unknown"}` }) {
4726
4726
  const inboundDebounceMs = channelRuntime.debounce.resolveInboundDebounceMs({
4727
4727
  cfg,
4728
4728
  channel: "feishu"
package/dist/setup-api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-TXwK9jIG.js";
1
+ import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-YU5bdC_o.js";
2
2
  export { feishuPlugin, feishuSetupAdapter, feishuSetupWizard };
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { r as normalizeFeishuTarget } from "./targets-BUjQ1TcA.js";
3
3
  import { r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
4
- import { n as getFeishuThreadBindingManager } from "./thread-bindings-C58Uq5Y1.js";
4
+ import { n as getFeishuThreadBindingManager } from "./thread-bindings-V0bwk0A1.js";
5
5
  import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  //#region extensions/feishu/src/subagent-hooks.ts
7
7
  var subagent_hooks_exports = /* @__PURE__ */ __exportAll({
@@ -1,7 +1,7 @@
1
1
  //#region extensions/feishu/subagent-hooks-api.ts
2
2
  let feishuSubagentHooksPromise = null;
3
3
  function loadFeishuSubagentHooksModule() {
4
- feishuSubagentHooksPromise ??= import("./subagent-hooks-Bw3Dg2mS.js").then((n) => n.i);
4
+ feishuSubagentHooksPromise ??= import("./subagent-hooks-1pqt5tAA.js").then((n) => n.i);
5
5
  return feishuSubagentHooksPromise;
6
6
  }
7
7
  function registerFeishuSubagentHooks(api) {
@@ -81,7 +81,7 @@ function createFeishuThreadBindingManager(params) {
81
81
  const normalizedConversationId = conversationId.trim();
82
82
  const normalizedTargetSessionKey = targetSessionKey.trim();
83
83
  if (!normalizedConversationId || !normalizedTargetSessionKey) return null;
84
- const existing = getState().bindingsByAccountConversation.get(resolveBindingKey({
84
+ const existingLocal = getState().bindingsByAccountConversation.get(resolveBindingKey({
85
85
  accountId,
86
86
  conversationId: normalizedConversationId
87
87
  }));
@@ -89,14 +89,14 @@ function createFeishuThreadBindingManager(params) {
89
89
  const record = {
90
90
  accountId,
91
91
  conversationId: normalizedConversationId,
92
- parentConversationId: normalizeOptionalString(parentConversationId) ?? existing?.parentConversationId,
93
- deliveryTo: typeof metadata?.deliveryTo === "string" && metadata.deliveryTo.trim() ? metadata.deliveryTo.trim() : existing?.deliveryTo,
94
- deliveryThreadId: typeof metadata?.deliveryThreadId === "string" && metadata.deliveryThreadId.trim() ? metadata.deliveryThreadId.trim() : existing?.deliveryThreadId,
92
+ parentConversationId: normalizeOptionalString(parentConversationId) ?? existingLocal?.parentConversationId,
93
+ deliveryTo: typeof metadata?.deliveryTo === "string" && metadata.deliveryTo.trim() ? metadata.deliveryTo.trim() : existingLocal?.deliveryTo,
94
+ deliveryThreadId: typeof metadata?.deliveryThreadId === "string" && metadata.deliveryThreadId.trim() ? metadata.deliveryThreadId.trim() : existingLocal?.deliveryThreadId,
95
95
  targetKind: toFeishuTargetKind(targetKind),
96
96
  targetSessionKey: normalizedTargetSessionKey,
97
- agentId: typeof metadata?.agentId === "string" && metadata.agentId.trim() ? metadata.agentId.trim() : existing?.agentId ?? resolveAgentIdFromSessionKey(normalizedTargetSessionKey),
98
- label: typeof metadata?.label === "string" && metadata.label.trim() ? metadata.label.trim() : existing?.label,
99
- boundBy: typeof metadata?.boundBy === "string" && metadata.boundBy.trim() ? metadata.boundBy.trim() : existing?.boundBy,
97
+ agentId: typeof metadata?.agentId === "string" && metadata.agentId.trim() ? metadata.agentId.trim() : existingLocal?.agentId ?? resolveAgentIdFromSessionKey(normalizedTargetSessionKey),
98
+ label: typeof metadata?.label === "string" && metadata.label.trim() ? metadata.label.trim() : existingLocal?.label,
99
+ boundBy: typeof metadata?.boundBy === "string" && metadata.boundBy.trim() ? metadata.boundBy.trim() : existingLocal?.boundBy,
100
100
  boundAt: now,
101
101
  lastActivityAt: now
102
102
  };
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@openclaw/feishu",
3
- "version": "2026.5.31-beta.2",
3
+ "version": "2026.5.31-beta.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/feishu",
9
- "version": "2026.5.31-beta.2",
9
+ "version": "2026.5.31-beta.3",
10
10
  "dependencies": {
11
11
  "@larksuiteoapi/node-sdk": "1.66.0",
12
12
  "typebox": "1.1.39",
13
13
  "zod": "4.4.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.5.31-beta.2"
16
+ "openclaw": ">=2026.5.31-beta.3"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/feishu",
3
- "version": "2026.5.31-beta.2",
3
+ "version": "2026.5.31-beta.3",
4
4
  "description": "OpenClaw Feishu/Lark channel plugin for chats and workplace tools (community maintained by @m1heng).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  "zod": "4.4.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.5.31-beta.2"
16
+ "openclaw": ">=2026.5.31-beta.3"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -47,10 +47,10 @@
47
47
  "minHostVersion": ">=2026.5.29"
48
48
  },
49
49
  "compat": {
50
- "pluginApi": ">=2026.5.31-beta.2"
50
+ "pluginApi": ">=2026.5.31-beta.3"
51
51
  },
52
52
  "build": {
53
- "openclawVersion": "2026.5.31-beta.2"
53
+ "openclawVersion": "2026.5.31-beta.3"
54
54
  },
55
55
  "release": {
56
56
  "publishToClawHub": true,