import { M as MCPClientManager, c as HostExecutor, C as CustomProvider, d as HostSource, P as PromptOptions, e as PromptResult, f as MCPServerReplayConfig, T as ToolCall, g as LatencyBreakdown, h as EvalExpectedToolCall, i as MCPJamReportingConfig, R as ReportEvalResultsInput, j as ReportEvalResultsOutput, k as EvalResultInput, l as EvalCiMetadata } from './index-B5O2YzC_.js';
export { b as CompatibleProtocol, m as CoreAssistantMessage, n as CoreMessage, o as CoreToolMessage, p as CoreUserMessage, q as EvalArgumentMismatch, E as EvalMatchOptions, r as EvalOutOfOrderToolCall, s as EvalToolCall, t as EvalToolCallMatchResult, a as EvalTraceInput, u as EvalTraceSpanCategory, v as EvalTraceSpanInput, w as EvalWidgetCsp, x as EvalWidgetPermissions, y as EvalWidgetSnapshotInput, H as Host, z as HostRuntime, A as HostRuntimeDefaults, B as HostRuntimeManager, D as HostServerRegistry, F as LLMConfig, L as LLMProvider, G as PromptResultData, I as TokenUsage, J as assertHostServersKnown, K as evaluateToolCalls, N as isChatGPTAppTool, O as isHostJson, Q as isMcpAppTool, S as resolveKnownServerIds, U as scrubMetaAndStructuredContentFromToolResult, V as scrubMetaFromToolResult, W as snapshotHostSource } from './index-B5O2YzC_.js';
import { M as MCPServerConfig, R as RpcLogger, a as RetryPolicy, j as MCPReadResourceResult, p as Tool, A as AiSdkTool } from './types-BJY6bi4K.js';
export { B as BaseServerConfig, C as ClientCapabilityOptions, D as DEFAULT_RETRY_POLICY, q as ElicitationCallback, r as ElicitationCallbackRequest, s as ElicitationHandler, E as ExecuteToolArguments, t as ExecuteToolRequest, H as HttpServerConfig, L as ListToolsResult, u as LiveClientState, e as MCPClientManagerConfig, v as MCPClientManagerOptions, f as MCPConnectionStatus, g as MCPGetPromptResult, h as MCPListTasksResult, b as MCPPrompt, i as MCPPromptListResult, d as MCPResource, k as MCPResourceListResult, c as MCPResourceTemplate, l as MCPResourceTemplateListResult, w as MCPServerSummary, m as MCPTask, n as MCPTaskStatus, P as ProgressEvent, x as ProgressHandler, y as RegisteredServerState, z as RpcLogEvent, S as ServerSummary, o as StdioServerConfig, T as TaskOptions, F as ToolExecuteOptions, U as UnauthorizedRefreshHandler, G as UnauthorizedRefreshResult, I as isRetryableTransientError, J as normalizeRetryPolicy, K as retryWithPolicy } from './types-BJY6bi4K.js';
export { ElicitResult } from '@modelcontextprotocol/client';
import { X as OAuthStepInfo, f as OAuthProtocolMode, g as OAuthRegistrationMode, p as ResolvedAuthorizationPlan } from './sandbox-policy-0r2_ft6V.js';
export { A as AuthorizationDiscoverySnapshot, a as AuthorizationPlanCapabilities, b as AuthorizationPlanInput, C as ConformanceSuiteId, c as ConformanceSupport, E as EffectiveSandboxCsp, d as EffectiveSandboxPermissions, M as MCP_UI_EXTENSION_ID, e as MCP_UI_RESOURCE_MIME_TYPE, O as OAuthAuthorizationRequestResult, h as OAuthRegistrationStrategy, i as OAuthStateMachineRunConfig, j as OAuthStateMachineRunResult, k as OAuthTraceProjectionContext, l as OAuthTraceSnapshot, m as OAuthTraceStepSnapshot, n as OAuthTraceStepStatus, R as ResolveSandboxCspArgs, o as ResolveSandboxPermissionsArgs, q as ResourceDeclaredCsp, r as RunServerDoctorInput, S as SandboxCspDomainSet, s as SandboxCspMode, t as SandboxCspPolicy, u as SandboxPermissionsMode, v as SandboxPermissionsPolicy, w as ServerDoctorDependencies, x as applyRuntimeClientCapabilities, y as canRunConformance, Y as collectConnectedServerDoctorState, B as createOAuthTraceProjectionContext, D as getDefaultClientCapabilities, J as isHttpServerConfig, K as mergeClientCapabilities, L as normalizeClientCapabilities, N as projectOAuthTraceSnapshot, Q as resolveAuthorizationPlan, T as resolveRegistrationStrategies, U as resolveSandboxCsp, V as resolveSandboxPermissions, W as runOAuthStateMachine, Z as runServerDoctor } from './sandbox-policy-0r2_ft6V.js';
export { a as MCP_PROTOCOL_VERSIONS, M as McpProtocolVersion, i as isKnownProtocolVersion, b as isStatelessProtocolVersion } from './mcp-protocol-version-cf74324S.js';
import { O as OAuthProtocolVersion, R as RegistrationStrategy2025_03_26, k as RegistrationStrategy2025_06_18, l as RegistrationStrategy2025_11_25, o as OAuthFlowStep, I as InfoLogEntry, H as HttpHistoryEntry, j as OAuthDynamicRegistrationMetadata, v as OAuthHttpRequest, s as OAuthRequestResult, m as OAuthFlowState } from './server-doctor-core-D4xjC7Kq.js';
export { C as ConnectedServerDoctorState, P as ProbeHttpAttempt, a as ProbeInitializeInfo, b as ProbeMcpServerConfig, c as ProbeMcpServerResult, d as ProbeOAuthDetails, e as ProbeTransportResult, f as ServerDoctorCheck, g as ServerDoctorChecks, h as ServerDoctorConnection, i as ServerDoctorError, S as ServerDoctorResult, w as normalizeServerDoctorError, p as probeMcpServer, r as redactSensitiveValue } from './server-doctor-core-D4xjC7Kq.js';
import { ToolSet } from 'ai';
export { StopCondition, hasToolCall, stepCountIs } from 'ai';
import { b as HostJson } from './public-types-c84qENXu.js';
export { C as CspDomainSet, H as HostConnectionDefaults, a as HostInit, c as HostMcp, d as HostServerOverride, e as HostStyleId, M as McpAppsCapabilities, O as OpenAiAppsCapabilities, S as ServerId } from './public-types-c84qENXu.js';
import { H as HostExecutionPolicy } from './tool-visibility-BcyAmAvf.js';
export { F as FinalizeEvalPassedParams, m as finalizePassedForEval, n as isCallToolResultError, t as traceIndicatesToolExecutionFailure, o as traceMessagePartIndicatesToolFailure } from './eval-tool-execution-B_uojivj.js';
export { BaseUrls, CreateModelOptions, PROVIDER_PRESETS, ParsedLLMString, ProviderLanguageModel, createCustomProvider, createModelFromString, parseLLMString, parseModelIds } from './model-factory.js';
export { EXPLORE_TO_SDK_EVALS_SKILL_MD, SKILL_MD } from './skill-reference.js';
import { z } from 'zod';
export { GetPromptParams, ListPromptsMultiParams, ListPromptsParams, ListResourcesParams, ListToolsParams, ReadResourceParams, WithEphemeralClientOptions, getPrompt, listPrompts, listPromptsMulti, listResources, listTools, readResource, withDisposableManager, withEphemeralClient } from './operations.js';
import '@ai-sdk/openai';

/**
 * Custom error classes for MCP SDK
 */
/**
 * Base error class for all MCP SDK errors
 */
declare class MCPError extends Error {
    readonly code: string;
    constructor(message: string, code: string, options?: {
        cause?: unknown;
    });
}
/**
 * Authentication error - thrown for 401, token expired, invalid token, etc.
 */
declare class MCPAuthError extends MCPError {
    readonly statusCode?: number | undefined;
    constructor(message: string, statusCode?: number | undefined, options?: {
        cause?: unknown;
    });
}
/**
 * Type guard to check if an error is an MCPAuthError
 */
declare function isMCPAuthError(error: unknown): error is MCPAuthError;
/**
 * Checks if an error is an authentication-related error.
 * Detects auth errors by:
 * 1. Error class name (UnauthorizedError from MCP SDK)
 * 2. HTTP status codes (401, 403) from transport errors
 * 3. Common auth-related patterns in error messages (case-insensitive)
 */
declare function isAuthError(error: unknown): {
    isAuth: boolean;
    statusCode?: number;
};

type SdkErrorOptions = {
    cause?: unknown;
};
declare class SdkError extends Error {
    readonly code: string;
    constructor(message: string, code: string, options?: SdkErrorOptions);
}
type EvalReportingErrorOptions = SdkErrorOptions & {
    statusCode?: number;
    endpoint?: string;
    attemptCount?: number;
};
declare class EvalReportingError extends SdkError {
    readonly statusCode?: number;
    readonly endpoint?: string;
    readonly attemptCount?: number;
    constructor(message: string, options?: EvalReportingErrorOptions);
}

