@openclaw/imessage 2026.10.10 → 2026.11.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 (137) hide show
  1. package/dist/.setup/{accounts-BH0coL46.mjs → accounts-C1Ypv3Wn.mjs} +6 -7
  2. package/dist/.setup/{actions-CW7XYYF4.mjs → actions-qOuKy8To.mjs} +360 -108
  3. package/dist/.setup/{actions.runtime-B2ZHQ3TJ.mjs → actions.runtime-Ccg9CARL.mjs} +10 -56
  4. package/dist/.setup/{api-6xi-NBrt.mjs → api-BXXuQQCS.mjs} +7 -7
  5. package/dist/.setup/{api-B0ih8Iof.mjs → api-DTbxSOPc.mjs} +8 -8
  6. package/dist/.setup/{approval-handler.runtime-BKmqba3L.mjs → approval-handler.runtime-B6vrFfZx.mjs} +112 -131
  7. package/dist/.setup/{approval-reactions-B9CJS0NT.mjs → approval-reactions-DBBsqbRC.mjs} +152 -72
  8. package/dist/.setup/{channel-6kcKpSRw.mjs → channel-CLaN4mQn.mjs} +142 -119
  9. package/dist/.setup/{channel.runtime-BW4A0m4h.mjs → channel.runtime-XJGx1MIH.mjs} +205 -363
  10. package/dist/.setup/chat-context-fTfJVqAi.mjs +77 -0
  11. package/dist/.setup/chat-lookup-xtPsOBkl.mjs +50 -0
  12. package/dist/.setup/client-D_BaG8sC.mjs +367 -0
  13. package/dist/.setup/{config-schema-DRkdRC21.mjs → config-schema-BjkQV5P5.mjs} +1 -2
  14. package/dist/.setup/{conversation-bindings-vZFn6sN2.mjs → conversation-bindings-8DjxoIYU.mjs} +9 -6
  15. package/dist/.setup/{media-contract-CoixpXRX.mjs → media-contract-BErFBKV9.mjs} +1 -1
  16. package/dist/.setup/{message-tool-api-CxSY_rh7.mjs → message-tool-api-DtZ1wKbT.mjs} +3 -6
  17. package/dist/.setup/{remote-file-CCgMYZ-u.mjs → remote-file-DpK3GQFD.mjs} +8 -22
  18. package/dist/.setup/{sanitize-outbound-C02fJrn6.mjs → sanitize-outbound-Dhjhz0a-.mjs} +23 -27
  19. package/dist/.setup/{send-D98hQFdv.mjs → send-DhEW0gfe.mjs} +150 -226
  20. package/dist/.setup/{setup-core-BWnW0czE.mjs → setup-core-B1_P_t4T.mjs} +2 -2
  21. package/dist/.setup/{setup-surface-aRZhAzzQ.mjs → setup-surface-CD28mXWK.mjs} +11 -25
  22. package/dist/.setup/{targets-CIx4BKqL.mjs → targets-C7CIWJ0k.mjs} +12 -3
  23. package/dist/.source-module-urls/929c518fa2986b0f85f66bceefead22868db0ab452dee914dc6a2bb86b2e60ad.json +1 -1
  24. package/dist/api.js +8 -8
  25. package/dist/channel-config-api.js +1 -1
  26. package/dist/channel-plugin-api.js +1 -1
  27. package/dist/contract-api.js +1 -1
  28. package/dist/media-contract-api.js +1 -1
  29. package/dist/message-tool-api.js +1 -1
  30. package/dist/runtime-api.js +1 -3
  31. package/dist/session-binding-contract-api.js +1 -1
  32. package/dist/setup-entry.js +1 -1
  33. package/dist/src/chat-db.worker.js +1 -1
  34. package/node_modules/typebox/build/format/duration.d.mts +2 -2
  35. package/node_modules/typebox/build/format/duration.mjs +2 -2
  36. package/node_modules/typebox/build/format/idn_email.d.mts +1 -0
  37. package/node_modules/typebox/build/format/idn_email.mjs +1 -0
  38. package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -1
  39. package/node_modules/typebox/build/format/idn_hostname.mjs +1 -1
  40. package/node_modules/typebox/build/format/ipv4.d.mts +2 -2
  41. package/node_modules/typebox/build/format/ipv4.mjs +2 -2
  42. package/node_modules/typebox/build/format/ipv6.d.mts +1 -1
  43. package/node_modules/typebox/build/format/ipv6.mjs +1 -1
  44. package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
  45. package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
  46. package/node_modules/typebox/build/schema/build.mjs +1 -0
  47. package/node_modules/typebox/build/schema/engine/_unique.d.mts +4 -2
  48. package/node_modules/typebox/build/schema/engine/_unique.mjs +7 -3
  49. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +3 -3
  50. package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +0 -3
  51. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +15 -17
  52. package/node_modules/typebox/build/schema/engine/contains.mjs +3 -3
  53. package/node_modules/typebox/build/schema/engine/index.d.mts +1 -0
  54. package/node_modules/typebox/build/schema/engine/index.mjs +1 -0
  55. package/node_modules/typebox/build/schema/engine/items.mjs +7 -4
  56. package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -2
  57. package/node_modules/typebox/build/schema/engine/minContains.mjs +3 -3
  58. package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
  59. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +2 -2
  60. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -2
  61. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
  62. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
  63. package/node_modules/typebox/build/system/hashing/hash.mjs +63 -34
  64. package/node_modules/typebox/build/system/locale/en_US.mjs +2 -1
  65. package/node_modules/typebox/build/system/memory/assign.d.mts +2 -8
  66. package/node_modules/typebox/build/system/memory/assign.mjs +13 -6
  67. package/node_modules/typebox/build/system/memory/clone.d.mts +4 -5
  68. package/node_modules/typebox/build/system/memory/clone.mjs +8 -96
  69. package/node_modules/typebox/build/system/memory/create.d.mts +1 -5
  70. package/node_modules/typebox/build/system/memory/create.mjs +18 -13
  71. package/node_modules/typebox/build/system/memory/deep.d.mts +2 -0
  72. package/node_modules/typebox/build/system/memory/deep.mjs +108 -0
  73. package/node_modules/typebox/build/system/memory/discard.d.mts +1 -1
  74. package/node_modules/typebox/build/system/memory/discard.mjs +9 -8
  75. package/node_modules/typebox/build/system/memory/finalize.d.mts +4 -0
  76. package/node_modules/typebox/build/system/memory/finalize.mjs +30 -0
  77. package/node_modules/typebox/build/system/memory/keys.d.mts +2 -0
  78. package/node_modules/typebox/build/system/memory/keys.mjs +8 -0
  79. package/node_modules/typebox/build/system/memory/update.d.mts +1 -4
  80. package/node_modules/typebox/build/system/memory/update.mjs +43 -16
  81. package/node_modules/typebox/build/type/engine/call/index.d.mts +1 -0
  82. package/node_modules/typebox/build/type/engine/call/index.mjs +1 -0
  83. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +2 -24
  84. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +2 -29
  85. package/node_modules/typebox/build/type/engine/evaluate/index.d.mts +1 -0
  86. package/node_modules/typebox/build/type/engine/evaluate/index.mjs +1 -0
  87. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +5 -1
  88. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +6 -1
  89. package/node_modules/typebox/build/type/engine/evaluate/property.d.mts +30 -0
  90. package/node_modules/typebox/build/type/engine/evaluate/property.mjs +29 -0
  91. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +1 -3
  92. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +1 -4
  93. package/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +2 -2
  94. package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +2 -2
  95. package/node_modules/typebox/build/type/engine/object/from_union.d.mts +2 -2
  96. package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  97. package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +1 -3
  98. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +1 -4
  99. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +1 -3
  100. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +1 -4
  101. package/node_modules/typebox/build/type/engine/this/index.d.mts +1 -0
  102. package/node_modules/typebox/build/type/engine/this/index.mjs +1 -0
  103. package/node_modules/typebox/build/value/clone/clone.d.mts +4 -3
  104. package/node_modules/typebox/build/value/clone/clone.mjs +5 -7
  105. package/node_modules/typebox/build/value/repair/from_cyclic.d.mts +2 -0
  106. package/node_modules/typebox/build/value/repair/from_cyclic.mjs +6 -0
  107. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +25 -14
  108. package/node_modules/typebox/package.json +1 -1
  109. package/node_modules/typebox/readme.md +1 -1
  110. package/node_modules/zod/package.json +1 -1
  111. package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
  112. package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
  113. package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
  114. package/node_modules/zod/src/v4/core/compile.ts +9 -0
  115. package/node_modules/zod/src/v4/core/schemas.ts +35 -1
  116. package/node_modules/zod/src/v4/core/util.ts +13 -0
  117. package/node_modules/zod/src/v4/core/versions.ts +1 -1
  118. package/node_modules/zod/v4/core/compile.cjs +8 -0
  119. package/node_modules/zod/v4/core/compile.js +8 -0
  120. package/node_modules/zod/v4/core/schemas.cjs +30 -0
  121. package/node_modules/zod/v4/core/schemas.d.cts +3 -1
  122. package/node_modules/zod/v4/core/schemas.d.ts +3 -1
  123. package/node_modules/zod/v4/core/schemas.js +30 -0
  124. package/node_modules/zod/v4/core/util.cjs +15 -0
  125. package/node_modules/zod/v4/core/util.d.cts +2 -0
  126. package/node_modules/zod/v4/core/util.d.ts +2 -0
  127. package/node_modules/zod/v4/core/util.js +14 -0
  128. package/node_modules/zod/v4/core/versions.cjs +1 -1
  129. package/node_modules/zod/v4/core/versions.js +1 -1
  130. package/openclaw.plugin.json +0 -30
  131. package/package.json +6 -6
  132. package/dist/.setup/client-C3e7ZLqA.mjs +0 -739
  133. package/dist/.setup/question-reactions-DTj-VH3N.mjs +0 -67
  134. package/dist/.setup/reaction-context-Bw00FkmU.mjs +0 -105
  135. package/dist/.setup/runtime-BRQCPuAD.mjs +0 -7
  136. package/node_modules/typebox/build/system/memory/freeze.d.mts +0 -4
  137. package/node_modules/typebox/build/system/memory/freeze.mjs +0 -6
