/** * SDK input → TORUK-CORE wire body mapper. * * Implements the §10.2 contract from ENGINEERING-PROPOSAL.md. Renames the * developer-friendly SDK field names to the wire field names TORUK-CORE * expects (verified 2026-05-12 against * /Users/mbanhawy/dev/work/TORUK/TORUK-CORE/packages/server/src/features/ * predictions/prediction.dto.ts). * * SDK → wire renames (the rename stops here; everything outbound on the * wire keeps its backend name): * SDK deploymentId → URL path :id (never a body field) * SDK message → wire question * SDK stream → wire streaming (only on stream() mode; always boolean) * * Passthroughs (verbatim on the wire): * chatId, overrideConfig, history, uploads, leadEmail, action, form, humanInput * * * Removed (intentionally never sent): * deploymentId (it's the path :id, not a body field) * message (renamed to question) * stream (renamed to streaming) * * Backward-compat: accepts the legacy `workflowId` field as an alias for * `deploymentId`, emits a one-time console.warn on first use, then proceeds * with the new wire shape. Removed in the next major release. */ import type { EmployeeExecuteInput, EmployeeStreamInput } from './employees.types'; export type WireBody = { question: string; chatId?: string; streaming?: boolean; /** * Requests a non-default streaming protocol — `'agui'` for the AG-UI wire that carries * Dynamic UI components. Core honours it only when Dynamic UI is enabled server-side and * otherwise streams legacy frames, so this is a request, not an assumption. */ streamProtocol?: string; overrideConfig?: Record; history?: unknown[]; uploads?: unknown[]; leadEmail?: string; action?: unknown; form?: Record; humanInput?: Record; }; export type MapResult = { /** * The :deploymentId path segment, or undefined when the input named none. * The caller validates it (see EmployeesClient.resolveId) — this mapper * deliberately does not invent a value, so a missing id surfaces as a * configuration error rather than a `/deployments/undefined/...` request. */ path: string | undefined; /** The JSON body to POST. */ body: WireBody; }; export declare function mapExecuteInput(input: (EmployeeExecuteInput | EmployeeStreamInput) & { workflowId?: string; }, opts: { mode: 'execute' | 'stream'; }): MapResult; export declare function resolveDeploymentId(input: { deploymentId?: string; workflowId?: string; }): string | undefined;