Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/components/AuthTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
} from "../lib/oauth-flow-types";
import { OAuthFlowProgress } from "./OAuthFlowProgress";
import { OAuthStateMachine } from "../lib/oauth-state-machine";
import { MCPServerConfig } from "@/shared/mcp-client-manager";
import { MCPServerConfig } from "@/sdk";

interface StatusMessageProps {
message: StatusMessage;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ChatTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { TooltipProvider } from "./ui/tooltip";
import { motion, AnimatePresence } from "framer-motion";
import { toast } from "sonner";
import { getDefaultTemperatureForModel } from "@/lib/chat-utils";
import { MCPServerConfig } from "@/shared/mcp-client-manager";
import { MCPServerConfig } from "@/sdk";
import { useConvexAuth } from "convex/react";
import { useAuth } from "@workos-inc/authkit-react";
import type { ServerWithName } from "@/hooks/use-app-state";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/PromptsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { MessageSquare, Play, RefreshCw, ChevronRight } from "lucide-react";
import { EmptyState } from "./ui/empty-state";
import JsonView from "react18-json-view";
import "react18-json-view/src/style.css";
import { MCPServerConfig, type MCPPrompt } from "@/shared/mcp-client-manager";
import { MCPServerConfig, type MCPPrompt } from "@/sdk";

interface PromptsTabProps {
serverConfig?: MCPServerConfig;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ResourcesTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
MCPServerConfig,
type MCPReadResourceResult,
type MCPResource,
} from "@/shared/mcp-client-manager";
} from "@/sdk";

interface ResourcesTabProps {
serverConfig?: MCPServerConfig;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ToolsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
} from "@/lib/mcp-tools-api";
import { validateToolOutput } from "@/lib/schema-utils";
import "react18-json-view/src/style.css";
import { MCPServerConfig } from "@/shared/mcp-client-manager";
import { MCPServerConfig } from "@/sdk";

type ToolMap = Record<string, Tool>;
type FormField = ToolFormField;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/chat/message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ToolCallDisplay } from "./tool-call";
import { getProviderLogoFromModel } from "./chat-helpers";
import { usePreferencesStore } from "@/stores/preferences/preferences-provider";
import { ModelDefinition } from "@/shared/types.js";
import { MCPServerConfig } from "@/shared/mcp-client-manager";
import { MCPServerConfig } from "@/sdk";

// Reusable Image Attachment Component
const ImageAttachment = ({
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/chat/tool-call.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ToolCall, ToolResult } from "@/lib/chat-types";
import { cn } from "@/lib/utils";
import { MCPIcon } from "../ui/mcp-icon";
import { UIResourceRenderer } from "@mcp-ui/client";
import { MCPServerConfig } from "@/shared/mcp-client-manager";
import { MCPServerConfig } from "@/sdk";
import { OpenAIComponentRenderer } from "./openai-component-renderer";

interface ToolCallDisplayProps {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/connection/server-card-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ComponentType } from "react";
import { Check, Loader2, Wifi, X } from "lucide-react";
import type { MCPServerConfig } from "@/shared/mcp-client-manager";
import type { MCPServerConfig } from "@/sdk";
import type { ConnectionStatus } from "@/state/app-types";

interface ConnectionStatusMeta {
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/use-app-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
getStoredTokens,
clearOAuthData,
} from "@/lib/mcp-oauth";
import { MCPServerConfig } from "@/shared/mcp-client-manager";
import { MCPServerConfig } from "@/sdk";
export type { ServerWithName } from "@/state/app-types";

export function useAppState() {
Expand Down
2 changes: 1 addition & 1 deletion client/src/state/app-types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MCPServerConfig } from "@/shared/mcp-client-manager";
import { MCPServerConfig } from "@/sdk";
import { OauthTokens } from "@/shared/types.js";

export type ConnectionStatus =
Expand Down
2 changes: 1 addition & 1 deletion client/src/state/mcp-api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MCPServerConfig } from "@/shared/mcp-client-manager";
import { MCPServerConfig } from "@/sdk";

