import { randomBytes } from 'crypto';
// Agent sessions: agentId → AgentSession
export const agents = new Map();
// Session ID → agentId (reverse lookup)
export const sessionToAgent = new Map();
// Web clients: clientId → WebClient
export const webClients = new Map();
export const authAttempts = new Map();
// Pending auth: clientId → sessionId (web clients awaiting password verification)
export const pendingAuth = new Map();
// Server secret for HMAC auth tokens (generated fresh on each server start)
export const serverSecret = randomBytes(32);
/**
 * Generate a short, URL-safe session ID
 */
export function generateSessionId() {
    return randomBytes(12).toString('base64url');
}
//# sourceMappingURL=context.js.map