Skip to main content

Module profiles

Module profiles 

Source
Expand description

profiles.json parsing and role resolution.

The pure decision function resolve_profile is the only thing that decides which provider/model an agent runs against. It is deliberately testable with no filesystem, no environment, and no network — feed it inputs, get a typed result.

Structs§

CompatibilityImport
One-time legacy compatibility import. Selected only when OXICODE_FOUNDATION_MIGRATION=1 is set.
CredentialLocator
EnvironmentOverride
Parsed environment override (OXICODE_PROVIDER + OXICODE_MODEL).
Profile
A single profile record. Non-secret.
ProfilesFile
Typed profiles.json.
ResolveInput
Inputs to the pure decision function. Mirrors the spec.
ResolvedProfile
Resolved profile + source class. The caller resolves the credential locator against the OS Keychain.

Functions§

read
Read and validate profiles.json. Returns a typed ProfilesFile.
resolve_profile
Pure decision function. Returns the resolved profile, or a typed reason. See the contract spec for precedence rules.