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
fix(integrations): correct tool implementations in file storage and tools
Steven Enamakelffb48b0878a3
diff --git a/crates/openhuman-core/src/integrations/file_storage/tools/delete.rs b/crates/openhuman-core/src/integrations/file_storage/tools/delete.rsindex 116b1da956..a9744c4032 100644--- a/crates/openhuman-core/src/integrations/file_storage/tools/delete.rs+++ b/crates/openhuman-core/src/integrations/file_storage/tools/delete.rs@@ -96,7 +96,7 @@ impl StorageDeleteFileTool {tracing::debug!("[file_storage] deleting file_id={file_id}");match self.client- .delete::<DeleteResponse>(&file_path(&file_id, ""))+ .delete::<DeleteResponse>(approval, &file_path(&file_id, "")).await{Ok(resp) if resp.deleted => Ok(ToolResult::success_with_markdown(diff --git a/crates/openhuman-core/src/integrations/file_storage/tools/link.rs b/crates/openhuman-core/src/integrations/file_storage/tools/link.rsindex 2449308fee..e1d312d810 100644--- a/crates/openhuman-core/src/integrations/file_storage/tools/link.rs+++ b/crates/openhuman-core/src/integrations/file_storage/tools/link.rs@@ -103,7 +103,7 @@ impl StorageGetLinkTool {tracing::debug!("[file_storage] generating link for file_id={file_id}");match self.client- .post::<LinkResponse>(&file_path(&file_id, "/link"), &body)+ .post::<LinkResponse>(approval, &file_path(&file_id, "/link"), &body).await{Ok(resp) => Ok(ToolResult::success_with_markdown(diff --git a/crates/openhuman-core/src/integrations/file_storage/tools/list.rs b/crates/openhuman-core/src/integrations/file_storage/tools/list.rsindex ce50462af2..ea731dfe8b 100644--- a/crates/openhuman-core/src/integrations/file_storage/tools/list.rs+++ b/crates/openhuman-core/src/integrations/file_storage/tools/list.rs@@ -63,7 +63,7 @@ impl StorageListFilesTool {approval: &crate::security::approval::ApprovalTurnContext,) -> anyhow::Result<ToolResult> {tracing::debug!("[file_storage] listing files");- match self.client.get::<ListFilesResponse>(FILES_PATH).await {+ match self.client.get::<ListFilesResponse>(approval, FILES_PATH).await {Ok(resp) => {let mut lines = vec![format!("{} file(s), using {} of {} bytes:",diff --git a/crates/openhuman-core/src/integrations/file_storage/tools/visibility.rs b/crates/openhuman-core/src/integrations/file_storage/tools/visibility.rsindex 71fd10542f..49b02a00c6 100644--- a/crates/openhuman-core/src/integrations/file_storage/tools/visibility.rs+++ b/crates/openhuman-core/src/integrations/file_storage/tools/visibility.rs@@ -105,7 +105,7 @@ impl StorageSetVisibilityTool {tracing::debug!("[file_storage] setting visibility={visibility} for file_id={file_id}");match self.client- .patch::<FileMeta>(+ .patch::<FileMeta>(approval,&file_path(&file_id, ""),&json!({ "visibility": visibility }),)diff --git a/crates/openhuman-core/src/integrations/tools/google_places.rs b/crates/openhuman-core/src/integrations/tools/google_places.rsindex 22474d8871..161d70c807 100644--- a/crates/openhuman-core/src/integrations/tools/google_places.rs+++ b/crates/openhuman-core/src/integrations/tools/google_places.rs@@ -174,7 +174,7 @@ impl GooglePlacesSearchTool {match self.client- .post::<SearchResponse>("/agent-integrations/google-places/search", &body)+ .post::<SearchResponse>(approval, "/agent-integrations/google-places/search", &body).await{Ok(resp) => {@@ -289,7 +289,7 @@ impl GooglePlacesDetailsTool {match self.client- .post::<DetailsResponse>("/agent-integrations/google-places/details", &body)+ .post::<DetailsResponse>(approval, "/agent-integrations/google-places/details", &body).await{Ok(resp) => {diff --git a/crates/openhuman-core/src/integrations/tools/stock_prices.rs b/crates/openhuman-core/src/integrations/tools/stock_prices.rsindex f43a284871..220db092d3 100644--- a/crates/openhuman-core/src/integrations/tools/stock_prices.rs+++ b/crates/openhuman-core/src/integrations/tools/stock_prices.rs@@ -209,7 +209,7 @@ impl StockQuoteTool {tracing::info!("[stock_quote] symbol={}", symbol);let body = json!({ "symbol": symbol });- match self.client.post::<QuoteResponse>(PATH_QUOTE, &body).await {+ match self.client.post::<QuoteResponse>(approval, PATH_QUOTE, &body).await {Ok(resp) => {let q = &resp.quote;let mut out = format!(@@ -326,7 +326,7 @@ impl StockExchangeRateTool {let body = json!({ "fromCurrency": from, "toCurrency": to });match self.client- .post::<ExchangeRateResponse>(PATH_EXCHANGE_RATE, &body)+ .post::<ExchangeRateResponse>(approval, PATH_EXCHANGE_RATE, &body).await{Ok(resp) => {@@ -442,7 +442,7 @@ impl StockOptionsTool {let body = json!({ "symbol": symbol, "requireGreeks": require_greeks });match self.client- .post::<OptionsResponse>(PATH_OPTIONS, &body)+ .post::<OptionsResponse>(approval, PATH_OPTIONS, &body).await{Ok(resp) => {@@ -570,7 +570,7 @@ impl StockCryptoSeriesTool {match self.client- .post::<CryptoSeriesResponse>(PATH_CRYPTO_SERIES, &body)+ .post::<CryptoSeriesResponse>(approval, PATH_CRYPTO_SERIES, &body).await{Ok(resp) => {@@ -698,7 +698,7 @@ impl StockCommodityTool {match self.client- .post::<CommodityResponse>(PATH_COMMODITY, &body)+ .post::<CommodityResponse>(approval, PATH_COMMODITY, &body).await{Ok(resp) => {