@openclaw/feishu 2026.11.5-beta.1 → 2026.11.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/.setup/{app-registration-CBgQSu2L.mjs → app-registration-DhnIp0Kd.mjs} +2 -1
- package/dist/.setup/{channel-C-ihVGPI.mjs → channel-B7oAL99p.mjs} +55 -35
- package/dist/.setup/{channel.runtime-B-bwxyuO.mjs → channel.runtime-CPZ_4RmH.mjs} +14 -10
- package/dist/.setup/{chat-BnbyUuyu.mjs → chat-g8dTUdIb.mjs} +4 -3
- package/dist/.setup/{client-BAiJnY41.mjs → client-DqGMyzOi.mjs} +7 -4
- package/dist/.setup/{conversation-id-N6q3vKm-.mjs → conversation-id-BLsHZ7pf.mjs} +4 -2
- package/dist/.setup/{doctor-contract-ItAh0keT.mjs → doctor-contract-CPh2u5-o.mjs} +20 -10
- package/dist/.setup/{message-action-contract-BZK6bpAl.mjs → message-action-contract-DMVMY_ng.mjs} +2 -1
- package/dist/.setup/{monitor-BTjbcB44.mjs → monitor-BqBGfE5v.mjs} +10 -7
- package/dist/.setup/{monitor.account-bY8MrrbE.mjs → monitor.account-Dg2Hz-4E.mjs} +88 -50
- package/dist/.setup/{probe-D87MR-Mn.mjs → probe-CbNVGjv_.mjs} +6 -4
- package/dist/.setup/{reply-delivery-result-Bx8hMh42.mjs → reply-delivery-result-BjOCvaPo.mjs} +66 -35
- package/dist/.setup/{runtime-6V3uDMw5.mjs → runtime-C5JxBWZp.mjs} +2 -1
- package/dist/.setup/runtime-setter-api-BrQHE03y.mjs +2 -0
- package/dist/.setup/{secret-contract-BAucuP6O.mjs → secret-contract-Do6HTIFT.mjs} +2 -1
- package/dist/.setup/{secret-contract-api-DR5mIHhJ.mjs → secret-contract-api-LwCXK5Qg.mjs} +1 -1
- package/dist/.setup/{security-audit-CYRW0D76.mjs → security-audit-b86aSgH2.mjs} +2 -1
- package/dist/.setup/{session-conversation-DLgXP0-H.mjs → session-conversation-CM3UgYZY.mjs} +3 -2
- package/dist/.setup/{setup-api-D-s4rNpi.mjs → setup-api-CqAPCSPK.mjs} +1 -1
- package/dist/.setup/{subagent-hooks-BRem84Mh.mjs → subagent-hooks-DdiyEIi7.mjs} +5 -4
- package/dist/.setup/{thread-bindings-6eyktxK_.mjs → thread-bindings-BxKmOara.mjs} +2 -1
- package/dist/.source-module-urls/6579f1b33dd01f8f0aaea28311ed6df1a635f9ad1e6fa86dcba53bca46407e55.json +1 -1
- package/dist/api.js +28 -18
- package/dist/channel-entry.js +2 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/configured-state.js +2 -1
- package/dist/contract-api.js +3 -3
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +2 -1
- package/dist/runtime-api.js +1 -1
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/session-key-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +5 -4
- package/dist/subagent-hooks-api.js +3 -2
- package/package.json +4 -4
- package/dist/.setup/runtime-setter-api-DSLLnejl.mjs +0 -2
|
@@ -3,7 +3,7 @@ import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
|
3
3
|
import { renderQrTerminal } from "openclaw/plugin-sdk/media-runtime";
|
|
4
4
|
import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
5
5
|
import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
6
|
-
|
|
6
|
+
//#region extensions/feishu/src/app-registration.ts
|
|
7
7
|
const FEISHU_ACCOUNTS_URL = "https://accounts.feishu.cn";
|
|
8
8
|
const LARK_ACCOUNTS_URL = "https://accounts.larksuite.com";
|
|
9
9
|
const REGISTRATION_PATH = "/oauth/v1/app/registration";
|
|
@@ -170,4 +170,5 @@ async function sleepRegistrationPollInterval(intervalSeconds, abortSignal) {
|
|
|
170
170
|
const intervalMs = finiteSecondsToTimerSafeMilliseconds(intervalSeconds) ?? DEFAULT_REGISTRATION_POLL_INTERVAL_SECONDS * 1e3;
|
|
171
171
|
await sleepWithAbort(intervalMs, abortSignal).catch(() => {});
|
|
172
172
|
}
|
|
173
|
+
//#endregion
|
|
173
174
|
export { beginAppRegistration, getAppOwnerOpenId, initAppRegistration, pollAppRegistration, printQrCode };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { _ as __exportAll, a as FeishuChannelConfigSchema, c as normalizeFeishuExternalKey, d as listEnabledFeishuAccounts, f as listFeishuAccountIds, g as resolveFeishuRuntimeAccount, h as resolveFeishuAccount, m as resolveDefaultFeishuAccountId, n as legacyConfigRules, o as DEFAULT_FEISHU_WEBHOOK_PATH, p as mergeFeishuAccountConfig, r as normalizeCompatibilityConfig, s as normalizeFeishuWebhookPath, u as inspectFeishuCredentials, v as __reExport } from "./doctor-contract-
|
|
2
|
-
import { a as parseFeishuTargetId, c as looksLikeFeishuId, i as parseFeishuDirectConversationId, l as normalizeFeishuTarget, n as buildFeishuModelOverrideParentCandidates, o as resolveConfiguredFeishuGroupSessionScope, r as parseFeishuConversationId, t as buildFeishuConversationId, u as resolveReceiveIdType } from "./conversation-id-
|
|
3
|
-
import { A as sendMessageFeishu, At as resolveFeishuGroupConfig, Ct as isFeishuGroupReadAllowed, Et as resolveFeishuChatReadPreliminaryAuthorization, Ft as normalizeFeishuChatType, It as resolveFeishuChatType, J as deliverCommentThreadText, M as toFeishuMessageSendResult, Nt as resolveFeishuGroupToolPolicy, S as sendMediaFeishu, St as canEnumerateAllFeishuPeers, T as chunkFeishuCardMarkdown, Tt as readFeishuChatInfoWithAuthorization, W as buildFeishuMediaFallbackText, _ as renderFeishuPresentationPayload, _t as shouldUseFeishuCard, b as withinCardTableLimit, bt as authorizeFeishuChatMemberRead, c as buildFeishuPayloadCard, d as consumeFeishuPresentationFallbackMarker, dt as readNativeFeishuCardJson, f as feishuCardWithinTableLimit, g as renderFeishuPresentationFallbackText, h as readNativeFeishuCard, ht as materializeFeishuPostMarkdownSoftBreaks, j as sendStructuredCardFeishu, k as sendCardFeishu, l as buildFeishuPresentationCard, m as markRenderedFeishuCard, mt as chunkFeishuPostMarkdown, n as createFeishuReplyDeliveryResult, o as FEISHU_PRESENTATION_CAPABILITIES, p as isFeishuCardWithinEnvelope, pt as chunkFeishuMarkdown, q as resolveFeishuIdentityHeaderTitle, s as assertFeishuCardWithinEnvelope, t as createFeishuPartialReplyDeliveryError, tt as cleanupAmbientCommentTypingReaction, u as buildFeishuPresentationFallback, ut as parseFeishuCommentTarget, w as shouldSuppressFeishuTextForVoiceMedia, wt as isFeishuGroupReadEnabled, xt as canEnumerateAllFeishuGroups, y as resolveFeishuRichReply, yt as assertFeishuChatReadAllowed } from "./reply-delivery-result-
|
|
4
|
-
import { t as messageActionTargetAliases } from "./message-action-contract-
|
|
5
|
-
import { l as withFeishuRequestContext, r as createFeishuClient, u as withFeishuSendContext } from "./client-
|
|
6
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
7
|
-
import { t as collectFeishuSecurityAuditFindings } from "./security-audit-
|
|
8
|
-
import { t as resolveFeishuSessionConversation } from "./session-conversation-
|
|
9
|
-
import { n as getFeishuThreadBindingManager } from "./thread-bindings-
|
|
1
|
+
import { _ as __exportAll, a as FeishuChannelConfigSchema, c as normalizeFeishuExternalKey, d as listEnabledFeishuAccounts, f as listFeishuAccountIds, g as resolveFeishuRuntimeAccount, h as resolveFeishuAccount, m as resolveDefaultFeishuAccountId, n as legacyConfigRules, o as DEFAULT_FEISHU_WEBHOOK_PATH, p as mergeFeishuAccountConfig, r as normalizeCompatibilityConfig, s as normalizeFeishuWebhookPath, u as inspectFeishuCredentials, v as __reExport } from "./doctor-contract-CPh2u5-o.mjs";
|
|
2
|
+
import { a as parseFeishuTargetId, c as looksLikeFeishuId, i as parseFeishuDirectConversationId, l as normalizeFeishuTarget, n as buildFeishuModelOverrideParentCandidates, o as resolveConfiguredFeishuGroupSessionScope, r as parseFeishuConversationId, t as buildFeishuConversationId, u as resolveReceiveIdType } from "./conversation-id-BLsHZ7pf.mjs";
|
|
3
|
+
import { A as sendMessageFeishu, At as resolveFeishuGroupConfig, Ct as isFeishuGroupReadAllowed, Et as resolveFeishuChatReadPreliminaryAuthorization, Ft as normalizeFeishuChatType, It as resolveFeishuChatType, J as deliverCommentThreadText, M as toFeishuMessageSendResult, Nt as resolveFeishuGroupToolPolicy, S as sendMediaFeishu, St as canEnumerateAllFeishuPeers, T as chunkFeishuCardMarkdown, Tt as readFeishuChatInfoWithAuthorization, W as buildFeishuMediaFallbackText, _ as renderFeishuPresentationPayload, _t as shouldUseFeishuCard, b as withinCardTableLimit, bt as authorizeFeishuChatMemberRead, c as buildFeishuPayloadCard, d as consumeFeishuPresentationFallbackMarker, dt as readNativeFeishuCardJson, f as feishuCardWithinTableLimit, g as renderFeishuPresentationFallbackText, h as readNativeFeishuCard, ht as materializeFeishuPostMarkdownSoftBreaks, j as sendStructuredCardFeishu, k as sendCardFeishu, l as buildFeishuPresentationCard, m as markRenderedFeishuCard, mt as chunkFeishuPostMarkdown, n as createFeishuReplyDeliveryResult, o as FEISHU_PRESENTATION_CAPABILITIES, p as isFeishuCardWithinEnvelope, pt as chunkFeishuMarkdown, q as resolveFeishuIdentityHeaderTitle, s as assertFeishuCardWithinEnvelope, t as createFeishuPartialReplyDeliveryError, tt as cleanupAmbientCommentTypingReaction, u as buildFeishuPresentationFallback, ut as parseFeishuCommentTarget, w as shouldSuppressFeishuTextForVoiceMedia, wt as isFeishuGroupReadEnabled, xt as canEnumerateAllFeishuGroups, y as resolveFeishuRichReply, yt as assertFeishuChatReadAllowed } from "./reply-delivery-result-BjOCvaPo.mjs";
|
|
4
|
+
import { t as messageActionTargetAliases } from "./message-action-contract-DMVMY_ng.mjs";
|
|
5
|
+
import { l as withFeishuRequestContext, r as createFeishuClient, u as withFeishuSendContext } from "./client-DqGMyzOi.mjs";
|
|
6
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-Do6HTIFT.mjs";
|
|
7
|
+
import { t as collectFeishuSecurityAuditFindings } from "./security-audit-b86aSgH2.mjs";
|
|
8
|
+
import { t as resolveFeishuSessionConversation } from "./session-conversation-CM3UgYZY.mjs";
|
|
9
|
+
import { n as getFeishuThreadBindingManager } from "./thread-bindings-BxKmOara.mjs";
|
|
10
10
|
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
11
11
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
12
12
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-resolution";
|
|
@@ -46,7 +46,7 @@ import { statRegularFileSync } from "openclaw/plugin-sdk/security-runtime";
|
|
|
46
46
|
import { readStringParam } from "openclaw/plugin-sdk/param-readers";
|
|
47
47
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
48
48
|
import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
|
|
49
|
-
|
|
49
|
+
//#region extensions/feishu/src/agent-prompt.ts
|
|
50
50
|
function buildFeishuMessageToolHints(actions) {
|
|
51
51
|
return [
|
|
52
52
|
"- Feishu targeting: omit `target` to reply to the current conversation (auto-inferred). Explicit targets: `user:open_id` or `chat:chat_id`.",
|
|
@@ -57,7 +57,8 @@ function buildFeishuMessageToolHints(actions) {
|
|
|
57
57
|
...actions?.includes("sticker-search") ? ["- Feishu `action=sticker-search`: configured keyword lookup only, not store search or learned/visual matching. Supply `query` (1–128 characters) and optional `limit` (1–10, default 5); send a returned `fileId` with `action=sticker` on the same account. If `truncated` is true, narrow the query."] : []
|
|
58
58
|
];
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region extensions/feishu/src/approval-auth.ts
|
|
61
62
|
function normalizeFeishuApproverId(value) {
|
|
62
63
|
const normalized = normalizeFeishuTarget(String(value));
|
|
63
64
|
const trimmed = normalizeOptionalLowercaseString(normalized);
|
|
@@ -73,7 +74,8 @@ const feishuApprovalAuth = createChannelApprovalAuth({
|
|
|
73
74
|
},
|
|
74
75
|
normalizeApprover: normalizeFeishuApproverId
|
|
75
76
|
}).approvalAuth;
|
|
76
|
-
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region extensions/feishu/src/directory.static.ts
|
|
77
79
|
async function listFeishuDirectoryPeers(params) {
|
|
78
80
|
const account = resolveFeishuAccount({
|
|
79
81
|
cfg: params.cfg,
|
|
@@ -135,7 +137,8 @@ async function listAuthorizedFeishuDirectoryGroups(params) {
|
|
|
135
137
|
id
|
|
136
138
|
}));
|
|
137
139
|
}
|
|
138
|
-
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region extensions/feishu/src/doctor-agent-roster.ts
|
|
139
142
|
function collectFeishuDoctorAgentIds(cfg) {
|
|
140
143
|
const agents = isRecord(cfg) && isRecord(cfg.agents) ? cfg.agents : void 0;
|
|
141
144
|
if (isRecord(agents?.entries)) {
|
|
@@ -148,7 +151,8 @@ function collectFeishuDoctorAgentIds(cfg) {
|
|
|
148
151
|
for (const entry of entries) if (typeof entry.id === "string" && entry.id.trim()) ids.add(normalizeAgentId(entry.id));
|
|
149
152
|
return [...ids].toSorted();
|
|
150
153
|
}
|
|
151
|
-
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/gateway/gateway-http-route-contracts.ts
|
|
152
156
|
const GATEWAY_PROBE_ROUTES = /* @__PURE__ */ new Map([
|
|
153
157
|
["/health", "live"],
|
|
154
158
|
["/healthz", "live"],
|
|
@@ -164,7 +168,8 @@ function classifyGatewayProbePath(pathname) {
|
|
|
164
168
|
}
|
|
165
169
|
return "outside";
|
|
166
170
|
}
|
|
167
|
-
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region packages/normalization-core/src/string-coerce.ts
|
|
168
173
|
/** Trims string input and returns null for non-strings or empty strings. */
|
|
169
174
|
function normalizeNullableString$1(value) {
|
|
170
175
|
if (typeof value !== "string") return null;
|
|
@@ -183,11 +188,13 @@ function normalizeOptionalLowercaseString$1(value) {
|
|
|
183
188
|
function normalizeLowercaseStringOrEmpty$1(value) {
|
|
184
189
|
return normalizeOptionalLowercaseString$1(value) ?? "";
|
|
185
190
|
}
|
|
186
|
-
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/plugins/http-path-prefix.ts
|
|
187
193
|
function prefixMatchPath(pathname, prefix) {
|
|
188
194
|
return pathname === prefix || pathname.startsWith(`${prefix}/`) || pathname.startsWith(`${prefix}%`);
|
|
189
195
|
}
|
|
190
|
-
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/gateway/security-path.ts
|
|
191
198
|
const MAX_PATH_DECODE_PASSES = 32;
|
|
192
199
|
function normalizePathSeparators(pathname) {
|
|
193
200
|
const collapsed = pathname.replace(/\/{2,}/g, "/");
|
|
@@ -236,7 +243,8 @@ function canonicalizePathForSecurity(pathname) {
|
|
|
236
243
|
};
|
|
237
244
|
}
|
|
238
245
|
const PROTECTED_PLUGIN_ROUTE_PREFIXES = ["/api/channels"];
|
|
239
|
-
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region src/gateway/server/plugins-http/path-context.ts
|
|
240
248
|
function normalizeProtectedPrefix(prefix) {
|
|
241
249
|
const collapsed = normalizeLowercaseStringOrEmpty$1(prefix).replace(/\/{2,}/g, "/");
|
|
242
250
|
if (collapsed.length <= 1) return collapsed || "/";
|
|
@@ -262,7 +270,8 @@ function resolvePluginRoutePathContext(pathname) {
|
|
|
262
270
|
rawNormalizedPath: canonical.rawNormalizedPath
|
|
263
271
|
};
|
|
264
272
|
}
|
|
265
|
-
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/gateway-config-runtime
|
|
266
275
|
var gateway_config_runtime_exports = /* @__PURE__ */ __exportAll({
|
|
267
276
|
classifyGatewayProbePath: () => classifyGatewayProbePath,
|
|
268
277
|
isProtectedPluginRoutePathFromContext: () => isProtectedPluginRoutePathFromContext,
|
|
@@ -270,7 +279,8 @@ var gateway_config_runtime_exports = /* @__PURE__ */ __exportAll({
|
|
|
270
279
|
});
|
|
271
280
|
import * as import_openclaw_plugin_sdk_gateway_config_runtime from "openclaw/plugin-sdk/gateway-config-runtime";
|
|
272
281
|
__reExport(gateway_config_runtime_exports, import_openclaw_plugin_sdk_gateway_config_runtime);
|
|
273
|
-
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region extensions/feishu/src/webhook-route.ts
|
|
274
284
|
function resolveFeishuLegacyWebhookListener(config) {
|
|
275
285
|
const listener = config.legacyWebhook;
|
|
276
286
|
return listener ? {
|
|
@@ -310,7 +320,8 @@ function collectFeishuWebhookNotes({ cfg, env }) {
|
|
|
310
320
|
warningNotes
|
|
311
321
|
};
|
|
312
322
|
}
|
|
313
|
-
|
|
323
|
+
//#endregion
|
|
324
|
+
//#region extensions/feishu/src/doctor.ts
|
|
314
325
|
const FEISHU_STATE_DIR = "feishu";
|
|
315
326
|
const BACKUP_PREFIX = "feishu-state-repair";
|
|
316
327
|
const BLANK_USER_MESSAGE_REPAIR_THRESHOLD = 3;
|
|
@@ -784,9 +795,10 @@ const feishuDoctor = {
|
|
|
784
795
|
normalizeCompatibilityConfig,
|
|
785
796
|
runConfigSequence: runFeishuDoctorSequence
|
|
786
797
|
};
|
|
787
|
-
|
|
798
|
+
//#endregion
|
|
799
|
+
//#region extensions/feishu/src/gateway.ts
|
|
788
800
|
const feishuGatewayAdapter = { startAccount: async (ctx) => {
|
|
789
|
-
const { monitorFeishuProvider } = await import("./monitor-
|
|
801
|
+
const { monitorFeishuProvider } = await import("./monitor-BqBGfE5v.mjs");
|
|
790
802
|
const account = resolveFeishuRuntimeAccount({
|
|
791
803
|
cfg: ctx.cfg,
|
|
792
804
|
accountId: ctx.accountId
|
|
@@ -807,7 +819,8 @@ const feishuGatewayAdapter = { startAccount: async (ctx) => {
|
|
|
807
819
|
statusSink
|
|
808
820
|
});
|
|
809
821
|
} };
|
|
810
|
-
|
|
822
|
+
//#endregion
|
|
823
|
+
//#region extensions/feishu/src/comment-send.ts
|
|
811
824
|
async function sendCommentThreadReply(params) {
|
|
812
825
|
const target = parseFeishuCommentTarget(params.to);
|
|
813
826
|
if (!target) return null;
|
|
@@ -840,7 +853,8 @@ async function sendCommentThreadReply(params) {
|
|
|
840
853
|
});
|
|
841
854
|
}
|
|
842
855
|
}
|
|
843
|
-
|
|
856
|
+
//#endregion
|
|
857
|
+
//#region extensions/feishu/src/outbound.ts
|
|
844
858
|
const FEISHU_PROPAGATE_MEDIA_UPLOAD_FAILURE_MARKER = "__openclawPropagateMediaUploadFailure";
|
|
845
859
|
const FEISHU_TEXT_CHUNK_LIMIT = 4e3;
|
|
846
860
|
function normalizePossibleLocalImagePath(text) {
|
|
@@ -1332,7 +1346,8 @@ const feishuOutbound = withFeishuOutboundSendContext({
|
|
|
1332
1346
|
}
|
|
1333
1347
|
})
|
|
1334
1348
|
});
|
|
1335
|
-
|
|
1349
|
+
//#endregion
|
|
1350
|
+
//#region extensions/feishu/src/session-route.ts
|
|
1336
1351
|
function resolveFeishuOutboundSessionRoute(params) {
|
|
1337
1352
|
const rawTarget = stripChannelTargetPrefix(params.target, "feishu", "lark");
|
|
1338
1353
|
const target = normalizeFeishuTarget(rawTarget);
|
|
@@ -1365,7 +1380,8 @@ function resolveFeishuOutboundSessionRoute(params) {
|
|
|
1365
1380
|
to: target
|
|
1366
1381
|
});
|
|
1367
1382
|
}
|
|
1368
|
-
|
|
1383
|
+
//#endregion
|
|
1384
|
+
//#region extensions/feishu/src/setup-core.ts
|
|
1369
1385
|
function setFeishuNamedAccountEnabled(cfg, accountId, enabled) {
|
|
1370
1386
|
const feishuCfg = cfg.channels?.feishu;
|
|
1371
1387
|
return patchTopLevelChannelConfigSection({
|
|
@@ -1391,7 +1407,8 @@ const feishuSetupContract = defineChannelSetupContract({
|
|
|
1391
1407
|
fields: {},
|
|
1392
1408
|
legacyAdapter: feishuSetupAdapter
|
|
1393
1409
|
});
|
|
1394
|
-
|
|
1410
|
+
//#endregion
|
|
1411
|
+
//#region extensions/feishu/src/setup-surface.ts
|
|
1395
1412
|
const t = createSetupTranslator();
|
|
1396
1413
|
const channel = "feishu";
|
|
1397
1414
|
const SCAN_TO_CREATE_TP = "ob_cli_app";
|
|
@@ -1474,7 +1491,7 @@ const feishuDmPolicy = createChannelDmPolicy({
|
|
|
1474
1491
|
promptAllowFrom: promptFeishuAllowFrom
|
|
1475
1492
|
});
|
|
1476
1493
|
async function runScanToCreate(prompter, domain, beforePersistentEffect) {
|
|
1477
|
-
const { beginAppRegistration, initAppRegistration, pollAppRegistration, printQrCode } = await import("./app-registration-
|
|
1494
|
+
const { beginAppRegistration, initAppRegistration, pollAppRegistration, printQrCode } = await import("./app-registration-DhnIp0Kd.mjs");
|
|
1478
1495
|
try {
|
|
1479
1496
|
await initAppRegistration(domain);
|
|
1480
1497
|
} catch {
|
|
@@ -1565,7 +1582,7 @@ async function runNewAppFlow(params) {
|
|
|
1565
1582
|
appSecretProbeValue = appSecretResult.resolvedValue;
|
|
1566
1583
|
}
|
|
1567
1584
|
if (appId && appSecretProbeValue) {
|
|
1568
|
-
const { getAppOwnerOpenId } = await import("./app-registration-
|
|
1585
|
+
const { getAppOwnerOpenId } = await import("./app-registration-DhnIp0Kd.mjs");
|
|
1569
1586
|
scanOpenId = await getAppOwnerOpenId({
|
|
1570
1587
|
appId,
|
|
1571
1588
|
appSecret: appSecretProbeValue,
|
|
@@ -1663,7 +1680,7 @@ const feishuSetupWizard = {
|
|
|
1663
1680
|
});
|
|
1664
1681
|
let probeResult = null;
|
|
1665
1682
|
if (configured && account.configured) try {
|
|
1666
|
-
const { probeFeishu } = await import("./probe-
|
|
1683
|
+
const { probeFeishu } = await import("./probe-CbNVGjv_.mjs").then((n) => n.n);
|
|
1667
1684
|
probeResult = await probeFeishu(account);
|
|
1668
1685
|
} catch {}
|
|
1669
1686
|
if (!configured) return [`Feishu: ${t("wizard.channels.statusNeedsAppCredentials")}`];
|
|
@@ -1686,7 +1703,8 @@ const feishuSetupWizard = {
|
|
|
1686
1703
|
dmPolicy: feishuDmPolicy,
|
|
1687
1704
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
|
|
1688
1705
|
};
|
|
1689
|
-
|
|
1706
|
+
//#endregion
|
|
1707
|
+
//#region extensions/feishu/src/sticker-catalog.ts
|
|
1690
1708
|
const STICKER_QUERY_PATTERN = /^[^\p{Cs}]{1,128}$/u;
|
|
1691
1709
|
function fitsStickerSearchResult(stickers) {
|
|
1692
1710
|
return Buffer.byteLength(JSON.stringify({
|
|
@@ -1724,7 +1742,8 @@ function searchFeishuStickerSet(entries, params) {
|
|
|
1724
1742
|
truncated: false
|
|
1725
1743
|
};
|
|
1726
1744
|
}
|
|
1727
|
-
|
|
1745
|
+
//#endregion
|
|
1746
|
+
//#region extensions/feishu/src/channel.ts
|
|
1728
1747
|
function resolveFeishuSendAttachmentMedia(params) {
|
|
1729
1748
|
const sourceKeys = [
|
|
1730
1749
|
"media",
|
|
@@ -1810,7 +1829,7 @@ const meta = {
|
|
|
1810
1829
|
order: 70,
|
|
1811
1830
|
preferSessionLookupForAnnounceTarget: true
|
|
1812
1831
|
};
|
|
1813
|
-
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
1832
|
+
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-CPZ_4RmH.mjs"), "feishuChannelRuntime");
|
|
1814
1833
|
async function resolveFeishuMessageSender(kind) {
|
|
1815
1834
|
const unavailableMessage = `Feishu ${kind} sending is not available.`;
|
|
1816
1835
|
try {
|
|
@@ -1848,7 +1867,7 @@ const feishuMessageAdapter = defineChannelMessageAdapter({
|
|
|
1848
1867
|
}
|
|
1849
1868
|
});
|
|
1850
1869
|
async function createFeishuActionClient(account) {
|
|
1851
|
-
const { createFeishuClient } = await import("./client-
|
|
1870
|
+
const { createFeishuClient } = await import("./client-DqGMyzOi.mjs").then((n) => n.t);
|
|
1852
1871
|
return createFeishuClient(account);
|
|
1853
1872
|
}
|
|
1854
1873
|
const collectFeishuSecurityWarnings = createAllowlistProviderGroupPolicyWarningCollector({
|
|
@@ -2751,4 +2770,5 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2751
2770
|
})
|
|
2752
2771
|
}
|
|
2753
2772
|
});
|
|
2773
|
+
//#endregion
|
|
2754
2774
|
export { setFeishuNamedAccountEnabled as a, resolveFeishuLegacyWebhookListener as c, listFeishuDirectoryPeers as d, feishuSetupAdapter as i, gateway_config_runtime_exports as l, feishuSetupWizard as n, feishuOutbound as o, runFeishuLogin as r, describeFeishuWebhookPathConflict as s, feishuPlugin as t, listFeishuDirectoryGroups as u };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { h as resolveFeishuAccount } from "./doctor-contract-
|
|
2
|
-
import { d as listFeishuDirectoryPeers, o as feishuOutbound, u as listFeishuDirectoryGroups } from "./channel-
|
|
3
|
-
import { A as sendMessageFeishu, C as sendStickerFeishu, D as getMessageFeishu, E as editMessageFeishu, U as createConfiguredFeishuClient, et as assertFeishuApiSuccess, k as sendCardFeishu } from "./reply-delivery-result-
|
|
4
|
-
import { r as createFeishuClient } from "./client-
|
|
5
|
-
import { a as getFeishuMemberInfo, i as getChatMembers, n as buildFeishuDirectChatMembers, r as getChatInfo, t as assertFeishuChatMember } from "./chat-
|
|
6
|
-
import { t as probeFeishu } from "./probe-
|
|
1
|
+
import { h as resolveFeishuAccount } from "./doctor-contract-CPh2u5-o.mjs";
|
|
2
|
+
import { d as listFeishuDirectoryPeers, o as feishuOutbound, u as listFeishuDirectoryGroups } from "./channel-B7oAL99p.mjs";
|
|
3
|
+
import { A as sendMessageFeishu, C as sendStickerFeishu, D as getMessageFeishu, E as editMessageFeishu, U as createConfiguredFeishuClient, et as assertFeishuApiSuccess, k as sendCardFeishu } from "./reply-delivery-result-BjOCvaPo.mjs";
|
|
4
|
+
import { r as createFeishuClient } from "./client-DqGMyzOi.mjs";
|
|
5
|
+
import { a as getFeishuMemberInfo, i as getChatMembers, n as buildFeishuDirectChatMembers, r as getChatInfo, t as assertFeishuChatMember } from "./chat-g8dTUdIb.mjs";
|
|
6
|
+
import { t as probeFeishu } from "./probe-CbNVGjv_.mjs";
|
|
7
7
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
|
-
|
|
8
|
+
//#region extensions/feishu/src/directory.ts
|
|
9
9
|
const MAX_FEISHU_DIRECTORY_PAGES = 100;
|
|
10
10
|
async function listFeishuDirectoryLive(params, options) {
|
|
11
11
|
const account = resolveFeishuAccount({
|
|
@@ -80,7 +80,8 @@ function listFeishuDirectoryGroupsLive(params) {
|
|
|
80
80
|
} : void 0
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region extensions/feishu/src/pins.ts
|
|
84
85
|
function normalizePin(pin) {
|
|
85
86
|
return {
|
|
86
87
|
messageId: pin.message_id,
|
|
@@ -115,7 +116,8 @@ async function listPinsFeishu(params) {
|
|
|
115
116
|
pageToken: response.data?.page_token
|
|
116
117
|
};
|
|
117
118
|
}
|
|
118
|
-
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region extensions/feishu/src/reactions.ts
|
|
119
121
|
/**
|
|
120
122
|
* Add a reaction (emoji) to a message.
|
|
121
123
|
* @param emojiType - Feishu emoji type, e.g., "SMILE", "THUMBSUP", "HEART"
|
|
@@ -178,7 +180,8 @@ async function listReactionsFeishu(params) {
|
|
|
178
180
|
pageToken = nextPageToken;
|
|
179
181
|
}
|
|
180
182
|
}
|
|
181
|
-
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region extensions/feishu/src/channel.runtime.ts
|
|
182
185
|
const feishuChannelRuntime = {
|
|
183
186
|
assertFeishuChatMember,
|
|
184
187
|
buildFeishuDirectChatMembers,
|
|
@@ -201,4 +204,5 @@ const feishuChannelRuntime = {
|
|
|
201
204
|
sendMessageFeishu,
|
|
202
205
|
sendStickerFeishu
|
|
203
206
|
};
|
|
207
|
+
//#endregion
|
|
204
208
|
export { feishuChannelRuntime };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as resolveFeishuToolAccount, Et as resolveFeishuChatReadPreliminaryAuthorization, It as resolveFeishuChatType, Tt as readFeishuChatInfoWithAuthorization, X as registerFeishuTool, Z as feishuExternalToolResult, at as formatFeishuApiError, bt as authorizeFeishuChatMemberRead, et as assertFeishuApiSuccess, yt as assertFeishuChatReadAllowed } from "./reply-delivery-result-
|
|
2
|
-
import { r as createFeishuClient } from "./client-
|
|
1
|
+
import { $ as resolveFeishuToolAccount, Et as resolveFeishuChatReadPreliminaryAuthorization, It as resolveFeishuChatType, Tt as readFeishuChatInfoWithAuthorization, X as registerFeishuTool, Z as feishuExternalToolResult, at as formatFeishuApiError, bt as authorizeFeishuChatMemberRead, et as assertFeishuApiSuccess, yt as assertFeishuChatReadAllowed } from "./reply-delivery-result-BjOCvaPo.mjs";
|
|
2
|
+
import { r as createFeishuClient } from "./client-DqGMyzOi.mjs";
|
|
3
3
|
import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
|
|
4
4
|
import { readPositiveIntegerParam } from "openclaw/plugin-sdk/param-readers";
|
|
5
5
|
import { Type } from "typebox";
|
|
6
|
-
|
|
6
|
+
//#region extensions/feishu/src/chat.ts
|
|
7
7
|
const CHAT_ACTION_VALUES = [
|
|
8
8
|
"members",
|
|
9
9
|
"info",
|
|
@@ -205,4 +205,5 @@ function registerFeishuChatTools(api) {
|
|
|
205
205
|
onError: (err) => feishuExternalToolResult({ error: formatFeishuApiError(err, { includeNestedErrorLogId: true }) })
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
+
//#endregion
|
|
208
209
|
export { getFeishuMemberInfo as a, getChatMembers as i, buildFeishuDirectChatMembers as n, registerFeishuChatTools as o, getChatInfo as r, assertFeishuChatMember as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __exportAll } from "./doctor-contract-
|
|
1
|
+
import { _ as __exportAll } from "./doctor-contract-CPh2u5-o.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { PlatformMessageNotDispatchedError } from "openclaw/plugin-sdk/error-runtime";
|
|
4
4
|
import { asPositiveFiniteNumber, parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -8,7 +8,7 @@ import { isRecord } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
|
8
8
|
import { readPluginPackageVersion, resolveAmbientNodeProxyAgent } from "openclaw/plugin-sdk/extension-shared";
|
|
9
9
|
import { captureChannelReadAuthority, captureEffectAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
10
10
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
11
|
-
|
|
11
|
+
//#region extensions/feishu/src/client-timeout.ts
|
|
12
12
|
const FEISHU_HTTP_TIMEOUT_MS = 3e4;
|
|
13
13
|
const FEISHU_HTTP_TIMEOUT_MAX_MS = 3e5;
|
|
14
14
|
const FEISHU_HTTP_TIMEOUT_ENV_VAR = "OPENCLAW_FEISHU_HTTP_TIMEOUT_MS";
|
|
@@ -16,7 +16,8 @@ function resolveConfiguredHttpTimeoutMs(creds) {
|
|
|
16
16
|
const timeout = asPositiveFiniteNumber(creds.httpTimeoutMs) ?? parseStrictPositiveInteger(process.env[FEISHU_HTTP_TIMEOUT_ENV_VAR]) ?? asPositiveFiniteNumber(creds.config?.httpTimeoutMs) ?? 3e4;
|
|
17
17
|
return Math.min(Math.max(Math.floor(timeout), 1), FEISHU_HTTP_TIMEOUT_MAX_MS);
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region extensions/feishu/src/send-context.ts
|
|
20
21
|
const sendScope = new AsyncLocalStorage();
|
|
21
22
|
/** Mutation errors preserve uncertainty after earlier requests reached the provider. */
|
|
22
23
|
function withFeishuRequestContext(assertCurrent, request) {
|
|
@@ -66,7 +67,8 @@ async function runBeforeFeishuMessageDispatch(operation) {
|
|
|
66
67
|
throw new PlatformMessageNotDispatchedError(`Feishu media preparation failed before message dispatch: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region extensions/feishu/src/client.ts
|
|
70
72
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
71
73
|
createEventDispatcher: () => createEventDispatcher,
|
|
72
74
|
createFeishuClient: () => createFeishuClient,
|
|
@@ -323,4 +325,5 @@ function createEventDispatcher(account) {
|
|
|
323
325
|
verificationToken: account.verificationToken
|
|
324
326
|
});
|
|
325
327
|
}
|
|
328
|
+
//#endregion
|
|
326
329
|
export { getFeishuUserAgent as a, withFeishuMessageDispatch as c, FEISHU_HTTP_TIMEOUT_MS as d, resolveConfiguredHttpTimeoutMs as f, createFeishuWSClient as i, withFeishuRequestContext as l, createEventDispatcher as n, captureFeishuSendAuthority as o, createFeishuClient as r, runBeforeFeishuMessageDispatch as s, client_exports as t, withFeishuSendContext as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
|
|
2
|
+
//#region extensions/feishu/src/targets.ts
|
|
3
3
|
const CHAT_ID_PREFIX = "oc_";
|
|
4
4
|
const OPEN_ID_PREFIX = "ou_";
|
|
5
5
|
const USER_ID_REGEX = /^[a-zA-Z0-9_-]+$/;
|
|
@@ -37,7 +37,8 @@ function looksLikeFeishuId(raw) {
|
|
|
37
37
|
if (trimmed.startsWith(OPEN_ID_PREFIX)) return true;
|
|
38
38
|
return false;
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region extensions/feishu/src/conversation-id.ts
|
|
41
42
|
const SCOPED_CONVERSATION_PATTERNS = [
|
|
42
43
|
["group_topic_sender", /^(?<chatId>.+):topic:(?<topicId>[^:]+):sender:(?<senderOpenId>[^:]+)$/i],
|
|
43
44
|
["group_topic", /^(?<chatId>.+):topic:(?<topicId>[^:]+)$/i],
|
|
@@ -121,4 +122,5 @@ function buildFeishuModelOverrideParentCandidates(parentConversationId) {
|
|
|
121
122
|
}
|
|
122
123
|
return [chatId];
|
|
123
124
|
}
|
|
125
|
+
//#endregion
|
|
124
126
|
export { parseFeishuTargetId as a, looksLikeFeishuId as c, stripFeishuProviderPrefix as d, parseFeishuDirectConversationId as i, normalizeFeishuTarget as l, buildFeishuModelOverrideParentCandidates as n, resolveConfiguredFeishuGroupSessionScope as o, parseFeishuConversationId as r, detectIdType as s, buildFeishuConversationId as t, resolveReceiveIdType as u };
|
|
@@ -6,7 +6,7 @@ import { canResolveEnvSecretRefInReadOnlyPath } from "openclaw/plugin-sdk/secret
|
|
|
6
6
|
import { normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/account-id";
|
|
7
7
|
import { ChannelDeliveryStreamingConfigSchema, ContextVisibilityModeSchema, DmPolicySchema, GroupPolicySchema, ReplyToModeSchema, TtsConfigSchema, buildChannelConfigSchema, buildGroupEntrySchema, buildMultiAccountChannelSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
8
8
|
import { z } from "zod";
|
|
9
|
-
|
|
9
|
+
//#region \0rolldown/runtime.js
|
|
10
10
|
var __defProp = Object.defineProperty;
|
|
11
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -31,7 +31,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
31
31
|
return to;
|
|
32
32
|
};
|
|
33
33
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
34
|
-
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region extensions/feishu/src/accounts.ts
|
|
35
36
|
var accounts_exports = /* @__PURE__ */ __exportAll({
|
|
36
37
|
FeishuSecretRefUnavailableError: () => FeishuSecretRefUnavailableError,
|
|
37
38
|
inspectFeishuCredentials: () => inspectFeishuCredentials,
|
|
@@ -200,14 +201,16 @@ function listEnabledFeishuAccounts(cfg) {
|
|
|
200
201
|
accountId
|
|
201
202
|
})).filter((account) => account.enabled && account.configured);
|
|
202
203
|
}
|
|
203
|
-
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region extensions/feishu/src/external-keys.ts
|
|
204
206
|
const FEISHU_EXTERNAL_KEY_PATTERN = /^(?!\s)(?![\s\S]*\s$)(?![\s\S]*\.\.)[^\p{Cc}\p{Cs}/\\]{1,512}$/u;
|
|
205
207
|
function normalizeFeishuExternalKey(value) {
|
|
206
208
|
if (typeof value !== "string") return;
|
|
207
209
|
const normalized = value.trim();
|
|
208
210
|
return FEISHU_EXTERNAL_KEY_PATTERN.test(normalized) ? normalized : void 0;
|
|
209
211
|
}
|
|
210
|
-
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region extensions/feishu/src/webhook-path.ts
|
|
211
214
|
const DEFAULT_FEISHU_WEBHOOK_PATH = "/feishu/events";
|
|
212
215
|
/** Normalize trusted configuration only; incoming request targets must remain unmodified. */
|
|
213
216
|
function normalizeFeishuWebhookPath(value) {
|
|
@@ -218,7 +221,8 @@ function normalizeFeishuWebhookPath(value) {
|
|
|
218
221
|
const emptyQuery = !parsed.search && parsed.href.endsWith("?") && !configured.includes("#") ? "?" : "";
|
|
219
222
|
return `${parsed.pathname}${parsed.search}${emptyQuery}`;
|
|
220
223
|
}
|
|
221
|
-
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region extensions/feishu/src/config-schema.ts
|
|
222
226
|
const ChannelActionsSchema = z.object({
|
|
223
227
|
reactions: z.boolean().optional(),
|
|
224
228
|
sticker: z.boolean().optional()
|
|
@@ -492,7 +496,8 @@ const FeishuConfigSchema = buildMultiAccountChannelSchema(FeishuConfigSchemaBase
|
|
|
492
496
|
}
|
|
493
497
|
});
|
|
494
498
|
const FeishuChannelConfigSchema = buildChannelConfigSchema(FeishuConfigSchema, { jsonSchemaMode: "input" });
|
|
495
|
-
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region packages/normalization-core/src/record-coerce.ts
|
|
496
501
|
/** Type guard for non-array object records at browser-safe boundaries. */
|
|
497
502
|
function isRecord$1(value) {
|
|
498
503
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -501,7 +506,8 @@ function isRecord$1(value) {
|
|
|
501
506
|
function asNullableRecord$1(value) {
|
|
502
507
|
return isRecord$1(value) ? value : null;
|
|
503
508
|
}
|
|
504
|
-
|
|
509
|
+
//#endregion
|
|
510
|
+
//#region src/config/channel-config-normalization.ts
|
|
505
511
|
/** Applies one channel-specific doctor migration to every object-shaped account. */
|
|
506
512
|
function normalizeChannelAccounts(params) {
|
|
507
513
|
const rawAccounts = asNullableRecord$1(params.entry.accounts);
|
|
@@ -577,7 +583,8 @@ function normalizeChannelConfigEntries$1(params) {
|
|
|
577
583
|
changes
|
|
578
584
|
};
|
|
579
585
|
}
|
|
580
|
-
|
|
586
|
+
//#endregion
|
|
587
|
+
//#region src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
581
588
|
/** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
|
|
582
589
|
function createLegacyWebhookListenerDoctorContract(params) {
|
|
583
590
|
const portKey = params.portKey ?? "webhookPort";
|
|
@@ -647,11 +654,13 @@ function createLegacyWebhookListenerDoctorContract(params) {
|
|
|
647
654
|
}
|
|
648
655
|
};
|
|
649
656
|
}
|
|
650
|
-
|
|
657
|
+
//#endregion
|
|
658
|
+
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
651
659
|
var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
|
|
652
660
|
import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
653
661
|
__reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
|
|
654
|
-
|
|
662
|
+
//#endregion
|
|
663
|
+
//#region extensions/feishu/src/doctor-contract.ts
|
|
655
664
|
const webhookListenerMigration = createLegacyWebhookListenerDoctorContract({
|
|
656
665
|
channelKey: "feishu",
|
|
657
666
|
defaultPort: 3e3,
|
|
@@ -787,4 +796,5 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
787
796
|
historicalWebhookAccountIds: resolveHistoricalWebhookAccountIds(stray.config)
|
|
788
797
|
};
|
|
789
798
|
}
|
|
799
|
+
//#endregion
|
|
790
800
|
export { __exportAll as _, FeishuChannelConfigSchema as a, normalizeFeishuExternalKey as c, listEnabledFeishuAccounts as d, listFeishuAccountIds as f, resolveFeishuRuntimeAccount as g, resolveFeishuAccount as h, normalizeHistoricalWebhookConfig as i, accounts_exports as l, resolveDefaultFeishuAccountId as m, legacyConfigRules as n, DEFAULT_FEISHU_WEBHOOK_PATH as o, mergeFeishuAccountConfig as p, normalizeCompatibilityConfig as r, normalizeFeishuWebhookPath as s, historicalWebhookListener as t, inspectFeishuCredentials as u, __reExport as v };
|
package/dist/.setup/{message-action-contract-BZK6bpAl.mjs → message-action-contract-DMVMY_ng.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//#region extensions/feishu/src/message-action-contract.ts
|
|
2
2
|
const FEISHU_NATIVE_CHAT_TARGET_ALIASES = [
|
|
3
3
|
"chatId",
|
|
4
4
|
"chat_id",
|
|
@@ -16,4 +16,5 @@ const messageActionTargetAliases = {
|
|
|
16
16
|
"list-pins": { aliases: ["chatId"] },
|
|
17
17
|
"channel-info": { aliases: ["chatId"] }
|
|
18
18
|
};
|
|
19
|
+
//#endregion
|
|
19
20
|
export { messageActionTargetAliases as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as listEnabledFeishuAccounts, g as resolveFeishuRuntimeAccount } from "./doctor-contract-
|
|
2
|
-
import { t as getFeishuRuntime } from "./runtime-
|
|
3
|
-
import { r as registerFeishuAiAgent, t as probeFeishu } from "./probe-
|
|
1
|
+
import { d as listEnabledFeishuAccounts, g as resolveFeishuRuntimeAccount } from "./doctor-contract-CPh2u5-o.mjs";
|
|
2
|
+
import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.mjs";
|
|
3
|
+
import { r as registerFeishuAiAgent, t as probeFeishu } from "./probe-CbNVGjv_.mjs";
|
|
4
4
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
6
6
|
import { clampTimerTimeoutMs, parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
7
7
|
import { asOptionalObjectRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
|
-
|
|
8
|
+
//#region extensions/feishu/src/monitor-startup-timeout.ts
|
|
9
9
|
const FEISHU_STARTUP_BOT_INFO_TIMEOUT_DEFAULT_MS = 3e4;
|
|
10
10
|
const FEISHU_STARTUP_BOT_INFO_TIMEOUT_ENV = "OPENCLAW_FEISHU_STARTUP_PROBE_TIMEOUT_MS";
|
|
11
11
|
function resolveStartupProbeTimeoutMs(env = process.env) {
|
|
@@ -18,7 +18,8 @@ function resolveStartupProbeTimeoutMs(env = process.env) {
|
|
|
18
18
|
}
|
|
19
19
|
return FEISHU_STARTUP_BOT_INFO_TIMEOUT_DEFAULT_MS;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region extensions/feishu/src/monitor.startup.ts
|
|
22
23
|
const FEISHU_BOT_IDENTITY_CACHE_NAMESPACE = "feishu.bot-identity-cache";
|
|
23
24
|
const FEISHU_BOT_IDENTITY_CACHE_MAX_ENTRIES = 128;
|
|
24
25
|
function openFeishuBotIdentityCache() {
|
|
@@ -95,8 +96,9 @@ async function fetchBotIdentityForMonitor(account, options = {}) {
|
|
|
95
96
|
return {};
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region extensions/feishu/src/monitor.ts
|
|
101
|
+
const loadMonitorAccountRuntime = createLazyRuntimeModule(() => import("./monitor.account-Dg2Hz-4E.mjs"));
|
|
100
102
|
async function monitorFeishuProvider(opts) {
|
|
101
103
|
const cfg = opts.config;
|
|
102
104
|
const log = opts.runtime?.log ?? console.log;
|
|
@@ -150,4 +152,5 @@ async function monitorFeishuProvider(opts) {
|
|
|
150
152
|
}
|
|
151
153
|
await Promise.all(monitorPromises);
|
|
152
154
|
}
|
|
155
|
+
//#endregion
|
|
153
156
|
export { monitorFeishuProvider, fetchBotIdentityForMonitor as t };
|