@openclaw/feishu 2026.11.5 → 2026.11.10-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/.setup/{app-registration-DhnIp0Kd.mjs → app-registration-CBgQSu2L.mjs} +1 -2
  2. package/dist/.setup/async-WkOXCAZ1.mjs +32 -0
  3. package/dist/.setup/{channel-TBw3rO3z.mjs → channel-mDZxm2Gc.mjs} +125 -128
  4. package/dist/.setup/{channel.runtime-uAj58l3V.mjs → channel.runtime-DCooVws1.mjs} +10 -14
  5. package/dist/.setup/{chat-g8dTUdIb.mjs → chat-XINRHAOR.mjs} +3 -4
  6. package/dist/.setup/{client-DqGMyzOi.mjs → client-BAiJnY41.mjs} +4 -7
  7. package/dist/.setup/{conversation-id-BLsHZ7pf.mjs → conversation-id-N6q3vKm-.mjs} +2 -4
  8. package/dist/.setup/{doctor-contract-CPh2u5-o.mjs → doctor-contract-ItAh0keT.mjs} +10 -20
  9. package/dist/.setup/{message-action-contract-DMVMY_ng.mjs → message-action-contract-BZK6bpAl.mjs} +1 -2
  10. package/dist/.setup/{monitor-CqBu27Nc.mjs → monitor-DIBB2_Y_.mjs} +7 -10
  11. package/dist/.setup/{monitor.account-B6_SNuhx.mjs → monitor.account-B_qIOniw.mjs} +375 -296
  12. package/dist/.setup/{probe-CbNVGjv_.mjs → probe-DMOl26H9.mjs} +11 -41
  13. package/dist/.setup/{reply-delivery-result-BjOCvaPo.mjs → reply-delivery-result-Dcan9Dz_.mjs} +211 -150
  14. package/dist/.setup/{runtime-C5JxBWZp.mjs → runtime-6V3uDMw5.mjs} +1 -2
  15. package/dist/.setup/runtime-setter-api-DSLLnejl.mjs +2 -0
  16. package/dist/.setup/{secret-contract-Do6HTIFT.mjs → secret-contract-BAucuP6O.mjs} +1 -2
  17. package/dist/.setup/{secret-contract-api-LwCXK5Qg.mjs → secret-contract-api-DR5mIHhJ.mjs} +1 -1
  18. package/dist/.setup/{security-audit-b86aSgH2.mjs → security-audit-CYRW0D76.mjs} +1 -2
  19. package/dist/.setup/{session-conversation-CM3UgYZY.mjs → session-conversation-DLgXP0-H.mjs} +2 -3
  20. package/dist/.setup/{setup-api-DWvNh6et.mjs → setup-api-DR15GZv5.mjs} +1 -1
  21. package/dist/.setup/{subagent-hooks-DdiyEIi7.mjs → subagent-hooks-BRem84Mh.mjs} +4 -5
  22. package/dist/.setup/{thread-bindings-BxKmOara.mjs → thread-bindings-6eyktxK_.mjs} +1 -2
  23. package/dist/.source-module-urls/6579f1b33dd01f8f0aaea28311ed6df1a635f9ad1e6fa86dcba53bca46407e55.json +1 -1
  24. package/dist/api.js +28 -33
  25. package/dist/channel-entry.js +1 -2
  26. package/dist/channel-plugin-api.js +1 -1
  27. package/dist/configured-state.js +1 -2
  28. package/dist/contract-api.js +3 -3
  29. package/dist/doctor-contract-api.js +1 -1
  30. package/dist/index.js +1 -2
  31. package/dist/runtime-api.js +2 -2
  32. package/dist/runtime-setter-api.js +1 -1
  33. package/dist/secret-contract-api.js +1 -1
  34. package/dist/security-contract-api.js +1 -1
  35. package/dist/session-binding-contract-api.js +1 -1
  36. package/dist/session-key-api.js +1 -1
  37. package/dist/setup-api.js +1 -1
  38. package/dist/setup-entry.js +4 -5
  39. package/dist/subagent-hooks-api.js +2 -3
  40. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/README.md +41 -106
  41. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/axios.js +931 -278
  42. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/axios.min.js +2 -2
  43. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/axios.min.js.map +1 -1
  44. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/browser/axios.cjs +948 -268
  45. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/esm/axios.js +948 -268
  46. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/esm/axios.min.js +2 -2
  47. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  48. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/node/axios.cjs +925 -242
  49. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/index.d.cts +20 -1
  50. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/index.d.ts +18 -1
  51. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/adapters/fetch.js +73 -20
  52. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/adapters/http.js +145 -26
  53. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/adapters/xhr.js +120 -13
  54. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/Axios.js +67 -12
  55. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/AxiosError.js +59 -0
  56. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/AxiosHeaders.js +17 -4
  57. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/InterceptorManager.js +13 -2
  58. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/assertParamsAcyclic.js +49 -0
  59. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/createMultipartBody.js +37 -0
  60. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/dispatchRequest.js +20 -0
  61. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/mergeConfig.js +183 -120
  62. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/defaults/transitional.js +1 -0
  63. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/env/data.js +1 -1
  64. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/AxiosTransformStream.js +11 -2
  65. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/Http2Sessions.js +2 -1
  66. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/composeSignals.js +6 -3
  67. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/cookies.js +30 -6
  68. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +34 -7
  69. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/formDataToBlob.js +113 -0
  70. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/formDataToJSON.js +25 -1
  71. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/fromDataURI.js +8 -2
  72. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/isURLSameOrigin.js +4 -9
  73. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/parseHeaders.js +2 -1
  74. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/parseProtocol.js +1 -1
  75. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/resolveConfig.js +16 -3
  76. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/shouldBypassProxy.js +16 -1
  77. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/utils.js +61 -10
  78. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/package.json +1 -2
  79. package/node_modules/@larksuiteoapi/node-sdk/node_modules/follow-redirects/README.md +27 -1
  80. package/node_modules/@larksuiteoapi/node-sdk/node_modules/follow-redirects/index.js +1 -5
  81. package/node_modules/@larksuiteoapi/node-sdk/node_modules/follow-redirects/package.json +1 -1
  82. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/.editorconfig +1 -1
  83. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/CHANGELOG.md +87 -22
  84. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/README.md +63 -10
  85. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/dist/qs.js +17 -17
  86. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/eslint.config.mjs +61 -50
  87. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/formats.js +7 -2
  88. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/parse.js +29 -10
  89. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/stringify.js +5 -3
  90. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/utils.js +28 -9
  91. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/package.json +6 -6
  92. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/test/parse.js +335 -2
  93. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/test/stringify.js +222 -0
  94. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/test/utils.js +61 -3
  95. package/node_modules/typebox/build/format/date_time.d.mts +2 -1
  96. package/node_modules/typebox/build/format/date_time.mjs +12 -3
  97. package/node_modules/typebox/package.json +1 -1
  98. package/openclaw.plugin.json +5 -0
  99. package/package.json +5 -5
  100. package/dist/.setup/runtime-setter-api-BrQHE03y.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
