Skip to main content

Module state_parsing

Module state_parsing 

Source
Expand description

Stream-message state parsers: rate-limit / api-retry / runtime-session / settings-parse-error. Mirrors upstream’s agent-sdk/src/bridge/state_parsing.ts.

Functions§

build_api_retry_update
Mirrors upstream’s buildApiRetryUpdate(message). Returns a typed ApiRetryUpdate when all three required numeric fields parse correctly.
build_rate_limit_update
Mirrors upstream’s buildRateLimitUpdate(rateLimitInfo). Returns a typed RateLimitUpdate when the input has a recognised status, populating optional fields when present.
normalize_settings_parse_errors
Accepts either a single record or an array; returns all valid entries.
parse_runtime_session_state