feat: personal notes, each person's standing instructions for how Jarvis answers them
A personalNotes tool (add, list, delete the asker's own notes) offered only with a notes backend. The app keeps the notes in config/notes.json and sends the asker's with every voice, chat and task reply; the reply engine puts them in a <person_notes> fence as that person's preferences, which never permit an action or a tool. The worker's schedule bridge becomes a shared app bridge for schedule_action and note_action. A 사람별 지침 screen edits and deletes any note; features.notes turns the tool and the notes off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -100,6 +100,8 @@ pub struct FeatureSettings {
|
||||
pub browser_share: bool,
|
||||
/// Reminders and scheduled tasks (admin.spec.md, "Schedules").
|
||||
pub schedule: bool,
|
||||
/// Each person's standing instructions (admin.spec.md, "Personal notes").
|
||||
pub notes: bool,
|
||||
}
|
||||
|
||||
/// Game detection (admin.spec.md, "Game detection"): on by default; the person's own games and
|
||||
@@ -251,7 +253,7 @@ impl Default for Settings {
|
||||
response: PolicySettings::default(),
|
||||
memory: Map::new(),
|
||||
llm: LlmSettings { url: None, port: 8080, context: 32768 },
|
||||
features: FeatureSettings { weather: true, web_search: true, meals: true, collect: true, browser: true, browser_share: false, schedule: true },
|
||||
features: FeatureSettings { weather: true, web_search: true, meals: true, collect: true, browser: true, browser_share: false, schedule: true, notes: true },
|
||||
mcp_servers: vec![],
|
||||
collect: CollectSettings { keep_days: 30, targets: vec![] },
|
||||
game: GameSettings { detect: true, games: vec![], not_games: vec![], other_room_gb: 1.0, reserve_gb: 8.0, revert_seconds: 30, pause_in_game: false },
|
||||
@@ -583,6 +585,7 @@ pub fn parse_settings(raw: &Value) -> Result<Settings, SettingsError> {
|
||||
browser: get_bool(f, "browser", "features", d.features.browser)?,
|
||||
browser_share: get_bool(f, "browserShare", "features", d.features.browser_share)?,
|
||||
schedule: get_bool(f, "schedule", "features", d.features.schedule)?,
|
||||
notes: get_bool(f, "notes", "features", d.features.notes)?,
|
||||
}
|
||||
},
|
||||
mcp_servers: parse_mcp_servers(raw)?,
|
||||
@@ -945,13 +948,13 @@ mod tests {
|
||||
#[test]
|
||||
fn features_and_mcp_servers_are_read_and_checked() {
|
||||
let s = parse_settings(&json!({}));
|
||||
assert_eq!(s.unwrap().features, FeatureSettings { weather: true, web_search: true, meals: true, collect: true, browser: true, browser_share: false, schedule: true });
|
||||
assert_eq!(s.unwrap().features, FeatureSettings { weather: true, web_search: true, meals: true, collect: true, browser: true, browser_share: false, schedule: true, notes: true });
|
||||
let s = parse_settings(&json!({
|
||||
"features": {"weather": false, "meals": false, "browserShare": true, "schedule": false},
|
||||
"features": {"weather": false, "meals": false, "browserShare": true, "schedule": false, "notes": false},
|
||||
"mcpServers": [{"name": "brave", "command": "npx", "args": ["-y", "brave"], "env": ["BRAVE_API_KEY", " "]},
|
||||
{"name": "time-2", "command": "uvx", "enabled": false}]
|
||||
})).unwrap();
|
||||
assert_eq!(s.features, FeatureSettings { weather: false, web_search: true, meals: false, collect: true, browser: true, browser_share: true, schedule: false });
|
||||
assert_eq!(s.features, FeatureSettings { weather: false, web_search: true, meals: false, collect: true, browser: true, browser_share: true, schedule: false, notes: false });
|
||||
assert_eq!(s.mcp_servers, vec![
|
||||
McpServerSettings { name: "brave".into(), command: "npx".into(), args: vec!["-y".into(), "brave".into()],
|
||||
env: vec!["BRAVE_API_KEY".into()], enabled: true },
|
||||
|
||||
Reference in New Issue
Block a user