mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-30 13:13:25 +00:00
fix(agents): make injected MCP launch requirements explicit
Optional injected servers must survive persistence and reload without turning missing transport support into launch refusal. Required external and plugin servers keep their existing refusal. Advertise the optional MCP contract so older hosts retain established strict launch behavior.
This commit is contained in:
@@ -515,6 +515,8 @@ export interface ToolPolicy {
|
||||
}
|
||||
|
||||
export interface AgentSessionConfig {
|
||||
/** Per-server launch requirement; unspecified servers are required. */
|
||||
mcpServerRequirements?: Record<string, "optional" | "required">;
|
||||
provider: AgentProvider;
|
||||
cwd: string;
|
||||
/**
|
||||
|
||||
@@ -494,6 +494,7 @@ const AgentSessionConfigSchema = z.object({
|
||||
enforcement: z.enum(["required", "if-supported"]).optional(),
|
||||
}).optional(),
|
||||
systemPrompt: z.string().optional(),
|
||||
mcpServerRequirements: z.record(z.string(), z.enum(["optional", "required"])).optional(),
|
||||
mcpServers: z.record(z.string(), McpServerConfigSchema).optional(),
|
||||
});
|
||||
|
||||
@@ -3673,6 +3674,7 @@ export const ServerInfoStatusPayloadSchema = z
|
||||
internalWorkspaces: z.boolean().optional(),
|
||||
backgroundWorkspaces: z.boolean().optional(),
|
||||
providersSnapshot: z.boolean().optional(),
|
||||
optionalMcpSupport: z.boolean().optional(),
|
||||
connectedHosts: z.boolean().optional(),
|
||||
hostMultiplexing: z.boolean().optional(),
|
||||
usageSources: z.boolean().optional(),
|
||||
|
||||
Reference in New Issue
Block a user