diff --git a/src/gateway/protocol/startup-unavailable.ts b/src/gateway/protocol/startup-unavailable.ts index 77e33885154..d30e853a51f 100644 --- a/src/gateway/protocol/startup-unavailable.ts +++ b/src/gateway/protocol/startup-unavailable.ts @@ -1,7 +1,7 @@ export const GATEWAY_STARTUP_UNAVAILABLE_REASON = "startup-sidecars"; export const GATEWAY_STARTUP_RETRY_AFTER_MS = 500; -export const GATEWAY_STARTUP_RETRY_MIN_MS = 100; -export const GATEWAY_STARTUP_RETRY_MAX_MS = 2_000; +const GATEWAY_STARTUP_RETRY_MIN_MS = 100; +const GATEWAY_STARTUP_RETRY_MAX_MS = 2_000; export type GatewayStartupUnavailableDetails = { reason: typeof GATEWAY_STARTUP_UNAVAILABLE_REASON; @@ -11,7 +11,7 @@ export function gatewayStartupUnavailableDetails(): GatewayStartupUnavailableDet return { reason: GATEWAY_STARTUP_UNAVAILABLE_REASON }; } -export function isGatewayStartupUnavailableDetails( +function isGatewayStartupUnavailableDetails( details: unknown, ): details is GatewayStartupUnavailableDetails { return ( diff --git a/src/gateway/server-methods/agent-wait-dedupe.ts b/src/gateway/server-methods/agent-wait-dedupe.ts index 89d16b65fc8..83ae4f842b9 100644 --- a/src/gateway/server-methods/agent-wait-dedupe.ts +++ b/src/gateway/server-methods/agent-wait-dedupe.ts @@ -76,9 +76,7 @@ function notifyWaiters(runId: string): void { } } -export function readTerminalSnapshotFromDedupeEntry( - entry: DedupeEntry, -): AgentWaitTerminalSnapshot | null { +function readTerminalSnapshotFromDedupeEntry(entry: DedupeEntry): AgentWaitTerminalSnapshot | null { const payload = entry.payload as | { status?: unknown; diff --git a/src/gateway/server/preauth-connection-budget.ts b/src/gateway/server/preauth-connection-budget.ts index e359338c8da..dccbd1e1868 100644 --- a/src/gateway/server/preauth-connection-budget.ts +++ b/src/gateway/server/preauth-connection-budget.ts @@ -1,7 +1,7 @@ const DEFAULT_MAX_PREAUTH_CONNECTIONS_PER_IP = 32; const UNKNOWN_CLIENT_IP_BUDGET_KEY = "__openclaw_unknown_client_ip__"; -export function getMaxPreauthConnectionsPerIpFromEnv(env: NodeJS.ProcessEnv = process.env): number { +function getMaxPreauthConnectionsPerIpFromEnv(env: NodeJS.ProcessEnv = process.env): number { const configured = env.OPENCLAW_MAX_PREAUTH_CONNECTIONS_PER_IP || (env.VITEST && env.OPENCLAW_TEST_MAX_PREAUTH_CONNECTIONS_PER_IP); diff --git a/src/gateway/server/ws-connection/handshake-auth-helpers.ts b/src/gateway/server/ws-connection/handshake-auth-helpers.ts index 3903ede1147..3a0c0cced5a 100644 --- a/src/gateway/server/ws-connection/handshake-auth-helpers.ts +++ b/src/gateway/server/ws-connection/handshake-auth-helpers.ts @@ -336,7 +336,7 @@ export function resolveDeviceSignaturePayloadVersion(params: { return null; } -export function resolveAuthProvidedKind( +function resolveAuthProvidedKind( connectAuth: HandshakeConnectAuth | null | undefined, ): AuthProvidedKind { return connectAuth?.password diff --git a/src/gateway/session-history-state.ts b/src/gateway/session-history-state.ts index 30e600caf3e..7c70148a466 100644 --- a/src/gateway/session-history-state.ts +++ b/src/gateway/session-history-state.ts @@ -81,12 +81,12 @@ function buildPaginatedSessionHistory(params: { }; } -export function resolveMessageSeq(message: SessionHistoryMessage | undefined): number | undefined { +function resolveMessageSeq(message: SessionHistoryMessage | undefined): number | undefined { const seq = message?.__openclaw?.seq; return typeof seq === "number" && Number.isFinite(seq) && seq > 0 ? seq : undefined; } -export function paginateSessionMessages( +function paginateSessionMessages( messages: SessionHistoryMessage[], limit: number | undefined, cursor: string | undefined,