import { type ReactNode } from "react";
import type { ResourceRef } from "@stigmer/sdk";
import type { UseGitHubConnectionReturn } from "../github/useGitHubConnection.js";
import type { WorkspaceFileLister } from "../workspace/WorkspaceFileLister.js";
import type { WorkspaceFileReader } from "../workspace/WorkspaceFileReader.js";
import type { WorkspaceContentSearcher } from "../workspace/WorkspaceContentSearcher.js";
import type { HarnessOption } from "../models/harness.js";
import type { RuntimeEnvProvider } from "./runtime-env.js";
import type { SessionAudience } from "./audience.js";
/** Props for {@link NewSessionViewer}. */
export interface NewSessionViewerProps {
    /** Organization slug. Required for session creation. */
    readonly org: string;
    /** Called after the session and first execution are created. */
    readonly onSessionCreated: (sessionId: string) => void;
    /** Called on error (for toast notifications or other UI feedback). */
    readonly onError?: (message: string) => void;
    /**
     * GitHub connection state for the workspace repo picker.
     * Platform-specific — web passes `useGitHubConnection(org)`,
     * desktop omits it.
     */
    readonly gitHubConnection?: UseGitHubConnectionReturn;
    /** Whether to enable GitHub workspace sources. @default true */
    readonly enableGitHub?: boolean;
    /** Whether to enable local workspace sources. @default false */
    readonly enableLocal?: boolean;
    /**
     * Native folder picker callback for desktop environments.
     * Desktop supplies this via Tauri's dialog plugin.
     */
    readonly onBrowseLocalFolder?: () => Promise<string | null>;
    /**
     * Platform-injected file lister for workspace entries. When provided,
     * each entry in the Setup tab's workspace section renders an
     * expandable file tree. (DD-004 capability injection, DD-011 opt-in.)
     */
    readonly workspaceFileLister?: WorkspaceFileLister;
    /**
     * Platform-injected content reader for the read-only file viewer. When set,
     * clicking a file in the Workspace tree opens it in a contextual "Viewer"
     * tab — the same capability `SessionViewer` accepts (DD-016 parity).
     */
    readonly workspaceFileReader?: WorkspaceFileReader;
    /**
     * Platform-injected content (text) searcher — the same capability
     * `SessionViewer` accepts (DD-016 parity). Desktop injects a native
     * ripgrep-backed searcher; web leaves it undefined (DD-09).
     */
    readonly workspaceContentSearcher?: WorkspaceContentSearcher;
    /**
     * Supplies host-app environment variables for the session's first
     * execution (e.g. short-lived credentials for MCP tools, minted as
     * the signed-in user). Evaluated at submit time, before the session
     * is created; host values win over composer-collected env on key
     * collisions. If the provider throws, the submission fails with an
     * error surfaced via `onError` — see {@link RuntimeEnvProvider}.
     */
    readonly getRuntimeEnv?: RuntimeEnvProvider;
    /**
     * Presentation audience for the launcher. `"endUser"` locks the
     * pinned agent (when `initialAgentRef` is set) and hides the MCP
     * server, skill, and session-variable pickers — for product-embedded
     * chat where the agent is configured upstream by the platform. The
     * model selector, interaction mode, harness selector, attachments,
     * and workspace picker remain. See {@link SessionAudience}.
     *
     * @default "integrator"
     */
    readonly audience?: SessionAudience;
    /**
     * Harness pre-selected for new sessions when the user has not made
     * an explicit choice yet. The user can still switch before starting
     * the session, and their explicit choice wins on subsequent visits.
     *
     * @default "native"
     */
    readonly defaultHarness?: HarnessOption;
    /** Agent to auto-select on mount (used for draft flows). */
    readonly initialAgentRef?: ResourceRef;
    /**
     * Pre-bind the new session to a specific `AgentInstance` on mount.
     *
     * Requires `initialAgentRef`. When both are set, the session is created
     * against this exact configured deployment (the env-collection flow is
     * skipped because the instance already binds its environment). Powers the
     * "Start session" action on the Agent detail page's Instances tab.
     */
    readonly initialInstanceId?: string;
    /** Files to auto-attach on mount (used for edit flows). */
    readonly initialAttachments?: File[];
    /** Heading text above the composer. @default "What would you like to work on?" */
    readonly heading?: string;
    /** Placeholder for the composer textarea. */
    readonly placeholder?: string;
    /** Initial number of visible textarea rows. @default 3 */
    readonly initialRows?: number;
    /** Auto-focus the textarea on mount. @default true */
    readonly autoFocus?: boolean;
    /**
     * Slot for host-injected actions rendered below the composer
     * (e.g., submit error messages). Keeps the SDK organism unopinionated
     * about Console-specific error rendering (DD-004).
     */
    readonly footerContent?: ReactNode;
    /** Additional CSS class names for the root container. */
    readonly className?: string;
}
/**
 * Full-featured new-session launcher organism — the pre-session analog
 * of `SessionViewer`.
 *
 * Owns `useNewSessionFlow` internally and composes:
 * - **Centered composer** (primary pane): `SessionComposer` with all
 *   context pickers (agent, workspace, MCP servers, skills)
 * - **Session panel** (secondary pane): the unified `WorkspaceSurface` with a
 *   Config rail view — collapsed by default behind a persistent top-right chip
 *   and homing on the Config facet when opened. Same layout model as
 *   `SessionViewer` (DD-016).
 *
 * Framework-agnostic — no Next.js, no Tauri, no routing deps. Host
 * apps inject platform-specific values via props (DD-004/DD-016).
 *
 * @example
 * ```tsx
 * // Desktop
 * <NewSessionViewer
 *   org={org}
 *   onSessionCreated={(id) => navigate(`/sessions/${id}`)}
 *   onError={(msg) => toast.error(msg)}
 *   enableLocal
 *   onBrowseLocalFolder={browseLocalFolder}
 * />
 *
 * // Web
 * <NewSessionViewer
 *   org={org}
 *   onSessionCreated={navigateToSession}
 *   onError={(msg) => toast.error(msg)}
 *   enableGitHub
 *   gitHubConnection={gitHubConnection}
 * />
 * ```
 */
export declare function NewSessionViewer({ org, onSessionCreated, onError, gitHubConnection, enableGitHub, enableLocal, onBrowseLocalFolder, workspaceFileLister, workspaceFileReader, workspaceContentSearcher, getRuntimeEnv, audience, defaultHarness, initialAgentRef, initialInstanceId, initialAttachments, heading, placeholder, initialRows, autoFocus, footerContent, className, }: NewSessionViewerProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=NewSessionViewer.d.ts.map