@openclaw/matrix 2026.7.2-beta.7 → 2026.8.1-beta.3

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 (92) hide show
  1. package/dist/{account-selection-kqquRzCf.js → account-selection-CWuhuFn1.js} +7 -8
  2. package/dist/{accounts-DfngqebB.js → accounts-BCzyubQt.js} +3 -3
  3. package/dist/api.js +8 -11
  4. package/dist/{approval-handler.runtime-DSeaIsGa.js → approval-handler.runtime-CSvueU9P.js} +7 -6
  5. package/dist/{approval-ids-BdJGPAJT.js → approval-ids-CEcf-EiM.js} +1 -1
  6. package/dist/{approval-reaction-auth-BjOpELxu.js → approval-reaction-auth-CziKXatm.js} +2 -2
  7. package/dist/{approval-reactions-D-BxBK_L.js → approval-reactions-tXh9KYrW.js} +2 -8
  8. package/dist/auth-presence.js +2 -2
  9. package/dist/{channel-vj788dNZ.js → channel-CzQw5OZN.js} +376 -148
  10. package/dist/channel-plugin-api.js +1 -1
  11. package/dist/{channel.runtime-CLoF2S9T.js → channel.runtime-I9pBRQb3.js} +79 -55
  12. package/dist/{config-schema-Djxw3C6b.js → channel.setup-aNaa3Uyn.js} +51 -10
  13. package/dist/{cli-DMqfDE-q.js → cli-iR6QJ5U0.js} +16 -16
  14. package/dist/{cli-metadata-C7D53SND.js → cli-metadata-BmUYWjuM.js} +1 -1
  15. package/dist/cli-metadata.js +1 -1
  16. package/dist/client-BBQdBG7t.js +799 -0
  17. package/dist/{client-6eRENr7k.js → client-D8XghqmX.js} +4 -4
  18. package/dist/{client-bootstrap-XsIkHNt0.js → client-bootstrap-Co3RlItb.js} +25 -61
  19. package/dist/client-support-DLj4vDeu.js +93 -0
  20. package/dist/config-update-Bor_Pjsv.js +150 -0
  21. package/dist/contract-api.js +2 -2
  22. package/dist/{credentials-W2EmwRhu.js → credentials-BdAaWuiR.js} +2 -1
  23. package/dist/credentials-read-B37cQknZ.js +51 -0
  24. package/dist/credentials-state-B3cuUFwZ.js +27 -0
  25. package/dist/{credentials-write.runtime-Be9zNSUw.js → credentials-write.runtime-nAV2-5uR.js} +1 -1
  26. package/dist/{crypto-runtime-D9_6J5tZ.js → crypto-runtime-Bnz3zEcS.js} +55 -32
  27. package/dist/direct-room-RinHjtqX.js +71 -0
  28. package/dist/{directory-live-C8dVBiCc.js → directory-live-DLQzel12.js} +2 -3
  29. package/dist/{doctor-CM8ijNpW.js → doctor-EWf9CDso.js} +2 -2
  30. package/dist/{doctor-contract-BMSJkkAE.js → doctor-contract-DEt4O4Zt.js} +2 -3
  31. package/dist/doctor-contract-api.js +209 -91
  32. package/dist/{draft-stream-CtvOXq0Z.js → draft-stream-DQ7QNC-l.js} +20 -23
  33. package/dist/{encryption-guidance-CbEFe38F.js → encryption-guidance-DmLY8NiO.js} +1 -1
  34. package/dist/{env-auth-CQsYbz-p.js → env-auth-MVS-Vv41.js} +4 -3
  35. package/dist/{env-vars-B0NxQnPk.js → env-vars-dGqak9dN.js} +1 -1
  36. package/dist/{errors-C47hvAF8.js → errors-DKVS3_DO.js} +2 -5
  37. package/dist/{file-sync-store-DiiFsayX.js → file-sync-store-DjskBX2o.js} +24 -3
  38. package/dist/helper-api.js +2 -2
  39. package/dist/{idb-persistence-B6x7dMsF.js → idb-persistence-BM0P27Zg.js} +3 -2
  40. package/dist/{inbound-dedupe-CaBLblef.js → inbound-dedupe-RvSLqdsz.js} +2 -2
  41. package/dist/index.js +1 -1
  42. package/dist/{logger-D0GCSDQq.js → logger-B_71hN6W.js} +1 -1
  43. package/dist/{logging-DV-p52N0.js → logging-DRjvUOIh.js} +1 -1
  44. package/dist/{media-text-BTwzADS_.js → media-text-Dh-DpTc3.js} +4 -1
  45. package/dist/{messages-DxQJkhxs.js → messages-DEqg7HVy.js} +31 -11
  46. package/dist/{monitor-VyWlSLwo.js → monitor-FNrfkuWL.js} +413 -405
  47. package/dist/plugin-entry.handlers.runtime.js +3 -3
  48. package/dist/probe.runtime-NIJZYqc2.js +2 -0
  49. package/dist/profile-D-Wubo0A.js +108 -0
  50. package/dist/{profile-update-CffmyW_4.js → profile-update-BQlE5s2J.js} +3 -2
  51. package/dist/{reaction-events-B00WSi98.js → reaction-events-BKOLlnCo.js} +10 -7
  52. package/dist/{recovery-key-store-BNnHvXdk.js → recovery-key-store-CognuDys.js} +5 -4
  53. package/dist/{resolve-targets-nm2L48sh.js → resolve-targets-e7AI0P75.js} +2 -2
  54. package/dist/{resolver.runtime-DS6uPaEe.js → resolver.runtime-V8u0pHEb.js} +1 -1
  55. package/dist/{room-info-CAFZ3Z9J.js → room-info-BXQA7y10.js} +12 -3
  56. package/dist/runtime-api.js +7 -4
  57. package/dist/{sdk-bUytQHx7.js → sdk-NxK3vzMa.js} +242 -119
  58. package/dist/{secret-contract-M3hRmGO-.js → secret-contract-CufozuyJ.js} +1 -1
  59. package/dist/secret-contract-api.js +1 -1
  60. package/dist/{send-BldGYG8g.js → send-ClHgDZLT.js} +1477 -1210
  61. package/dist/session-binding-contract-api.js +2 -3
  62. package/dist/{setup-bootstrap-Deleiibz.js → setup-bootstrap-BGPjbA5N.js} +4 -4
  63. package/dist/{setup-core-BVfBv2ai.js → setup-core-DigrLebY.js} +17 -266
  64. package/dist/setup-plugin-api.js +1 -44
  65. package/dist/{setup-surface-BBq3WeqX.js → setup-surface-Dtn8sAWs.js} +15 -16
  66. package/dist/{startup-verification-wm3_i88s.js → startup-verification-Cs08ca8u.js} +3 -3
  67. package/dist/{storage-BvAkgzvT.js → storage-BsGuHngK.js} +3 -3
  68. package/dist/subagent-hooks-CMoZaARG.js +48 -0
  69. package/dist/subagent-hooks-api.js +1 -1
  70. package/dist/{target-ids-B-5aQxwn.js → target-ids-Nwx7cMVE.js} +11 -1
  71. package/dist/{thread-binding-api-DRbBZlhS.js → thread-binding-api-CzkeLZCU.js} +1 -1
  72. package/dist/thread-binding-api.js +1 -1
  73. package/dist/{thread-bindings-DGbl3vDW.js → thread-bindings-BYEGfw3h.js} +17 -10
  74. package/dist/thread-bindings-runtime.js +1 -1
  75. package/dist/{thread-bindings-shared-CKnY4LSd.js → thread-bindings-shared-oNPiyMWY.js} +1 -6
  76. package/dist/{tool-actions.runtime-uu9blSqO.js → tool-actions.runtime-ck6IJyP0.js} +36 -19
  77. package/dist/{verification-DYMQ1QpI.js → verification-CabtBTtB.js} +2 -2
  78. package/openclaw.plugin.json +61 -1
  79. package/package.json +4 -4
  80. package/dist/active-client-DXvz2gCo.js +0 -20
  81. package/dist/client-Dbso3-0V.js +0 -30
  82. package/dist/create-client-BmSU-q-D.js +0 -61
  83. package/dist/credentials-read-DVmFCm7X.js +0 -77
  84. package/dist/exec-approval-resolver-BCgqRtZS.js +0 -16
  85. package/dist/preflight-audio.runtime-BZxxQsxY.js +0 -11
  86. package/dist/probe.runtime-BuieqmS3.js +0 -3
  87. package/dist/record-shared-CWWx6fvI.js +0 -2
  88. package/dist/route-DY6at4qJ.js +0 -161
  89. package/dist/shared-CUMWxcMz.js +0 -673
  90. package/dist/subagent-hooks-dkPAF6Et.js +0 -143
  91. package/dist/sync-state-CWbp0QSY.js +0 -12
  92. package/dist/{runtime-api-D1xI_cvh.js → runtime-api-BGO16Fu8.js} +3 -3
