release(v0.2.0): streaming, MCP protocol, Browser Hand, security enhancements
## Major Features ### Streaming Response System - Implement LlmDriver trait with `stream()` method returning async Stream - Add SSE parsing for Anthropic and OpenAI API streaming - Integrate Tauri event system for frontend streaming (`stream:chunk` events) - Add StreamChunk types: Delta, ToolStart, ToolEnd, Complete, Error ### MCP Protocol Implementation - Add MCP JSON-RPC 2.0 types (mcp_types.rs) - Implement stdio-based MCP transport (mcp_transport.rs) - Support tool discovery, execution, and resource operations ### Browser Hand Implementation - Complete browser automation with Playwright-style actions - Support Navigate, Click, Type, Scrape, Screenshot, Wait actions - Add educational Hands: Whiteboard, Slideshow, Speech, Quiz ### Security Enhancements - Implement command whitelist/blacklist for shell_exec tool - Add SSRF protection with private IP blocking - Create security.toml configuration file ## Test Improvements - Fix test import paths (security-utils, setup) - Fix vi.mock hoisting issues with vi.hoisted() - Update test expectations for validateUrl and sanitizeFilename - Add getUnsupportedLocalGatewayStatus mock ## Documentation Updates - Update architecture documentation - Improve configuration reference - Add quick-start guide updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,7 @@ impl Default for ReflectionConfig {
|
||||
Self {
|
||||
trigger_after_conversations: 5,
|
||||
trigger_after_hours: 24,
|
||||
allow_soul_modification: false,
|
||||
allow_soul_modification: true, // Allow soul modification by default for self-evolution
|
||||
require_approval: true,
|
||||
use_llm: true,
|
||||
llm_fallback_to_rules: true,
|
||||
@@ -468,14 +468,17 @@ use tokio::sync::Mutex;
|
||||
|
||||
pub type ReflectionEngineState = Arc<Mutex<ReflectionEngine>>;
|
||||
|
||||
/// Initialize reflection engine
|
||||
/// Initialize reflection engine with config
|
||||
/// Updates the shared state with new configuration
|
||||
#[tauri::command]
|
||||
pub async fn reflection_init(
|
||||
config: Option<ReflectionConfig>,
|
||||
state: tauri::State<'_, ReflectionEngineState>,
|
||||
) -> Result<bool, String> {
|
||||
// Note: The engine is initialized but we don't return the state
|
||||
// as it cannot be serialized to the frontend
|
||||
let _engine = Arc::new(Mutex::new(ReflectionEngine::new(config)));
|
||||
let mut engine = state.lock().await;
|
||||
if let Some(cfg) = config {
|
||||
engine.update_config(cfg);
|
||||
}
|
||||
Ok(true)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user