Expand description
oino-settings: settings for Oino — global/project layering, migrations, typed
getters, locked atomic writes, and the filesystem layout of the agent and project dirs.
Boundary: synchronous std I/O only (no async runtime); oino-core owns one
SettingsManager per cwd and hands Settings snapshots to blocking tasks.
§API map
| Module | Contents |
|---|---|
manager | SettingsManager: create / in-memory, trust gating, reload, scoped writes, typed setters |
view | Settings: typed getters with defaults, layer access, extension settings layering |
types | QueueMode, CacheWarmingMode, ProjectTrustDefault, UiDensity, resolved setting structs, PackageSource, ResourceKind, defaults |
error | SettingsScope, SettingsError, SettingsErrorKind, InvalidSettingError |
json | merge/migrate/path helpers over JsonObject |
tools | tools::resolve_default_tools, tools::apply_tool_modifiers, tools::tool_list_error |
paths | paths::agent_dir, paths::project_dir, file-name constants, paths::env names, tilde/file:// resolution |
storage | storage::FileLock (<file>.lock), storage::write_atomic (shared with other agent-dir files) |
secrets | SecretStore: <agent>/secrets.json (0600, locked), extension secrets and secret settings fields |
§Semantics
- Project settings (
<cwd>/.oino/settings.json) load only when the project is trusted and override global ones (<agent>/settings.json); nested objects deep-merge, arrays replace. - Resource arrays are read per layer with
Settings::resource_entries; resolution (inoino-resources) combines both layers, project entries first. httpProxy,cacheWarming,defaultProjectTrustanddeviceIdread the global layer only.- Unknown keys are preserved on write; legacy keys are migrated on load and on write.
Oino keys: extensionSettings, disabledExtensions, serve.*, ui.density.
Re-exports§
pub use error::InvalidSettingError;pub use error::SettingsError;pub use error::SettingsErrorKind;pub use error::SettingsScope;pub use json::JsonObject;pub use manager::SettingsManager;pub use secrets::SecretStore;pub use types::BranchSummarySettings;pub use types::CacheWarmingMode;pub use types::CompactionSettings;pub use types::FilteredPackageSource;pub use types::ImageSettings;pub use types::PackageSource;pub use types::ProjectTrustDefault;pub use types::ProviderRetrySettings;pub use types::QueueMode;pub use types::ResourceKind;pub use types::RetrySettings;pub use types::ServeSettings;pub use types::UiDensity;pub use types::defaults;pub use view::CompactionTokenField;pub use view::Settings;
Modules§
- error
- Settings scopes and errors.
- json
- JSON-object helpers: deep merge, migrations, path edits and JS-style value coercions used by the typed getters.
- manager
SettingsManager: layered load, trust gating, scoped writes.- paths
- Filesystem layout and path helpers.
- secrets
<agent>/secrets.json(extension-api §5.9): a flat{key: value}string map, mode 0600, guarded by the same<file>.lockadvisory lock as settings files and replaced atomically.- storage
- Settings storage: files (locked, atomic) or memory (
FileSettingsStorage,InMemorySettingsStorage). - tools
defaultToolsselection rules.- types
- Typed setting values and defaults.
- view
Settings: an immutable, typed view over the global, project and merged layers (the settings-manager getters).