The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(config): update workspace state store implementation
Steven Enamakel19817b2643ba
diff --git a/crates/openhuman-core/src/agent/multimodal.rs b/crates/openhuman-core/src/agent/multimodal.rsindex 4e85c3ec23..84adf3e773 100644--- a/crates/openhuman-core/src/agent/multimodal.rs+++ b/crates/openhuman-core/src/agent/multimodal.rs@@ -13,15 +13,15 @@ use std::time::Duration;use async_trait::async_trait;use reqwest::Client;-use crate::config::{build_runtime_proxy_client_with_timeouts, MultimodalConfig};+use crate::config::{MultimodalConfig, build_runtime_proxy_client_with_timeouts};use tinyagents_session::transcript::{TranscriptMessage, TranscriptPart};use tinyagents_harness::multimodal::{+ BlobAttachmentStash,config::ImageLimits,markers,payload::sha256_prefix,- resolve::{resolve_image, TextExtractor},- BlobAttachmentStash,+ resolve::{TextExtractor, resolve_image},};/// Hard upper bound on how long the `tinydocs` module may spend extracting adiff --git a/crates/openhuman-core/src/agent/multimodal_attachment_handling_tests.rs b/crates/openhuman-core/src/agent/multimodal_attachment_handling_tests.rsindex 96487206e0..827d755baf 100644--- a/crates/openhuman-core/src/agent/multimodal_attachment_handling_tests.rs+++ b/crates/openhuman-core/src/agent/multimodal_attachment_handling_tests.rs@@ -56,9 +56,11 @@ async fn rehydrate_missing_stash_id_keeps_placeholder_text() {"see [Image: image #att:deadbeefdeadbeef]".to_string(),)];let out = rehydrate_image_placeholders(&messages).await;- assert!(out[0]- .content- .contains("[Image: image #att:deadbeefdeadbeef]"));+ assert!(+ out[0]+ .content+ .contains("[Image: image #att:deadbeefdeadbeef]")+ );assert!(!out[0].content.contains("[IMAGE:data:"));}diff --git a/crates/openhuman-core/src/config/workspace/README.md b/crates/openhuman-core/src/config/workspace/README.mdindex d9988b2c9a..564d075cf3 100644--- a/crates/openhuman-core/src/config/workspace/README.md+++ b/crates/openhuman-core/src/config/workspace/README.md@@ -20,7 +20,7 @@ Owns workspace layout bootstrap and the editable "Persona Pack" prompt files (`S| [`crates/openhuman-core/src/config/workspace/rpc.rs`](./rpc.rs) | Pure-domain persona file API: `WorkspaceFile` type, `read_workspace_file` / `write_workspace_file` / `reset_workspace_file`, `MAX_WORKSPACE_FILE_BYTES`, allowlist enforcement (`ensure_editable`). Returns `Outcome<WorkspaceFile>`. || [`crates/openhuman-core/src/config/workspace/schemas.rs`](./schemas.rs) | Controller schemas + `handle_*` fns delegating to `rpc.rs`; loads config to resolve `workspace_dir`. || [`crates/openhuman-core/src/config/workspace/tools.rs`](./tools.rs) | LLM-callable wrappers over the persona-file RPCs: `WorkspaceReadPersonaTool` (default-on), `WorkspaceUpdatePersonaTool`, `WorkspaceResetPersonaTool`, and `WorkspaceInitTool` (all three mutators default-off, gated by the `workspace_manage` toggle in [`tools/user_filter.rs`](../../tools/user_filter.rs)). |-| `crates/openhuman-core/src/config/workspace/state.rs` | `WatcherStateStore`, a SQLite-backed `path -> last_mtime_secs` table for a vault file watcher, so it can skip re-ingesting unchanged files after a restart. Not otherwise wired to the persona/bootstrap concerns above; currently has no other caller in the tree. |+| `crates/openhuman-core/src/config/workspace/state.rs` | `WatcherStateStore`, a machine-local TSD KV store for `path -> last_mtime_secs`, so a vault file watcher can skip re-ingesting unchanged files after a restart. It opens its own local backend and does not use a shared remote storage URL. Not otherwise wired to the persona/bootstrap concerns above; currently has no other caller in the tree. |## Public surface@@ -61,7 +61,7 @@ The editable surface is restricted to the `BOOTSTRAP_FILES` allowlist (`SOUL.md`- `crate::core::Outcome`: uniform RPC return type.- Bundled prompt assets via `include_str!("../../agent/prompts/SOUL.md" | "IDENTITY.md")`.- `tinytools` (`PermissionLevel`, `Tool`, `ToolResult`) for the agent tools in `tools.rs`.-- `rusqlite` for `state.rs`'s watcher-state database.+- The watcher state store uses the configured TSD SQLite driver for its dedicated local database; legacy SQLite table import remains part of host migration.## Used bydiff --git a/crates/openhuman-core/src/config/workspace/state.rs b/crates/openhuman-core/src/config/workspace/state.rsindex 88fe0ce40a..362b9f2c50 100644--- a/crates/openhuman-core/src/config/workspace/state.rs+++ b/crates/openhuman-core/src/config/workspace/state.rs@@ -68,10 +68,8 @@ impl WatcherStateStore {deleted: false,})?;let kv = Arc::clone(&self.kv);- crate::storage::block_on(async move {- kv.put(&key, value).await.map(|_| ())- })- .context("write watcher state")?;+ crate::storage::block_on(async move { kv.put(&key, value).await.map(|_| ()) })+ .context("write watcher state")?;Ok(())}diff --git a/crates/openhuman-core/src/config/workspace/state_tests.rs b/crates/openhuman-core/src/config/workspace/state_tests.rsindex 1cbb52b656..940ff2e148 100644--- a/crates/openhuman-core/src/config/workspace/state_tests.rs+++ b/crates/openhuman-core/src/config/workspace/state_tests.rs@@ -19,7 +19,10 @@ fn record_and_retrieve_mtime() {#[test]fn unknown_path_returns_none() {let store = open_store(backend());- assert_eq!(store.last_mtime(Path::new("/vault/missing.md")).unwrap(), None);+ assert_eq!(+ store.last_mtime(Path::new("/vault/missing.md")).unwrap(),+ None+ );}#[test]