@openclaw/feishu 2026.10.1-beta.2 → 2026.10.5-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 (151) hide show
  1. package/dist/.setup/{app-registration-BB6TubaW.mjs → app-registration-DQOq5urV.mjs} +13 -32
  2. package/dist/.setup/{channel-CX62T71S.mjs → channel-CjGGyrdx.mjs} +87 -174
  3. package/dist/.setup/{channel.runtime-COiaq-Rv.mjs → channel.runtime-SaC_uTPM.mjs} +57 -74
  4. package/dist/.setup/{chat-BdyvImsY.mjs → chat-fC3dvxFs.mjs} +16 -28
  5. package/dist/.setup/{client-BsBVWJzN.mjs → client-wwr8PGPH.mjs} +24 -30
  6. package/dist/.setup/{conversation-id-C1ofUfU8.mjs → conversation-id-D00i9uy5.mjs} +5 -10
  7. package/dist/.setup/{doctor-contract-B1B9ogdd.mjs → doctor-contract-oIpUWtNO.mjs} +23 -20
  8. package/dist/.setup/{monitor-7DvwUs4Y.mjs → monitor-Yt__BUki.mjs} +33 -54
  9. package/dist/.setup/{monitor.account-7xVu7XWY.mjs → monitor.account-CVz16781.mjs} +377 -664
  10. package/dist/.setup/{probe-B9o7iey6.mjs → probe-DXnFxq5j.mjs} +14 -17
  11. package/dist/.setup/{reply-delivery-result-Bt-BWBEA.mjs → reply-delivery-result-iCCrdxE1.mjs} +153 -181
  12. package/dist/.setup/{session-conversation-C53IEUWt.mjs → session-conversation-BSBNK5Mq.mjs} +1 -1
  13. package/dist/.setup/{setup-api-DmzX9S01.mjs → setup-api-B_LFQQ-Q.mjs} +1 -1
  14. package/dist/.setup/{subagent-hooks-CUXg0pC-.mjs → subagent-hooks-9Pc1-k37.mjs} +7 -17
  15. package/dist/.setup/{thread-bindings-jW2x5VuN.mjs → thread-bindings-DdNLxoL3.mjs} +21 -44
  16. package/dist/api.js +218 -326
  17. package/dist/channel-plugin-api.js +1 -1
  18. package/dist/contract-api.js +1 -1
  19. package/dist/doctor-contract-api.js +2 -2
  20. package/dist/session-binding-contract-api.js +1 -1
  21. package/dist/session-key-api.js +1 -1
  22. package/dist/setup-api.js +1 -1
  23. package/dist/setup-entry.js +1 -1
  24. package/dist/subagent-hooks-api.js +1 -1
  25. package/node_modules/@openclaw/fs-safe/CHANGELOG.md +91 -0
  26. package/node_modules/@openclaw/fs-safe/README.md +1 -1
  27. package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +1 -0
  28. package/node_modules/@openclaw/fs-safe/dist/advanced.js +1 -0
  29. package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +1 -1
  30. package/node_modules/@openclaw/fs-safe/dist/archive-entry.js +7 -3
  31. package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +4 -4
  32. package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
  33. package/node_modules/@openclaw/fs-safe/dist/archive-read.js +5 -4
  34. package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -1
  35. package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +22 -38
  36. package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.d.ts +17 -0
  37. package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.js +117 -0
  38. package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.d.ts +38 -0
  39. package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.js +195 -0
  40. package/node_modules/@openclaw/fs-safe/dist/create.d.ts +1 -0
  41. package/node_modules/@openclaw/fs-safe/dist/create.js +4 -1
  42. package/node_modules/@openclaw/fs-safe/dist/entry-publication.js +3 -1
  43. package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +2 -0
  44. package/node_modules/@openclaw/fs-safe/dist/errors.js +5 -0
  45. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +3 -0
  46. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +57 -11
  47. package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +5 -5
  48. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +52 -5
  49. package/node_modules/@openclaw/fs-safe/dist/guest.js +1 -1
  50. package/node_modules/@openclaw/fs-safe/dist/index.d.ts +1 -1
  51. package/node_modules/@openclaw/fs-safe/dist/index.js +1 -1
  52. package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +4 -0
  53. package/node_modules/@openclaw/fs-safe/dist/native-move-fallback.d.ts +3 -0
  54. package/node_modules/@openclaw/fs-safe/dist/native-move-fallback.js +54 -0
  55. package/node_modules/@openclaw/fs-safe/dist/native-noreplace.d.ts +8 -0
  56. package/node_modules/@openclaw/fs-safe/dist/native-noreplace.js +55 -0
  57. package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +0 -1
  58. package/node_modules/@openclaw/fs-safe/dist/native-operations.js +22 -26
  59. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +5 -1
  60. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +1 -1
  61. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +12 -2
  62. package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.js +3 -1
  63. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +1 -1
  64. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +52 -6
  65. package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +2 -1
  66. package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.d.ts +2 -0
  67. package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +17 -0
  68. package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +6 -1
  69. package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +1 -1
  70. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +2 -2
  71. package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +5 -0
  72. package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.js +1 -0
  73. package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +2 -0
  74. package/node_modules/@openclaw/fs-safe/dist/publish-file.js +35 -2
  75. package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +6 -5
  76. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +1 -4
  77. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +6 -0
  78. package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +15 -1
  79. package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +4 -0
  80. package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +1 -1
  81. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +0 -1
  82. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +6 -12
  83. package/node_modules/@openclaw/fs-safe/dist/root-errors.js +25 -4
  84. package/node_modules/@openclaw/fs-safe/dist/root-impl.js +18 -18
  85. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +4 -2
  86. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +13 -17
  87. package/node_modules/@openclaw/fs-safe/dist/root-paths.js +1 -1
  88. package/node_modules/@openclaw/fs-safe/dist/root-walk.js +4 -4
  89. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +10 -1
  90. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +20 -0
  91. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +19 -7
  92. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +18 -3
  93. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +25 -3
  94. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +2 -0
  95. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.d.ts +14 -0
  96. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.js +187 -0
  97. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +15 -1
  98. package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.js +4 -1
  99. package/node_modules/@openclaw/fs-safe/dist/temp-directory-diagnostics.d.ts +10 -0
  100. package/node_modules/@openclaw/fs-safe/dist/temp-directory-diagnostics.js +29 -0
  101. package/node_modules/@openclaw/fs-safe/dist/temp-target.js +1 -1
  102. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +6 -6
  103. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +4 -4
  104. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +17 -16
  105. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +20 -28
  106. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +1 -0
  107. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +27 -4
  108. package/node_modules/@openclaw/fs-safe/dist/walk.js +2 -13
  109. package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +2 -2
  110. package/node_modules/@openclaw/fs-safe/dist/watch-native.js +3 -1
  111. package/node_modules/@openclaw/fs-safe/dist/watch-rescan.js +3 -9
  112. package/node_modules/@openclaw/fs-safe/dist/watch.js +2 -3
  113. package/node_modules/@openclaw/fs-safe/docs/advanced.md +1 -0
  114. package/node_modules/@openclaw/fs-safe/docs/archive.md +5 -1
  115. package/node_modules/@openclaw/fs-safe/docs/atomic.md +11 -3
  116. package/node_modules/@openclaw/fs-safe/docs/contributing.md +1 -1
  117. package/node_modules/@openclaw/fs-safe/docs/copy.md +109 -1
  118. package/node_modules/@openclaw/fs-safe/docs/durability.md +50 -5
  119. package/node_modules/@openclaw/fs-safe/docs/errors.md +37 -0
  120. package/node_modules/@openclaw/fs-safe/docs/guest.md +21 -4
  121. package/node_modules/@openclaw/fs-safe/docs/native-helper.md +5 -3
  122. package/node_modules/@openclaw/fs-safe/docs/native.md +39 -6
  123. package/node_modules/@openclaw/fs-safe/docs/path-scope.md +4 -0
  124. package/node_modules/@openclaw/fs-safe/docs/public-api.md +3 -1
  125. package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +46 -8
  126. package/node_modules/@openclaw/fs-safe/docs/staged-file.md +10 -3
  127. package/node_modules/@openclaw/fs-safe/docs/temp.md +12 -0
  128. package/node_modules/@openclaw/fs-safe/docs/watch.md +6 -3
  129. package/node_modules/@openclaw/fs-safe/docs/writing.md +40 -11
  130. package/node_modules/@openclaw/fs-safe/package.json +16 -16
  131. package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
  132. package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
  133. package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
  134. package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
  135. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
  136. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
  137. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
  138. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
  139. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
  140. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
  141. package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
  142. package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
  143. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
  144. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
  145. package/node_modules/follow-redirects/index.js +10 -1
  146. package/node_modules/follow-redirects/package.json +1 -1
  147. package/package.json +5 -5
  148. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.d.ts +0 -17
  149. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.js +0 -66
  150. package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +0 -7
  151. package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.js +0 -16
