@openclaw/feishu 2026.7.2-beta.3 → 2026.7.2-beta.5

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 (159) hide show
  1. package/README.md +1 -1
  2. package/dist/{accounts-BDoGHJDk.js → accounts-CKhCa76b.js} +2 -19
  3. package/dist/api.js +65 -43
  4. package/dist/{app-registration-BzkyrVZu.js → app-registration-cN1bVV6s.js} +5 -5
  5. package/dist/{channel-BdnXYU6g.js → channel-CBNICmK9.js} +37 -75
  6. package/dist/channel-plugin-api.js +1 -1
  7. package/dist/{channel.runtime-CVIzo2dV.js → channel.runtime-CSlJVqy4.js} +7 -7
  8. package/dist/{client-87BmeMpj.js → client-Dee7cKsS.js} +62 -1
  9. package/dist/contract-api.js +2 -2
  10. package/dist/doctor-contract-BiD9tyIv.js +102 -0
  11. package/dist/doctor-contract-api.js +1 -1
  12. package/dist/{drive-BHv8WW9i.js → drive-DG6pKTPE.js} +23 -20
  13. package/dist/{send-DcrXbqqA.js → media-DOwcLJ1j.js} +1050 -1021
  14. package/dist/{monitor-BVQf7-Bl.js → monitor-DEHJlyWW.js} +6 -5
  15. package/dist/{monitor.account-Blbf2T6J.js → monitor.account-DEHl8Non.js} +1556 -592
  16. package/dist/monitor.startup-CSUPT_U1.js +143 -0
  17. package/dist/{probe-BgboTHIn.js → probe-Za1kgUvx.js} +70 -10
  18. package/dist/runtime-api.js +1 -2
  19. package/dist/{security-audit-BIeA3W3Q.js → security-audit-D7WK_BHh.js} +1 -1
  20. package/dist/{security-audit-shared-BIHeF-S_.js → security-audit-shared-BgpY7AiJ.js} +6 -11
  21. package/dist/security-contract-api.js +1 -1
  22. package/dist/{send-result-DfE5Fhz6.js → send-result-Bcofg0Vv.js} +1 -1
  23. package/dist/session-binding-contract-api.js +1 -1
  24. package/dist/setup-api.js +1 -1
  25. package/dist/{subagent-hooks-BKTOxB-T.js → subagent-hooks-DL2SC5zX.js} +1 -1
  26. package/dist/subagent-hooks-api.js +1 -1
  27. package/dist/{thread-bindings-V0bwk0A1.js → thread-bindings-Dqs_A0du.js} +2 -1
  28. package/node_modules/@larksuiteoapi/node-sdk/README.md +13 -0
  29. package/node_modules/@larksuiteoapi/node-sdk/README.zh.md +12 -0
  30. package/node_modules/@larksuiteoapi/node-sdk/es/index.js +8950 -3084
  31. package/node_modules/@larksuiteoapi/node-sdk/lib/index.js +8951 -3083
  32. package/node_modules/@larksuiteoapi/node-sdk/package.json +1 -1
  33. package/node_modules/@larksuiteoapi/node-sdk/types/index.d.ts +12522 -698
  34. package/node_modules/@protobufjs/utf8/CHANGELOG.md +8 -0
  35. package/node_modules/@protobufjs/utf8/index.js +29 -18
  36. package/node_modules/@protobufjs/utf8/package.json +2 -2
  37. package/node_modules/@protobufjs/utf8/tests/index.js +5 -0
  38. package/node_modules/@types/node/README.md +1 -1
  39. package/node_modules/@types/node/fs/promises.d.ts +16 -6
  40. package/node_modules/@types/node/package.json +2 -2
  41. package/node_modules/agent-base/README.md +145 -0
  42. package/node_modules/agent-base/dist/src/index.d.ts +78 -0
  43. package/node_modules/agent-base/dist/src/index.js +203 -0
  44. package/node_modules/agent-base/dist/src/index.js.map +1 -0
  45. package/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
  46. package/node_modules/agent-base/dist/src/promisify.js +18 -0
  47. package/node_modules/agent-base/dist/src/promisify.js.map +1 -0
  48. package/node_modules/agent-base/package.json +64 -0
  49. package/node_modules/agent-base/src/index.ts +345 -0
  50. package/node_modules/agent-base/src/promisify.ts +33 -0
  51. package/node_modules/axios/CHANGELOG.md +197 -1
  52. package/node_modules/axios/README.md +424 -256
  53. package/node_modules/axios/dist/axios.js +589 -204
  54. package/node_modules/axios/dist/axios.min.js +3 -3
  55. package/node_modules/axios/dist/axios.min.js.map +1 -1
  56. package/node_modules/axios/dist/browser/axios.cjs +630 -185
  57. package/node_modules/axios/dist/esm/axios.js +630 -185
  58. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  59. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  60. package/node_modules/axios/dist/node/axios.cjs +949 -301
  61. package/node_modules/axios/index.d.cts +28 -5
  62. package/node_modules/axios/index.d.ts +24 -3
  63. package/node_modules/axios/lib/adapters/adapters.js +1 -1
  64. package/node_modules/axios/lib/adapters/fetch.js +223 -49
  65. package/node_modules/axios/lib/adapters/http.js +408 -193
  66. package/node_modules/axios/lib/adapters/xhr.js +3 -1
  67. package/node_modules/axios/lib/core/Axios.js +4 -2
  68. package/node_modules/axios/lib/core/AxiosError.js +13 -1
  69. package/node_modules/axios/lib/core/AxiosHeaders.js +13 -42
  70. package/node_modules/axios/lib/core/buildFullPath.js +29 -1
  71. package/node_modules/axios/lib/core/mergeConfig.js +35 -0
  72. package/node_modules/axios/lib/defaults/transitional.js +2 -0
  73. package/node_modules/axios/lib/env/data.js +1 -1
  74. package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +1 -3
  75. package/node_modules/axios/lib/helpers/Http2Sessions.js +119 -0
  76. package/node_modules/axios/lib/helpers/buildURL.js +7 -4
  77. package/node_modules/axios/lib/helpers/composeSignals.js +48 -47
  78. package/node_modules/axios/lib/helpers/cookies.js +5 -1
  79. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +16 -11
  80. package/node_modules/axios/lib/helpers/formDataToJSON.js +26 -4
  81. package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
  82. package/node_modules/axios/lib/helpers/fromDataURI.js +20 -5
  83. package/node_modules/axios/lib/helpers/progressEventReducer.js +3 -0
  84. package/node_modules/axios/lib/helpers/resolveConfig.js +26 -13
  85. package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  86. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +33 -1
  87. package/node_modules/axios/lib/helpers/toFormData.js +48 -12
  88. package/node_modules/axios/lib/helpers/validator.js +1 -1
  89. package/node_modules/axios/lib/utils.js +105 -19
  90. package/node_modules/axios/package.json +31 -13
  91. package/node_modules/https-proxy-agent/README.md +137 -0
  92. package/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
  93. package/node_modules/https-proxy-agent/dist/agent.js +177 -0
  94. package/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
  95. package/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
  96. package/node_modules/https-proxy-agent/dist/index.js +14 -0
  97. package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  98. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
  99. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
  100. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
  101. package/node_modules/https-proxy-agent/package.json +56 -0
  102. package/node_modules/protobufjs/dist/light/protobuf.js +145 -188
  103. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  104. package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  105. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  106. package/node_modules/protobufjs/dist/minimal/protobuf.js +33 -76
  107. package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
  108. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
  109. package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
  110. package/node_modules/protobufjs/dist/protobuf.js +168 -208
  111. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  112. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  113. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  114. package/node_modules/protobufjs/index.d.ts +0 -8
  115. package/node_modules/protobufjs/package.json +2 -3
  116. package/node_modules/protobufjs/src/parse.js +3 -0
  117. package/node_modules/protobufjs/src/util/minimal.js +0 -3
  118. package/node_modules/qs/CHANGELOG.md +11 -0
  119. package/node_modules/qs/dist/qs.js +17 -17
  120. package/node_modules/qs/lib/parse.js +19 -8
  121. package/node_modules/qs/lib/utils.js +47 -8
  122. package/node_modules/qs/package.json +6 -5
  123. package/node_modules/qs/test/parse.js +230 -0
  124. package/node_modules/qs/test/utils.js +194 -0
  125. package/node_modules/typebox/build/compile/validator.d.mts +1 -4
  126. package/node_modules/typebox/build/guard/guard.d.mts +1 -1
  127. package/node_modules/typebox/build/guard/guard.mjs +5 -2
  128. package/node_modules/typebox/build/guard/string.mjs +16 -4
  129. package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  130. package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
  131. package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
  132. package/node_modules/typebox/build/typebox.d.mts +1 -1
  133. package/node_modules/typebox/build/typebox.mjs +1 -1
  134. package/node_modules/typebox/package.json +1 -1
  135. package/node_modules/typebox/readme.md +29 -32
  136. package/node_modules/ws/lib/receiver.js +15 -32
  137. package/node_modules/ws/lib/websocket-server.js +4 -4
  138. package/node_modules/ws/lib/websocket.js +4 -4
  139. package/node_modules/ws/package.json +5 -1
  140. package/openclaw.plugin.json +2 -16
  141. package/package.json +20 -8
  142. package/dist/doctor-contract-DXH5hux1.js +0 -97
  143. package/dist/monitor.startup-Cy8NPGAX.js +0 -43
  144. package/node_modules/@protobufjs/inquire/CHANGELOG.md +0 -8
  145. package/node_modules/@protobufjs/inquire/LICENSE +0 -26
  146. package/node_modules/@protobufjs/inquire/README.md +0 -13
  147. package/node_modules/@protobufjs/inquire/index.d.ts +0 -10
  148. package/node_modules/@protobufjs/inquire/index.js +0 -38
  149. package/node_modules/@protobufjs/inquire/package.json +0 -21
  150. package/node_modules/@protobufjs/inquire/tests/data/array.js +0 -1
  151. package/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +0 -1
  152. package/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +0 -1
  153. package/node_modules/@protobufjs/inquire/tests/data/object.js +0 -1
  154. package/node_modules/@protobufjs/inquire/tests/index.js +0 -20
  155. package/node_modules/axios/dist/axios.js.map +0 -1
  156. package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
  157. package/node_modules/axios/dist/esm/axios.js.map +0 -1
  158. package/node_modules/axios/dist/node/axios.cjs.map +0 -1
  159. package/npm-shrinkwrap.json +0 -1354
