/**
 * Session Controller
 *
 * Handles HTTP API endpoints for session management operations.
 * Provides REST API interface for the MCP server to interact with sessions
 * managed by the backend's session backend.
 *
 * @module session.controller
 */
import type { Request, Response } from 'express';
/**
 * List all active sessions
 *
 * @route GET /api/sessions
 * @returns {object} JSON response with sessions array
 */
export declare function listSessions(this: unknown, req: Request, res: Response): Promise<void>;
/**
 * Get a specific session by name
 *
 * @route GET /api/sessions/:name
 * @param name - Session name
 * @returns {object} JSON response with session info or 404
 */
export declare function getSession(this: unknown, req: Request, res: Response): Promise<void>;
/**
 * Create a new session
 *
 * @route POST /api/sessions
 * @body {name, cwd, command, args, env} - Session configuration
 * @returns {object} JSON response with created session info
 */
export declare function createSession(this: unknown, req: Request, res: Response): Promise<void>;
/**
 * Write data to a session
 *
 * @route POST /api/sessions/:name/write
 * @param name - Session name
 * @body {data} - Data to write to the session
 * @returns {object} JSON response confirming write
 */
export declare function writeToSession(this: unknown, req: Request, res: Response): Promise<void>;
/**
 * Get output from a session
 *
 * @route GET /api/sessions/:name/output
 * @param name - Session name
 * @query lines - Number of lines to retrieve (default: 100)
 * @returns {object} JSON response with session output
 */
export declare function getSessionOutput(this: unknown, req: Request, res: Response): Promise<void>;
/**
 * Kill a session
 *
 * @route DELETE /api/sessions/:name
 * @param name - Session name
 * @returns {object} JSON response confirming deletion
 */
export declare function killSession(this: unknown, req: Request, res: Response): Promise<void>;
/**
 * Get previously running sessions that can be resumed.
 *
 * Returns sessions that have persisted metadata but no active PTY session.
 * Used by the frontend to show a resume popup on app restart.
 *
 * @route GET /api/sessions/previous
 * @returns {object} JSON response with previous sessions
 */
export declare function getPreviousSessions(this: unknown, req: Request, res: Response): Promise<void>;
/**
 * Dismiss previous sessions by clearing persisted state.
 *
 * Clears both in-memory metadata and the state file so the resume
 * popup won't appear again until new sessions are created and stopped.
 *
 * @route POST /api/sessions/previous/dismiss
 * @returns {object} JSON response confirming dismissal
 */
export declare function dismissPreviousSessions(this: unknown, req: Request, res: Response): Promise<void>;
/**
 * Submit an OAuth authorization code to a session.
 *
 * After an agent's OAuth token expires and /login is sent, the CLI outputs an
 * OAuth URL. The user visits the URL, gets an auth code, and sends it back via
 * this endpoint. The code is written to the agent's PTY session to complete
 * the re-authentication flow.
 *
 * @route POST /api/sessions/:name/oauth-callback
 * @param name - Session name
 * @body {code} - OAuth authorization code from the user
 * @returns {object} JSON response confirming code was submitted
 */
export declare function submitOAuthCallback(this: unknown, req: Request, res: Response): Promise<void>;
//# sourceMappingURL=session.controller.d.ts.map