@openclaw/feishu 2026.10.10-beta.5 → 2026.10.10
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-CYU0G5Oo.mjs → app-registration-d8dxhKp-.mjs} +2 -3
- package/dist/.setup/{channel-CY13hxu8.mjs → channel-dxkUGCgC.mjs} +34 -53
- package/dist/.setup/{channel.runtime-gTMUHJAe.mjs → channel.runtime-DK9nv7tQ.mjs} +10 -14
- package/dist/.setup/{chat-qj1pEIcO.mjs → chat-CfRBIQrw.mjs} +3 -5
- package/dist/.setup/{client-BTiFlqqL.mjs → client-DlpvvLoz.mjs} +4 -7
- package/dist/.setup/{conversation-id-D00i9uy5.mjs → conversation-id-i1ICr3ID.mjs} +2 -4
- package/dist/.setup/{doctor-contract-BNXcJcWR.mjs → doctor-contract-CWB6EycD.mjs} +10 -20
- package/dist/.setup/{json-response-DXajw_FU.mjs → json-response-BX9Htr9f.mjs} +1 -2
- package/dist/.setup/{message-action-contract-Bhxj8Zrf.mjs → message-action-contract-C9KL891-.mjs} +1 -2
- package/dist/.setup/{monitor-CJ0xKz5A.mjs → monitor-BJ0-Wu8d.mjs} +8 -12
- package/dist/.setup/{monitor.account-DRqaexjx.mjs → monitor.account-DIvDEG0X.mjs} +56 -98
- package/dist/.setup/{probe-s0hiM44D.mjs → probe-BiQj7eM4.mjs} +4 -6
- package/dist/.setup/{reply-delivery-result-DknmIzOB.mjs → reply-delivery-result-QS_FCE--.mjs} +37 -70
- package/dist/.setup/{runtime-C5JxBWZp.mjs → runtime-6V3uDMw5.mjs} +1 -2
- package/dist/.setup/runtime-setter-api-DSLLnejl.mjs +2 -0
- package/dist/.setup/{secret-contract-DEyvsehF.mjs → secret-contract-DbKGdEJP.mjs} +1 -2
- package/dist/.setup/{secret-contract-api-XhxLE0dW.mjs → secret-contract-api-DHseJ7sg.mjs} +1 -1
- package/dist/.setup/{security-audit-b86aSgH2.mjs → security-audit-CYRW0D76.mjs} +1 -2
- package/dist/.setup/{session-conversation-BSBNK5Mq.mjs → session-conversation-CFw-zLLy.mjs} +2 -3
- package/dist/.setup/{setup-api-sm3s4wvX.mjs → setup-api-qH0YRx2x.mjs} +1 -1
- package/dist/.setup/{subagent-hooks-CvVuM0O4.mjs → subagent-hooks-CA-gJ3Cu.mjs} +4 -5
- package/dist/.setup/{thread-bindings-BxKmOara.mjs → thread-bindings-6eyktxK_.mjs} +1 -2
- package/dist/.source-module-urls/6579f1b33dd01f8f0aaea28311ed6df1a635f9ad1e6fa86dcba53bca46407e55.json +1 -1
- package/dist/api.js +20 -32
- package/dist/channel-entry.js +1 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/configured-state.js +1 -2
- package/dist/contract-api.js +3 -3
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +1 -2
- 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 +4 -5
- package/dist/subagent-hooks-api.js +2 -3
- package/package.json +4 -4
- package/dist/.setup/runtime-setter-api-BrQHE03y.mjs +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as readFeishuJsonResponse } from "./json-response-
|
|
1
|
+
import { t as readFeishuJsonResponse } from "./json-response-BX9Htr9f.mjs";
|
|
2
2
|
import { finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number-runtime";
|
|
3
3
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
4
4
|
import { renderQrTerminal } from "openclaw/plugin-sdk/media-runtime";
|
|
5
5
|
import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
6
|
-
|
|
6
|
+
// 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";
|
|
@@ -171,5 +171,4 @@ async function sleepRegistrationPollInterval(intervalSeconds, abortSignal) {
|
|
|
171
171
|
const intervalMs = finiteSecondsToTimerSafeMilliseconds(intervalSeconds) ?? DEFAULT_REGISTRATION_POLL_INTERVAL_SECONDS * 1e3;
|
|
172
172
|
await sleepWithAbort(intervalMs, abortSignal).catch(() => {});
|
|
173
173
|
}
|
|
174
|
-
//#endregion
|
|
175
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, K as resolveFeishuIdentityHeaderTitle, 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 deliverCommentThreadText, 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-CWB6EycD.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-i1ICr3ID.mjs";
|
|
3
|
+
import { A as sendMessageFeishu, At as resolveFeishuGroupConfig, Ct as isFeishuGroupReadAllowed, Et as resolveFeishuChatReadPreliminaryAuthorization, Ft as normalizeFeishuChatType, It as resolveFeishuChatType, K as resolveFeishuIdentityHeaderTitle, 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 deliverCommentThreadText, 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-QS_FCE--.mjs";
|
|
4
|
+
import { t as messageActionTargetAliases } from "./message-action-contract-C9KL891-.mjs";
|
|
5
|
+
import { l as withFeishuRequestContext, r as createFeishuClient, u as withFeishuSendContext } from "./client-DlpvvLoz.mjs";
|
|
6
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DbKGdEJP.mjs";
|
|
7
|
+
import { t as collectFeishuSecurityAuditFindings } from "./security-audit-CYRW0D76.mjs";
|
|
8
|
+
import { t as resolveFeishuSessionConversation } from "./session-conversation-CFw-zLLy.mjs";
|
|
9
|
+
import { n as getFeishuThreadBindingManager } from "./thread-bindings-6eyktxK_.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
|
+
// extensions/feishu/src/approval-auth.ts
|
|
50
50
|
function normalizeFeishuApproverId(value) {
|
|
51
51
|
const normalized = normalizeFeishuTarget(String(value));
|
|
52
52
|
const trimmed = normalizeOptionalLowercaseString(normalized);
|
|
@@ -62,8 +62,7 @@ const feishuApprovalAuth = createChannelApprovalAuth({
|
|
|
62
62
|
},
|
|
63
63
|
normalizeApprover: normalizeFeishuApproverId
|
|
64
64
|
}).approvalAuth;
|
|
65
|
-
|
|
66
|
-
//#region extensions/feishu/src/directory.static.ts
|
|
65
|
+
// extensions/feishu/src/directory.static.ts
|
|
67
66
|
async function listFeishuDirectoryPeers(params) {
|
|
68
67
|
const account = resolveFeishuAccount({
|
|
69
68
|
cfg: params.cfg,
|
|
@@ -126,8 +125,7 @@ async function listAuthorizedFeishuDirectoryGroups(params) {
|
|
|
126
125
|
id
|
|
127
126
|
}));
|
|
128
127
|
}
|
|
129
|
-
|
|
130
|
-
//#region extensions/feishu/src/doctor-agent-roster.ts
|
|
128
|
+
// extensions/feishu/src/doctor-agent-roster.ts
|
|
131
129
|
function collectFeishuDoctorAgentIds(cfg) {
|
|
132
130
|
const agents = isRecord(cfg) && isRecord(cfg.agents) ? cfg.agents : void 0;
|
|
133
131
|
if (isRecord(agents?.entries)) {
|
|
@@ -140,8 +138,7 @@ function collectFeishuDoctorAgentIds(cfg) {
|
|
|
140
138
|
for (const entry of entries) if (typeof entry.id === "string" && entry.id.trim()) ids.add(normalizeAgentId(entry.id));
|
|
141
139
|
return [...ids].toSorted();
|
|
142
140
|
}
|
|
143
|
-
|
|
144
|
-
//#region src/gateway/gateway-http-route-contracts.ts
|
|
141
|
+
// src/gateway/gateway-http-route-contracts.ts
|
|
145
142
|
const GATEWAY_PROBE_ROUTES = /* @__PURE__ */ new Map([
|
|
146
143
|
["/health", "live"],
|
|
147
144
|
["/healthz", "live"],
|
|
@@ -157,8 +154,7 @@ function classifyGatewayProbePath(pathname) {
|
|
|
157
154
|
}
|
|
158
155
|
return "outside";
|
|
159
156
|
}
|
|
160
|
-
|
|
161
|
-
//#region packages/normalization-core/src/string-coerce.ts
|
|
157
|
+
// packages/normalization-core/src/string-coerce.ts
|
|
162
158
|
/** Trims string input and returns null for non-strings or empty strings. */
|
|
163
159
|
function normalizeNullableString$1(value) {
|
|
164
160
|
if (typeof value !== "string") return null;
|
|
@@ -177,13 +173,11 @@ function normalizeOptionalLowercaseString$1(value) {
|
|
|
177
173
|
function normalizeLowercaseStringOrEmpty$1(value) {
|
|
178
174
|
return normalizeOptionalLowercaseString$1(value) ?? "";
|
|
179
175
|
}
|
|
180
|
-
|
|
181
|
-
//#region src/plugins/http-path-prefix.ts
|
|
176
|
+
// src/plugins/http-path-prefix.ts
|
|
182
177
|
function prefixMatchPath(pathname, prefix) {
|
|
183
178
|
return pathname === prefix || pathname.startsWith(`${prefix}/`) || pathname.startsWith(`${prefix}%`);
|
|
184
179
|
}
|
|
185
|
-
|
|
186
|
-
//#region src/gateway/security-path.ts
|
|
180
|
+
// src/gateway/security-path.ts
|
|
187
181
|
const MAX_PATH_DECODE_PASSES = 32;
|
|
188
182
|
function normalizePathSeparators(pathname) {
|
|
189
183
|
const collapsed = pathname.replace(/\/{2,}/g, "/");
|
|
@@ -236,8 +230,7 @@ function canonicalizePathForSecurity(pathname) {
|
|
|
236
230
|
};
|
|
237
231
|
}
|
|
238
232
|
const PROTECTED_PLUGIN_ROUTE_PREFIXES = ["/api/channels"];
|
|
239
|
-
|
|
240
|
-
//#region src/gateway/server/plugins-http/path-context.ts
|
|
233
|
+
// src/gateway/server/plugins-http/path-context.ts
|
|
241
234
|
function normalizeProtectedPrefix(prefix) {
|
|
242
235
|
const collapsed = normalizeLowercaseStringOrEmpty$1(prefix).replace(/\/{2,}/g, "/");
|
|
243
236
|
if (collapsed.length <= 1) return collapsed || "/";
|
|
@@ -263,8 +256,7 @@ function resolvePluginRoutePathContext(pathname) {
|
|
|
263
256
|
rawNormalizedPath: canonical.rawNormalizedPath
|
|
264
257
|
};
|
|
265
258
|
}
|
|
266
|
-
|
|
267
|
-
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/gateway-config-runtime
|
|
259
|
+
// \0openclaw:bundled-sdk:openclaw/plugin-sdk/gateway-config-runtime
|
|
268
260
|
var gateway_config_runtime_exports = /* @__PURE__ */ __exportAll({
|
|
269
261
|
classifyGatewayProbePath: () => classifyGatewayProbePath,
|
|
270
262
|
isProtectedPluginRoutePathFromContext: () => isProtectedPluginRoutePathFromContext,
|
|
@@ -272,8 +264,7 @@ var gateway_config_runtime_exports = /* @__PURE__ */ __exportAll({
|
|
|
272
264
|
});
|
|
273
265
|
import * as import_openclaw_plugin_sdk_gateway_config_runtime from "openclaw/plugin-sdk/gateway-config-runtime";
|
|
274
266
|
__reExport(gateway_config_runtime_exports, import_openclaw_plugin_sdk_gateway_config_runtime);
|
|
275
|
-
|
|
276
|
-
//#region extensions/feishu/src/webhook-route.ts
|
|
267
|
+
// extensions/feishu/src/webhook-route.ts
|
|
277
268
|
function resolveFeishuLegacyWebhookListener(config) {
|
|
278
269
|
const listener = config.legacyWebhook;
|
|
279
270
|
return listener ? {
|
|
@@ -313,8 +304,7 @@ function collectFeishuWebhookNotes({ cfg, env }) {
|
|
|
313
304
|
warningNotes
|
|
314
305
|
};
|
|
315
306
|
}
|
|
316
|
-
|
|
317
|
-
//#region extensions/feishu/src/doctor.ts
|
|
307
|
+
// extensions/feishu/src/doctor.ts
|
|
318
308
|
const FEISHU_STATE_DIR = "feishu";
|
|
319
309
|
const BACKUP_PREFIX = "feishu-state-repair";
|
|
320
310
|
const BLANK_USER_MESSAGE_REPAIR_THRESHOLD = 3;
|
|
@@ -849,10 +839,9 @@ const feishuDoctor = {
|
|
|
849
839
|
normalizeCompatibilityConfig,
|
|
850
840
|
runConfigSequence: runFeishuDoctorSequence
|
|
851
841
|
};
|
|
852
|
-
|
|
853
|
-
//#region extensions/feishu/src/gateway.ts
|
|
842
|
+
// extensions/feishu/src/gateway.ts
|
|
854
843
|
const feishuGatewayAdapter = { startAccount: async (ctx) => {
|
|
855
|
-
const { monitorFeishuProvider } = await import("./monitor-
|
|
844
|
+
const { monitorFeishuProvider } = await import("./monitor-BJ0-Wu8d.mjs");
|
|
856
845
|
const account = resolveFeishuRuntimeAccount({
|
|
857
846
|
cfg: ctx.cfg,
|
|
858
847
|
accountId: ctx.accountId
|
|
@@ -876,8 +865,7 @@ const feishuGatewayAdapter = { startAccount: async (ctx) => {
|
|
|
876
865
|
statusSink
|
|
877
866
|
});
|
|
878
867
|
} };
|
|
879
|
-
|
|
880
|
-
//#region extensions/feishu/src/comment-send.ts
|
|
868
|
+
// extensions/feishu/src/comment-send.ts
|
|
881
869
|
async function sendCommentThreadReply(params) {
|
|
882
870
|
const target = parseFeishuCommentTarget(params.to);
|
|
883
871
|
if (!target) return null;
|
|
@@ -910,8 +898,7 @@ async function sendCommentThreadReply(params) {
|
|
|
910
898
|
});
|
|
911
899
|
}
|
|
912
900
|
}
|
|
913
|
-
|
|
914
|
-
//#region extensions/feishu/src/outbound.ts
|
|
901
|
+
// extensions/feishu/src/outbound.ts
|
|
915
902
|
const FEISHU_PROPAGATE_MEDIA_UPLOAD_FAILURE_MARKER = "__openclawPropagateMediaUploadFailure";
|
|
916
903
|
const FEISHU_TEXT_CHUNK_LIMIT = 4e3;
|
|
917
904
|
function normalizePossibleLocalImagePath(text) {
|
|
@@ -1403,8 +1390,7 @@ const feishuOutbound = withFeishuOutboundSendContext({
|
|
|
1403
1390
|
}
|
|
1404
1391
|
})
|
|
1405
1392
|
});
|
|
1406
|
-
|
|
1407
|
-
//#region extensions/feishu/src/session-route.ts
|
|
1393
|
+
// extensions/feishu/src/session-route.ts
|
|
1408
1394
|
function resolveFeishuOutboundSessionRoute(params) {
|
|
1409
1395
|
const rawTarget = stripChannelTargetPrefix(params.target, "feishu", "lark");
|
|
1410
1396
|
const target = normalizeFeishuTarget(rawTarget);
|
|
@@ -1437,8 +1423,7 @@ function resolveFeishuOutboundSessionRoute(params) {
|
|
|
1437
1423
|
to: target
|
|
1438
1424
|
});
|
|
1439
1425
|
}
|
|
1440
|
-
|
|
1441
|
-
//#region extensions/feishu/src/setup-core.ts
|
|
1426
|
+
// extensions/feishu/src/setup-core.ts
|
|
1442
1427
|
function setFeishuNamedAccountEnabled(cfg, accountId, enabled) {
|
|
1443
1428
|
const feishuCfg = cfg.channels?.feishu;
|
|
1444
1429
|
return patchTopLevelChannelConfigSection({
|
|
@@ -1464,8 +1449,7 @@ const feishuSetupContract = defineChannelSetupContract({
|
|
|
1464
1449
|
fields: {},
|
|
1465
1450
|
legacyAdapter: feishuSetupAdapter
|
|
1466
1451
|
});
|
|
1467
|
-
|
|
1468
|
-
//#region extensions/feishu/src/setup-surface.ts
|
|
1452
|
+
// extensions/feishu/src/setup-surface.ts
|
|
1469
1453
|
const t = createSetupTranslator();
|
|
1470
1454
|
const channel = "feishu";
|
|
1471
1455
|
const SCAN_TO_CREATE_TP = "ob_cli_app";
|
|
@@ -1548,7 +1532,7 @@ const feishuDmPolicy = createChannelDmPolicy({
|
|
|
1548
1532
|
promptAllowFrom: promptFeishuAllowFrom
|
|
1549
1533
|
});
|
|
1550
1534
|
async function runScanToCreate(prompter, domain, beforePersistentEffect) {
|
|
1551
|
-
const { beginAppRegistration, initAppRegistration, pollAppRegistration, printQrCode } = await import("./app-registration-
|
|
1535
|
+
const { beginAppRegistration, initAppRegistration, pollAppRegistration, printQrCode } = await import("./app-registration-d8dxhKp-.mjs");
|
|
1552
1536
|
try {
|
|
1553
1537
|
await initAppRegistration(domain);
|
|
1554
1538
|
} catch {
|
|
@@ -1639,7 +1623,7 @@ async function runNewAppFlow(params) {
|
|
|
1639
1623
|
appSecretProbeValue = appSecretResult.resolvedValue;
|
|
1640
1624
|
}
|
|
1641
1625
|
if (appId && appSecretProbeValue) {
|
|
1642
|
-
const { getAppOwnerOpenId } = await import("./app-registration-
|
|
1626
|
+
const { getAppOwnerOpenId } = await import("./app-registration-d8dxhKp-.mjs");
|
|
1643
1627
|
scanOpenId = await getAppOwnerOpenId({
|
|
1644
1628
|
appId,
|
|
1645
1629
|
appSecret: appSecretProbeValue,
|
|
@@ -1740,7 +1724,7 @@ const feishuSetupWizard = {
|
|
|
1740
1724
|
});
|
|
1741
1725
|
let probeResult = null;
|
|
1742
1726
|
if (configured && account.configured) try {
|
|
1743
|
-
const { probeFeishu } = await import("./probe-
|
|
1727
|
+
const { probeFeishu } = await import("./probe-BiQj7eM4.mjs").then((n) => n.n);
|
|
1744
1728
|
probeResult = await probeFeishu(account);
|
|
1745
1729
|
} catch {}
|
|
1746
1730
|
if (!configured) return [`Feishu: ${t("wizard.channels.statusNeedsAppCredentials")}`];
|
|
@@ -1763,8 +1747,7 @@ const feishuSetupWizard = {
|
|
|
1763
1747
|
dmPolicy: feishuDmPolicy,
|
|
1764
1748
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
|
|
1765
1749
|
};
|
|
1766
|
-
|
|
1767
|
-
//#region extensions/feishu/src/sticker-catalog.ts
|
|
1750
|
+
// extensions/feishu/src/sticker-catalog.ts
|
|
1768
1751
|
const STICKER_QUERY_PATTERN = /^[^\p{Cs}]{1,128}$/u;
|
|
1769
1752
|
function fitsStickerSearchResult(stickers) {
|
|
1770
1753
|
return Buffer.byteLength(JSON.stringify({
|
|
@@ -1802,8 +1785,7 @@ function searchFeishuStickerSet(entries, params) {
|
|
|
1802
1785
|
truncated: false
|
|
1803
1786
|
};
|
|
1804
1787
|
}
|
|
1805
|
-
|
|
1806
|
-
//#region extensions/feishu/src/channel.ts
|
|
1788
|
+
// extensions/feishu/src/channel.ts
|
|
1807
1789
|
function resolveFeishuSendAttachmentMedia(params) {
|
|
1808
1790
|
const sourceKeys = [
|
|
1809
1791
|
"media",
|
|
@@ -1893,7 +1875,7 @@ const meta = {
|
|
|
1893
1875
|
order: 70,
|
|
1894
1876
|
preferSessionLookupForAnnounceTarget: true
|
|
1895
1877
|
};
|
|
1896
|
-
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
1878
|
+
const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-DK9nv7tQ.mjs"), "feishuChannelRuntime");
|
|
1897
1879
|
async function resolveFeishuMessageSender(kind) {
|
|
1898
1880
|
const unavailableMessage = `Feishu ${kind} sending is not available.`;
|
|
1899
1881
|
try {
|
|
@@ -1931,7 +1913,7 @@ const feishuMessageAdapter = defineChannelMessageAdapter({
|
|
|
1931
1913
|
}
|
|
1932
1914
|
});
|
|
1933
1915
|
async function createFeishuActionClient(account) {
|
|
1934
|
-
const { createFeishuClient } = await import("./client-
|
|
1916
|
+
const { createFeishuClient } = await import("./client-DlpvvLoz.mjs").then((n) => n.t);
|
|
1935
1917
|
return createFeishuClient(account);
|
|
1936
1918
|
}
|
|
1937
1919
|
const collectFeishuSecurityWarnings = createAllowlistProviderGroupPolicyWarningCollector({
|
|
@@ -2853,5 +2835,4 @@ const feishuPlugin = createChatChannelPlugin({
|
|
|
2853
2835
|
})
|
|
2854
2836
|
}
|
|
2855
2837
|
});
|
|
2856
|
-
//#endregion
|
|
2857
2838
|
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-CWB6EycD.mjs";
|
|
2
|
+
import { d as listFeishuDirectoryPeers, o as feishuOutbound, u as listFeishuDirectoryGroups } from "./channel-dxkUGCgC.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-QS_FCE--.mjs";
|
|
4
|
+
import { r as createFeishuClient } from "./client-DlpvvLoz.mjs";
|
|
5
|
+
import { a as getFeishuMemberInfo, i as getChatMembers, n as buildFeishuDirectChatMembers, r as getChatInfo, t as assertFeishuChatMember } from "./chat-CfRBIQrw.mjs";
|
|
6
|
+
import { t as probeFeishu } from "./probe-BiQj7eM4.mjs";
|
|
7
7
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
|
-
|
|
8
|
+
// 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({
|
|
@@ -79,8 +79,7 @@ function listFeishuDirectoryGroupsLive(params) {
|
|
|
79
79
|
} : void 0
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
//#region extensions/feishu/src/pins.ts
|
|
82
|
+
// extensions/feishu/src/pins.ts
|
|
84
83
|
function normalizePin(pin) {
|
|
85
84
|
return {
|
|
86
85
|
messageId: pin.message_id,
|
|
@@ -115,8 +114,7 @@ async function listPinsFeishu(params) {
|
|
|
115
114
|
pageToken: response.data?.page_token
|
|
116
115
|
};
|
|
117
116
|
}
|
|
118
|
-
|
|
119
|
-
//#region extensions/feishu/src/reactions.ts
|
|
117
|
+
// extensions/feishu/src/reactions.ts
|
|
120
118
|
/**
|
|
121
119
|
* Add a reaction (emoji) to a message.
|
|
122
120
|
* @param emojiType - Feishu emoji type, e.g., "SMILE", "THUMBSUP", "HEART"
|
|
@@ -179,8 +177,7 @@ async function listReactionsFeishu(params) {
|
|
|
179
177
|
pageToken = nextPageToken;
|
|
180
178
|
}
|
|
181
179
|
}
|
|
182
|
-
|
|
183
|
-
//#region extensions/feishu/src/channel.runtime.ts
|
|
180
|
+
// extensions/feishu/src/channel.runtime.ts
|
|
184
181
|
const feishuChannelRuntime = {
|
|
185
182
|
assertFeishuChatMember,
|
|
186
183
|
buildFeishuDirectChatMembers,
|
|
@@ -203,5 +200,4 @@ const feishuChannelRuntime = {
|
|
|
203
200
|
sendMessageFeishu,
|
|
204
201
|
sendStickerFeishu
|
|
205
202
|
};
|
|
206
|
-
//#endregion
|
|
207
203
|
export { feishuChannelRuntime };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as resolveFeishuToolAccount, Et as resolveFeishuChatReadPreliminaryAuthorization, It as resolveFeishuChatType, Tt as readFeishuChatInfoWithAuthorization, X as feishuExternalToolResult, Y as registerFeishuTool, 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 feishuExternalToolResult, Y as registerFeishuTool, at as formatFeishuApiError, bt as authorizeFeishuChatMemberRead, et as assertFeishuApiSuccess, yt as assertFeishuChatReadAllowed } from "./reply-delivery-result-QS_FCE--.mjs";
|
|
2
|
+
import { r as createFeishuClient } from "./client-DlpvvLoz.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";
|
|
@@ -28,8 +28,7 @@ const FeishuChatSchema = Type.Object({
|
|
|
28
28
|
description: "Member ID type (default: open_id)"
|
|
29
29
|
}))
|
|
30
30
|
});
|
|
31
|
-
|
|
32
|
-
//#region extensions/feishu/src/chat.ts
|
|
31
|
+
// extensions/feishu/src/chat.ts
|
|
33
32
|
function buildFeishuDirectChatMembers(authorization) {
|
|
34
33
|
return {
|
|
35
34
|
chat_id: authorization.chatId,
|
|
@@ -205,5 +204,4 @@ function registerFeishuChatTools(api) {
|
|
|
205
204
|
onError: (err) => feishuExternalToolResult({ error: formatFeishuApiError(err, { includeNestedErrorLogId: true }) })
|
|
206
205
|
});
|
|
207
206
|
}
|
|
208
|
-
//#endregion
|
|
209
207
|
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-CWB6EycD.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
|
+
// 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,8 +16,7 @@ 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
|
-
|
|
20
|
-
//#region extensions/feishu/src/send-context.ts
|
|
19
|
+
// extensions/feishu/src/send-context.ts
|
|
21
20
|
const sendScope = new AsyncLocalStorage();
|
|
22
21
|
/** Mutation errors preserve uncertainty after earlier requests reached the provider. */
|
|
23
22
|
function withFeishuRequestContext(assertCurrent, request) {
|
|
@@ -67,8 +66,7 @@ async function runBeforeFeishuMessageDispatch(operation) {
|
|
|
67
66
|
throw new PlatformMessageNotDispatchedError(`Feishu media preparation failed before message dispatch: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
|
-
|
|
71
|
-
//#region extensions/feishu/src/client.ts
|
|
69
|
+
// extensions/feishu/src/client.ts
|
|
72
70
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
73
71
|
createEventDispatcher: () => createEventDispatcher,
|
|
74
72
|
createFeishuClient: () => createFeishuClient,
|
|
@@ -341,5 +339,4 @@ function createEventDispatcher(account) {
|
|
|
341
339
|
verificationToken: account.verificationToken
|
|
342
340
|
});
|
|
343
341
|
}
|
|
344
|
-
//#endregion
|
|
345
342
|
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
|
+
// 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_-]+$/;
|
|
@@ -38,8 +38,7 @@ function looksLikeFeishuId(raw) {
|
|
|
38
38
|
if (trimmed.startsWith(OPEN_ID_PREFIX)) return true;
|
|
39
39
|
return false;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
//#region extensions/feishu/src/conversation-id.ts
|
|
41
|
+
// extensions/feishu/src/conversation-id.ts
|
|
43
42
|
const SCOPED_CONVERSATION_PATTERNS = [
|
|
44
43
|
["group_topic_sender", /^(?<chatId>.+):topic:(?<topicId>[^:]+):sender:(?<senderOpenId>[^:]+)$/i],
|
|
45
44
|
["group_topic", /^(?<chatId>.+):topic:(?<topicId>[^:]+)$/i],
|
|
@@ -124,5 +123,4 @@ function buildFeishuModelOverrideParentCandidates(parentConversationId) {
|
|
|
124
123
|
}
|
|
125
124
|
return [chatId];
|
|
126
125
|
}
|
|
127
|
-
//#endregion
|
|
128
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, buildChannelConfigSchema, buildGroupEntrySchema, buildMultiAccountChannelSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
8
8
|
import { z } from "zod";
|
|
9
|
-
|
|
9
|
+
// \0rolldown/runtime.js
|
|
10
10
|
var __defProp = Object.defineProperty;
|
|
11
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -31,8 +31,7 @@ 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
|
-
|
|
35
|
-
//#region extensions/feishu/src/accounts.ts
|
|
34
|
+
// extensions/feishu/src/accounts.ts
|
|
36
35
|
var accounts_exports = /* @__PURE__ */ __exportAll({
|
|
37
36
|
FeishuSecretRefUnavailableError: () => FeishuSecretRefUnavailableError,
|
|
38
37
|
inspectFeishuCredentials: () => inspectFeishuCredentials,
|
|
@@ -211,16 +210,14 @@ function listEnabledFeishuAccounts(cfg) {
|
|
|
211
210
|
accountId
|
|
212
211
|
})).filter((account) => account.enabled && account.configured);
|
|
213
212
|
}
|
|
214
|
-
|
|
215
|
-
//#region extensions/feishu/src/external-keys.ts
|
|
213
|
+
// extensions/feishu/src/external-keys.ts
|
|
216
214
|
const FEISHU_EXTERNAL_KEY_PATTERN = /^(?!\s)(?![\s\S]*\s$)(?![\s\S]*\.\.)[^\p{Cc}\p{Cs}/\\]{1,512}$/u;
|
|
217
215
|
function normalizeFeishuExternalKey(value) {
|
|
218
216
|
if (typeof value !== "string") return;
|
|
219
217
|
const normalized = value.trim();
|
|
220
218
|
return FEISHU_EXTERNAL_KEY_PATTERN.test(normalized) ? normalized : void 0;
|
|
221
219
|
}
|
|
222
|
-
|
|
223
|
-
//#region extensions/feishu/src/webhook-path.ts
|
|
220
|
+
// extensions/feishu/src/webhook-path.ts
|
|
224
221
|
const DEFAULT_FEISHU_WEBHOOK_PATH = "/feishu/events";
|
|
225
222
|
/** Normalize trusted configuration only; incoming request targets must remain unmodified. */
|
|
226
223
|
function normalizeFeishuWebhookPath(value) {
|
|
@@ -231,8 +228,7 @@ function normalizeFeishuWebhookPath(value) {
|
|
|
231
228
|
const emptyQuery = !parsed.search && parsed.href.endsWith("?") && !configured.includes("#") ? "?" : "";
|
|
232
229
|
return `${parsed.pathname}${parsed.search}${emptyQuery}`;
|
|
233
230
|
}
|
|
234
|
-
|
|
235
|
-
//#region extensions/feishu/src/config-schema.ts
|
|
231
|
+
// extensions/feishu/src/config-schema.ts
|
|
236
232
|
const ChannelActionsSchema = z.object({
|
|
237
233
|
reactions: z.boolean().optional(),
|
|
238
234
|
sticker: z.boolean().optional()
|
|
@@ -511,8 +507,7 @@ const FeishuConfigSchema = buildMultiAccountChannelSchema(FeishuConfigSchemaBase
|
|
|
511
507
|
}
|
|
512
508
|
});
|
|
513
509
|
const FeishuChannelConfigSchema = buildChannelConfigSchema(FeishuConfigSchema, { jsonSchemaMode: "input" });
|
|
514
|
-
|
|
515
|
-
//#region packages/normalization-core/src/record-coerce.ts
|
|
510
|
+
// packages/normalization-core/src/record-coerce.ts
|
|
516
511
|
/** Type guard for non-array object records at browser-safe boundaries. */
|
|
517
512
|
function isRecord$1(value) {
|
|
518
513
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -521,8 +516,7 @@ function isRecord$1(value) {
|
|
|
521
516
|
function asNullableRecord$1(value) {
|
|
522
517
|
return isRecord$1(value) ? value : null;
|
|
523
518
|
}
|
|
524
|
-
|
|
525
|
-
//#region src/config/channel-config-normalization.ts
|
|
519
|
+
// src/config/channel-config-normalization.ts
|
|
526
520
|
/** Applies one channel-specific doctor migration to every object-shaped account. */
|
|
527
521
|
function normalizeChannelAccounts(params) {
|
|
528
522
|
const rawAccounts = asNullableRecord$1(params.entry.accounts);
|
|
@@ -598,8 +592,7 @@ function normalizeChannelConfigEntries$1(params) {
|
|
|
598
592
|
changes
|
|
599
593
|
};
|
|
600
594
|
}
|
|
601
|
-
|
|
602
|
-
//#region src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
595
|
+
// src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
603
596
|
/** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
|
|
604
597
|
function createLegacyWebhookListenerDoctorContract(params) {
|
|
605
598
|
const portKey = params.portKey ?? "webhookPort";
|
|
@@ -669,13 +662,11 @@ function createLegacyWebhookListenerDoctorContract(params) {
|
|
|
669
662
|
}
|
|
670
663
|
};
|
|
671
664
|
}
|
|
672
|
-
|
|
673
|
-
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
665
|
+
// \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
674
666
|
var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
|
|
675
667
|
import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
676
668
|
__reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
|
|
677
|
-
|
|
678
|
-
//#region extensions/feishu/src/doctor-contract.ts
|
|
669
|
+
// extensions/feishu/src/doctor-contract.ts
|
|
679
670
|
const webhookListenerMigration = createLegacyWebhookListenerDoctorContract({
|
|
680
671
|
channelKey: "feishu",
|
|
681
672
|
defaultPort: 3e3,
|
|
@@ -845,5 +836,4 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
845
836
|
historicalWebhookAccountIds: resolveHistoricalWebhookAccountIds(stray.config)
|
|
846
837
|
};
|
|
847
838
|
}
|
|
848
|
-
//#endregion
|
|
849
839
|
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 };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
2
|
-
|
|
2
|
+
// extensions/feishu/src/json-response.ts
|
|
3
3
|
/** Feishu control-plane JSON responses are tiny; 16 MiB leaves ample headroom. */
|
|
4
4
|
const FEISHU_JSON_MAX_BYTES = 16777216;
|
|
5
5
|
async function readFeishuJsonResponse(response, label = "feishu.api") {
|
|
6
6
|
return readProviderJsonResponse(response, label, { maxBytes: FEISHU_JSON_MAX_BYTES });
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { readFeishuJsonResponse as t };
|
package/dist/.setup/{message-action-contract-Bhxj8Zrf.mjs → message-action-contract-C9KL891-.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// extensions/feishu/src/message-action-contract.ts
|
|
2
2
|
const FEISHU_NATIVE_CHAT_TARGET_ALIASES = [
|
|
3
3
|
"chatId",
|
|
4
4
|
"chat_id",
|
|
@@ -18,5 +18,4 @@ const messageActionTargetAliases = {
|
|
|
18
18
|
"list-pins": { aliases: ["chatId"] },
|
|
19
19
|
"channel-info": { aliases: ["chatId"] }
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
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-CWB6EycD.mjs";
|
|
2
|
+
import { t as getFeishuRuntime } from "./runtime-6V3uDMw5.mjs";
|
|
3
|
+
import { r as registerFeishuAiAgent, t as probeFeishu } from "./probe-BiQj7eM4.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 { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
|
-
|
|
8
|
+
// extensions/feishu/src/bot-identity-cache.ts
|
|
9
9
|
const FEISHU_BOT_IDENTITY_CACHE_NAMESPACE = "feishu.bot-identity-cache";
|
|
10
10
|
const FEISHU_BOT_IDENTITY_CACHE_MAX_ENTRIES = 128;
|
|
11
11
|
function openFeishuBotIdentityCache() {
|
|
@@ -52,8 +52,7 @@ async function writeCachedFeishuBotIdentity(params) {
|
|
|
52
52
|
fetchedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
//#region extensions/feishu/src/monitor-startup-timeout.ts
|
|
55
|
+
// extensions/feishu/src/monitor-startup-timeout.ts
|
|
57
56
|
const FEISHU_STARTUP_BOT_INFO_TIMEOUT_DEFAULT_MS = 3e4;
|
|
58
57
|
const FEISHU_STARTUP_BOT_INFO_TIMEOUT_ENV = "OPENCLAW_FEISHU_STARTUP_PROBE_TIMEOUT_MS";
|
|
59
58
|
function resolveStartupProbeTimeoutMs(env = process.env) {
|
|
@@ -66,8 +65,7 @@ function resolveStartupProbeTimeoutMs(env = process.env) {
|
|
|
66
65
|
}
|
|
67
66
|
return FEISHU_STARTUP_BOT_INFO_TIMEOUT_DEFAULT_MS;
|
|
68
67
|
}
|
|
69
|
-
|
|
70
|
-
//#region extensions/feishu/src/monitor.startup.ts
|
|
68
|
+
// extensions/feishu/src/monitor.startup.ts
|
|
71
69
|
const FEISHU_STARTUP_BOT_INFO_TIMEOUT_MS = resolveStartupProbeTimeoutMs();
|
|
72
70
|
async function fetchBotIdentityForMonitor(account, options = {}) {
|
|
73
71
|
if (options.abortSignal?.aborted) return {};
|
|
@@ -121,9 +119,8 @@ async function fetchBotIdentityForMonitor(account, options = {}) {
|
|
|
121
119
|
return {};
|
|
122
120
|
}
|
|
123
121
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const loadMonitorAccountRuntime = createLazyRuntimeModule(() => import("./monitor.account-DRqaexjx.mjs"));
|
|
122
|
+
// extensions/feishu/src/monitor.ts
|
|
123
|
+
const loadMonitorAccountRuntime = createLazyRuntimeModule(() => import("./monitor.account-DIvDEG0X.mjs"));
|
|
127
124
|
async function monitorFeishuProvider(opts = {}) {
|
|
128
125
|
const cfg = opts.config;
|
|
129
126
|
if (!cfg) throw new Error("Config is required for Feishu monitor");
|
|
@@ -178,5 +175,4 @@ async function monitorFeishuProvider(opts = {}) {
|
|
|
178
175
|
}
|
|
179
176
|
await Promise.all(monitorPromises);
|
|
180
177
|
}
|
|
181
|
-
//#endregion
|
|
182
178
|
export { monitorFeishuProvider, fetchBotIdentityForMonitor as t };
|