interface ServerSnapshotTool {
    name: string;
    description?: string;
    inputSchema?: unknown;
    outputSchema?: unknown;
}
interface ServerSnapshotResource {
    uri: string;
    name?: string;
    description?: string;
    mimeType?: string;
}
interface ServerSnapshotResourceTemplate {
    uriTemplate: string;
    name?: string;
    description?: string;
    mimeType?: string;
}
interface ServerSnapshotPrompt {
    name: string;
    description?: string;
    arguments?: unknown;
}
interface CollectedServerSnapshot<TTarget = unknown> {
    target: TTarget;
    generatedAt: string;
    initInfo: unknown | null;
    capabilities: unknown | null;
    tools: ServerSnapshotTool[];
    toolsMetadata: Record<string, unknown>;
    resources: ServerSnapshotResource[];
    resourceTemplates: ServerSnapshotResourceTemplate[];
    resourceTemplatesSupported: boolean;
    prompts: ServerSnapshotPrompt[];
    warnings?: string[];
}
interface RawServerSnapshot<TTarget = unknown> {
    target: TTarget;
    exportedAt: string;
    initInfo: unknown | null;
    capabilities: unknown | null;
    tools: ServerSnapshotTool[];
    toolsMetadata: Record<string, unknown>;
    resources: ServerSnapshotResource[];
    resourceTemplates: ServerSnapshotResourceTemplate[];
    prompts: ServerSnapshotPrompt[];
}
interface StableServerSnapshot<TTarget = unknown> {
    kind: "server-snapshot";
    schemaVersion: 1;
    target: TTarget;
    initInfo: unknown | null;
    capabilities: unknown | null;
    tools: ServerSnapshotTool[];
    toolsMetadata: Record<string, unknown>;
    resources: ServerSnapshotResource[];
    resourceTemplates: ServerSnapshotResourceTemplate[];
    resourceTemplatesSupported: boolean;
    prompts: ServerSnapshotPrompt[];
}
interface NormalizedServerSnapshot<TTarget = unknown> {
    target: TTarget;
    initInfo: unknown | null;
    capabilities: unknown | null;
    tools: ServerSnapshotTool[];
    toolsMetadata: Record<string, unknown>;
    resources: ServerSnapshotResource[];
    resourceTemplates: ServerSnapshotResourceTemplate[];
    resourceTemplatesSupported: boolean | null;
    prompts: ServerSnapshotPrompt[];
}
interface CollectServerSnapshotInput<TTarget = unknown> {
    config: MCPServerConfig;
    target: TTarget;
    timeout: number;
    rpcLogger?: RpcLogger;
    retryPolicy?: RetryPolicy;
    clientName?: string;
    serverId?: string;
}
type WithSnapshotManager = <T>(config: MCPServerConfig, fn: (manager: MCPClientManager, serverId: string) => Promise<T>, options?: {
    timeout?: number;
    rpcLogger?: RpcLogger;
    retryPolicy?: RetryPolicy;
    clientName?: string;
    serverId?: string;
}) => Promise<T>;
interface ServerSnapshotDependencies {
    withManager?: WithSnapshotManager;
    now?: () => Date;
}
declare class ServerSnapshotFormatError extends Error {
    constructor(message: string);
}
declare function collectServerSnapshot<TTarget = unknown>(input: CollectServerSnapshotInput<TTarget>, dependencies?: ServerSnapshotDependencies): Promise<CollectedServerSnapshot<TTarget>>;
declare function collectConnectedServerSnapshot<TTarget = unknown>(manager: MCPClientManager, serverId: string, target: TTarget, dependencies?: Pick<ServerSnapshotDependencies, "now">): Promise<CollectedServerSnapshot<TTarget>>;
declare function serializeServerSnapshot<TTarget = unknown>(snapshot: CollectedServerSnapshot<TTarget>, options?: {
    mode?: "raw" | "stable";
    now?: () => Date;
}): RawServerSnapshot<TTarget> | StableServerSnapshot<TTarget>;
declare function serializeStableServerSnapshot<TTarget = unknown>(snapshot: CollectedServerSnapshot<TTarget>): StableServerSnapshot<TTarget>;
declare function normalizeServerSnapshot<TTarget = unknown>(snapshot: unknown): NormalizedServerSnapshot<TTarget>;

type StructuredCaseClassification = "breaking" | "non_breaking" | "informational";
interface StructuredCaseResult {
    id: string;
    title: string;
    category: string;
    passed: boolean;
    classification?: StructuredCaseClassification;
    durationMs?: number;
    error?: string;
    details?: unknown;
}
interface StructuredSummaryBucket {
    total: number;
    passed: number;
    failed: number;
}
interface StructuredRunSummary {
    total: number;
    passed: number;
    failed: number;
    byCategory: Record<string, StructuredSummaryBucket>;
    byClassification?: Record<string, StructuredSummaryBucket>;
}
interface StructuredRunReport {
    schemaVersion: 1;
    kind: string;
    passed: boolean;
    summary: StructuredRunSummary;
    cases: StructuredCaseResult[];
    durationMs: number;
    metadata: Record<string, unknown>;
}
declare function summarizeStructuredCases(cases: StructuredCaseResult[]): StructuredRunSummary;
declare function renderStructuredRunJson(report: StructuredRunReport): StructuredRunReport;
declare function renderStructuredRunJUnitXml(report: StructuredRunReport): string;

type SnapshotDiffClassification = StructuredCaseClassification;
type SnapshotDiffEntityType = "tools" | "resources" | "resourceTemplates" | "prompts" | "initInfo" | "capabilities";
type SnapshotDiffChangeType = "added" | "removed" | "modified";
type SnapshotDiffFailOn = "breaking" | "any" | "none";
interface SnapshotFieldChange {
    field: string;
    changeType: SnapshotDiffChangeType;
    classification: SnapshotDiffClassification;
    reason?: string;
    before?: unknown;
    after?: unknown;
}
interface SnapshotEntityChange {
    entityType: SnapshotDiffEntityType;
    entityId: string;
    changeType: SnapshotDiffChangeType;
    classification: SnapshotDiffClassification;
    before?: unknown;
    after?: unknown;
    fieldChanges: SnapshotFieldChange[];
}
interface SnapshotEntityClassificationSummary {
    total: number;
    breaking: number;
    non_breaking: number;
    informational: number;
}
interface SnapshotDiffSummary {
    totalChanges: number;
    byClassification: Record<SnapshotDiffClassification, number>;
    byEntityType: Record<SnapshotDiffEntityType, SnapshotEntityClassificationSummary>;
}
interface SnapshotSurfaceSummary {
    tools: number;
    resources: number;
    resourceTemplates: number;
    prompts: number;
    toolsMetadata: number;
    hasInitInfo: boolean;
    hasCapabilities: boolean;
}
interface ServerSnapshotDiffResult {
    passed: boolean;
    failOn: SnapshotDiffFailOn;
    summary: SnapshotDiffSummary;
    changes: SnapshotEntityChange[];
    baselineSummary: SnapshotSurfaceSummary;
    currentSummary: SnapshotSurfaceSummary;
}
interface DiffServerSnapshotsOptions {
    failOn?: SnapshotDiffFailOn;
}
interface CollectAndDiffServerSnapshotInput<TTarget = unknown> extends CollectServerSnapshotInput<TTarget> {
    baseline: unknown;
    failOn?: SnapshotDiffFailOn;
}
declare function collectAndDiffServerSnapshot<TTarget = unknown>(input: CollectAndDiffServerSnapshotInput<TTarget>): Promise<ServerSnapshotDiffResult>;
declare function diffServerSnapshots(left: unknown, right: unknown, options?: DiffServerSnapshotsOptions): ServerSnapshotDiffResult;
declare function buildServerDiffReport(diff: ServerSnapshotDiffResult, options?: {
    durationMs?: number;
    metadata?: Record<string, unknown>;
}): StructuredRunReport;

interface ToolCallEnvelopeValidationDetails {
    topLevelType: string;
    hasContent: boolean;
    contentItemTypes: string[];
    isError: boolean;
}
interface ToolCallEnvelopeValidationResult {
    passed: boolean;
    errors: string[];
    warnings: string[];
    details: ToolCallEnvelopeValidationDetails;
}
interface ToolCallOutcomePolicy {
    failOnIsError?: boolean;
}
interface ToolCallOutcomeEvaluationResult {
    passed: boolean;
    errors: string[];
    warnings: string[];
    details: {
        isError: boolean;
        failOnIsError: boolean;
    };
}
interface ToolCallValidationResult {
    passed: boolean;
    envelope?: ToolCallEnvelopeValidationResult;
    outcome?: ToolCallOutcomeEvaluationResult;
    errors: string[];
    warnings: string[];
    details: Partial<ToolCallEnvelopeValidationDetails> & {
        failOnIsError?: boolean;
    };
}
declare function validateToolCallEnvelope(result: unknown): ToolCallEnvelopeValidationResult;
declare function evaluateToolCallOutcome(result: unknown, policy?: ToolCallOutcomePolicy): ToolCallOutcomeEvaluationResult;
declare function validateToolCallResult(result: unknown, options?: {
    envelope?: boolean;
    outcome?: ToolCallOutcomePolicy;
}): ToolCallValidationResult;
declare function buildToolCallValidationReport(result: ToolCallValidationResult, options?: {
    durationMs?: number;
    rawResult?: unknown;
    metadata?: Record<string, unknown>;
}): StructuredRunReport;

declare const MCP_CHECK_CATEGORIES: readonly ["core", "protocol", "tools", "prompts", "resources", "security", "transport"];
type MCPCheckCategory = (typeof MCP_CHECK_CATEGORIES)[number];
declare const MCP_CHECK_IDS: readonly ["server-initialize", "ping", "logging-set-level", "completion-complete", "capabilities-consistent", "tools-list", "tools-input-schemas-valid", "prompts-list", "resources-list", "protocol-invalid-method-error", "localhost-host-rebinding-rejected", "localhost-host-valid-accepted", "server-sse-polling-session", "server-accepts-multiple-post-streams", "server-sse-streams-functional"];
type MCPCheckId = (typeof MCP_CHECK_IDS)[number];
type MCPCheckStatus = "passed" | "failed" | "skipped";
interface MCPCheckResult {
    id: MCPCheckId;
    category: MCPCheckCategory;
    title: string;
    description: string;
    status: MCPCheckStatus;
    durationMs: number;
    error?: {
        message: string;
        details?: unknown;
    };
    details?: Record<string, unknown>;
}
interface MCPConformanceConfig {
    serverUrl: string;
    accessToken?: string;
    customHeaders?: Record<string, string>;
    checkTimeout?: number;
    categories?: MCPCheckCategory[];
    checkIds?: MCPCheckId[];
    fetchFn?: typeof fetch;
    clientName?: string;
}
interface MCPConformanceResult {
    passed: boolean;
    serverUrl: string;
    checks: MCPCheckResult[];
    summary: string;
    durationMs: number;
    categorySummary: Record<MCPCheckCategory, {
        total: number;
        passed: number;
        failed: number;
        skipped: number;
    }>;
}
interface MCPConformanceSuiteConfig {
    name?: string;
    serverUrl: string;
    defaults?: Partial<Omit<MCPConformanceConfig, "serverUrl">>;
    runs: Array<Partial<Omit<MCPConformanceConfig, "serverUrl">> & {
        label?: string;
    }>;
}
interface MCPConformanceSuiteResult {
    name: string;
    serverUrl: string;
    passed: boolean;
    results: Array<MCPConformanceResult & {
        label: string;
    }>;
    summary: string;
    durationMs: number;
}

