@openclaw/feishu 2026.7.2-beta.7 → 2026.8.1-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.
Files changed (35) hide show
  1. package/dist/accounts-CCCdMen2.js +203 -0
  2. package/dist/api.js +61 -60
  3. package/dist/{channel-CScE82zY.js → channel-Ceq80_zP.js} +71 -42
  4. package/dist/channel-plugin-api.js +1 -1
  5. package/dist/{channel.runtime-B21e1E0r.js → channel.runtime-DnRyzGoU.js} +201 -152
  6. package/dist/{client-Dcbs6vml.js → client-Hp7uo_cl.js} +27 -16
  7. package/dist/contract-api.js +2 -2
  8. package/dist/{conversation-id-BeJL-wq7.js → conversation-id-VYgGQ-GX.js} +11 -15
  9. package/dist/doctor-contract-api.js +1 -1
  10. package/dist/doctor-contract-bEQXIXyP.js +158 -0
  11. package/dist/{drive-hSi_Utp0.js → drive-BVYM_Y4k.js} +325 -44
  12. package/dist/{media-CEUraFOR.js → media-BDouVaaM.js} +298 -182
  13. package/dist/{monitor-DngbaA6a.js → monitor-CZ8cDXrq.js} +3 -3
  14. package/dist/{monitor.account-BnTWCw55.js → monitor.account-Dq_voVMB.js} +263 -179
  15. package/dist/{monitor.startup-CqH2tiJq.js → monitor.startup-BGErejNH.js} +1 -1
  16. package/dist/{probe-p3POS2RN.js → probe-DVpy58s0.js} +2 -2
  17. package/dist/security-audit-D6Fz2h6p.js +23 -0
  18. package/dist/{send-result-B9_BpUPx.js → send-result-DEAycmOk.js} +18 -9
  19. package/dist/session-binding-contract-api.js +2 -2
  20. package/dist/{session-conversation-BksWrfzm.js → session-conversation-DFCIvQK-.js} +1 -1
  21. package/dist/session-key-api.js +1 -1
  22. package/dist/setup-api.js +1 -1
  23. package/dist/{subagent-hooks-Cx1cX7rW.js → subagent-hooks-KUi-7vUy.js} +4 -64
  24. package/dist/subagent-hooks-api.js +1 -1
  25. package/dist/{thread-bindings-N3wkgkIN.js → thread-bindings-CptM_YU6.js} +7 -9
  26. package/openclaw.plugin.json +143 -1
  27. package/package.json +4 -4
  28. package/skills/feishu-doc/SKILL.md +20 -195
  29. package/skills/feishu-doc/references/block-types.md +9 -14
  30. package/skills/feishu-drive/SKILL.md +16 -102
  31. package/skills/feishu-perm/SKILL.md +10 -110
  32. package/skills/feishu-wiki/SKILL.md +13 -109
  33. package/dist/accounts-u9X5Wsan.js +0 -469
  34. package/dist/doctor-contract-BiD9tyIv.js +0 -102
  35. package/dist/security-audit-D7WK_BHh.js +0 -11
