Document getRateLimitStatus in man page and changelog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tony Cebzanov 2026-04-16 14:50:48 -04:00
parent c979fcbb53
commit 3dbe3fba50
2 changed files with 18 additions and 0 deletions

View File

@ -2,6 +2,10 @@
## [Unreleased]
### Added
- `getRateLimitStatus` JSON-RPC/CLI command returning the current rate-limit state for the account (active flag, `retryAfterSeconds`, `challengeToken`, `expiresAtEpochSeconds`). Useful for admin UIs, monitoring, and clients that want to query current state without triggering a send.
### Changed
- Send message results now surface server-advised retry time for plain rate-limit (HTTP 413) failures, not only for proof-required challenges. The `retryAfterSeconds` field in JSON-RPC `SendMessageResult` is populated whenever the server sends a `Retry-After` header. The canonical way to distinguish proof-required failures remains `token != null`. Text output includes "retry after N seconds" when known.

View File

@ -1119,6 +1119,20 @@ The challenge token from the failed send attempt.
*--captcha* CAPTCHA::
The captcha result, starting with signalcaptcha://
=== getRateLimitStatus
Return the current rate-limit state for this account, or an inactive status if no rate limit is active.
State is tracked from observed send results: the status becomes active when a send fails with a rate-limit error, clears after a successful `submitRateLimitChallenge`, and auto-expires when the server-advised retry-after deadline passes.
With JSON output the response has the following fields:
- `active`: boolean, true if a rate-limit window is currently active
- `proofRequired`: boolean, true if a captcha challenge must be solved via `submitRateLimitChallenge`
- `retryAfterSeconds`: seconds remaining until the limit expires (omitted when `active` is false)
- `challengeToken`: the challenge token to pass to `submitRateLimitChallenge` (only present when `proofRequired` is true)
- `expiresAtEpochSeconds`: Unix timestamp when the rate-limit window expires (omitted when `active` is false)
=== version
Show version information.