StreamSourceOptions
Defined in: packages/client/src/circuits/stream-source.ts:33
Properties
Section titled “Properties”fetch?
Section titled “fetch?”
optionalfetch?: typeoffetch
Defined in: packages/client/src/circuits/stream-source.ts:58
optionallive?:boolean
Defined in: packages/client/src/circuits/stream-source.ts:56
Long-poll the tail after catching up. false reads to the tail and stops.
offset?
Section titled “offset?”
optionaloffset?:string
Defined in: packages/client/src/circuits/stream-source.ts:37
Where to resume. STREAM_START for a new subscription.
onTokenRejected?
Section titled “onTokenRejected?”
optionalonTokenRejected?: (status) =>string|Promise<string|null> |null
Defined in: packages/client/src/circuits/stream-source.ts:54
Called when the edge rejects the current token (401/403). Return a fresh token to retry once
with it, or null to stop.
Returning null is the right answer for a revoked entitlement, and the reason this hook
exists at all rather than a blanket retry — see createTokenRecovery.
Parameters
Section titled “Parameters”status
Section titled “status”number
Returns
Section titled “Returns”string | Promise<string | null> | null
signal?
Section titled “signal?”
optionalsignal?:AbortSignal
Defined in: packages/client/src/circuits/stream-source.ts:57
token: () =>
string|Promise<string>
Defined in: packages/client/src/circuits/stream-source.ts:46
The current stream token, re-resolved on every request rather than captured once.
A live subscription outlives its token by design — the ADR-0055 default lifetime is five minutes and a subscription runs for hours — so a token frozen at open would 403 the whole stream at the first TTL boundary. This is the ADR-0013 read-path refresh seam. A token that cannot be produced (the thunk throws) ends the read with that error.
Returns
Section titled “Returns”string | Promise<string>
url:
string
Defined in: packages/client/src/circuits/stream-source.ts:35
Absolute URL of the stream, through the edge — never durable-streams directly.