From 48b39bffbe29315b1207e3a787dbdbc94748c6a5 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 1 May 2026 10:51:45 +0100 Subject: [PATCH] refactor: remove stale extension helpers --- .../google-meet/src/transports/chrome.ts | 4 ---- .../src/mattermost/slash-commands.ts | 16 ------------- .../synology-chat/src/channel.test-mocks.ts | 23 ------------------- extensions/xai/src/code-execution-shared.ts | 13 ----------- 4 files changed, 56 deletions(-) diff --git a/extensions/google-meet/src/transports/chrome.ts b/extensions/google-meet/src/transports/chrome.ts index f89c13dd34f..f5c6f13f9ec 100644 --- a/extensions/google-meet/src/transports/chrome.ts +++ b/extensions/google-meet/src/transports/chrome.ts @@ -699,10 +699,6 @@ export async function recoverCurrentMeetTabOnNode(params: { }; } -export type GoogleMeetCurrentTabRecoveryResult = Awaited< - ReturnType ->; - export async function launchChromeMeetOnNode(params: { runtime: PluginRuntime; config: GoogleMeetConfig; diff --git a/extensions/mattermost/src/mattermost/slash-commands.ts b/extensions/mattermost/src/mattermost/slash-commands.ts index f85c6bee873..eee3a277584 100644 --- a/extensions/mattermost/src/mattermost/slash-commands.ts +++ b/extensions/mattermost/src/mattermost/slash-commands.ts @@ -537,22 +537,6 @@ export function isSlashCommandsEnabled(config: MattermostSlashCommandConfig): bo return false; } -export function collectMattermostSlashCallbackPaths(raw?: Partial) { - const config = resolveSlashCommandConfig(raw); - const paths = new Set([config.callbackPath]); - if (typeof config.callbackUrl === "string" && config.callbackUrl.trim()) { - try { - const pathname = new URL(config.callbackUrl).pathname; - if (pathname) { - paths.add(pathname); - } - } catch { - // Ignore invalid callback URLs and keep the normalized callback path only. - } - } - return [...paths]; -} - /** * Build the callback URL that Mattermost will POST to when a command is invoked. */ diff --git a/extensions/synology-chat/src/channel.test-mocks.ts b/extensions/synology-chat/src/channel.test-mocks.ts index 9201072cd80..ec8b52201a3 100644 --- a/extensions/synology-chat/src/channel.test-mocks.ts +++ b/extensions/synology-chat/src/channel.test-mocks.ts @@ -1,7 +1,6 @@ import type { IncomingMessage, ServerResponse } from "node:http"; import type { Mock } from "vitest"; import { vi } from "vitest"; -import type { ResolvedSynologyChatAccount } from "./types.js"; export type RegisteredRoute = { path: string; @@ -175,25 +174,3 @@ vi.mock("./runtime.js", () => ({ })), setSynologyRuntime: vi.fn(), })); - -export function makeSecurityAccount( - overrides: Partial = {}, -): ResolvedSynologyChatAccount { - return { - accountId: "default", - enabled: true, - token: "t", - incomingUrl: "https://nas/incoming", - nasHost: "h", - webhookPath: "/w", - webhookPathSource: "default", - dangerouslyAllowNameMatching: false, - dangerouslyAllowInheritedWebhookPath: false, - dmPolicy: "allowlist" as const, - allowedUserIds: [], - rateLimitPerMinute: 30, - botName: "Bot", - allowInsecureSsl: false, - ...overrides, - }; -} diff --git a/extensions/xai/src/code-execution-shared.ts b/extensions/xai/src/code-execution-shared.ts index c16595fcf56..3adbbeb6019 100644 --- a/extensions/xai/src/code-execution-shared.ts +++ b/extensions/xai/src/code-execution-shared.ts @@ -5,7 +5,6 @@ import { XAI_RESPONSES_ENDPOINT, } from "./responses-tool-shared.js"; import { - coerceXaiToolConfig, resolveNormalizedXaiToolModel, resolvePositiveIntegerToolConfig, } from "./tool-config-shared.js"; @@ -14,12 +13,6 @@ import { type XaiWebSearchResponse } from "./web-search-shared.js"; export const XAI_CODE_EXECUTION_ENDPOINT = XAI_RESPONSES_ENDPOINT; export const XAI_DEFAULT_CODE_EXECUTION_MODEL = "grok-4-1-fast"; -export type XaiCodeExecutionConfig = { - apiKey?: unknown; - model?: unknown; - maxTurns?: unknown; -}; - export type XaiCodeExecutionResponse = XaiWebSearchResponse & { output?: Array<{ type?: string; @@ -33,12 +26,6 @@ export type XaiCodeExecutionResult = { outputTypes: string[]; }; -export function resolveXaiCodeExecutionConfig( - config?: Record, -): XaiCodeExecutionConfig { - return coerceXaiToolConfig(config) as XaiCodeExecutionConfig; -} - export function resolveXaiCodeExecutionModel(config?: Record): string { return resolveNormalizedXaiToolModel({ config,