diff --git a/Cargo.lock b/Cargo.lock index a96ad805..7e4dd2e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -475,16 +475,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16f5094c54661b38d03bd7e50df373292118db60b585c08a411c6d840017fe7d" dependencies = [ - "dirs-sys 0.5.0", -] - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys 0.4.1", + "dirs-sys", ] [[package]] @@ -493,19 +484,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ - "dirs-sys 0.5.0", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users 0.4.6", - "windows-sys 0.48.0", + "dirs-sys", ] [[package]] @@ -516,7 +495,7 @@ checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", - "redox_users 0.5.3", + "redox_users", "windows-sys 0.61.2", ] @@ -1417,6 +1396,25 @@ dependencies = [ "autocfg", ] +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags", +] + +[[package]] +name = "objc2-io-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" +dependencies = [ + "libc", + "objc2-core-foundation", +] + [[package]] name = "once_cell" version = "1.21.4" @@ -1446,7 +1444,7 @@ dependencies = [ "chrono-tz", "cron", "directories", - "dirs 6.0.0", + "dirs", "dotenvy", "ed25519-dalek", "flate2", @@ -1476,15 +1474,16 @@ dependencies = [ "serde_repr", "serde_yaml", "sha2 0.10.9", - "sysinfo", + "sysinfo 0.33.1", "tar", "tempfile", - "thiserror 2.0.20", + "thiserror", "tinyagents-definition", "tinyagents-graph", "tinyagents-harness", "tinyagents-orchestration", "tinyagents-registry", + "tinyagents-runtime", "tinyagents-session", "tinybus", "tinychannels-bus", @@ -1503,8 +1502,8 @@ dependencies = [ "tinymemory-sources", "tinyruntime-bus", "tinyskills", - "tinytools", - "tinytools-agent", + "tinytools 0.3.0", + "tinytools-agent 0.3.0", "tokio", "tokio-stream", "tokio-tungstenite", @@ -1519,7 +1518,7 @@ dependencies = [ "windows-sys 0.61.2", "x25519-dalek", "zeroize", - "zip", + "zip 2.4.2", ] [[package]] @@ -1532,7 +1531,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror 2.0.20", + "thiserror", "tokio", "url", "uuid", @@ -1739,7 +1738,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror 2.0.20", + "thiserror", "tokio", "tracing", "web-time", @@ -1761,7 +1760,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.20", + "thiserror", "tinyvec", "tracing", "web-time", @@ -1875,17 +1874,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_users" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" -dependencies = [ - "getrandom 0.2.17", - "libredox", - "thiserror 1.0.69", -] - [[package]] name = "redox_users" version = "0.5.3" @@ -1893,7 +1881,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" dependencies = [ "libredox", - "thiserror 2.0.20", + "thiserror", ] [[package]] @@ -2013,7 +2001,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c51c9ae4df8a7fba42103df5c621fa3c37eccf3a3c650879e90fc48b11cc192c" dependencies = [ "hashbrown 0.16.1", - "thiserror 2.0.20", + "thiserror", ] [[package]] @@ -2483,7 +2471,21 @@ dependencies = [ "libc", "memchr", "ntapi", - "windows", + "windows 0.57.0", +] + +[[package]] +name = "sysinfo" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ab6a2f8bfe508deb3c6406578252e491d299cbbf3bc0529ecc3313aee4a52f" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows 0.62.2", ] [[package]] @@ -2510,33 +2512,13 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - [[package]] name = "thiserror" version = "2.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" dependencies = [ - "thiserror-impl 2.0.20", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", + "thiserror-impl", ] [[package]] @@ -2573,19 +2555,15 @@ version = "2.1.2" dependencies = [ "anyhow", "async-trait", - "chrono", "futures", - "reqwest", "rusqlite", "serde", "serde_json", - "sha2 0.11.0", "tinyagents-harness", - "tinyagents-language", - "tinyagents-tracing", "tinyinference-llm", - "tinytools", + "tinytools 0.3.0", "tokio", + "tracing", ] [[package]] @@ -2595,12 +2573,10 @@ dependencies = [ "anyhow", "async-trait", "base64 0.22.1", - "bytes", "chrono", - "dirs 5.0.1", + "dirs", "flate2", "futures", - "log", "regex", "reqwest", "rusqlite", @@ -2608,27 +2584,18 @@ dependencies = [ "serde_json", "sha2 0.11.0", "tempfile", - "thiserror 2.0.20", + "thiserror", "tinyagents-definition", - "tinyagents-tracing", "tinyinference-embeddings", "tinyinference-llm", - "tinytools", - "tinytools-agent", + "tinytools 0.3.0", + "tinytools-agent 0.3.0", "tokio", + "tracing", "uuid", "wait-timeout", ] -[[package]] -name = "tinyagents-language" -version = "2.1.2" -dependencies = [ - "serde", - "serde_json", - "tinyagents-harness", -] - [[package]] name = "tinyagents-orchestration" version = "2.1.2" @@ -2639,9 +2606,13 @@ dependencies = [ "parking_lot", "serde", "serde_json", + "thiserror", "tinyagents-graph", "tinyagents-harness", + "tinyagents-runtime", "tinyagents-session", + "tinyinference-llm", + "tinytools 0.3.0", "tokio", "uuid", ] @@ -2651,14 +2622,27 @@ name = "tinyagents-registry" version = "2.1.2" dependencies = [ "anyhow", + "chrono", "serde", "serde_json", "tinyagents-definition", - "tinyagents-graph", "tinyagents-harness", - "tinyagents-language", "tinyinference-llm", - "tinytools", + "tinytools 0.3.0", +] + +[[package]] +name = "tinyagents-runtime" +version = "2.1.2" +dependencies = [ + "async-trait", + "chrono", + "thiserror", + "tinyagents-harness", + "tinyagents-session", + "tinyinference-llm", + "tinytools 0.3.0", + "tokio", ] [[package]] @@ -2666,19 +2650,15 @@ name = "tinyagents-session" version = "2.1.2" dependencies = [ "anyhow", + "async-trait", "chrono", - "log", "rusqlite", "serde", "serde_json", "tinyagents-harness", - "tinyagents-tracing", + "tracing", ] -[[package]] -name = "tinyagents-tracing" -version = "2.1.2" - [[package]] name = "tinybus" version = "0.1.1" @@ -2686,7 +2666,7 @@ dependencies = [ "async-trait", "serde", "serde_json", - "thiserror 2.0.20", + "thiserror", "tinybus-macros", "tokio", "tracing", @@ -2717,7 +2697,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", - "thiserror 2.0.20", + "thiserror", "tokio", "tracing", "uuid", @@ -2740,10 +2720,10 @@ dependencies = [ "regex", "serde", "serde_json", - "thiserror 2.0.20", + "thiserror", "tinyhivemind-core", "tinyinference-llm", - "tinytools", + "tinytools 0.3.0", "tokio", ] @@ -2754,7 +2734,7 @@ dependencies = [ "regex", "serde", "serde_json", - "thiserror 2.0.20", + "thiserror", ] [[package]] @@ -2763,7 +2743,7 @@ version = "0.2.1" dependencies = [ "serde", "serde_json", - "thiserror 2.0.20", + "thiserror", "tinyhivemind", "tokio", ] @@ -2774,7 +2754,7 @@ version = "0.2.1" dependencies = [ "serde", "serde_json", - "thiserror 2.0.20", + "thiserror", "tinyhivemind", "tinyhivemind-core", "tinyjevclient", @@ -2788,7 +2768,7 @@ dependencies = [ "openhuman-embed", "serde", "serde_json", - "thiserror 2.0.20", + "thiserror", "tinyhivemind", "tinyhivemind-core", "tinyhivemind-embed", @@ -2802,7 +2782,7 @@ version = "0.2.1" dependencies = [ "serde", "serde_json", - "thiserror 2.0.20", + "thiserror", "tinyhivemind", "tinyhivemind-embed", "tokio", @@ -2827,7 +2807,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "thiserror 2.0.20", + "thiserror", "tinyinference-core", "tokio", "tracing", @@ -2845,18 +2825,18 @@ dependencies = [ "serde", "serde_json", "sha2 0.11.0", - "thiserror 2.0.20", + "thiserror", "tinyinference-core", + "tinytools-agent 0.3.0 (git+https://github.com/tinyhumansai/tinytools?rev=a5d04a7f3af0abc1dd748f87f94871b36ae9fe71)", "tokio", "tracing", - "url", ] [[package]] name = "tinyinference-local" version = "0.3.0" dependencies = [ - "base64 0.22.1", + "base64 0.23.1", "bytes", "flate2", "futures", @@ -2869,9 +2849,9 @@ dependencies = [ "serde", "serde_json", "sha2 0.11.0", - "sysinfo", + "sysinfo 0.38.4", "tar", - "thiserror 2.0.20", + "thiserror", "tinyinference-core", "tinyinference-embeddings", "tinyinference-llm", @@ -2879,25 +2859,19 @@ dependencies = [ "tracing", "url", "uuid", - "zip", + "zip 8.6.0", ] [[package]] name = "tinyinference-providers" version = "0.3.0" dependencies = [ - "async-trait", - "base64 0.22.1", - "rand 0.9.5", + "base64 0.23.1", + "rand 0.10.2", "reqwest", "serde", "serde_json", "sha2 0.11.0", - "thiserror 2.0.20", - "tinyinference-core", - "tinyinference-llm", - "tokio", - "tracing", "url", ] @@ -2905,8 +2879,7 @@ dependencies = [ name = "tinyinference-voice" version = "0.3.0" dependencies = [ - "base64 0.22.1", - "log", + "base64 0.23.1", "reqwest", "serde", "serde_json", @@ -2924,7 +2897,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "thiserror 2.0.20", + "thiserror", "tokio", ] @@ -2941,7 +2914,7 @@ version = "0.3.2" dependencies = [ "anyhow", "base64 0.23.1", - "dirs 6.0.0", + "dirs", "futures-util", "parking_lot", "reqwest", @@ -2949,7 +2922,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.11.0", - "thiserror 2.0.20", + "thiserror", "tinymcp-bus", "tokio", "tracing", @@ -2987,7 +2960,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.11.0", - "thiserror 2.0.20", + "thiserror", "uuid", ] @@ -3028,7 +3001,7 @@ dependencies = [ "serde_json", "serde_yaml", "sha2 0.10.9", - "thiserror 2.0.20", + "thiserror", "tokio", "tracing", "url", @@ -3046,7 +3019,18 @@ dependencies = [ [[package]] name = "tinytools" -version = "0.2.0" +version = "0.3.0" +dependencies = [ + "anyhow", + "async-trait", + "serde", + "serde_json", +] + +[[package]] +name = "tinytools" +version = "0.3.0" +source = "git+https://github.com/tinyhumansai/tinytools?rev=a5d04a7f3af0abc1dd748f87f94871b36ae9fe71#a5d04a7f3af0abc1dd748f87f94871b36ae9fe71" dependencies = [ "anyhow", "async-trait", @@ -3056,12 +3040,23 @@ dependencies = [ [[package]] name = "tinytools-agent" -version = "0.2.0" +version = "0.3.0" +dependencies = [ + "regex", + "serde", + "serde_json", + "tinytools 0.3.0", +] + +[[package]] +name = "tinytools-agent" +version = "0.3.0" +source = "git+https://github.com/tinyhumansai/tinytools?rev=a5d04a7f3af0abc1dd748f87f94871b36ae9fe71#a5d04a7f3af0abc1dd748f87f94871b36ae9fe71" dependencies = [ "regex", "serde", "serde_json", - "tinytools", + "tinytools 0.3.0 (git+https://github.com/tinyhumansai/tinytools?rev=a5d04a7f3af0abc1dd748f87f94871b36ae9fe71)", ] [[package]] @@ -3316,9 +3311,15 @@ dependencies = [ "rustls", "rustls-pki-types", "sha1", - "thiserror 2.0.20", + "thiserror", ] +[[package]] +name = "typed-path" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e" + [[package]] name = "typenum" version = "1.20.1" @@ -3596,6 +3597,27 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections", + "windows-core 0.62.2", + "windows-future", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core 0.62.2", +] + [[package]] name = "windows-core" version = "0.57.0" @@ -3621,6 +3643,17 @@ dependencies = [ "windows-strings", ] +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core 0.62.2", + "windows-link", + "windows-threading", +] + [[package]] name = "windows-implement" version = "0.57.0" @@ -3671,6 +3704,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core 0.62.2", + "windows-link", +] + [[package]] name = "windows-result" version = "0.1.2" @@ -3698,15 +3741,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -3734,21 +3768,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -3783,10 +3802,13 @@ dependencies = [ ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" +name = "windows-threading" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] [[package]] name = "windows_aarch64_gnullvm" @@ -3800,12 +3822,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -3818,12 +3834,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -3848,12 +3858,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -3866,12 +3870,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -3884,12 +3882,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -3902,12 +3894,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -4090,7 +4076,21 @@ dependencies = [ "flate2", "indexmap", "memchr", - "thiserror 2.0.20", + "thiserror", + "zopfli", +] + +[[package]] +name = "zip" +version = "8.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b" +dependencies = [ + "crc32fast", + "flate2", + "indexmap", + "memchr", + "typed-path", "zopfli", ] diff --git a/examples/openhuman/Cargo.lock b/examples/openhuman/Cargo.lock index 767d1f79..4496141c 100644 --- a/examples/openhuman/Cargo.lock +++ b/examples/openhuman/Cargo.lock @@ -503,16 +503,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16f5094c54661b38d03bd7e50df373292118db60b585c08a411c6d840017fe7d" dependencies = [ - "dirs-sys 0.5.0", -] - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys 0.4.1", + "dirs-sys", ] [[package]] @@ -521,19 +512,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ - "dirs-sys 0.5.0", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users 0.4.6", - "windows-sys 0.48.0", + "dirs-sys", ] [[package]] @@ -544,7 +523,7 @@ checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", - "redox_users 0.5.3", + "redox_users", "windows-sys 0.61.2", ] @@ -1462,6 +1441,25 @@ dependencies = [ "libc", ] +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags", +] + +[[package]] +name = "objc2-io-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" +dependencies = [ + "libc", + "objc2-core-foundation", +] + [[package]] name = "once_cell" version = "1.21.4" @@ -1491,7 +1489,7 @@ dependencies = [ "chrono-tz", "cron", "directories", - "dirs 6.0.0", + "dirs", "dotenvy", "ed25519-dalek", "flate2", @@ -1521,15 +1519,16 @@ dependencies = [ "serde_repr", "serde_yaml", "sha2 0.10.9", - "sysinfo", + "sysinfo 0.33.1", "tar", "tempfile", - "thiserror 2.0.20", + "thiserror", "tinyagents-definition", "tinyagents-graph", "tinyagents-harness", "tinyagents-orchestration", "tinyagents-registry", + "tinyagents-runtime", "tinyagents-session", "tinybus", "tinychannels-bus", @@ -1548,8 +1547,8 @@ dependencies = [ "tinymemory-sources", "tinyruntime-bus", "tinyskills", - "tinytools", - "tinytools-agent", + "tinytools 0.3.0", + "tinytools-agent 0.3.0", "tokio", "tokio-stream", "tokio-tungstenite", @@ -1564,7 +1563,7 @@ dependencies = [ "windows-sys 0.61.2", "x25519-dalek", "zeroize", - "zip", + "zip 2.4.2", ] [[package]] @@ -1577,7 +1576,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror 2.0.20", + "thiserror", "tokio", "url", "uuid", @@ -1784,7 +1783,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror 2.0.20", + "thiserror", "tokio", "tracing", "web-time", @@ -1806,7 +1805,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.20", + "thiserror", "tinyvec", "tracing", "web-time", @@ -1920,17 +1919,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_users" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" -dependencies = [ - "getrandom 0.2.17", - "libredox", - "thiserror 1.0.69", -] - [[package]] name = "redox_users" version = "0.5.3" @@ -1938,7 +1926,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" dependencies = [ "libredox", - "thiserror 2.0.20", + "thiserror", ] [[package]] @@ -2058,7 +2046,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c51c9ae4df8a7fba42103df5c621fa3c37eccf3a3c650879e90fc48b11cc192c" dependencies = [ "hashbrown 0.16.1", - "thiserror 2.0.20", + "thiserror", ] [[package]] @@ -2538,7 +2526,21 @@ dependencies = [ "libc", "memchr", "ntapi", - "windows", + "windows 0.57.0", +] + +[[package]] +name = "sysinfo" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ab6a2f8bfe508deb3c6406578252e491d299cbbf3bc0529ecc3313aee4a52f" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows 0.62.2", ] [[package]] @@ -2565,33 +2567,13 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - [[package]] name = "thiserror" version = "2.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" dependencies = [ - "thiserror-impl 2.0.20", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", + "thiserror-impl", ] [[package]] @@ -2628,19 +2610,15 @@ version = "2.1.2" dependencies = [ "anyhow", "async-trait", - "chrono", "futures", - "reqwest", "rusqlite", "serde", "serde_json", - "sha2 0.11.0", "tinyagents-harness", - "tinyagents-language", - "tinyagents-tracing", "tinyinference-llm", - "tinytools", + "tinytools 0.3.0", "tokio", + "tracing", ] [[package]] @@ -2650,12 +2628,10 @@ dependencies = [ "anyhow", "async-trait", "base64 0.22.1", - "bytes", "chrono", - "dirs 5.0.1", + "dirs", "flate2", "futures", - "log", "regex", "reqwest", "rusqlite", @@ -2663,27 +2639,18 @@ dependencies = [ "serde_json", "sha2 0.11.0", "tempfile", - "thiserror 2.0.20", + "thiserror", "tinyagents-definition", - "tinyagents-tracing", "tinyinference-embeddings", "tinyinference-llm", - "tinytools", - "tinytools-agent", + "tinytools 0.3.0", + "tinytools-agent 0.3.0", "tokio", + "tracing", "uuid", "wait-timeout", ] -[[package]] -name = "tinyagents-language" -version = "2.1.2" -dependencies = [ - "serde", - "serde_json", - "tinyagents-harness", -] - [[package]] name = "tinyagents-orchestration" version = "2.1.2" @@ -2694,9 +2661,13 @@ dependencies = [ "parking_lot", "serde", "serde_json", + "thiserror", "tinyagents-graph", "tinyagents-harness", + "tinyagents-runtime", "tinyagents-session", + "tinyinference-llm", + "tinytools 0.3.0", "tokio", "uuid", ] @@ -2706,14 +2677,27 @@ name = "tinyagents-registry" version = "2.1.2" dependencies = [ "anyhow", + "chrono", "serde", "serde_json", "tinyagents-definition", - "tinyagents-graph", "tinyagents-harness", - "tinyagents-language", "tinyinference-llm", - "tinytools", + "tinytools 0.3.0", +] + +[[package]] +name = "tinyagents-runtime" +version = "2.1.2" +dependencies = [ + "async-trait", + "chrono", + "thiserror", + "tinyagents-harness", + "tinyagents-session", + "tinyinference-llm", + "tinytools 0.3.0", + "tokio", ] [[package]] @@ -2721,19 +2705,15 @@ name = "tinyagents-session" version = "2.1.2" dependencies = [ "anyhow", + "async-trait", "chrono", - "log", "rusqlite", "serde", "serde_json", "tinyagents-harness", - "tinyagents-tracing", + "tracing", ] -[[package]] -name = "tinyagents-tracing" -version = "2.1.2" - [[package]] name = "tinybus" version = "0.1.1" @@ -2744,13 +2724,13 @@ dependencies = [ "serde_json", "tar", "tempfile", - "thiserror 2.0.20", + "thiserror", "tinybus-macros", "tokio", "toml 0.8.23", "tracing", "ureq", - "zip", + "zip 2.4.2", ] [[package]] @@ -2778,7 +2758,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", - "thiserror 2.0.20", + "thiserror", "tokio", "tracing", "uuid", @@ -2797,7 +2777,7 @@ name = "tinyhivemind" version = "0.2.1" dependencies = [ "serde", - "thiserror 2.0.20", + "thiserror", "tinyhivemind-core", ] @@ -2806,7 +2786,7 @@ name = "tinyhivemind-core" version = "0.2.1" dependencies = [ "serde", - "thiserror 2.0.20", + "thiserror", ] [[package]] @@ -2814,7 +2794,7 @@ name = "tinyhivemind-embed" version = "0.2.1" dependencies = [ "serde", - "thiserror 2.0.20", + "thiserror", "tinyhivemind", ] @@ -2823,7 +2803,7 @@ name = "tinyhivemind-hive" version = "0.2.1" dependencies = [ "serde", - "thiserror 2.0.20", + "thiserror", "tinyhivemind", "tinyhivemind-core", ] @@ -2834,7 +2814,7 @@ version = "0.2.1" dependencies = [ "openhuman-embed", "serde", - "thiserror 2.0.20", + "thiserror", "tinyhivemind", "tinyhivemind-core", "tinyhivemind-embed", @@ -2869,7 +2849,7 @@ version = "0.2.1" dependencies = [ "serde", "serde_json", - "thiserror 2.0.20", + "thiserror", "tinyhivemind", "tinyhivemind-embed", ] @@ -2893,7 +2873,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "thiserror 2.0.20", + "thiserror", "tinyinference-core", "tokio", "tracing", @@ -2911,18 +2891,18 @@ dependencies = [ "serde", "serde_json", "sha2 0.11.0", - "thiserror 2.0.20", + "thiserror", "tinyinference-core", + "tinytools-agent 0.3.0 (git+https://github.com/tinyhumansai/tinytools?rev=a5d04a7f3af0abc1dd748f87f94871b36ae9fe71)", "tokio", "tracing", - "url", ] [[package]] name = "tinyinference-local" version = "0.3.0" dependencies = [ - "base64 0.22.1", + "base64 0.23.1", "bytes", "flate2", "futures", @@ -2935,9 +2915,9 @@ dependencies = [ "serde", "serde_json", "sha2 0.11.0", - "sysinfo", + "sysinfo 0.38.4", "tar", - "thiserror 2.0.20", + "thiserror", "tinyinference-core", "tinyinference-embeddings", "tinyinference-llm", @@ -2945,25 +2925,19 @@ dependencies = [ "tracing", "url", "uuid", - "zip", + "zip 8.6.0", ] [[package]] name = "tinyinference-providers" version = "0.3.0" dependencies = [ - "async-trait", - "base64 0.22.1", - "rand 0.9.5", + "base64 0.23.1", + "rand 0.10.2", "reqwest", "serde", "serde_json", "sha2 0.11.0", - "thiserror 2.0.20", - "tinyinference-core", - "tinyinference-llm", - "tokio", - "tracing", "url", ] @@ -2971,8 +2945,7 @@ dependencies = [ name = "tinyinference-voice" version = "0.3.0" dependencies = [ - "base64 0.22.1", - "log", + "base64 0.23.1", "reqwest", "serde", "serde_json", @@ -2995,7 +2968,7 @@ version = "0.3.2" dependencies = [ "anyhow", "base64 0.23.1", - "dirs 6.0.0", + "dirs", "futures-util", "parking_lot", "reqwest", @@ -3003,7 +2976,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.11.0", - "thiserror 2.0.20", + "thiserror", "tinymcp-bus", "tokio", "tracing", @@ -3041,7 +3014,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.11.0", - "thiserror 2.0.20", + "thiserror", "uuid", ] @@ -3082,7 +3055,7 @@ dependencies = [ "serde_json", "serde_yaml", "sha2 0.10.9", - "thiserror 2.0.20", + "thiserror", "tokio", "tracing", "url", @@ -3100,7 +3073,18 @@ dependencies = [ [[package]] name = "tinytools" -version = "0.2.0" +version = "0.3.0" +dependencies = [ + "anyhow", + "async-trait", + "serde", + "serde_json", +] + +[[package]] +name = "tinytools" +version = "0.3.0" +source = "git+https://github.com/tinyhumansai/tinytools?rev=a5d04a7f3af0abc1dd748f87f94871b36ae9fe71#a5d04a7f3af0abc1dd748f87f94871b36ae9fe71" dependencies = [ "anyhow", "async-trait", @@ -3110,12 +3094,23 @@ dependencies = [ [[package]] name = "tinytools-agent" -version = "0.2.0" +version = "0.3.0" dependencies = [ "regex", "serde", "serde_json", - "tinytools", + "tinytools 0.3.0", +] + +[[package]] +name = "tinytools-agent" +version = "0.3.0" +source = "git+https://github.com/tinyhumansai/tinytools?rev=a5d04a7f3af0abc1dd748f87f94871b36ae9fe71#a5d04a7f3af0abc1dd748f87f94871b36ae9fe71" +dependencies = [ + "regex", + "serde", + "serde_json", + "tinytools 0.3.0 (git+https://github.com/tinyhumansai/tinytools?rev=a5d04a7f3af0abc1dd748f87f94871b36ae9fe71)", ] [[package]] @@ -3411,9 +3406,15 @@ dependencies = [ "rustls", "rustls-pki-types", "sha1", - "thiserror 2.0.20", + "thiserror", ] +[[package]] +name = "typed-path" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e" + [[package]] name = "typenum" version = "1.20.1" @@ -3726,6 +3727,27 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections", + "windows-core 0.62.2", + "windows-future", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core 0.62.2", +] + [[package]] name = "windows-core" version = "0.57.0" @@ -3751,6 +3773,17 @@ dependencies = [ "windows-strings", ] +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core 0.62.2", + "windows-link", + "windows-threading", +] + [[package]] name = "windows-implement" version = "0.57.0" @@ -3801,6 +3834,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core 0.62.2", + "windows-link", +] + [[package]] name = "windows-result" version = "0.1.2" @@ -3828,15 +3871,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -3864,21 +3898,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -3913,10 +3932,13 @@ dependencies = [ ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" +name = "windows-threading" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] [[package]] name = "windows_aarch64_gnullvm" @@ -3930,12 +3952,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -3948,12 +3964,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -3978,12 +3988,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -3996,12 +4000,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -4014,12 +4012,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -4032,12 +4024,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -4252,7 +4238,21 @@ dependencies = [ "flate2", "indexmap", "memchr", - "thiserror 2.0.20", + "thiserror", + "zopfli", +] + +[[package]] +name = "zip" +version = "8.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b" +dependencies = [ + "crc32fast", + "flate2", + "indexmap", + "memchr", + "typed-path", "zopfli", ] diff --git a/examples/openhuman/src/bin/deepswe_hive.rs b/examples/openhuman/src/bin/deepswe_hive.rs index 720792bd..2c7513bd 100644 --- a/examples/openhuman/src/bin/deepswe_hive.rs +++ b/examples/openhuman/src/bin/deepswe_hive.rs @@ -344,7 +344,6 @@ async fn run_seat( outbox: PathBuf, turn_timeout: Duration, ) -> anyhow::Result<(String, String, tinyhivemind::speech::Utterance)> { - let session = format!("deepswe-{}:{id}", task.instance_id); let mut retry_reason = None; mcp::clear(&outbox)?; for attempt in 1..=MAX_SEAT_ATTEMPTS { @@ -354,11 +353,7 @@ async fn run_seat( ) }); let prompt = seat_prompt(&task, &id, &delta, retry_instruction.as_deref()); - let send = tokio::time::timeout( - turn_timeout, - agent.turn(prompt).session(session.clone()).send(), - ) - .await; + let send = tokio::time::timeout(turn_timeout, agent.turn(prompt).send()).await; let utterances = mcp::drain(&outbox)?; if utterances.len() > 1 { anyhow::bail!( diff --git a/examples/openhuman/src/bin/deepswe_hive/README.md b/examples/openhuman/src/bin/deepswe_hive/README.md index 736538f9..785fe173 100644 --- a/examples/openhuman/src/bin/deepswe_hive/README.md +++ b/examples/openhuman/src/bin/deepswe_hive/README.md @@ -54,8 +54,11 @@ accepted action and that continuation error, and that seat is not rerun. More than one action always fails immediately. A zero-action protocol miss or retryable provider failure may retry within the -same budget, OpenHuman session, and frozen pre-round view. The outbox is cleared -before the first attempt and again only after such a proven zero-action outcome. +same budget and frozen pre-round view. Every attempt uses a fresh OpenHuman +conversation; the TinyHiveMind desk is the only cross-turn transcript, so an +earlier native-action acceptance cannot satisfy a later attempt or hive round. +The outbox is cleared before the first attempt and again only after such a +proven zero-action outcome. A timeout is ambiguous because a cancelled turn may still write late, so it fails closed without retry even when no action was observed. Provider retryability uses OpenHuman's structured `retryable` field when present, then a diff --git a/examples/openhuman/src/bin/deepswe_hive/mcp.rs b/examples/openhuman/src/bin/deepswe_hive/mcp.rs index 47318728..d5ee4d07 100644 --- a/examples/openhuman/src/bin/deepswe_hive/mcp.rs +++ b/examples/openhuman/src/bin/deepswe_hive/mcp.rs @@ -102,18 +102,18 @@ pub(super) fn response(server: &Server, request: &Value, id: Value) -> Value { "tools/call" => match call(server, request) { Ok(text) => success(id, json!({"content": [{"type": "text", "text": text}]})), Err(CallError::InvalidParams(error)) => json!({ - "jsonrpc":"2.0", "id":id, - "error":{"code":-32602,"message":error} - }), + "jsonrpc":"2.0", "id":id, + "error":{"code":-32602,"message":error} + }), Err(CallError::Execution(error)) => json!({ - "jsonrpc":"2.0", "id":id, - "result":{"content":[{"type":"text","text":error}],"isError":true} - }), - }, - other => json!({ "jsonrpc":"2.0", "id":id, - "error":{"code":-32601,"message":format!("unknown method {other}")} + "result":{"content":[{"type":"text","text":error}],"isError":true} }), + }, + other => json!({ + "jsonrpc":"2.0", "id":id, + "error":{"code":-32601,"message":format!("unknown method {other}")} + }), } } @@ -146,7 +146,11 @@ fn call(server: &Server, request: &Value) -> Result { let required = match server { Server::Hive { .. } => match name { "broadcast" | "complete_episode" => ["message"].as_slice(), - _ => return Err(CallError::InvalidParams(format!("unknown hive tool {name}"))), + _ => { + return Err(CallError::InvalidParams(format!( + "unknown hive tool {name}" + ))); + } }, Server::Workspace { .. } => match name { "file_read" => ["path"].as_slice(), @@ -317,7 +321,9 @@ fn take( } pub(super) fn clear(path: &Path) -> anyhow::Result<()> { - let parent = path.parent().filter(|parent| !parent.as_os_str().is_empty()) + let parent = path + .parent() + .filter(|parent| !parent.as_os_str().is_empty()) .unwrap_or_else(|| Path::new(".")); let parent_metadata = std::fs::symlink_metadata(parent)?; if !parent_metadata.is_dir() || parent_metadata.file_type().is_symlink() { diff --git a/examples/openhuman/src/bin/deepswe_hive/sandbox.rs b/examples/openhuman/src/bin/deepswe_hive/sandbox.rs index b577ec40..9c882661 100644 --- a/examples/openhuman/src/bin/deepswe_hive/sandbox.rs +++ b/examples/openhuman/src/bin/deepswe_hive/sandbox.rs @@ -429,7 +429,9 @@ pub(super) fn mount(source: &Path, destination: &str, writable: bool) -> anyhow: anyhow::bail!("Docker bind mount paths must not contain commas") } let readonly = if writable { "" } else { ",readonly" }; - Ok(format!("type=bind,src={source},dst={destination}{readonly}")) + Ok(format!( + "type=bind,src={source},dst={destination}{readonly}" + )) } fn run_container_output( diff --git a/examples/openhuman/src/bin/deepswe_hive/task.rs b/examples/openhuman/src/bin/deepswe_hive/task.rs index 4b43652b..4c4cf389 100644 --- a/examples/openhuman/src/bin/deepswe_hive/task.rs +++ b/examples/openhuman/src/bin/deepswe_hive/task.rs @@ -150,7 +150,10 @@ impl Task { .args(args) .current_dir(&self.repo_path) .env_clear() - .env("PATH", std::env::var_os("PATH").unwrap_or_else(|| "/usr/bin:/bin:/usr/local/bin".into())) + .env( + "PATH", + std::env::var_os("PATH").unwrap_or_else(|| "/usr/bin:/bin:/usr/local/bin".into()), + ) .output()?; if !output.status.success() { anyhow::bail!( @@ -250,7 +253,10 @@ fn git(repo_path: &Path, args: [&str; N], action: &str) -> anyho .args(args) .current_dir(repo_path) .env_clear() - .env("PATH", std::env::var_os("PATH").unwrap_or_else(|| "/usr/bin:/bin:/usr/local/bin".into())) + .env( + "PATH", + std::env::var_os("PATH").unwrap_or_else(|| "/usr/bin:/bin:/usr/local/bin".into()), + ) .output()?; if !output.status.success() { anyhow::bail!( diff --git a/examples/openhuman/src/bin/deepswe_hive/test.rs b/examples/openhuman/src/bin/deepswe_hive/test.rs index 7f5f6712..867a7b72 100644 --- a/examples/openhuman/src/bin/deepswe_hive/test.rs +++ b/examples/openhuman/src/bin/deepswe_hive/test.rs @@ -379,7 +379,10 @@ fn refuses_to_schedule_a_round_past_the_exact_turn_cap() { #[test] fn docker_mounts_reject_delimiter_paths_before_argument_rendering() { - for (source, destination) in [("/tmp/source,comma", "/workspace"), ("/tmp/source", "/workspace,comma")] { + for (source, destination) in [ + ("/tmp/source,comma", "/workspace"), + ("/tmp/source", "/workspace,comma"), + ] { let error = super::sandbox::mount(std::path::Path::new(source), destination, false) .expect_err("comma cannot enter Docker mount syntax"); assert!(error.to_string().contains("commas")); @@ -414,7 +417,11 @@ fn hive_mcp_writes_only_native_tool_calls_and_separates_protocol_errors() { serde_json::json!({"method": "tools/call", "params": {"name": "broadcast", "arguments": {}}}), ] { let response = super::mcp::response(&server, &request, serde_json::json!(2)); - let expected = if request["method"] == "unknown" { -32601 } else { -32602 }; + let expected = if request["method"] == "unknown" { + -32601 + } else { + -32602 + }; assert_eq!(response["error"]["code"], expected); } std::fs::remove_file(&outbox).expect("remove prepared outbox"); @@ -428,10 +435,12 @@ fn hive_mcp_writes_only_native_tool_calls_and_separates_protocol_errors() { ); assert_eq!(response["result"]["isError"], true); std::fs::write(&outbox, vec![b'x'; 64 * 1024 + 1]).expect("oversized outbox"); - assert!(super::mcp::drain(&outbox) - .expect_err("oversized outbox is rejected") - .to_string() - .contains("exceeds")); + assert!( + super::mcp::drain(&outbox) + .expect_err("oversized outbox is rejected") + .to_string() + .contains("exceeds") + ); } #[test] diff --git a/examples/openhuman/src/bin/deepswe_hive/test/retry.rs b/examples/openhuman/src/bin/deepswe_hive/test/retry.rs index 21ff52ea..01cef83b 100644 --- a/examples/openhuman/src/bin/deepswe_hive/test/retry.rs +++ b/examples/openhuman/src/bin/deepswe_hive/test/retry.rs @@ -22,7 +22,8 @@ use crate::sandbox::{DockerSandbox, SandboxConfig}; mod response; use response::{ - completion_response, empty_completion_response, provider_error_response, tool_call_response, + completion_response, empty_completion_response, hive_action_response, provider_error_response, + tool_call_response, }; const PRINTED_JSON: &str = @@ -41,6 +42,8 @@ struct ScriptedHive { lead_misses: u32, lead_failure: LeadFailure, lead_continuation_failure: Option, + broadcast_first_turn: bool, + refuse_after_stale_acceptance: bool, } #[derive(Clone, Copy)] @@ -89,6 +92,15 @@ impl Respond for ScriptedHive { } assert_eq!(last_role, "user", "unexpected provider turn boundary"); + if self.refuse_after_stale_acceptance + && messages + .iter() + .filter(|message| message["role"] == "user") + .count() + > 1 + { + return completion_response("stale action already accepted"); + } let attempt = { let entry = state.turn_starts.entry(seat.clone()).or_default(); *entry = entry.saturating_add(1); @@ -103,6 +115,9 @@ impl Respond for ScriptedHive { LeadFailure::Delay(duration) => completion_response("too late").set_delay(duration), }; } + if self.broadcast_first_turn && attempt == 1 { + return hive_action_response(&seat, state.calls, "broadcast"); + } tool_call_response(&seat, state.calls) } } @@ -146,11 +161,14 @@ while IFS= read -r line; do id=$(printf '%s' "$line" | sed -E 's/.*"id"[ ]*:[ ]*([^,}]+).*/\1/') case "$line" in *initialize*) result='{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"serverInfo":{"name":"fixture","version":"1"}}' ;; - *tools/list*) result='{"tools":[{"name":"complete_episode","description":"complete","inputSchema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}]}' ;; + *tools/list*) result='{"tools":[{"name":"broadcast","description":"broadcast","inputSchema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},{"name":"complete_episode","description":"complete","inputSchema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}]}' ;; *tools/call*) + kind=complete_episode + message=complete + case "$line" in *'"name":"broadcast"'*) kind=broadcast; message=broadcast ;; esac count=0 while test "$count" -lt ACTION_COPIES; do - printf '{"kind":"complete_episode","message":"%s complete"}\n' "$agent" >> "$outbox" + printf '{"kind":"%s","message":"%s %s"}\n' "$kind" "$agent" "$message" >> "$outbox" count=$((count + 1)) done result=$(printf '{"content":[{"type":"text","text":"accepted from @%s"}]}' "$agent") @@ -193,12 +211,92 @@ async fn provider_with_continuation( lead_misses, lead_failure, lead_continuation_failure, + broadcast_first_turn: false, + refuse_after_stale_acceptance: false, + }) + .mount(&provider) + .await; + (provider, state) +} + +async fn two_round_provider() -> (MockServer, Arc>) { + let provider = MockServer::start().await; + let state = Arc::new(Mutex::new(ScriptState::default())); + Mock::given(method("POST")) + .and(path("/v1/chat/completions")) + .respond_with(ScriptedHive { + state: Arc::clone(&state), + lead_misses: 0, + lead_failure: LeadFailure::Protocol, + lead_continuation_failure: None, + broadcast_first_turn: true, + refuse_after_stale_acceptance: true, }) .mount(&provider) .await; (provider, state) } +#[test] +fn a_new_hive_turn_does_not_inherit_a_prior_action_acceptance() { + let _guard = retry_test_guard(); + let runtime = tokio::runtime::Builder::new_multi_thread() + .enable_all() + .thread_stack_size(16 * 1024 * 1024) + .build() + .expect("test runtime"); + runtime.block_on(async { + let (directory, task) = fixture(); + let sandbox = fake_sandbox(&directory, &task); + let mcp = fake_mcp(&directory, 1); + let (provider, state) = two_round_provider().await; + let output_directory = TempDir::new().expect("output directory"); + let output = output_directory.path().join("output.json"); + let cli = Cli { + task: directory.path().join("unused.json"), + api_base: format!("{}/v1", provider.uri()), + model: DEFAULT_MODEL.into(), + output: output.clone(), + }; + + let error = tokio::spawn(async move { + run_with_mcp_executable(cli, task, sandbox, "loopback-only".into(), &mcp).await + }) + .await + .expect("adapter task") + .expect_err("empty patch makes the completed episode fail"); + assert!( + error.to_string().contains("episode result is failed"), + "a stale acceptance poisoned the next hive turn: {error:#}" + ); + let result: Value = serde_json::from_slice(&std::fs::read(&output).expect("result file")) + .expect("result JSON"); + assert_eq!(result["turns"], 8, "two four-seat rounds commit"); + + let state = state.lock().expect("script state"); + for seat in SEATS { + assert_eq!(state.turn_starts.get(seat), Some(&2), "@{seat} turn count"); + } + let second_lead = state + .start_requests + .iter() + .filter(|(seat, _)| seat == "lead") + .nth(1) + .map(|(_, request)| request) + .expect("second lead turn"); + assert!( + second_lead["messages"] + .as_array() + .expect("messages") + .iter() + .filter(|message| message["role"] == "user") + .count() + == 1, + "the next hive turn retained an old prompt: {second_lead:#}" + ); + }); +} + #[test] fn accepted_action_survives_post_tool_provider_failure_without_retry() { let _guard = retry_test_guard(); @@ -356,7 +454,7 @@ fn retry_test_guard() -> std::sync::MutexGuard<'static, ()> { } #[test] -fn one_missing_seat_retries_in_session_and_round_commits_once() { +fn one_missing_seat_retries_in_a_fresh_session_and_round_commits_once() { let _guard = retry_test_guard(); let runtime = tokio::runtime::Builder::new_multi_thread() .enable_all() @@ -416,7 +514,8 @@ fn one_missing_seat_retries_in_session_and_round_commits_once() { assert!( messages .iter() - .any(|message| message["content"] == PRINTED_JSON) + .all(|message| message["content"] != PRINTED_JSON), + "the retry retained the invalid provider response" ); let retry_prompt = messages .last() @@ -555,7 +654,11 @@ fn empty_provider_response_retries_only_that_seat_and_commits_once() { assert_eq!(result["turns"], 4, "provider failure is not committed"); let state = state.lock().expect("script state"); - assert_eq!(state.turn_starts.get("lead"), Some(&2)); + assert_eq!( + state.turn_starts.get("lead"), + Some(&3), + "one OpenHuman empty-response fallback and one fresh hive retry" + ); for seat in ["implementer", "tester", "reviewer"] { assert_eq!(state.turn_starts.get(seat), Some(&1), "@{seat} reran"); } diff --git a/examples/openhuman/src/bin/deepswe_hive/test/retry/response.rs b/examples/openhuman/src/bin/deepswe_hive/test/retry/response.rs index 04a83431..d6a44296 100644 --- a/examples/openhuman/src/bin/deepswe_hive/test/retry/response.rs +++ b/examples/openhuman/src/bin/deepswe_hive/test/retry/response.rs @@ -53,10 +53,18 @@ pub(super) fn completion_response(content: &str) -> ResponseTemplate { } pub(super) fn tool_call_response(seat: &str, serial: u32) -> ResponseTemplate { + hive_action_response(seat, serial, "complete_episode") +} + +pub(super) fn hive_action_response(seat: &str, serial: u32, tool: &str) -> ResponseTemplate { + let message = match tool { + "complete_episode" => format!("{seat} complete"), + _ => format!("{seat} {tool}"), + }; let arguments = json!({ "server":"tinyhive", - "tool":"complete_episode", - "arguments":{"message":format!("{seat} complete")} + "tool":tool, + "arguments":{"message":message} }) .to_string(); ResponseTemplate::new(200).set_body_json(json!({ diff --git a/examples/openhuman/src/bin/deepswe_hive/test/security.rs b/examples/openhuman/src/bin/deepswe_hive/test/security.rs index f503b593..cf1cc8a1 100644 --- a/examples/openhuman/src/bin/deepswe_hive/test/security.rs +++ b/examples/openhuman/src/bin/deepswe_hive/test/security.rs @@ -130,10 +130,13 @@ fn outbox_initialization_truncates_regular_files_and_rejects_hostile_children() let child = directory.path().join("lead.jsonl"); std::fs::write(&child, "stale action\n").expect("regular child"); super::super::mcp::clear(&child).expect("regular child truncates"); - assert!(std::fs::read_to_string(&child).expect("read child").is_empty()); + assert!( + std::fs::read_to_string(&child) + .expect("read child") + .is_empty() + ); std::fs::remove_file(&child).expect("remove child"); - std::os::unix::fs::symlink(directory.path().join("missing"), &child) - .expect("outbox symlink"); + std::os::unix::fs::symlink(directory.path().join("missing"), &child).expect("outbox symlink"); let error = super::super::mcp::clear(&child).expect_err("hostile child rejected"); assert!(error.to_string().contains("regular file"), "{error:#}"); } diff --git a/examples/openhuman/src/bin/pe1006_hive.rs b/examples/openhuman/src/bin/pe1006_hive.rs index 95687e1d..5a70cbd2 100644 --- a/examples/openhuman/src/bin/pe1006_hive.rs +++ b/examples/openhuman/src/bin/pe1006_hive.rs @@ -314,7 +314,10 @@ async fn run() -> anyhow::Result<()> { .agents() .iter() .map(|pending_agent| { - (pending_agent.hive_agent_id.to_owned(), pending_agent.agent.clone()) + ( + pending_agent.hive_agent_id.to_owned(), + pending_agent.agent.clone(), + ) }) .collect(); let mut remaining: Vec<_> = round_agents.keys().cloned().collect(); @@ -388,7 +391,10 @@ async fn run() -> anyhow::Result<()> { .remove(id) .ok_or_else(|| anyhow::anyhow!("round did not retain {id}'s action"))?; sequence = sequence.saturating_add(1); - if matches!(&utterance, tinyhivemind::speech::Utterance::Broadcast { .. }) { + if matches!( + &utterance, + tinyhivemind::speech::Utterance::Broadcast { .. } + ) { roster_version = roster_version.saturating_add(1); } match &utterance { @@ -413,7 +419,10 @@ async fn run() -> anyhow::Result<()> { anyhow::bail!("MCP completion surface emitted an unsupported utterance") } } - if !matches!(&utterance, tinyhivemind::speech::Utterance::Broadcast { .. }) { + if !matches!( + &utterance, + tinyhivemind::speech::Utterance::Broadcast { .. } + ) { println!("[complete_episode] @{id}"); } committed.push(CommittedUtterance { diff --git a/vendor/openhuman b/vendor/openhuman index b927d026..1ecf1b0b 160000 --- a/vendor/openhuman +++ b/vendor/openhuman @@ -1 +1 @@ -Subproject commit b927d026d1440dc54d57ab175362ce449ae96eb5 +Subproject commit 1ecf1b0bc4bc4d80b0f56f1e01e47d2c0f981c5b