@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.
- package/dist/{account-selection-kqquRzCf.js → account-selection-CWuhuFn1.js} +7 -8
- package/dist/{accounts-DfngqebB.js → accounts-BCzyubQt.js} +3 -3
- package/dist/api.js +8 -11
- package/dist/{approval-handler.runtime-DSeaIsGa.js → approval-handler.runtime-CSvueU9P.js} +7 -6
- package/dist/{approval-ids-BdJGPAJT.js → approval-ids-CEcf-EiM.js} +1 -1
- package/dist/{approval-reaction-auth-BjOpELxu.js → approval-reaction-auth-CziKXatm.js} +2 -2
- package/dist/{approval-reactions-D-BxBK_L.js → approval-reactions-tXh9KYrW.js} +2 -8
- package/dist/auth-presence.js +2 -2
- package/dist/{channel-vj788dNZ.js → channel-CzQw5OZN.js} +376 -148
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-CLoF2S9T.js → channel.runtime-I9pBRQb3.js} +79 -55
- package/dist/{config-schema-Djxw3C6b.js → channel.setup-aNaa3Uyn.js} +51 -10
- package/dist/{cli-DMqfDE-q.js → cli-iR6QJ5U0.js} +16 -16
- package/dist/{cli-metadata-C7D53SND.js → cli-metadata-BmUYWjuM.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/client-BBQdBG7t.js +799 -0
- package/dist/{client-6eRENr7k.js → client-D8XghqmX.js} +4 -4
- package/dist/{client-bootstrap-XsIkHNt0.js → client-bootstrap-Co3RlItb.js} +25 -61
- package/dist/client-support-DLj4vDeu.js +93 -0
- package/dist/config-update-Bor_Pjsv.js +150 -0
- package/dist/contract-api.js +2 -2
- package/dist/{credentials-W2EmwRhu.js → credentials-BdAaWuiR.js} +2 -1
- package/dist/credentials-read-B37cQknZ.js +51 -0
- package/dist/credentials-state-B3cuUFwZ.js +27 -0
- package/dist/{credentials-write.runtime-Be9zNSUw.js → credentials-write.runtime-nAV2-5uR.js} +1 -1
- package/dist/{crypto-runtime-D9_6J5tZ.js → crypto-runtime-Bnz3zEcS.js} +55 -32
- package/dist/direct-room-RinHjtqX.js +71 -0
- package/dist/{directory-live-C8dVBiCc.js → directory-live-DLQzel12.js} +2 -3
- package/dist/{doctor-CM8ijNpW.js → doctor-EWf9CDso.js} +2 -2
- package/dist/{doctor-contract-BMSJkkAE.js → doctor-contract-DEt4O4Zt.js} +2 -3
- package/dist/doctor-contract-api.js +209 -91
- package/dist/{draft-stream-CtvOXq0Z.js → draft-stream-DQ7QNC-l.js} +20 -23
- package/dist/{encryption-guidance-CbEFe38F.js → encryption-guidance-DmLY8NiO.js} +1 -1
- package/dist/{env-auth-CQsYbz-p.js → env-auth-MVS-Vv41.js} +4 -3
- package/dist/{env-vars-B0NxQnPk.js → env-vars-dGqak9dN.js} +1 -1
- package/dist/{errors-C47hvAF8.js → errors-DKVS3_DO.js} +2 -5
- package/dist/{file-sync-store-DiiFsayX.js → file-sync-store-DjskBX2o.js} +24 -3
- package/dist/helper-api.js +2 -2
- package/dist/{idb-persistence-B6x7dMsF.js → idb-persistence-BM0P27Zg.js} +3 -2
- package/dist/{inbound-dedupe-CaBLblef.js → inbound-dedupe-RvSLqdsz.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{logger-D0GCSDQq.js → logger-B_71hN6W.js} +1 -1
- package/dist/{logging-DV-p52N0.js → logging-DRjvUOIh.js} +1 -1
- package/dist/{media-text-BTwzADS_.js → media-text-Dh-DpTc3.js} +4 -1
- package/dist/{messages-DxQJkhxs.js → messages-DEqg7HVy.js} +31 -11
- package/dist/{monitor-VyWlSLwo.js → monitor-FNrfkuWL.js} +413 -405
- package/dist/plugin-entry.handlers.runtime.js +3 -3
- package/dist/probe.runtime-NIJZYqc2.js +2 -0
- package/dist/profile-D-Wubo0A.js +108 -0
- package/dist/{profile-update-CffmyW_4.js → profile-update-BQlE5s2J.js} +3 -2
- package/dist/{reaction-events-B00WSi98.js → reaction-events-BKOLlnCo.js} +10 -7
- package/dist/{recovery-key-store-BNnHvXdk.js → recovery-key-store-CognuDys.js} +5 -4
- package/dist/{resolve-targets-nm2L48sh.js → resolve-targets-e7AI0P75.js} +2 -2
- package/dist/{resolver.runtime-DS6uPaEe.js → resolver.runtime-V8u0pHEb.js} +1 -1
- package/dist/{room-info-CAFZ3Z9J.js → room-info-BXQA7y10.js} +12 -3
- package/dist/runtime-api.js +7 -4
- package/dist/{sdk-bUytQHx7.js → sdk-NxK3vzMa.js} +242 -119
- package/dist/{secret-contract-M3hRmGO-.js → secret-contract-CufozuyJ.js} +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/{send-BldGYG8g.js → send-ClHgDZLT.js} +1477 -1210
- package/dist/session-binding-contract-api.js +2 -3
- package/dist/{setup-bootstrap-Deleiibz.js → setup-bootstrap-BGPjbA5N.js} +4 -4
- package/dist/{setup-core-BVfBv2ai.js → setup-core-DigrLebY.js} +17 -266
- package/dist/setup-plugin-api.js +1 -44
- package/dist/{setup-surface-BBq3WeqX.js → setup-surface-Dtn8sAWs.js} +15 -16
- package/dist/{startup-verification-wm3_i88s.js → startup-verification-Cs08ca8u.js} +3 -3
- package/dist/{storage-BvAkgzvT.js → storage-BsGuHngK.js} +3 -3
- package/dist/subagent-hooks-CMoZaARG.js +48 -0
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{target-ids-B-5aQxwn.js → target-ids-Nwx7cMVE.js} +11 -1
- package/dist/{thread-binding-api-DRbBZlhS.js → thread-binding-api-CzkeLZCU.js} +1 -1
- package/dist/thread-binding-api.js +1 -1
- package/dist/{thread-bindings-DGbl3vDW.js → thread-bindings-BYEGfw3h.js} +17 -10
- package/dist/thread-bindings-runtime.js +1 -1
- package/dist/{thread-bindings-shared-CKnY4LSd.js → thread-bindings-shared-oNPiyMWY.js} +1 -6
- package/dist/{tool-actions.runtime-uu9blSqO.js → tool-actions.runtime-ck6IJyP0.js} +36 -19
- package/dist/{verification-DYMQ1QpI.js → verification-CabtBTtB.js} +2 -2
- package/openclaw.plugin.json +61 -1
- package/package.json +4 -4
- package/dist/active-client-DXvz2gCo.js +0 -20
- package/dist/client-Dbso3-0V.js +0 -30
- package/dist/create-client-BmSU-q-D.js +0 -61
- package/dist/credentials-read-DVmFCm7X.js +0 -77
- package/dist/exec-approval-resolver-BCgqRtZS.js +0 -16
- package/dist/preflight-audio.runtime-BZxxQsxY.js +0 -11
- package/dist/probe.runtime-BuieqmS3.js +0 -3
- package/dist/record-shared-CWWx6fvI.js +0 -2
- package/dist/route-DY6at4qJ.js +0 -161
- package/dist/shared-CUMWxcMz.js +0 -673
- package/dist/subagent-hooks-dkPAF6Et.js +0 -143
- package/dist/sync-state-CWbp0QSY.js +0 -12
- package/dist/{runtime-api-D1xI_cvh.js → runtime-api-BGO16Fu8.js} +3 -3
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { a as resolveMatrixTargetIdentity } from "./target-ids-B-5aQxwn.js";
|
|
2
|
-
import { a as listBindingsForAccount, c as resolveBindingKey, i as listAllBindings, n as getMatrixThreadBindingManager, o as removeBindingRecord } from "./thread-bindings-shared-CKnY4LSd.js";
|
|
3
|
-
import { formatThreadBindingDisabledError, formatThreadBindingSpawnDisabledError, resolveThreadBindingSpawnPolicy } from "openclaw/plugin-sdk/conversation-runtime";
|
|
4
|
-
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
-
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
6
|
-
import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-binding-runtime";
|
|
7
|
-
//#region extensions/matrix/src/matrix/subagent-hooks.ts
|
|
8
|
-
function summarizeError(err) {
|
|
9
|
-
if (err instanceof Error) return err.message;
|
|
10
|
-
if (typeof err === "string") return err;
|
|
11
|
-
return "error";
|
|
12
|
-
}
|
|
13
|
-
function resolveMatrixBindingThreadId(binding) {
|
|
14
|
-
const { conversationId, parentConversationId } = binding.conversation;
|
|
15
|
-
return parentConversationId && parentConversationId !== conversationId ? conversationId : void 0;
|
|
16
|
-
}
|
|
17
|
-
function resolveMatrixBindingDeliveryOrigin(binding, fallbackAccountId) {
|
|
18
|
-
const boundRoomId = binding.conversation.parentConversationId ?? binding.conversation.conversationId;
|
|
19
|
-
const threadId = resolveMatrixBindingThreadId(binding);
|
|
20
|
-
return {
|
|
21
|
-
channel: "matrix",
|
|
22
|
-
accountId: binding.conversation.accountId ?? fallbackAccountId,
|
|
23
|
-
to: `room:${boundRoomId}`,
|
|
24
|
-
...threadId ? { threadId } : {}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
async function handleMatrixSubagentSpawning(api, event) {
|
|
28
|
-
if (!event.threadRequested) return;
|
|
29
|
-
if (event.requester?.channel?.trim().toLowerCase() !== "matrix") return;
|
|
30
|
-
const accountId = normalizeOptionalString(event.requester?.accountId) || DEFAULT_ACCOUNT_ID;
|
|
31
|
-
const policy = resolveThreadBindingSpawnPolicy({
|
|
32
|
-
cfg: api.config,
|
|
33
|
-
channel: "matrix",
|
|
34
|
-
accountId,
|
|
35
|
-
kind: "subagent"
|
|
36
|
-
});
|
|
37
|
-
if (!policy.enabled) return {
|
|
38
|
-
status: "error",
|
|
39
|
-
error: formatThreadBindingDisabledError({
|
|
40
|
-
channel: policy.channel,
|
|
41
|
-
accountId: policy.accountId,
|
|
42
|
-
kind: "subagent"
|
|
43
|
-
})
|
|
44
|
-
};
|
|
45
|
-
if (!policy.spawnEnabled) return {
|
|
46
|
-
status: "error",
|
|
47
|
-
error: formatThreadBindingSpawnDisabledError({
|
|
48
|
-
channel: policy.channel,
|
|
49
|
-
accountId: policy.accountId,
|
|
50
|
-
kind: "subagent"
|
|
51
|
-
})
|
|
52
|
-
};
|
|
53
|
-
const rawTo = normalizeOptionalString(event.requester?.to) ?? "";
|
|
54
|
-
const matrixTarget = rawTo ? resolveMatrixTargetIdentity(rawTo) : null;
|
|
55
|
-
const roomId = matrixTarget?.kind === "room" ? matrixTarget.id : "";
|
|
56
|
-
if (!roomId) return {
|
|
57
|
-
status: "error",
|
|
58
|
-
error: "Cannot create Matrix thread binding: no room target in spawn request (requester.to must be a Matrix room ID)."
|
|
59
|
-
};
|
|
60
|
-
const bindingService = getSessionBindingService();
|
|
61
|
-
const capabilities = bindingService.getCapabilities({
|
|
62
|
-
channel: "matrix",
|
|
63
|
-
accountId
|
|
64
|
-
});
|
|
65
|
-
if (!capabilities.adapterAvailable || !capabilities.bindSupported) return {
|
|
66
|
-
status: "error",
|
|
67
|
-
error: `No Matrix session binding adapter available for account "${accountId}". Is the Matrix channel running?`
|
|
68
|
-
};
|
|
69
|
-
if (!capabilities.placements.includes("child")) return {
|
|
70
|
-
status: "error",
|
|
71
|
-
error: `Matrix session binding adapter for account "${accountId}" does not support child thread bindings.`
|
|
72
|
-
};
|
|
73
|
-
try {
|
|
74
|
-
return {
|
|
75
|
-
status: "ok",
|
|
76
|
-
threadBindingReady: true,
|
|
77
|
-
deliveryOrigin: resolveMatrixBindingDeliveryOrigin(await bindingService.bind({
|
|
78
|
-
targetSessionKey: event.childSessionKey,
|
|
79
|
-
targetKind: "subagent",
|
|
80
|
-
conversation: {
|
|
81
|
-
channel: "matrix",
|
|
82
|
-
accountId,
|
|
83
|
-
conversationId: roomId
|
|
84
|
-
},
|
|
85
|
-
placement: "child",
|
|
86
|
-
metadata: {
|
|
87
|
-
agentId: event.agentId?.trim() || void 0,
|
|
88
|
-
label: normalizeOptionalString(event.label) || void 0,
|
|
89
|
-
boundBy: "system"
|
|
90
|
-
}
|
|
91
|
-
}), accountId)
|
|
92
|
-
};
|
|
93
|
-
} catch (err) {
|
|
94
|
-
return {
|
|
95
|
-
status: "error",
|
|
96
|
-
error: `Matrix thread bind failed: ${summarizeError(err)}`
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
async function handleMatrixSubagentEnded(event) {
|
|
101
|
-
const accountId = normalizeOptionalString(event.accountId) || void 0;
|
|
102
|
-
const matching = (accountId ? listBindingsForAccount(accountId) : listAllBindings()).filter((entry) => entry.targetSessionKey === event.targetSessionKey && entry.targetKind === "subagent");
|
|
103
|
-
const removedBindingKeys = /* @__PURE__ */ new Set();
|
|
104
|
-
if (event.sendFarewell) {
|
|
105
|
-
const bindingService = getSessionBindingService();
|
|
106
|
-
const reason = normalizeOptionalString(event.reason) || "subagent-ended";
|
|
107
|
-
for (const binding of matching) {
|
|
108
|
-
const bindingId = resolveBindingKey(binding);
|
|
109
|
-
if ((await bindingService.unbind({
|
|
110
|
-
bindingId,
|
|
111
|
-
reason
|
|
112
|
-
})).some((entry) => entry.bindingId === bindingId)) removedBindingKeys.add(bindingId);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
const affectedAccountIds = /* @__PURE__ */ new Set();
|
|
116
|
-
for (const binding of matching) {
|
|
117
|
-
if (removedBindingKeys.has(resolveBindingKey(binding))) continue;
|
|
118
|
-
if (removeBindingRecord(binding)) affectedAccountIds.add(binding.accountId);
|
|
119
|
-
}
|
|
120
|
-
for (const acctId of affectedAccountIds) await getMatrixThreadBindingManager(acctId)?.persist();
|
|
121
|
-
}
|
|
122
|
-
function handleMatrixSubagentDeliveryTarget(event) {
|
|
123
|
-
if (!event.expectsCompletionMessage) return;
|
|
124
|
-
if (event.requesterOrigin?.channel?.trim().toLowerCase() !== "matrix") return;
|
|
125
|
-
const requesterAccountId = normalizeOptionalString(event.requesterOrigin?.accountId);
|
|
126
|
-
const requesterThreadId = event.requesterOrigin?.threadId != null && event.requesterOrigin.threadId !== "" ? String(event.requesterOrigin.threadId).trim() : "";
|
|
127
|
-
const bindings = (requesterAccountId ? listBindingsForAccount(requesterAccountId) : listAllBindings()).filter((entry) => entry.targetSessionKey === event.childSessionKey && entry.targetKind === "subagent");
|
|
128
|
-
if (bindings.length === 0) return;
|
|
129
|
-
let binding;
|
|
130
|
-
if (requesterThreadId) binding = bindings.find((entry) => entry.conversationId === requesterThreadId && (!requesterAccountId || entry.accountId === requesterAccountId));
|
|
131
|
-
if (!binding && bindings.length === 1) binding = bindings[0];
|
|
132
|
-
if (!binding) return;
|
|
133
|
-
const roomId = binding.parentConversationId ?? binding.conversationId;
|
|
134
|
-
const threadId = binding.parentConversationId && binding.parentConversationId !== binding.conversationId ? binding.conversationId : void 0;
|
|
135
|
-
return { origin: {
|
|
136
|
-
channel: "matrix",
|
|
137
|
-
accountId: binding.accountId,
|
|
138
|
-
to: `room:${roomId}`,
|
|
139
|
-
...threadId ? { threadId } : {}
|
|
140
|
-
} };
|
|
141
|
-
}
|
|
142
|
-
//#endregion
|
|
143
|
-
export { handleMatrixSubagentDeliveryTarget, handleMatrixSubagentEnded, handleMatrixSubagentSpawning };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
//#region extensions/matrix/src/matrix/sync-state.ts
|
|
2
|
-
function isMatrixReadySyncState(state) {
|
|
3
|
-
return state === "PREPARED" || state === "SYNCING" || state === "CATCHUP";
|
|
4
|
-
}
|
|
5
|
-
function isMatrixDisconnectedSyncState(state) {
|
|
6
|
-
return state === "RECONNECTING" || state === "ERROR" || state === "STOPPED";
|
|
7
|
-
}
|
|
8
|
-
function isMatrixTerminalSyncState(state) {
|
|
9
|
-
return state === "STOPPED";
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { isMatrixReadySyncState as n, isMatrixTerminalSyncState as r, isMatrixDisconnectedSyncState as t };
|
|
@@ -4,13 +4,13 @@ import { resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAge
|
|
|
4
4
|
import { chunkTextForOutbound as chunkTextForOutbound$1 } from "openclaw/plugin-sdk/text-chunking";
|
|
5
5
|
import { ToolAuthorizationError as ToolAuthorizationError$1, createActionGate as createActionGate$1, jsonResult, readPositiveIntegerParam as readPositiveIntegerParam$1, readReactionParams, readStringArrayParam, readStringParam as readStringParam$1 } from "openclaw/plugin-sdk/channel-actions";
|
|
6
6
|
import "openclaw/plugin-sdk/account-id";
|
|
7
|
-
import "openclaw/plugin-sdk/routing";
|
|
8
7
|
import "openclaw/plugin-sdk/channel-status";
|
|
9
8
|
import "openclaw/plugin-sdk/channel-config-schema";
|
|
10
|
-
import "openclaw/plugin-sdk/
|
|
9
|
+
import "openclaw/plugin-sdk/setup";
|
|
10
|
+
import "openclaw/plugin-sdk/routing";
|
|
11
11
|
import "openclaw/plugin-sdk/channel-inbound";
|
|
12
12
|
import "openclaw/plugin-sdk/channel-targets";
|
|
13
|
-
import "openclaw/plugin-sdk/
|
|
13
|
+
import "openclaw/plugin-sdk/ssrf-runtime";
|
|
14
14
|
import "openclaw/plugin-sdk/json-store";
|
|
15
15
|
import "openclaw/plugin-sdk/outbound-media";
|
|
16
16
|
import "openclaw/plugin-sdk/poll-runtime";
|