- //#region extensions/feishu/src/app-registration.ts
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";
@@ -170,5 +170,4 @@ 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
174
173
  export { beginAppRegistration, getAppOwnerOpenId, initAppRegistration, pollAppRegistration, printQrCode };
@@ -0,0 +1,32 @@
1
+ import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
2
+ import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
3
+ import { racePromiseWithAbortSignal, raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
4
+ // extensions/feishu/src/async.ts
5
+ const RACE_TIMEOUT = Symbol("race-timeout");
6
+ const RACE_ABORT = Symbol("race-abort");
7
+ async function raceWithTimeoutAndAbort(promise, options = {}) {
8
+ if (options.abortSignal?.aborted) return { status: "aborted" };
9
+ try {
10
+ const result = options.timeoutMs === void 0 ? await racePromiseWithAbortSignal(promise, options.abortSignal, () => RACE_ABORT) : await raceWithTimeout(promise, resolveTimerTimeoutMs(options.timeoutMs, 1), () => RACE_TIMEOUT, {
11
+ signal: options.abortSignal,
12
+ onAbort: () => RACE_ABORT
13
+ });
14
+ if (result === RACE_TIMEOUT) return { status: "timeout" };
15
+ if (result === RACE_ABORT) return { status: "aborted" };
16
+ return {
17
+ status: "resolved",
18
+ value: result
19
+ };
20
+ } catch (error) {
21
+ if (error === RACE_ABORT) return { status: "aborted" };
22
+ throw error;
23
+ }
24
+ }
25
+ function waitForAbortableDelay(delayMs, abortSignal) {
26
+ if (abortSignal?.aborted) return Promise.resolve(false);
27
+ return sleepWithAbort(resolveTimerTimeoutMs(delayMs, 1), abortSignal, { ref: false }).then(() => true, (error) => {
28
+ if (error instanceof Error && error.name === "AbortError") return false;
29
+ throw error;
30
+ });
31
+ }
32
+ export { waitForAbortableDelay as n, raceWithTimeoutAndAbort as t };
@@ -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-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";
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-ItAh0keT.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-N6q3vKm-.mjs";
3
+ import { A as sendMessageFeishu, Ct as isFeishuGroupReadEnabled, Ft as normalizeFeishuChatType, It as resolveFeishuChatType, J as deliverCommentThreadText, Mt as resolveFeishuGroupToolPolicy, S as sendMediaFeishu, St as isFeishuGroupReadAllowed, T as chunkFeishuCardMarkdown, Tt as resolveFeishuChatReadPreliminaryAuthorization, W as buildFeishuMediaFallbackText, _ as renderFeishuPresentationPayload, b as withinCardTableLimit, bt as canEnumerateAllFeishuGroups, c as buildFeishuPayloadCard, d as consumeFeishuPresentationFallbackMarker, f as feishuCardWithinTableLimit, ft as chunkFeishuMarkdown, g as renderFeishuPresentationFallbackText, gt as shouldUseFeishuCard, h as readNativeFeishuCard, j as sendStructuredCardFeishu, k as sendCardFeishu, kt as resolveFeishuGroupConfig, l as buildFeishuPresentationCard, lt as parseFeishuCommentTarget, m as markRenderedFeishuCard, mt as materializeFeishuPostMarkdownSoftBreaks, n as createFeishuReplyDeliveryResult, o as FEISHU_PRESENTATION_CAPABILITIES, p as isFeishuCardWithinEnvelope, pt as chunkFeishuPostMarkdown, q as resolveFeishuIdentityHeaderTitle, s as assertFeishuCardWithinEnvelope, t as createFeishuPartialReplyDeliveryError, tt as cleanupAmbientCommentTypingReaction, u as buildFeishuPresentationFallback, ut as readNativeFeishuCardJson, vt as assertFeishuChatReadAllowed, w as shouldSuppressFeishuTextForVoiceMedia, wt as readFeishuChatInfoWithAuthorization, xt as canEnumerateAllFeishuPeers, y as resolveFeishuRichReply, yt as authorizeFeishuChatMemberRead } from "./reply-delivery-result-Dcan9Dz_.mjs";
4
+ import { t as messageActionTargetAliases } from "./message-action-contract-BZK6bpAl.mjs";
5
+ import { l as withFeishuRequestContext, r as createFeishuClient, u as withFeishuSendContext } from "./client-BAiJnY41.mjs";
6
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-BAucuP6O.mjs";
7
+ import { t as collectFeishuSecurityAuditFindings } from "./security-audit-CYRW0D76.mjs";
8
+ import { t as resolveFeishuSessionConversation } from "./session-conversation-DLgXP0-H.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";
@@ -15,7 +15,7 @@ import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
15
15
  import { ToolAuthorizationError, createActionGate } from "openclaw/plugin-sdk/channel-actions";
16
16
  import { adaptScopedAccountAccessor, createHybridChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
17
17
  import { buildChannelOutboundSessionRoute, createChatChannelPlugin, stripChannelTargetPrefix } from "openclaw/plugin-sdk/channel-core";
18
- import { createAccountStatusSink, createMessageReceiptFromOutboundResults, createReplyToFanout, createRuntimeOutboundDelegates, defineChannelMessageAdapter } from "openclaw/plugin-sdk/channel-outbound";
18
+ import { createAccountStatusSink, createChannelMessageAdapterFromOutbound, createMessageReceiptFromOutboundResults, createReplyToFanout, createRuntimeOutboundDelegates } from "openclaw/plugin-sdk/channel-outbound";
19
19
  import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
20
20
  import { createAllowlistProviderGroupPolicyWarningCollector, createConditionalWarningCollector } from "openclaw/plugin-sdk/channel-policy";
21
21
  import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
@@ -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
- //#region extensions/feishu/src/agent-prompt.ts
49
+ // 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,8 +57,7 @@ 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
- //#endregion
61
- //#region extensions/feishu/src/approval-auth.ts
60
+ // extensions/feishu/src/approval-auth.ts
62
61
  function normalizeFeishuApproverId(value) {
63
62
  const normalized = normalizeFeishuTarget(String(value));
64
63
  const trimmed = normalizeOptionalLowercaseString(normalized);
@@ -74,8 +73,7 @@ const feishuApprovalAuth = createChannelApprovalAuth({
74
73
  },
75
74
  normalizeApprover: normalizeFeishuApproverId
76
75
  }).approvalAuth;
77
- //#endregion
78
- //#region extensions/feishu/src/directory.static.ts
76
+ // extensions/feishu/src/directory.static.ts
79
77
  async function listFeishuDirectoryPeers(params) {
80
78
  const account = resolveFeishuAccount({
81
79
  cfg: params.cfg,
@@ -137,8 +135,7 @@ async function listAuthorizedFeishuDirectoryGroups(params) {
137
135
  id
138
136
  }));
139
137
  }
140
- //#endregion
141
- //#region extensions/feishu/src/doctor-agent-roster.ts
138
+ // extensions/feishu/src/doctor-agent-roster.ts
142
139
  function collectFeishuDoctorAgentIds(cfg) {
143
140
  const agents = isRecord(cfg) && isRecord(cfg.agents) ? cfg.agents : void 0;
144
141
  if (isRecord(agents?.entries)) {
@@ -151,8 +148,7 @@ function collectFeishuDoctorAgentIds(cfg) {
151
148
  for (const entry of entries) if (typeof entry.id === "string" && entry.id.trim()) ids.add(normalizeAgentId(entry.id));
152
149
  return [...ids].toSorted();
153
150
  }
154
- //#endregion
155
- //#region src/gateway/gateway-http-route-contracts.ts
151
+ // src/gateway/gateway-http-route-contracts.ts
156
152
  const GATEWAY_PROBE_ROUTES = /* @__PURE__ */ new Map([
157
153
  ["/health", "live"],
158
154
  ["/healthz", "live"],
@@ -168,8 +164,7 @@ function classifyGatewayProbePath(pathname) {
168
164
  }
169
165
  return "outside";
170
166
  }
171
- //#endregion
172
- //#region packages/normalization-core/src/string-coerce.ts
167
+ // packages/normalization-core/src/string-coerce.ts
173
168
  /** Trims string input and returns null for non-strings or empty strings. */
174
169
  function normalizeNullableString$1(value) {
175
170
  if (typeof value !== "string") return null;
@@ -188,13 +183,11 @@ function normalizeOptionalLowercaseString$1(value) {
188
183
  function normalizeLowercaseStringOrEmpty$1(value) {
189
184
  return normalizeOptionalLowercaseString$1(value) ?? "";
190
185
  }
191
- //#endregion
192
- //#region src/plugins/http-path-prefix.ts
186
+ // src/plugins/http-path-prefix.ts
193
187
  function prefixMatchPath(pathname, prefix) {
194
188
  return pathname === prefix || pathname.startsWith(`${prefix}/`) || pathname.startsWith(`${prefix}%`);
195
189
  }
196
- //#endregion
197
- //#region src/gateway/security-path.ts
190
+ // src/gateway/security-path.ts
198
191
  const MAX_PATH_DECODE_PASSES = 32;
199
192
  function normalizePathSeparators(pathname) {
200
193
  const collapsed = pathname.replace(/\/{2,}/g, "/");
@@ -243,8 +236,7 @@ function canonicalizePathForSecurity(pathname) {
243
236
  };
244
237
  }
245
238
  const PROTECTED_PLUGIN_ROUTE_PREFIXES = ["/api/channels"];
246
- //#endregion
247
- //#region src/gateway/server/plugins-http/path-context.ts
239
+ // src/gateway/server/plugins-http/path-context.ts
248
240
  function normalizeProtectedPrefix(prefix) {
249
241
  const collapsed = normalizeLowercaseStringOrEmpty$1(prefix).replace(/\/{2,}/g, "/");
250
242
  if (collapsed.length <= 1) return collapsed || "/";
@@ -270,8 +262,7 @@ function resolvePluginRoutePathContext(pathname) {
270
262
  rawNormalizedPath: canonical.rawNormalizedPath
271
263
  };
272
264
  }
273
- //#endregion
274
- //#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/gateway-config-runtime
265
+ // \0openclaw:bundled-sdk:openclaw/plugin-sdk/gateway-config-runtime
275
266
  var gateway_config_runtime_exports = /* @__PURE__ */ __exportAll({
276
267
  classifyGatewayProbePath: () => classifyGatewayProbePath,
277
268
  isProtectedPluginRoutePathFromContext: () => isProtectedPluginRoutePathFromContext,
@@ -279,8 +270,7 @@ var gateway_config_runtime_exports = /* @__PURE__ */ __exportAll({
279
270
  });
280
271
  import * as import_openclaw_plugin_sdk_gateway_config_runtime from "openclaw/plugin-sdk/gateway-config-runtime";
281
272
  __reExport(gateway_config_runtime_exports, import_openclaw_plugin_sdk_gateway_config_runtime);
282
- //#endregion
283
- //#region extensions/feishu/src/webhook-route.ts
273
+ // extensions/feishu/src/webhook-route.ts
284
274
  function resolveFeishuLegacyWebhookListener(config) {
285
275
  const listener = config.legacyWebhook;
286
276
  return listener ? {
@@ -320,8 +310,7 @@ function collectFeishuWebhookNotes({ cfg, env }) {
320
310
  warningNotes
321
311
  };
322
312
  }
323
- //#endregion
324
- //#region extensions/feishu/src/doctor.ts
313
+ // extensions/feishu/src/doctor.ts
325
314
  const FEISHU_STATE_DIR = "feishu";
326
315
  const BACKUP_PREFIX = "feishu-state-repair";
327
316
  const BLANK_USER_MESSAGE_REPAIR_THRESHOLD = 3;
@@ -795,10 +784,9 @@ const feishuDoctor = {
795
784
  normalizeCompatibilityConfig,
796
785
  runConfigSequence: runFeishuDoctorSequence
797
786
  };
798
- //#endregion
799
- //#region extensions/feishu/src/gateway.ts
787
+ // extensions/feishu/src/gateway.ts
800
788
  const feishuGatewayAdapter = { startAccount: async (ctx) => {
801
- const { monitorFeishuProvider } = await import("./monitor-CqBu27Nc.mjs");
789
+ const { monitorFeishuProvider } = await import("./monitor-DIBB2_Y_.mjs");
802
790
  const account = resolveFeishuRuntimeAccount({
803
791
  cfg: ctx.cfg,
804
792
  accountId: ctx.accountId
@@ -819,8 +807,7 @@ const feishuGatewayAdapter = { startAccount: async (ctx) => {
819
807
  statusSink
820
808
  });
821
809
  } };
822
- //#endregion
823
- //#region extensions/feishu/src/comment-send.ts
810
+ // extensions/feishu/src/comment-send.ts
824
811
  async function sendCommentThreadReply(params) {
825
812
  const target = parseFeishuCommentTarget(params.to);
826
813
  if (!target) return null;
@@ -853,8 +840,7 @@ async function sendCommentThreadReply(params) {
853
840
  });
854
841
  }
855
842
  }
856
- //#endregion
857
- //#region extensions/feishu/src/outbound.ts
843
+ // extensions/feishu/src/outbound.ts
858
844
  const FEISHU_PROPAGATE_MEDIA_UPLOAD_FAILURE_MARKER = "__openclawPropagateMediaUploadFailure";
859
845
  const FEISHU_TEXT_CHUNK_LIMIT = 4e3;
860
846
  function normalizePossibleLocalImagePath(text) {
@@ -1346,8 +1332,7 @@ const feishuOutbound = withFeishuOutboundSendContext({
1346
1332
  }
1347
1333
  })
1348
1334
  });
1349
- //#endregion
1350
- //#region extensions/feishu/src/session-route.ts
1335
+ // extensions/feishu/src/session-route.ts
1351
1336
  function resolveFeishuOutboundSessionRoute(params) {
1352
1337
  const rawTarget = stripChannelTargetPrefix(params.target, "feishu", "lark");
1353
1338
  const target = normalizeFeishuTarget(rawTarget);
@@ -1380,8 +1365,7 @@ function resolveFeishuOutboundSessionRoute(params) {
1380
1365
  to: target
1381
1366
  });
1382
1367
  }
1383
- //#endregion
1384
- //#region extensions/feishu/src/setup-core.ts
1368
+ // extensions/feishu/src/setup-core.ts
1385
1369
  function setFeishuNamedAccountEnabled(cfg, accountId, enabled) {
1386
1370
  const feishuCfg = cfg.channels?.feishu;
1387
1371
  return patchTopLevelChannelConfigSection({
@@ -1407,8 +1391,7 @@ const feishuSetupContract = defineChannelSetupContract({
1407
1391
  fields: {},
1408
1392
  legacyAdapter: feishuSetupAdapter
1409
1393
  });
1410
- //#endregion
1411
- //#region extensions/feishu/src/setup-surface.ts
1394
+ // extensions/feishu/src/setup-surface.ts
1412
1395
  const t = createSetupTranslator();
1413
1396
  const channel = "feishu";
1414
1397
  const SCAN_TO_CREATE_TP = "ob_cli_app";
@@ -1491,7 +1474,7 @@ const feishuDmPolicy = createChannelDmPolicy({
1491
1474
  promptAllowFrom: promptFeishuAllowFrom
1492
1475
  });
1493
1476
  async function runScanToCreate(prompter, domain, beforePersistentEffect) {
1494
- const { beginAppRegistration, initAppRegistration, pollAppRegistration, printQrCode } = await import("./app-registration-DhnIp0Kd.mjs");
1477
+ const { beginAppRegistration, initAppRegistration, pollAppRegistration, printQrCode } = await import("./app-registration-CBgQSu2L.mjs");
1495
1478
  try {
1496
1479
  await initAppRegistration(domain);
1497
1480
  } catch {
@@ -1582,7 +1565,7 @@ async function runNewAppFlow(params) {
1582
1565
  appSecretProbeValue = appSecretResult.resolvedValue;
1583
1566
  }
1584
1567
  if (appId && appSecretProbeValue) {
1585
- const { getAppOwnerOpenId } = await import("./app-registration-DhnIp0Kd.mjs");
1568
+ const { getAppOwnerOpenId } = await import("./app-registration-CBgQSu2L.mjs");
1586
1569
  scanOpenId = await getAppOwnerOpenId({
1587
1570
  appId,
1588
1571
  appSecret: appSecretProbeValue,
@@ -1680,7 +1663,7 @@ const feishuSetupWizard = {
1680
1663
  });
1681
1664
  let probeResult = null;
1682
1665
  if (configured && account.configured) try {
1683
- const { probeFeishu } = await import("./probe-CbNVGjv_.mjs").then((n) => n.n);
1666
+ const { probeFeishu } = await import("./probe-DMOl26H9.mjs").then((n) => n.n);
1684
1667
  probeResult = await probeFeishu(account);
1685
1668
  } catch {}
1686
1669
  if (!configured) return [`Feishu: ${t("wizard.channels.statusNeedsAppCredentials")}`];
@@ -1703,8 +1686,7 @@ const feishuSetupWizard = {
1703
1686
  dmPolicy: feishuDmPolicy,
1704
1687
  disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
1705
1688
  };
1706
- //#endregion
1707
- //#region extensions/feishu/src/sticker-catalog.ts
1689
+ // extensions/feishu/src/sticker-catalog.ts
1708
1690
  const STICKER_QUERY_PATTERN = /^[^\p{Cs}]{1,128}$/u;
1709
1691
  function fitsStickerSearchResult(stickers) {
1710
1692
  return Buffer.byteLength(JSON.stringify({
@@ -1722,10 +1704,10 @@ function searchFeishuStickerSet(entries, params) {
1722
1704
  if (!STICKER_QUERY_PATTERN.test(query)) throw new Error("Feishu sticker-search query must contain 1–128 Unicode characters.");
1723
1705
  const limit = params.limit === void 0 ? 5 : params.limit;
1724
1706
  if (typeof limit !== "number" || !Number.isInteger(limit) || limit < 1 || limit > 10) throw new Error("Feishu sticker-search limit must be an integer from 1 through 10.");
1725
- const needle = query.toLowerCase();
1707
+ const needle = query.toLowerCase().normalize("NFC");
1726
1708
  const stickers = [];
1727
1709
  for (const [fileId, keywords] of entries) {
1728
- const keyword = keywords.find((label) => label.toLowerCase().includes(needle));
1710
+ const keyword = keywords.find((label) => label.toLowerCase().normalize("NFC").includes(needle));
1729
1711
  if (keyword === void 0) continue;
1730
1712
  const match = {
1731
1713
  fileId,
@@ -1742,8 +1724,51 @@ function searchFeishuStickerSet(entries, params) {
1742
1724
  truncated: false
1743
1725
  };
1744
1726
  }
1745
- //#endregion
1746
- //#region extensions/feishu/src/channel.ts
1727
+ // extensions/feishu/src/threading-reply.ts
1728
+ /**
1729
+ * Feishu message IDs are `om_...`. Internal run/event IDs (UUIDs) are not valid
1730
+ * reply anchors, and the reply API rejects them with 99992354.
1731
+ */
1732
+ function normalizeFeishuNativeMessageId(value) {
1733
+ if (value == null) return;
1734
+ const id = typeof value === "number" ? String(value) : value.trim();
1735
+ return id.startsWith("om_") ? id : void 0;
1736
+ }
1737
+ function resolveFeishuReplyTransport({ replyToId, threadId }) {
1738
+ return {
1739
+ replyToId: normalizeFeishuNativeMessageId(replyToId) ?? null,
1740
+ threadId: threadId ?? null
1741
+ };
1742
+ }
1743
+ // extensions/feishu/src/threading.ts
1744
+ const feishuThreading = {
1745
+ matchesToolContextTarget: ({ target, toolContext }) => {
1746
+ const normalizedTarget = normalizeFeishuTarget(target);
1747
+ if (!normalizedTarget) return false;
1748
+ return [toolContext.currentChannelId, toolContext.currentMessagingTarget].some((currentTarget) => currentTarget !== void 0 && normalizeFeishuTarget(currentTarget) === normalizedTarget);
1749
+ },
1750
+ buildToolContext: ({ context, hasRepliedRef }) => ({
1751
+ currentChannelId: normalizeOptionalString(context.NativeChannelId) ?? normalizeOptionalString(context.To),
1752
+ currentChatType: context.ChatType === "direct" || context.ChatType === "group" || context.ChatType === "channel" ? context.ChatType : void 0,
1753
+ currentMessagingTarget: normalizeOptionalString(context.To),
1754
+ currentThreadTs: context.MessageThreadId != null ? String(context.MessageThreadId) : void 0,
1755
+ currentMessageId: normalizeFeishuNativeMessageId(context.CurrentMessageId),
1756
+ hasRepliedRef
1757
+ }),
1758
+ resolveReplyTransport: resolveFeishuReplyTransport
1759
+ };
1760
+ // extensions/feishu/src/topic-anchors.ts
1761
+ function isFeishuGroupTopicSessionKey(sessionKey) {
1762
+ if (typeof sessionKey !== "string" || !sessionKey) return false;
1763
+ const parsed = parseFeishuConversationId({ conversationId: sessionKey });
1764
+ return parsed?.scope === "group_topic" || parsed?.scope === "group_topic_sender";
1765
+ }
1766
+ function resolveFeishuTopicAutoThreadAnchor(ctx, accountId, target) {
1767
+ const currentTarget = ctx.toolContext?.currentMessagingTarget ?? ctx.toolContext?.currentChannelId;
1768
+ if (!isFeishuGroupTopicSessionKey(ctx.sessionKey) || ctx.params.topLevel === true || ctx.params.threadId === null || ctx.requesterAccountId && ctx.requesterAccountId !== accountId || ctx.toolContext?.currentChannelProvider && ctx.toolContext.currentChannelProvider !== "feishu" || !currentTarget || !target || normalizeFeishuTarget(currentTarget) !== normalizeFeishuTarget(target)) return;
1769
+ return normalizeFeishuNativeMessageId(ctx.toolContext?.currentMessageId) ?? normalizeFeishuNativeMessageId(ctx.toolContext?.currentThreadTs);
1770
+ }
1771
+ // extensions/feishu/src/channel.ts
1747
1772
  function resolveFeishuSendAttachmentMedia(params) {
1748
1773
  const sourceKeys = [
1749
1774
  "media",
@@ -1829,11 +1854,29 @@ const meta = {
1829
1854
  order: 70,
1830
1855
  preferSessionLookupForAnnounceTarget: true
1831
1856
  };
1832
- const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-uAj58l3V.mjs"), "feishuChannelRuntime");
1833
- async function resolveFeishuMessageSender(kind) {
1834
- const unavailableMessage = `Feishu ${kind} sending is not available.`;
1857
+ const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-DCooVws1.mjs"), "feishuChannelRuntime");
1858
+ const feishuOutboundAdapter = {
1859
+ deliveryMode: "direct",
1860
+ chunker: chunkFeishuMarkdown,
1861
+ chunkerMode: "markdown",
1862
+ textChunkLimit: 4e3,
1863
+ sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text),
1864
+ presentationCapabilities: FEISHU_PRESENTATION_CAPABILITIES,
1865
+ ...createRuntimeOutboundDelegates({
1866
+ getRuntime: loadFeishuChannelRuntime,
1867
+ renderPresentation: { resolve: (runtime) => runtime.feishuOutbound.renderPresentation },
1868
+ sendPayload: {
1869
+ resolve: (runtime) => runtime.feishuOutbound.sendPayload,
1870
+ unavailableMessage: "Feishu payload sending is not available."
1871
+ },
1872
+ sendText: { resolve: (runtime) => runtime.feishuOutbound.sendText },
1873
+ sendMedia: { resolve: (runtime) => runtime.feishuOutbound.sendMedia }
1874
+ })
1875
+ };
1876
+ async function resolveFeishuMessageSender(method) {
1877
+ const unavailableMessage = `Feishu ${method.slice(4).toLowerCase()} sending is not available.`;
1835
1878
  try {
1836
- const sender = (await loadFeishuChannelRuntime()).feishuOutbound[kind === "text" ? "sendText" : "sendMedia"];
1879
+ const sender = (await loadFeishuChannelRuntime()).feishuOutbound[method];
1837
1880
  if (sender) return sender;
1838
1881
  throw new Error(unavailableMessage);
1839
1882
  } catch (error) {
@@ -1841,33 +1884,30 @@ async function resolveFeishuMessageSender(kind) {
1841
1884
  throw new PlatformMessageNotDispatchedError(unavailableMessage, { cause: error });
1842
1885
  }
1843
1886
  }
1844
- async function sendFeishuAdapterMessage(kind, ctx) {
1845
- const send = await resolveFeishuMessageSender(kind);
1846
- const { onDeliveryResult, ...outboundCtx } = ctx;
1847
- const result = await send({
1848
- ...outboundCtx,
1849
- ...onDeliveryResult ? { onDeliveryResult: async (progress) => {
1850
- await onDeliveryResult(toFeishuMessageSendResult(progress, kind));
1851
- } } : {}
1852
- });
1853
- return toFeishuMessageSendResult(result, kind);
1854
- }
1855
- const feishuMessageAdapter = defineChannelMessageAdapter({
1887
+ const feishuMessageAdapter = createChannelMessageAdapterFromOutbound({
1856
1888
  id: "feishu",
1857
- durableFinal: { capabilities: {
1889
+ outbound: feishuOutboundAdapter,
1890
+ capabilities: {
1858
1891
  text: true,
1859
- media: true
1860
- } },
1861
- send: {
1862
- lifecycle: { beforeSendAttempt: async (ctx) => {
1863
- if (ctx.kind === "text" || ctx.kind === "media") await resolveFeishuMessageSender(ctx.kind);
1864
- } },
1865
- text: (ctx) => sendFeishuAdapterMessage("text", ctx),
1866
- media: (ctx) => sendFeishuAdapterMessage("media", ctx)
1892
+ media: true,
1893
+ payload: true,
1894
+ replyTo: true,
1895
+ thread: true,
1896
+ messageSendingHooks: true
1867
1897
  }
1868
1898
  });
1899
+ feishuMessageAdapter.send = {
1900
+ ...feishuMessageAdapter.send,
1901
+ lifecycle: { beforeSendAttempt: async (ctx) => {
1902
+ if (ctx.kind !== "poll") await resolveFeishuMessageSender({
1903
+ text: "sendText",
1904
+ media: "sendMedia",
1905
+ payload: "sendPayload"
1906
+ }[ctx.kind]);
1907
+ } }
1908
+ };
1869
1909
  async function createFeishuActionClient(account) {
1870
- const { createFeishuClient } = await import("./client-DqGMyzOi.mjs").then((n) => n.t);
1910
+ const { createFeishuClient } = await import("./client-BAiJnY41.mjs").then((n) => n.t);
1871
1911
  return createFeishuClient(account);
1872
1912
  }
1873
1913
  const collectFeishuSecurityWarnings = createAllowlistProviderGroupPolicyWarningCollector({
@@ -1940,24 +1980,12 @@ function isFeishuActionEnabled(account, action) {
1940
1980
  if (!account.enabled || !account.configured) return false;
1941
1981
  return createActionGate(account.config.actions)(action, action === "reactions");
1942
1982
  }
1943
- function isFeishuGroupTopicSessionKey(sessionKey) {
1944
- if (typeof sessionKey !== "string" || !sessionKey) return false;
1945
- const parsed = parseFeishuConversationId({ conversationId: sessionKey });
1946
- return parsed?.scope === "group_topic" || parsed?.scope === "group_topic_sender";
1947
- }
1948
- function resolveFeishuTopicAutoThreadAnchor(ctx, accountId) {
1949
- const currentTarget = ctx.toolContext?.currentMessagingTarget ?? ctx.toolContext?.currentChannelId;
1950
- const target = resolveFeishuActionTarget(ctx);
1951
- if (!isFeishuGroupTopicSessionKey(ctx.sessionKey) || ctx.params.topLevel === true || ctx.params.threadId === null || ctx.requesterAccountId && ctx.requesterAccountId !== accountId || ctx.toolContext?.currentChannelProvider && ctx.toolContext.currentChannelProvider !== "feishu" || !currentTarget || !target || normalizeFeishuTarget(currentTarget) !== normalizeFeishuTarget(target)) return;
1952
- const inbound = ctx.toolContext?.currentMessageId;
1953
- return typeof inbound === "string" && inbound.length > 0 ? inbound : void 0;
1954
- }
1955
1983
  function buildFeishuSendReplyAnchor(ctx, accountId) {
1956
1984
  if (ctx.action === "thread-reply") return {
1957
1985
  replyToMessageId: resolveFeishuMessageId(ctx.params),
1958
1986
  replyInThread: true
1959
1987
  };
1960
- const threadId = readFirstString(ctx.params, ["threadId"]) ?? resolveFeishuTopicAutoThreadAnchor(ctx, accountId);
1988
+ const threadId = readFirstString(ctx.params, ["threadId"]) ?? resolveFeishuTopicAutoThreadAnchor(ctx, accountId, resolveFeishuActionTarget(ctx));
1961
1989
  return resolveFeishuReplyMode({
1962
1990
  replyToId: ctx.reply ? ctx.reply.source === "implicit" && threadId ? void 0 : ctx.reply.replyToId : readFirstString(ctx.params, ["replyTo", "reply_to"]),
1963
1991
  threadId
@@ -2339,7 +2367,7 @@ const feishuPlugin = createChatChannelPlugin({
2339
2367
  ...ctx.action === "send" ? { propagateMediaUploadFailure: true } : {}
2340
2368
  });
2341
2369
  else {
2342
- const { target, ...delivery } = await (await resolveFeishuMessageSender("text"))(outboundContext);
2370
+ const { target, ...delivery } = await (await resolveFeishuMessageSender("sendText"))(outboundContext);
2343
2371
  result = {
2344
2372
  ...delivery,
2345
2373
  chatId: target?.id
@@ -2737,38 +2765,7 @@ const feishuPlugin = createChatChannelPlugin({
2737
2765
  });
2738
2766
  }
2739
2767
  } },
2740
- threading: {
2741
- matchesToolContextTarget: ({ target, toolContext }) => {
2742
- const normalizedTarget = normalizeFeishuTarget(target);
2743
- if (!normalizedTarget) return false;
2744
- return [toolContext.currentChannelId, toolContext.currentMessagingTarget].some((currentTarget) => currentTarget !== void 0 && normalizeFeishuTarget(currentTarget) === normalizedTarget);
2745
- },
2746
- buildToolContext: ({ context, hasRepliedRef }) => ({
2747
- currentChannelId: normalizeOptionalString(context.NativeChannelId) ?? normalizeOptionalString(context.To),
2748
- currentChatType: context.ChatType === "direct" || context.ChatType === "group" || context.ChatType === "channel" ? context.ChatType : void 0,
2749
- currentMessagingTarget: normalizeOptionalString(context.To),
2750
- currentThreadTs: context.MessageThreadId != null ? String(context.MessageThreadId) : void 0,
2751
- hasRepliedRef
2752
- })
2753
- },
2754
- outbound: {
2755
- deliveryMode: "direct",
2756
- chunker: chunkFeishuMarkdown,
2757
- chunkerMode: "markdown",
2758
- textChunkLimit: 4e3,
2759
- sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text),
2760
- presentationCapabilities: FEISHU_PRESENTATION_CAPABILITIES,
2761
- ...createRuntimeOutboundDelegates({
2762
- getRuntime: loadFeishuChannelRuntime,
2763
- renderPresentation: { resolve: (runtime) => runtime.feishuOutbound.renderPresentation },
2764
- sendPayload: {
2765
- resolve: (runtime) => runtime.feishuOutbound.sendPayload,
2766
- unavailableMessage: "Feishu payload sending is not available."
2767
- },
2768
- sendText: { resolve: (runtime) => runtime.feishuOutbound.sendText },
2769
- sendMedia: { resolve: (runtime) => runtime.feishuOutbound.sendMedia }
2770
- })
2771
- }
2768
+ threading: feishuThreading,
2769
+ outbound: feishuOutboundAdapter
2772
2770
  });
2773
- //#endregion
2774
2771
  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-CPh2u5-o.mjs";
2
- import { d as listFeishuDirectoryPeers, o as feishuOutbound, u as listFeishuDirectoryGroups } from "./channel-TBw3rO3z.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";
1
+ import { h as resolveFeishuAccount } from "./doctor-contract-ItAh0keT.mjs";
2
+ import { d as listFeishuDirectoryPeers, o as feishuOutbound, u as listFeishuDirectoryGroups } from "./channel-mDZxm2Gc.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-Dcan9Dz_.mjs";
4
+ import { r as createFeishuClient } from "./client-BAiJnY41.mjs";
5
+ import { a as getFeishuMemberInfo, i as getChatMembers, n as buildFeishuDirectChatMembers, r as getChatInfo, t as assertFeishuChatMember } from "./chat-XINRHAOR.mjs";
6
+ import { t as probeFeishu } from "./probe-DMOl26H9.mjs";
7
7
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
8
- //#region extensions/feishu/src/directory.ts
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({
@@ -80,8 +80,7 @@ function listFeishuDirectoryGroupsLive(params) {
80
80
  } : void 0
81
81
  });
82
82
  }
83
- //#endregion
84
- //#region extensions/feishu/src/pins.ts
83
+ // extensions/feishu/src/pins.ts
85
84
  function normalizePin(pin) {
86
85
  return {
87
86
  messageId: pin.message_id,
@@ -116,8 +115,7 @@ async function listPinsFeishu(params) {
116
115
  pageToken: response.data?.page_token
117
116
  };
118
117
  }
119
- //#endregion
120
- //#region extensions/feishu/src/reactions.ts
118
+ // extensions/feishu/src/reactions.ts
121
119
  /**
122
120
  * Add a reaction (emoji) to a message.
123
121
  * @param emojiType - Feishu emoji type, e.g., "SMILE", "THUMBSUP", "HEART"
@@ -180,8 +178,7 @@ async function listReactionsFeishu(params) {
180
178
  pageToken = nextPageToken;
181
179
  }
182
180
  }
183
- //#endregion
184
- //#region extensions/feishu/src/channel.runtime.ts
181
+ // extensions/feishu/src/channel.runtime.ts
185
182
  const feishuChannelRuntime = {
186
183
  assertFeishuChatMember,
187
184
  buildFeishuDirectChatMembers,
@@ -204,5 +201,4 @@ const feishuChannelRuntime = {
204
201
  sendMessageFeishu,
205
202
  sendStickerFeishu
206
203
  };
207
- //#endregion
208
204
  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-BjOCvaPo.mjs";
2
- import { r as createFeishuClient } from "./client-DqGMyzOi.mjs";
1
+ import { $ as resolveFeishuToolAccount, It as resolveFeishuChatType, Tt as resolveFeishuChatReadPreliminaryAuthorization, X as registerFeishuTool, Z as feishuExternalToolResult, at as formatFeishuApiError, et as assertFeishuApiSuccess, vt as assertFeishuChatReadAllowed, wt as readFeishuChatInfoWithAuthorization, yt as authorizeFeishuChatMemberRead } from "./reply-delivery-result-Dcan9Dz_.mjs";
2
+ import { r as createFeishuClient } from "./client-BAiJnY41.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
- //#region extensions/feishu/src/chat.ts
6
+ // extensions/feishu/src/chat.ts
7
7
  const CHAT_ACTION_VALUES = [
8
8
  "members",
9
9
  "info",
@@ -205,5 +205,4 @@ function registerFeishuChatTools(api) {
205
205
  onError: (err) => feishuExternalToolResult({ error: formatFeishuApiError(err, { includeNestedErrorLogId: true }) })
206
206
  });
207
207
  }
208
- //#endregion
209
208
  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-CPh2u5-o.mjs";
1
+ import { _ as __exportAll } from "./doctor-contract-ItAh0keT.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
- //#region extensions/feishu/src/client-timeout.ts
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
- //#endregion
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
- //#endregion
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,
@@ -325,5 +323,4 @@ function createEventDispatcher(account) {
325
323
  verificationToken: account.verificationToken
326
324
  });
327
325
  }
328
- //#endregion
329
326
  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 };