declare class MCPConformanceTest {
    private readonly config;
    constructor(config: MCPConformanceConfig);
    run(): Promise<MCPConformanceResult>;
}

declare class MCPConformanceSuite {
    private readonly config;
    constructor(config: MCPConformanceSuiteConfig);
    run(): Promise<MCPConformanceSuiteResult>;
}

type OAuthConformanceCheckId = "oauth_dcr_http_redirect_uri" | "oauth_invalid_client" | "oauth_invalid_authorize_redirect" | "oauth_invalid_token" | "oauth_invalid_redirect" | "oauth_token_format";
/** A step in a conformance result: either a real flow step or a post-flow check. */
type ConformanceStepId = OAuthFlowStep | OAuthConformanceCheckId;
declare const CONFORMANCE_CHECK_METADATA: Record<OAuthConformanceCheckId, OAuthStepInfo>;
type OAuthRegistrationStrategy = RegistrationStrategy2025_03_26 | RegistrationStrategy2025_06_18 | RegistrationStrategy2025_11_25;
type OAuthPublicClientMetadata = OAuthDynamicRegistrationMetadata;
type OAuthConformanceAuthConfig = {
    mode: "interactive";
    openUrl?: (url: string) => Promise<void>;
} | {
    mode: "headless";
} | {
    mode: "client_credentials";
    clientId: string;
    clientSecret: string;
};
interface OAuthConformanceClientConfig {
    preregistered?: {
        clientId: string;
        clientSecret?: string;
    };
    dynamicRegistration?: Partial<OAuthPublicClientMetadata>;
    clientIdMetadataUrl?: string;
}
interface OAuthConformanceConfig {
    serverUrl: string;
    protocolVersion: OAuthProtocolVersion;
    registrationStrategy: OAuthRegistrationStrategy;
    auth?: OAuthConformanceAuthConfig;
    client?: OAuthConformanceClientConfig;
    scopes?: string;
    customHeaders?: Record<string, string>;
    redirectUrl?: string;
    fetchFn?: typeof fetch;
    stepTimeout?: number;
    verification?: OAuthVerificationConfig;
    oauthConformanceChecks?: boolean;
    /** Optional callback for progress messages during the OAuth flow. */
    onProgress?: (message: string) => void;
}
interface StepResult {
    step: ConformanceStepId;
    title: string;
    summary: string;
    status: "passed" | "failed" | "skipped";
    durationMs: number;
    logs: InfoLogEntry[];
    http?: HttpHistoryEntry;
    httpAttempts: HttpHistoryEntry[];
    error?: {
        message: string;
        details?: unknown;
    };
    teachableMoments?: string[];
}
interface ConformanceResult {
    passed: boolean;
    protocolVersion: OAuthProtocolVersion;
    registrationStrategy: OAuthRegistrationStrategy;
    serverUrl: string;
    steps: StepResult[];
    summary: string;
    durationMs: number;
    credentials?: OAuthConformanceCredentials;
    verification?: VerificationResult;
}
interface OAuthConformanceCredentials {
    clientId?: string;
    clientSecret?: string;
    accessToken?: string;
    refreshToken?: string;
    tokenType?: string;
    expiresIn?: number;
}
interface NormalizedOAuthConformanceConfig {
    serverUrl: string;
    serverName: string;
    protocolVersion: OAuthProtocolVersion;
    registrationStrategy: OAuthRegistrationStrategy;
    auth: OAuthConformanceAuthConfig;
    client: OAuthConformanceClientConfig;
    scopes?: string;
    customHeaders?: Record<string, string>;
    redirectUrl?: string;
    fetchFn: typeof fetch;
    stepTimeout: number;
    verification: OAuthVerificationConfig;
    oauthConformanceChecks: boolean;
    onProgress: (message: string) => void;
}
interface TrackedRequestOptions {
    redirect?: RequestRedirect;
}
type TrackedRequestFn = (request: OAuthHttpRequest, options?: TrackedRequestOptions) => Promise<OAuthRequestResult>;
interface AuthorizationCodeResult {
    code: string;
}
interface ClientCredentialsResult {
    tokenResponse: OAuthRequestResult;
    accessToken: string;
    refreshToken?: string;
    tokenType?: string;
    expiresIn?: number;
}
/** Optional post-auth verification: connect to the MCP server and exercise tools. */
interface OAuthVerificationConfig {
    /** After successful OAuth, connect and call tools/list. Default: false. */
    listTools?: boolean;
    /** Also call the named tool with the given params after listing. */
    callTool?: {
        name: string;
        params?: Record<string, unknown>;
    };
    /** Timeout for verification steps in ms. Default: 30_000. */
    timeout?: number;
}
interface VerificationResult {
    listTools?: {
        passed: boolean;
        toolCount?: number;
        durationMs: number;
        error?: string;
    };
    callTool?: {
        passed: boolean;
        toolName: string;
        durationMs: number;
        error?: string;
    };
}
/** Shared default fields — all optional so they can be selectively overridden. */
type OAuthConformanceSuiteDefaults = Partial<Omit<OAuthConformanceConfig, "serverUrl">>;
/** Per-flow config — may omit fields provided by defaults. */
type OAuthConformanceSuiteFlow = Partial<Omit<OAuthConformanceConfig, "serverUrl">> & {
    /** Optional label for this flow (used in reporting). */
    label?: string;
};
/** Config for running multiple conformance flows against one server. */
interface OAuthConformanceSuiteConfig {
    /** Human-friendly name for the suite run. */
    name?: string;
    /** The MCP server URL. Shared across all flows. */
    serverUrl: string;
    /** Shared defaults applied to each flow unless overridden. */
    defaults?: OAuthConformanceSuiteDefaults;
    /** Each entry defines one flow in the matrix. Properties override defaults. */
    flows: OAuthConformanceSuiteFlow[];
}
/** Result for the entire suite run. */
interface OAuthConformanceSuiteResult {
    name: string;
    serverUrl: string;
    passed: boolean;
    results: Array<ConformanceResult & {
        label: string;
    }>;
    summary: string;
    durationMs: number;
}

interface ClientCredentialsInput {
    tokenEndpoint: string;
    clientId: string;
    clientSecret: string;
    tokenEndpointAuthMethod?: string;
    scope?: string;
    resource?: string;
    request: TrackedRequestFn;
}
declare function performClientCredentialsGrant({ tokenEndpoint, clientId, clientSecret, tokenEndpointAuthMethod, scope, resource, request, }: ClientCredentialsInput): Promise<ClientCredentialsResult>;

interface HeadlessAuthorizationInput {
    authorizationUrl: string;
    redirectUrl: string;
    expectedState?: string;
    request: TrackedRequestFn;
}
declare function completeHeadlessAuthorization({ authorizationUrl, redirectUrl, expectedState, request, }: HeadlessAuthorizationInput): Promise<AuthorizationCodeResult>;

interface InteractiveAuthorizationSession {
    redirectUrl: string;
    authorize(input: {
        authorizationUrl: string;
        expectedState?: string;
        timeoutMs: number;
        openUrl?: (url: string) => Promise<void>;
    }): Promise<AuthorizationCodeResult>;
    stop(): Promise<void>;
}
declare function createInteractiveAuthorizationSession(options?: {
    redirectUrl?: string;
}): Promise<InteractiveAuthorizationSession>;

interface OAuthConformanceRunnerDependencies {
    createInteractiveAuthorizationSession?: typeof createInteractiveAuthorizationSession;
    completeHeadlessAuthorization?: typeof completeHeadlessAuthorization;
    performClientCredentialsGrant?: typeof performClientCredentialsGrant;
    createDefaultRedirectUrl?: () => string;
}
declare class OAuthConformanceTest {
    private readonly config;
    private readonly deps;
    constructor(config: OAuthConformanceConfig, deps?: OAuthConformanceRunnerDependencies);
    run(): Promise<ConformanceResult>;
}

/**
 * Runs a matrix of OAuth conformance flows against a single MCP server.
 *
 * Each flow inherits shared `defaults` from the suite config and can
 * override any field. Flows run sequentially to avoid overwhelming
 * authorization servers with concurrent registrations.
 */
declare class OAuthConformanceSuite {
    private readonly config;
    constructor(config: OAuthConformanceSuiteConfig);
    run(): Promise<OAuthConformanceSuiteResult>;
}

declare function formatOAuthConformanceHuman(result: ConformanceResult): string;
declare function formatOAuthConformanceSuiteHuman(result: OAuthConformanceSuiteResult): string;

/**
 * Input produced by the OAuth conformance runner when it reaches the
 * authorization step and is waiting for a code.
 */
interface RemoteBrowserAuthorizationInput {
    authorizationUrl: string;
    expectedState?: string;
}
interface RemoteBrowserAuthorizationCode {
    code: string;
    state?: string;
}
/**
 * Controller for driving an interactive OAuth conformance run from a host that
 * cannot use a local loopback redirect — for example, the MCP Inspector server
 * (local or hosted mode), where the browser redirect comes back to a public
 * `/oauth/callback` route rather than a `127.0.0.1:NNNN/callback` loopback.
 *
 * Pass {@link RemoteBrowserAuthorizationController.createSession} as the
 * `createInteractiveAuthorizationSession` dependency of `OAuthConformanceTest`.
 * Then `await` {@link RemoteBrowserAuthorizationController.awaitAuthorizationUrl}
 * to learn the URL to show the user, and call
 * {@link RemoteBrowserAuthorizationController.deliverCode} from your callback
 * handler once the user completes authorization.
 */
