Expand description
Layered configuration.
Precedence (highest wins): CLI flags → env (OSDK_*) → project config
(osdk.toml, discovered by walking up) → user global config
($OSDK_CONFIG_DIR/config.toml) → built-in defaults.
This module owns the persisted settings shape. CLI-flag overlay is applied
by the caller (osdk-cli) on top of Config::load.
Structs§
- Config
- Fully-resolved settings after merging all layers.
- Container
Registry Config - Mirror policy for one upstream OCI registry namespace.
- Containers
Config - Native-only container integration settings. Higher-precedence configuration files replace this section as a unit instead of merging registry policies.
- Java
Settings - Node
Settings - NpmRegistry
Config - Candidate registries for npm-compatible package managers. An empty list means to use osdk’s built-in public candidates.
- Python
Settings - Registries
Config - Registry preflight settings. Package registry URLs are deliberately kept separate from SDK download sources because they affect delegated package manager commands rather than osdk’s own downloads.
- Settings
- Sources
Config - Structured
Tool Config - Structured
[tools.<tool>]object with a required version plus arbitrary backend-specific options. - Tool
Sources - Per-tool source config: an optional pin and any user-added custom sources.
Enums§
- Attestation
Policy - Container
Platform - Target platform chosen from the native runtime or an explicit OCI tuple.
- Container
Resolve - Whether tags are resolved by the origin registry or by a configured mirror.
- Container
Runtime - Native runtime selected for container inspection and operations.
- Prerelease
Policy - Tool
Config Entry - Persisted
[tools]entry. Legacy strings remain supported, while structured objects can carry extra backend-specific options. - Tool
Config Origin - Source layer that contributed an effective tool entry.
- Tool
Config Value - Arbitrary structured tool option value.
Constants§
Functions§
- expand_
alias - normalize_
container_ mirror_ url - Validate and canonicalize a persisted OCI mirror URL. Persisted mirror policy is HTTPS-only and never carries credentials, query, or fragment.
- normalize_
registry_ url - Validate and canonicalize an npm-compatible registry base URL. Credentials, query strings, and fragments are rejected.
- parse_
duration_ secs - Parse a duration like “6h”, “30m”, “90s”, “1d” into seconds.
- parse_
tool_ versions - validate_
alias_ name