@@ -0,0 +1,102 @@
1
+ import { asObjectRecord, defineChannelAliasMigration, defineKeyMoveMigration, hasLegacyAccountStreamingAliases, normalizeChannelConfigEntries } from "openclaw/plugin-sdk/runtime-doctor";
2
+ //#region extensions/feishu/src/doctor-contract.ts
3
+ const streamingAliasMigration = defineChannelAliasMigration({
4
+ channelId: "feishu",
5
+ streaming: { defaultMode: "partial" },
6
+ accountStreamingReplacesRoot: true
7
+ });
8
+ const LEGACY_COALESCE_FIELDS = [
9
+ "enabled",
10
+ "minDelayMs",
11
+ "maxDelayMs"
12
+ ];
13
+ const LEGACY_HEARTBEAT_FIELDS = ["visibility", "intervalMs"];
14
+ const toolsBaseMigration = defineKeyMoveMigration({
15
+ from: ["tools", "base"],
16
+ to: ["tools", "bitable"],
17
+ match: (value) => typeof value === "boolean",
18
+ sourceOwn: false
19
+ });
20
+ function sanitizeLegacyHeartbeatFields(params) {
21
+ const heartbeat = asObjectRecord(params.entry.heartbeat);
22
+ if (!heartbeat || Object.keys(heartbeat).length > 0 && !LEGACY_HEARTBEAT_FIELDS.some((field) => Object.hasOwn(heartbeat, field))) return {
23
+ entry: params.entry,
24
+ changed: false
25
+ };
26
+ const next = { ...params.entry };
27
+ delete next.heartbeat;
28
+ params.changes.push(`Removed ${params.pathPrefix}.heartbeat (legacy Feishu fields were never read by runtime).`);
29
+ return {
30
+ entry: next,
31
+ changed: true
32
+ };
33
+ }
34
+ function sanitizeLegacyCoalesceFields(params) {
35
+ const streaming = asObjectRecord(params.entry.streaming);
36
+ const block = asObjectRecord(streaming?.block);
37
+ const coalesce = asObjectRecord(block?.coalesce);
38
+ if (!streaming || !block || !coalesce) return {
39
+ entry: params.entry,
40
+ changed: false
41
+ };
42
+ const removed = LEGACY_COALESCE_FIELDS.filter((field) => coalesce[field] !== void 0);
43
+ if (removed.length === 0) return {
44
+ entry: params.entry,
45
+ changed: false
46
+ };
47
+ const nextCoalesce = { ...coalesce };
48
+ for (const field of removed) delete nextCoalesce[field];
49
+ params.changes.push(`Removed ${params.pathPrefix}.streaming.block.coalesce.{${removed.join(",")}} (legacy Feishu-only fields; block delivery reads minChars/maxChars/idleMs).`);
50
+ return {
51
+ entry: {
52
+ ...params.entry,
53
+ streaming: {
54
+ ...streaming,
55
+ block: {
56
+ ...block,
57
+ coalesce: nextCoalesce
58
+ }
59
+ }
60
+ },
61
+ changed: true
62
+ };
63
+ }
64
+ function sanitizeFeishuCoalesce(cfg, changes) {
65
+ return normalizeChannelConfigEntries({
66
+ cfg,
67
+ channelId: "feishu",
68
+ changes,
69
+ normalizeEntry: (params) => {
70
+ const tools = toolsBaseMigration.normalize(params);
71
+ const coalesce = sanitizeLegacyCoalesceFields({
72
+ ...params,
73
+ entry: tools.entry
74
+ });
75
+ const heartbeat = sanitizeLegacyHeartbeatFields({
76
+ ...params,
77
+ entry: coalesce.entry
78
+ });
79
+ return {
80
+ entry: heartbeat.entry,
81
+ changed: tools.changed || coalesce.changed || heartbeat.changed
82
+ };
83
+ }
84
+ }).config;
85
+ }
86
+ const legacyConfigRules = [...streamingAliasMigration.legacyConfigRules, {
87
+ path: ["channels", "feishu"],
88
+ message: "channels.feishu[.accounts.<id>].tools.base is legacy; use tools.bitable. Run \"openclaw doctor --fix\".",
89
+ match: (value) => {
90
+ const entry = asObjectRecord(value);
91
+ return toolsBaseMigration.hasLegacy(entry) || hasLegacyAccountStreamingAliases(entry?.accounts, toolsBaseMigration.hasLegacy);
92
+ }
93
+ }];
94
+ function normalizeCompatibilityConfig({ cfg }) {
95
+ const aliases = streamingAliasMigration.normalizeChannelConfig({ cfg });
96
+ return {
97
+ config: sanitizeFeishuCoalesce(aliases.config, aliases.changes),
98
+ changes: aliases.changes
99
+ };
100
+ }
101
+ //#endregion
102
+ export { normalizeCompatibilityConfig as n, legacyConfigRules as t };
@@ -1,2 +1,2 @@
1
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DXH5hux1.js";
1
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BiD9tyIv.js";
2
2
  export { legacyConfigRules, normalizeCompatibilityConfig };
