import { RateLimiter } from './rate-limiter.js'; export interface WorkspaceConfig { id: string; name: string; agents: string[]; rateLimit?: { rate: number; intervalSec: number; burst: number; }; members?: string[]; } export declare class Workspace { readonly id: string; readonly name: string; readonly agentWhitelist: Set; readonly limiter: RateLimiter; readonly memberSet: Set | null; constructor(cfg: WorkspaceConfig); hasAgent(agent: string): boolean; hasMember(userId: string): boolean; allow(userKey: string): boolean; } export declare class WorkspaceRegistry { private workspaces; private defaultWorkspace; constructor(); add(cfg: WorkspaceConfig): void; /** * Remove a workspace by id. Returns true on success, false if the id * doesn't exist or refers to the default workspace (which is created * by the constructor and used as a fallback — removing it would break * `resolve()` for users without an explicit assignment). */ remove(id: string): boolean; get(id: string): Workspace | undefined; /** Resolve workspace for a user. Prioritizes named workspaces over default. */ resolve(userId: string): Workspace; /** Load from config */ load(config: { workspaces?: WorkspaceConfig[]; }): void; /** * Return summaries of every registered workspace, including the default. * Used by `/workspaces` and the Web settings UI. */ list(): Array<{ id: string; name: string; agents: string[]; members: number | null; rateLimit: { rate: number; intervalSec: number; burst: number; }; }>; /** * Full config snapshot for the settings UI, including the original * member list. Distinct from `list()`'s summary shape (which exposes * only a member count to preserve callers that don't need the IDs). */ listFull(): WorkspaceConfig[]; get default(): Workspace; } export declare const workspaceRegistry: WorkspaceRegistry; //# sourceMappingURL=workspace.d.ts.map