@openclaw/feishu 2026.6.10 → 2026.6.11

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,5 +1,5 @@
1
1
  import { r as listEnabledFeishuAccounts } from "./accounts-Cfzht2Hc.js";
2
- import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./channel-uEJPBCR9.js";
2
+ import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./channel-C1MthXp0.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-BwgAJuvo.js";
@@ -1735,7 +1735,7 @@ const meta = {
1735
1735
  order: 70,
1736
1736
  preferSessionLookupForAnnounceTarget: true
1737
1737
  };
1738
- const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-dJ1uFwnq.js"), "feishuChannelRuntime");
1738
+ const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-CiQqumBC.js"), "feishuChannelRuntime");
1739
1739
  function toFeishuMessageSendResult(result, kind) {
1740
1740
  const receipt = result.receipt ?? createFeishuSendReceipt({
1741
1741
  messageId: result.messageId,
@@ -2551,7 +2551,7 @@ const feishuPlugin = createChatChannelPlugin({
2551
2551
  })
2552
2552
  }),
2553
2553
  gateway: { startAccount: async (ctx) => {
2554
- const { monitorFeishuProvider } = await import("./monitor-P0zIRYtD.js");
2554
+ const { monitorFeishuProvider } = await import("./monitor-CxUQtU--.js");
2555
2555
  const account = resolveFeishuRuntimeAccount({
2556
2556
  cfg: ctx.cfg,
2557
2557
  accountId: ctx.accountId
@@ -1,2 +1,2 @@
1
- import { t as feishuPlugin } from "./channel-uEJPBCR9.js";
1
+ import { t as feishuPlugin } from "./channel-C1MthXp0.js";
2
2
  export { feishuPlugin };
@@ -1,9 +1,9 @@
1
1
  import { o as resolveFeishuAccount, s as resolveFeishuRuntimeAccount, v as parseFeishuCommentTarget } from "./accounts-Cfzht2Hc.js";
2
- import { h as listFeishuDirectoryPeers, m as listFeishuDirectoryGroups, o as buildFeishuPresentationCardElements } from "./channel-uEJPBCR9.js";
2
+ import { h as listFeishuDirectoryPeers, m as listFeishuDirectoryGroups, o as buildFeishuPresentationCardElements } from "./channel-C1MthXp0.js";
3
3
  import { r as createFeishuClient } from "./client-BwgAJuvo.js";
4
4
  import { c as getChatInfo, l as getChatMembers, r as cleanupAmbientCommentTypingReaction, t as deliverCommentThreadText, u as getFeishuMemberInfo } from "./drive-djUl8IRC.js";
5
5
  import { chunkTextForOutbound } from "./runtime-api.js";
6
- import { a as sendCardFeishu, c as sendStructuredCardFeishu, g as shouldSuppressFeishuTextForVoiceMedia, h as sendMediaFeishu, i as resolveFeishuCardTemplate, n as getMessageFeishu, o as sendMarkdownCardFeishu, s as sendMessageFeishu, t as editMessageFeishu } from "./send-B02jdUkY.js";
6
+ import { a as sendCardFeishu, c as sendStructuredCardFeishu, g as shouldSuppressFeishuTextForVoiceMedia, h as sendMediaFeishu, i as resolveFeishuCardTemplate, n as getMessageFeishu, o as sendMarkdownCardFeishu, s as sendMessageFeishu, t as editMessageFeishu } from "./send-B0nDqief.js";
7
7
  import { t as probeFeishu } from "./probe-EyeJQb3C.js";
8
8
  import { interactiveReplyToPresentation, normalizeInteractiveReply, normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
9
9
  import { isRecord, normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -3,7 +3,7 @@ import { f as fetchBotIdentityForMonitor } from "./monitor.state-CGL1occz.js";
3
3
  //#region extensions/feishu/src/monitor.ts
4
4
  let monitorAccountRuntimePromise;
5
5
  async function loadMonitorAccountRuntime() {
6
- monitorAccountRuntimePromise ??= import("./monitor.account-C2bq3aSK.js");
6
+ monitorAccountRuntimePromise ??= import("./monitor.account-C3SH96dD.js");
7
7
  return await monitorAccountRuntimePromise;
8
8
  }
9
9
  async function monitorFeishuProvider(opts = {}) {
@@ -1,6 +1,6 @@
1
1
  import { _ as normalizeCommentFileType, c as encodeQuery, d as isRecord$1, f as normalizeString, g as buildFeishuCommentTarget, h as requestFeishuApi, l as extractReplyText, m as readString, o as resolveFeishuAccount, p as parseCommentContentElements, s as resolveFeishuRuntimeAccount } from "./accounts-Cfzht2Hc.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-uEJPBCR9.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-C1MthXp0.js";
4
4
  import { c as decodeFeishuCardAction, o as buildFeishuCardActionTextFallback, s as createFeishuCardInteractionEnvelope } from "./send-result-DSsIa4-p.js";
5
5
  import { t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
6
6
  import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.js";
@@ -8,7 +8,7 @@ import { a as getFeishuUserAgent, i as createFeishuWSClient, n as createEventDis
8
8
  import { c as getChatInfo, i as createCommentTypingReactionLifecycle, t as deliverCommentThreadText } from "./drive-djUl8IRC.js";
9
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
- 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-B02jdUkY.js";
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-B0nDqief.js";
12
12
  import { i as waitForAbortableDelay, r as raceWithTimeoutAndAbort } from "./probe-EyeJQb3C.js";
13
13
  import { a as clearFeishuBotIdentityState, c as httpServers, d as wsClients, f as fetchBotIdentityForMonitor, i as botOpenIds, l as recordWebhookStatus, n as FEISHU_WEBHOOK_MAX_BODY_BYTES, o as closeTrackedFeishuHttpServer, r as botNames, s as feishuWebhookRateLimiter, t as FEISHU_WEBHOOK_BODY_TIMEOUT_MS, u as setFeishuBotIdentityState } from "./monitor.state-CGL1occz.js";
14
14
  import { createChannelMessageReplyPipeline, formatChannelProgressDraftLineForEntry, isChannelProgressDraftWorkToolName, resolveAgentOutboundIdentity } from "openclaw/plugin-sdk/channel-outbound";
@@ -9,7 +9,7 @@ import { convertMarkdownTables } from "openclaw/plugin-sdk/text-chunking";
9
9
  import fs from "node:fs";
10
10
  import path from "node:path";
11
11
  import { mediaKindFromMime } from "openclaw/plugin-sdk/media-mime";
12
- import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, runFfmpeg } from "openclaw/plugin-sdk/media-runtime";
12
+ import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, runFfmpeg, runFfprobe } from "openclaw/plugin-sdk/media-runtime";
13
13
  import { readRegularFile, writeExternalFileWithinRoot } from "openclaw/plugin-sdk/security-runtime";
14
14
  import { Readable } from "node:stream";
15
15
  import { saveMediaBuffer, saveMediaStream } from "openclaw/plugin-sdk/media-store";
@@ -267,7 +267,7 @@ async function uploadFileFeishu(params) {
267
267
  file_type: fileType,
268
268
  file_name: safeFileName,
269
269
  file: fileData,
270
- ...duration !== void 0 && { duration }
270
+ ...duration !== void 0 ? { duration } : {}
271
271
  } }), "Feishu file upload failed", { includeNestedErrorLogId: true }), {
272
272
  key: "file_key",
273
273
  errorPrefix: "Feishu file upload failed"
@@ -478,6 +478,30 @@ async function prepareFeishuVoiceMedia(params) {
478
478
  return params;
479
479
  }
480
480
  }
481
+ async function probeAudioDurationMs(buffer) {
482
+ try {
483
+ return await withTempWorkspace({
484
+ rootDir: resolvePreferredOpenClawTmpDir(),
485
+ prefix: "feishu-audio-probe-"
486
+ }, async (workspace) => {
487
+ const stdout = await runFfprobe([
488
+ "-v",
489
+ "error",
490
+ "-show_entries",
491
+ "format=duration",
492
+ "-of",
493
+ "csv=p=0",
494
+ await workspace.write("input.ogg", buffer)
495
+ ], { timeoutMs: 5e3 });
496
+ const seconds = Number.parseFloat(stdout.trim());
497
+ if (!Number.isFinite(seconds) || seconds <= 0) return;
498
+ return Math.max(1, Math.round(seconds * 1e3));
499
+ });
500
+ } catch (err) {
501
+ console.warn("[feishu] failed to probe audio duration; voice bubble will omit it:", err);
502
+ return;
503
+ }
504
+ }
481
505
  /**
482
506
  * Upload and send media (image or file) from URL, local path, or buffer.
483
507
  * When mediaUrl is a local path, mediaLocalRoots (from core outbound context)
@@ -539,11 +563,13 @@ async function sendMediaFeishu(params) {
539
563
  ...voiceIntentDegradedToFile ? { voiceIntentDegradedToFile: true } : {}
540
564
  };
541
565
  }
566
+ const durationMs = routing.msgType === "audio" ? await probeAudioDurationMs(buffer) : void 0;
542
567
  const { fileKey } = await uploadFileFeishu({
543
568
  cfg,
544
569
  file: buffer,
545
570
  fileName: name,
546
571
  fileType: routing.fileType ?? "stream",
572
+ ...durationMs !== void 0 ? { duration: durationMs } : {},
547
573
  accountId
548
574
  });
549
575
  return {
package/dist/setup-api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-uEJPBCR9.js";
1
+ import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-C1MthXp0.js";
2
2
  export { feishuPlugin, feishuSetupAdapter, feishuSetupWizard };
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@openclaw/feishu",
3
- "version": "2026.6.10",
3
+ "version": "2026.6.11",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/feishu",
9
- "version": "2026.6.10",
9
+ "version": "2026.6.11",
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.6.10"
16
+ "openclaw": ">=2026.6.11"
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.6.10",
3
+ "version": "2026.6.11",
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.6.10"
16
+ "openclaw": ">=2026.6.11"
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.6.10"
50
+ "pluginApi": ">=2026.6.11"
51
51
  },
52
52
  "build": {
53
- "openclawVersion": "2026.6.10"
53
+ "openclawVersion": "2026.6.11"
54
54
  },
55
55
  "release": {
56
56
  "publishToClawHub": true,