@@ -1,8 +1,9 @@
1
- import { c as encodeQuery, d as isRecord$1, i as listFeishuAccountIds, l as extractReplyText, m as readString, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount, u as formatFeishuApiError, v as parseFeishuCommentTarget } from "./accounts-BDoGHJDk.js";
2
- import { A as resolveFeishuChatType, b as resolveFeishuChatReadPreliminaryAuthorization, h as authorizeFeishuChatMemberRead, m as assertFeishuChatReadAllowed } from "./send-result-DfE5Fhz6.js";
3
- import { r as createFeishuClient } from "./client-87BmeMpj.js";
1
+ import { a as resolveDefaultFeishuAccountId, c as encodeQuery, d as isRecord$1, i as listFeishuAccountIds, l as extractReplyText, m as readString, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount, u as formatFeishuApiError, v as parseFeishuCommentTarget } from "./accounts-CKhCa76b.js";
2
+ import { A as resolveFeishuChatType, b as resolveFeishuChatReadPreliminaryAuthorization, h as authorizeFeishuChatMemberRead, m as assertFeishuChatReadAllowed } from "./send-result-Bcofg0Vv.js";
3
+ import { r as createFeishuClient } from "./client-Dee7cKsS.js";
4
4
  import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
5
5
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
+ import { normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-resolution";
6
7
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
7
8
  import { jsonResult } from "openclaw/plugin-sdk/tool-results";
8
9
  import { Type } from "typebox";
@@ -10,7 +11,7 @@ import { readPositiveIntegerParam } from "openclaw/plugin-sdk/param-readers";
10
11
  //#region extensions/feishu/src/tools-config.ts
11
12
  /**
12
13
  * Default tool configuration.
13
- * - doc, chat, wiki, drive, scopes, bitable/base: enabled by default
14
+ * - doc, chat, wiki, drive, scopes, bitable: enabled by default
14
15
  * - perm: disabled by default (sensitive operation)
15
16
  */
16
17
  const DEFAULT_TOOLS_CONFIG = {
@@ -20,29 +21,33 @@ const DEFAULT_TOOLS_CONFIG = {
20
21
  drive: true,
21
22
  perm: false,
22
23
  scopes: true,
23
- bitable: true,
24
- base: true
24
+ bitable: true
25
25
  };
26
- /**
27
- * Resolve tools config with defaults.
28
- *
29
- * `base` is a backward-compatible alias for the Bitable tool family. When both
30
- * keys are present, the explicit `bitable` value wins and `base` mirrors it.
31
- */
26
+ /** Resolve tools config with defaults. */
32
27
  function resolveToolsConfig(cfg) {
33
- const bitable = cfg?.bitable ?? cfg?.base ?? DEFAULT_TOOLS_CONFIG.bitable;
34
28
  return {
35
29
  ...DEFAULT_TOOLS_CONFIG,
36
- ...cfg,
37
- bitable,
38
- base: bitable
30
+ ...cfg
39
31
  };
40
32
  }
41
33
  //#endregion
42
34
  //#region extensions/feishu/src/tool-account.ts
43
35
  function resolveImplicitToolAccountId(params) {
44
36
  const explicitAccountId = normalizeOptionalString(params.executeParams?.accountId);
45
- if (explicitAccountId) return explicitAccountId;
37
+ if (explicitAccountId) {
38
+ const normalizedAccountId = normalizeOptionalAccountId(explicitAccountId);
39
+ if (!normalizedAccountId) throw new Error(`Invalid Feishu account ID "${explicitAccountId}"`);
40
+ const listedAccountId = listFeishuAccountIds(params.api.config).find((accountId) => normalizeOptionalAccountId(accountId) === normalizedAccountId) ?? (() => {
41
+ const defaultAccountId = resolveDefaultFeishuAccountId(params.api.config);
42
+ return normalizeOptionalAccountId(defaultAccountId) === normalizedAccountId ? defaultAccountId : void 0;
43
+ })();
44
+ if (!listedAccountId) throw new Error(`Unknown Feishu account "${explicitAccountId}"`);
45
+ if (!resolveFeishuAccount({
46
+ cfg: params.api.config,
47
+ accountId: normalizedAccountId
48
+ }).enabled) throw new Error(`Feishu account "${listedAccountId}" is disabled`);
49
+ return normalizedAccountId;
50
+ }
46
51
  const contextualAccountId = normalizeOptionalString(params.defaultAccountId);
47
52
  if (contextualAccountId && listFeishuAccountIds(params.api.config).includes(contextualAccountId)) {
48
53
  if (resolveFeishuAccount({
@@ -80,8 +85,7 @@ function resolveAnyEnabledFeishuToolsConfig(accounts) {
80
85
  drive: false,
81
86
  perm: false,
82
87
  scopes: false,
83
- bitable: false,
84
- base: false
88
+ bitable: false
85
89
  };
86
90
  for (const account of accounts) {
87
91
  const cfg = resolveToolsConfig(account.config.tools);
@@ -92,7 +96,6 @@ function resolveAnyEnabledFeishuToolsConfig(accounts) {
92
96
  merged.perm = merged.perm || cfg.perm;
93
97
  merged.scopes = merged.scopes || cfg.scopes;
94
98
  merged.bitable = merged.bitable || cfg.bitable;
95
- merged.base = merged.base || cfg.base;
96
99
  }
97
100
  return merged;
98
101
  }