Skip to content

Commit 4115e83

Browse files
authored
refactor(matrix): localize internal types (#101954)
1 parent eb721b0 commit 4115e83

16 files changed

Lines changed: 20 additions & 23 deletions

extensions/matrix/src/approval-handler.runtime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ type MatrixPrepareTargetParams = {
129129
const MATRIX_APPROVAL_DELIVERY_ATTEMPTS = 3;
130130
const MATRIX_APPROVAL_DELIVERY_RETRY_DELAY_MS = 250;
131131

132-
export type MatrixApprovalHandlerDeps = {
132+
type MatrixApprovalHandlerDeps = {
133133
nowMs?: () => number;
134134
sendMessage?: typeof sendMessageMatrix;
135135
sendSingleTextMessage?: typeof sendSingleTextMessageMatrix;

extensions/matrix/src/approval-reactions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const PERSISTENT_NAMESPACE = "matrix.approval-reactions";
3030
const PERSISTENT_MAX_ENTRIES = 1000;
3131
const DEFAULT_REACTION_TARGET_TTL_MS = 24 * 60 * 60 * 1000;
3232

33-
export type MatrixApprovalReactionBinding = {
33+
type MatrixApprovalReactionBinding = {
3434
decision: ExecApprovalReplyDecision;
3535
emoji: string;
3636
label: string;

extensions/matrix/src/matrix/actions/verification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type MatrixVerificationDmLookupOpts = {
1818
verificationDmUserId?: string;
1919
};
2020

21-
export type MatrixSelfVerificationResult = MatrixVerificationSummary & {
21+
type MatrixSelfVerificationResult = MatrixVerificationSummary & {
2222
deviceOwnerVerified: boolean;
2323
ownerVerification: MatrixOwnDeviceVerificationStatus;
2424
};

extensions/matrix/src/matrix/client/file-sync-store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const SYNC_CACHE_STATE_KEY = "current";
3131
// PluginState serializes this string inside a row object; 24KB leaves room for JSON escaping.
3232
const SYNC_CACHE_CHUNK_BYTES = 24_000;
3333

34-
export type PersistedMatrixSyncStore = {
34+
type PersistedMatrixSyncStore = {
3535
version: number;
3636
savedSync: ISyncData | null;
3737
clientOptions?: IStoredClientOpts;

extensions/matrix/src/matrix/device-health.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export type MatrixManagedDeviceInfo = {
55
current: boolean;
66
};
77

8-
export type MatrixDeviceHealthSummary = {
8+
type MatrixDeviceHealthSummary = {
99
currentDeviceId: string | null;
1010
staleOpenClawDevices: MatrixManagedDeviceInfo[];
1111
currentOpenClawDevices: MatrixManagedDeviceInfo[];

extensions/matrix/src/matrix/direct-management.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export type MatrixDirectRoomCandidate = {
1414
source: "account-data" | "joined";
1515
};
1616

17-
export type MatrixDirectRoomInspection = {
17+
type MatrixDirectRoomInspection = {
1818
selfUserId: string | null;
1919
remoteUserId: string;
2020
mappedRoomIds: string[];
@@ -23,14 +23,14 @@ export type MatrixDirectRoomInspection = {
2323
activeRoomId: string | null;
2424
};
2525

26-
export type MatrixDirectRoomRepairResult = MatrixDirectRoomInspection & {
26+
type MatrixDirectRoomRepairResult = MatrixDirectRoomInspection & {
2727
createdRoomId: string | null;
2828
changed: boolean;
2929
directContentBefore: MatrixDirectAccountData;
3030
directContentAfter: MatrixDirectAccountData;
3131
};
3232

33-
export type MatrixDirectRoomPromotionResult =
33+
type MatrixDirectRoomPromotionResult =
3434
| {
3535
classifyAsDirect: true;
3636
repaired: boolean;

extensions/matrix/src/matrix/direct-room.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export async function hasDirectMatrixMemberFlag(
7272
}
7373
}
7474

75-
export type MatrixDirectRoomEvidence = {
75+
type MatrixDirectRoomEvidence = {
7676
joinedMembers: string[] | null;
7777
strict: boolean;
7878
viaMemberState: boolean;

extensions/matrix/src/matrix/draft-stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function resolveDraftPreviewOptions(mode: MatrixDraftPreviewMode): {
2626
};
2727
}
2828

29-
export type MatrixDraftStream = {
29+
type MatrixDraftStream = {
3030
/** Update the draft with the latest accumulated text for the current block. */
3131
update: (text: string) => void;
3232
/** Ensure the last pending update has been sent. */

extensions/matrix/src/matrix/legacy-crypto-inspector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createRequire } from "node:module";
55
import path from "node:path";
66
import { ensureMatrixCryptoRuntime } from "./deps.js";
77

8-
export type MatrixLegacyCryptoInspectionResult = {
8+
type MatrixLegacyCryptoInspectionResult = {
99
deviceId: string | null;
1010
roomKeyCounts: {
1111
total: number;

extensions/matrix/src/matrix/monitor/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import { createMatrixMonitorStatusController } from "./status.js";
5858
import { createMatrixMonitorSyncLifecycle } from "./sync-lifecycle.js";
5959
import { createMatrixMonitorTaskRunner } from "./task-runner.js";
6060

61-
export type MonitorMatrixOpts = {
61+
type MonitorMatrixOpts = {
6262
runtime?: RuntimeEnv;
6363
channelRuntime?: ChannelRuntimeSurface;
6464
abortSignal?: AbortSignal;

0 commit comments

Comments
 (0)