@openclaw/feishu 2026.6.2-beta.1 → 2026.6.5-beta.2
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 +1 -1
- package/dist/{channel-DTfK2nVn.js → channel-kwvlPYbo.js} +2 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-DAt4olzi.js → channel.runtime-CH01Kcug.js} +1 -1
- package/dist/{monitor-CBIEj0RH.js → monitor-BWjd60Dq.js} +1 -1
- package/dist/{monitor.account-BvKcwxaW.js → monitor.account-CzQXuWxS.js} +7 -55
- package/dist/setup-api.js +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
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-
|
|
2
|
+
import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./channel-kwvlPYbo.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";
|
|
@@ -1735,7 +1735,7 @@ const meta = {
|
|
|
1735
1735
|
order: 70,
|
|
1736
1736
|
preferSessionLookupForAnnounceTarget: true
|
|
1737
1737
|
};
|
|
1738
|
-
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
1738
|
+
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-CH01Kcug.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-
|
|
2554
|
+
const { monitorFeishuProvider } = await import("./monitor-BWjd60Dq.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-
|
|
1
|
+
import { t as feishuPlugin } from "./channel-kwvlPYbo.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-
|
|
2
|
+
import { h as listFeishuDirectoryPeers, m as listFeishuDirectoryGroups, o as buildFeishuPresentationCardElements } from "./channel-kwvlPYbo.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-
|
|
6
|
+
monitorAccountRuntimePromise ??= import("./monitor.account-CzQXuWxS.js");
|
|
7
7
|
return await monitorAccountRuntimePromise;
|
|
8
8
|
}
|
|
9
9
|
async function monitorFeishuProvider(opts = {}) {
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
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";
|
|
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";
|
|
@@ -25,7 +25,6 @@ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
|
25
25
|
import * as Lark from "@larksuiteoapi/node-sdk";
|
|
26
26
|
import * as crypto$1 from "node:crypto";
|
|
27
27
|
import crypto, { createHash } from "node:crypto";
|
|
28
|
-
import { loadJsonFile } from "openclaw/plugin-sdk/json-store";
|
|
29
28
|
import { applyBasicWebhookRequestGuards, resolveRequestClientIp } from "openclaw/plugin-sdk/webhook-ingress";
|
|
30
29
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
31
30
|
import { resolveSendableOutboundReplyParts, resolveTextChunksWithFallback, sendMediaWithLeadingCaption } from "openclaw/plugin-sdk/reply-payload";
|
|
@@ -452,7 +451,6 @@ const DEDUP_TTL_MS = 1440 * 60 * 1e3;
|
|
|
452
451
|
const MEMORY_MAX_SIZE = 1e3;
|
|
453
452
|
const STORE_MAX_ENTRIES = 1e4;
|
|
454
453
|
const memory = /* @__PURE__ */ new Map();
|
|
455
|
-
const importedLegacyNamespaces = /* @__PURE__ */ new Set();
|
|
456
454
|
const cachedDedupStores = /* @__PURE__ */ new Map();
|
|
457
455
|
function normalizeMessageId(messageId) {
|
|
458
456
|
const trimmed = messageId?.trim();
|
|
@@ -461,16 +459,6 @@ function normalizeMessageId(messageId) {
|
|
|
461
459
|
function normalizeNamespace(namespace) {
|
|
462
460
|
return namespace?.trim() || "global";
|
|
463
461
|
}
|
|
464
|
-
function resolveLegacyStateDir(env = process.env) {
|
|
465
|
-
const stateOverride = env.OPENCLAW_STATE_DIR?.trim();
|
|
466
|
-
if (stateOverride) return stateOverride;
|
|
467
|
-
if (env.VITEST || env.NODE_ENV === "test") return path.join(os.tmpdir(), ["openclaw-vitest", String(process.pid)].join("-"));
|
|
468
|
-
return path.join(os.homedir(), ".openclaw");
|
|
469
|
-
}
|
|
470
|
-
function resolveLegacyNamespaceFilePath(namespace) {
|
|
471
|
-
const safe = namespace.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
472
|
-
return path.join(resolveLegacyStateDir(), "feishu", "dedup", `${safe}.json`);
|
|
473
|
-
}
|
|
474
462
|
function pluginStateNamespace(namespace) {
|
|
475
463
|
return `dedup.${namespace.replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
476
464
|
}
|
|
@@ -511,33 +499,6 @@ function hasMemory(namespace, messageId, now = Date.now()) {
|
|
|
511
499
|
memory.delete(key);
|
|
512
500
|
return false;
|
|
513
501
|
}
|
|
514
|
-
function sanitizeLegacyDedupeData(value) {
|
|
515
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) return {};
|
|
516
|
-
const out = {};
|
|
517
|
-
for (const [key, seenAt] of Object.entries(value)) if (typeof seenAt === "number" && Number.isFinite(seenAt) && seenAt > 0) out[key] = seenAt;
|
|
518
|
-
return out;
|
|
519
|
-
}
|
|
520
|
-
function importLegacyDedupNamespace(namespace, now = Date.now(), log) {
|
|
521
|
-
if (importedLegacyNamespaces.has(namespace)) return;
|
|
522
|
-
try {
|
|
523
|
-
const data = sanitizeLegacyDedupeData(loadJsonFile(resolveLegacyNamespaceFilePath(namespace)));
|
|
524
|
-
const store = openDedupStore(namespace);
|
|
525
|
-
for (const [messageId, seenAt] of Object.entries(data)) {
|
|
526
|
-
if (!isRecent(seenAt, now)) continue;
|
|
527
|
-
const key = dedupeStoreKey(namespace, messageId);
|
|
528
|
-
if (store.lookup(key) != null) continue;
|
|
529
|
-
store.register(key, {
|
|
530
|
-
namespace,
|
|
531
|
-
messageId,
|
|
532
|
-
seenAt
|
|
533
|
-
}, { ttlMs: Math.max(1, DEDUP_TTL_MS - (now - seenAt)) });
|
|
534
|
-
}
|
|
535
|
-
importedLegacyNamespaces.add(namespace);
|
|
536
|
-
} catch (error) {
|
|
537
|
-
importedLegacyNamespaces.delete(namespace);
|
|
538
|
-
log?.(`feishu-dedup: legacy state import failed: ${String(error)}`);
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
502
|
async function claimUnprocessedFeishuMessage(params) {
|
|
542
503
|
const { messageId, namespace = "global", log } = params;
|
|
543
504
|
const normalizedMessageId = normalizeMessageId(messageId);
|
|
@@ -585,7 +546,6 @@ async function tryRecordMessagePersistent(messageId, namespace = "global", log)
|
|
|
585
546
|
const normalizedMessageId = normalizeMessageId(messageId);
|
|
586
547
|
if (!normalizedMessageId) return true;
|
|
587
548
|
const now = Date.now();
|
|
588
|
-
importLegacyDedupNamespace(normalizedNamespace, now, log);
|
|
589
549
|
if (hasMemory(normalizedNamespace, normalizedMessageId, now)) return false;
|
|
590
550
|
const key = dedupeStoreKey(normalizedNamespace, normalizedMessageId);
|
|
591
551
|
try {
|
|
@@ -624,7 +584,6 @@ async function hasRecordedMessagePersistent(messageId, namespace = "global", log
|
|
|
624
584
|
const normalizedMessageId = normalizeMessageId(messageId);
|
|
625
585
|
if (!normalizedMessageId) return false;
|
|
626
586
|
const now = Date.now();
|
|
627
|
-
importLegacyDedupNamespace(normalizedNamespace, now, log);
|
|
628
587
|
if (hasMemory(normalizedNamespace, normalizedMessageId, now)) return true;
|
|
629
588
|
try {
|
|
630
589
|
const existingSeenAt = openDedupStore(normalizedNamespace).lookup(dedupeStoreKey(normalizedNamespace, normalizedMessageId))?.seenAt;
|
|
@@ -636,12 +595,11 @@ async function hasRecordedMessagePersistent(messageId, namespace = "global", log
|
|
|
636
595
|
return hasMemory(normalizedNamespace, normalizedMessageId, now);
|
|
637
596
|
}
|
|
638
597
|
}
|
|
639
|
-
async function
|
|
598
|
+
async function warmupDedupFromPluginState(namespace, log) {
|
|
640
599
|
const normalizedNamespace = normalizeNamespace(namespace);
|
|
641
600
|
try {
|
|
642
601
|
let loaded = 0;
|
|
643
602
|
const now = Date.now();
|
|
644
|
-
importLegacyDedupNamespace(normalizedNamespace, now, log);
|
|
645
603
|
for (const entry of openDedupStore(normalizedNamespace).entries()) {
|
|
646
604
|
if (entry.value.namespace !== normalizedNamespace || !isRecent(entry.value.seenAt, now)) continue;
|
|
647
605
|
remember(normalizedNamespace, entry.value.messageId, entry.value.seenAt);
|
|
@@ -897,11 +855,6 @@ function shouldPushStreamingUpdate(previousText, nextText) {
|
|
|
897
855
|
if (hasNaturalStreamingBoundary(nextText)) return true;
|
|
898
856
|
return nextText.length - previousText.length >= STREAMING_SIGNIFICANT_DELTA_CHARS;
|
|
899
857
|
}
|
|
900
|
-
function resolveStreamingCardAppendContent(previousText, nextText) {
|
|
901
|
-
if (!nextText || nextText === previousText) return "";
|
|
902
|
-
if (!previousText) return nextText;
|
|
903
|
-
return nextText.startsWith(previousText) ? nextText.slice(previousText.length) : nextText;
|
|
904
|
-
}
|
|
905
858
|
function mergeStreamingText(previousText, nextText) {
|
|
906
859
|
const previous = typeof previousText === "string" ? previousText : "";
|
|
907
860
|
const next = typeof nextText === "string" ? nextText : "";
|
|
@@ -1142,11 +1095,10 @@ var FeishuStreamingSession = class {
|
|
|
1142
1095
|
const nextText = this.pendingText ?? mergedInput;
|
|
1143
1096
|
const mergedText = mergeStreamingText(this.state.currentText, nextText);
|
|
1144
1097
|
if (!mergedText || mergedText === this.state.currentText) return;
|
|
1145
|
-
|
|
1146
|
-
if (!appendContent) return;
|
|
1098
|
+
if (mergedText === this.state.sentText) return;
|
|
1147
1099
|
this.pendingText = null;
|
|
1148
1100
|
this.state.currentText = mergedText;
|
|
1149
|
-
if (await this.updateCardContent(
|
|
1101
|
+
if (await this.updateCardContent(mergedText, (e) => this.log?.(`Update failed: ${String(e)}`)) && this.state) this.state.sentText = mergedText;
|
|
1150
1102
|
});
|
|
1151
1103
|
await this.queue;
|
|
1152
1104
|
}
|
|
@@ -1185,7 +1137,7 @@ var FeishuStreamingSession = class {
|
|
|
1185
1137
|
const apiBase = resolveApiBase(this.creds.domain);
|
|
1186
1138
|
let visibleContentSent = Boolean(this.state.sentText.trim());
|
|
1187
1139
|
if ((text || finalText !== void 0) && text !== this.state.sentText) {
|
|
1188
|
-
const sent = text.startsWith(this.state.sentText) ? await this.updateCardContent(
|
|
1140
|
+
const sent = text.startsWith(this.state.sentText) ? await this.updateCardContent(text, (e) => this.log?.(`Final update failed: ${String(e)}`)) : await this.replaceCardContent(text, (e) => this.log?.(`Final replace failed: ${String(e)}`));
|
|
1189
1141
|
this.state.currentText = text;
|
|
1190
1142
|
if (sent) {
|
|
1191
1143
|
this.state.sentText = text;
|
|
@@ -5520,8 +5472,8 @@ async function monitorSingleAccount(params) {
|
|
|
5520
5472
|
const connectionMode = account.config.connectionMode ?? "websocket";
|
|
5521
5473
|
if (connectionMode === "webhook" && !account.verificationToken?.trim()) throw new Error(`Feishu account "${accountId}" webhook mode requires verificationToken`);
|
|
5522
5474
|
if (connectionMode === "webhook" && !account.encryptKey?.trim()) throw new Error(`Feishu account "${accountId}" webhook mode requires encryptKey`);
|
|
5523
|
-
const warmupCount = await
|
|
5524
|
-
if (warmupCount > 0) log(`feishu[${accountId}]: dedup warmup loaded ${warmupCount} entries from
|
|
5475
|
+
const warmupCount = await warmupDedupFromPluginState(accountId, log);
|
|
5476
|
+
if (warmupCount > 0) log(`feishu[${accountId}]: dedup warmup loaded ${warmupCount} entries from plugin state`);
|
|
5525
5477
|
let threadBindingManager;
|
|
5526
5478
|
try {
|
|
5527
5479
|
const eventDispatcher = createEventDispatcher(account);
|
package/dist/setup-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-
|
|
1
|
+
import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-kwvlPYbo.js";
|
|
2
2
|
export { feishuPlugin, feishuSetupAdapter, feishuSetupWizard };
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/feishu",
|
|
3
|
-
"version": "2026.6.
|
|
3
|
+
"version": "2026.6.5-beta.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/feishu",
|
|
9
|
-
"version": "2026.6.
|
|
9
|
+
"version": "2026.6.5-beta.2",
|
|
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.
|
|
16
|
+
"openclaw": ">=2026.6.5-beta.2"
|
|
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.
|
|
3
|
+
"version": "2026.6.5-beta.2",
|
|
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.
|
|
16
|
+
"openclaw": ">=2026.6.5-beta.2"
|
|
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.
|
|
50
|
+
"pluginApi": ">=2026.6.5-beta.2"
|
|
51
51
|
},
|
|
52
52
|
"build": {
|
|
53
|
-
"openclawVersion": "2026.6.
|
|
53
|
+
"openclawVersion": "2026.6.5-beta.2"
|
|
54
54
|
},
|
|
55
55
|
"release": {
|
|
56
56
|
"publishToClawHub": true,
|