interface RemoteBrowserAuthorizationController {
    /**
     * Resolves when the OAuth runner has produced an authorization URL and is
     * waiting for a code. Rejects if the runner fails before reaching that step.
     */
    readonly awaitAuthorizationUrl: Promise<RemoteBrowserAuthorizationInput>;
    /**
     * Deliver an authorization code from your user-facing callback. If
     * `expectedState` was captured and `state` here does not match, the pending
     * `authorize` call is rejected with a state-mismatch error.
     */
    deliverCode(result: RemoteBrowserAuthorizationCode): void;
    /**
     * Abort the flow with an error. Any pending `authorize` call — and the
     * `awaitAuthorizationUrl` promise if it has not yet resolved — are rejected.
     */
    fail(error: Error): void;
    /**
     * Pass this as the `createInteractiveAuthorizationSession` dep of
     * `OAuthConformanceTest`. The returned session shares state with the
     * controller: its `authorize` call resolves when `deliverCode` is invoked.
     */
    createSession(options?: {
        redirectUrl?: string;
    }): Promise<InteractiveAuthorizationSession>;
}
interface RemoteBrowserAuthorizationControllerOptions {
    /**
     * Public URL of the OAuth callback your host exposes, e.g.
     * `https://app.example.com/oauth/callback/debug`. This is sent to the
     * authorization server as the `redirect_uri` parameter.
     */
    redirectUrl: string;
    /**
     * Optional hard timeout in milliseconds to wait for a code after the auth
     * URL is surfaced. When omitted, the timeout passed by the runner
     * (`stepTimeout`) is used.
     */
    codeTimeoutMs?: number;
}
declare function createRemoteBrowserAuthorizationController(options: RemoteBrowserAuthorizationControllerOptions): RemoteBrowserAuthorizationController;

/**
 * Zod schema for the "OAuth conformance profile" input shape that hosts pass
 * from their UI/API layer into the runner. Mirrors the tunable subset of
 * {@link OAuthConformanceConfig} so callers don't have to reinvent it for
 * each route.
 *
 * All fields are optional — hosts can layer this on top of a resolved
 * `serverUrl` and fill in only what the user overrode.
 */
declare const oauthConformanceProfileSchema: z.ZodObject<{
    serverUrl: z.ZodOptional<z.ZodString>;
    protocolVersion: z.ZodOptional<z.ZodEnum<{
        "2025-03-26": "2025-03-26";
        "2025-06-18": "2025-06-18";
        "2025-11-25": "2025-11-25";
    }>>;
    registrationStrategy: z.ZodOptional<z.ZodEnum<{
        dcr: "dcr";
        preregistered: "preregistered";
        cimd: "cimd";
    }>>;
    clientId: z.ZodOptional<z.ZodString>;
    clientSecret: z.ZodOptional<z.ZodString>;
    scopes: z.ZodOptional<z.ZodString>;
    customHeaders: z.ZodOptional<z.ZodArray<z.ZodObject<{
        key: z.ZodString;
        value: z.ZodString;
    }, z.core.$strip>>>;
}, z.core.$strip>;
type OAuthConformanceProfile = z.infer<typeof oauthConformanceProfileSchema>;
/**
 * Flatten the `customHeaders: [{ key, value }]` array form that UIs use into
 * the `Record<string, string>` form the runner expects. Empty keys are
 * dropped so partially-filled UI rows don't create `""` headers.
 */
declare function normalizeCustomHeaders(input: OAuthConformanceProfile["customHeaders"] | undefined): Record<string, string> | undefined;

declare const MCP_APPS_CHECK_CATEGORIES: readonly ["tools", "resources"];
type MCPAppsCheckCategory = (typeof MCP_APPS_CHECK_CATEGORIES)[number];
declare const MCP_APPS_CHECK_IDS: readonly ["ui-tools-present", "ui-tool-metadata-valid", "ui-tool-input-schema-valid", "ui-listed-resources-valid", "ui-resources-readable", "ui-resource-contents-valid", "ui-resource-meta-valid"];
type MCPAppsCheckId = (typeof MCP_APPS_CHECK_IDS)[number];
type MCPAppsCheckStatus = "passed" | "failed" | "skipped";
interface MCPAppsCheckResult {
    id: MCPAppsCheckId;
    category: MCPAppsCheckCategory;
    title: string;
    description: string;
    status: MCPAppsCheckStatus;
    durationMs: number;
    error?: {
        message: string;
        details?: unknown;
    };
    details?: Record<string, unknown>;
    warnings?: string[];
}
type MCPAppsConformanceConfig = MCPServerConfig & {
    checkIds?: MCPAppsCheckId[];
};
type MCPAppsConformanceSuiteDefaults = Partial<Omit<MCPAppsConformanceConfig, keyof MCPServerConfig>>;
type MCPAppsConformanceSuiteRun = Partial<Omit<MCPAppsConformanceConfig, keyof MCPServerConfig>> & {
    label?: string;
};
interface MCPAppsResourceReadOutcome {
    uri: string;
    referencedByTools: string[];
    listed: boolean;
    result?: MCPReadResourceResult;
    error?: unknown;
}
interface MCPAppsConformanceResult {
    passed: boolean;
    target: string;
    checks: MCPAppsCheckResult[];
    summary: string;
    durationMs: number;
    categorySummary: Record<MCPAppsCheckCategory, {
        total: number;
        passed: number;
        failed: number;
        skipped: number;
    }>;
    discovery: {
        toolCount: number;
        uiToolCount: number;
        listedResourceCount: number;
        listedUiResourceCount: number;
        checkedUiResourceCount: number;
    };
}
interface MCPAppsConformanceSuiteConfig {
    name?: string;
    target: MCPServerConfig;
    defaults?: MCPAppsConformanceSuiteDefaults;
    runs: MCPAppsConformanceSuiteRun[];
}
interface MCPAppsConformanceSuiteResult {
    name: string;
    target: string;
    passed: boolean;
    results: Array<MCPAppsConformanceResult & {
        label: string;
    }>;
    summary: string;
    durationMs: number;
}

declare class MCPAppsConformanceTest {
    private readonly config;
    constructor(config: MCPAppsConformanceConfig);
    run(): Promise<MCPAppsConformanceResult>;
}

declare class MCPAppsConformanceSuite {
    private readonly config;
    private readonly target;
    constructor(config: MCPAppsConformanceSuiteConfig);
    run(): Promise<MCPAppsConformanceSuiteResult>;
}

type ConformanceReportKind = "protocol-conformance" | "oauth-conformance" | "apps-conformance";
type ConformanceReportCaseStatus = "passed" | "failed" | "skipped";
interface ConformanceReportCase {
    id: string;
    title: string;
    category: string;
    status: ConformanceReportCaseStatus;
    durationMs: number;
    description?: string;
    error?: string;
    details?: unknown;
    output?: string;
}
interface ConformanceReportGroup {
    id: string;
    title: string;
    target: string;
    passed: boolean;
    durationMs: number;
    summary?: string;
    cases: ConformanceReportCase[];
}
interface ConformanceReport {
    schemaVersion: 1;
    kind: ConformanceReportKind;
    name: string;
    passed: boolean;
    durationMs: number;
    groups: ConformanceReportGroup[];
}
type SupportedSingleConformanceResult = MCPConformanceResult | ConformanceResult | MCPAppsConformanceResult;
type SupportedSuiteConformanceResult = MCPConformanceSuiteResult | OAuthConformanceSuiteResult | MCPAppsConformanceSuiteResult;
type SupportedConformanceResult = SupportedSingleConformanceResult | SupportedSuiteConformanceResult;
declare function toConformanceReport(result: MCPConformanceResult): ConformanceReport;
declare function toConformanceReport(result: MCPConformanceSuiteResult): ConformanceReport;
declare function toConformanceReport(result: ConformanceResult): ConformanceReport;
declare function toConformanceReport(result: OAuthConformanceSuiteResult): ConformanceReport;
declare function toConformanceReport(result: MCPAppsConformanceResult): ConformanceReport;
declare function toConformanceReport(result: MCPAppsConformanceSuiteResult): ConformanceReport;
declare function toConformanceReport(result: SupportedConformanceResult): ConformanceReport;
declare function renderConformanceReportJson(report: ConformanceReport): ConformanceReport;
declare function renderConformanceReportJUnitXml(report: ConformanceReport): string;

interface OAuthLoginConfig extends Omit<OAuthConformanceConfig, "protocolVersion" | "registrationStrategy"> {
    protocolVersion?: OAuthProtocolVersion;
    registrationStrategy?: NormalizedOAuthConformanceConfig["registrationStrategy"] | undefined;
    protocolMode?: OAuthProtocolMode;
    registrationMode?: OAuthRegistrationMode;
}
interface OAuthLoginResult {
    completed: boolean;
    serverUrl: string;
    protocolVersion: NormalizedOAuthConformanceConfig["protocolVersion"];
    registrationStrategy?: NormalizedOAuthConformanceConfig["registrationStrategy"] | undefined;
    protocolMode: OAuthProtocolMode;
    registrationMode: OAuthRegistrationMode;
    authMode: NormalizedOAuthConformanceConfig["auth"]["mode"];
    redirectUrl: string;
    currentStep: OAuthFlowState["currentStep"];
    authorizationUrl?: string;
    authorizationPlan: ResolvedAuthorizationPlan;
    credentials: {
        clientId?: string;
        clientSecret?: string;
        accessToken?: string;
        refreshToken?: string;
        tokenType?: string;
        expiresIn?: number;
    };
    verification?: VerificationResult;
    error?: {
        message: string;
    };
    state: OAuthFlowState;
}
interface OAuthLoginDependencies {
    createInteractiveAuthorizationSession?: typeof createInteractiveAuthorizationSession;
    completeHeadlessAuthorization?: typeof completeHeadlessAuthorization;
    performClientCredentialsGrant?: typeof performClientCredentialsGrant;
    createDefaultRedirectUrl?: () => string;
}
declare function runOAuthLogin(input: OAuthLoginConfig, deps?: OAuthLoginDependencies): Promise<OAuthLoginResult>;

/**
 * HostRunner - Runs LLM prompts with tool calling for evals
 */

