import { type ReactNode } from "react";
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 { ApplyResourceResult } from "../library/useApplyResource.js";
import type { RuntimeEnvProvider } from "./runtime-env.js";
import type { SessionAudience } from "./audience.js";
/** Props for {@link SessionViewer}. */
export interface SessionViewerProps {
    /** Session ID to load and display. */
    readonly sessionId: string;
    /** Organization slug. */
    readonly org: string;
    /**
     * GitHub connection state. Platform-specific — web passes
     * `useGitHubConnection(org)`, desktop passes
     * `useDesktopGitHubConnection(org)`.
     */
    readonly gitHubConnection?: UseGitHubConnectionReturn;
    /**
     * Whether to enable GitHub workspace features in the composer.
     * @default true
     */
    readonly enableGitHub?: boolean;
    /**
     * Whether to enable local workspace features in the composer.
     * Web passes `deploymentMode === "local"`, desktop passes `true`.
     * @default false
     */
    readonly enableLocal?: boolean;
    /**
     * Native folder picker callback for desktop environments.
     *
     * When provided alongside `enableLocal`, the composer renders a
     * "Browse Folder" button that opens the system folder dialog.
     * Without this callback `enableLocal` alone is not sufficient
     * for the UI to render the local option.
     *
     * Desktop apps supply this via Tauri's dialog plugin. Web apps
     * omit it (no native picker available).
     */
    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
     * provided, clicking a file in the Workspace tree opens it in a contextual
     * "Viewer" tab. GitHub Contents/blob on web, Tauri fs on desktop; `undefined`
     * degrades the viewer to an "unavailable here" state (DD-004, DD-011 opt-in).
     */
    readonly workspaceFileReader?: WorkspaceFileReader;
    /**
     * Platform-injected content (text) searcher. When provided, the session
     * panel's Search pane gains a `Name | Text` toggle for full-text search
     * across the workspace. Desktop injects a native ripgrep-backed searcher;
     * web leaves it undefined (git content search needs a branch-accurate
     * backend — DD-09), keeping Search filename-only there (DD-004, DD-011 opt-in).
     */
    readonly workspaceContentSearcher?: WorkspaceContentSearcher;
    /**
     * Supplies host-app environment variables for every follow-up
     * execution (e.g. short-lived credentials for MCP tools, minted as
     * the signed-in user). Evaluated fresh at each send; host values win
     * over composer-collected env on key collisions. If the provider
     * throws, the send is blocked and an error banner is shown — see
     * {@link RuntimeEnvProvider}.
     */
    readonly getRuntimeEnv?: RuntimeEnvProvider;
    /**
     * Presentation audience for the viewer. `"endUser"` locks the
     * session's agent and hides the MCP server, skill, and
     * session-variable configuration in both the composer and the
     * inspector's Setup tab — for product-embedded chat where the agent
     * is configured upstream by the platform. The model selector,
     * interaction mode, attachments, and workspace picker remain. See
     * {@link SessionAudience}.
     *
     * @default "integrator"
     */
    readonly audience?: SessionAudience;
    /**
     * Slot for host-injected header actions. Rendered in the top-right corner
     * of the viewer, beside the panel chip. Keeps the SDK organism
     * unopinionated about Console auth (DD-004).
     */
    readonly headerActions?: ReactNode;
    /**
     * Host-injected access management control (e.g. the Console's
     * `ManageAccessButton` with its own permission gating). Rendered inside
     * the panel's Config facet rather than the header — access is session
     * configuration, not a moment-to-moment action (DD-004 slot injection).
     */
    readonly accessSlot?: ReactNode;
    /** Called after a resource is applied from the Artifacts tab. */
    readonly onApplied?: (result: ApplyResourceResult) => void;
    /** Additional CSS classes for the root container. */
    readonly className?: string;
}
/**
 * Full-featured agent session viewer — the graph-less analog of
 * `WorkflowExecutionViewer`.
 *
 * Owns `useSessionPageFlow` internally and composes:
 * - **Conversation column** (primary): `MessageThread` + error
 *   banners + `SessionComposer`
 * - **Session panel** (secondary): the unified `WorkspaceSurface` — explorer,
 *   search, read-only editor, and the session facets (Config, Changes,
 *   Artifacts, Usage, Inspect) as injected rail views. Collapsed by default
 *   to a top-right chip; opening a file (tree, search, or a transcript path)
 *   expands it.
 *
 * Connected via `ResizableSplit` with persisted chat width.
 *
 * Thread selection is provided via `ThreadSelectionContext` (Phase 2
 * opt-in) for render-isolated per-item selection.
 *
 * Framework-agnostic — no Next.js, no Tauri, no routing deps. Host
 * apps inject platform-specific values via props (DD-004/DD-016).
 *
 * @example
 * ```tsx
 * // Web (cloud execution)
 * <SessionViewer
 *   sessionId={id}
 *   org={org}
 *   gitHubConnection={gitHubConnection}
 *   enableGitHub
 *   headerActions={<ShareButton sessionId={id} />}
 * />
 *
 * // Desktop (local execution with native picker)
 * <SessionViewer
 *   sessionId={id}
 *   org={org}
 *   enableLocal
 *   onBrowseLocalFolder={browseLocalFolder}
 *   headerActions={<ShareButton sessionId={id} />}
 * />
 * ```
 */
export declare function SessionViewer({ sessionId, org, gitHubConnection, enableGitHub, enableLocal, onBrowseLocalFolder, workspaceFileLister, workspaceFileReader, workspaceContentSearcher, getRuntimeEnv, audience, headerActions, accessSlot, onApplied, className, }: SessionViewerProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=SessionViewer.d.ts.map