Expand description
Identity → env-var resolver.
Per-provider matrix of which env vars carry which credential. The
GitHub PAT becomes both GITHUB_TOKEN and GH_TOKEN because both
the official gh CLI and direct API consumers (curl, oct.js) read
one or the other; emitting both is the lowest-friction way to make
every common workflow Just Work.
Modules§
- oauth_
status - Canonical-value enumeration for OAuth-class
IdentityAccount.status.
Enums§
- OAuth
Probe Status - Result of probing a per-bundle OAuth token directory.
- Provider
Class - What kind of credential a provider uses, and how
inject_identity_envputs it into the agent’s env at spawn time. PerSPEC_OAUTH_IDENTITY_BUNDLES_2026_05_22.md§4.3. - Resolver
Error - Errors specific to the resolver. Every variant is recoverable (the spawn proceeds with whatever env vars resolved successfully) — they exist for tracing visibility, not control flow.
Functions§
- inject_
identity_ env - Inject identity-derived env vars into the spawn map for a block.
- inject_
identity_ env_ with_ broker inject_identity_env+ optional broker handle so the OAuth-class branch can publishidentitybundlebindings:changed:<bundle_id>on a status change discovered by the expiry probe. The broker isOption<Arc<Broker>>—None(the legacy entry point, kept for test ergonomics) skips the publish; in production both call sites (app_api.rsAgentSendCommand +websocket.rsAgentInputCommand) passSome(broker.clone())so the IdentityManager’s bindings table flips its status badge without a reload. Per spec §4.4.- probe_
oauth_ status - Cheap on-disk probe of the per-bundle OAuth token file for a
provider. No network calls — just reads + parses the token JSON,
then compares
expiresAtagainstnow_ms. - provider_
class - Classify a provider id.
Nonefor unknown providers — the resolver logs and skips them. - provider_
env_ vars - Legacy convenience: env vars for an api-key provider. Delegates to
provider_class; returns empty for oauth-class providers (their resolution path doesn’t go through string-secret env-var injection) and for unknown providers. - resolve_
secret - Resolve a
SecretRefto the plaintext credential string. Each backend has a distinct path: