feat(app): M5 step 1, the admin backend under the management app
- datadir: the data folder layout, the location file (JARVIS_DATA_DIR wins), free space for the wizard. - settings_edit: the fields the five settings screens edit; apply writes only non-defaults, keeps unknown keys and writes nothing unless the app's own check passes. A memory section reaches the worker's hello. - secrets: config/secrets.dat, DPAPI for the Windows user; the services take the bot token from it before JARVIS_DISCORD_TOKEN. - logs: the log hub behind the log screen (tabs, daily files kept 14 days, the recent error report, a zip under 10 MB, secrets and token-shaped text masked); the log macros and the worker's output feed it. Spec: app/src/admin.spec.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -81,6 +81,9 @@ pub struct Settings {
|
||||
/// Wake words for chat; `None` uses `voice.wakeWords`.
|
||||
pub chat_wake_words: Option<Vec<String>>,
|
||||
pub response: PolicySettings,
|
||||
/// The voice worker's memory settings (voice_worker.spec.md, "Memory settings"), sent in its
|
||||
/// `hello`; the worker validates them, the settings screens check them first (admin.spec.md).
|
||||
pub memory: Map<String, Value>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
@@ -122,6 +125,7 @@ impl Default for Settings {
|
||||
call: CallSettings::default(),
|
||||
chat_wake_words: None,
|
||||
response: PolicySettings::default(),
|
||||
memory: Map::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -390,6 +394,11 @@ pub fn parse_settings(raw: &Value) -> Result<Settings, SettingsError> {
|
||||
call,
|
||||
chat_wake_words,
|
||||
response,
|
||||
memory: match raw.get("memory") {
|
||||
None => Map::new(),
|
||||
Some(Value::Object(m)) => m.clone(),
|
||||
Some(_) => return err("memory must be an object"),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user