@tikoci/centrs
    Preparing search index...

    Function apiListen

    • The open-ended --stream follow path: an async generator yielding one ApiEnvelope per /listen change frame, then a terminating summary envelope (data = ApiStreamSummary). Open-ended follow 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 follow is established 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<ApiEnvelope, void, void>