Expand description
Local-credential quota probes for AI coding agents.
Agent Quota reads locally configured accounts, performs the smallest provider-specific check available, and returns a versioned, provider-neutral snapshot. A successful probe and usable quota are represented separately so consumers do not need to infer routing decisions from transport health.
Structs§
- Agent
Quota Client - Reusable collector with injectable transport settings.
- Agent
Quota Config - Top-level TOML configuration.
- Collect
Usage Options - Options identifying exactly which provider accounts to collect.
- Provider
Billable Usage - Optional billable or spend-controlled usage reported by a provider.
- Provider
Capabilities Document - Versioned capability document for discovery by tools and user interfaces.
- Provider
Capability - Stable capability description for one supported provider.
- Provider
Credits - Optional provider credit balance.
- Provider
Profile - One locally configured provider account.
- Provider
Rate Limit Reset Credits - Optional summary of credits that can reset a provider rate limit.
- Provider
Usage Cache - Profile-keyed provider cache for repeated UI or CLI polling.
- Provider
Usage Collection Metadata - Optional collection metadata that does not change provider quota semantics.
- Provider
Usage Error - Structured probe failure for automation and user interfaces.
- Provider
Usage Snapshot - Normalized provider quota snapshot.
- Provider
Usage Window - One provider quota window.
- Readiness
Summary - Typed result of evaluating readiness across provider snapshots.
Enums§
- Agent
Quota Error - Configuration loading or validation error.
- Probe
Status - Health of the provider probe itself.
- Provider
Credential Source - Local credential source required by a provider probe.
- Provider
Id - Supported quota provider.
- Provider
Probe Transport - Transport used by a provider quota probe.
- Provider
Quota Source - Machine-readable source of normalized quota data.
- Provider
Usage Error Code - Stable machine-readable failure category.
- Provider
Usage Freshness - Whether a returned snapshot came from a live probe or a cache hit.
- Provider
Usage Window Kind - Normalized quota window category.
- Quota
State - Whether normalized quota permits another agent run.
- Readiness
Policy - Policy used to evaluate whether selected profiles permit more work.
Constants§
- CAPABILITIES_
SCHEMA_ VERSION - Current serialized provider-capabilities schema.
- DEFAULT_
CACHE_ TTL_ SECONDS - Default lifetime of a successful cached provider snapshot.
- SNAPSHOT_
SCHEMA_ VERSION - Current serialized snapshot schema.
Functions§
- collect_
profile_ usage - Collect one configured provider profile.
- collect_
provider_ usage - Collect all conventional local provider profiles.
- collect_
single_ provider_ usage - Collect one conventional provider profile.
- collect_
usage - Collect an explicit selection with production defaults.
- default_
claude_ credentials_ path - Conventional Claude Code credentials path for the current user.
- provider_
capabilities - Return a versioned document describing every supported provider.
- provider_
capability - Return the stable capability description for one provider.
Type Aliases§
- Agent
Quota Result - Result type used for configuration operations.