diff --git a/Cargo.lock b/Cargo.lock index 6b18733..c58df08 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -26,6 +26,12 @@ dependencies = [ "libc", ] +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + [[package]] name = "arbitrary" version = "1.4.2" @@ -557,6 +563,12 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + [[package]] name = "hybrid-array" version = "0.4.14" @@ -1423,8 +1435,26 @@ dependencies = [ ] [[package]] -name = "tinyagents" -version = "2.1.1" +name = "tinyagents-graph" +version = "2.1.2" +dependencies = [ + "async-trait", + "chrono", + "futures", + "reqwest", + "serde", + "serde_json", + "sha2 0.11.0", + "tinyagents-harness", + "tinyagents-language", + "tinyagents-tracing", + "tinyinference", + "tokio", +] + +[[package]] +name = "tinyagents-harness" +version = "2.1.2" dependencies = [ "async-trait", "bytes", @@ -1436,13 +1466,28 @@ dependencies = [ "serde_json", "sha2 0.11.0", "thiserror", + "tinyagents-tracing", + "tinyinference", + "tinytools", "tokio", - "tracing", ] +[[package]] +name = "tinyagents-language" +version = "2.1.2" +dependencies = [ + "serde", + "serde_json", + "tinyagents-harness", +] + +[[package]] +name = "tinyagents-tracing" +version = "2.1.2" + [[package]] name = "tinybus" -version = "0.1.0" +version = "0.1.1" dependencies = [ "async-trait", "flate2", @@ -1461,7 +1506,7 @@ dependencies = [ [[package]] name = "tinybus-macros" -version = "0.1.0" +version = "0.1.1" dependencies = [ "proc-macro2", "quote", @@ -1470,7 +1515,7 @@ dependencies = [ [[package]] name = "tinybus-module" -version = "0.1.0" +version = "0.1.1" dependencies = [ "async-trait", "serde", @@ -1500,6 +1545,22 @@ dependencies = [ "tracing", ] +[[package]] +name = "tinyinference" +version = "0.2.1" +dependencies = [ + "async-trait", + "bytes", + "futures", + "httpdate", + "reqwest", + "serde", + "serde_json", + "sha2 0.11.0", + "thiserror", + "tokio", +] + [[package]] name = "tinyloops" version = "0.2.1" @@ -1509,7 +1570,7 @@ dependencies = [ "serde_json", "sha2 0.10.9", "thiserror", - "tinyagents", + "tinyagents-graph", "tinybus", "tinybus-module", "tinyflows", @@ -1535,6 +1596,16 @@ dependencies = [ "zerovec", ] +[[package]] +name = "tinytools" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "serde", + "serde_json", +] + [[package]] name = "tinyvec" version = "1.12.0" diff --git a/Cargo.toml b/Cargo.toml index 32a6581..5a88244 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,7 +65,15 @@ tinyflows-adaptive = { path = "vendor/tinyflows/crates/adaptive", version = "0.1 # switched on so an example can build a real harness around a loop. Default # features off keeps the bundled SQLite checkpointer and the builtin tool family # out of the graph until an example asks for them. -tinyagents = { path = "vendor/tinyagents", version = "2.1.1", default-features = false } +# +# The path names a *crate* inside the vendored workspace rather than the +# workspace root. `vendor/tinyagents` was a single package up to 2.1.1 and is a +# virtual manifest from 2.1.2, so the old path stopped resolving the moment the +# gitlink moved — with `found a virtual manifest ... instead of a package +# manifest`, which is cargo failing to load the source rather than anything +# about the code. `tinyagents-graph` re-exports everything the example used from +# the umbrella crate. +tinyagents-graph = { path = "vendor/tinyagents/crates/tinyagents-graph", version = "2.1.2", default-features = false } # Hashes the emitted loop graph into the signature a checkpoint records, so a # resume against a graph whose topology has since changed is refused rather than # restored into slots that no longer mean what they meant. Not diff --git a/crates/tinyloops/Cargo.toml b/crates/tinyloops/Cargo.toml index a18a3a7..0ad2b5f 100644 --- a/crates/tinyloops/Cargo.toml +++ b/crates/tinyloops/Cargo.toml @@ -44,7 +44,7 @@ thiserror = { workspace = true } # Optional, and only ever reached from an example. The `tinyagents` feature # below turns it on; the module library itself never calls into it, so a host # that loads the `cdylib` resolves neither the harness nor its HTTP client. -tinyagents = { workspace = true, optional = true } +tinyagents-graph = { workspace = true, optional = true } [dev-dependencies] tokio = { workspace = true } @@ -65,7 +65,7 @@ default = [] # Pulls in the TinyAgents durable agent + graph harness so the examples that # drive a loop from a harness can compile. Nothing in `src/` is gated on it — # it exists to give an example a real harness instead of a hand-rolled stand-in. -tinyagents = ["dep:tinyagents"] +tinyagents = ["dep:tinyagents-graph"] # Every other example is discovered from `examples/` and builds on a bare # `cargo test`. This one additionally needs the optional crate above, and diff --git a/crates/tinyloops/examples/tinyagents_harness.rs b/crates/tinyloops/examples/tinyagents_harness.rs index 326e693..9d5bc94 100644 --- a/crates/tinyloops/examples/tinyagents_harness.rs +++ b/crates/tinyloops/examples/tinyagents_harness.rs @@ -23,7 +23,7 @@ use std::error::Error; use std::sync::Arc; use serde_json::{Value, json}; -use tinyagents::{END, GraphBuilder, NodeContext, NodeResult, TinyAgentsError}; +use tinyagents_graph::{END, GraphBuilder, NodeContext, NodeResult, TinyAgentsError}; use tinyflows::caps::Capabilities; use tinyflows::caps::mock::mock_capabilities; use tinyflows::compiler::CompiledWorkflow; @@ -84,7 +84,7 @@ async fn refine( mut state: LoopState, workflow: Arc, capabilities: Arc, -) -> tinyagents::Result> { +) -> tinyagents_graph::Result> { let outcome = run(&workflow, state.payload.clone(), &capabilities) .await .map_err(|error| TinyAgentsError::Tool(format!("workflow run failed: {error}")))?; diff --git a/vendor/tinyagents b/vendor/tinyagents index e0f3210..b27d716 160000 --- a/vendor/tinyagents +++ b/vendor/tinyagents @@ -1 +1 @@ -Subproject commit e0f3210622b4f654c822999a294ed654120c04a6 +Subproject commit b27d716fee303449f52341e3afebabea33b2687f