From 355f10964c4dbec24a244a00caba5c17ed23fc65 Mon Sep 17 00:00:00 2001 From: soryu Date: Thu, 12 Feb 2026 02:29:45 +0000 Subject: makima: Add an optional memory system for directives (#59) * feat: makima: Add an optional memory system for directives: Add directive_memories database table and migration * feat: makima: Add an optional memory system for directives: Update directive skill documentation with memory commands * feat: makima: Add an optional memory system for directives: Add repository functions for directive memory CRUD * feat: makima: Add an optional memory system for directives: Add frontend API functions and types for directive memory * feat: makima: Add an optional memory system for directives: Add Rust models for directive memory * WIP: heartbeat checkpoint * WIP: heartbeat checkpoint * WIP: heartbeat checkpoint * WIP: heartbeat checkpoint * feat: makima: Add an optional memory system for directives: Add memory panel to frontend DirectiveDetail component * Merge remote-tracking branch 'origin/makima/makima--add-an-optional-memory-system-for-directiv-5de1e06d' into combined branch * Merge remote-tracking branch 'origin/makima/makima--add-an-optional-memory-system-for-directiv-c8298c6c' into combined branch * feat: makima: Add an optional memory system for directives: Create useMultiTaskSubscription hook for multi-output WebSocket streaming * feat: makima: Add an optional memory system for directives: Create DirectiveLogStream component for stern-like multi-task output viewing * feat: makima: Add an optional memory system for directives: Integrate log stream panel into directive detail page --- makima/src/bin/makima.rs | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'makima/src/bin') diff --git a/makima/src/bin/makima.rs b/makima/src/bin/makima.rs index c2c9beb..d4af878 100644 --- a/makima/src/bin/makima.rs +++ b/makima/src/bin/makima.rs @@ -825,6 +825,50 @@ async fn run_directive( .await?; println!("{}", serde_json::to_string(&result.0)?); } + DirectiveCommand::MemorySet(args) => { + let client = ApiClient::new(args.common.api_url, args.common.api_key)?; + let result = client + .directive_memory_set(args.common.directive_id, &args.key, &args.value) + .await?; + println!("{}", serde_json::to_string(&result.0)?); + } + DirectiveCommand::MemoryGet(args) => { + let client = ApiClient::new(args.common.api_url, args.common.api_key)?; + let result = client + .directive_memory_get(args.common.directive_id, &args.key) + .await?; + println!("{}", serde_json::to_string(&result.0)?); + } + DirectiveCommand::MemoryList(args) => { + let client = ApiClient::new(args.api_url, args.api_key)?; + let result = client + .directive_memory_list(args.directive_id) + .await?; + println!("{}", serde_json::to_string(&result.0)?); + } + DirectiveCommand::MemoryDelete(args) => { + let client = ApiClient::new(args.common.api_url, args.common.api_key)?; + client + .directive_memory_delete(args.common.directive_id, &args.key) + .await?; + println!(r#"{{"success": true}}"#); + } + DirectiveCommand::MemoryClear(args) => { + let client = ApiClient::new(args.api_url, args.api_key)?; + client + .directive_memory_clear(args.directive_id) + .await?; + println!(r#"{{"success": true}}"#); + } + DirectiveCommand::MemoryBatchSet(args) => { + let client = ApiClient::new(args.common.api_url, args.common.api_key)?; + let entries: serde_json::Value = serde_json::from_str(&args.json) + .map_err(|e| format!("Invalid JSON: {}", e))?; + let result = client + .directive_memory_batch_set(args.common.directive_id, entries) + .await?; + println!("{}", serde_json::to_string(&result.0)?); + } } Ok(()) -- cgit v1.2.3