import { TerminalSession } from './TerminalSession'; import type { SparqlEngine } from '../storage/sparql/SubgraphQueryEngine'; import type { EnvRef, CreateSessionRequest } from './types'; export interface TerminalSessionManagerOptions { /** Maximum sessions per user */ maxSessionsPerUser: number; /** Maximum total sessions */ maxTotalSessions: number; /** Default session timeout in seconds */ defaultTimeout: number; /** Maximum session timeout in seconds */ maxTimeout: number; /** Default working directory */ defaultWorkdir: string; /** Product SPARQL engine for ACL queries */ sparqlEngine?: SparqlEngine; /** Whether to require ACL Control permission (default: true) */ requireAclControl: boolean; /** Base URL for mapping file paths to resource URLs */ baseUrl?: string; /** File system root for mapping URLs to paths */ fileSystemRoot?: string; } export declare class TerminalSessionManager { protected readonly logger: import("global-logger-factory").Logger; private readonly sessions; private readonly userSessions; private readonly options; private readonly aclService?; constructor(options?: Partial); /** * Convert a file system path to a resource URL. */ private pathToUrl; /** * Check if user has acl:Control permission for the working directory. */ checkWorkdirPermission(userId: string, workdir: string): Promise; /** * Create a new terminal session */ createSession(userId: string, request: CreateSessionRequest, secretResolver?: (ref: EnvRef) => Promise): Promise; /** * Get a session by ID */ getSession(sessionId: string): TerminalSession | undefined; /** * Get all sessions for a user */ getUserSessions(userId: string): TerminalSession[]; /** * Terminate a session */ terminateSession(sessionId: string): boolean; /** * Remove a session from tracking */ private removeSession; /** * Get session statistics */ getStats(): { totalSessions: number; activeUsers: number; }; /** * Terminate all sessions (for shutdown) */ terminateAll(): void; }