Extension-host handler for the Datalayer Agent Chat webview bridge.
The Agent Chat webview lives in a VS Code sandbox and must not make direct
HTTP calls to the Datalayer platform. Instead, it implements
IAgentRuntimesClient with a BridgeAgentRuntimesClient that posts
JSON messages through postMessage. This module is the matching
extension-host handler: it listens on the webview's onDidReceiveMessage,
invokes the real SdkAgentRuntimesClient (which in turn uses the
shared DatalayerClient + AgentsMixin), and posts the result back to the
webview correlated by requestId.
Only a whitelisted set of method names is dispatched, so the webview cannot
reach arbitrary properties on the client instance. The whitelist mirrors
IAgentRuntimesClient.
Phase 2b scope: request/response only (no streaming). Streaming support
(for streamChat) lands alongside the chat endpoint SDK coverage in a
follow-up phase.
Extension-host handler for the Datalayer Agent Chat webview bridge.
The Agent Chat webview lives in a VS Code sandbox and must not make direct HTTP calls to the Datalayer platform. Instead, it implements
IAgentRuntimesClientwith aBridgeAgentRuntimesClientthat posts JSON messages throughpostMessage. This module is the matching extension-host handler: it listens on the webview'sonDidReceiveMessage, invokes the real SdkAgentRuntimesClient (which in turn uses the sharedDatalayerClient + AgentsMixin), and posts the result back to the webview correlated byrequestId.Only a whitelisted set of method names is dispatched, so the webview cannot reach arbitrary properties on the client instance. The whitelist mirrors IAgentRuntimesClient.
Phase 2b scope: request/response only (no streaming). Streaming support (for
streamChat) lands alongside the chat endpoint SDK coverage in a follow-up phase.