@@ -1,11 +1,11 @@
1
- import { g as __exportAll } from "./doctor-contract-B1B9ogdd.mjs";
2
- import { r as createFeishuClient } from "./client-BsBVWJzN.mjs";
1
+ import { _ as __exportAll } from "./doctor-contract-oIpUWtNO.mjs";
2
+ import { r as createFeishuClient } from "./client-wwr8PGPH.mjs";
3
3
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
4
4
  import { isFutureDateTimestampMs, resolveExpiresAtMsFromDurationMs, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
5
5
  import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
6
6
  import { createHash } from "node:crypto";
7
7
  import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
8
- import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
8
+ import { racePromiseWithAbortSignal, raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
9
9
  //#region extensions/feishu/src/async.ts
10
10
  const RACE_TIMEOUT = Symbol("race-timeout");
11
11
  const RACE_ABORT = Symbol("race-abort");
@@ -15,23 +15,20 @@ async function raceWithTimeoutAndAbort(promise, options = {}) {
15
15
  status: "resolved",
16
16
  value: await promise
17
17
  };
18
- let abortHandler;
19
- const contenders = [promise];
20
- if (options.abortSignal) contenders.push(new Promise((resolve) => {
21
- abortHandler = () => resolve(RACE_ABORT);
22
- options.abortSignal?.addEventListener("abort", abortHandler, { once: true });
23
- }));
24
18
  try {
25
- const settled = Promise.race(contenders);
26
- const result = options.timeoutMs === void 0 ? await settled : await raceWithTimeout(settled, resolveTimerTimeoutMs(options.timeoutMs, 1), () => RACE_TIMEOUT);
19
+ const result = options.timeoutMs === void 0 ? await racePromiseWithAbortSignal(promise, options.abortSignal, () => RACE_ABORT) : await raceWithTimeout(promise, resolveTimerTimeoutMs(options.timeoutMs, 1), () => RACE_TIMEOUT, {
20
+ signal: options.abortSignal,
21
+ onAbort: () => RACE_ABORT
22
+ });
27
23
  if (result === RACE_TIMEOUT) return { status: "timeout" };
28
24
  if (result === RACE_ABORT) return { status: "aborted" };
29
25
  return {
30
26
  status: "resolved",
31
27
  value: result
32
28
  };
33
- } finally {
34
- if (abortHandler) options.abortSignal?.removeEventListener("abort", abortHandler);
29
+ } catch (error) {
30
+ if (error === RACE_ABORT) return { status: "aborted" };
31
+ throw error;
35
32
  }
36
33
  }
37
34
  function waitForAbortableDelay(delayMs, abortSignal) {
@@ -87,7 +84,7 @@ async function probeFeishu(creds, options = {}) {
87
84
  if (options.abortSignal?.aborted) return {
88
85
  ok: false,
89
86
  appId: creds.appId,
90
- error: "probe aborted"
87
+ error: "check aborted"
91
88
  };
92
89
  const timeoutMs = options.timeoutMs ?? FEISHU_PROBE_REQUEST_TIMEOUT_MS;
93
90
  const cacheKey = buildProbeCacheKey(creds);
@@ -113,14 +110,14 @@ async function probeFeishu(creds, options = {}) {
113
110
  if (responseResult.status === "aborted") return {
114
111
  ok: false,
115
112
  appId: creds.appId,
116
- error: "probe aborted"
113
+ error: "check aborted"
117
114
  };
118
- if (responseResult.status === "timeout") return cacheError(`probe timed out after ${timeoutMs}ms`);
115
+ if (responseResult.status === "timeout") return cacheError(`check timed out after ${timeoutMs}ms`);
119
116
  const response = responseResult.value;
120
117
  if (options.abortSignal?.aborted) return {
121
118
  ok: false,
122
119
  appId: creds.appId,
123
- error: "probe aborted"
120
+ error: "check aborted"
124
121
  };
125
122
  if (response.code !== 0) return cacheError(`API error: ${response.msg || `code ${response.code}`}`);
126
123
  const botInfo = response.bot ?? response.data?.bot;