@@ -1,67 +0,0 @@
1
- import { t as __exportAll } from "./rolldown-runtime-782esTHO.mjs";
2
- import { i as normalizeIMessageGuid } from "./actions-CW7XYYF4.mjs";
3
- import { t as resolveIMessageReactionContext } from "./reaction-context-Bw00FkmU.mjs";
4
- import { createQuestionReactionTargetStore, questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
5
- // extensions/imessage/src/question-reactions.ts
6
- var question_reactions_exports = /* @__PURE__ */ __exportAll({
7
- hasIMessageQuestionReactionTarget: () => hasIMessageQuestionReactionTarget,
8
- maybeResolveIMessageQuestionReaction: () => maybeResolveIMessageQuestionReaction,
9
- registerIMessageQuestionReactionTargetForDeliveredPayload: () => registerIMessageQuestionReactionTargetForDeliveredPayload
10
- });
11
- function buildKey(identity) {
12
- const account = identity.accountId.trim();
13
- const guid = normalizeIMessageGuid(identity.messageGuid);
14
- return account && guid ? `${account}:${guid}` : null;
15
- }
16
- const questionReactionTargets = createQuestionReactionTargetStore({
17
- channel: "imessage",
18
- channelDisplayName: "iMessage",
19
- buildKey,
20
- registerChannelDelivery: questionGatewayRuntime.registerChannelDelivery,
21
- resolveReaction: questionGatewayRuntime.resolveReaction
22
- });
23
- function resolveQuestionReaction(params) {
24
- const reaction = resolveIMessageReactionContext(params.message, params.bodyText);
25
- if (!reaction || reaction.action !== "added") return null;
26
- const guids = [...new Set((reaction.targetGuids ?? []).map(normalizeIMessageGuid).filter(Boolean))];
27
- if (guids.length === 0) return null;
28
- const optionIndex = questionGatewayRuntime.resolveReactionIndex(reaction.emoji);
29
- return optionIndex === void 0 ? null : {
30
- optionIndex,
31
- identities: guids.map((messageGuid) => ({
32
- accountId: params.accountId,
33
- messageGuid
34
- }))
35
- };
36
- }
37
- function registerIMessageQuestionReactionTargetForDeliveredPayload(params) {
38
- const binding = questionGatewayRuntime.readReactionBinding(params.payload);
39
- if (params.target.channel !== "imessage" || !binding) return false;
40
- let registered = false;
41
- for (const result of params.results) {
42
- if (result.channel !== "imessage") continue;
43
- const guid = typeof result.meta?.imessageMessageGuid === "string" ? result.meta.imessageMessageGuid : result.messageId;
44
- if (/^\d+$/u.test(normalizeIMessageGuid(guid))) continue;
45
- registered = questionReactionTargets.register(binding, {
46
- accountId: params.accountId,
47
- messageGuid: guid
48
- }) || registered;
49
- }
50
- return registered;
51
- }
52
- function hasIMessageQuestionReactionTarget(params) {
53
- const reaction = resolveQuestionReaction(params);
54
- return reaction ? questionReactionTargets.has(reaction.identities) : false;
55
- }
56
- async function maybeResolveIMessageQuestionReaction(params) {
57
- const reaction = resolveQuestionReaction(params);
58
- if (!reaction) return false;
59
- return await questionReactionTargets.resolve({
60
- ...reaction,
61
- cfg: params.cfg,
62
- senderId: params.senderId,
63
- gatewayUrl: params.gatewayUrl,
64
- logDebug: params.logDebug
65
- });
66
- }
67
- export { maybeResolveIMessageQuestionReaction as n, question_reactions_exports as r, hasIMessageQuestionReactionTarget as t };
@@ -1,105 +0,0 @@
1
- import { i as normalizeIMessageGuid } from "./actions-CW7XYYF4.mjs";
2
- // extensions/imessage/src/monitor/reaction-context.ts
3
- const TAPBACK_TEXT_PATTERNS = [
4
- {
5
- prefix: "loved",
6
- action: "added",
7
- emoji: "❤️"
8
- },
9
- {
10
- prefix: "liked",
11
- action: "added",
12
- emoji: "👍"
13
- },
14
- {
15
- prefix: "disliked",
16
- action: "added",
17
- emoji: "👎"
18
- },
19
- {
20
- prefix: "laughed at",
21
- action: "added",
22
- emoji: "😂"
23
- },
24
- {
25
- prefix: "emphasized",
26
- action: "added",
27
- emoji: "‼️"
28
- },
29
- {
30
- prefix: "questioned",
31
- action: "added",
32
- emoji: "❓"
33
- },
34
- {
35
- prefix: "removed a heart from",
36
- action: "removed",
37
- emoji: "❤️"
38
- },
39
- {
40
- prefix: "removed a like from",
41
- action: "removed",
42
- emoji: "👍"
43
- },
44
- {
45
- prefix: "removed a dislike from",
46
- action: "removed",
47
- emoji: "👎"
48
- },
49
- {
50
- prefix: "removed a laugh from",
51
- action: "removed",
52
- emoji: "😂"
53
- },
54
- {
55
- prefix: "removed an emphasis from",
56
- action: "removed",
57
- emoji: "‼️"
58
- },
59
- {
60
- prefix: "removed a question from",
61
- action: "removed",
62
- emoji: "❓"
63
- }
64
- ];
65
- function normalizeReactionValue(value) {
66
- return typeof value === "string" ? normalizeIMessageGuid(value) || void 0 : void 0;
67
- }
68
- function resolveReactionTargetGuidCandidates(...values) {
69
- const candidates = [];
70
- for (const value of values) {
71
- if (typeof value !== "string") continue;
72
- const raw = value.trim();
73
- if (!raw) continue;
74
- const normalized = normalizeIMessageGuid(raw);
75
- for (const candidate of [normalized, raw]) if (candidate && !candidates.includes(candidate)) candidates.push(candidate);
76
- }
77
- return candidates;
78
- }
79
- function resolveTapbackTextContext(bodyText) {
80
- const lower = bodyText.toLowerCase();
81
- for (const pattern of TAPBACK_TEXT_PATTERNS) {
82
- if (!lower.startsWith(pattern.prefix)) continue;
83
- const afterPrefix = bodyText.slice(pattern.prefix.length).trim();
84
- if (!/^(?:"[\s\S]*"|“[\s\S]*”)$/u.test(afterPrefix)) continue;
85
- return {
86
- action: pattern.action,
87
- emoji: pattern.emoji,
88
- targetText: afterPrefix.slice(1, -1).trim()
89
- };
90
- }
91
- return null;
92
- }
93
- function resolveIMessageReactionContext(message, bodyText) {
94
- if (message.is_reaction === true || message.is_tapback === true || typeof message.associated_message_type === "number" && Number.isFinite(message.associated_message_type) && message.associated_message_type >= 2e3 && message.associated_message_type < 4e3) {
95
- const targetGuids = resolveReactionTargetGuidCandidates(message.reacted_to_guid, message.associated_message_guid);
96
- return {
97
- action: message.is_reaction_add === false ? "removed" : "added",
98
- emoji: normalizeReactionValue(message.reaction_emoji) ?? normalizeReactionValue(message.reaction_type) ?? "reaction",
99
- targetGuid: targetGuids[0],
100
- targetGuids
101
- };
102
- }
103
- return resolveTapbackTextContext(bodyText);
104
- }
105
- export { resolveIMessageReactionContext as t };
@@ -1,7 +0,0 @@
1
- import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
2
- // extensions/imessage/src/runtime.ts
3
- const { getRuntime: getIMessageRuntime, setRuntime: setIMessageRuntime, tryGetRuntime: getOptionalIMessageRuntime } = createPluginRuntimeStore({
4
- pluginId: "imessage",
5
- errorMessage: "iMessage runtime not initialized"
6
- });
7
- export { getOptionalIMessageRuntime as n, setIMessageRuntime as r, getIMessageRuntime as t };
@@ -1,4 +0,0 @@
1
- type ObjectLike = Record<PropertyKey, any>;
2
- /** Conditionally freezes the value if `immutableTypes` is true, otherwise no action. */
3
- export declare function Freeze(value: ObjectLike): ObjectLike;
4
- export {};
@@ -1,6 +0,0 @@
1
- // deno-lint-ignore-file no-explicit-any
2
- import { Settings } from '../settings/index.mjs';
3
- /** Conditionally freezes the value if `immutableTypes` is true, otherwise no action. */
4
- export function Freeze(value) {
5
- return Settings.Get().immutableTypes ? Object.freeze(value) : value;
6
- }