protocolStream<T = unknown, R = unknown>( protocolName: string, method: string, params: unknown[], signal?: AbortSignal, opts?: BoundedCallOptions & { idleTimeoutMs?: number },): AsyncGenerator<T, R, void> Parameters
- protocolName: string
- method: string
- params: unknown[]
Optionalsignal: AbortSignalOptionalopts: BoundedCallOptions & { idleTimeoutMs?: number }
Returns AsyncGenerator<T, R, void>
Consume an elevated streaming protocol method from app code.
for await (const ev of protocolStream('protocol-contribute', 'run', [opts])) …Pass
signalto abort the stream (and the host's in-flight work) mid-flight.