diff --git a/src/gateway/session-utils.types.ts b/src/gateway/session-utils.types.ts index ee9e9f75975..f270ed2bb01 100644 --- a/src/gateway/session-utils.types.ts +++ b/src/gateway/session-utils.types.ts @@ -18,14 +18,14 @@ export type GatewaySessionsDefaults = { thinkingDefault?: string; }; -export type GatewayThinkingLevelOption = { +type GatewayThinkingLevelOption = { id: string; label: string; }; export type SessionRunStatus = "running" | "done" | "failed" | "killed" | "timeout"; -export type SubagentRunState = "active" | "interrupted" | "historical"; +type SubagentRunState = "active" | "interrupted" | "historical"; export type GatewaySessionRow = { key: string; diff --git a/src/gateway/startup-tasks.ts b/src/gateway/startup-tasks.ts index a70b6679019..2ac7d31fa21 100644 --- a/src/gateway/startup-tasks.ts +++ b/src/gateway/startup-tasks.ts @@ -1,6 +1,6 @@ import { formatErrorMessage } from "../infra/errors.js"; -export type StartupTaskResult = +type StartupTaskResult = | { status: "skipped"; reason: string } | { status: "ran" } | { status: "failed"; reason: string }; @@ -13,7 +13,7 @@ export type StartupTask = { run: () => Promise; }; -export type StartupTaskLogger = { +type StartupTaskLogger = { debug: (message: string, meta?: Record) => void; warn: (message: string, meta?: Record) => void; }; diff --git a/src/gateway/talk-realtime-relay.ts b/src/gateway/talk-realtime-relay.ts index 65244f93844..dfad1912e9b 100644 --- a/src/gateway/talk-realtime-relay.ts +++ b/src/gateway/talk-realtime-relay.ts @@ -18,7 +18,7 @@ const MAX_RELAY_SESSIONS_PER_CONN = 2; const MAX_RELAY_SESSIONS_GLOBAL = 64; const RELAY_EVENT = "talk.realtime.relay"; -export type TalkRealtimeRelayEvent = +type TalkRealtimeRelayEvent = | { relaySessionId: string; type: "ready" } | { relaySessionId: string; type: "audio"; audioBase64: string } | { relaySessionId: string; type: "clear" } @@ -50,7 +50,7 @@ type RelaySession = { cleanupTimer: ReturnType; }; -export type CreateTalkRealtimeRelaySessionParams = { +type CreateTalkRealtimeRelaySessionParams = { context: GatewayRequestContext; connId: string; provider: RealtimeVoiceProviderPlugin; @@ -61,7 +61,7 @@ export type CreateTalkRealtimeRelaySessionParams = { voice?: string; }; -export type TalkRealtimeRelaySessionResult = { +type TalkRealtimeRelaySessionResult = { provider: string; transport: "gateway-relay"; relaySessionId: string; diff --git a/src/gateway/test-with-server.ts b/src/gateway/test-with-server.ts index 37e52b821b3..0712874d578 100644 --- a/src/gateway/test-with-server.ts +++ b/src/gateway/test-with-server.ts @@ -2,8 +2,8 @@ import { afterAll, beforeAll, beforeEach } from "vitest"; import { connectOk, startServerWithClient, testState } from "./test-helpers.js"; type StartServerWithClient = typeof startServerWithClient; -export type GatewayWs = Awaited>["ws"]; -export type GatewayServer = Awaited>["server"]; +type GatewayWs = Awaited>["ws"]; +type GatewayServer = Awaited>["server"]; export async function withServer(run: (ws: GatewayWs) => Promise): Promise { const { server, ws, envSnapshot } = await startServerWithClient("secret"); diff --git a/src/gateway/tool-resolution.ts b/src/gateway/tool-resolution.ts index 08dd453d19a..79347fa4e57 100644 --- a/src/gateway/tool-resolution.ts +++ b/src/gateway/tool-resolution.ts @@ -24,7 +24,7 @@ import { logWarn } from "../logger.js"; import { getPluginToolMeta } from "../plugins/tools.js"; import { DEFAULT_GATEWAY_HTTP_TOOL_DENY } from "../security/dangerous-tools.js"; -export type GatewayScopedToolSurface = "http" | "loopback"; +type GatewayScopedToolSurface = "http" | "loopback"; export function resolveGatewayScopedTools(params: { cfg: OpenClawConfig; diff --git a/src/gateway/tools-invoke-shared.ts b/src/gateway/tools-invoke-shared.ts index f58873df48a..37581399fba 100644 --- a/src/gateway/tools-invoke-shared.ts +++ b/src/gateway/tools-invoke-shared.ts @@ -30,13 +30,9 @@ export type ToolsInvokeInput = { dryRun?: unknown; }; -export type ToolsInvokeErrorType = - | "invalid_request" - | "not_found" - | "tool_call_blocked" - | "tool_error"; +type ToolsInvokeErrorType = "invalid_request" | "not_found" | "tool_call_blocked" | "tool_error"; -export type ToolsInvokeOutcome = +type ToolsInvokeOutcome = | { ok: true; status: 200;