Expand description
~/.rpi/agent/settings.json — saved user defaults. Mirrors the slice of
pi’s Settings interface (packages/coding-agent/src/core/settings-manager.ts)
that rpi honors: defaultProvider / defaultModel / defaultThinkingLevel
(consumed by provider::resolve as pi’s findInitialModel step 3 — the
saved default, when authed, wins over the built-in fallback), theme,
packages, and configurable resource directories.
pi’s Settings carries ~40 fields; rpi reads the fields it uses and drops the
rest (serde default ignores unknown fields), so a copied pi settings.json
parses clean.
Structs§
- Package
Filter - Resource filters for Pi’s object-form package setting.
- Settings
- The honored subset of pi’s
Settings. Unknown fields are ignored.
Enums§
- Package
Setting - A package entry from Pi’s
packagessetting.
Functions§
- load_
active_ project_ settings - Load the active project settings while preserving parse/read failures for callers that must fail closed, such as package install/update preflight.
- load_
effective_ model_ settings - Load model-selection settings with native Pi’s global -> trusted-project precedence. Only fields consumed during provider resolution are overlaid; package and resource loading keeps its own scope-aware merge semantics.
- load_
project_ settings - Load the single active project settings document.
.rpi/settings.jsontakes precedence; native Pi’s.pi/settings.jsonis consulted only when the rpi-owned file does not exist. A malformed preferred file masks the fallback and yields no project settings, keeping project configuration fail-closed instead of executing entries from a stale lower-priority file. - load_
project_ settings_ for_ write - Load the project settings document that rpi may safely update. The
preferred
.rpifile wins; when it does not exist, native Pi’s.pifile seeds the first rpi-owned save so package changes do not discard fields rpi does not model. - load_
project_ settings_ with_ paths - Load the active project settings together with its source path.
- load_
settings - Load
~/.rpi/agent/settings.json. Missing file ⇒Settings::default()(not an error). Malformed JSON ⇒ConfigError::Json. Tolerates//line comments (a copied pi settings.json may contain them). - resolve_
configured_ paths - Resolve a configured path relative to its settings owner. Absolute paths are preserved; empty entries are ignored.
- save_
project_ settings - Persist project-scoped settings under
.rpi/settings.json, preserving an existing native.pi/settings.jsonas the raw fallback on the first save. - save_
settings - Persist the honored settings back to
~/.rpi/agent/settings.json. Unknown pi fields (whichSettingsdoesn’t model) are preserved: the current file is read as raw JSON, the known fields are overlaid, and the merged object is written — so a copied pisettings.jsonsurvives edits without losing pi-only keys.//comments are accepted using the same parser asload_settings. Missing file ⇒ a fresh object. Existing files that cannot be parsed safely are left untouched and reported as errors.