/** * ALLOWED_AGENT_ROOTS constraint system. * * When the ALLOWED_AGENT_ROOTS environment variable is set (comma-separated list of agent root names), * the server is constrained to only allow sessions using those specific agent roots * with their exact default MCP server configurations. * * This provides a way to lock down the server to only permit preconfigured invocations. */ import type { AgentRootInfo } from './types.js'; /** * Parse the ALLOWED_AGENT_ROOTS environment variable into a list of allowed agent root names. * Returns null if the env var is not set (meaning no restrictions). */ export declare function parseAllowedAgentRoots(envValue?: string): string[] | null; /** * Filter agent roots to only include those in the allowed list. * If allowedRoots is null, returns all agent roots (no filtering). */ export declare function filterAgentRoots(agentRoots: AgentRootInfo[], allowedRoots: string[] | null): AgentRootInfo[]; export interface AgentRootValidationResult { valid: boolean; error?: string; } /** * Validate a start_session request against the allowed agent roots constraints. * * When ALLOWED_AGENT_ROOTS is set: * - agent_root must be provided and must be one of the allowed agent root names * - mcp_servers must exactly match the default_mcp_servers of that agent root * (no more, no less — any deviation is rejected) * * Returns { valid: true } if the request is allowed, or { valid: false, error: string } if not. */ export declare function validateAgentRootConstraints(allowedRoots: string[] | null, agentRoots: AgentRootInfo[], agentRootName?: string, mcpServers?: string[]): AgentRootValidationResult; //# sourceMappingURL=allowed-agent-roots.d.ts.map