diff --git a/package.json b/package.json index db7ff94e13e..e43177b655c 100644 --- a/package.json +++ b/package.json @@ -271,6 +271,10 @@ "types": "./dist/plugin-sdk/cli-backend.d.ts", "default": "./dist/plugin-sdk/cli-backend.js" }, + "./plugin-sdk/telegram-command-config": { + "types": "./dist/plugin-sdk/telegram-command-config.d.ts", + "default": "./dist/plugin-sdk/telegram-command-config.js" + }, "./plugin-sdk/hook-runtime": { "types": "./dist/plugin-sdk/hook-runtime.d.ts", "default": "./dist/plugin-sdk/hook-runtime.js" diff --git a/scripts/lib/plugin-sdk-entrypoints.json b/scripts/lib/plugin-sdk-entrypoints.json index 9edaf3c690f..98428baa7e2 100644 --- a/scripts/lib/plugin-sdk-entrypoints.json +++ b/scripts/lib/plugin-sdk-entrypoints.json @@ -221,6 +221,7 @@ "state-paths", "synthetic", "target-resolver-runtime", + "telegram-command-config", "thread-ownership", "tlon", "tool-send", diff --git a/src/plugins/contracts/provider-family-plugin-tests.test.ts b/src/plugins/contracts/provider-family-plugin-tests.test.ts index c164dbaba90..2104be820b2 100644 --- a/src/plugins/contracts/provider-family-plugin-tests.test.ts +++ b/src/plugins/contracts/provider-family-plugin-tests.test.ts @@ -2,7 +2,10 @@ import { readdirSync, readFileSync } from "node:fs"; import { dirname, relative, resolve, sep } from "node:path"; import { fileURLToPath } from "node:url"; import { describe, expect, it } from "vitest"; -import { BUNDLED_PLUGIN_ROOT_DIR, bundledPluginRoot } from "../../../test/helpers/bundled-plugin-paths.js"; +import { + BUNDLED_PLUGIN_ROOT_DIR, + bundledPluginRoot, +} from "../../../test/helpers/bundled-plugin-paths.js"; type SharedFamilyHookKind = "replay" | "stream" | "tool-compat"; @@ -39,6 +42,9 @@ const EXPECTED_SHARED_FAMILY_CONTRACTS: Record { const inventory = new Map(); - const replayPattern = - /buildProviderReplayFamilyHooks\s*\(\s*\{\s*family:\s*"([^"]+)"/gu; - const streamPattern = - /buildProviderStreamFamilyHooks\s*\(\s*"([^"]+)"/gu; - const toolCompatPattern = - /buildProviderToolCompatFamilyHooks\s*\(\s*"([^"]+)"/gu; + const replayPattern = /buildProviderReplayFamilyHooks\s*\(\s*\{\s*family:\s*"([^"]+)"/gu; + const streamPattern = /buildProviderStreamFamilyHooks\s*\(\s*"([^"]+)"/gu; + const toolCompatPattern = /buildProviderToolCompatFamilyHooks\s*\(\s*"([^"]+)"/gu; for (const filePath of listFiles(EXTENSIONS_DIR)) { if (!filePath.endsWith(".ts") || filePath.endsWith(".test.ts")) { @@ -183,7 +186,11 @@ function collectSharedFamilyAssignments(): Map 0) { - entry.replayFamilies = [...new Set([...(entry.replayFamilies ?? []), ...replayFamilies])].toSorted(); + entry.replayFamilies = [ + ...new Set([...(entry.replayFamilies ?? []), ...replayFamilies]), + ].toSorted(); } if (streamFamilies.length > 0) { - entry.streamFamilies = [...new Set([...(entry.streamFamilies ?? []), ...streamFamilies])].toSorted(); + entry.streamFamilies = [ + ...new Set([...(entry.streamFamilies ?? []), ...streamFamilies]), + ].toSorted(); } if (toolCompatFamilies.length > 0) { - entry.toolCompatFamilies = [...new Set([...(entry.toolCompatFamilies ?? []), ...toolCompatFamilies])].toSorted(); + entry.toolCompatFamilies = [ + ...new Set([...(entry.toolCompatFamilies ?? []), ...toolCompatFamilies]), + ].toSorted(); } inventory.set(pluginId, entry); } diff --git a/test/helpers/plugins/provider-discovery-contract.ts b/test/helpers/plugins/provider-discovery-contract.ts index bfe5cf8e1d6..b437852a64d 100644 --- a/test/helpers/plugins/provider-discovery-contract.ts +++ b/test/helpers/plugins/provider-discovery-contract.ts @@ -206,6 +206,10 @@ function installDiscoveryHooks( }); vi.doMock(bundledProviderModules.vllmApiModuleId, async () => { return { + VLLM_DEFAULT_API_KEY_ENV_VAR: "VLLM_API_KEY", + VLLM_DEFAULT_BASE_URL: "http://127.0.0.1:8000/v1", + VLLM_MODEL_PLACEHOLDER: "meta-llama/Meta-Llama-3-8B-Instruct", + VLLM_PROVIDER_LABEL: "vLLM", buildVllmProvider: (...args: unknown[]) => buildVllmProviderMock(...args), }; });