Skip to content

Commit 8bd9e22

Browse files
committed
refactor: trim bluebubbles helper exports
1 parent 456e1c0 commit 8bd9e22

11 files changed

Lines changed: 21 additions & 21 deletions

extensions/bluebubbles/src/account-resolve.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
import type { OpenClawConfig } from "./runtime-api.js";
77
import { normalizeResolvedSecretInputString } from "./secret-input.js";
88

9-
export type BlueBubblesAccountResolveOpts = {
9+
type BlueBubblesAccountResolveOpts = {
1010
serverUrl?: string;
1111
password?: string;
1212
accountId?: string;

extensions/bluebubbles/src/attachments.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { extractBlueBubblesMessageId, resolveBlueBubblesSendTarget } from "./sen
2323
import { createChatForHandle, resolveChatGuidForTarget } from "./send.js";
2424
import { type BlueBubblesAttachment } from "./types.js";
2525

26-
export type BlueBubblesAttachmentOpts = {
26+
type BlueBubblesAttachmentOpts = {
2727
serverUrl?: string;
2828
password?: string;
2929
accountId?: string;
@@ -111,7 +111,7 @@ export async function downloadBlueBubblesAttachment(
111111
});
112112
}
113113

114-
export type SendBlueBubblesAttachmentResult = {
114+
type SendBlueBubblesAttachmentResult = {
115115
messageId: string;
116116
};
117117

extensions/bluebubbles/src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const DEFAULT_MULTIPART_TIMEOUT_MS = 60_000;
4141
* - `blueBubblesHeaderAuth` — header-based auth; flip the default here when
4242
* BB Server ships the header-auth change for #66869.
4343
*/
44-
export interface BlueBubblesAuthStrategy {
44+
interface BlueBubblesAuthStrategy {
4545
/**
4646
* Stable identifier for this strategy. Used by the client cache fingerprint
4747
* so two clients for the same account + credential that differ only in auth
@@ -149,7 +149,7 @@ export function resolveBlueBubblesClientSsrfPolicy(params: {
149149

150150
// --- Client ----------------------------------------------------------------
151151

152-
export type BlueBubblesClientOptions = {
152+
type BlueBubblesClientOptions = {
153153
cfg?: OpenClawConfig;
154154
accountId?: string;
155155
serverUrl?: string;

extensions/bluebubbles/src/history.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { resolveBlueBubblesServerAccount } from "./account-resolve.js";
22
import { createBlueBubblesClientFromParts } from "./client.js";
33
import type { OpenClawConfig } from "./runtime-api.js";
44

5-
export type BlueBubblesHistoryEntry = {
5+
type BlueBubblesHistoryEntry = {
66
sender: string;
77
body: string;
88
timestamp?: number;
99
messageId?: string;
1010
};
1111

12-
export type BlueBubblesHistoryFetchResult = {
12+
type BlueBubblesHistoryFetchResult = {
1313
entries: BlueBubblesHistoryEntry[];
1414
/**
1515
* True when at least one API path returned a recognized response shape.
@@ -18,7 +18,7 @@ export type BlueBubblesHistoryFetchResult = {
1818
resolved: boolean;
1919
};
2020

21-
export type BlueBubblesMessageData = {
21+
type BlueBubblesMessageData = {
2222
guid?: string;
2323
text?: string;
2424
handle_id?: string;
@@ -32,7 +32,7 @@ export type BlueBubblesMessageData = {
3232
};
3333
};
3434

35-
export type BlueBubblesChatOpts = {
35+
type BlueBubblesChatOpts = {
3636
serverUrl?: string;
3737
password?: string;
3838
accountId?: string;

extensions/bluebubbles/src/inbound-dedupe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export function resolveBlueBubblesInboundDedupeKey(
159159
return base;
160160
}
161161

162-
export type InboundDedupeClaim =
162+
type InboundDedupeClaim =
163163
| { kind: "claimed"; finalize: () => Promise<void>; release: () => void }
164164
| { kind: "duplicate" }
165165
| { kind: "inflight" }

extensions/bluebubbles/src/monitor-debounce.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ function sanitizeDebounceEntry(entry: BlueBubblesDebounceEntry): BlueBubblesDebo
2929
};
3030
}
3131

32-
export type BlueBubblesDebouncer = {
32+
type BlueBubblesDebouncer = {
3333
enqueue: (item: BlueBubblesDebounceEntry) => Promise<void>;
3434
flushKey: (key: string) => Promise<void>;
3535
};
3636

37-
export type BlueBubblesDebounceRegistry = {
37+
type BlueBubblesDebounceRegistry = {
3838
getOrCreateDebouncer: (target: WebhookTarget) => BlueBubblesDebouncer;
3939
removeDebouncer: (target: WebhookTarget) => void;
4040
};

extensions/bluebubbles/src/monitor-processing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ export function logVerbose(
355355
}
356356
}
357357

358-
export type BlueBubblesInboundChatResolveTarget =
358+
type BlueBubblesInboundChatResolveTarget =
359359
| { readonly kind: "chat_id"; readonly chatId: number }
360360
| { readonly kind: "chat_identifier"; readonly chatIdentifier: string }
361361
| { readonly kind: "handle"; readonly address: string };

extensions/bluebubbles/src/monitor-reply-fetch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const REPLY_TO_ID_MAX_LENGTH = 128;
2020
const PART_INDEX_REPLY_TO_ID_PATTERN = /^p:\d{1,10}\/([A-Za-z0-9._:-]+)$/;
2121
const PART_INDEX_REPLY_TO_ID_MAX_LENGTH = REPLY_TO_ID_MAX_LENGTH + "p:".length + 10 + "/".length;
2222

23-
export type BlueBubblesReplyFetchResult = {
23+
type BlueBubblesReplyFetchResult = {
2424
body?: string;
2525
sender?: string;
2626
};
@@ -41,7 +41,7 @@ export function _resetBlueBubblesReplyFetchState(): void {
4141
inflight.clear();
4242
}
4343

44-
export type FetchBlueBubblesReplyContextParams = {
44+
type FetchBlueBubblesReplyContextParams = {
4545
accountId: string;
4646
replyToId: string;
4747
baseUrl: string;

extensions/bluebubbles/src/multipart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { SsrFPolicy } from "openclaw/plugin-sdk/ssrf-runtime";
22
import { blueBubblesFetchWithTimeout } from "./types.js";
33

4-
export function concatUint8Arrays(parts: Uint8Array[]): Uint8Array {
4+
function concatUint8Arrays(parts: Uint8Array[]): Uint8Array {
55
const totalLength = parts.reduce((acc, part) => acc + part.length, 0);
66
const body = new Uint8Array(totalLength);
77
let offset = 0;

extensions/bluebubbles/src/probe.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export type BlueBubblesProbe = BaseProbeResult & {
88
status?: number | null;
99
};
1010

11-
export type BlueBubblesServerInfo = {
11+
type BlueBubblesServerInfo = {
1212
os_version?: string;
1313
server_version?: string;
1414
private_api?: boolean;
@@ -80,7 +80,7 @@ export async function fetchBlueBubblesServerInfo(params: {
8080
* Get cached server info synchronously (for use in describeMessageTool).
8181
* Returns null if not cached or expired.
8282
*/
83-
export function getCachedBlueBubblesServerInfo(accountId?: string): BlueBubblesServerInfo | null {
83+
function getCachedBlueBubblesServerInfo(accountId?: string): BlueBubblesServerInfo | null {
8484
const cacheKey = normalizeOptionalString(accountId) || "default";
8585
const cached = serverInfoCache.get(cacheKey);
8686
if (cached && cached.expires > Date.now()) {
@@ -112,7 +112,7 @@ export function isBlueBubblesPrivateApiEnabled(accountId?: string): boolean {
112112
/**
113113
* Parse macOS version string (e.g., "15.0.1" or "26.0") into major version number.
114114
*/
115-
export function parseMacOSMajorVersion(version?: string | null): number | null {
115+
function parseMacOSMajorVersion(version?: string | null): number | null {
116116
if (!version) {
117117
return null;
118118
}

0 commit comments

Comments
 (0)