/**
 * Common fields for {@link HostRunnerConfig}. See the discriminated union
 * below for the `host` / `model` requirement: callers supply either a
 * `Host` (model + defaults come from the snapshot) or an explicit `model`
 * string (legacy path with no host-derived defaults).
 */
interface HostRunnerBaseConfig {
    /** Tools to provide to the LLM (Tool[] from manager.getTools() or AiSdkTool from manager.getToolsForAiSdk()) */
    tools: Tool[] | AiSdkTool;
    /** API key for the LLM provider */
    apiKey: string;
    /** System prompt for the LLM. Overrides the host-derived value when both are present. Defaults to "You are a helpful assistant." if neither is set. */
    systemPrompt?: string;
    /** Temperature for LLM responses (0-2). Overrides the host-derived value. Some models (e.g., reasoning models) don't support temperature. */
    temperature?: number;
    /** Maximum number of agentic steps/tool calls (default: 10) */
    maxSteps?: number;
    /** Custom providers registry for non-standard LLM providers */
    customProviders?: Map<string, CustomProvider> | Record<string, CustomProvider>;
    /** Optional MCP client manager for capturing MCP App replay snapshots */
    mcpClientManager?: MCPClientManager;
    /**
     * When true, the runner injects the OpenAI Apps SDK `window.openai`
     * shim into captured widget HTML so replays under hosts that expect
     * that surface (ChatGPT/Copilot or MCPJam's dev surface) render
     * unchanged. When a `host` is supplied, this defaults to the value
     * resolved from `resolveOpenAiCompatForHostConfig(hostSnapshot)`;
     * setting this field explicitly overrides that decision. Without a
     * host the default is `false` — Claude/Cursor/Codex-style hosts don't
     * expose `window.openai`, and snapshots should match what the live
     * host would have produced.
     */
    injectOpenAiCompat?: boolean;
}
/**
 * Configuration for creating a `HostRunner`. Discriminated on `host`:
 *
 * - With `host`: model / systemPrompt / temperature / injectOpenAiCompat
 *   default to host-snapshot-derived values; explicit fields override.
 *   `model` becomes optional (host snapshot supplies it).
 * - Without `host`: `model` is required and there are no host-derived
 *   defaults (legacy path, preserved for callers that don't yet have a
 *   `Host` to hand in).
 *
 * A config with neither `host` nor `model` is a compile-time error.
 */
type HostRunnerConfig = (HostRunnerBaseConfig & {
    host: HostSource;
    model?: string;
}) | (HostRunnerBaseConfig & {
    host?: undefined;
    model: string;
});

/**
 * Synchronous executor that runs LLM prompts with tool calling. Wraps the
 * AI SDK `generateText` and applies the host-derived execution policy
 * (visibility filtering, OpenAI compat injection) at construction time.
 *
 * Implements {@link HostExecutor} so it plugs into `EvalTest.run(...)` /
 * `EvalSuite.run(...)` interchangeably with `HostRuntime`.
 *
 * @example
 * ```typescript
 * const manager = new MCPClientManager({
 *   everything: { command: "npx", args: ["-y", "@modelcontextprotocol/server-everything"] },
 * });
 * await manager.connectToServer("everything");
 *
 * const runner = new HostRunner({
 *   tools: await manager.getToolsForAiSdk(["everything"]),
 *   model: "openai/gpt-4o",
 *   apiKey: process.env.OPENAI_API_KEY!,
 * });
 *
 * const result = await runner.run("Add 2 and 3");
 * console.log(result.toolsCalled()); // ["add"]
 * console.log(result.text); // "The result of adding 2 and 3 is 5."
 * ```
 */
declare class HostRunner implements HostExecutor {
    private readonly tools;
    /**
     * The original `config.tools` input as supplied to the constructor.
     * Preserved (pre-filter, pre-conversion) so `withOptions({ host: newHost })`
     * can hand the raw set back to the new constructor for re-filtering
     * under the replacement host's `respectToolVisibility` policy. Without
     * this, a clone with a stricter host would silently inherit the
     * parent's already-filtered/converted `AiSdkTool` and run with the
     * wrong visibility set.
     */
    private readonly rawTools;
    private readonly model;
    private readonly apiKey;
    private systemPrompt;
    private temperature;
    private readonly maxSteps;
    private readonly customProviders?;
    private readonly mcpClientManager?;
    private readonly injectOpenAiCompat;
    /**
     * Immutable host snapshot driving this runner, if constructed with a
     * `host`. Taken once at construction (via {@link snapshotHostSource}, which
     * passes a pre-snapshotted `HostJson` through unchanged so `HostRuntime`
     * does not double-snapshot). Post-construction mutations to the original
     * `Host` instance do NOT affect this runner.
     */
    private readonly hostSnapshot;
    /**
     * Cached execution policy derived from {@link hostSnapshot}. `undefined`
     * when no host was supplied (legacy explicit-model path).
     */
    private readonly hostPolicy;
    /** Normalized provider name parsed from the model string */
    private readonly _parsedProvider;
    /** Normalized model name parsed from the model string */
    private readonly _parsedModel;
    /** The result of the last prompt (for toolsCalled() convenience method) */
    private lastResult;
    /** History of all prompt results during a test execution */
    private promptHistory;
    /**
     * Construct a new `HostRunner`.
     *
     * @param config - Runner configuration (see {@link HostRunnerConfig}).
     */
    constructor(config: HostRunnerConfig);
    /**
     * Create instrumented tools that track execution latency.
     * @param onLatency - Callback to report latency for each tool execution
     * @returns ToolSet with instrumented execute functions
     */
    private warnWidgetSnapshotFailure;
    private captureMcpAppSnapshot;
    private createInstrumentedTools;
    private resolveStopWhen;
    private normalizeStopAfterToolCall;
    private buildPartialAssistantMessages;
    /**
     * Build an array of ModelMessages from previous PromptResult(s) for multi-turn context.
     * @param context - Single PromptResult or array of PromptResults to include as context
     * @returns Array of ModelMessages representing the conversation history
     */
    private buildContextMessages;
    /**
     * Run a prompt with the LLM, allowing tool calls.
     * Never throws - errors are returned in the PromptResult.
     *
     * @param message - The user message to send to the LLM
     * @param options - Optional settings including context for multi-turn conversations
     * @returns PromptResult with text response, tool calls, token usage, and latency breakdown
     *
     * @example
     * // Single-turn (default)
     * const result = await runner.run("Show me projects");
     *
     * @example
     * // Multi-turn with context
     * const r1 = await runner.run("Show me projects");
     * const r2 = await runner.run("Now show tasks", { context: r1 });
     *
     * @example
     * // Multi-turn with multiple context results
     * const r1 = await runner.run("Show projects");
     * const r2 = await runner.run("Pick the first", { context: r1 });
     * const r3 = await runner.run("Show tasks", { context: [r1, r2] });
     */
    run(message: string, options?: PromptOptions): Promise<PromptResult>;
    /**
     * Get the names of tools called in the last prompt.
     * Convenience method for quick checks in eval functions.
     *
     * @returns Array of tool names from the last prompt, or empty array if no prompt has been run
     */
    toolsCalled(): string[];
    /**
     * Create a new HostRunner with modified options.
     * Useful for creating variants for different test scenarios.
     *
     * @param options - Partial config to override
     * @returns A new HostRunner instance with the merged configuration
     */
    withOptions(options: Partial<HostRunnerConfig>): HostRunner;
    /**
     * Get the configured tools
     */
    getTools(): ToolSet;
    /**
     * Get the LLM provider/model string
     */
    getModel(): string;
    /**
     * Get the API key
     */
    getApiKey(): string;
    /**
     * Get the current system prompt
     */
    getSystemPrompt(): string;
    /**
     * Set a new system prompt
     */
    setSystemPrompt(prompt: string): void;
    /**
     * Get the current temperature (undefined means model default)
     */
    getTemperature(): number | undefined;
    /**
     * Set the temperature (must be between 0 and 2)
     */
    setTemperature(temperature: number): void;
    /**
     * Get the max steps configuration
     */
    getMaxSteps(): number;
    /**
     * Get replayable server configs from the attached MCP client manager.
     */
    getServerReplayConfigs(): MCPServerReplayConfig[] | undefined;
    /**
     * Get the result of the last prompt
     */
    getLastResult(): PromptResult | undefined;
    /**
     * Reset the prompt history.
     * Call this before each test iteration to clear previous results.
     */
    resetPromptHistory(): void;
    /**
     * Get the history of all prompt results since the last reset.
     * Returns a copy of the array to prevent external modification.
     */
    getPromptHistory(): PromptResult[];
    /**
     * Return the immutable `HostJson` snapshot driving this runner, or
     * `undefined` if the runner was constructed with an explicit `model`
     * rather than a `host`. The snapshot is taken at construction and
     * post-construction mutations to the original `Host` are not reflected.
     */
    getHostSnapshot(): HostJson | undefined;
    /**
     * Return the resolved execution policy (visibility, progressive discovery,
     * tool-exposure signals) derived from the host snapshot at construction
     * time. `undefined` when constructed without a `host`.
     */
    getHostPolicy(): HostExecutionPolicy | undefined;
    /**
     * Get the normalized provider name parsed from the model string.
     */
    getParsedProvider(): string;
    /**
     * Get the normalized model name parsed from the model string.
     */
    getParsedModel(): string;
    /**
     * Create a mock executor for deterministic eval tests. The mock calls
     * the provided function instead of making real LLM calls, and satisfies
     * {@link HostExecutor} so it can be passed to `EvalTest.run` /
     * `EvalSuite.run` directly.
     *
     * @param promptFn - Function that returns a PromptResult for a given message
     * @returns A HostExecutor compatible with EvalTest / EvalSuite
     *
     * @example
     * ```typescript
     * const runner = HostRunner.mock(async (message) =>
     *   PromptResult.from({
     *     prompt: message,
     *     messages: [{ role: "user", content: message }],
     *     text: "mocked response",
     *     toolCalls: [{ toolName: "my_tool", arguments: {} }],
     *     usage: { inputTokens: 50, outputTokens: 50, totalTokens: 100 },
     *     latency: { e2eMs: 100, llmMs: 80, mcpMs: 20 },
     *   })
     * );
     *
     * const test = new EvalTest({
     *   name: "my-test",
     *   test: async (executor) => {
     *     const r = await executor.run("test");
     *     return r.hasToolCall("my_tool");
     *   },
     * });
     * await test.run(runner, { iterations: 3 });
     * ```
     */
    static mock(promptFn: (message: string, options?: PromptOptions) => PromptResult | Promise<PromptResult>): HostExecutor;
}

