/**
 * Generated by tsnapi — public API snapshot of `devframe/initiate`
 */
// #region Interfaces
export interface DevframeInstance {
  base: string;
  handler: (_: Request, _?: unknown) => Promise<Response>;
  nodeMiddleware: (_: IncomingMessage, _: ServerResponse, _?: (_?: unknown) => void) => void;
  websocket: DevframeInstanceWebSocket;
  ready: Promise<void>;
  context: Promise<DevframeNodeContext>;
  connectionMeta: () => ConnectionMeta;
  close: () => Promise<void>;
}
export interface DevframeInstanceInternals {
  readonly started?: StartedServer;
  readonly authHandler?: DevframeAuthHandler;
}
export interface DevframeInstanceWebSocket {
  open: (_: unknown) => void;
  message: (_: unknown, _: unknown) => void;
  close: (_: unknown, _?: number, _?: string) => void;
  drain: (_: unknown) => void;
}
export interface InitDevframeOptions {
  base: string;
  distDir?: string | false;
  server?: Server;
  ws?: DevframeWsOptions;
  host?: string;
  auth?: boolean | DevframeAuthHandler;
  mcp?: boolean | McpRouteOptions;
  key?: string;
  origin?: string | (() => string);
  flags?: Record<string, unknown>;
  allowedOrigins?: readonly string[] | WsOriginRegistry | false;
  app?: H3;
  getStorageDir?: (_: DevframeStorageScope) => string;
  destroyUnmatchedUpgrades?: boolean;
  onPeerConnect?: (_: Peer, _: DevframeNodeRpcSession) => void;
  onPeerDisconnect?: (_: Peer, _: DevframeNodeRpcSessionMeta) => void;
}
// #endregion

// #region Functions
export declare function getInstanceInternals(_: object): DevframeInstanceInternals;
export declare function initDevframe(_: DevframeDefinition, _: InitDevframeOptions): DevframeInstance;
// #endregion