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
docs(multimodal): update comments for tinyagents media wrapper
Steven Enamakelf2336e5ee1ae
diff --git a/crates/openhuman-core/src/agent/message_convert.rs b/crates/openhuman-core/src/agent/message_convert.rsindex 95c272da63..95a2b378a2 100644--- a/crates/openhuman-core/src/agent/message_convert.rs+++ b/crates/openhuman-core/src/agent/message_convert.rs@@ -143,10 +143,8 @@ pub(crate) fn user_text_with_markers(msg: &Message) -> String {/// Build the content blocks for a user turn, lifting any `[IMAGE:…]` markers out/// of the text into typed [`ContentBlock::Image`] blocks.///-/// By the time a user message reaches this bridge the multimodal pipeline has-/// already rehydrated and normalized every attachment into an inline-/// `[IMAGE:data:<mime>;base64,…]` marker (see-/// [`crate::agent::multimodal::prepare_messages_for_provider`]).+/// The TinyAgents media request wrapper resolves marker references on a+/// disposable provider request after this bridge turns them into typed blocks./// Leaving those buried in a single [`ContentBlock::Text`] ships the base64 to/// the model as literal text, so vision models never actually see the image —/// PNG screenshots fail outright and JPEGs get guessed at (#5359). Splitting the@@ -157,7 +155,8 @@ pub(crate) fn user_text_with_markers(msg: &Message) -> String {/// Blocks are emitted in **source order** — prose and images interleave as the/// user wrote them, so a caption stays next to its image. A marker whose payload/// is empty or malformed is kept verbatim as text. Local references are-/// resolved by the host model decorator before provider serialization. If no+/// resolved through TinyAgents' owner wrapper and OpenHuman's authorized+/// source resolver before provider serialization. If no/// marker is lifted, the owner helper keeps the original text (including/// whitespace around an empty or malformed marker); this also removes the old/// host helper's incidental trimming of that text.diff --git a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rsindex 2813b4343a..260427a951 100644--- a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs+++ b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs@@ -509,8 +509,8 @@ async fn channel_processed_event_is_found_behind_a_flood_of_unrelated_events() {/// message must NOT result in a file read. `process_channel_message`/// MUST override the operator-supplied `ctx.multimodal_files` with the/// hardened `MultimodalFileConfig::for_untrusted_channel_input()` so-/// `prepare_messages_for_provider` rejects the marker with-/// `TooManyFiles` before any disk access.+/// TinyAgents' media request wrapper rejects the attachment before the host+/// source resolver can access any path.#[tokio::test]async fn process_channel_message_hardens_multimodal_files_against_smuggled_markers() {let captured: Arc<Mutex<Option<crate::config::MultimodalFileConfig>>> =diff --git a/crates/openhuman-core/src/config/schema/tools/multimodal.rs b/crates/openhuman-core/src/config/schema/tools/multimodal.rsindex 710a54f3f8..0f5d65e2ad 100644--- a/crates/openhuman-core/src/config/schema/tools/multimodal.rs+++ b/crates/openhuman-core/src/config/schema/tools/multimodal.rs@@ -113,8 +113,8 @@ impl MultimodalFileConfig {/// message and have the agent exfiltrate the file's contents into/// an LLM call. Also forbids remote fetch.///- /// `max_files: 0` is a sentinel: `prepare_messages_for_provider`- /// short-circuits at the first `[FILE:…]` marker with+ /// `max_files: 0` is a sentinel: TinyAgents' media request wrapper+ /// short-circuits before the host resolver reads any source, with/// `TooManyFiles` before any disk or network read happens. This/// holds regardless of the per-operator/// `[tools.multimodal_files]` block in `config.toml`.diff --git a/crates/openhuman-core/src/triage/evaluator/arm.rs b/crates/openhuman-core/src/triage/evaluator/arm.rsindex 18cb72efa4..b492de51ca 100644--- a/crates/openhuman-core/src/triage/evaluator/arm.rs+++ b/crates/openhuman-core/src/triage/evaluator/arm.rs@@ -118,8 +118,8 @@ pub(super) async fn try_arm(// `[FILE:/etc/passwd]` (or any other local-path marker) into// an inbound message and have triage exfiltrate the contents// into an LLM call. The hardened constructor sets max_files=0,- // which `prepare_messages_for_provider` short-circuits before- // any disk read happens. The same constructor is used at the+ // which TinyAgents' media request wrapper checks before its host+ // resolver can read anything. The same constructor is used at the// main channel-dispatch site in `channels::runtime::dispatch`.multimodal_files: crate::config::MultimodalFileConfig::for_untrusted_channel_input(),max_tool_iterations: 1,diff --git a/vendor/tinyagents b/vendor/tinyagentsindex dca3ba1ff0..bc968749fd 160000--- a/vendor/tinyagents+++ b/vendor/tinyagents@@ -1 +1 @@-Subproject commit dca3ba1ff0f9deb9007bfb56109172485e6ceea3+Subproject commit bc968749fdd63987e4332f9bc53f6ae8ae78ab12