/**
 * Validators for matching tool calls in eval tests
 *
 * All matching is case-sensitive and uses exact strings only (no wildcards).
 */

/**
 * Exact match - all expected tools must be present in exact order.
 * Case-sensitive exact string comparison.
 *
 * @param expected - The expected tool names in order
 * @param actual - The actual tool names that were called
 * @returns true if actual matches expected exactly
 *
 * @example
 * matchToolCalls(['add', 'multiply'], ['add', 'multiply']) // true
 * matchToolCalls(['add', 'multiply'], ['multiply', 'add']) // false (wrong order)
 * matchToolCalls(['add'], ['add', 'multiply']) // false (extra tool)
 */
declare function matchToolCalls(expected: string[], actual: string[]): boolean;
/**
 * Subset match - all expected tools must be present, order doesn't matter.
 * Case-sensitive exact string comparison.
 *
 * @param expected - The expected tool names (any order)
 * @param actual - The actual tool names that were called
 * @returns true if all expected tools are present in actual
 *
 * @example
 * matchToolCallsSubset(['add', 'multiply'], ['multiply', 'add']) // true
 * matchToolCallsSubset(['add'], ['add', 'multiply']) // true
 * matchToolCallsSubset(['add', 'subtract'], ['add', 'multiply']) // false (missing subtract)
 */
declare function matchToolCallsSubset(expected: string[], actual: string[]): boolean;
/**
 * Any match - at least one expected tool must be present.
 * Case-sensitive exact string comparison.
 *
 * @param expected - The expected tool names (at least one must match)
 * @param actual - The actual tool names that were called
 * @returns true if at least one expected tool is present in actual
 *
 * @example
 * matchAnyToolCall(['add', 'subtract'], ['multiply', 'add']) // true
 * matchAnyToolCall(['add', 'subtract'], ['multiply', 'divide']) // false
 * matchAnyToolCall([], ['add']) // false (empty expected)
 */
declare function matchAnyToolCall(expected: string[], actual: string[]): boolean;
/**
 * Count match - check if a specific tool was called exactly N times.
 * Case-sensitive exact string comparison.
 *
 * @param toolName - The tool name to count
 * @param actual - The actual tool names that were called
 * @param count - The expected number of times the tool should be called
 * @returns true if the tool was called exactly count times
 *
 * @example
 * matchToolCallCount('add', ['add', 'add', 'multiply'], 2) // true
 * matchToolCallCount('add', ['add', 'multiply'], 2) // false
 */
declare function matchToolCallCount(toolName: string, actual: string[], count: number): boolean;
/**
 * No tools match - check that no tools were called.
 *
 * @param actual - The actual tool names that were called
 * @returns true if no tools were called
 *
 * @example
 * matchNoToolCalls([]) // true
 * matchNoToolCalls(['add']) // false
 */
declare function matchNoToolCalls(actual: string[]): boolean;
/**
 * Check if tool was called with exact arguments (deep equality).
 * Returns true if any call to the tool has exactly matching arguments.
 * Case-sensitive for tool names.
 *
 * @param toolName - The tool name to match
 * @param expectedArgs - The expected arguments (exact match)
 * @param toolCalls - The actual tool calls made
 * @returns true if any call to the tool has exactly matching arguments
 *
 * @example
 * matchToolCallWithArgs('add', {a: 2, b: 3}, toolCalls) // true if add({a:2, b:3}) was called
 * matchToolCallWithArgs('add', {a: 2}, [{toolName:'add', arguments:{a:2, b:3}}]) // false (extra arg)
 */
declare function matchToolCallWithArgs(toolName: string, expectedArgs: Record<string, unknown>, toolCalls: ToolCall[]): boolean;
/**
 * Check if tool was called with at least these arguments (partial match).
 * Allows extra arguments in the actual call.
 * Case-sensitive for tool names.
 *
 * @param toolName - The tool name to match
 * @param expectedArgs - The expected arguments (partial match)
 * @param toolCalls - The actual tool calls made
 * @returns true if any call to the tool contains all expected arguments
 *
 * @example
 * matchToolCallWithPartialArgs('add', {a: 2}, [{toolName:'add', arguments:{a:2, b:3}}]) // true
 * matchToolCallWithPartialArgs('add', {a: 2, c: 5}, [{toolName:'add', arguments:{a:2, b:3}}]) // false
 */
declare function matchToolCallWithPartialArgs(toolName: string, expectedArgs: Record<string, unknown>, toolCalls: ToolCall[]): boolean;
/**
 * Check if a specific argument has a specific value in any call to the tool.
 * Case-sensitive for tool names.
 *
 * @param toolName - The tool name to match
 * @param argKey - The argument key to check
 * @param expectedValue - The expected value for the argument
 * @param toolCalls - The actual tool calls made
 * @returns true if any call to the tool has the specified argument value
 *
 * @example
 * matchToolArgument('add', 'a', 2, toolCalls) // true if any add() call had a=2
 */
declare function matchToolArgument(toolName: string, argKey: string, expectedValue: unknown, toolCalls: ToolCall[]): boolean;
/**
 * Check if argument value matches a predicate function.
 * Useful for partial matches, type checks, or range validation.
 * Case-sensitive for tool names.
 *
 * @param toolName - The tool name to match
 * @param argKey - The argument key to check
 * @param predicate - Function that tests the argument value
 * @param toolCalls - The actual tool calls made
 * @returns true if any call to the tool has an argument value that passes the predicate
 *
 * @example
 * matchToolArgumentWith('echo', 'message', (v) => typeof v === 'string' && v.includes('hello'), toolCalls)
 * matchToolArgumentWith('add', 'a', (v) => typeof v === 'number' && v > 0, toolCalls)
 */
declare function matchToolArgumentWith(toolName: string, argKey: string, predicate: (value: unknown) => boolean, toolCalls: ToolCall[]): boolean;

/**
 * Statistics for latency values
 */
interface LatencyStats {
    /** Minimum value */
    min: number;
    /** Maximum value */
    max: number;
    /** Mean (average) value */
    mean: number;
    /** 50th percentile (median) */
    p50: number;
    /** 95th percentile */
    p95: number;
    /** Number of values */
    count: number;
}

/**
 * Configuration for an EvalTest
 *
 * All tests use the multi-turn pattern with a test function that receives a
 * `HostExecutor` (implemented by `HostRunner`, `HostRuntime`, and any custom
 * executor that mirrors the interface).
 */
interface EvalTestConfig {
    name: string;
    test: (executor: HostExecutor) => boolean | Promise<boolean>;
    expectedToolCalls?: EvalExpectedToolCall[];
}
/**
 * Options for running an EvalTest
 */
interface EvalTestRunOptions {
    iterations: number;
    concurrency?: number;
    retries?: number;
    timeoutMs?: number;
    onProgress?: (completed: number, total: number) => void;
    /** Called with a failure report if any iterations fail */
    onFailure?: (report: string) => void;
    mcpjam?: MCPJamReportingConfig;
    /** @internal used by EvalSuite to prevent duplicate per-test uploads */
    __suppressMcpjamAutoSave?: boolean;
}
/**
 * Result details for a single iteration
 */
interface IterationResult {
    passed: boolean;
    latencies: LatencyBreakdown[];
    tokens: {
        total: number;
        input: number;
        output: number;
    };
    error?: string;
    retryCount?: number;
    /** The prompt results from this iteration */
    prompts?: PromptResult[];
    /**
     * Host snapshot captured at the END of this iteration's execution.
     * Populated when the executor exposes `getHostSnapshot()`. For
     * `HostRunner`, this matches the construction-time snapshot (immutable).
     * For `HostRuntime`, this captures the live `Host` state at iteration
     * end so per-iteration metadata stamping reflects what THIS iteration
     * ran with, not the global state at upload time. (Mid-iteration host
     * mutations between turns are not separately captured — that would
     * require threading the snapshot into `PromptResult`.)
     */
    hostSnapshot?: HostJson;
}
/**
 * Result of running an EvalTest
 */
interface EvalRunResult {
    iterations: number;
    successes: number;
    failures: number;
    results: boolean[];
    iterationDetails: IterationResult[];
    tokenUsage: {
        total: number;
        input: number;
        output: number;
        perIteration: {
            total: number;
            input: number;
            output: number;
        }[];
    };
    latency: {
        e2e: LatencyStats;
        llm: LatencyStats;
        mcp: LatencyStats;
        perIteration: LatencyBreakdown[];
    };
}
/**
 * EvalTest - Runs a single test scenario with iterations
 *
 * Can be run standalone or as part of an EvalSuite.
 *
 * @example
 * ```ts
 * const test = new EvalTest({
 *   name: "addition",
 *   test: async (executor) => {
 *     const result = await executor.run("Add 2+3");
 *     return result.hasToolCall("add");
 *   },
 * });
 * await test.run(executor, { iterations: 30 });
 * console.log(test.accuracy()); // 0.97
 * ```
 */
