import type { AgentCheckpointStore, AgentRunStore, RunEventNotifier, RunEventStore } from "./run-store-public-types.js";
import type { LocalAgentStore } from "./store/local-agent-store.js";
/** Conversation mode for agent runs. */
export type AgentModeOption = "agent" | "plan";
export interface SDKImageDimension {
    width: number;
    height: number;
}
export type SDKImage = {
    url: string;
    dimension?: SDKImageDimension;
} | {
    data: string;
    mimeType: string;
    dimension?: SDKImageDimension;
};
export interface SDKUserMessage {
    text: string;
    images?: SDKImage[];
}
export type McpServerConfig = {
    type?: "stdio";
    command: string;
    args?: string[];
    env?: Record<string, string>;
    cwd?: string;
} | {
    type?: "http" | "sse";
    url: string;
    headers?: Record<string, string>;
    auth?: {
        CLIENT_ID: string;
        CLIENT_SECRET?: string;
        scopes?: string[];
    };
};
export type SettingSource = "project" | "user" | "team" | "mdm" | "plugins" | "all";
export type SDKJsonPrimitive = string | number | boolean | null;
export type SDKJsonValue = SDKJsonPrimitive | {
    [key: string]: SDKJsonValue;
} | SDKJsonValue[];
export type SDKCustomToolContent = {
    type: "text";
    text: string;
} | {
    type: "image";
    data: string;
    mimeType?: string;
};
export type SDKCustomToolResult = string | SDKJsonValue | {
    content: SDKCustomToolContent[];
    isError?: boolean;
    structuredContent?: Record<string, SDKJsonValue>;
};
export interface SDKCustomToolContext {
    toolCallId?: string;
}
export interface SDKCustomTool {
    description?: string;
    inputSchema?: Record<string, SDKJsonValue>;
    execute: (args: Record<string, SDKJsonValue>, context: SDKCustomToolContext) => SDKCustomToolResult | Promise<SDKCustomToolResult>;
}
export interface SandboxOptions {
    enabled: boolean;
}
export interface ModelParameterValue {
    id: string;
    value: string;
}
export interface ModelSelection {
    id: string;
    params?: ModelParameterValue[];
}
export interface ModelParameterDefinition {
    id: string;
    displayName?: string;
    values: Array<{
        value: string;
        displayName?: string;
    }>;
}
export interface ModelVariant {
    params: ModelParameterValue[];
    displayName: string;
    description?: string;
    isDefault?: boolean;
}
export interface ModelListItem {
    id: string;
    displayName: string;
    description?: string;
    aliases?: string[];
    parameters?: ModelParameterDefinition[];
    variants?: ModelVariant[];
}
export interface AgentDefinition {
    description: string;
    prompt: string;
    model?: ModelSelection | "inherit";
    mcpServers?: Array<string | Record<string, McpServerConfig>>;
}
/**
 * Options that only apply to local agents. Exported as a standalone type so
 * users can reference it directly (e.g. `Partial<LocalAgentOptions>`) instead
 * of having to unwrap the optional `local` field on `AgentOptions` with
 * `Partial<NonNullable<AgentOptions["local"]>>`.
 */
export interface LocalAgentOptions {
    cwd?: string | string[];
    /**
     * Enable Cursor's Auto-review for local tool calls. When this is true,
     * local runs select the classifier-backed Auto mode whenever the connected
     * backend has the Auto-review classifier feature enabled.
     */
    autoReview?: boolean;
    /**
     * Custom {@link LocalAgentStore} for this call. When omitted, uses
     * `Cursor.configure({ local: { store } })` if set; otherwise
     * {@link SqliteLocalAgentStore} (see `SqliteLocalAgentStore.open`).
     * For a portable JSONL file backend, use `new JsonlLocalAgentStore(rootDir)`.
     * Agent rows hold a slim checkpoint ref (`latestCheckpoint.rootBlobId`);
     * blob bytes live on `store.checkpoints`.
     */
    store?: LocalAgentStore;
    /**
     * Ambient Cursor settings layers to load from the local filesystem.
     * Local agents only. On cloud, `project` / `team` / `plugins` are
     * always on and `user` / `mdm` / `local` have no VM equivalent, so
     * this field is gated to the local shape.
     */
    settingSources?: SettingSource[];
    sandboxOptions?: SandboxOptions;
    /**
     * In-process callback tools for this agent, exposed as the
     * `custom-user-tools` MCP server (`GetMcpTools` / `CallMcpTool`). Applied on
     * every `send` unless overridden by {@link LocalSendOptions.customTools}.
     * Local agents only; not supported on cloud agents.
     */
    customTools?: Record<string, SDKCustomTool>;
}
/**
 * Per-send local overrides. Use with `Agent.send(..., { local })`. Agent-level
 * defaults live on {@link LocalAgentOptions} (`Agent.create({ local })`).
 */
