/**
 * Generated by tsnapi — public API snapshot of `@devframes/hub/initiate`
 */
// #region Interfaces
export interface DevframeHubUi {
  viewer?: {
    distDir: string;
  };
  embedded?: {
    entry: string;
  };
}
export interface HubDevframeEntry {
  devframe: DevframeDefinition;
  dock?: MountDevframeOptions['dock'];
}
export interface HubInstance {
  base: string;
  handler: (_: Request, _?: unknown) => Promise<Response>;
  nodeMiddleware: (_: IncomingMessage, _: ServerResponse, _?: (_?: unknown) => void) => void;
  websocket: {
    open: (_: unknown) => void;
    message: (_: unknown, _: unknown) => void;
    close: (_: unknown, _?: number, _?: string) => void;
    drain: (_: unknown) => void;
  };
  ready: Promise<void>;
  context: Promise<DevframeHubContext>;
  connectionMeta: () => ConnectionMeta;
  close: () => Promise<void>;
}
export interface InitHubOptions {
  base: string;
  devframes?: (DevframeDefinition | HubDevframeEntry)[];
  rpcDeclarations?: CreateHubContextOptions['builtinRpcDeclarations'];
  context?: DevframeHubContext;
  configure?: (_: DevframeHubContext) => void | Promise<void>;
  ui?: DevframeHubUi;
  server?: Server;
  ws?: DevframeWsOptions;
  host?: string;
  auth?: boolean | DevframeAuthHandler;
  mcp?: boolean | McpRouteOptions;
  key?: string;
  origin?: string | (() => string);
  cwd?: string;
  getStorageDir?: (_: DevframeStorageScope) => string;
  allowedOrigins?: readonly string[] | WsOriginRegistry | false;
  destroyUnmatchedUpgrades?: boolean;
}
// #endregion

// #region Functions
export declare function initHub(_: InitHubOptions): HubInstance;
// #endregion

// #region Variables
export declare const DEVFRAMES_HUB_BASE: string;
// #endregion