declare class EvalTest {
    private config;
    private lastRunResult;
    constructor(config: EvalTestConfig);
    /**
     * Run this test with the given executor and options.
     */
    run(executor: HostExecutor, options: EvalTestRunOptions): Promise<EvalRunResult>;
    private autoSaveRunIfConfigured;
    private buildEvalResultInputs;
    private aggregateResults;
    /**
     * Get the accuracy of the last run (success rate)
     */
    accuracy(): number;
    /**
     * Get the recall (true positive rate) of the last run
     */
    recall(): number;
    /**
     * Get the precision of the last run
     */
    precision(): number;
    /**
     * Get the true positive rate (same as recall)
     */
    truePositiveRate(): number;
    /**
     * Get the false positive rate
     */
    falsePositiveRate(): number;
    /**
     * Get the average token use per iteration
     */
    averageTokenUse(): number;
    /**
     * Get the full results of the last run
     */
    getResults(): EvalRunResult | null;
    /**
     * Get the name of this test
     */
    getName(): string;
    /**
     * Get the configuration of this test
     */
    getConfig(): EvalTestConfig;
    /**
     * Get all iteration details from the last run
     */
    getAllIterations(): IterationResult[];
    /**
     * Get only the failed iterations from the last run
     */
    getFailedIterations(): IterationResult[];
    /**
     * Get only the successful iterations from the last run
     */
    getSuccessfulIterations(): IterationResult[];
    /**
     * Get a failure report with traces from all failed iterations.
     * Useful for debugging why evaluations failed.
     *
     * @returns A formatted string with failure details
     */
    getFailureReport(): string;
}

/**
 * Configuration for an EvalSuite
 */
interface EvalSuiteConfig {
    name?: string;
    mcpjam?: MCPJamReportingConfig;
}
/**
 * Result for a single test within the suite
 */
interface TestResult {
    name: string;
    result: EvalRunResult;
}
/**
 * Result of running an EvalSuite
 */
interface EvalSuiteResult {
    tests: Map<string, EvalRunResult>;
    aggregate: {
        iterations: number;
        successes: number;
        failures: number;
        accuracy: number;
        tokenUsage: {
            total: number;
            perTest: number[];
        };
        latency: {
            e2e: LatencyStats;
            llm: LatencyStats;
            mcp: LatencyStats;
        };
    };
}
/**
 * EvalSuite - Groups multiple EvalTests and provides aggregate metrics
 *
 * @example
 * ```ts
 * const suite = new EvalSuite({ name: "Math" });
 * suite.add(new EvalTest({
 *   name: "addition",
 *   test: async (executor) => {
 *     const r = await executor.run("Add 2+3");
 *     return r.hasToolCall("add");
 *   },
 * }));
 * suite.add(new EvalTest({
 *   name: "multiply",
 *   test: async (executor) => {
 *     const r = await executor.run("Multiply 4*5");
 *     return r.hasToolCall("multiply");
 *   },
 * }));
 *
 * await suite.run(executor, { iterations: 30 });
 * console.log(suite.accuracy());                 // Aggregate: 0.95
 * console.log(suite.get("addition").accuracy()); // Individual: 0.97
 * ```
 */
declare class EvalSuite {
    private name;
    private mcpjamConfig?;
    private tests;
    private lastRunResult;
    constructor(config?: EvalSuiteConfig);
    /**
     * Add a test to the suite
     */
    add(test: EvalTest): void;
    /**
     * Get a test by name
     */
    get(name: string): EvalTest | undefined;
    /**
     * Get all tests in the suite
     */
    getAll(): EvalTest[];
    /**
     * Run all tests in the suite with the given executor and options.
     */
    run(executor: HostExecutor, options: EvalTestRunOptions): Promise<EvalSuiteResult>;
    private autoSaveSuiteRunIfConfigured;
    private buildEvalResultInputs;
    private aggregateResults;
    /**
     * Get the aggregate accuracy across all tests
     */
    accuracy(): number;
    /**
     * Get the aggregate recall (same as accuracy in basic context)
     */
    recall(): number;
    /**
     * Get the aggregate precision (same as accuracy in basic context)
     */
    precision(): number;
    /**
     * Get the aggregate true positive rate (same as recall)
     */
    truePositiveRate(): number;
    /**
     * Get the aggregate false positive rate
     */
    falsePositiveRate(): number;
    /**
     * Get the average token use per iteration across all tests
     */
    averageTokenUse(): number;
    /**
     * Get the full suite results
     */
    getResults(): EvalSuiteResult | null;
    /**
     * Get the name of the suite
     */
    getName(): string;
    /**
     * Get the number of tests in the suite
     */
    size(): number;
}

declare function reportEvalResults(input: ReportEvalResultsInput): Promise<ReportEvalResultsOutput>;
declare function reportEvalResultsSafely(input: ReportEvalResultsInput): Promise<ReportEvalResultsOutput | null>;

/**
 * Shared utilities for converting iteration results to EvalResultInput payloads.
 * Used by EvalTest, EvalSuite, and EvalRunReporter helpers.
 */

/**
 * Options for {@link promptsToEvalResult}. Pass/fail from your test assertion
 * (`passed`) is combined with trace/errors via {@link finalizePassedForEval}.
 */
type PromptsToEvalResultOverrides = Partial<Omit<EvalResultInput, "actualToolCalls" | "tokens" | "trace" | "passed">> & {
    caseTitle: string;
    passed: boolean;
    failOnToolError?: boolean;
};
/**
 * Build one {@link EvalResultInput} from several {@link PromptResult}s (e.g. a
 * multi-turn Vitest flow). Aggregates tool calls, messages, tokens, duration,
 * and merged timeline spans the same way as a single EvalTest iteration.
 *
 * @throws If `prompts` is empty
 */
declare function promptsToEvalResult(prompts: PromptResult[], overrides: PromptsToEvalResultOverrides): EvalResultInput;
/**
 * Options for converting a run's iterations to EvalResultInput payloads.
 */
interface RunToEvalResultsOptions {
    casePrefix: string;
    provider?: string;
    model?: string;
    expectedToolCalls?: EvalExpectedToolCall[];
    promptSelector?: "first" | "last";
    failOnToolError?: boolean;
}
/**
 * Options for converting a suite run's iterations to EvalResultInput payloads.
 */
interface SuiteRunToEvalResultsOptions {
    casePrefix: string;
    provider?: string;
    model?: string;
    expectedToolCallsByTest?: Record<string, EvalExpectedToolCall[]>;
    promptSelector?: "first" | "last";
    failOnToolError?: boolean;
}

type CreateEvalRunReporterInput = Omit<ReportEvalResultsInput, "results" | "framework" | "ci"> & {
    ci?: Omit<EvalCiMetadata, "provider">;
    results?: EvalResultInput[];
};
interface EvalRunReporter {
    add(result: EvalResultInput): void;
    record(result: EvalResultInput): Promise<void>;
    flush(): Promise<void>;
    finalize(): Promise<ReportEvalResultsOutput>;
    getBufferedCount(): number;
    setExpectedIterations(count: number): void;
    /**
     * Convert a PromptResult to an EvalResultInput and add it to the buffer.
     * Provider and model default to the prompt's metadata unless overridden.
     */
    addFromPrompt(promptResult: PromptResult, overrides?: Partial<Omit<EvalResultInput, "actualToolCalls" | "tokens" | "trace">> & {
        failOnToolError?: boolean;
    }): void;
    /**
     * Convert a PromptResult to an EvalResultInput, add it to the buffer, and
     * auto-flush when the buffer is large enough. Calls record() internally.
     */
    recordFromPrompt(promptResult: PromptResult, overrides?: Partial<Omit<EvalResultInput, "actualToolCalls" | "tokens" | "trace">> & {
        failOnToolError?: boolean;
    }): Promise<void>;
    /**
     * Aggregate multiple PromptResults into one EvalResultInput and add it.
     */
    addFromPrompts(prompts: PromptResult[], overrides: PromptsToEvalResultOverrides): void;
    /**
     * Aggregate multiple PromptResults into one EvalResultInput, add it, and
     * auto-flush when the buffer is large enough.
     */
    recordFromPrompts(prompts: PromptResult[], overrides: PromptsToEvalResultOverrides): Promise<void>;
    /**
     * Convert all iterations from an EvalTest run to EvalResultInputs and add them.
     */
    addFromRun(run: EvalRunResult, options: RunToEvalResultsOptions): void;
    /**
     * Convert all iterations from an EvalTest run to EvalResultInputs,
     * add them, and auto-flush.
     */
    recordFromRun(run: EvalRunResult, options: RunToEvalResultsOptions): Promise<void>;
    /**
     * Convert all iterations from an EvalSuite run to EvalResultInputs and add them.
     */
    addFromSuiteRun(suiteRun: Map<string, EvalRunResult>, options: SuiteRunToEvalResultsOptions): void;
    /**
     * Convert all iterations from an EvalSuite run to EvalResultInputs,
     * add them, and auto-flush.
     */
    recordFromSuiteRun(suiteRun: Map<string, EvalRunResult>, options: SuiteRunToEvalResultsOptions): Promise<void>;
    /**
     * Get the total count of results added (including via helper methods).
     */
    getAddedCount(): number;
}
declare function createEvalRunReporter(input: CreateEvalRunReporterInput): EvalRunReporter;

type EvalArtifactFormat = "junit-xml" | "jest-json" | "vitest-json" | "custom";
type UploadEvalArtifactInput = Omit<ReportEvalResultsInput, "results"> & {
    artifact: string | Uint8Array | Record<string, unknown>;
    format: EvalArtifactFormat;
    customParser?: (artifact: string | Uint8Array | Record<string, unknown>) => EvalResultInput[];
};
declare function uploadEvalArtifact(input: UploadEvalArtifactInput): Promise<ReportEvalResultsOutput>;

/**
 * Widget helpers for injecting the shared widget runtimes into HTML.
 * These are pure-string functions with zero server-framework dependencies so
 * the SDK, inspector, and CLI can all prepare identical app payloads.
 */
/**
 * Escape characters that could break inline <script> content.
 */
declare function serializeForInlineScript(value: unknown): string;
/**
 * Per-method `window.openai.*` capability surface for the compat
 * runtime. Mirror of `ResolvedOpenAiAppsCapabilities` in the inspector
 * client (`client/src/lib/client-styles/types.ts`). Defined inline here
 * because the SDK can't import client types.
 *
 * Optional fields here mean "use the runtime's default" — the runtime's
 * default is the full ChatGPT surface, preserving the pre-capability
 * behavior for legacy callers that don't pass `capabilities`.
 */
