1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! `oino-settings`: pi 1.4.0 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 | pi equivalent | Contents |
//! |---|---|---|
//! | [`manager`] | `SettingsManager`, `FileSettingsStorage` | [`SettingsManager`]: create / in-memory, trust gating, reload, scoped writes, typed setters |
//! | [`view`] | `SettingsManager` getters | [`Settings`]: typed getters with pi defaults, layer access, extension settings layering |
//! | [`types`] | `settings-schema.ts`, `SETTINGS_DEFAULTS` | [`QueueMode`], [`CacheWarmingMode`], [`ProjectTrustDefault`], [`UiDensity`], resolved setting structs, [`PackageSource`], [`ResourceKind`], [`defaults`] |
//! | [`error`] | `SettingsError`, `collectSettingsDiagnostics` | [`SettingsScope`], [`SettingsError`], [`SettingsErrorKind`], [`InvalidSettingError`] |
//! | [`json`] | `deepMergeSettings`, `migrateSettings` | merge/migrate/path helpers over [`JsonObject`] |
//! | [`tools`] | `DEFAULT_TOOL_NAMES`, tool modifiers | [`tools::resolve_default_tools`], [`tools::apply_tool_modifiers`], [`tools::tool_list_error`] |
//! | [`paths`] | `config.ts`, `utils/paths.ts` | [`paths::agent_dir`], [`paths::project_dir`], file-name constants, [`paths::env`] names, tilde/`file://` resolution |
//! | [`storage`] | `proper-lockfile` use | [`storage::FileLock`] (`<file>.lock`), [`storage::write_atomic`] (shared with other agent-dir files) |
//! | [`secrets`] | — (Oino) | [`SecretStore`]: `<agent>/secrets.json` (0600, locked), extension secrets and secret settings fields |
//!
//! # Semantics (pi parity)
//!
//! - 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
//! (in `oino-resources`) combines both layers, project entries first.
//! - `httpProxy`, `cacheWarming`, `defaultProjectTrust` and `deviceId` read 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`.
pub use ;
pub use JsonObject;
pub use SettingsManager;
pub use SecretStore;
pub use ;
pub use ;