/** * Client half of the pi-native auth-gateway protocol. * * Dispatches a {@link streamSimple}-shaped request to an `gjc auth-gateway` * via `POST /v1/pi/stream`, reads the SSE event stream back, and pushes the * parsed events into a local {@link AssistantMessageEventStream} — the same * stream type every other provider client produces. Callers downstream of * `streamSimple` cannot tell whether the events came from a real provider * SDK or from a gateway hop; they consume `AssistantMessageEvent`s either * way. * * Activated when a {@link Model} has `transport: "pi-native"` set; the * dispatch hook lives in `streamSimple()` (see `../stream.ts`). Used by * containerized GJC deployments that route every LLM call through a * credential-holding sidecar so the container stays credential-free. */ import type { Api, AssistantMessageEventStream as AssistantMessageEventStreamType, Context, Model, SimpleStreamOptions } from "../types"; /** * Stream a turn through an `gjc auth-gateway` over the pi-native protocol. * * The returned {@link AssistantMessageEventStream} receives each parsed * `AssistantMessageEvent` verbatim from the gateway; the terminal `done` / * `error` event resolves `.result()` automatically via the base class's * completion check. Non-streaming consumers just call `.result()` and pay * for SSE framing they don't use — that overhead is dominated by provider * latency, so we always stream rather than maintaining a parallel * non-streaming path. */ export declare function streamPiNative(model: Model, context: Context, options?: SimpleStreamOptions): AssistantMessageEventStreamType;