/** * Browser half of the gateway API: same-origin JSON endpoints under * `/api/codex-plus/*`. Plain `fetch`; the host webserver's authority checks * gate the `/api` prefix, so a remote or untrusted origin cannot reach it. * * @module dsh-subagent-codex-plus/client/api */ import type { GatewayActionResponse, GatewayStateResponse } from '../shared/types.ts'; /** Browser-facing gateway API. */ export interface GatewayApi { state(sessionId: string): Promise; attach(sessionId: string, threadId?: string): Promise; detach(sessionId: string): Promise; queueDelete(sessionId: string, id: string): Promise; queueUpdate(sessionId: string, id: string, text: string): Promise; queueReorder(sessionId: string, ids: readonly string[]): Promise; steer(sessionId: string, text: string): Promise; cancel(sessionId: string): Promise; } /** The live host API instance (failures surface per call). */ export declare function makeGatewayApi(): GatewayApi;