import { Hono } from 'hono';
import { AgentTraceOptions, AgentTraceInfo, AgentObserver, AgentRunStartArgs, AgentRunObserver } from '@anvia/core/observability';
import { PromptResponse, AgentStreamEvent } from '@anvia/core/agent';
import { Message, JsonObject, JsonValue, CompletionModelCapabilities, ToolResultContent, Usage, CompletionModel, StreamingCompletionModel } from '@anvia/core/completion';
import { RunEvalSuiteOptions } from '@anvia/core/evals';
import { Agent } from '@anvia/core/internal/agent';
import { MemoryStore } from '@anvia/core/memory';
import { ModelList } from '@anvia/core/model-listing';
import { Pipeline, PipelineGraph } from '@anvia/core/pipeline';

type StudioCapability = "agents" | "approvals" | "evals" | "memory" | "knowledge" | "mcps" | "observability" | "pipelines" | "sessions" | "status" | "tools" | "traces";
type StudioModelRef = string | {
    provider: string;
    model: string;
};
type StudioModelModality = "text" | "image" | "document" | "audio" | "video";
type StudioModelModalities = {
    input: StudioModelModality[];
    output?: StudioModelModality[];
};
type StudioModelDefinition = {
    id: string;
    name?: string;
    description?: string;
    modalities?: StudioModelModalities;
    capabilities?: Partial<CompletionModelCapabilities>;
    metadata?: JsonObject;
};
type StudioModelProvider = {
    id: string;
    name?: string;
    defaultModel?: string;
    models?: StudioModelDefinition[];
    createCompletionModel(model: string): CompletionModel | StreamingCompletionModel;
    listModels?: () => Promise<ModelList>;
    metadata?: JsonObject;
};
type StudioAgentModelPolicy = {
    default?: StudioModelRef;
    allowed?: Array<StudioModelRef | `${string}:*`>;
};
type StudioModelConfig = {
    providers: StudioModelProvider[];
    default?: StudioModelRef;
    agents?: Record<string, StudioAgentModelPolicy>;
};
type StudioModelSummary = StudioModelDefinition & {
    ref: string;
    providerId: string;
    providerName?: string;
};
type StudioModelProviderConfig = {
    id: string;
    name?: string;
    defaultModel?: string;
    models: StudioModelSummary[];
    metadata?: JsonObject;
    warning?: string;
};
type StudioAgentModelPolicyConfig = {
    default?: string;
    allowed?: string[];
};
type StudioModelsConfig = {
    providers: StudioModelProviderConfig[];
    default?: string;
    agents: Record<string, StudioAgentModelPolicyConfig>;
};
type StudioAgentModelsSummary = {
    agentId: string;
    defaultModel?: string;
    models: StudioModelSummary[];
    warnings?: JsonObject[];
};
type StudioAgent = {
    id: string;
    agent: Agent;
    name?: string;
    description?: string;
    quickPrompts?: string[];
    metadata?: JsonObject;
};
type StudioTarget = Agent | Pipeline<any, any>;
type StudioAgentConfig = {
    id: string;
    name?: string;
    description?: string;
    quickPrompts: string[];
    metadata?: JsonObject;
};
type StudioAgentRuntimeSummary = {
    id: string;
    name?: string;
    description?: string;
    model?: JsonValue;
    toolCount: number;
    staticToolCount: number;
    dynamicToolCount: number;
    approvalToolCount: number;
    mcpToolCount: number;
    staticContextCount: number;
    dynamicContextCount: number;
    observerCount: number;
    hasMemory: boolean;
    hasHook: boolean;
    hasOutputSchema: boolean;
    defaultMaxTurns?: number;
    metadata?: JsonObject;
};
type StudioPipeline = {
    id: string;
    pipeline: Pipeline<any, any>;
    name?: string;
    description?: string;
    metadata?: JsonObject;
};
type StudioPipelineConfig = {
    id: string;
    name?: string;
    description?: string;
    metadata?: JsonObject;
    stageCount: number;
    edgeCount: number;
    hasParallelStages: boolean;
    agentCount: number;
    extractorCount: number;
};
type StudioPipelineDetail = StudioPipelineConfig & {
    graph: PipelineGraph;
};
type StudioEvalSuite<Input = unknown, Output = unknown, Expected = unknown> = RunEvalSuiteOptions<Input, Output, Expected> & {
    id?: string;
    description?: string;
    metadata?: JsonObject;
};
type StudioEvalSuiteConfig = {
    id: string;
    name: string;
    description?: string;
    caseCount: number;
    metricNames: string[];
    concurrency?: number;
    metadata?: JsonObject;
};
type StudioEvalRunRequest = {
    concurrency?: number;
};
type StudioEvalRunResponse = {
    runId: string;
    suiteId: string;
    startedAt: string;
    endedAt: string;
    durationMs: number;
    result: JsonObject;
};
type StudioCapabilityConfig = {
    enabled: boolean;
    reason?: string;
};
type StudioConfig = {
    id: string;
    name?: string;
    description?: string;
    version?: string;
    agents: StudioAgentConfig[];
    models?: StudioModelsConfig;
    pipelines: StudioPipelineConfig[];
    evals: StudioEvalSuiteConfig[];
    chat: {
        quickPrompts: Record<string, string[]>;
    };
    capabilities: Partial<Record<StudioCapability, StudioCapabilityConfig>>;
    unsupportedCapabilities: StudioCapability[];
};
type StudioAgentToolSource = "static" | "dynamic";
type StudioAgentToolApprovalMetadata = {
    required: boolean;
    reason?: string;
    rejectMessage?: string;
};
type StudioAgentToolMetadata = {
    agentId: string;
    name: string;
    description: string;
    parameters: JsonObject;
    source: StudioAgentToolSource;
    approval: StudioAgentToolApprovalMetadata;
};
type StudioAgentToolsSummary = {
    agentId: string;
    tools: StudioAgentToolMetadata[];
};
type StudioToolRunRequest = {
    args: JsonValue;
    context?: JsonObject;
};
type StudioToolRunResponse = {
    agentId: string;
    toolName: string;
    result?: JsonValue;
    error?: JsonValue;
    status: "success" | "error";
    durationMs: number;
    startedAt: string;
    endedAt: string;
    events: JsonValue[];
};
type StudioAgentMcpToolMetadata = {
    name: string;
    description: string;
    parameters: JsonObject;
    source: StudioAgentToolSource;
};
type StudioAgentMcpServerMetadata = {
    agentId: string;
    name: string;
    toolCount: number;
    tools: StudioAgentMcpToolMetadata[];
};
type StudioAgentMcpsSummary = {
    agentId: string;
    servers: StudioAgentMcpServerMetadata[];
};
type StudioTranscriptChatEntry = {
    entryId: number;
    kind: "message";
    role: "user" | "assistant";
    text: string;
    tone?: "error";
    traceId?: string;
    attachments?: StudioTranscriptAttachment[];
};
type StudioTranscriptAttachment = {
    kind: "image" | "document";
    name?: string;
    mediaType?: string;
    data?: string;
    url?: string;
};
type StudioTranscriptReasoningEntry = {
    entryId: number;
    kind: "reasoning";
    reasoningId?: string;
    text: string;
};
type StudioTranscriptToolEntry = {
    entryId: number;
    kind: "tool";
    toolName: string;
    callId?: string;
    args?: string;
    result?: string;
    structuredResult?: ToolResultContent[];
    childEvents?: StudioTranscriptChildAgentEvent[];
    approval?: StudioToolApprovalTranscript;
    question?: StudioToolQuestionTranscript;
};
type StudioTranscriptChildAgentEvent = {
    kind: "message";
    agentId: string;
    agentName?: string;
    text: string;
} | {
    kind: "reasoning";
    agentId: string;
    agentName?: string;
    reasoningId?: string;
    text: string;
} | {
    kind: "tool";
    agentId: string;
    agentName?: string;
    toolName: string;
    callId?: string;
    args?: string;
    result?: string;
    structuredResult?: ToolResultContent[];
};
type StudioTranscriptEntry = StudioTranscriptChatEntry | StudioTranscriptReasoningEntry | StudioTranscriptToolEntry;
type StudioSessionSummary = {
    id: string;
    agentId: string;
    title?: string;
    createdAt: string;
    updatedAt: string;
    messageCount: number;
    metadata?: JsonObject;
};
type StudioSession = StudioSessionSummary & {
    messages: Message[];
    transcript: StudioTranscriptEntry[];
};
type StudioSessionCreateInput = {
    id: string;
    agentId: string;
    title?: string;
    metadata?: JsonObject;
};
type StudioSessionListOptions = {
    agentId?: string;
    limit: number;
};
type StudioSessionRunStatus = "running" | "success" | "error";
type StudioSessionRunTranscriptInput = {
    id: string;
    runId: string;
    title?: string;
    transcript: StudioTranscriptEntry[];
    status: StudioSessionRunStatus;
    error?: JsonValue;
};
type StudioSessionLogLevel = "debug" | "info" | "warn" | "error";
type StudioSessionLogCategory = "session" | "run" | "memory" | "prompt" | "model" | "tool" | "approval" | "question" | "api";
type StudioSessionLogEntry = {
    id: string;
    sessionId: string;
    runId?: string;
    sequence: number;
    timestamp: string;
    level: StudioSessionLogLevel;
    category: StudioSessionLogCategory;
    event: string;
    message: string;
    metadata?: JsonObject;
};
type StudioSessionLogAppendInput = {
    sessionId: string;
    runId?: string;
    level: StudioSessionLogLevel;
    category: StudioSessionLogCategory;
    event: string;
    message: string;
    metadata?: JsonObject;
};
type StudioSessionLogListOptions = {
    sessionId: string;
    limit: number;
    after?: number;
};
type StudioSessionStore = MemoryStore & {
    readonly kind?: string;
    listSessions(options: StudioSessionListOptions): StudioSessionSummary[] | Promise<StudioSessionSummary[]>;
    createSession(input: StudioSessionCreateInput): StudioSessionSummary | Promise<StudioSessionSummary>;
    getSession(id: string): StudioSession | undefined | Promise<StudioSession | undefined>;
    saveSessionRunTranscript(input: StudioSessionRunTranscriptInput): StudioSession | undefined | Promise<StudioSession | undefined>;
    updateSessionMetadata?(id: string, metadata: JsonObject | undefined): StudioSession | undefined | Promise<StudioSession | undefined>;
    appendSessionLog?(input: StudioSessionLogAppendInput): StudioSessionLogEntry | Promise<StudioSessionLogEntry>;
    listSessionLogs?(options: StudioSessionLogListOptions): StudioSessionLogEntry[] | Promise<StudioSessionLogEntry[]>;
    deleteSession?(id: string): boolean | Promise<boolean>;
};
type StudioTraceStatus = "running" | "success" | "error";
type StudioTraceObservationKind = "agent" | "generation" | "tool";
type StudioTraceObservation = {
    id: string;
    parentObservationId?: string;
    kind: StudioTraceObservationKind;
    name: string;
    status: StudioTraceStatus;
    turn: number;
    startedAt: string;
    endedAt?: string;
    durationMs?: number;
    input?: JsonValue;
    output?: JsonValue;
    error?: JsonValue;
    metadata?: JsonObject;
};
type StudioTraceSummary = {
    id: string;
    sessionId: string;
    name?: string;
    status: StudioTraceStatus;
    startedAt: string;
    endedAt?: string;
    durationMs?: number;
    output?: string;
    error?: JsonValue;
    usage?: Usage;
    metadata?: JsonObject;
    observationCount: number;
};
type StudioTrace = StudioTraceSummary & {
    trace?: AgentTraceInfo;
    input?: JsonValue;
    observations: StudioTraceObservation[];
};
type StudioObservabilityEventType = "session_log" | "pipeline_log" | "trace";
type StudioObservabilityEvent = {
    type: "session_log";
    log: StudioSessionLogEntry;
} | {
    type: "pipeline_log";
    log: StudioPipelineLogEntry;
} | {
    type: "trace";
    trace: StudioTraceSummary;
};
type StudioTraceListOptions = {
    limit: number;
    agentId?: string;
    sessionId?: string;
    status?: StudioTraceStatus;
};
type StudioSessionTraceListOptions = {
    sessionId: string;
    limit: number;
};
type StudioTraceStore = {
    readonly kind?: string;
    listTraces?(options: StudioTraceListOptions): StudioTraceSummary[] | Promise<StudioTraceSummary[]>;
    listSessionTraces(options: StudioSessionTraceListOptions): StudioTraceSummary[] | Promise<StudioTraceSummary[]>;
    getTrace(id: string): StudioTrace | undefined | Promise<StudioTrace | undefined>;
    saveTrace(trace: StudioTrace): StudioTrace | Promise<StudioTrace>;
};
type StudioKnowledgeSourceKind = "static_context" | "dynamic_context" | "dynamic_tools";
type StudioKnowledgeSourceSummary = {
    sourceId?: string;
    kind: StudioKnowledgeSourceKind;
    label?: string;
    count: number;
    registrationIndex?: number;
    topK?: number;
    threshold?: number;
    inspectable?: boolean;
    itemCount?: number;
};
type StudioStaticKnowledgeDocument = {
    id: string;
    text: string;
    additionalProps?: JsonObject;
};
type StudioKnowledgeEvidenceDocument = {
    id?: string;
    text?: string;
    additionalProps?: JsonObject;
};
type StudioKnowledgeEvidence = {
    traceId: string;
    sessionId: string;
    observationId: string;
    observationName: string;
    turn: number;
    startedAt: string;
    query?: string;
    documentCount: number;
    toolCount: number;
    documents: StudioKnowledgeEvidenceDocument[];
    tools: string[];
};
type StudioAgentKnowledgeConfig = {
    agentId: string;
    agentName?: string;
    sources: StudioKnowledgeSourceSummary[];
    staticContext: StudioStaticKnowledgeDocument[];
};
type StudioKnowledgeItemKind = "static_context" | "dynamic_context" | "dynamic_tool";
type StudioKnowledgeItem = {
    id: string;
    kind: StudioKnowledgeItemKind;
    text?: string;
    document?: JsonValue;
    toolName?: string;
    description?: string;
    parameterKeys?: string[];
    metadata?: JsonObject;
};
type StudioKnowledgeItemsPage = {
    agentId: string;
    sourceId: string;
    kind: StudioKnowledgeSourceKind;
    inspectable: boolean;
    items: StudioKnowledgeItem[];
    nextCursor?: string;
    totalCount?: number;
    message?: string;
};
type StudioKnowledgeSummary = {
    agents: StudioAgentKnowledgeConfig[];
    evidence: StudioKnowledgeEvidence[];
};
type StudioMemoryUserSummary = {
    userId: string;
    conversationCount: number;
    agentIds: string[];
    lastInteractionAt: string;
};
type StudioMemoryConversationSummary = {
    id: string;
    userId: string;
    agentId: string;
    title?: string;
    createdAt: string;
    updatedAt: string;
    messageCount: number;
    metadata?: JsonObject;
};
type StudioMemoryConversationsPage = {
    conversations: StudioMemoryConversationSummary[];
    total: number;
};
type StudioMemoryUsersPage = {
    users: StudioMemoryUserSummary[];
    total: number;
};
type StudioMemoryConversationMessages = {
    conversation: StudioMemoryConversationSummary;
    messages: Message[];
    transcript: StudioTranscriptEntry[];
};
type StudioMemoryConversationSteps = {
    conversation: StudioMemoryConversationSummary;
    steps: StudioTranscriptEntry[];
};
type StudioStatusSummary = {
    runner: {
        id: string;
        name?: string;
        version?: string;
    };
    storage: {
        sessions?: string;
        traces?: string;
        pipelineLogs?: string;
        pipelineRuns?: string;
    };
    counts: {
        agents: number;
        pipelines: number;
        sessions?: number;
        traces?: number;
        pipelineRuns?: number;
    };
    capabilities: Partial<Record<StudioCapability, StudioCapabilityConfig>>;
    generatedAt: string;
};
type StudioStores = {
    sessions?: StudioSessionStore | false;
    traces?: StudioTraceStore;
    pipelineLogs?: StudioPipelineLogStore | false;
    pipelineRuns?: StudioPipelineRunStore | false;
};
type StudioUiOptions = {
    path?: string;
    rootRoutes?: boolean;
    title?: string;
    redirectRoot?: boolean;
    clientScript?: string;
    protectShell?: boolean;
};
type StudioOptions = {
    evals?: Array<StudioEvalSuite<any, any, any>>;
    quickPrompts?: Record<string, string[]>;
    stores?: StudioStores;
    ui?: boolean | StudioUiOptions;
    models?: StudioModelConfig;
};
type StudioServeOptions = {
    port?: number;
    hostname?: string;
    log?: boolean;
};
type StudioToolApprovalDecision = {
    approved: boolean;
    reason?: string;
};
type StudioToolApprovalStatus = "pending" | "approved" | "rejected" | "timed_out";
type StudioToolApproval = {
    id: string;
    runId: string;
    agentId: string;
    sessionId?: string;
    toolName: string;
    callId?: string;
    internalCallId: string;
    args: string;
    status: StudioToolApprovalStatus;
    requestedAt: string;
    resolvedAt?: string;
    reason?: string;
};
type StudioToolApprovalTranscript = {
    id: string;
    status: StudioToolApprovalStatus;
    requestedAt: string;
    resolvedAt?: string;
    reason?: string;
};
type StudioToolApprovalRequestEvent = {
    type: "tool_approval_request";
    approval: StudioToolApproval;
};
type StudioToolApprovalResultEvent = {
    type: "tool_approval_result";
    approval: StudioToolApproval;
};
type StudioToolQuestionChoice = {
    label: string;
    value: string;
};
type StudioToolQuestionPrompt = {
    id: string;
    question: string;
    choices: StudioToolQuestionChoice[];
};
type StudioToolQuestionAnswer = {
    questionId: string;
    answer: string;
    choice?: string;
    custom?: boolean;
};
type StudioToolQuestionStatus = "pending" | "answered";
type StudioToolQuestion = {
    id: string;
    runId: string;
    agentId: string;
    sessionId?: string;
    toolName: string;
    callId?: string;
    internalCallId: string;
    args: string;
    questions: StudioToolQuestionPrompt[];
    status: StudioToolQuestionStatus;
    requestedAt: string;
    answeredAt?: string;
    answers?: StudioToolQuestionAnswer[];
};
type StudioToolQuestionTranscript = {
    id: string;
    status: StudioToolQuestionStatus;
    requestedAt: string;
    answeredAt?: string;
    questions: StudioToolQuestionPrompt[];
    answers?: StudioToolQuestionAnswer[];
};
type StudioToolQuestionRequestEvent = {
    type: "tool_question_request";
    question: StudioToolQuestion;
};
type StudioToolQuestionResultEvent = {
    type: "tool_question_result";
    question: StudioToolQuestion;
};
type StudioSessionLogEvent = {
    type: "session_log";
    log: StudioSessionLogEntry;
};
type StudioPipelineLogLevel = "debug" | "info" | "warn" | "error";
type StudioPipelineLogCategory = "pipeline" | "run" | "stage" | "parallel" | "agent" | "extractor" | "api";
type StudioPipelineLogEntry = {
    id: string;
    pipelineId: string;
    runId?: string;
    sequence: number;
    timestamp: string;
    level: StudioPipelineLogLevel;
    category: StudioPipelineLogCategory;
    event: string;
    message: string;
    metadata?: JsonObject;
};
type StudioPipelineLogAppendInput = {
    pipelineId: string;
    runId?: string;
    level: StudioPipelineLogLevel;
    category: StudioPipelineLogCategory;
    event: string;
    message: string;
    metadata?: JsonObject;
};
type StudioPipelineLogListOptions = {
    pipelineId: string;
    limit: number;
    after?: number;
};
type StudioPipelineLogStore = {
    appendPipelineLog(input: StudioPipelineLogAppendInput): StudioPipelineLogEntry | Promise<StudioPipelineLogEntry>;
    listPipelineLogs(options: StudioPipelineLogListOptions): StudioPipelineLogEntry[] | Promise<StudioPipelineLogEntry[]>;
};
type StudioPipelineLogEvent = {
    type: "pipeline_log";
    log: StudioPipelineLogEntry;
};
type StudioPipelineFinalEvent = {
    type: "pipeline_final";
    runId: string;
    pipelineId: string;
    output: JsonValue;
};
type StudioPipelineRunStatus = "running" | "success" | "error";
type StudioPipelineRunRecord = {
    runId: string;
    pipelineId: string;
    status: StudioPipelineRunStatus;
    input: JsonValue;
    output?: JsonValue;
    error?: JsonValue;
    metadata?: JsonObject;
    startedAt: string;
    endedAt?: string;
    durationMs?: number;
};
type StudioPipelineRunSaveInput = {
    runId: string;
    pipelineId: string;
    status: StudioPipelineRunStatus;
    input: JsonValue;
    output?: JsonValue;
    error?: JsonValue;
    metadata?: JsonObject;
    startedAt: string;
    endedAt?: string;
    durationMs?: number;
};
type StudioPipelineRunListOptions = {
    pipelineId: string;
    limit: number;
};
type StudioPipelineRunGetOptions = {
    pipelineId: string;
    runId: string;
};
type StudioPipelineRunStore = {
    savePipelineRun(input: StudioPipelineRunSaveInput): StudioPipelineRunRecord | Promise<StudioPipelineRunRecord>;
    getPipelineRun(options: StudioPipelineRunGetOptions): StudioPipelineRunRecord | undefined | Promise<StudioPipelineRunRecord | undefined>;
    listPipelineRuns(options: StudioPipelineRunListOptions): StudioPipelineRunRecord[] | Promise<StudioPipelineRunRecord[]>;
};
type StudioPipelineRunRequest = {
    input: JsonValue;
    stream?: boolean;
    metadata?: JsonObject;
};
type StudioPipelineReplayRequest = {
    stream?: boolean;
    metadata?: JsonObject;
};
type StudioPipelineRunResponse = {
    runId: string;
    pipelineId: string;
    output: JsonValue;
};
type AgentRunRequest = {
    message: string | Message;
    history?: Message[];
    sessionId?: string;
    stream?: boolean;
    maxTurns?: number;
    toolConcurrency?: number;
    model?: StudioModelRef;
    metadata?: JsonObject;
    trace?: AgentTraceOptions;
};
type AgentRunResponse = PromptResponse;
type AgentRunStreamEvent = AgentStreamEvent | StudioToolApprovalRequestEvent | StudioToolApprovalResultEvent | StudioToolQuestionRequestEvent | StudioToolQuestionResultEvent | StudioSessionLogEvent | StudioPipelineLogEvent | StudioPipelineFinalEvent;
type StudioErrorCode = "bad_request" | "conflict" | "not_found" | "unsupported_capability" | "internal_error";
type StudioErrorResponse = {
    error: {
        code: StudioErrorCode;
        message: string;
        details?: JsonValue;
    };
};
declare function traceSummary(trace: StudioTrace): StudioTraceSummary;
type AnviaStudio = {
    readonly app: Hono;
    fetch(request: Request): Response | Promise<Response>;
    config(): StudioConfig;
    close(): void;
};