export async function testConnection(
serverConfig: MCPServerConfig,
Expand Down
2 changes: 1 addition & 1 deletion client/src/state/server-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MCPServerConfig } from "@/shared/mcp-client-manager";
import { MCPServerConfig } from "@/sdk";
import {
HttpServerDefinition,
StdioServerDefinition,
Expand Down
4 changes: 3 additions & 1 deletion client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@/shared/*": ["../shared/*"]
"@/shared/*": ["../shared/*"],
"@/sdk": ["../sdk/index.ts"],
"@/sdk/*": ["../sdk/*"]
}
},
"include": ["src", "../shared/**/*.ts"],
Expand Down
2 changes: 1 addition & 1 deletion server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { fileURLToPath } from "url";

// Import routes
import mcpRoutes from "./routes/mcp/index.js";
import { MCPClientManager } from "@/shared/mcp-client-manager";
import { MCPClientManager } from "@/sdk";
import path from "path";

const __filename = fileURLToPath(import.meta.url);
Expand Down
2 changes: 1 addition & 1 deletion server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { serveStatic } from "@hono/node-server/serve-static";
import { readFileSync, existsSync } from "fs";
import { join, dirname, resolve } from "path";
import { fileURLToPath } from "url";
import { MCPClientManager } from "@/sdk";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Expand Down Expand Up @@ -61,7 +62,6 @@ function logBox(content: string, title?: string) {
import mcpRoutes from "./routes/mcp/index";
import { interceptorStore } from "./services/interceptor-store";
import "./types/hono"; // Type extensions
import { MCPClientManager } from "@/shared/mcp-client-manager";

// Utility function to extract MCP server config from environment variables
function getMCPConfigFromEnv() {
Expand Down
2 changes: 1 addition & 1 deletion server/routes/mcp/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
runBackendConversation,
} from "@/shared/backend-conversation";
import zodToJsonSchema from "zod-to-json-schema";
import { MCPClientManager } from "@/shared/mcp-client-manager";
import { MCPClientManager } from "@/sdk";

// Types
interface ElicitationResponse {
Expand Down
2 changes: 1 addition & 1 deletion server/routes/mcp/evals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
generateTestCases,
type DiscoveredTool,
} from "../../services/eval-agent";
import type { MCPClientManager } from "@/shared/mcp-client-manager";
import type { MCPClientManager } from "@/sdk";
import "../../types/hono";

function resolveServerIdsOrThrow(
Expand Down
2 changes: 1 addition & 1 deletion server/routes/mcp/servers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Hono } from "hono";
import type { MCPServerConfig } from "@/shared/mcp-client-manager";
import type { MCPServerConfig } from "@/sdk";
import "../../types/hono"; // Type extensions

const servers = new Hono();
Expand Down
2 changes: 1 addition & 1 deletion server/services/mcp-http-bridge.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MCPClientManager } from "@/shared/mcp-client-manager";
import { MCPClientManager } from "@/sdk";
import { z } from "zod";
import { zodToJsonSchema } from "zod-to-json-schema";

Expand Down
4 changes: 3 additions & 1 deletion server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@/shared/*": ["../shared/*"]
"@/shared/*": ["../shared/*"],
"@/sdk": ["../sdk/index.ts"],
"@/sdk/*": ["../sdk/*"]
},
"types": ["node"]
},
Expand Down
2 changes: 1 addition & 1 deletion server/types/hono.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { MCPClientManager } from "@/shared/mcp-client-manager";
import type { MCPClientManager } from "@/sdk";

// Extend Hono's context with our custom variables
declare module "hono" {
Expand Down
2 changes: 1 addition & 1 deletion server/utils/eval-transformer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MCPClientOptions } from "@mastra/mcp";
import { MCPClientManager, MCPServerConfig } from "@/shared/mcp-client-manager";
import { MCPClientManager, MCPServerConfig } from "@/sdk";
import {
LlmsConfig,
LlmsConfigSchema,
Expand Down