@tikoci/centrs
    Preparing search index...

    Function apiStream

    • The --stream path: an async generator yielding a full-meta started line, one ApiStreamFrameEnvelope per native reply (!re row or !empty) to the literal command, then a terminating summary envelope (data = ApiStreamSummary). It never rewrites the command; a <menu>/listen endpoint is how to follow changes. Streaming is native-api only — a rest-api (or otherwise unresolved) transport yields a single error envelope. --count/--duration and externalSignal (Ctrl-C) bound it. Errors before the first frame (resolution, validation, confirmation, capability) yield one error envelope and stop — the CLI keys its exit code on that first envelope. onListening fires once the command is on the wire (a real barrier for callers that must act only after that point).

      Parameters

      • request: ApiRequest
      • env: Record<string, string | undefined> = Bun.env
      • OptionalexternalSignal: AbortSignal
      • OptionalonListening: () => void

      Returns AsyncGenerator<ApiStreamLine, void, void>