import { M as ModelInfo, V as ValidationResult, a as MessageContent, R as RunOptions, b as AgentResult, A as AgentEvent, I as IAgentService } from './agent-CW9XbmG_.js';
import { IChatRuntime, IChatClient } from './chat/runtime.js';
import { g as ChatSession, f as ChatIdLike, h as RuntimeSendOptions, a as ChatEvent, S as SendMessageOptions, p as MessagePart, c as ChatMessage, j as ChatSessionConfig } from './types-ajANVzf7.js';
import { P as ProviderConfig } from './provider-types-PTSlRPNB.js';
import 'zod';
import './errors-C-so0M4t.js';
import './chat/sessions.js';
import './chat/storage.js';
import './errors-CmVvczxZ.js';
import './types-BxggH0Yh.js';
import './chat/context.js';

/**
 * Mock IAgentService factory for testing.
 */

/** Options for createMockAgentService. */
interface MockAgentServiceOptions {
    /** Service name. Default: "mock". */
    name?: string;
    /** Models to return from listModels(). */
    models?: ModelInfo[];
    /** Custom validation result. Default: { valid: true, errors: [] }. */
    validationResult?: ValidationResult;
    /** Custom run handler. Default: returns "Mock response". */
    onRun?: (prompt: MessageContent, options?: RunOptions) => Promise<AgentResult>;
    /** Custom stream handler. Default: yields text_delta + result events. */
    onStream?: (prompt: MessageContent, options?: RunOptions) => AsyncIterable<AgentEvent>;
}
/**
 * Create a mock IAgentService for testing agent-level code.
 *
 * ```ts
 * const service = createMockAgentService({ name: "test" });
 * const agent = service.createAgent({ model: "gpt-5-mini" });
 * const result = await agent.run("Hello");
 * ```
 */
declare function createMockAgentService(options?: MockAgentServiceOptions): IAgentService;

/**
 * Mock IChatRuntime factory for testing chat runtime consumers.
 */

/** Options for createMockRuntime. */
interface MockRuntimeOptions {
    /** Default backend name. Default: "mock". */
    defaultBackend?: string;
    /** Default model. */
    defaultModel?: string;
    /** Pre-seeded sessions. */
    sessions?: ChatSession[];
    /** Models to return from listModels(). */
    models?: ModelInfo[];
    /** Custom send handler. When not provided, yields a single text_delta + done event. */
    onSend?: (sessionId: ChatIdLike, message: string, options?: RuntimeSendOptions) => AsyncIterable<ChatEvent>;
}
/**
 * Create a mock IChatRuntime for testing chat UI hooks and components.
 *
 * ```ts
 * const runtime = createMockRuntime({ defaultModel: "gpt-5-mini" });
 * const session = await runtime.createSession({});
 * ```
 */
declare function createMockRuntime(options?: MockRuntimeOptions): IChatRuntime;

/**
 * Mock IChatClient factory for testing remote chat client consumers.
 */

/** Options for createMockChatClient. */
interface MockChatClientOptions {
    /** Pre-seeded sessions. */
    sessions?: ChatSession[];
    /** Models to return from listModels(). */
    models?: ModelInfo[];
    /** Providers to return from listProviders(). */
    providers?: ProviderConfig[];
    /** Custom send handler. */
    onSend?: (sessionId: ChatIdLike, message: string, options?: SendMessageOptions) => AsyncIterable<ChatEvent>;
}
/**
 * Create a mock IChatClient for testing React hooks that talk to RemoteChatClient.
 *
 * ```ts
 * const client = createMockChatClient({ providers: [{ id: "p1", backend: "copilot", model: "gpt-5-mini", label: "GPT Mini", createdAt: "" }] });
 * const providers = await client.listProviders();
 * ```
 */
declare function createMockChatClient(options?: MockChatClientOptions): IChatClient;

/**
 * Mock data factories for creating test ChatSession and ChatMessage instances.
 */

/** Options for createMockSession. */
interface MockSessionOptions {
    id?: string;
    title?: string;
    messages?: ChatMessage[];
    config?: Partial<ChatSessionConfig>;
    metadata?: Record<string, unknown>;
    status?: "active";
}
/** Options for createMockMessage. */
interface MockMessageOptions {
    id?: string;
    role?: "user" | "assistant" | "system";
    text?: string;
    parts?: MessagePart[];
    status?: "pending" | "streaming" | "complete" | "error";
    metadata?: Record<string, unknown>;
}
/**
 * Create a mock ChatSession for testing.
 *
 * ```ts
 * const session = createMockSession({ title: "Test chat" });
 * ```
 */
declare function createMockSession(options?: MockSessionOptions): ChatSession;
/**
 * Create a mock ChatMessage for testing.
 *
 * ```ts
 * const msg = createMockMessage({ role: "user", text: "Hello" });
 * ```
 */
declare function createMockMessage(options?: MockMessageOptions): ChatMessage;

export { type MockAgentServiceOptions, type MockChatClientOptions, type MockMessageOptions, type MockRuntimeOptions, type MockSessionOptions, createMockAgentService, createMockChatClient, createMockMessage, createMockRuntime, createMockSession };
