/** * Hono adapter: a thin wrapper proving the embed boundary. * Hono is a dependency of this adapter only, never of the server core. * Mounts the §1.1 routes including sync, registered operations, segments, and * blobs. Realtime upgrades are runtime-specific and stay with the host. */ import { type RemoteOperationRegistry, type RemoteOperationResolver, type SyncServerConfig } from '@syncular/server'; import { Hono } from 'hono'; import { type SyncularAdminGuards } from './admin.js'; export * from './admin.js'; export interface SyncularHonoOptions { readonly config: SyncServerConfig; readonly operations?: RemoteOperationRegistry | RemoteOperationResolver; /** Host authentication (§1.1); `null` ⇒ 401 `sync.auth_required`. */ readonly authenticate: (request: Request) => Promise<{ actorId: string; partition: string; } | null>; /** Mount the admin console (see `SyncularHonoAdminOptions`). */ readonly admin?: SyncularHonoAdminOptions; } /** * The admin console. The app mounts it at `path` and keeps an event ring of * `ringCapacity` events, composed into `config.events` and into the * realtime hub of `config.realtime`, so the console sees HTTP and socket * rounds. */ export interface SyncularHonoAdminOptions extends SyncularAdminGuards { /** The mount path; default `/admin`. */ readonly path?: string; /** Events the console keeps in memory; default 1000. */ readonly ringCapacity?: number; } export declare function createSyncularHono(options: SyncularHonoOptions): Hono;