@openclaw/feishu 2026.5.28 → 2026.5.31-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 (33) hide show
  1. package/dist/{accounts-CXnY5H8g.js → accounts-Bpe6CjpS.js} +35 -3
  2. package/dist/api.js +18 -11
  3. package/dist/{channel-BfeesQob.js → channel-TXwK9jIG.js} +32 -24
  4. package/dist/channel-plugin-api.js +1 -1
  5. package/dist/{channel.runtime-BLnKcmtO.js → channel.runtime-AAff9iBZ.js} +6 -6
  6. package/dist/contract-api.js +1 -1
  7. package/dist/{drive-USxqssMG.js → drive-BIrffRwc.js} +18 -6
  8. package/dist/{monitor-CyD0CQxm.js → monitor-Ccev4ogO.js} +5 -3
  9. package/dist/{monitor.account-ByxawtBB.js → monitor.account-DYaT0fVd.js} +204 -88
  10. package/dist/{monitor.state-t4Ae5VIa.js → monitor.state-r4OLFBfg.js} +2 -2
  11. package/dist/{probe-956I34qH.js → probe-BjKRV7em.js} +21 -9
  12. package/dist/runtime-api.js +1 -1
  13. package/dist/{send-Djou0Z5a.js → send-Cze2qlca.js} +4 -4
  14. package/dist/{send-result-DSTSkRDM.js → send-result-D9rgEUlm.js} +1 -1
  15. package/dist/setup-api.js +1 -1
  16. package/dist/{subagent-hooks-fuyBHOVu.js → subagent-hooks-Bw3Dg2mS.js} +2 -2
  17. package/dist/subagent-hooks-api.js +2 -7
  18. package/node_modules/es-object-atoms/CHANGELOG.md +21 -14
  19. package/node_modules/es-object-atoms/isObject.d.ts +1 -1
  20. package/node_modules/es-object-atoms/package.json +6 -7
  21. package/node_modules/es-object-atoms/tsconfig.json +1 -0
  22. package/node_modules/hasown/CHANGELOG.md +7 -0
  23. package/node_modules/hasown/index.d.ts +0 -1
  24. package/node_modules/hasown/package.json +4 -5
  25. package/node_modules/typebox/build/type/script/mapping.d.mts +5 -2
  26. package/node_modules/typebox/build/type/script/mapping.mjs +15 -8
  27. package/node_modules/typebox/build/type/script/parser.d.mts +3 -1
  28. package/node_modules/typebox/build/type/script/parser.mjs +2 -1
  29. package/node_modules/typebox/package.json +29 -29
  30. package/npm-shrinkwrap.json +13 -13
  31. package/openclaw.plugin.json +124 -0
  32. package/package.json +5 -5
  33. package/dist/{thread-bindings-D24m3Cjy.js → thread-bindings-C58Uq5Y1.js} +1 -1
@@ -1,6 +1,6 @@
1
- import { t as probeFeishu } from "./probe-956I34qH.js";
2
- import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
1
+ import { t as probeFeishu } from "./probe-BjKRV7em.js";
3
2
  import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
3
+ import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { WEBHOOK_ANOMALY_COUNTER_DEFAULTS, WEBHOOK_RATE_LIMIT_DEFAULTS, createFixedWindowRateLimiter, createWebhookAnomalyTracker } from "openclaw/plugin-sdk/webhook-ingress";
5
5
  //#region extensions/feishu/src/monitor.startup.ts
6
6
  const FEISHU_STARTUP_BOT_INFO_TIMEOUT_DEFAULT_MS = 3e4;
@@ -1,5 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { r as createFeishuClient } from "./client-BhMNZBJD.js";
3
+ import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
3
4
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
4
5
  //#region extensions/feishu/src/async.ts
5
6
  const RACE_TIMEOUT = Symbol("race-timeout");