type StudioTraceObserverOptions = {
    store: StudioTraceStore | (() => StudioTraceStore | undefined) | undefined;
};
declare class StudioTraceObserver implements AgentObserver {
    private readonly options;
    constructor(options: StudioTraceObserverOptions);
    startRun(args: AgentRunStartArgs): AgentRunObserver;
    private store;
}

declare class Studio implements AnviaStudio {
    private readonly options;
    private studio;
    private server;
    private sigintHandler;
    constructor(targets?: StudioTarget[], options?: StudioOptions);
    get app(): Hono;
    fetch(request: Request): Response | Promise<Response>;
    config(): StudioConfig;
    traceObserver(): StudioTraceObserver;
    start(serveOptions?: StudioServeOptions): this;
    close(): void;
}

type SqliteSessionStoreOptions = {
    path?: string;
};
declare function createSqliteSessionStore(options?: SqliteSessionStoreOptions): StudioSessionStore & StudioTraceStore & StudioPipelineLogStore & StudioPipelineRunStore;

declare function createInMemoryStudioStore(): StudioSessionStore & StudioTraceStore & StudioPipelineLogStore & StudioPipelineRunStore;

export { type AgentRunRequest, type AgentRunResponse, type AgentRunStreamEvent, type AnviaStudio, type SqliteSessionStoreOptions, Studio, type StudioAgent, type StudioAgentConfig, type StudioAgentKnowledgeConfig, type StudioAgentMcpServerMetadata, type StudioAgentMcpToolMetadata, type StudioAgentMcpsSummary, type StudioAgentModelPolicy, type StudioAgentModelPolicyConfig, type StudioAgentModelsSummary, type StudioAgentRuntimeSummary, type StudioAgentToolApprovalMetadata, type StudioAgentToolMetadata, type StudioAgentToolSource, type StudioAgentToolsSummary, type StudioCapability, type StudioCapabilityConfig, type StudioConfig, type StudioErrorCode, type StudioErrorResponse, type StudioEvalRunRequest, type StudioEvalRunResponse, type StudioEvalSuite, type StudioEvalSuiteConfig, type StudioKnowledgeEvidence, type StudioKnowledgeEvidenceDocument, type StudioKnowledgeItem, type StudioKnowledgeItemKind, type StudioKnowledgeItemsPage, type StudioKnowledgeSourceKind, type StudioKnowledgeSourceSummary, type StudioKnowledgeSummary, type StudioMemoryConversationMessages, type StudioMemoryConversationSteps, type StudioMemoryConversationSummary, type StudioMemoryConversationsPage, type StudioMemoryUserSummary, type StudioMemoryUsersPage, type StudioModelConfig, type StudioModelDefinition, type StudioModelModalities, type StudioModelModality, type StudioModelProvider, type StudioModelProviderConfig, type StudioModelRef, type StudioModelSummary, type StudioModelsConfig, type StudioObservabilityEvent, type StudioObservabilityEventType, type StudioOptions, type StudioPipeline, type StudioPipelineConfig, type StudioPipelineDetail, type StudioPipelineFinalEvent, type StudioPipelineLogAppendInput, type StudioPipelineLogCategory, type StudioPipelineLogEntry, type StudioPipelineLogEvent, type StudioPipelineLogLevel, type StudioPipelineLogListOptions, type StudioPipelineLogStore, type StudioPipelineReplayRequest, type StudioPipelineRunGetOptions, type StudioPipelineRunListOptions, type StudioPipelineRunRecord, type StudioPipelineRunRequest, type StudioPipelineRunResponse, type StudioPipelineRunSaveInput, type StudioPipelineRunStatus, type StudioPipelineRunStore, type StudioServeOptions, type StudioSession, type StudioSessionCreateInput, type StudioSessionListOptions, type StudioSessionLogAppendInput, type StudioSessionLogCategory, type StudioSessionLogEntry, type StudioSessionLogEvent, type StudioSessionLogLevel, type StudioSessionLogListOptions, type StudioSessionRunStatus, type StudioSessionRunTranscriptInput, type StudioSessionStore, type StudioSessionSummary, type StudioSessionTraceListOptions, type StudioStaticKnowledgeDocument, type StudioStatusSummary, type StudioStores, type StudioTarget, type StudioToolApproval, type StudioToolApprovalDecision, type StudioToolApprovalRequestEvent, type StudioToolApprovalResultEvent, type StudioToolApprovalStatus, type StudioToolApprovalTranscript, type StudioToolQuestion, type StudioToolQuestionAnswer, type StudioToolQuestionChoice, type StudioToolQuestionPrompt, type StudioToolQuestionRequestEvent, type StudioToolQuestionResultEvent, type StudioToolQuestionStatus, type StudioToolQuestionTranscript, type StudioToolRunRequest, type StudioToolRunResponse, type StudioTrace, type StudioTraceListOptions, type StudioTraceObservation, type StudioTraceObservationKind, StudioTraceObserver, type StudioTraceObserverOptions, type StudioTraceStatus, type StudioTraceStore, type StudioTraceSummary, type StudioTranscriptAttachment, type StudioTranscriptChatEntry, type StudioTranscriptChildAgentEvent, type StudioTranscriptEntry, type StudioTranscriptReasoningEntry, type StudioTranscriptToolEntry, type StudioUiOptions, createInMemoryStudioStore, createSqliteSessionStore, traceSummary };