type OpenAiCompatCapabilities = {
    callTool?: boolean;
    sendFollowUpMessage?: boolean;
    setWidgetState?: boolean;
    requestDisplayMode?: "all" | "fullscreen-only" | "none";
    notifyIntrinsicHeight?: boolean;
    openExternal?: boolean;
    setOpenInAppUrl?: boolean;
    requestModal?: boolean;
    uploadFile?: boolean;
    selectFiles?: boolean;
    getFileDownloadUrl?: boolean;
    requestCheckout?: boolean;
    requestClose?: boolean;
};
/**
 * Inject the OpenAI compatibility runtime into MCP App HTML.
 * Adds a JSON config element + the bundled IIFE script into <head>.
 * If no <head> tag exists, wraps the content in a full HTML document.
 *
 * Idempotent: if the config script is already present, returns the HTML unchanged.
 */
declare function injectOpenAICompat(html: string, widgetData: {
    toolId: string;
    toolName: string;
    toolInput: Record<string, unknown>;
    toolOutput: unknown;
    /**
     * Tool response `_meta` exposed to the widget as
     * `window.openai.toolResponseMetadata`. Apps SDK widgets read this
     * for non-model-context metadata (timestamps, source IDs, etc.).
     */
    toolResponseMetadata?: Record<string, unknown> | null;
    /**
     * Persisted widget state from a saved view or fork. The compat
     * runtime uses this as the initial value for `window.openai.widgetState`
     * so widgets boot in the same state they were when the view was
     * saved (Apps SDK parity).
     */
    initialWidgetState?: unknown;
    theme?: string;
    viewMode?: string;
    viewParams?: Record<string, unknown>;
    /**
     * Per-method capability surface the runtime should expose on
     * `window.openai`. Disabled methods are LITERALLY ABSENT from the
     * runtime (typeof === "undefined") so widgets that feature-detect
     * fall back correctly. When omitted, the runtime defaults to the
     * full ChatGPT surface — preserves behavior for callers that
     * pre-date the capability matrix.
     */
    capabilities?: OpenAiCompatCapabilities;
}): string;
declare function extractBaseUrl(html: string): string;
declare function generateUrlPolyfillScript(baseUrl: string): string;
declare const WIDGET_BASE_CSS = "<style>\nhtml, body {\n  margin: 0;\n  padding: 0;\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n</style>";
declare function buildRuntimeConfigScript(config: Record<string, unknown>): string;
declare function injectScripts(html: string, headContent: string): string;
type CspMode = "permissive" | "widget-declared";
interface WidgetCspMeta {
    connect_domains?: string[];
    resource_domains?: string[];
    frame_domains?: string[];
}
interface CspConfig {
    mode: CspMode;
    connectDomains: string[];
    resourceDomains: string[];
    frameDomains: string[];
    headerString: string;
}
declare function normalizeWidgetCspMeta(resourceMeta?: Record<string, unknown> | null): WidgetCspMeta | undefined;
declare function buildCspHeader(mode: CspMode, widgetCsp?: WidgetCspMeta | null, options?: {
    frameAncestors?: string;
}): CspConfig;
declare function buildCspMetaContent(headerString: string): string;
declare function buildChatGptRuntimeHead(options: {
    htmlContent: string;
    runtimeConfig: Record<string, unknown>;
    baseHref?: string;
    includeUrlPolyfill?: boolean;
}): string;

declare class OAuthProxyError extends Error {
    status: number;
    constructor(status: number, message: string);
}
interface OAuthProxyRequest {
    url: string;
    method?: string;
    body?: unknown;
    headers?: Record<string, string>;
    httpsOnly?: boolean;
}
interface OAuthProxyResponse {
    status: number;
    statusText: string;
    headers: Record<string, string>;
    body: unknown;
}
interface ValidatedUrl {
    url: URL;
}
declare function validateUrl(url: string, httpsOnly?: boolean): Promise<ValidatedUrl>;
declare function executeOAuthProxy(req: OAuthProxyRequest): Promise<OAuthProxyResponse>;
declare function executeDebugOAuthProxy(req: OAuthProxyRequest): Promise<OAuthProxyResponse>;
declare function fetchOAuthMetadata(url: string, httpsOnly?: boolean): Promise<{
    metadata: Record<string, unknown>;
    status?: undefined;
} | {
    status: number;
    statusText: string;
}>;

export { AiSdkTool, CONFORMANCE_CHECK_METADATA, type CollectAndDiffServerSnapshotInput, type CollectServerSnapshotInput, type CollectedServerSnapshot, type ConformanceReport, type ConformanceReportCase, type ConformanceReportCaseStatus, type ConformanceReportGroup, type ConformanceReportKind, type ConformanceResult, type ConformanceStepId, type CreateEvalRunReporterInput, type CspConfig, type CspMode, CustomProvider, type DiffServerSnapshotsOptions, type EvalArtifactFormat, EvalCiMetadata, EvalExpectedToolCall, EvalReportingError, EvalResultInput, type EvalRunReporter, type EvalRunResult, EvalSuite, type EvalSuiteConfig, type EvalSuiteResult, EvalTest, type EvalTestConfig, type EvalTestRunOptions, HostExecutor, HostJson, HostRunner, type HostRunnerConfig, HostSource, type IterationResult, LatencyBreakdown, type MCPAppsCheckCategory, type MCPAppsCheckId, type MCPAppsCheckResult, type MCPAppsCheckStatus, type MCPAppsConformanceConfig, type MCPAppsConformanceResult, MCPAppsConformanceSuite, type MCPAppsConformanceSuiteConfig, type MCPAppsConformanceSuiteDefaults, type MCPAppsConformanceSuiteResult, type MCPAppsConformanceSuiteRun, MCPAppsConformanceTest, type MCPAppsResourceReadOutcome, MCPAuthError, type MCPCheckCategory, type MCPCheckId, type MCPCheckResult, type MCPCheckStatus, MCPClientManager, type MCPConformanceConfig, type MCPConformanceResult, MCPConformanceSuite, type MCPConformanceSuiteConfig, type MCPConformanceSuiteResult, MCPConformanceTest, MCPError, MCPJamReportingConfig, MCPReadResourceResult, MCPServerConfig, MCPServerReplayConfig, MCP_APPS_CHECK_CATEGORIES, MCP_APPS_CHECK_IDS, MCP_CHECK_CATEGORIES, MCP_CHECK_IDS, type NormalizedServerSnapshot, type OAuthConformanceAuthConfig, type OAuthConformanceCheckId, type OAuthConformanceClientConfig, type OAuthConformanceConfig, type OAuthConformanceProfile, type ConformanceResult as OAuthConformanceResult, type ConformanceStepId as OAuthConformanceStepId, type StepResult as OAuthConformanceStepResult, OAuthConformanceSuite, type OAuthConformanceSuiteConfig, type OAuthConformanceSuiteDefaults, type OAuthConformanceSuiteFlow, type OAuthConformanceSuiteResult, OAuthConformanceTest, type OAuthLoginConfig, type OAuthLoginDependencies, type OAuthLoginResult, OAuthProtocolMode, OAuthProxyError, type OAuthProxyRequest, type OAuthProxyResponse, OAuthRegistrationMode, type OAuthVerificationConfig, type VerificationResult as OAuthVerificationResult, PromptOptions, PromptResult, type PromptsToEvalResultOverrides, type RawServerSnapshot, type RemoteBrowserAuthorizationCode, type RemoteBrowserAuthorizationController, type RemoteBrowserAuthorizationControllerOptions, type RemoteBrowserAuthorizationInput, ReportEvalResultsInput, ReportEvalResultsOutput, ResolvedAuthorizationPlan, RetryPolicy, RpcLogger, type RunToEvalResultsOptions, SdkError, type ServerSnapshotDependencies, type ServerSnapshotDiffResult, ServerSnapshotFormatError, type ServerSnapshotPrompt, type ServerSnapshotResource, type ServerSnapshotResourceTemplate, type ServerSnapshotTool, type SnapshotDiffChangeType, type SnapshotDiffClassification, type SnapshotDiffEntityType, type SnapshotDiffFailOn, type SnapshotDiffSummary, type SnapshotEntityChange, type SnapshotEntityClassificationSummary, type SnapshotFieldChange, type SnapshotSurfaceSummary, type StableServerSnapshot, type StepResult, type StructuredCaseClassification, type StructuredCaseResult, type StructuredRunReport, type StructuredRunSummary, type StructuredSummaryBucket, type SuiteRunToEvalResultsOptions, type SupportedConformanceResult, type TestResult, Tool, ToolCall, type ToolCallEnvelopeValidationDetails, type ToolCallEnvelopeValidationResult, type ToolCallOutcomeEvaluationResult, type ToolCallOutcomePolicy, type ToolCallValidationResult, type UploadEvalArtifactInput, type VerificationResult, WIDGET_BASE_CSS, type WidgetCspMeta, buildChatGptRuntimeHead, buildCspHeader, buildCspMetaContent, buildRuntimeConfigScript, buildServerDiffReport, buildToolCallValidationReport, collectAndDiffServerSnapshot, collectConnectedServerSnapshot, collectServerSnapshot, createEvalRunReporter, createRemoteBrowserAuthorizationController, diffServerSnapshots, evaluateToolCallOutcome, executeDebugOAuthProxy, executeOAuthProxy, extractBaseUrl, fetchOAuthMetadata, formatOAuthConformanceHuman, formatOAuthConformanceSuiteHuman, generateUrlPolyfillScript, injectOpenAICompat, injectScripts, isAuthError, isMCPAuthError, matchAnyToolCall, matchNoToolCalls, matchToolArgument, matchToolArgumentWith, matchToolCallCount, matchToolCallWithArgs, matchToolCallWithPartialArgs, matchToolCalls, matchToolCallsSubset, normalizeCustomHeaders, normalizeServerSnapshot, normalizeWidgetCspMeta, oauthConformanceProfileSchema, promptsToEvalResult, renderConformanceReportJUnitXml, renderConformanceReportJson, renderStructuredRunJUnitXml, renderStructuredRunJson, reportEvalResults, reportEvalResultsSafely, runOAuthLogin, serializeForInlineScript, serializeServerSnapshot, serializeStableServerSnapshot, summarizeStructuredCases, toConformanceReport, uploadEvalArtifact, validateToolCallEnvelope, validateToolCallResult, validateUrl };