@@ -1,23 +1,25 @@
1
- import { a as resolveDefaultFeishuAccountId, d as isRecord$1, i as listFeishuAccountIds, n as inspectFeishuCredentials, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-u9X5Wsan.js";
1
+ import { a as resolveDefaultFeishuAccountId, i as listFeishuAccountIds, n as inspectFeishuCredentials, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-CCCdMen2.js";
2
2
  import { i as resolveReceiveIdType, n as looksLikeFeishuId, r as normalizeFeishuTarget } from "./targets-BUjQ1TcA.js";
3
- import { A as resolveFeishuChatType, D as resolveFeishuGroupToolPolicy, N as createFeishuCardInteractionEnvelope, _ as canEnumerateAllFeishuPeers, a as readNativeFeishuCardJson, b as resolveFeishuChatReadPreliminaryAuthorization, g as canEnumerateAllFeishuGroups, h as authorizeFeishuChatMemberRead, k as normalizeFeishuChatType, m as assertFeishuChatReadAllowed, n as createFeishuSendReceipt, u as chunkFeishuMarkdown, v as isFeishuGroupReadAllowed, w as resolveFeishuGroupConfig, y as isFeishuGroupReadEnabled } from "./send-result-B9_BpUPx.js";
4
- import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, o as resolveConfiguredFeishuGroupSessionScope, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-BeJL-wq7.js";
5
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BiD9tyIv.js";
6
- import { t as messageActionTargetAliases } from "./security-audit-D7WK_BHh.js";
3
+ import { A as resolveFeishuChatType, D as resolveFeishuGroupToolPolicy, N as createFeishuCardInteractionEnvelope, _ as canEnumerateAllFeishuPeers, a as readNativeFeishuCardJson, b as resolveFeishuChatReadPreliminaryAuthorization, g as canEnumerateAllFeishuGroups, h as authorizeFeishuChatMemberRead, k as normalizeFeishuChatType, m as assertFeishuChatReadAllowed, n as createFeishuSendReceipt, u as chunkFeishuMarkdown, v as isFeishuGroupReadAllowed, w as resolveFeishuGroupConfig, y as isFeishuGroupReadEnabled } from "./send-result-DEAycmOk.js";
4
+ import { i as normalizeFeishuWebhookPath, n as normalizeCompatibilityConfig, r as DEFAULT_FEISHU_WEBHOOK_PATH, t as legacyConfigRules } from "./doctor-contract-bEQXIXyP.js";
5
+ import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, o as resolveConfiguredFeishuGroupSessionScope, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-VYgGQ-GX.js";
6
+ import { t as messageActionTargetAliases } from "./security-audit-D6Fz2h6p.js";
7
7
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-BCpDLdg9.js";
8
8
  import { t as collectFeishuSecurityAuditFindings } from "./security-audit-shared-BgpY7AiJ.js";
9
- import { t as resolveFeishuSessionConversation } from "./session-conversation-BksWrfzm.js";
9
+ import { t as resolveFeishuSessionConversation } from "./session-conversation-DFCIvQK-.js";
10
10
  import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
11
11
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
12
+ import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
12
13
  import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
13
14
  import { ToolAuthorizationError, createActionGate } from "openclaw/plugin-sdk/channel-actions";
14
15
  import { adaptScopedAccountAccessor, createHybridChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
15
16
  import { buildChannelOutboundSessionRoute, createChatChannelPlugin, stripChannelTargetPrefix } from "openclaw/plugin-sdk/channel-core";
16
17
  import { createAccountStatusSink, createRuntimeOutboundDelegates, defineChannelMessageAdapter } from "openclaw/plugin-sdk/channel-outbound";
17
18
  import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
18
- import { createAllowlistProviderGroupPolicyWarningCollector, projectConfigAccountIdWarningCollector } from "openclaw/plugin-sdk/channel-policy";
19
+ import { createAllowlistProviderGroupPolicyWarningCollector, createConditionalWarningCollector } from "openclaw/plugin-sdk/channel-policy";
19
20
  import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime";
20
21
  import { applyDirectoryQueryAndLimit, createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter, listDirectoryGroupEntriesFromMapKeysAndAllowFrom, listDirectoryUserEntriesFromAllowFrom, listDirectoryUserEntriesFromAllowFromAndMapKeys } from "openclaw/plugin-sdk/directory-runtime";
22
+ import { PlatformMessageNotDispatchedError } from "openclaw/plugin-sdk/error-runtime";
21
23
  import { legacyInteractiveReplyToPresentation, normalizeLegacyInteractiveReply, normalizeMessagePresentation, renderMessagePresentationChartFallbackText, renderMessagePresentationFallbackText, renderMessagePresentationTableFallbackText, resolveLegacyInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
22
24
  import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
23
25
  import { buildProbeChannelStatusSummary, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
@@ -33,6 +35,7 @@ import { buildSecretInputSchema, hasConfiguredSecretInput as hasConfiguredSecret
33
35
  import fs from "node:fs";
34
36
  import os from "node:os";
35
37
  import path from "node:path";
38
+ import { isPathStrictlyInside } from "openclaw/plugin-sdk/file-access-runtime";
36
39
  import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
37
40
  import { deleteSessionEntry, isValidAgentHarnessSessionStoreEntry, listSessionEntries, loadTranscriptEventsSync, resolveSessionStoreBackupPaths, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
38
41
  import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
@@ -60,6 +63,7 @@ const ChannelActionsSchema = z.object({ reactions: z.boolean().optional() }).str
60
63
  const FeishuGroupPolicySchema = z.union([GroupPolicySchema, z.literal("allowall").transform(() => "open")]);
61
64
  const FeishuDomainSchema = z.union([z.enum(["feishu", "lark"]), z.string().url().startsWith("https://")]);
62
65
  const FeishuConnectionModeSchema = z.enum(["websocket", "webhook"]);
66
+ const FeishuWebhookPathSchema = z.string().refine((value) => normalizeFeishuWebhookPath(value) === value, { message: "webhookPath must be a canonical HTTP request path; run \"openclaw doctor --fix\" to repair it" });
63
67
  const TtsOverrideSchema = z.object({
64
68
  auto: z.enum([
65
69
  "off",
@@ -239,7 +243,7 @@ const FeishuAccountConfigSchema = z.object({
239
243
  verificationToken: buildSecretInputSchema().optional(),
240
244
  domain: FeishuDomainSchema.optional(),
241
245
  connectionMode: FeishuConnectionModeSchema.optional(),
242
- webhookPath: z.string().optional(),
246
+ webhookPath: FeishuWebhookPathSchema.optional(),
243
247
  ...FeishuSharedConfigShape,
244
248
  groupSessionScope: GroupSessionScopeSchema,
245
249
  topicSessionMode: TopicSessionModeSchema
@@ -253,7 +257,7 @@ const FeishuChannelConfigSchema = buildChannelConfigSchema(buildMultiAccountChan
253
257
  verificationToken: buildSecretInputSchema().optional(),
254
258
  domain: FeishuDomainSchema.optional().default("feishu"),
255
259
  connectionMode: FeishuConnectionModeSchema.optional().default("websocket"),
256
- webhookPath: z.string().optional().default("/feishu/events"),
260
+ webhookPath: FeishuWebhookPathSchema.optional().default(DEFAULT_FEISHU_WEBHOOK_PATH),
257
261
  ...FeishuSharedConfigShape,
258
262
  dmPolicy: DmPolicySchema.optional().default("pairing"),
259
263
  reactionNotifications: ReactionNotificationModeSchema.optional().default("own"),
@@ -428,12 +432,6 @@ function safeReadDir(dir) {
428
432
  return [];
429
433
  }
430
434
  }
431
- function isPathWithinRoot(targetPath, rootPath) {
432
- const resolvedTarget = path.resolve(targetPath);
433
- const resolvedRoot = path.resolve(rootPath);
434
- const relative = path.relative(resolvedRoot, resolvedTarget);
435
- return relative !== "" && !relative.startsWith("..") && !path.isAbsolute(relative);
436
- }
437
435
  function formatDisplayPath(filePath) {
438
436
  const home = os.homedir();
439
437
  const resolved = path.resolve(filePath);
@@ -455,21 +453,18 @@ function isFeishuSessionStoreKey(key) {
455
453
  function isFeishuAcpBindingSessionKey(key) {
456
454
  return /^agent:[^:]+:acp:binding:feishu(?::|$)/.test(key.trim().toLowerCase());
457
455
  }
458
- function normalizeMetadataString(value) {
459
- return typeof value === "string" ? value.trim().toLowerCase() : "";
460
- }
461
456
  function isFeishuSessionEntry(key, value) {
462
457
  if (isFeishuAcpBindingSessionKey(key)) return false;
463
458
  if (isFeishuSessionStoreKey(key)) return true;
464
459
  if (!isRecord(value)) return false;
465
- if (normalizeMetadataString(value.channel) === "feishu" || normalizeMetadataString(value.lastChannel) === "feishu") return true;
466
- if (normalizeMetadataString((isRecord(value.route) ? value.route : null)?.channel) === "feishu") return true;
467
- if (normalizeMetadataString((isRecord(value.deliveryContext) ? value.deliveryContext : null)?.channel) === "feishu") return true;
468
- if (normalizeMetadataString((isRecord(value.pendingFinalDeliveryContext) ? value.pendingFinalDeliveryContext : null)?.channel) === "feishu") return true;
460
+ if (normalizeLowercaseStringOrEmpty(value.channel) === "feishu" || normalizeLowercaseStringOrEmpty(value.lastChannel) === "feishu") return true;
461
+ if (normalizeLowercaseStringOrEmpty((isRecord(value.route) ? value.route : null)?.channel) === "feishu") return true;
462
+ if (normalizeLowercaseStringOrEmpty((isRecord(value.deliveryContext) ? value.deliveryContext : null)?.channel) === "feishu") return true;
463
+ if (normalizeLowercaseStringOrEmpty((isRecord(value.pendingFinalDeliveryContext) ? value.pendingFinalDeliveryContext : null)?.channel) === "feishu") return true;
469
464
  const origin = isRecord(value.origin) ? value.origin : null;
470
- const originProvider = normalizeMetadataString(origin?.provider);
471
- const originSurface = normalizeMetadataString(origin?.surface);
472
- const originFrom = normalizeMetadataString(origin?.from);
465
+ const originProvider = normalizeLowercaseStringOrEmpty(origin?.provider);
466
+ const originSurface = normalizeLowercaseStringOrEmpty(origin?.surface);
467
+ const originFrom = normalizeLowercaseStringOrEmpty(origin?.from);
473
468
  return originProvider === "feishu" || originSurface.startsWith("feishu") || originFrom.startsWith("feishu:");
474
469
  }
475
470
  function collectConfiguredAgentIds(cfg) {
@@ -547,8 +542,8 @@ function resolveSessionTranscriptCandidates(params) {
547
542
  const agentSessionsDir = resolveFeishuAgentSessionsDir(params.agentId);
548
543
  const addSafeCandidate = (candidate) => {
549
544
  const resolved = path.isAbsolute(candidate) ? path.resolve(candidate) : path.resolve(sessionsDir, candidate);
550
- const isStoreCandidate = isPathWithinRoot(resolved, sessionsDir);
551
- const isAgentSessionCandidate = isPathWithinRoot(resolved, agentSessionsDir);
545
+ const isStoreCandidate = isPathStrictlyInside(sessionsDir, resolved);
546
+ const isAgentSessionCandidate = isPathStrictlyInside(agentSessionsDir, resolved);
552
547
  if (resolved === sessionsDir || resolved === agentSessionsDir || !isStoreCandidate && !isAgentSessionCandidate) return false;
553
548
  candidates.add(resolved);
554
549
  return true;
@@ -1567,7 +1562,7 @@ const feishuSetupWizard = {
1567
1562
  });
1568
1563
  let probeResult = null;
1569
1564
  if (configured && account.configured) try {
1570
- const { probeFeishu } = await import("./probe-p3POS2RN.js").then((n) => n.n);
1565
+ const { probeFeishu } = await import("./probe-DVpy58s0.js").then((n) => n.n);
1571
1566
  probeResult = await probeFeishu(account);
1572
1567
  } catch {}
1573
1568
  if (!configured) return [formatFeishuStatusLine("needs-credentials")];
@@ -1619,13 +1614,13 @@ function readBooleanParam(params, keys) {
1619
1614
  }
1620
1615
  }
1621
1616
  function hasLegacyFeishuCardCommandValue(actionValue) {
1622
- return isRecord$1(actionValue) && actionValue.oc !== "ocf1" && (Boolean(typeof actionValue.command === "string" && actionValue.command.trim()) || Boolean(typeof actionValue.text === "string" && actionValue.text.trim()));
1617
+ return isRecord(actionValue) && actionValue.oc !== "ocf1" && (Boolean(typeof actionValue.command === "string" && actionValue.command.trim()) || Boolean(typeof actionValue.text === "string" && actionValue.text.trim()));
1623
1618
  }
1624
1619
  function containsLegacyFeishuCardCommandValue(node) {
1625
1620
  if (Array.isArray(node)) return node.some((item) => containsLegacyFeishuCardCommandValue(item));
1626
- if (!isRecord$1(node)) return false;
1621
+ if (!isRecord(node)) return false;
1627
1622
  if (node.tag === "button" && hasLegacyFeishuCardCommandValue(node.value)) return true;
1628
- if (node.tag === "button" && Array.isArray(node.behaviors) && node.behaviors.some((behavior) => isRecord$1(behavior) && hasLegacyFeishuCardCommandValue(behavior.value))) return true;
1623
+ if (node.tag === "button" && Array.isArray(node.behaviors) && node.behaviors.some((behavior) => isRecord(behavior) && hasLegacyFeishuCardCommandValue(behavior.value))) return true;
1629
1624
  return Object.values(node).some((value) => containsLegacyFeishuCardCommandValue(value));
1630
1625
  }
1631
1626
  const meta = {
@@ -1639,7 +1634,25 @@ const meta = {
1639
1634
  order: 70,
1640
1635
  preferSessionLookupForAnnounceTarget: true
1641
1636
  };
1642
- const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-B21e1E0r.js"), "feishuChannelRuntime");
1637
+ const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-DnRyzGoU.js"), "feishuChannelRuntime");
1638
+ async function resolveFeishuMessageSender(params) {
1639
+ try {
1640
+ const sender = params.resolve(await loadFeishuChannelRuntime());
1641
+ if (sender) return sender;
1642
+ throw new Error(params.unavailableMessage);
1643
+ } catch (error) {
1644
+ if (error instanceof PlatformMessageNotDispatchedError) throw error;
1645
+ throw new PlatformMessageNotDispatchedError(params.unavailableMessage, { cause: error });
1646
+ }
1647
+ }
1648
+ const resolveFeishuTextSender = () => resolveFeishuMessageSender({
1649
+ resolve: (runtime) => runtime.feishuOutbound.sendText,
1650
+ unavailableMessage: "Feishu text sending is not available."
1651
+ });
1652
+ const resolveFeishuMediaSender = () => resolveFeishuMessageSender({
1653
+ resolve: (runtime) => runtime.feishuOutbound.sendMedia,
1654
+ unavailableMessage: "Feishu media sending is not available."
1655
+ });
1643
1656
  function toFeishuMessageSendResult(result, kind) {
1644
1657
  const receipt = result.receipt ?? createFeishuSendReceipt({
1645
1658
  messageId: result.messageId,
@@ -1658,9 +1671,12 @@ const feishuMessageAdapter = defineChannelMessageAdapter({
1658
1671
  media: true
1659
1672
  } },
1660
1673
  send: {
1674
+ lifecycle: { beforeSendAttempt: async (ctx) => {
1675
+ if (ctx.kind === "text") await resolveFeishuTextSender();
1676
+ else if (ctx.kind === "media") await resolveFeishuMediaSender();
1677
+ } },
1661
1678
  text: async (ctx) => {
1662
- const sendText = (await loadFeishuChannelRuntime()).feishuOutbound.sendText;
1663
- if (!sendText) throw new Error("Feishu text sending is not available.");
1679
+ const sendText = await resolveFeishuTextSender();
1664
1680
  const { onDeliveryResult, ...outboundCtx } = ctx;
1665
1681
  return toFeishuMessageSendResult(await sendText({
1666
1682
  ...outboundCtx,
@@ -1670,8 +1686,7 @@ const feishuMessageAdapter = defineChannelMessageAdapter({
1670
1686
  }), "text");
1671
1687
  },
1672
1688
  media: async (ctx) => {
1673
- const sendMedia = (await loadFeishuChannelRuntime()).feishuOutbound.sendMedia;
1674
- if (!sendMedia) throw new Error("Feishu media sending is not available.");
1689
+ const sendMedia = await resolveFeishuMediaSender();
1675
1690
  const { onDeliveryResult, ...outboundCtx } = ctx;
1676
1691
  return toFeishuMessageSendResult(await sendMedia({
1677
1692
  ...outboundCtx,
@@ -1683,7 +1698,7 @@ const feishuMessageAdapter = defineChannelMessageAdapter({
1683
1698
  }
1684
1699
  });
1685
1700
  async function createFeishuActionClient(account) {
1686
- const { createFeishuClient } = await import("./client-Dcbs6vml.js").then((n) => n.t);
1701
+ const { createFeishuClient } = await import("./client-Hp7uo_cl.js").then((n) => n.t);
1687
1702
  return createFeishuClient(account);
1688
1703
  }
1689
1704
  async function resolveFeishuChatTypeById(params) {
@@ -1713,6 +1728,12 @@ const collectFeishuSecurityWarnings = createAllowlistProviderGroupPolicyWarningC
1713
1728
  }).accountId}] groups: groupPolicy="open" allows any member to trigger (mention-gated). Set channels.feishu.groupPolicy="allowlist" + channels.feishu.groupAllowFrom to restrict senders.`];
1714
1729
  }
1715
1730
  });
1731
+ const collectFeishuOpenGroupFindings = createConditionalWarningCollector.findings({
1732
+ collectWarnings: collectFeishuSecurityWarnings,
1733
+ checkId: "channels.feishu.groups.open",
1734
+ severity: "critical",
1735
+ title: "Feishu security warning"
1736
+ });
1716
1737
  function describeFeishuMessageTool({ cfg, accountId }) {
1717
1738
  const enabledAccounts = accountId ? [resolveFeishuAccount({
1718
1739
  cfg,
@@ -1888,8 +1909,7 @@ function resolveFeishuMessageActionResponsePrefix(ctx) {
1888
1909
  const channel = ctx.cfg.channels?.feishu;
1889
1910
  const configured = (ctx.accountId ? channel?.accounts?.[ctx.accountId]?.responsePrefix : void 0) ?? channel?.responsePrefix ?? (channel === void 0 ? ctx.cfg.messages?.responsePrefix : void 0);
1890
1911
  if (!configured) return;
1891
- const agentId = (ctx.agentId?.trim() || "main").toLowerCase();
1892
- const identityName = ctx.cfg.agents?.list?.find((agent) => agent.id.trim().toLowerCase() === agentId)?.identity?.name?.trim();
1912
+ const identityName = resolveAgentConfig(ctx.cfg, ctx.agentId ?? "main")?.identity?.name?.trim();
1893
1913
  const resolved = configured === "auto" ? identityName ? `[${identityName}]` : void 0 : configured.replace(/\{(?:identity\.name|identityname)\}/gi, identityName ?? "$&");
1894
1914
  return resolved && !UNRESOLVED_RESPONSE_PREFIX_VAR_PATTERN.test(resolved) ? resolved : void 0;
1895
1915
  }
@@ -2093,6 +2113,7 @@ const feishuPlugin = createChatChannelPlugin({
2093
2113
  ] },
2094
2114
  groups: { resolveToolPolicy: resolveFeishuGroupToolPolicy },
2095
2115
  conversationBindings: {
2116
+ bindingStore: "adapter",
2096
2117
  defaultTopLevelPlacement: "current",
2097
2118
  buildModelOverrideParentCandidates: ({ parentConversationId }) => buildFeishuModelOverrideParentCandidates(parentConversationId)
2098
2119
  },
@@ -2141,6 +2162,7 @@ const feishuPlugin = createChatChannelPlugin({
2141
2162
  collectRuntimeConfigAssignments
2142
2163
  },
2143
2164
  actions: {
2165
+ providerOwnedReadGates: true,
2144
2166
  messageActionTargetAliases,
2145
2167
  describeMessageTool: describeFeishuMessageTool,
2146
2168
  handleAction: async (ctx) => {
@@ -2196,7 +2218,9 @@ const feishuPlugin = createChatChannelPlugin({
2196
2218
  ...audioAsVoice === void 0 ? {} : { audioAsVoice }
2197
2219
  },
2198
2220
  accountId: ctx.accountId ?? void 0,
2221
+ ...ctx.mediaAccess ? { mediaAccess: ctx.mediaAccess } : {},
2199
2222
  mediaLocalRoots: ctx.mediaLocalRoots,
2223
+ ...ctx.mediaReadFile ? { mediaReadFile: ctx.mediaReadFile } : {},
2200
2224
  ...replyInThread ? { threadId: replyToMessageId } : { replyToId: replyToMessageId },
2201
2225
  ...audioAsVoice === void 0 ? {} : { audioAsVoice }
2202
2226
  });
@@ -2216,7 +2240,9 @@ const feishuPlugin = createChatChannelPlugin({
2216
2240
  text: text ?? "",
2217
2241
  mediaUrl,
2218
2242
  accountId: ctx.accountId ?? void 0,
2243
+ ...ctx.mediaAccess ? { mediaAccess: ctx.mediaAccess } : {},
2219
2244
  mediaLocalRoots: ctx.mediaLocalRoots,
2245
+ ...ctx.mediaReadFile ? { mediaReadFile: ctx.mediaReadFile } : {},
2220
2246
  ...replyInThread ? { threadId: replyToMessageId } : { replyToId: replyToMessageId },
2221
2247
  ...audioAsVoice === true ? { audioAsVoice: true } : {}
2222
2248
  });
@@ -2626,12 +2652,12 @@ const feishuPlugin = createChatChannelPlugin({
2626
2652
  afterWrite: { mode: "auto" }
2627
2653
  });
2628
2654
  } },
2629
- setup: feishuSetupAdapter,
2630
2655
  setupContract: feishuSetupContract,
2631
2656
  setupWizard: feishuSetupWizard,
2632
2657
  messaging: {
2633
2658
  targetPrefixes: ["feishu", "lark"],
2634
2659
  normalizeTarget: (raw) => normalizeFeishuTarget(raw) ?? void 0,
2660
+ inferTargetChatType: ({ to }) => resolveReceiveIdType(to) === "chat_id" ? "group" : "direct",
2635
2661
  resolveDeliveryTarget: ({ conversationId, parentConversationId }) => {
2636
2662
  const directId = parseFeishuDirectConversationId(conversationId);
2637
2663
  if (directId) return { to: `user:${directId}` };
@@ -2698,7 +2724,7 @@ const feishuPlugin = createChatChannelPlugin({
2698
2724
  })
2699
2725
  }),
2700
2726
  gateway: { startAccount: async (ctx) => {
2701
- const { monitorFeishuProvider } = await import("./monitor-DngbaA6a.js");
2727
+ const { monitorFeishuProvider } = await import("./monitor-CZ8cDXrq.js");
2702
2728
  const account = resolveFeishuRuntimeAccount({
2703
2729
  cfg: ctx.cfg,
2704
2730
  accountId: ctx.accountId
@@ -2725,7 +2751,10 @@ const feishuPlugin = createChatChannelPlugin({
2725
2751
  message: feishuMessageAdapter
2726
2752
  },
2727
2753
  security: {
2728
- collectWarnings: projectConfigAccountIdWarningCollector(collectFeishuSecurityWarnings),
2754
+ collectWarnings: ({ cfg, accountId }) => collectFeishuOpenGroupFindings({
2755
+ cfg,
2756
+ accountId
2757
+ }),
2729
2758
  collectAuditFindings: ({ cfg }) => collectFeishuSecurityAuditFindings({ cfg })
2730
2759
  },
2731
2760
  pairing: { text: {
@@ -1,2 +1,2 @@
1
- import { t as feishuPlugin } from "./channel-CScE82zY.js";
1
+ import { t as feishuPlugin } from "./channel-Ceq80_zP.js";
2
2
  export { feishuPlugin };