@openclaw/feishu 2026.6.5-beta.1 → 2026.6.5-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,5 +1,5 @@
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-kwvlPYbo.js";
2
+ import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./channel-DR5JCyFd.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";
@@ -32,8 +32,7 @@ import { buildSecretInputSchema, hasConfiguredSecretInput as hasConfiguredSecret
32
32
  import fs from "node:fs";
33
33
  import os from "node:os";
34
34
  import path from "node:path";
35
- import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
36
- import { loadSessionStore, resolveSessionFilePath, resolveStorePath, updateSessionStore } from "openclaw/plugin-sdk/session-store-runtime";
35
+ import { loadSessionStore, resolveAllAgentSessionStoreTargetsSync, resolveSessionFilePath, updateSessionStore } from "openclaw/plugin-sdk/session-store-runtime";
37
36
  import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
38
37
  import { createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
39
38
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, createSetupTranslator, formatDocsLink, hasConfiguredSecretInput as hasConfiguredSecretInput$1, mergeAllowFromEntries, patchTopLevelChannelConfigSection, promptSingleChannelSecretInput, splitSetupEntries } from "openclaw/plugin-sdk/setup";
@@ -461,43 +460,8 @@ function isFeishuSessionEntry(key, value) {
461
460
  const originFrom = normalizeMetadataString(origin?.from);
462
461
  return originProvider === "feishu" || originSurface.startsWith("feishu") || originFrom.startsWith("feishu:");
463
462
  }
464
- function collectConfiguredAgentIds(cfg) {
465
- const ids = /* @__PURE__ */ new Set();
466
- ids.add(resolveConfiguredDefaultAgentId(cfg));
467
- for (const agent of cfg.agents?.list ?? []) if (typeof agent.id === "string" && agent.id.trim()) ids.add(normalizeAgentId(agent.id));
468
- return [...ids].toSorted();
469
- }
470
- function resolveConfiguredDefaultAgentId(cfg) {
471
- const agents = cfg.agents?.list ?? [];
472
- const chosen = agents.find((agent) => agent?.default) ?? agents[0];
473
- return normalizeAgentId(typeof chosen?.id === "string" && chosen.id.trim() ? chosen.id : "main");
474
- }
475
463
  function collectFeishuSessionTargets(params) {
476
- const byStorePath = /* @__PURE__ */ new Map();
477
- const addTarget = (target) => {
478
- byStorePath.set(path.resolve(target.storePath), {
479
- ...target,
480
- storePath: path.resolve(target.storePath)
481
- });
482
- };
483
- for (const agentId of collectConfiguredAgentIds(params.cfg)) addTarget({
484
- agentId,
485
- storePath: resolveStorePath(params.cfg.session?.store, {
486
- agentId,
487
- env: params.env
488
- })
489
- });
490
- const agentsDir = path.join(params.stateDir, "agents");
491
- for (const agentDir of safeReadDir(agentsDir)) {
492
- if (!agentDir.isDirectory()) continue;
493
- const agentId = normalizeAgentId(agentDir.name);
494
- const storePath = path.join(agentsDir, agentDir.name, "sessions", "sessions.json");
495
- if (existsFile(storePath)) addTarget({
496
- agentId,
497
- storePath
498
- });
499
- }
500
- return [...byStorePath.values()].toSorted((left, right) => left.storePath.localeCompare(right.storePath));
464
+ return resolveAllAgentSessionStoreTargetsSync(params.cfg, { env: params.env }).toSorted((left, right) => left.storePath.localeCompare(right.storePath));
501
465
  }
502
466
  function collectJsonFiles(rootDir, limit = 200) {
503
467
  const files = [];
@@ -683,8 +647,7 @@ function inspectFeishuDoctorState(params) {
683
647
  const sessionEntries = [];
684
648
  for (const target of collectFeishuSessionTargets({
685
649
  cfg: params.cfg,
686
- env,
687
- stateDir
650
+ env
688
651
  })) {
689
652
  const store = loadSessionStore(target.storePath, { skipCache: true });
690
653
  for (const [key, entry] of Object.entries(store).toSorted(([left], [right]) => left.localeCompare(right))) {
@@ -738,13 +701,17 @@ function movePathToBackup(params) {
738
701
  return true;
739
702
  }
740
703
  function copyStoreBackup(params) {
741
- if (!existsFile(params.storePath)) return;
742
704
  const targetPath = path.join(params.backupDir, "session-stores", params.agentId, path.basename(params.storePath));
743
705
  fs.mkdirSync(path.dirname(targetPath), {
744
706
  recursive: true,
745
707
  mode: 448
746
708
  });
747
- fs.copyFileSync(params.storePath, resolveUniquePath(targetPath));
709
+ if (existsFile(params.storePath)) {
710
+ fs.copyFileSync(params.storePath, resolveUniquePath(targetPath));
711
+ return;
712
+ }
713
+ const store = loadSessionStore(params.storePath, { skipCache: true });
714
+ if (Object.keys(store).length > 0) fs.writeFileSync(resolveUniquePath(targetPath), JSON.stringify(store, null, 2));
748
715
  }
749
716
  function collectSessionArtifactPaths(params) {
750
717
  const artifacts = /* @__PURE__ */ new Set();
@@ -1735,7 +1702,7 @@ const meta = {
1735
1702
  order: 70,
1736
1703
  preferSessionLookupForAnnounceTarget: true
1737
1704
  };
1738
- const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-CH01Kcug.js"), "feishuChannelRuntime");
1705
+ const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-JVkii-p6.js"), "feishuChannelRuntime");
1739
1706
  function toFeishuMessageSendResult(result, kind) {
1740
1707
  const receipt = result.receipt ?? createFeishuSendReceipt({
1741
1708
  messageId: result.messageId,
@@ -2551,7 +2518,7 @@ const feishuPlugin = createChatChannelPlugin({
2551
2518
  })
2552
2519
  }),
2553
2520
  gateway: { startAccount: async (ctx) => {
2554
- const { monitorFeishuProvider } = await import("./monitor-BWjd60Dq.js");
2521
+ const { monitorFeishuProvider } = await import("./monitor-BL8BC85p.js");
2555
2522
  const account = resolveFeishuRuntimeAccount({
2556
2523
  cfg: ctx.cfg,
2557
2524
  accountId: ctx.accountId
@@ -1,2 +1,2 @@
1
- import { t as feishuPlugin } from "./channel-kwvlPYbo.js";
1
+ import { t as feishuPlugin } from "./channel-DR5JCyFd.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-kwvlPYbo.js";
2
+ import { h as listFeishuDirectoryPeers, m as listFeishuDirectoryGroups, o as buildFeishuPresentationCardElements } from "./channel-DR5JCyFd.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";
@@ -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-CzQXuWxS.js");
6
+ monitorAccountRuntimePromise ??= import("./monitor.account-DNduGVnu.js");
7
7
  return await monitorAccountRuntimePromise;
8
8
  }
9
9
  async function monitorFeishuProvider(opts = {}) {
@@ -1,13 +1,13 @@
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-kwvlPYbo.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-DR5JCyFd.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
9
  import { t as createFeishuThreadBindingManager } from "./thread-bindings-V0bwk0A1.js";
10
- import { createReplyPrefixContext, evaluateSupplementalContextVisibility, loadSessionStore, normalizeAgentId as normalizeAgentId$2, resolveChannelContextVisibilityMode, resolveSessionStoreEntry } from "./runtime-api.js";
10
+ import { createReplyPrefixContext, evaluateSupplementalContextVisibility, loadSessionStore, normalizeAgentId as normalizeAgentId$1, 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";
13
13
  import { a as feishuWebhookRateLimiter, c as wsClients, i as botOpenIds, l as fetchBotIdentityForMonitor, n as FEISHU_WEBHOOK_MAX_BODY_BYTES, o as httpServers, r as botNames, s as recordWebhookStatus, t as FEISHU_WEBHOOK_BODY_TIMEOUT_MS } from "./monitor.state-r4OLFBfg.js";
@@ -20,9 +20,9 @@ import { stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
20
20
  import fs from "node:fs";
21
21
  import os from "node:os";
22
22
  import path from "node:path";
23
- import { resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
24
23
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
25
24
  import * as Lark from "@larksuiteoapi/node-sdk";
25
+ import { resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
26
26
  import * as crypto$1 from "node:crypto";
27
27
  import crypto, { createHash } from "node:crypto";
28
28
  import { applyBasicWebhookRequestGuards, resolveRequestClientIp } from "openclaw/plugin-sdk/webhook-ingress";
@@ -757,12 +757,12 @@ function resolveUserPath(p) {
757
757
  //#endregion
758
758
  //#region extensions/feishu/src/agent-config.ts
759
759
  const DEFAULT_AGENT_ID = "main";
760
- function normalizeAgentId$1(value) {
760
+ function normalizeAgentId(value) {
761
761
  return (value ?? "").trim().toLowerCase() || DEFAULT_AGENT_ID;
762
762
  }
763
763
  function resolveFeishuConfigReasoningDefault(cfg, agentId) {
764
- const id = normalizeAgentId$1(agentId);
765
- return cfg.agents?.list?.find((entry) => normalizeAgentId$1(entry?.id) === id)?.reasoningDefault ?? cfg.agents?.defaults?.reasoningDefault ?? "off";
764
+ const id = normalizeAgentId(agentId);
765
+ return cfg.agents?.list?.find((entry) => normalizeAgentId(entry?.id) === id)?.reasoningDefault ?? cfg.agents?.defaults?.reasoningDefault ?? "off";
766
766
  }
767
767
  //#endregion
768
768
  //#region extensions/feishu/src/reasoning-preview.ts
@@ -2188,7 +2188,7 @@ async function handleFeishuMessage(params) {
2188
2188
  const dmPolicy = feishuCfg?.dmPolicy ?? "pairing";
2189
2189
  const configAllowFrom = feishuCfg?.allowFrom ?? [];
2190
2190
  const rawBroadcastAgents = isGroup ? resolveBroadcastAgents(cfg, ctx.chatId) : null;
2191
- const broadcastAgents = rawBroadcastAgents ? uniqueStrings(rawBroadcastAgents.map((id) => normalizeAgentId$2(id))) : null;
2191
+ const broadcastAgents = rawBroadcastAgents ? uniqueStrings(rawBroadcastAgents.map((id) => normalizeAgentId$1(id))) : null;
2192
2192
  const messageCreateTimeMs = parseStrictNonNegativeInteger(event.message.create_time) ?? Date.now();
2193
2193
  let requireMention = false;
2194
2194
  if (isGroup) {
@@ -2736,12 +2736,12 @@ async function handleFeishuMessage(params) {
2736
2736
  return;
2737
2737
  }
2738
2738
  const strategy = cfg.broadcast?.strategy === "sequential" ? "sequential" : "parallel";
2739
- const activeAgentId = ctx.mentionedBot || !requireMention ? normalizeAgentId$2(route.agentId) : null;
2740
- const agentIds = (cfg.agents?.list ?? []).map((a) => normalizeAgentId$2(a.id));
2739
+ const activeAgentId = ctx.mentionedBot || !requireMention ? normalizeAgentId$1(route.agentId) : null;
2740
+ const agentIds = (cfg.agents?.list ?? []).map((a) => normalizeAgentId$1(a.id));
2741
2741
  const hasKnownAgents = agentIds.length > 0;
2742
2742
  log(`feishu[${account.accountId}]: broadcasting to ${broadcastAgents.length} agents (strategy=${strategy}, active=${activeAgentId ?? "none"})`);
2743
2743
  const dispatchForAgent = async (agentId) => {
2744
- if (hasKnownAgents && !agentIds.includes(normalizeAgentId$2(agentId))) {
2744
+ if (hasKnownAgents && !agentIds.includes(normalizeAgentId$1(agentId))) {
2745
2745
  log(`feishu[${account.accountId}]: broadcast agent ${agentId} not found in agents.list; skipping`);
2746
2746
  return;
2747
2747
  }
@@ -3,8 +3,8 @@ import { createReplyPrefixContext } from "openclaw/plugin-sdk/channel-outbound";
3
3
  import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
4
4
  import { PAIRING_APPROVED_MESSAGE, buildProbeChannelStatusSummary, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/channel-status";
5
5
  import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
6
- import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
7
6
  import { loadSessionStore, resolveSessionStoreEntry } from "openclaw/plugin-sdk/session-store-runtime";
7
+ import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
8
8
  import { DEFAULT_ACCOUNT_ID, buildChannelConfigSchema, createActionGate, createDedupeCache } from "openclaw/plugin-sdk/core";
9
9
  import { buildAgentMediaPayload } from "openclaw/plugin-sdk/agent-media-payload";
10
10
  import { evaluateSupplementalContextVisibility, filterSupplementalContextItems, resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
package/dist/setup-api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-kwvlPYbo.js";
1
+ import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-DR5JCyFd.js";
2
2
  export { feishuPlugin, feishuSetupAdapter, feishuSetupWizard };
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@openclaw/feishu",
3
- "version": "2026.6.5-beta.1",
3
+ "version": "2026.6.5-beta.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/feishu",
9
- "version": "2026.6.5-beta.1",
9
+ "version": "2026.6.5-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.6.5-beta.1"
16
+ "openclaw": ">=2026.6.5-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.6.5-beta.1",
3
+ "version": "2026.6.5-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.6.5-beta.1"
16
+ "openclaw": ">=2026.6.5-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.6.5-beta.1"
50
+ "pluginApi": ">=2026.6.5-beta.3"
51
51
  },
52
52
  "build": {
53
- "openclawVersion": "2026.6.5-beta.1"
53
+ "openclawVersion": "2026.6.5-beta.3"
54
54
  },
55
55
  "release": {
56
56
  "publishToClawHub": true,