@@ -13,9 +14,12 @@ async function raceWithTimeoutAndAbort(promise, options = {}) {
13
14
  let timeoutHandle;
14
15
  let abortHandler;
15
16
  const contenders = [promise];
16
- if (options.timeoutMs !== void 0) contenders.push(new Promise((resolve) => {
17
- timeoutHandle = setTimeout(() => resolve(RACE_TIMEOUT), options.timeoutMs);
18
- }));
17
+ if (options.timeoutMs !== void 0) {
18
+ const timeoutMs = resolveTimerTimeoutMs(options.timeoutMs, 1);
19
+ contenders.push(new Promise((resolve) => {
20
+ timeoutHandle = setTimeout(() => resolve(RACE_TIMEOUT), timeoutMs);
21
+ }));
22
+ }
19
23
  if (options.abortSignal) contenders.push(new Promise((resolve) => {
20
24
  abortHandler = () => resolve(RACE_ABORT);
21
25
  options.abortSignal?.addEventListener("abort", abortHandler, { once: true });
@@ -37,8 +41,6 @@ function waitForAbortableDelay(delayMs, abortSignal) {
37
41
  if (abortSignal?.aborted) return Promise.resolve(false);
38
42
  return new Promise((resolve) => {
39
43
  let settled = false;
40
- let timer;
41
- let handleAbort;
42
44
  const finish = (value) => {
43
45
  if (settled) return;
44
46
  settled = true;
@@ -46,7 +48,7 @@ function waitForAbortableDelay(delayMs, abortSignal) {
46
48
  if (handleAbort) abortSignal?.removeEventListener("abort", handleAbort);
47
49
  resolve(value);
48
50
  };
49
- handleAbort = () => {
51
+ const handleAbort = () => {
50
52
  finish(false);
51
53
  };
52
54
  abortSignal?.addEventListener("abort", handleAbort, { once: true });
@@ -54,7 +56,7 @@ function waitForAbortableDelay(delayMs, abortSignal) {
54
56
  finish(false);
55
57
  return;
56
58
  }
57
- timer = setTimeout(() => finish(true), delayMs);
59
+ const timer = setTimeout(() => finish(true), resolveTimerTimeoutMs(delayMs, 1));
58
60
  timer.unref?.();
59
61
  });
60
62
  }
@@ -75,9 +77,14 @@ const PROBE_ERROR_TTL_MS = 60 * 1e3;
75
77
  const MAX_PROBE_CACHE_SIZE = 64;
76
78
  const FEISHU_PROBE_REQUEST_TIMEOUT_MS = 1e4;
77
79
  function setCachedProbeResult(cacheKey, result, ttlMs) {
80
+ const expiresAt = resolveExpiresAtMsFromDurationMs(ttlMs);
81
+ if (expiresAt === void 0) {
82
+ probeCache.delete(cacheKey);
83
+ return result;
84
+ }
78
85
  probeCache.set(cacheKey, {
79
86
  result,
80
- expiresAt: Date.now() + ttlMs
87
+ expiresAt
81
88
  });
82
89
  if (probeCache.size > MAX_PROBE_CACHE_SIZE) {
83
90
  const oldest = probeCache.keys().next().value;
@@ -98,7 +105,12 @@ async function probeFeishu(creds, options = {}) {
98
105
  const timeoutMs = options.timeoutMs ?? 1e4;
99
106
  const cacheKey = creds.accountId ?? `${creds.appId}:${creds.appSecret.slice(0, 8)}`;
100
107
  const cached = probeCache.get(cacheKey);
101
- if (cached && cached.expiresAt > Date.now()) return cached.result;
108
+ if (cached) {
109
+ const now = asDateTimestampMs(Date.now());
110
+ const expiresAt = asDateTimestampMs(cached.expiresAt);
111
+ if (now !== void 0 && expiresAt !== void 0 && expiresAt > now) return cached.result;
112
+ probeCache.delete(cacheKey);
113
+ }
102
114
  try {
103
115
  const responseResult = await raceWithTimeoutAndAbort(createFeishuClient(creds).request({
104
116
  method: "POST",
@@ -1,9 +1,9 @@
1
1
  import { n as setFeishuRuntime } from "./runtime-C5JxBWZp.js";
2
- import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
3
2
  import { createReplyPrefixContext } from "openclaw/plugin-sdk/channel-outbound";
4
3
  import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
5
4
  import { PAIRING_APPROVED_MESSAGE, buildProbeChannelStatusSummary, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/channel-status";
6
5
  import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
6
+ import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
7
7
  import { loadSessionStore, resolveSessionStoreEntry } from "openclaw/plugin-sdk/session-store-runtime";
8
8
  import { DEFAULT_ACCOUNT_ID, buildChannelConfigSchema, createActionGate, createDedupeCache } from "openclaw/plugin-sdk/core";
9
9
  import { buildAgentMediaPayload } from "openclaw/plugin-sdk/agent-media-payload";
@@ -1,10 +1,10 @@
1
+ import { c as createFeishuApiError, f as isRecord$1, g as requestFeishuApi, s as resolveFeishuRuntimeAccount } from "./accounts-Bpe6CjpS.js";
1
2
  import { i as resolveReceiveIdType, r as normalizeFeishuTarget } from "./targets-BUjQ1TcA.js";
2
- import { c as createFeishuApiError, f as isRecord$1, g as requestFeishuApi, s as resolveFeishuRuntimeAccount } from "./accounts-CXnY5H8g.js";
3
- import { i as toFeishuSendResult, r as resolveFeishuReceiptKind, t as assertFeishuMessageApiSuccess } from "./send-result-DSTSkRDM.js";
3
+ import { i as toFeishuSendResult, r as resolveFeishuReceiptKind, t as assertFeishuMessageApiSuccess } from "./send-result-D9rgEUlm.js";
4
4
  import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.js";
5
5
  import { r as createFeishuClient } from "./client-BhMNZBJD.js";
6
- import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
6
  import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
7
+ import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { convertMarkdownTables } from "openclaw/plugin-sdk/text-chunking";
9
9
  import fs from "node:fs";
10
10
  import path from "node:path";
@@ -583,7 +583,7 @@ function extractMentionTargets(event, botOpenId) {
583
583
  return (event.message.mentions ?? []).filter((m) => {
584
584
  if (isFeishuBroadcastMention(m)) return false;
585
585
  if (botOpenId && m.id.open_id === botOpenId) return false;
586
- return !!m.id.open_id;
586
+ return Boolean(m.id.open_id);
587
587
  }).map((m) => ({
588
588
  openId: m.id.open_id,
589
589
  name: m.name,
@@ -1,4 +1,4 @@
1
- import { f as isRecord } from "./accounts-CXnY5H8g.js";
1
+ import { f as isRecord } from "./accounts-Bpe6CjpS.js";
2
2
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
3
3
  //#region extensions/feishu/src/card-interaction.ts
4
4
  const FEISHU_CARD_INTERACTION_VERSION = "ocf1";
package/dist/setup-api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-BfeesQob.js";
1
+ import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-TXwK9jIG.js";
2
2
  export { feishuPlugin, feishuSetupAdapter, feishuSetupWizard };
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
3
2
  import { r as normalizeFeishuTarget } from "./targets-BUjQ1TcA.js";
4
- import { n as getFeishuThreadBindingManager } from "./thread-bindings-D24m3Cjy.js";
3
+ import { r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
4
+ import { n as getFeishuThreadBindingManager } from "./thread-bindings-C58Uq5Y1.js";
5
5
  import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  //#region extensions/feishu/src/subagent-hooks.ts
7
7
  var subagent_hooks_exports = /* @__PURE__ */ __exportAll({
@@ -1,15 +1,10 @@
1
- import { n as handleFeishuSubagentEnded, r as handleFeishuSubagentSpawning, t as handleFeishuSubagentDeliveryTarget } from "./subagent-hooks-fuyBHOVu.js";
2
1
  //#region extensions/feishu/subagent-hooks-api.ts
3
2
  let feishuSubagentHooksPromise = null;
4
3
  function loadFeishuSubagentHooksModule() {
5
- feishuSubagentHooksPromise ??= import("./subagent-hooks-fuyBHOVu.js").then((n) => n.i);
4
+ feishuSubagentHooksPromise ??= import("./subagent-hooks-Bw3Dg2mS.js").then((n) => n.i);
6
5
  return feishuSubagentHooksPromise;
7
6
  }
8
7
  function registerFeishuSubagentHooks(api) {
9
- api.on("subagent_spawning", async (event, ctx) => {
10
- const { handleFeishuSubagentSpawning } = await loadFeishuSubagentHooksModule();
11
- return await handleFeishuSubagentSpawning(event, ctx);
12
- });
13
8
  api.on("subagent_delivery_target", async (event) => {
14
9
  const { handleFeishuSubagentDeliveryTarget } = await loadFeishuSubagentHooksModule();
15
10
  return handleFeishuSubagentDeliveryTarget(event);
@@ -20,4 +15,4 @@ function registerFeishuSubagentHooks(api) {
20
15
  });
21
16
  }
22
17
  //#endregion
23
- export { handleFeishuSubagentDeliveryTarget, handleFeishuSubagentEnded, handleFeishuSubagentSpawning, registerFeishuSubagentHooks };
18
+ export { registerFeishuSubagentHooks };
@@ -5,33 +5,40 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [v1.1.1](https://github.com/ljharb/es-object-atoms/compare/v1.1.0...v1.1.1) - 2025-01-14
8
+ ## [v1.1.2](https://github.com/es-shims/es-object-atoms/compare/v1.1.1...v1.1.2) - 2026-05-22
9
9
 
10
10
  ### Commits
11
11
 
12
- - [types] `ToObject`: improve types [`cfe8c8a`](https://github.com/ljharb/es-object-atoms/commit/cfe8c8a105c44820cb22e26f62d12ef0ad9715c8)
12
+ - [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `auto-changelog`, `eslint`, `npmignore` [`41e3d94`](https://github.com/es-shims/es-object-atoms/commit/41e3d94f6b49237fa490ec598e068f170c8b161e)
13
+ - [types] improve `isObject` type [`758edc2`](https://github.com/es-shims/es-object-atoms/commit/758edc2280fa6993a294a55957a43cee5951bf51)
13
14
 
14
- ## [v1.1.0](https://github.com/ljharb/es-object-atoms/compare/v1.0.1...v1.1.0) - 2025-01-14
15
+ ## [v1.1.1](https://github.com/es-shims/es-object-atoms/compare/v1.1.0...v1.1.1) - 2025-01-14
15
16
 
16
17
  ### Commits
17
18
 
18
- - [New] add `isObject` [`51e4042`](https://github.com/ljharb/es-object-atoms/commit/51e4042df722eb3165f40dc5f4bf33d0197ecb07)
19
+ - [types] `ToObject`: improve types [`cfe8c8a`](https://github.com/es-shims/es-object-atoms/commit/cfe8c8a105c44820cb22e26f62d12ef0ad9715c8)
19
20
 
20
- ## [v1.0.1](https://github.com/ljharb/es-object-atoms/compare/v1.0.0...v1.0.1) - 2025-01-13
21
+ ## [v1.1.0](https://github.com/es-shims/es-object-atoms/compare/v1.0.1...v1.1.0) - 2025-01-14
21
22
 
22
23
  ### Commits
23
24
 
24
- - [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `auto-changelog`, `tape` [`38ab9eb`](https://github.com/ljharb/es-object-atoms/commit/38ab9eb00b62c2f4668644f5e513d9b414ebd595)
25
- - [types] improve types [`7d1beb8`](https://github.com/ljharb/es-object-atoms/commit/7d1beb887958b78b6a728a210a1c8370ab7e2aa1)
26
- - [Tests] replace `aud` with `npm audit` [`25863ba`](https://github.com/ljharb/es-object-atoms/commit/25863baf99178f1d1ad33d1120498db28631907e)
27
- - [Dev Deps] add missing peer dep [`c012309`](https://github.com/ljharb/es-object-atoms/commit/c0123091287e6132d6f4240496340c427433df28)
25
+ - [New] add `isObject` [`51e4042`](https://github.com/es-shims/es-object-atoms/commit/51e4042df722eb3165f40dc5f4bf33d0197ecb07)
26
+
27
+ ## [v1.0.1](https://github.com/es-shims/es-object-atoms/compare/v1.0.0...v1.0.1) - 2025-01-13
28
+
29
+ ### Commits
30
+
31
+ - [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `auto-changelog`, `tape` [`38ab9eb`](https://github.com/es-shims/es-object-atoms/commit/38ab9eb00b62c2f4668644f5e513d9b414ebd595)
32
+ - [types] improve types [`7d1beb8`](https://github.com/es-shims/es-object-atoms/commit/7d1beb887958b78b6a728a210a1c8370ab7e2aa1)
33
+ - [Tests] replace `aud` with `npm audit` [`25863ba`](https://github.com/es-shims/es-object-atoms/commit/25863baf99178f1d1ad33d1120498db28631907e)
34
+ - [Dev Deps] add missing peer dep [`c012309`](https://github.com/es-shims/es-object-atoms/commit/c0123091287e6132d6f4240496340c427433df28)
28
35
 
29
36
  ## v1.0.0 - 2024-03-16
30
37
 
31
38
  ### Commits
32
39
 
33
- - Initial implementation, tests, readme, types [`f1499db`](https://github.com/ljharb/es-object-atoms/commit/f1499db7d3e1741e64979c61d645ab3137705e82)
34
- - Initial commit [`99eedc7`](https://github.com/ljharb/es-object-atoms/commit/99eedc7b5fde38a50a28d3c8b724706e3e4c5f6a)
35
- - [meta] rename repo [`fc851fa`](https://github.com/ljharb/es-object-atoms/commit/fc851fa70616d2d182aaf0bd02c2ed7084dea8fa)
36
- - npm init [`b909377`](https://github.com/ljharb/es-object-atoms/commit/b909377c50049bd0ec575562d20b0f9ebae8947f)
37
- - Only apps should have lockfiles [`7249edd`](https://github.com/ljharb/es-object-atoms/commit/7249edd2178c1b9ddfc66ffcc6d07fdf0d28efc1)
40
+ - Initial implementation, tests, readme, types [`f1499db`](https://github.com/es-shims/es-object-atoms/commit/f1499db7d3e1741e64979c61d645ab3137705e82)
41
+ - Initial commit [`99eedc7`](https://github.com/es-shims/es-object-atoms/commit/99eedc7b5fde38a50a28d3c8b724706e3e4c5f6a)
42
+ - [meta] rename repo [`fc851fa`](https://github.com/es-shims/es-object-atoms/commit/fc851fa70616d2d182aaf0bd02c2ed7084dea8fa)
43
+ - npm init [`b909377`](https://github.com/es-shims/es-object-atoms/commit/b909377c50049bd0ec575562d20b0f9ebae8947f)
44
+ - Only apps should have lockfiles [`7249edd`](https://github.com/es-shims/es-object-atoms/commit/7249edd2178c1b9ddfc66ffcc6d07fdf0d28efc1)
@@ -1,3 +1,3 @@
1
- declare function isObject(x: unknown): x is object;
1
+ declare function isObject<T>(x: T): x is T & object & Record<PropertyKey, unknown>;
2
2
 
3
3
  export = isObject;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-object-atoms",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "ES Object-related atoms: Object, ToObject, RequireObjectCoercible",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -46,16 +46,15 @@
46
46
  "es-errors": "^1.3.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@ljharb/eslint-config": "^21.1.1",
50
- "@ljharb/tsconfig": "^0.2.3",
49
+ "@ljharb/eslint-config": "^22.2.3",
50
+ "@ljharb/tsconfig": "^0.3.2",
51
51
  "@types/tape": "^5.8.1",
52
- "auto-changelog": "^2.5.0",
52
+ "auto-changelog": "^2.5.1",
53
53
  "eclint": "^2.8.1",
54
- "encoding": "^0.1.13",
55
- "eslint": "^8.8.0",
54
+ "eslint": "^8.57.1",
56
55
  "evalmd": "^0.0.19",
57
56
  "in-publish": "^2.0.1",
58
- "npmignore": "^0.3.1",
57
+ "npmignore": "^0.3.5",
59
58
  "nyc": "^10.3.2",
60
59
  "safe-publish-latest": "^2.0.0",
61
60
  "tape": "^5.9.0",
@@ -2,5 +2,6 @@
2
2
  "extends": "@ljharb/tsconfig",
3
3
  "compilerOptions": {
4
4
  "target": "es5",
5
+ "ignoreDeprecations": "6.0",
5
6
  },
6
7
  }
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [v2.0.4](https://github.com/inspect-js/hasOwn/compare/v2.0.3...v2.0.4) - 2026-05-28
9
+
10
+ ### Commits
11
+
12
+ - [types] drop the dead key-narrowing overload [`fdab00e`](https://github.com/inspect-js/hasOwn/commit/fdab00e2703e65411424e19bf86a7e72a8f10da9)
13
+ - [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `eslint` [`91f6247`](https://github.com/inspect-js/hasOwn/commit/91f624768dd0f7db0d019b89d4d86bd66e20ec30)
14
+
8
15
  ## [v2.0.3](https://github.com/inspect-js/hasOwn/compare/v2.0.2...v2.0.3) - 2026-04-17
9
16
 
10
17
  ### Commits
@@ -1,4 +1,3 @@
1
- declare function hasOwn<O, K extends PropertyKey>(o: O, p: K): p is K & keyof O;
2
1
  declare function hasOwn<O, K extends PropertyKey, V = unknown>(o: O, p: K): o is O & Record<K, V>;
3
2
 
4
3
  export = hasOwn;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hasown",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "A robust, ES3 compatible, \"has own property\" predicate.",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -52,13 +52,12 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@arethetypeswrong/cli": "^0.18.2",
55
- "@ljharb/eslint-config": "^22.2.2",
55
+ "@ljharb/eslint-config": "^22.2.3",
56
56
  "@ljharb/tsconfig": "^0.3.2",
57
57
  "@types/function-bind": "^1.1.10",
58
58
  "@types/tape": "^5.8.1",
59
- "auto-changelog": "^2.5.0",
60
- "encoding": "^0.1.13",
61
- "eslint": "^10.2.0",
59
+ "auto-changelog": "^2.5.1",
60
+ "eslint": "^10.4.0",
62
61
  "evalmd": "^0.0.19",
63
62
  "in-publish": "^2.0.1",
64
63
  "jiti": "^0.0.0",
@@ -164,10 +164,13 @@ export type TExtendsMapping<Input extends [unknown, unknown, unknown, unknown, u
164
164
  export declare function ExtendsMapping(input: [unknown, unknown, unknown, unknown, unknown, unknown] | []): unknown;
165
165
  export type TBaseMapping<Input extends [unknown, unknown, unknown] | unknown> = (Input extends ['(', infer Type extends T.TSchema, ')'] ? Type : Input extends infer Type extends T.TSchema ? Type : never);
166
166
  export declare function BaseMapping(input: [unknown, unknown, unknown] | unknown): unknown;
167
+ export type TWithMapping<Input extends [unknown, unknown] | []> = (Input extends ['with', infer Options extends Record<PropertyKey, unknown>] ? Options : []);
168
+ export declare function WithMapping(input: [unknown, unknown] | []): unknown;
167
169
  type TFactorIndexArray<Type extends T.TSchema, IndexArray extends unknown[]> = (IndexArray extends [infer Left extends T.TSchema[], ...infer Right extends unknown[]] ? (Left extends [infer Indexer extends T.TSchema] ? TFactorIndexArray<C.TIndexDeferred<Type, Indexer>, Right> : Left extends [] ? TFactorIndexArray<T.TArray<Type>, Right> : T.TNever) : Type);
168
170
  type TFactorExtends<Type extends T.TSchema, Extends extends unknown[]> = (Extends extends [infer Right extends T.TSchema, infer True extends T.TSchema, infer False extends T.TSchema] ? C.TConditionalDeferred<Type, Right, True, False> : Type);
169
- export type TFactorMapping<Input extends [unknown, unknown, unknown, unknown]> = (Input extends [infer KeyOf extends boolean, infer Type extends T.TSchema, infer IndexArray extends unknown[], infer Extend extends unknown[]] ? KeyOf extends true ? TFactorExtends<C.TKeyOfDeferred<TFactorIndexArray<Type, IndexArray>>, Extend> : TFactorExtends<TFactorIndexArray<Type, IndexArray>, Extend> : never);
170
- export declare function FactorMapping(input: [unknown, unknown, unknown, unknown]): unknown;
171
+ type TFactorWith<Type extends T.TSchema, With extends unknown> = (With extends Record<PropertyKey, unknown> ? C.TOptionsDeferred<Type, With> : Type);
172
+ export type TFactorMapping<Input extends [unknown, unknown, unknown, unknown, unknown]> = (Input extends [infer KeyOf extends boolean, infer Type extends T.TSchema, infer IndexArray extends unknown[], infer Extend extends unknown[], infer WithClause extends unknown] ? TFactorWith<KeyOf extends true ? TFactorExtends<C.TKeyOfDeferred<TFactorIndexArray<Type, IndexArray>>, Extend> : TFactorExtends<TFactorIndexArray<Type, IndexArray>, Extend>, WithClause> : never);
173
+ export declare function FactorMapping(input: [unknown, unknown, unknown, unknown, unknown]): unknown;
171
174
  type TExprBinaryMapping<Left extends T.TSchema, Rest extends unknown[]> = (Rest extends [infer Operator extends unknown, infer Right extends T.TSchema, infer Next extends unknown[]] ? (TExprBinaryMapping<Right, Next> extends infer Schema extends T.TSchema ? (Operator extends '&' ? (Schema extends T.TIntersect<infer Types extends T.TSchema[]> ? T.TIntersect<[Left, ...Types]> : T.TIntersect<[Left, Schema]>) : Operator extends '|' ? (Schema extends T.TUnion<infer Types extends T.TSchema[]> ? T.TUnion<[Left, ...Types]> : T.TUnion<[Left, Schema]>) : never) : never) : Left);
172
175
  export type TExprTermTailMapping<Input extends [unknown, unknown, unknown] | []> = (Input);
173
176
  export declare function ExprTermTailMapping(input: [unknown, unknown, unknown] | []): unknown;
@@ -185,27 +185,34 @@ export function BaseMapping(input) {
185
185
  ? input[1]
186
186
  : input;
187
187
  }
188
+ export function WithMapping(input) {
189
+ return Guard.IsEqual(input.length, 2) ? input[1] : [];
190
+ }
188
191
  // deno-coverage-ignore-start
189
- // ...
190
- const FactorIndexArray = (Type, indexArray) => {
192
+ function FactorIndexArray(Type, indexArray) {
191
193
  return indexArray.reduce((result, left) => {
192
194
  const _left = left;
193
195
  return (Guard.IsEqual(_left.length, 1) ? C.IndexDeferred(result, _left[0]) :
194
196
  Guard.IsEqual(_left.length, 0) ? T.Array(result) :
195
197
  Unreachable());
196
198
  }, Type);
197
- };
199
+ }
198
200
  // deno-coverage-ignore-stop
199
- const FactorExtends = (type, extend) => {
201
+ function FactorExtends(type, extend) {
200
202
  return Guard.IsEqual(extend.length, 3)
201
203
  ? C.ConditionalDeferred(type, extend[0], extend[1], extend[2])
202
204
  : type;
203
- };
205
+ }
206
+ function FactorWith(type, withClause) {
207
+ return Guard.IsArray(withClause) && Guard.IsEqual(withClause.length, 0)
208
+ ? type
209
+ : C.OptionsDeferred(type, withClause);
210
+ }
204
211
  export function FactorMapping(input) {
205
- const [keyOf, type, indexArray, extend] = input;
206
- return keyOf
212
+ const [keyOf, type, indexArray, extend, withClause] = input;
213
+ return FactorWith(keyOf
207
214
  ? FactorExtends(C.KeyOfDeferred(FactorIndexArray(type, indexArray)), extend)
208
- : FactorExtends(FactorIndexArray(type, indexArray), extend);
215
+ : FactorExtends(FactorIndexArray(type, indexArray), extend), withClause);
209
216
  }
210
217
  // deno-coverage-ignore-start
211
218
  function ExprBinaryMapping(left, rest) {
@@ -43,7 +43,8 @@ export type TIndexArray_0<Input extends string, Result extends unknown[] = []> =
43
43
  export type TIndexArray<Input extends string> = TIndexArray_0<Input> extends [infer _0 extends ([unknown, unknown, unknown] | [unknown, unknown])[], infer Input extends string] ? [S.TIndexArrayMapping<_0>, Input] : [];
44
44
  export type TExtends<Input extends string> = ((Token.TConst<'extends', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'?', Input> extends [infer _2, infer Input extends string] ? (TType<Input> extends [infer _3, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : []) : []) : []) : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExtendsMapping<_0>, Input] : [];
45
45
  export type TBase<Input extends string> = ((Token.TConst<'(', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<')', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : TKeyword<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Object_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TTuple<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TTemplateLiteral<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteral<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TConstructor<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Function_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TMapped<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TOptions<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TGenericCall<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TReference<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | unknown, infer Input extends string] ? [S.TBaseMapping<_0>, Input] : [];
46
- export type TFactor<Input extends string> = (TKeyOf<Input> extends [infer _0, infer Input extends string] ? (TBase<Input> extends [infer _1, infer Input extends string] ? (TIndexArray<Input> extends [infer _2, infer Input extends string] ? (TExtends<Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TFactorMapping<_0>, Input] : [];
46
+ export type TWith<Input extends string> = ((Token.TConst<'with', Input> extends [infer _0, infer Input extends string] ? (TJsonObject<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [], infer Input extends string] ? [S.TWithMapping<_0>, Input] : [];
47
+ export type TFactor<Input extends string> = (TKeyOf<Input> extends [infer _0, infer Input extends string] ? (TBase<Input> extends [infer _1, infer Input extends string] ? (TIndexArray<Input> extends [infer _2, infer Input extends string] ? (TExtends<Input> extends [infer _3, infer Input extends string] ? (TWith<Input> extends [infer _4, infer Input extends string] ? [[_0, _1, _2, _3, _4], Input] : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TFactorMapping<_0>, Input] : [];
47
48
  export type TExprTermTail<Input extends string> = ((Token.TConst<'&', Input> extends [infer _0, infer Input extends string] ? (TFactor<Input> extends [infer _1, infer Input extends string] ? (TExprTermTail<Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExprTermTailMapping<_0>, Input] : [];
48
49
  export type TExprTerm<Input extends string> = (TFactor<Input> extends [infer _0, infer Input extends string] ? (TExprTermTail<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TExprTermMapping<_0>, Input] : [];
49
50
  export type TExprTail<Input extends string> = ((Token.TConst<'|', Input> extends [infer _0, infer Input extends string] ? (TExprTerm<Input> extends [infer _1, infer Input extends string] ? (TExprTail<Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExprTailMapping<_0>, Input] : [];
@@ -172,6 +173,7 @@ export declare const IndexArray_0: (input: string, result?: unknown[]) => [unkno
172
173
  export declare const IndexArray: (input: string) => [unknown, string] | [];
173
174
  export declare const Extends: (input: string) => [unknown, string] | [];
174
175
  export declare const Base: (input: string) => [unknown, string] | [];
176
+ export declare const With: (input: string) => [unknown, string] | [];
175
177
  export declare const Factor: (input: string) => [unknown, string] | [];
176
178
  export declare const ExprTermTail: (input: string) => [unknown, string] | [];
177
179
  export declare const ExprTerm: (input: string) => [unknown, string] | [];
@@ -47,7 +47,8 @@ export const IndexArray_0 = (input, result = []) => If(If(If(Token.Const('[', in
47
47
  export const IndexArray = (input) => If(IndexArray_0(input), ([_0, input]) => [S.IndexArrayMapping(_0), input]);
48
48
  export const Extends = (input) => If(If(If(Token.Const('extends', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('?', input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Token.Const(':', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExtendsMapping(_0), input]);
49
49
  export const Base = (input) => If(If(If(Token.Const('(', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(Keyword(input), ([_0, input]) => [_0, input], () => If(_Object_(input), ([_0, input]) => [_0, input], () => If(Tuple(input), ([_0, input]) => [_0, input], () => If(TemplateLiteral(input), ([_0, input]) => [_0, input], () => If(Literal(input), ([_0, input]) => [_0, input], () => If(Constructor(input), ([_0, input]) => [_0, input], () => If(_Function_(input), ([_0, input]) => [_0, input], () => If(Mapped(input), ([_0, input]) => [_0, input], () => If(Options(input), ([_0, input]) => [_0, input], () => If(GenericCall(input), ([_0, input]) => [_0, input], () => If(Reference(input), ([_0, input]) => [_0, input], () => [])))))))))))), ([_0, input]) => [S.BaseMapping(_0), input]);
50
- export const Factor = (input) => If(If(KeyOf(input), ([_0, input]) => If(Base(input), ([_1, input]) => If(IndexArray(input), ([_2, input]) => If(Extends(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.FactorMapping(_0), input]);
50
+ export const With = (input) => If(If(If(Token.Const('with', input), ([_0, input]) => If(JsonObject(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithMapping(_0), input]);
51
+ export const Factor = (input) => If(If(KeyOf(input), ([_0, input]) => If(Base(input), ([_1, input]) => If(IndexArray(input), ([_2, input]) => If(Extends(input), ([_3, input]) => If(With(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.FactorMapping(_0), input]);
51
52
  export const ExprTermTail = (input) => If(If(If(Token.Const('&', input), ([_0, input]) => If(Factor(input), ([_1, input]) => If(ExprTermTail(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTermTailMapping(_0), input]);
52
53
  export const ExprTerm = (input) => If(If(Factor(input), ([_0, input]) => If(ExprTermTail(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprTermMapping(_0), input]);
53
54
  export const ExprTail = (input) => If(If(If(Token.Const('|', input), ([_0, input]) => If(ExprTerm(input), ([_1, input]) => If(ExprTail(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTailMapping(_0), input]);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typebox",
3
3
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
4
- "version": "1.1.38",
4
+ "version": "1.1.39",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "jsonschema"
@@ -16,22 +16,6 @@
16
16
  "types": "./build/index.d.mts",
17
17
  "module": "./build/index.mjs",
18
18
  "exports": {
19
- "./guard": {
20
- "import": "./build/guard/index.mjs",
21
- "default": "./build/guard/index.mjs"
22
- },
23
- "./error": {
24
- "import": "./build/error/index.mjs",
25
- "default": "./build/error/index.mjs"
26
- },
27
- "./compile": {
28
- "import": "./build/compile/index.mjs",
29
- "default": "./build/compile/index.mjs"
30
- },
31
- "./system": {
32
- "import": "./build/system/index.mjs",
33
- "default": "./build/system/index.mjs"
34
- },
35
19
  "./format": {
36
20
  "import": "./build/format/index.mjs",
37
21
  "default": "./build/format/index.mjs"
@@ -44,10 +28,26 @@
44
28
  "import": "./build/schema/index.mjs",
45
29
  "default": "./build/schema/index.mjs"
46
30
  },
31
+ "./compile": {
32
+ "import": "./build/compile/index.mjs",
33
+ "default": "./build/compile/index.mjs"
34
+ },
47
35
  "./value": {
48
36
  "import": "./build/value/index.mjs",
49
37
  "default": "./build/value/index.mjs"
50
38
  },
39
+ "./guard": {
40
+ "import": "./build/guard/index.mjs",
41
+ "default": "./build/guard/index.mjs"
42
+ },
43
+ "./system": {
44
+ "import": "./build/system/index.mjs",
45
+ "default": "./build/system/index.mjs"
46
+ },
47
+ "./error": {
48
+ "import": "./build/error/index.mjs",
49
+ "default": "./build/error/index.mjs"
50
+ },
51
51
  ".": {
52
52
  "import": "./build/index.mjs",
53
53
  "default": "./build/index.mjs"
@@ -55,18 +55,6 @@
55
55
  },
56
56
  "typesVersions": {
57
57
  "*": {
58
- "guard": [
59
- "./build/guard/index.d.mts"
60
- ],
61
- "error": [
62
- "./build/error/index.d.mts"
63
- ],
64
- "compile": [
65
- "./build/compile/index.d.mts"
66
- ],
67
- "system": [
68
- "./build/system/index.d.mts"
69
- ],
70
58
  "format": [
71
59
  "./build/format/index.d.mts"
72
60
  ],
@@ -76,9 +64,21 @@
76
64
  "schema": [
77
65
  "./build/schema/index.d.mts"
78
66
  ],
67
+ "compile": [
68
+ "./build/compile/index.d.mts"
69
+ ],
79
70
  "value": [
80
71
  "./build/value/index.d.mts"
81
72
  ],
73
+ "guard": [
74
+ "./build/guard/index.d.mts"
75
+ ],
76
+ "system": [
77
+ "./build/system/index.d.mts"
78
+ ],
79
+ "error": [
80
+ "./build/error/index.d.mts"
81
+ ],
82
82
  ".": [
83
83
  "./build/index.d.mts"
84
84
  ]
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@openclaw/feishu",
3
- "version": "2026.5.28",
3
+ "version": "2026.5.31-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/feishu",
9
- "version": "2026.5.28",
9
+ "version": "2026.5.31-beta.1",
10
10
  "dependencies": {
11
11
  "@larksuiteoapi/node-sdk": "1.66.0",
12
- "typebox": "1.1.38",
12
+ "typebox": "1.1.39",
13
13
  "zod": "4.4.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.5.28"
16
+ "openclaw": ">=2026.5.31-beta.1"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -136,9 +136,9 @@
136
136
  }
137
137
  },
138
138
  "node_modules/es-object-atoms": {
139
- "version": "1.1.1",
140
- "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
141
- "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
139
+ "version": "1.1.2",
140
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",
141
+ "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
142
142
  "license": "MIT",
143
143
  "dependencies": {
144
144
  "es-errors": "^1.3.0"
@@ -293,9 +293,9 @@
293
293
  }
294
294
  },
295
295
  "node_modules/hasown": {
296
- "version": "2.0.3",
297
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz",
298
- "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==",
296
+ "version": "2.0.4",
297
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
298
+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
299
299
  "license": "MIT",
300
300
  "dependencies": {
301
301
  "function-bind": "^1.1.2"
@@ -500,9 +500,9 @@
500
500
  }
501
501
  },
502
502
  "node_modules/typebox": {
503
- "version": "1.1.38",
504
- "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.1.38.tgz",
505
- "integrity": "sha512-pZ0aQPmMmXoUvSbeuWf/Hzsc+avNw/Zd6VeE8CFgkVGWyuHPJvqeJJDeJqLve+K70LvjYIoleGcoJHPT17cWoA==",
503
+ "version": "1.1.39",
504
+ "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.1.39.tgz",
505
+ "integrity": "sha512-vj0afVtOfLQvv0GR0VxVagYxsXN64btL7Z9XoaG0ZggH3mruMMkOO6hXdgMsjCY3shZgEvooAWVeznQVs5c43w==",
506
506
  "license": "MIT"
507
507
  },
508
508
  "node_modules/ws": {