import type { IsoTime, NodeIdDTO } from './common.js'; export type ConsultKindDTO = 'follow_up' | 'visual'; /** A consult-outbox entry (the canvas half of a human consult/visual request). */ export interface ConsultOutboxEntryDTO { request_id: string; node_id: NodeIdDTO; kind: ConsultKindDTO; dir: string; created: IsoTime; } /** `GET /v1/canvas/consults` result. */ export interface ConsultOutboxDTO { entries: ConsultOutboxEntryDTO[]; } /** `POST /v1/canvas/consults` body. */ export interface CreateConsultRequest { node_id: NodeIdDTO; kind: ConsultKindDTO; request_id: string; dir: string; root: string; } /** Result of enqueuing a consult. */ export interface ConsultResultDTO { request_id: string; created: boolean; } /** `POST /v1/human/bridge` body — create a terminal `kind:'human'` bridge node * via `spawnNode` (NO broker engine). Distinct from `POST /v1/nodes`, whose * `spawnChild` always launches a broker the bridge must never have. */ export interface CreateHumanBridgeRequest { kind: 'human'; parent: NodeIdDTO | null; cwd: string; name: string; } /** `POST /v1/human/bridge` result — the minted bridge node id + its name. */ export interface HumanBridgeResultDTO { node_id: NodeIdDTO; name: string; } /** `POST /v1/human/deliver` result — the registered humanloop completion * handler run server-side. */ export interface HumanDeliverResultDTO { delivered: boolean; } /** `POST /v1/human/consult` result — the registered follow-up handler run * server-side. `handled` communicates whether an action was taken (never a * throw for a stale/superseded event). */ export interface HumanConsultResultDTO { handled: boolean; } /** `POST /v1/human/visual` result — the registered visual handler run * server-side. */ export interface HumanVisualResultDTO { handled: boolean; }