export interface LocalSendOptions {
    /**
     * Expire the currently active persisted run, if any, before starting this
     * message as a new follow-up run. Recovery path for local agents left wedged
     * after a crashed CLI process.
     */
    force?: boolean;
    /**
     * Custom tools for this send only. When set, replaces
     * {@link LocalAgentOptions.customTools} for that run.
     */
    customTools?: Record<string, SDKCustomTool>;
}
/**
 * Options that only apply to cloud agents. Exported as a standalone type so
 * users can reference it directly (e.g. `Partial<CloudAgentOptions>`) instead
 * of having to unwrap the optional `cloud` field on `AgentOptions` with
 * `Partial<NonNullable<AgentOptions["cloud"]>>`.
 */
export interface CloudAgentOptions {
    env?: {
        type: "cloud";
        name?: string;
    } | {
        type: "pool";
        name?: string;
    } | {
        type: "machine";
        name?: string;
    };
    repos?: Array<{
        url: string;
        startingRef?: string;
        prUrl?: string;
    }>;
    workOnCurrentBranch?: boolean;
    autoCreatePR?: boolean;
    skipReviewerRequest?: boolean;
    /**
     * Per-session env vars injected into the cloud agent's shell, e.g. for
     * caller-minted credentials. Encrypted at rest; deleted with the agent.
     */
    envVars?: Record<string, string>;
}
export interface CursorAgentPlatformOptions {
    /**
     * Custom {@link LocalAgentStore}. Prefer `local.store` on `Agent.create` /
     * `Agent.resume` unless constructing a platform directly. When omitted, the
     * platform uses built-in SQLite under `stateRoot` — implement
     * {@link LocalAgentStore} only to replace that default path.
     */
    localStore?: LocalAgentStore;
    stateRoot?: string;
    workspaceRef?: string;
    /**
     * When set, custom-store reads filter to agents whose `cwd` matches. Populated
     * from an explicit caller `cwd`; omitted when the caller did not pass one.
     */
    scopedWorkspaceRef?: string;
    /**
     * Internal storage hooks retained for existing advanced callers.
     */
    store?: AgentRunStore;
    checkpointStore?: AgentCheckpointStore;
    eventStore?: RunEventStore;
    eventNotifier?: RunEventNotifier;
}
export interface AgentOptions {
    /**
     * Model selection (`{ id, params? }`). Required for local agents; optional
     * for cloud (the server resolves the caller's configured default when
     * omitted). Use `Cursor.models.list()` to discover valid selections.
     */
    model?: ModelSelection;
    apiKey?: string;
    /**
     * Optional human-readable name for the agent, surfaced as the `title` in
     * `Agent.list()` / `Agent.get()`. Cloud agents auto-generate a name from
     * the first prompt when this is omitted; local agents fall back to a
     * generic default.
     */
    name?: string;
    local?: LocalAgentOptions;
    cloud?: CloudAgentOptions;
    mcpServers?: Record<string, McpServerConfig>;
    agents?: Record<string, AgentDefinition>;
    agentId?: string;
    idempotencyKey?: string;
    /** Initial conversation mode for this agent. */
    mode?: AgentModeOption;
}
//# sourceMappingURL=options.d.ts.map