@openclaw/matrix 2026.7.2-beta.1 → 2026.7.2-beta.2
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/api.js +4 -4
- package/dist/{approval-handler.runtime--Ei44Vo2.js → approval-handler.runtime-BQZdg_dJ.js} +5 -5
- package/dist/{approval-ids-C_2kSMdJ.js → approval-ids-De4IhOSN.js} +1 -1
- package/dist/{approval-reaction-auth-TdVPcgxP.js → approval-reaction-auth-BLJKPLku.js} +2 -2
- package/dist/{approval-reactions-BgU51JGd.js → approval-reactions-D-BxBK_L.js} +1 -1
- package/dist/{channel-CxqDh7mS.js → channel-B1woOUgk.js} +10 -9
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-wNfJc57I.js → channel.runtime-BvJm9z0w.js} +6 -6
- package/dist/{cli-o00oTJhx.js → cli-CLWOkMvw.js} +16 -13
- package/dist/{cli-metadata-Gf3HSJ2c.js → cli-metadata-9Naf7in0.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-ClHisZbf.js → client-BUai6s29.js} +2 -2
- package/dist/{client-DP0nmFxK.js → client-CPuYbNL8.js} +2 -2
- package/dist/{client-bootstrap-PqYOS-mO.js → client-bootstrap-CNVF73sF.js} +1 -1
- package/dist/{config-schema-CG9goLWp.js → config-schema-BTSatSY3.js} +8 -10
- package/dist/contract-api.js +2 -2
- package/dist/{create-client-D9z9RjCM.js → create-client-85ttAWDP.js} +3 -3
- package/dist/{credentials-DnhsLAuR.js → credentials-CncWUieb.js} +1 -1
- package/dist/{credentials-read-BtS-HRT5.js → credentials-read-CwNJrmwu.js} +1 -1
- package/dist/{credentials-write.runtime-J_EUt5WP.js → credentials-write.runtime-BDtpqvj0.js} +1 -1
- package/dist/{crypto-runtime-BHcxauC4.js → crypto-runtime-DoEB5RpM.js} +3 -3
- package/dist/{directory-live-DPy2aaPF.js → directory-live-0TyS9xep.js} +3 -3
- package/dist/doctor-contract-api.js +4 -4
- package/dist/{draft-stream-De7uikGn.js → draft-stream-GOdPZMBm.js} +1 -1
- package/dist/{file-sync-store-Cxb0ckyX.js → file-sync-store-CUE9WwD2.js} +3 -3
- package/dist/{http-client-W4TJQM6r.js → http-client-Jw5_bwQo.js} +1 -1
- package/dist/{idb-persistence-iUZoHZkp.js → idb-persistence-BiHEEzD7.js} +2 -2
- package/dist/{inbound-dedupe-DcMs0YXL.js → inbound-dedupe-CaBLblef.js} +19 -38
- package/dist/index.js +1 -1
- package/dist/{logger-BMClpI5b.js → logger-D0GCSDQq.js} +1 -1
- package/dist/{logging-CFJrbDAN.js → logging-QH-48Gr6.js} +1 -1
- package/dist/{media-text-DWaotsZB.js → media-text-DPCtdFjk.js} +1 -1
- package/dist/{messages-Dm3K4ZvM.js → messages-DCRbGLMh.js} +3 -3
- package/dist/{monitor-C_kgPPeV.js → monitor-C5EOF9et.js} +67 -66
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/probe.runtime-BBvciVfo.js +3 -0
- package/dist/{profile-update-iUHCoks3.js → profile-update-DompcDyu.js} +3 -3
- package/dist/{reaction-events-0tubdHRM.js → reaction-events-QUgxkQKQ.js} +3 -3
- package/dist/{recovery-key-store-Bx0zTJcB.js → recovery-key-store-B2RglalK.js} +2 -2
- package/dist/{resolve-targets-DlLrfWDy.js → resolve-targets-Cx1VVArA.js} +1 -1
- package/dist/{resolver.runtime-MeaT1zXx.js → resolver.runtime-PPrv3ZHu.js} +1 -1
- package/dist/{runtime-CveSqMOP.js → runtime-6S3DNFNv.js} +1 -1
- package/dist/runtime-api.js +3 -3
- package/dist/runtime-setter-api.js +1 -1
- package/dist/{sdk-CI8E2TKg.js → sdk-1TXuSiXZ.js} +7 -7
- package/dist/{send-C7xuGWpv.js → send-yre1krm8.js} +2 -2
- package/dist/session-binding-contract-api.js +2 -2
- package/dist/{setup-bootstrap-CCsexWTZ.js → setup-bootstrap-DXVRCd4G.js} +2 -2
- package/dist/{setup-core-DlmTyIP0.js → setup-core-CYQRY2oG.js} +2 -2
- package/dist/setup-plugin-api.js +3 -3
- package/dist/{setup-surface-2SS94JV0.js → setup-surface-BjvRQzK6.js} +4 -4
- package/dist/{shared-DgvN5rBx.js → shared-BfW4lxGu.js} +6 -6
- package/dist/{startup-verification-CbIyF7z1.js → startup-verification-DSiyDKM5.js} +2 -2
- package/dist/{storage-BtSOar8T.js → storage-DD-EnNJE.js} +4 -4
- package/dist/{thread-bindings-BI8MHWp9.js → thread-bindings-U5ZroBeZ.js} +3 -3
- package/dist/{tool-actions.runtime-CnyhVPoY.js → tool-actions.runtime-BlfTr9b0.js} +19 -15
- package/dist/{verification-DLSe3sP7.js → verification-CGnI9k1O.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/openclaw.plugin.json +70 -70
- package/package.json +4 -4
- package/dist/probe.runtime-Dry8PTWC.js +0 -3
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig, i as resolveMatrixAccountAllowlistConfig } from "./account-config-BZWN9tGS.js";
|
|
2
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
3
|
-
import { m as resolveConfiguredMatrixBotUserIds } from "./setup-core-
|
|
4
|
-
import { a as buildAllowlistResolutionSummary, c as createTypingCallbacks, d as logInboundDrop, f as logTypingFailure, h as toLocationContext, i as addAllowlistUserEntriesFromConfigEntry, l as formatLocationText, m as summarizeMapping, n as resolveMatrixStoredSessionMeta, o as canonicalizeAllowlistWithResolvedIds, p as patchAllowlistUsersInConfigEntries, r as resolveMatrixRoomConfig, s as createReplyPrefixOptions, u as getAgentScopedMediaLocalRoots } from "./channel-
|
|
5
|
-
import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./config-schema-
|
|
2
|
+
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
3
|
+
import { m as resolveConfiguredMatrixBotUserIds } from "./setup-core-CYQRY2oG.js";
|
|
4
|
+
import { a as buildAllowlistResolutionSummary, c as createTypingCallbacks, d as logInboundDrop, f as logTypingFailure, h as toLocationContext, i as addAllowlistUserEntriesFromConfigEntry, l as formatLocationText, m as summarizeMapping, n as resolveMatrixStoredSessionMeta, o as canonicalizeAllowlistWithResolvedIds, p as patchAllowlistUsersInConfigEntries, r as resolveMatrixRoomConfig, s as createReplyPrefixOptions, u as getAgentScopedMediaLocalRoots } from "./channel-B1woOUgk.js";
|
|
5
|
+
import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./config-schema-BTSatSY3.js";
|
|
6
6
|
import { t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
|
|
7
7
|
import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
8
|
-
import { D as parsePollStartContent, S as formatPollAsText, T as isPollStartType, _ as readJoinedMatrixMembers, a as sendMessageMatrix, f as promoteMatrixDirectRoomCandidate, g as isStrictDirectMembership, h as hasDirectMatrixMemberFlag, t as chunkMatrixText, v as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY, w as isPollEventType } from "./send-
|
|
9
|
-
import { t as createMatrixThreadBindingManager } from "./thread-bindings-
|
|
10
|
-
import { i as createMatrixInboundEventDeduper } from "./inbound-dedupe-
|
|
11
|
-
import { a as resolveMatrixMessageAttachment, c as fetchMatrixPollSnapshot, i as isLikelyBareFilename, n as formatMatrixMediaUnavailableText, o as resolveMatrixMessageBody, r as formatMatrixMessageText, t as formatMatrixMediaTooLargeText } from "./media-text-
|
|
8
|
+
import { D as parsePollStartContent, S as formatPollAsText, T as isPollStartType, _ as readJoinedMatrixMembers, a as sendMessageMatrix, f as promoteMatrixDirectRoomCandidate, g as isStrictDirectMembership, h as hasDirectMatrixMemberFlag, t as chunkMatrixText, v as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY, w as isPollEventType } from "./send-yre1krm8.js";
|
|
9
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-U5ZroBeZ.js";
|
|
10
|
+
import { i as createMatrixInboundEventDeduper } from "./inbound-dedupe-CaBLblef.js";
|
|
11
|
+
import { a as resolveMatrixMessageAttachment, c as fetchMatrixPollSnapshot, i as isLikelyBareFilename, n as formatMatrixMediaUnavailableText, o as resolveMatrixMessageBody, r as formatMatrixMessageText, t as formatMatrixMediaTooLargeText } from "./media-text-DPCtdFjk.js";
|
|
12
12
|
import { n as setActiveMatrixClient } from "./active-client-DXvz2gCo.js";
|
|
13
13
|
import { t as isBunRuntime } from "./runtime-BefyhPWv.js";
|
|
14
|
-
import { d as backfillMatrixAuthDeviceIdAfterStartup, f as resolveMatrixAuth, i as resolveSharedMatrixClient, l as isMatrixStartupAbortError, n as releaseSharedClientInstance, p as resolveMatrixAuthContext, u as throwIfMatrixStartupAborted } from "./shared-
|
|
15
|
-
import "./client-
|
|
16
|
-
import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-
|
|
14
|
+
import { d as backfillMatrixAuthDeviceIdAfterStartup, f as resolveMatrixAuth, i as resolveSharedMatrixClient, l as isMatrixStartupAbortError, n as releaseSharedClientInstance, p as resolveMatrixAuthContext, u as throwIfMatrixStartupAborted } from "./shared-BfW4lxGu.js";
|
|
15
|
+
import "./client-CPuYbNL8.js";
|
|
16
|
+
import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-Jw5_bwQo.js";
|
|
17
17
|
import { d as resolveAllowlistProviderRuntimeGroupPolicy, f as resolveDefaultGroupPolicy, g as warnMissingProviderGroupPolicyFallbackOnce, h as resolveThreadBindingMaxAgeMsForChannel, m as resolveThreadBindingIdleTimeoutMsForChannel, t as GROUP_POLICY_BLOCKED_LABEL } from "./runtime-api-D1xI_cvh.js";
|
|
18
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-
|
|
18
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-Cx1VVArA.js";
|
|
19
19
|
import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-BFfgq7c7.js";
|
|
20
20
|
import { n as isMatrixReadySyncState, r as isMatrixTerminalSyncState, t as isMatrixDisconnectedSyncState } from "./sync-state-CWbp0QSY.js";
|
|
21
21
|
import { a as EventType, i as resolveMatrixThreadRouting, n as resolveMatrixReplyToEventId, o as RelationType, r as resolveMatrixThreadRootId, t as resolveMatrixInboundRoute } from "./route-DY6at4qJ.js";
|
|
@@ -817,7 +817,7 @@ const matrixVerificationConstants = {
|
|
|
817
817
|
const MAX_TRACKED_VERIFICATION_EVENTS = 1024;
|
|
818
818
|
const SAS_NOTICE_RETRY_DELAY_MS = 750;
|
|
819
819
|
const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
|
|
820
|
-
const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./send-
|
|
820
|
+
const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./send-yre1krm8.js").then((n) => n.d), import("./send-yre1krm8.js").then((n) => n.m)]).then(([directManagementModule, directRoomModule]) => ({
|
|
821
821
|
inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
|
|
822
822
|
isStrictDirectRoom: directRoomModule.isStrictDirectRoom
|
|
823
823
|
})));
|
|
@@ -2081,14 +2081,6 @@ function createRoomHistoryTrackerInternal(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE,
|
|
|
2081
2081
|
discarded: true
|
|
2082
2082
|
};
|
|
2083
2083
|
},
|
|
2084
|
-
getPendingHistory(agentId, roomId, limit, threadRootId) {
|
|
2085
|
-
const queue = findScopedQueue(roomId, threadRootId);
|
|
2086
|
-
if (!queue) return [];
|
|
2087
|
-
return computePendingHistory(queue, agentId, roomId, limit, void 0, void 0, threadRootId);
|
|
2088
|
-
},
|
|
2089
|
-
recordTrigger(roomId, entry, threadRootId) {
|
|
2090
|
-
return appendToQueue(getScopedQueue(roomId, threadRootId), entry);
|
|
2091
|
-
},
|
|
2092
2084
|
prepareTrigger(agentId, roomId, limit, entry, threadRootId) {
|
|
2093
2085
|
return prepareTriggerInternal(agentId, roomId, limit, entry, threadRootId);
|
|
2094
2086
|
},
|
|
@@ -2212,11 +2204,11 @@ function createMatrixThreadContextResolver(params) {
|
|
|
2212
2204
|
const ALLOW_FROM_STORE_CACHE_TTL_MS = 3e4;
|
|
2213
2205
|
const PAIRING_REPLY_COOLDOWN_MS = 5 * 6e4;
|
|
2214
2206
|
const MATRIX_TOOL_PROGRESS_MAX_CHARS = 300;
|
|
2215
|
-
const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-
|
|
2207
|
+
const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-yre1krm8.js").then((n) => n.l));
|
|
2216
2208
|
const loadAcpBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/acp-binding-runtime"));
|
|
2217
2209
|
const loadSessionBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/session-binding-runtime"));
|
|
2218
|
-
const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-
|
|
2219
|
-
const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-
|
|
2210
|
+
const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-QUgxkQKQ.js"));
|
|
2211
|
+
const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-GOdPZMBm.js"));
|
|
2220
2212
|
async function matrixTextWouldActivateMentions(client, text) {
|
|
2221
2213
|
const { resolveMatrixMentionsForBody } = await loadMatrixSendModule();
|
|
2222
2214
|
const mentions = await resolveMatrixMentionsForBody({
|
|
@@ -2227,12 +2219,6 @@ async function matrixTextWouldActivateMentions(client, text) {
|
|
|
2227
2219
|
}
|
|
2228
2220
|
const MAX_TRACKED_PAIRING_REPLY_SENDERS = 512;
|
|
2229
2221
|
const MAX_TRACKED_SHARED_DM_CONTEXT_NOTICES = 512;
|
|
2230
|
-
var MatrixRetryableInboundError = class extends Error {
|
|
2231
|
-
constructor(message, options) {
|
|
2232
|
-
super(message, options);
|
|
2233
|
-
this.name = "MatrixRetryableInboundError";
|
|
2234
|
-
}
|
|
2235
|
-
};
|
|
2236
2222
|
async function redactMatrixDraftEvent(client, roomId, draftEventId) {
|
|
2237
2223
|
await client.redactEvent(roomId, draftEventId).catch(() => {});
|
|
2238
2224
|
}
|
|
@@ -2427,7 +2413,7 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
2427
2413
|
};
|
|
2428
2414
|
return async (roomId, event) => {
|
|
2429
2415
|
const eventId = typeof event.event_id === "string" ? event.event_id.trim() : "";
|
|
2430
|
-
let
|
|
2416
|
+
let inboundReplayClaim;
|
|
2431
2417
|
let draftStreamRef;
|
|
2432
2418
|
let draftConsumed = false;
|
|
2433
2419
|
try {
|
|
@@ -2445,12 +2431,9 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
2445
2431
|
const eventTs = event.origin_server_ts;
|
|
2446
2432
|
const eventAge = event.unsigned?.age;
|
|
2447
2433
|
const commitInboundEventIfClaimed = async () => {
|
|
2448
|
-
if (!
|
|
2449
|
-
await
|
|
2450
|
-
|
|
2451
|
-
eventId
|
|
2452
|
-
});
|
|
2453
|
-
claimedInboundEvent = false;
|
|
2434
|
+
if (!inboundReplayClaim) return;
|
|
2435
|
+
await inboundReplayClaim.commit();
|
|
2436
|
+
inboundReplayClaim = void 0;
|
|
2454
2437
|
};
|
|
2455
2438
|
const readIngressPrefix = async () => {
|
|
2456
2439
|
const selfUserId = await client.getUserId();
|
|
@@ -2475,11 +2458,12 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
2475
2458
|
if (relates && "rel_type" in relates && relates.rel_type === RelationType.Replace) return;
|
|
2476
2459
|
if (hasBundledMatrixReplacementRelation(event)) return;
|
|
2477
2460
|
if (eventId && inboundDeduper) {
|
|
2478
|
-
|
|
2461
|
+
const claim = await inboundDeduper.claim({
|
|
2479
2462
|
roomId,
|
|
2480
2463
|
eventId
|
|
2481
2464
|
});
|
|
2482
|
-
if (
|
|
2465
|
+
if (claim.kind === "claimed") inboundReplayClaim = claim.handle;
|
|
2466
|
+
else if (claim.kind !== "invalid") {
|
|
2483
2467
|
logVerboseMessage(`matrix: skip duplicate inbound event room=${roomId} id=${eventId}`);
|
|
2484
2468
|
return;
|
|
2485
2469
|
}
|
|
@@ -3202,7 +3186,6 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3202
3186
|
const mediaLocalRoots = getAgentScopedMediaLocalRoots(cfg, _route.agentId);
|
|
3203
3187
|
let finalReplyDeliveryFailed = false;
|
|
3204
3188
|
let nonFinalReplyDeliveryFailed = false;
|
|
3205
|
-
let retryableReplyDeliveryFailed = false;
|
|
3206
3189
|
const { onModelSelected, ...prefixOptions } = createReplyPrefixOptions({
|
|
3207
3190
|
cfg,
|
|
3208
3191
|
agentId: _route.agentId,
|
|
@@ -3263,16 +3246,20 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3263
3246
|
let currentDraftReplyToId = draftReplyToId;
|
|
3264
3247
|
let previewToolProgressSuppressed = false;
|
|
3265
3248
|
let previewToolProgressLines = [];
|
|
3249
|
+
let latestPlan;
|
|
3250
|
+
let latestPlanExplanation;
|
|
3266
3251
|
const progressConfigEntry = params.accountConfig ?? cfg.channels?.matrix;
|
|
3267
3252
|
const progressSeed = `${_route.accountId}:${roomId}`;
|
|
3268
3253
|
const renderProgressDraft = () => {
|
|
3269
|
-
if (!draftStream
|
|
3254
|
+
if (!draftStream) return;
|
|
3270
3255
|
const previewText = formatChannelProgressDraftText({
|
|
3271
3256
|
entry: progressConfigEntry,
|
|
3272
3257
|
lines: previewToolProgressLines,
|
|
3273
3258
|
seed: progressSeed,
|
|
3274
3259
|
formatLine: formatMatrixToolProgressMarkdownCode,
|
|
3275
|
-
bullet: "-"
|
|
3260
|
+
bullet: "-",
|
|
3261
|
+
narration: latestPlanExplanation,
|
|
3262
|
+
plan: latestPlan
|
|
3276
3263
|
});
|
|
3277
3264
|
if (!previewText) return;
|
|
3278
3265
|
draftStream.update(previewText);
|
|
@@ -3293,7 +3280,9 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3293
3280
|
lines: previewToolProgressLines,
|
|
3294
3281
|
seed: progressSeed,
|
|
3295
3282
|
formatLine: formatMatrixToolProgressMarkdownCode,
|
|
3296
|
-
bullet: "-"
|
|
3283
|
+
bullet: "-",
|
|
3284
|
+
narration: latestPlanExplanation,
|
|
3285
|
+
plan: latestPlan
|
|
3297
3286
|
}));
|
|
3298
3287
|
return;
|
|
3299
3288
|
}
|
|
@@ -3302,14 +3291,30 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3302
3291
|
const progressActive = await progressDraftGate.noteWork();
|
|
3303
3292
|
if ((alreadyStarted || progressActive) && progressDraftGate.hasStarted) renderProgressDraft();
|
|
3304
3293
|
};
|
|
3294
|
+
const pushPlanProgress = async (steps, explanation) => {
|
|
3295
|
+
latestPlan = steps?.length ? steps.map((entry) => ({ ...entry })) : void 0;
|
|
3296
|
+
latestPlanExplanation = explanation?.replace(/\s+/g, " ").trim() || void 0;
|
|
3297
|
+
if (!draftStream || previewToolProgressSuppressed) return;
|
|
3298
|
+
if (!progressDraftStreaming) {
|
|
3299
|
+
renderProgressDraft();
|
|
3300
|
+
return;
|
|
3301
|
+
}
|
|
3302
|
+
const alreadyStarted = progressDraftGate.hasStarted;
|
|
3303
|
+
await progressDraftGate.startNow();
|
|
3304
|
+
if (alreadyStarted && progressDraftGate.hasStarted) renderProgressDraft();
|
|
3305
|
+
};
|
|
3305
3306
|
const suppressPreviewToolProgressForAnswerText = (text) => {
|
|
3306
3307
|
if (!text?.trim()) return;
|
|
3307
3308
|
previewToolProgressSuppressed = true;
|
|
3308
3309
|
previewToolProgressLines = [];
|
|
3310
|
+
latestPlan = void 0;
|
|
3311
|
+
latestPlanExplanation = void 0;
|
|
3309
3312
|
};
|
|
3310
3313
|
const resetPreviewToolProgress = () => {
|
|
3311
3314
|
previewToolProgressSuppressed = false;
|
|
3312
3315
|
previewToolProgressLines = [];
|
|
3316
|
+
latestPlan = void 0;
|
|
3317
|
+
latestPlanExplanation = void 0;
|
|
3313
3318
|
};
|
|
3314
3319
|
const buildPreviewToolProgressReplyOptions = () => {
|
|
3315
3320
|
if (!shouldSuppressDefaultToolProgressMessages) return {};
|
|
@@ -3345,13 +3350,7 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3345
3350
|
},
|
|
3346
3351
|
onPlanUpdate: async (payload) => {
|
|
3347
3352
|
if (payload.phase !== "update") return;
|
|
3348
|
-
await
|
|
3349
|
-
event: "plan",
|
|
3350
|
-
phase: payload.phase,
|
|
3351
|
-
title: payload.title,
|
|
3352
|
-
explanation: payload.explanation,
|
|
3353
|
-
steps: payload.steps
|
|
3354
|
-
}));
|
|
3353
|
+
await pushPlanProgress(payload.planSteps, payload.explanation);
|
|
3355
3354
|
},
|
|
3356
3355
|
onApprovalEvent: async (payload) => {
|
|
3357
3356
|
if (payload.phase !== "requested") return;
|
|
@@ -3427,6 +3426,19 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3427
3426
|
currentDraftBlockOffset = 0;
|
|
3428
3427
|
latestDraftFullText = "";
|
|
3429
3428
|
};
|
|
3429
|
+
const resetDraftDeliveryState = async () => {
|
|
3430
|
+
await draftStream?.discardPending();
|
|
3431
|
+
draftStream?.reset();
|
|
3432
|
+
draftConsumed = false;
|
|
3433
|
+
currentDraftMessageGeneration = 0;
|
|
3434
|
+
currentDraftBlockOffset = 0;
|
|
3435
|
+
latestDraftFullText = "";
|
|
3436
|
+
pendingDraftBoundaries.length = 0;
|
|
3437
|
+
latestQueuedDraftBoundaryOffsets.clear();
|
|
3438
|
+
currentDraftReplyToId = draftReplyToId;
|
|
3439
|
+
progressDraftGate.reset();
|
|
3440
|
+
resetPreviewToolProgress();
|
|
3441
|
+
};
|
|
3430
3442
|
const { dispatcher, replyOptions, markDispatchIdle, markRunComplete } = core.channel.reply.createReplyDispatcherWithTyping({
|
|
3431
3443
|
...prefixOptions,
|
|
3432
3444
|
humanDelay: core.channel.reply.resolveHumanDelayConfig(cfg, _route.agentId),
|
|
@@ -3607,7 +3619,6 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3607
3619
|
});
|
|
3608
3620
|
},
|
|
3609
3621
|
onError: (err, info) => {
|
|
3610
|
-
if (err instanceof MatrixRetryableInboundError) retryableReplyDeliveryFailed = true;
|
|
3611
3622
|
if (info.kind === "final") finalReplyDeliveryFailed = true;
|
|
3612
3623
|
else nonFinalReplyDeliveryFailed = true;
|
|
3613
3624
|
if (info.kind === "block") advanceDraftBlockBoundary({ fallbackToLatestEnd: true });
|
|
@@ -3728,6 +3739,7 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3728
3739
|
resetDraftBlockOffsets();
|
|
3729
3740
|
resetPreviewToolProgress();
|
|
3730
3741
|
} : void 0,
|
|
3742
|
+
onQueuedFollowupAdmitted: draftStream ? resetDraftDeliveryState : void 0,
|
|
3731
3743
|
...buildPreviewToolProgressReplyOptions(),
|
|
3732
3744
|
onModelSelected
|
|
3733
3745
|
}
|
|
@@ -3749,19 +3761,11 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3749
3761
|
const { dispatchResult } = turnResult;
|
|
3750
3762
|
const { queuedFinal, counts } = dispatchResult;
|
|
3751
3763
|
if (finalReplyDeliveryFailed) {
|
|
3752
|
-
if (retryableReplyDeliveryFailed) {
|
|
3753
|
-
logVerboseMessage(`matrix: final reply delivery failed room=${roomId} id=${messageId}; leaving event uncommitted`);
|
|
3754
|
-
return;
|
|
3755
|
-
}
|
|
3756
3764
|
logVerboseMessage(`matrix: final reply delivery failed room=${roomId} id=${messageId}; keeping replay committed`);
|
|
3757
3765
|
await commitInboundEventIfClaimed();
|
|
3758
3766
|
return;
|
|
3759
3767
|
}
|
|
3760
3768
|
if (!queuedFinal && nonFinalReplyDeliveryFailed) {
|
|
3761
|
-
if (retryableReplyDeliveryFailed) {
|
|
3762
|
-
logVerboseMessage(`matrix: non-final reply delivery failed room=${roomId} id=${messageId}; leaving event uncommitted`);
|
|
3763
|
-
return;
|
|
3764
|
-
}
|
|
3765
3769
|
logVerboseMessage(`matrix: non-final reply delivery failed room=${roomId} id=${messageId}; keeping replay committed`);
|
|
3766
3770
|
await commitInboundEventIfClaimed();
|
|
3767
3771
|
return;
|
|
@@ -3784,10 +3788,7 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3784
3788
|
const draftEventId = await draftStreamRef.stop().catch(() => void 0);
|
|
3785
3789
|
if (draftEventId && !draftConsumed) await redactMatrixDraftEvent(client, roomId, draftEventId);
|
|
3786
3790
|
}
|
|
3787
|
-
|
|
3788
|
-
roomId,
|
|
3789
|
-
eventId
|
|
3790
|
-
});
|
|
3791
|
+
inboundReplayClaim?.release();
|
|
3791
3792
|
}
|
|
3792
3793
|
};
|
|
3793
3794
|
}
|
|
@@ -3806,10 +3807,10 @@ function shouldPromoteRecentInviteRoom(params) {
|
|
|
3806
3807
|
//#endregion
|
|
3807
3808
|
//#region extensions/matrix/src/matrix/monitor/startup.ts
|
|
3808
3809
|
const loadMatrixStartupMaintenanceDeps = createLazyRuntimeModule(() => Promise.all([
|
|
3809
|
-
import("./setup-core-
|
|
3810
|
+
import("./setup-core-CYQRY2oG.js").then((n) => n.s),
|
|
3810
3811
|
import("./device-health-D4LBxuPq.js"),
|
|
3811
|
-
import("./setup-core-
|
|
3812
|
-
import("./startup-verification-
|
|
3812
|
+
import("./setup-core-CYQRY2oG.js").then((n) => n.a),
|
|
3813
|
+
import("./startup-verification-DSiyDKM5.js")
|
|
3813
3814
|
]).then(([configUpdateModule, deviceHealthModule, profileModule, startupVerificationModule]) => ({
|
|
3814
3815
|
updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
|
|
3815
3816
|
summarizeMatrixDeviceHealth: deviceHealthModule.summarizeMatrixDeviceHealth,
|
|
@@ -2,7 +2,7 @@ import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
|
2
2
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
//#region extensions/matrix/src/plugin-entry.runtime.ts
|
|
5
|
-
const loadMatrixVerificationRuntime = createLazyRuntimeModule(() => import("./verification-
|
|
5
|
+
const loadMatrixVerificationRuntime = createLazyRuntimeModule(() => import("./verification-CGnI9k1O.js").then((n) => n.y));
|
|
6
6
|
function sendError(respond, err) {
|
|
7
7
|
respond(false, { error: formatMatrixErrorMessage(err) });
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
2
|
-
import { c as resolveMatrixConfigPath, l as updateMatrixAccountConfig, o as syncMatrixOwnProfile } from "./setup-core-
|
|
3
|
-
import { n as withResolvedActionClient } from "./client-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
2
|
+
import { c as resolveMatrixConfigPath, l as updateMatrixAccountConfig, o as syncMatrixOwnProfile } from "./setup-core-CYQRY2oG.js";
|
|
3
|
+
import { n as withResolvedActionClient } from "./client-BUai6s29.js";
|
|
4
4
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
5
5
|
//#region extensions/matrix/src/matrix/actions/profile.ts
|
|
6
6
|
async function updateMatrixOwnProfile(opts = {}) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
|
|
2
2
|
import { a as extractMatrixReactionAnnotation } from "./reaction-common-DkrQdBSZ.js";
|
|
3
|
-
import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-
|
|
3
|
+
import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-D-BxBK_L.js";
|
|
4
4
|
import { i as resolveMatrixThreadRouting, r as resolveMatrixThreadRootId, t as resolveMatrixInboundRoute } from "./route-DY6at4qJ.js";
|
|
5
5
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
6
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
7
7
|
import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
|
|
8
8
|
//#region extensions/matrix/src/matrix/monitor/reaction-events.ts
|
|
9
|
-
const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-
|
|
9
|
+
const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-BLJKPLku.js"));
|
|
10
10
|
const loadExecApprovalResolver = createLazyRuntimeModule(() => import("./exec-approval-resolver-BCgqRtZS.js"));
|
|
11
|
-
const loadMatrixSend = createLazyRuntimeModule(() => import("./send-
|
|
11
|
+
const loadMatrixSend = createLazyRuntimeModule(() => import("./send-yre1krm8.js").then((n) => n.l));
|
|
12
12
|
function buildMatrixApprovalTerminalText(result) {
|
|
13
13
|
const approval = result.approval;
|
|
14
14
|
const terminalLabel = approval.status === "allowed" ? approval.decision === "allow-always" ? "Allowed always" : "Allowed once" : approval.status === "denied" ? "Denied" : approval.status === "expired" ? "Expired" : "Cancelled";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as formatMatrixErrorReason, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
2
|
-
import { A as writeMatrixRecoveryKeyStateForPath, C as readLegacyMatrixRecoveryKeyFile, E as readMatrixRecoveryKeyStateForPath, v as migrateLegacyMatrixRecoveryKeyFilePathToStore } from "./storage-
|
|
3
|
-
import { n as LogService } from "./logger-
|
|
2
|
+
import { A as writeMatrixRecoveryKeyStateForPath, C as readLegacyMatrixRecoveryKeyFile, E as readMatrixRecoveryKeyStateForPath, v as migrateLegacyMatrixRecoveryKeyFilePathToStore } from "./storage-DD-EnNJE.js";
|
|
3
|
+
import { n as LogService } from "./logger-D0GCSDQq.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { decodeRecoveryKey } from "matrix-js-sdk/lib/crypto-api/recovery-key.js";
|
|
6
6
|
//#region extensions/matrix/src/matrix/sdk/recovery-key-store.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { n as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
|
|
3
|
-
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-
|
|
3
|
+
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-0TyS9xep.js";
|
|
4
4
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/matrix/src/resolve-targets.ts
|
|
6
6
|
var resolve_targets_exports = /* @__PURE__ */ __exportAll({ resolveMatrixTargets: () => resolveMatrixTargets });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-
|
|
1
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-Cx1VVArA.js";
|
|
2
2
|
//#region extensions/matrix/src/resolver.runtime.ts
|
|
3
3
|
const matrixResolverRuntime = { resolveMatrixTargets };
|
|
4
4
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
2
|
//#region extensions/matrix/src/runtime.ts
|
|
3
|
-
const { setRuntime: setMatrixRuntime,
|
|
3
|
+
const { setRuntime: setMatrixRuntime, getRuntime: getMatrixRuntime, tryGetRuntime: getOptionalMatrixRuntime } = createPluginRuntimeStore({
|
|
4
4
|
pluginId: "matrix",
|
|
5
5
|
errorMessage: "Matrix runtime not initialized"
|
|
6
6
|
});
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as resolveMatrixDefaultOrOnlyAccountId, i as resolveMatrixChannelConfig, n as requiresExplicitMatrixDefaultAccount, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds, t as findMatrixAccountEntry } from "./account-selection-Bz00QTmQ.js";
|
|
2
2
|
import { n as listMatrixEnvAccountIds, r as resolveMatrixEnvAccountToken, t as getMatrixScopedEnvVarNames } from "./env-vars-B0NxQnPk.js";
|
|
3
|
-
import { r as setMatrixRuntime } from "./runtime-
|
|
3
|
+
import { r as setMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
4
4
|
import { a as resolveMatrixCredentialsPath, i as resolveMatrixCredentialsFilename, n as resolveMatrixAccountStorageRoot, o as resolveMatrixHomeserverKey, r as resolveMatrixCredentialsDir, s as sanitizeMatrixPathSegment, t as hashMatrixAccessToken } from "./storage-paths-B4_I9iqO.js";
|
|
5
5
|
import { d as setMatrixThreadBindingIdleTimeoutBySessionKey, p as setMatrixThreadBindingMaxAgeBySessionKey } from "./thread-bindings-shared-CKnY4LSd.js";
|
|
6
6
|
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-DDbghaZH.js";
|
|
7
|
-
import { assertHttpUrlTargetsPrivateNetwork, closeDispatcher, createPinnedDispatcher, resolvePinnedHostnameWithPolicy,
|
|
7
|
+
import { assertHttpUrlTargetsPrivateNetwork, closeDispatcher, createPinnedDispatcher, resolvePinnedHostnameWithPolicy, ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
8
8
|
import { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
|
|
9
9
|
import { formatZonedTimestamp } from "openclaw/plugin-sdk/time-runtime";
|
|
10
10
|
//#region extensions/matrix/runtime-api.ts
|
|
@@ -22,4 +22,4 @@ function chunkTextForOutbound(text, limit) {
|
|
|
22
22
|
return chunks;
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
|
-
export { assertHttpUrlTargetsPrivateNetwork, chunkTextForOutbound, closeDispatcher, createPinnedDispatcher, ensureMatrixSdkInstalled, findMatrixAccountEntry, formatZonedTimestamp, getMatrixScopedEnvVarNames, hashMatrixAccessToken, isMatrixSdkAvailable, listMatrixEnvAccountIds, requiresExplicitMatrixDefaultAccount, resolveConfiguredMatrixAccountIds, resolveMatrixAccountStorageRoot, resolveMatrixAccountStringValues, resolveMatrixChannelConfig, resolveMatrixCredentialsDir, resolveMatrixCredentialsFilename, resolveMatrixCredentialsPath, resolveMatrixDefaultOrOnlyAccountId, resolveMatrixEnvAccountToken, resolveMatrixHomeserverKey, resolvePinnedHostnameWithPolicy, sanitizeMatrixPathSegment, setMatrixRuntime, setMatrixThreadBindingIdleTimeoutBySessionKey, setMatrixThreadBindingMaxAgeBySessionKey,
|
|
25
|
+
export { assertHttpUrlTargetsPrivateNetwork, chunkTextForOutbound, closeDispatcher, createPinnedDispatcher, ensureMatrixSdkInstalled, findMatrixAccountEntry, formatZonedTimestamp, getMatrixScopedEnvVarNames, hashMatrixAccessToken, isMatrixSdkAvailable, listMatrixEnvAccountIds, requiresExplicitMatrixDefaultAccount, resolveConfiguredMatrixAccountIds, resolveMatrixAccountStorageRoot, resolveMatrixAccountStringValues, resolveMatrixChannelConfig, resolveMatrixCredentialsDir, resolveMatrixCredentialsFilename, resolveMatrixCredentialsPath, resolveMatrixDefaultOrOnlyAccountId, resolveMatrixEnvAccountToken, resolveMatrixHomeserverKey, resolvePinnedHostnameWithPolicy, sanitizeMatrixPathSegment, setMatrixRuntime, setMatrixThreadBindingIdleTimeoutBySessionKey, setMatrixThreadBindingMaxAgeBySessionKey, ssrfPolicyFromDangerouslyAllowPrivateNetwork, writeJsonFileAtomically };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as setMatrixRuntime } from "./runtime-
|
|
1
|
+
import { r as setMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
2
2
|
export { setMatrixRuntime };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { n as formatMatrixErrorReason, r as isMatrixNotFoundError, t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
2
|
-
import { n as LogService, r as noop, t as ConsoleLogger } from "./logger-
|
|
3
|
-
import { t as SqliteBackedMatrixSyncStore } from "./file-sync-store-
|
|
2
|
+
import { n as LogService, r as noop, t as ConsoleLogger } from "./logger-D0GCSDQq.js";
|
|
3
|
+
import { t as SqliteBackedMatrixSyncStore } from "./file-sync-store-CUE9WwD2.js";
|
|
4
4
|
import { t as MATRIX_IDB_PERSIST_INTERVAL_MS } from "./idb-persistence-lock-DAJ49nZX.js";
|
|
5
|
-
import { c as createMatrixStartupAbortError, u as throwIfMatrixStartupAborted } from "./shared-
|
|
6
|
-
import { a as matrixEventToRaw, n as createMatrixGuardedFetch, o as parseMxc, t as MatrixAuthedHttpClient } from "./http-client-
|
|
5
|
+
import { c as createMatrixStartupAbortError, u as throwIfMatrixStartupAborted } from "./shared-BfW4lxGu.js";
|
|
6
|
+
import { a as matrixEventToRaw, n as createMatrixGuardedFetch, o as parseMxc, t as MatrixAuthedHttpClient } from "./http-client-Jw5_bwQo.js";
|
|
7
7
|
import { n as resolveMatrixRoomKeyBackupReadinessError } from "./backup-health-Dm_YMVFT.js";
|
|
8
|
-
import { createMatrixJsSdkClientLogger } from "./logging-
|
|
8
|
+
import { createMatrixJsSdkClientLogger } from "./logging-QH-48Gr6.js";
|
|
9
9
|
import { n as isMatrixReadySyncState, r as isMatrixTerminalSyncState } from "./sync-state-CWbp0QSY.js";
|
|
10
|
-
import { n as isRepairableSecretStorageAccessError, t as MatrixRecoveryKeyStore } from "./recovery-key-store-
|
|
10
|
+
import { n as isRepairableSecretStorageAccessError, t as MatrixRecoveryKeyStore } from "./recovery-key-store-B2RglalK.js";
|
|
11
11
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
12
12
|
import { normalizeNullableString, normalizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
13
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
@@ -94,7 +94,7 @@ function createMatrixExplicitBootstrapOptions(params) {
|
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
let loadedMatrixCryptoRuntime = null;
|
|
97
|
-
const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-
|
|
97
|
+
const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-DoEB5RpM.js").then((runtime) => {
|
|
98
98
|
loadedMatrixCryptoRuntime = runtime;
|
|
99
99
|
return runtime;
|
|
100
100
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
|
|
3
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
3
|
+
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
4
4
|
import { r as normalizeMatrixResolvableTarget, t as isMatrixQualifiedUserId } from "./target-ids-B-5aQxwn.js";
|
|
5
5
|
import { n as MATRIX_REACTION_EVENT_TYPE, r as buildMatrixReactionContent, t as MATRIX_ANNOTATION_RELATION_TYPE } from "./reaction-common-DkrQdBSZ.js";
|
|
6
6
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
@@ -228,7 +228,7 @@ function buildPollResponseContent(pollEventId, answerIds) {
|
|
|
228
228
|
}
|
|
229
229
|
//#endregion
|
|
230
230
|
//#region extensions/matrix/src/matrix/send/client.ts
|
|
231
|
-
const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-
|
|
231
|
+
const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-CNVF73sF.js").then((n) => n.t));
|
|
232
232
|
function resolveMediaMaxBytes(accountId, cfg) {
|
|
233
233
|
if (!cfg) throw new Error("Matrix media limits requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
|
|
234
234
|
const matrixCfg = resolveMatrixAccountConfig({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as setMatrixRuntime } from "./runtime-
|
|
1
|
+
import { r as setMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
2
2
|
import { s as resetMatrixThreadBindingsForTests } from "./thread-bindings-shared-CKnY4LSd.js";
|
|
3
|
-
import { t as createMatrixThreadBindingManager } from "./thread-bindings-
|
|
3
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-U5ZroBeZ.js";
|
|
4
4
|
export { createMatrixThreadBindingManager, resetMatrixThreadBindingsForTests, setMatrixRuntime };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
|
|
2
|
-
import "./setup-core-
|
|
2
|
+
import "./setup-core-CYQRY2oG.js";
|
|
3
3
|
import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
4
|
-
import { n as bootstrapMatrixVerification } from "./verification-
|
|
4
|
+
import { n as bootstrapMatrixVerification } from "./verification-CGnI9k1O.js";
|
|
5
5
|
//#region extensions/matrix/src/setup-bootstrap.ts
|
|
6
6
|
async function maybeBootstrapNewEncryptedMatrixAccount(params) {
|
|
7
7
|
const accountConfig = resolveMatrixAccountConfig({
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
|
2
2
|
import { a as resolveMatrixDefaultOrOnlyAccountId, o as resolveMatrixAccountStringValues, r as resolveConfiguredMatrixAccountIds } from "./account-selection-Bz00QTmQ.js";
|
|
3
3
|
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig, t as findMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
|
|
4
4
|
import { i as resolveScopedMatrixEnvConfig, n as resolveGlobalMatrixEnvConfig, r as resolveMatrixEnvAuthReadiness } from "./env-auth-CQsYbz-p.js";
|
|
5
|
-
import { i as loadMatrixCredentials, n as credentialsMatchConfig } from "./credentials-read-
|
|
5
|
+
import { i as loadMatrixCredentials, n as credentialsMatchConfig } from "./credentials-read-CwNJrmwu.js";
|
|
6
6
|
import { n as resolveMatrixConfigPath$1, r as shouldStoreMatrixAccountAtTopLevel, t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.js";
|
|
7
7
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
@@ -669,7 +669,7 @@ const matrixSetupAdapter = {
|
|
|
669
669
|
input
|
|
670
670
|
}),
|
|
671
671
|
afterAccountConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
|
|
672
|
-
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-
|
|
672
|
+
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-DXVRCd4G.js");
|
|
673
673
|
await runMatrixSetupBootstrapAfterConfigWrite({
|
|
674
674
|
previousCfg,
|
|
675
675
|
cfg,
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as resolveMatrixAccount, n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-
|
|
2
|
-
import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { g as resolveMatrixAccount, n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-CYQRY2oG.js";
|
|
2
|
+
import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-BTSatSY3.js";
|
|
3
3
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
4
4
|
const matrixSetupPlugin = {
|
|
5
5
|
id: "matrix",
|
|
@@ -13,7 +13,7 @@ const matrixSetupPlugin = {
|
|
|
13
13
|
order: 70,
|
|
14
14
|
quickstartAllowFrom: true
|
|
15
15
|
},
|
|
16
|
-
setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-
|
|
16
|
+
setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-BjvRQzK6.js").then((n) => n.t)).matrixSetupWizard })),
|
|
17
17
|
setup: matrixSetupAdapter,
|
|
18
18
|
capabilities: {
|
|
19
19
|
chatTypes: [
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
|
2
2
|
import { n as requiresExplicitMatrixDefaultAccount } from "./account-selection-Bz00QTmQ.js";
|
|
3
3
|
import { a as resolveMatrixAccountConfig } from "./account-config-BZWN9tGS.js";
|
|
4
4
|
import { r as resolveMatrixEnvAuthReadiness } from "./env-auth-CQsYbz-p.js";
|
|
5
|
-
import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, i as moveSingleMatrixAccountConfigToNamedAccount, l as updateMatrixAccountConfig, p as listMatrixAccountIds, r as resolveMatrixSetupDmAllowFrom } from "./setup-core-
|
|
5
|
+
import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, i as moveSingleMatrixAccountConfigToNamedAccount, l as updateMatrixAccountConfig, p as listMatrixAccountIds, r as resolveMatrixSetupDmAllowFrom } from "./setup-core-CYQRY2oG.js";
|
|
6
6
|
import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.js";
|
|
7
7
|
import { n as validateMatrixHomeserverUrl, r as isPrivateOrLoopbackHost, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
|
|
8
8
|
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-DDbghaZH.js";
|
|
@@ -105,7 +105,7 @@ async function promptMatrixAllowFrom(params) {
|
|
|
105
105
|
pending.push(part);
|
|
106
106
|
}
|
|
107
107
|
if (pending.length > 0) {
|
|
108
|
-
const { resolveMatrixTargets } = await import("./resolve-targets-
|
|
108
|
+
const { resolveMatrixTargets } = await import("./resolve-targets-Cx1VVArA.js").then((n) => n.n);
|
|
109
109
|
const results = await resolveMatrixTargets({
|
|
110
110
|
cfg,
|
|
111
111
|
accountId,
|
|
@@ -233,7 +233,7 @@ async function configureMatrixAccessPrompts(params) {
|
|
|
233
233
|
resolvedIds.push(cleaned);
|
|
234
234
|
continue;
|
|
235
235
|
}
|
|
236
|
-
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-
|
|
236
|
+
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-0TyS9xep.js").then((n) => n.t);
|
|
237
237
|
const matches = await listMatrixDirectoryGroupsLive({
|
|
238
238
|
cfg: next,
|
|
239
239
|
accountId: params.accountId,
|
|
@@ -508,7 +508,7 @@ const matrixOnboardingAdapter = {
|
|
|
508
508
|
});
|
|
509
509
|
},
|
|
510
510
|
afterConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
|
|
511
|
-
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-
|
|
511
|
+
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-DXVRCd4G.js");
|
|
512
512
|
await runMatrixSetupBootstrapAfterConfigWrite({
|
|
513
513
|
previousCfg,
|
|
514
514
|
cfg,
|
|
@@ -5,8 +5,8 @@ import { o as resolveMatrixBaseConfig, r as listNormalizedMatrixAccountIds, t as
|
|
|
5
5
|
import { i as resolveScopedMatrixEnvConfig, n as resolveGlobalMatrixEnvConfig } from "./env-auth-CQsYbz-p.js";
|
|
6
6
|
import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.js";
|
|
7
7
|
import { t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.js";
|
|
8
|
-
import { s as repairCurrentTokenStorageMetaDeviceId } from "./storage-
|
|
9
|
-
import { n as LogService } from "./logger-
|
|
8
|
+
import { s as repairCurrentTokenStorageMetaDeviceId } from "./storage-DD-EnNJE.js";
|
|
9
|
+
import { n as LogService } from "./logger-D0GCSDQq.js";
|
|
10
10
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
11
11
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId as normalizeAccountId$1, normalizeOptionalAccountId, normalizeOptionalAccountId as normalizeOptionalAccountId$1 } from "openclaw/plugin-sdk/account-id";
|
|
12
12
|
import { coerceSecretRef, normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input-runtime";
|
|
@@ -16,7 +16,7 @@ import { resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime
|
|
|
16
16
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
17
17
|
import { retryAsync } from "openclaw/plugin-sdk/retry-runtime";
|
|
18
18
|
//#region extensions/matrix/src/matrix/client/config.ts
|
|
19
|
-
const loadDefaultMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-
|
|
19
|
+
const loadDefaultMatrixAuthClientDeps = createLazyRuntimeModule(() => Promise.all([import("./sdk-1TXuSiXZ.js"), import("./logging-QH-48Gr6.js")]).then(([sdkModule, loggingModule]) => ({
|
|
20
20
|
MatrixClient: sdkModule.MatrixClient,
|
|
21
21
|
ensureMatrixSdkLoggingConfigured: loggingModule.ensureMatrixSdkLoggingConfigured
|
|
22
22
|
})));
|
|
@@ -24,11 +24,11 @@ const MATRIX_AUTH_REQUEST_RETRY_RE = /\b(fetch failed|econnreset|econnrefused|en
|
|
|
24
24
|
async function loadMatrixAuthClientDeps() {
|
|
25
25
|
return await loadDefaultMatrixAuthClientDeps();
|
|
26
26
|
}
|
|
27
|
-
const loadMatrixCredentialsReadDeps = createLazyRuntimeModule(() => import("./credentials-read-
|
|
27
|
+
const loadMatrixCredentialsReadDeps = createLazyRuntimeModule(() => import("./credentials-read-CwNJrmwu.js").then((n) => n.r).then((credentialsReadModule) => ({
|
|
28
28
|
loadMatrixCredentials: credentialsReadModule.loadMatrixCredentials,
|
|
29
29
|
credentialsMatchConfig: credentialsReadModule.credentialsMatchConfig
|
|
30
30
|
})));
|
|
31
|
-
const loadMatrixCredentialsWriteRuntime = createLazyRuntimeModule(() => import("./credentials-write.runtime-
|
|
31
|
+
const loadMatrixCredentialsWriteRuntime = createLazyRuntimeModule(() => import("./credentials-write.runtime-BDtpqvj0.js"));
|
|
32
32
|
const loadMatrixSecretInputDeps = createLazyRuntimeModule(() => import("./config-secret-input.runtime-CwsP3--c.js").then((runtime) => ({ resolveConfiguredSecretInputString: runtime.resolveConfiguredSecretInputString })));
|
|
33
33
|
function shouldRetryMatrixAuthRequest(err) {
|
|
34
34
|
return MATRIX_AUTH_REQUEST_RETRY_RE.test(formatErrorMessage(err));
|
|
@@ -492,7 +492,7 @@ var shared_exports = /* @__PURE__ */ __exportAll({
|
|
|
492
492
|
stopSharedClientForAccount: () => stopSharedClientForAccount,
|
|
493
493
|
stopSharedClientInstance: () => stopSharedClientInstance
|
|
494
494
|
});
|
|
495
|
-
const loadMatrixCreateClientDeps = createLazyRuntimeModule(() => import("./create-client-
|
|
495
|
+
const loadMatrixCreateClientDeps = createLazyRuntimeModule(() => import("./create-client-85ttAWDP.js").then((n) => n.n).then((runtime) => ({ createMatrixClient: runtime.createMatrixClient })));
|
|
496
496
|
const sharedClientStates = /* @__PURE__ */ new Map();
|
|
497
497
|
const sharedClientPromises = /* @__PURE__ */ new Map();
|
|
498
498
|
function serializeDispatcherPolicyKey(auth) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as getMatrixRuntime } from "./runtime-
|
|
1
|
+
import { t as getMatrixRuntime } from "./runtime-6S3DNFNv.js";
|
|
2
2
|
import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.js";
|
|
3
|
-
import { M as resolveMatrixSqliteStateEnv, l as resolveMatrixStoragePaths, o as recordCurrentStorageMetaDeviceId } from "./storage-
|
|
3
|
+
import { M as resolveMatrixSqliteStateEnv, l as resolveMatrixStoragePaths, o as recordCurrentStorageMetaDeviceId } from "./storage-DD-EnNJE.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|