@@ -1,161 +0,0 @@
1
- import { n as MATRIX_REACTION_EVENT_TYPE } from "./reaction-common-DkrQdBSZ.js";
2
- import { buildAgentSessionKey, deriveLastRoutePolicy, resolveAgentIdFromSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
3
- import { resolveConfiguredAcpBindingRecord } from "openclaw/plugin-sdk/acp-binding-resolve-runtime";
4
- import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
5
- //#region extensions/matrix/src/matrix/monitor/types.ts
6
- const EventType = {
7
- RoomMessage: "m.room.message",
8
- RoomMessageEncrypted: "m.room.encrypted",
9
- RoomMember: "m.room.member",
10
- Location: "m.location",
11
- Reaction: MATRIX_REACTION_EVENT_TYPE
12
- };
13
- const RelationType = {
14
- Replace: "m.replace",
15
- Thread: "m.thread"
16
- };
17
- //#endregion
18
- //#region extensions/matrix/src/matrix/monitor/threads.ts
19
- function resolveMatrixThreadSessionKeys(params) {
20
- return resolveThreadSessionKeys({
21
- ...params,
22
- normalizeThreadId: (threadId) => threadId
23
- });
24
- }
25
- function resolveMatrixRelatedReplyToEventId(relates) {
26
- if (!relates || typeof relates !== "object") return;
27
- if ("m.in_reply_to" in relates && typeof relates["m.in_reply_to"] === "object" && relates["m.in_reply_to"] && "event_id" in relates["m.in_reply_to"] && typeof relates["m.in_reply_to"].event_id === "string") return relates["m.in_reply_to"].event_id;
28
- }
29
- function resolveMatrixThreadRouting(params) {
30
- const effectiveThreadReplies = params.isDirectMessage && params.dmThreadReplies !== void 0 ? params.dmThreadReplies : params.threadReplies;
31
- const messageId = params.messageId.trim();
32
- const threadRootId = params.threadRootId?.trim();
33
- const inboundThreadId = threadRootId && threadRootId !== messageId ? threadRootId : void 0;
34
- return { threadId: effectiveThreadReplies === "off" ? void 0 : effectiveThreadReplies === "inbound" ? inboundThreadId : inboundThreadId ?? (messageId || void 0) };
35
- }
36
- function resolveMatrixThreadRootId(params) {
37
- const relates = params.content["m.relates_to"];
38
- if (!relates || typeof relates !== "object") return;
39
- if ("rel_type" in relates && relates.rel_type === RelationType.Thread) {
40
- if ("event_id" in relates && typeof relates.event_id === "string") return relates.event_id;
41
- return resolveMatrixRelatedReplyToEventId(relates);
42
- }
43
- }
44
- function resolveMatrixReplyToEventId(content) {
45
- return resolveMatrixRelatedReplyToEventId(content["m.relates_to"]);
46
- }
47
- //#endregion
48
- //#region extensions/matrix/src/matrix/monitor/route.ts
49
- function resolveMatrixDmSessionKey(params) {
50
- if (params.dmSessionScope !== "per-room") return params.fallbackSessionKey;
51
- return buildAgentSessionKey({
52
- agentId: params.agentId,
53
- channel: "matrix",
54
- accountId: params.accountId,
55
- peer: {
56
- kind: "channel",
57
- id: params.roomId
58
- }
59
- });
60
- }
61
- function shouldApplyMatrixPerRoomDmSessionScope(params) {
62
- return params.isDirectMessage && !params.configuredSessionKey;
63
- }
64
- function resolveMatrixInboundRoute(params) {
65
- const baseRoute = params.resolveAgentRoute({
66
- cfg: params.cfg,
67
- channel: "matrix",
68
- accountId: params.accountId,
69
- peer: {
70
- kind: params.isDirectMessage ? "direct" : "channel",
71
- id: params.isDirectMessage ? params.senderId : params.roomId
72
- },
73
- parentPeer: params.isDirectMessage ? {
74
- kind: "channel",
75
- id: params.roomId
76
- } : void 0
77
- });
78
- const bindingConversationId = params.threadId ?? params.roomId;
79
- const bindingParentConversationId = params.threadId ? params.roomId : void 0;
80
- const runtimeBinding = getSessionBindingService().resolveByConversation({
81
- channel: "matrix",
82
- accountId: params.accountId,
83
- conversationId: bindingConversationId,
84
- parentConversationId: bindingParentConversationId
85
- });
86
- const boundSessionKey = runtimeBinding?.targetSessionKey?.trim();
87
- if (runtimeBinding && boundSessionKey) return {
88
- route: {
89
- ...baseRoute,
90
- sessionKey: boundSessionKey,
91
- agentId: resolveAgentIdFromSessionKey(boundSessionKey) || baseRoute.agentId,
92
- lastRoutePolicy: deriveLastRoutePolicy({
93
- sessionKey: boundSessionKey,
94
- mainSessionKey: baseRoute.mainSessionKey
95
- }),
96
- matchedBy: "binding.channel"
97
- },
98
- configuredBinding: null,
99
- runtimeBindingId: runtimeBinding.bindingId
100
- };
101
- const configuredBinding = runtimeBinding == null ? resolveConfiguredAcpBindingRecord({
102
- cfg: params.cfg,
103
- channel: "matrix",
104
- accountId: params.accountId,
105
- conversationId: bindingConversationId,
106
- parentConversationId: bindingParentConversationId
107
- }) : null;
108
- const configuredSessionKey = configuredBinding?.record.targetSessionKey?.trim();
109
- const effectiveRoute = configuredBinding && configuredSessionKey ? {
110
- ...baseRoute,
111
- sessionKey: configuredSessionKey,
112
- agentId: resolveAgentIdFromSessionKey(configuredSessionKey) || configuredBinding.spec.agentId || baseRoute.agentId,
113
- lastRoutePolicy: deriveLastRoutePolicy({
114
- sessionKey: configuredSessionKey,
115
- mainSessionKey: baseRoute.mainSessionKey
116
- }),
117
- matchedBy: "binding.channel"
118
- } : baseRoute;
119
- const dmSessionKey = shouldApplyMatrixPerRoomDmSessionScope({
120
- isDirectMessage: params.isDirectMessage,
121
- configuredSessionKey
122
- }) ? resolveMatrixDmSessionKey({
123
- accountId: params.accountId,
124
- agentId: effectiveRoute.agentId,
125
- roomId: params.roomId,
126
- dmSessionScope: params.dmSessionScope,
127
- fallbackSessionKey: effectiveRoute.sessionKey
128
- }) : effectiveRoute.sessionKey;
129
- const routeWithDmScope = dmSessionKey === effectiveRoute.sessionKey ? effectiveRoute : {
130
- ...effectiveRoute,
131
- sessionKey: dmSessionKey,
132
- lastRoutePolicy: "session"
133
- };
134
- if (!configuredBinding && !configuredSessionKey && params.threadId) {
135
- const threadKeys = resolveMatrixThreadSessionKeys({
136
- baseSessionKey: routeWithDmScope.sessionKey,
137
- threadId: params.threadId,
138
- parentSessionKey: routeWithDmScope.sessionKey
139
- });
140
- return {
141
- route: {
142
- ...routeWithDmScope,
143
- sessionKey: threadKeys.sessionKey,
144
- mainSessionKey: threadKeys.parentSessionKey ?? routeWithDmScope.sessionKey,
145
- lastRoutePolicy: deriveLastRoutePolicy({
146
- sessionKey: threadKeys.sessionKey,
147
- mainSessionKey: threadKeys.parentSessionKey ?? routeWithDmScope.sessionKey
148
- })
149
- },
150
- configuredBinding,
151
- runtimeBindingId: null
152
- };
153
- }
154
- return {
155
- route: routeWithDmScope,
156
- configuredBinding,
157
- runtimeBindingId: null
158
- };
159
- }
160
- //#endregion
161
- export { EventType as a, resolveMatrixThreadRouting as i, resolveMatrixReplyToEventId as n, RelationType as o, resolveMatrixThreadRootId as r, resolveMatrixInboundRoute as t };