import { Session } from '../Session/index.js'; import type { ServerToolMetadata } from '../../../shared/types.js'; export declare class SessionManager { private toolDefinitions; private sessions; /** Maps used token strings to their embedded timestamp (seconds). */ private usedTokens; private pruneTimer; constructor(toolDefinitions: ServerToolMetadata[]); create(peerId: string): Session; get(peerId: string): Session | undefined; /** * Record activity for a peer to prevent idle timeout. */ touch(peerId: string): void; /** * Validate an auth token and consume it so it cannot be reused. * Returns true only if the token is valid, not expired, and not previously used. */ authenticate(token: string | undefined, authSecret: string): boolean; cleanup(peerId: string): void; private pruneIdleSessions; private pruneTokens; }