/** * Gateway host UI service: same-origin JSON endpoints under * `/api/codex-plus/*` that the browser client (header badge, dock status * line, queue dock, floating control window) drives. Wraps the * {@link GatewayManager} and mirrors the durable bindings (C3) so the UI * can show direct-connect state, the live queue, steer insertion, cancel, * and attach/detach without touching any dsh model path. * * Route registration follows the dsh-pet pattern: plain `WebRoute`s on the * host webserver; the connection plugin's authority checks gate `/api/*`. * * @module dsh-subagent-codex-plus/gateway/ui */ import type { Context } from '@deepseek-ai/cordis'; import type { WebRoute } from '@deepseek-ai/dsh-host-webserver'; import type { SessionId } from '@deepseek-ai/dsh-session'; import type { GatewaySessionView } from '../shared/types.ts'; import type { GatewayManager } from './manager.ts'; /** Browser-facing base path of the gateway API. */ export declare const GATEWAY_UI_PREFIX = "/api/codex-plus"; /** The browser-facing gateway API surface. */ export declare class GatewayUiService { private readonly ctx; private readonly manager; constructor(ctx: Context, manager: GatewayManager); /** Every route the host webserver should register. */ routes(): WebRoute[]; private handleState; private handleAttach; private handleDetach; private handleQueueDelete; private handleQueueReorder; private handleQueueUpdate; private handleSteer; private handleCancel; /** Build the per-session state snapshot the browser polls. */ view(sessionId: SessionId): Promise; private bindings; }