Skip to main content

Module settings

Module settings 

Source
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§

BranchSummarySettings
branchSummary — native pi’s BranchSummarySettings.
CompactionSettingsJson
compaction — native pi’s CompactionSettings.
PackageFilter
Resource filters for Pi’s object-form package setting.
RetrySettings
retry — native pi’s RetrySettings. provider is parsed but unused: it configures the provider SDK’s own retry loop, which rpi does not run.
Settings
The honored subset of pi’s Settings. Unknown fields are ignored.
TerminalSettings
Native pi’s terminal settings block (TerminalSettings). Only the fields rpi can honor are modeled; unknown keys are ignored.

Enums§

PackageSetting
A package entry from Pi’s packages setting.
QueueModeSetting
steeringMode / followUpMode — native pi’s queue drain modes.

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.json takes precedence; native Pi’s .pi/settings.json is 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 .rpi file wins; when it does not exist, native Pi’s .pi file 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.json as the raw fallback on the first save.
save_settings
Persist the honored settings back to ~/.rpi/agent/settings.json. Unknown pi fields (which Settings doesn’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 pi settings.json survives edits without losing pi-only keys. // comments are accepted using the same parser as load_settings. Missing file ⇒ a fresh object. Existing files that cannot be parsed safely are left untouched and reported as errors.