Expand description
Locate the Command Code OAuth credential a local harness already holds.
Command Code is reachable through several agent harnesses, and each files the same OAuth credential under its own key in its own file. This module reads them; it never writes. Refreshing an expired token belongs to the CLI that owns the file, and racing it here would corrupt state shared by every harness on the machine.
Structs§
- Credential
- A credential and where it came from.
Constants§
- AUTH_
FILES - Files searched in order; the first holding a live credential wins.
- EXPIRED
- SIGNED_
OUT
Functions§
- default_
paths - Default search paths, resolved against the OS home convention.
- read_
from - Read whichever credential shape a harness wrote into
path. - resolve
- Production resolver: the env override, then configured paths, then the
platform defaults. Tests use
resolve_from, which takes both as inputs. - resolve_
from - Resolve one credential from the environment, then each path in turn.