@cognidesk/http¶
HTTP and SSE transport adapter for the Cognidesk runtime.
Auto-generated from source
The complete type reference below is generated from TypeScript declarations. Run pnpm docs:generate to regenerate.
Main exports¶
createCognideskHttpHandler(options)¶
Creates a framework-agnostic HTTP handler.
Parameters:
| Parameter | Type | Description |
|---|---|---|
options.runtime |
Runtime |
The Cognidesk runtime instance |
options.agentId |
string |
Agent to serve |
options.basePath |
string |
URL prefix for all routes |
options.customEvents |
CustomEvent[] |
Optional custom events to expose |
options.journeyEvents |
JourneyEvent[] |
Optional journey events to expose |
Returns: HttpHandler
Endpoints¶
The handler exposes:
POST /conversations— create a conversationPOST /conversations/:id/messages— send a messageGET /conversations/:id/events— list runtime eventsGET /conversations/:id/events/stream— stream runtime events over SSEGET /conversations/:id/snapshot— read the current runtime snapshotGET /conversations/:id/replay— replay messages and open promptsPOST /conversations/:id/custom-events/:eventName— emit a registered custom eventPOST /conversations/:id/journey-events/:eventName— emit a registered journey eventPOST /conversations/:id/widgets/:promptId/submissions— submit a widget responsePOST /conversations/:id/handoff— request handoffPOST /conversations/:id/resume— resume a conversationPOST /conversations/:id/close— close a conversationPOST /conversations/:id/compact— compact conversation historyPOST /voice/conversationsandPOST /conversations/:id/voice-segments— start voice when a voice handshake is configured
Full type reference¶
Open the generated @cognidesk/http type reference.