From d372cee155230d07be5a7d1b07631bf73b416338 Mon Sep 17 00:00:00 2001 From: John Smith Date: Mon, 30 Dec 2024 08:55:37 +1030 Subject: [PATCH] fix: Correct external service casing --- control-plane/src/modules/integrations/tavily.ts | 5 +++-- control-plane/src/modules/integrations/toolhouse.ts | 5 +++-- control-plane/src/modules/integrations/valtown.ts | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/control-plane/src/modules/integrations/tavily.ts b/control-plane/src/modules/integrations/tavily.ts index 1121e0d7..0bfc72e6 100644 --- a/control-plane/src/modules/integrations/tavily.ts +++ b/control-plane/src/modules/integrations/tavily.ts @@ -6,6 +6,7 @@ import { packer } from "../packer"; import { deleteServiceDefinition, upsertServiceDefinition } from "../service-definitions"; import { integrationSchema } from "./schema"; import { InstallableIntegration } from "./types"; +import { tavilyIntegration } from "./constants"; const TavilySearchParamsSchema = z.object({ query: z.string(), @@ -67,7 +68,7 @@ export async function searchTavily({ } const definition = { - name: "Tavily", + name: tavilyIntegration, functions: [ { name: "search", @@ -119,7 +120,7 @@ const syncTavilyService = async ({ clusterId, apiKey }: { clusterId: string; api await upsertServiceDefinition({ type: "permanent", - service: "Tavily", + service: tavilyIntegration, definition, owner: { clusterId }, }); diff --git a/control-plane/src/modules/integrations/toolhouse.ts b/control-plane/src/modules/integrations/toolhouse.ts index ce47dd7d..a5e50cce 100644 --- a/control-plane/src/modules/integrations/toolhouse.ts +++ b/control-plane/src/modules/integrations/toolhouse.ts @@ -11,6 +11,7 @@ import { logger } from "../observability/logger"; import { packer } from "../packer"; import { upsertServiceDefinition } from "../service-definitions"; import { InstallableIntegration } from "./types"; +import { toolhouseIntegration } from "./constants"; const ToolHouseResultSchema = z.array( z.object({ @@ -159,9 +160,9 @@ const syncToolHouseService = async ({ const tools = (await toolhouse.getTools()) as Anthropic.Messages.Tool[]; await upsertServiceDefinition({ - service: "ToolHouse", + service: toolhouseIntegration, definition: { - name: "ToolHouse", + name: toolhouseIntegration, functions: tools.map(tool => { return { name: toInferableName(tool.name), diff --git a/control-plane/src/modules/integrations/valtown.ts b/control-plane/src/modules/integrations/valtown.ts index b9d6ef75..9f13d7c8 100644 --- a/control-plane/src/modules/integrations/valtown.ts +++ b/control-plane/src/modules/integrations/valtown.ts @@ -7,6 +7,7 @@ import { packer } from "../packer"; import { deleteServiceDefinition, upsertServiceDefinition } from "../service-definitions"; import { integrationSchema } from "./schema"; import { InstallableIntegration } from "./types"; +import { valtownIntegration } from "./constants"; // Schema for the /meta endpoint response const valtownMetaSchema = z.object({ @@ -93,9 +94,9 @@ const syncValTownService = async ({ await upsertServiceDefinition({ type: "permanent", - service: "valtown", + service: valtownIntegration, definition: { - name: "valtown", + name: valtownIntegration, description: meta.description, functions: meta.functions.map(fn => ({ name: fn.name,