From df260fd9a8d8f5fedb00bd6ba8244b4fda4a7f22 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Thu, 19 Nov 2026 23:25:12 +0100 Subject: [PATCH] build: move the claw to rhema 0.4.0 The framework 0.4.0 split the toolkit: rhema-agent-tools becomes rhema-bash plus rhema-prompt, and the facade crate is deleted from the workspace this time, so the 0.3 facades never publish. The driver changes name with its types: rhema-coding-agent and its CodingAgent, CodingAgentConfig, and CodingAgentError become rhema-host-agent with HostAgent, HostAgentConfig, and HostAgentError. The claw imports the split crates directly, which drops its own vision once-lock: rhema-bash's wire already caches the process-wide answer. The paste expansion moved off the provider seam. Chips travel as the message's spans note now, and ExpandPastes is deleted: the dispatch input migrates its embedded form into plain text plus the note at run_turn, and a restashed session migrates the same way on restore, one rewrite on the way in exactly as the driver's from_session does. The transcript events keep the raw chip form, the record the web UI owns, and a migration test pins the restore path. max_turn_steps is NonZeroU32, the engine's own budget shape: a config naming zero is refused at load instead of cutting every round dead. The engine's Event and the sandbox error enum are non-exhaustive now, so the hub sink and the protocol error map carry wildcard arms that drop and fail in-band the way their neighbors do. The claw's own version travels with the framework, as the 0.3.0 move carried 0.2.3 to 0.3.0: the workspace and the chart base become 0.4.0, so the edge channel's pre-releases order above the 0.3.x line. fmt, clippy with -D warnings over all features and targets, the workspace tests, and the doc build pass. --- Cargo.lock | 247 ++++++++++++------ Cargo.toml | 2 +- README.md | 2 +- crates/rhema-claw/Cargo.toml | 35 +-- crates/rhema-claw/src/bootstrap.rs | 2 +- crates/rhema-claw/src/config.rs | 16 +- crates/rhema-claw/src/handler.rs | 18 +- crates/rhema-claw/src/interactive.rs | 85 ++++-- crates/rhema-claw/src/jobs.rs | 29 +- crates/rhema-claw/src/main.rs | 4 +- crates/rhema-claw/src/mcp.rs | 8 +- crates/rhema-claw/src/mock.rs | 1 + crates/rhema-claw/src/sandbox.rs | 5 +- crates/rhema-claw/src/vision.rs | 26 +- crates/rhema-claw/tests/http.rs | 1 + deploy/helm/rhema-claw/Chart.yaml | 4 +- .../rhema-calendar-integration/Cargo.toml | 4 +- .../rhema-forge-integration/Cargo.toml | 2 +- 18 files changed, 318 insertions(+), 173 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc1f7a9..2f84a12 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1904,28 +1904,11 @@ dependencies = [ "webpki-roots", ] -[[package]] -name = "rhema-agent-tools" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec3e06eef5c867bb8bc1f2170b5f6f46a6248f52428a25d2bf50f7573adb389" -dependencies = [ - "async-trait", - "base64 0.22.1", - "minijinja", - "rhema-core", - "serde", - "serde_json", - "serde_yaml", - "thiserror", - "tokio", -] - [[package]] name = "rhema-autonomous-agent" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5234ec887bccf0175975fed5ae18ae53d2801146c8e229756eac09192ae9d7b8" +checksum = "08fd6d5fe5f9551226d322491d03b14d5e42ac2ff73544c15a555fb97a04bbfd" dependencies = [ "async-trait", "rhema-core", @@ -1937,9 +1920,25 @@ dependencies = [ "tokio", ] +[[package]] +name = "rhema-bash" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9ae34e5c556e0abdf279dd7d0aa08632bdcd68cff965bce2b81c226ada8f1e" +dependencies = [ + "async-trait", + "base64 0.22.1", + "rhema-core", + "rhema-submissions", + "serde", + "serde_json", + "thiserror", + "tokio", +] + [[package]] name = "rhema-calendar-integration" -version = "0.3.0" +version = "0.4.0" dependencies = [ "async-trait", "quick-xml", @@ -1958,7 +1957,7 @@ dependencies = [ [[package]] name = "rhema-claw" -version = "0.3.0" +version = "0.4.0" dependencies = [ "async-trait", "axum", @@ -1966,17 +1965,18 @@ dependencies = [ "bytes", "clap", "reqwest", - "rhema-agent-tools", "rhema-autonomous-agent", + "rhema-bash", "rhema-calendar-integration", "rhema-claw-tools-contract", - "rhema-coding-agent", "rhema-config", "rhema-core", "rhema-forge-integration", + "rhema-host-agent", "rhema-identity", "rhema-mcp", "rhema-memory", + "rhema-prompt", "rhema-provider", "rhema-provider-registry", "rhema-rsd", @@ -1997,35 +1997,18 @@ dependencies = [ [[package]] name = "rhema-claw-tools-contract" -version = "0.3.0" +version = "0.4.0" dependencies = [ "serde", "serde_json", "tokio", ] -[[package]] -name = "rhema-coding-agent" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5fa7ca082f52429c159addd7cdd036ddc7aa69161ed82004bb480a2e3ae46d1" -dependencies = [ - "minijinja", - "rhema-agent-tools", - "rhema-config", - "rhema-core", - "rhema-transcript", - "serde", - "serde_json", - "serde_yaml", - "thiserror", -] - [[package]] name = "rhema-config" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c96cd6da28edeb36b8251a7a8129117ec0afa3f5851a0a6d904c10d67fbaa84" +checksum = "a0bbfb885f219272d24534c004819db377cf5370de0f82a851f9329466a5349c" dependencies = [ "keyring", "rhema-core", @@ -2037,9 +2020,9 @@ dependencies = [ [[package]] name = "rhema-core" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ac339e3dcd9c379d44c5580ac74075e338e6fce7e79c6e4fefe11fc26a3e10f" +checksum = "c3cd4c7a28b121243a2e26371e53750f28368e96c1a1629f021847c717e1cd55" dependencies = [ "async-trait", "serde", @@ -2049,7 +2032,7 @@ dependencies = [ [[package]] name = "rhema-forge-integration" -version = "0.3.0" +version = "0.4.0" dependencies = [ "async-trait", "reqwest", @@ -2062,10 +2045,30 @@ dependencies = [ ] [[package]] -name = "rhema-identity" -version = "0.3.0" +name = "rhema-host-agent" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9ced20fc75671b29e49890c6e7f0b5db88f6ad4b43629ee089face88bce633" +checksum = "3c10a82a420f1ea5ad1e68cabf0da67e6d05f18ec9e6fa02993969c2dcc53a68" +dependencies = [ + "minijinja", + "rhema-bash", + "rhema-config", + "rhema-core", + "rhema-prompt", + "rhema-session-store", + "rhema-session-store-file", + "rhema-transcript", + "serde", + "serde_json", + "serde_yaml", + "thiserror", +] + +[[package]] +name = "rhema-identity" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bb799ae7395c647577b9cf26208d81c2913d893db050adc82976e88436226c" dependencies = [ "rusqlite", "serde", @@ -2074,9 +2077,9 @@ dependencies = [ [[package]] name = "rhema-mcp" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c96a292b7da4db6334e0dda5d25d25c2dc0e1058cc0e07df49ca3f28944beff" +checksum = "6ed674931827b5b5e3130b376bda837cf49bda6ca6c94392430b74e292b6f516" dependencies = [ "async-stream", "axum", @@ -2089,8 +2092,9 @@ dependencies = [ "hyper-rustls", "hyper-util", "mcp-to-cli", - "rhema-agent-tools", + "rhema-bash", "rhema-config", + "rhema-prompt", "serde", "serde_json", "sha2 0.10.9", @@ -2100,9 +2104,9 @@ dependencies = [ [[package]] name = "rhema-memory" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcc03d8df84af15c992fd4f317fce11735a824853e40c2d674dff394a952d78" +checksum = "34d3b6763b7c567849b6f1787bae7152ce92ec38bdbe2ec27691d4ef2596c259" dependencies = [ "async-trait", "rhema-core", @@ -2113,13 +2117,27 @@ dependencies = [ ] [[package]] -name = "rhema-provider" -version = "0.3.0" +name = "rhema-prompt" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9500c59a8661c16e80ece7525180fe44d553eab2a3e57751194d7a8f138ea6b" +checksum = "b70bba0a045879067817db80fcaa7578dc32ef699786cc004b8fdb73bccc47e4" +dependencies = [ + "minijinja", + "rhema-core", + "serde", + "serde_json", + "serde_yaml", +] + +[[package]] +name = "rhema-provider" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c400c1ac8430f78184ecc12024605686a988ada7a3ee30dd67a4ce12114ccb9e" dependencies = [ "async-trait", "futures-core", + "reqwest", "rhema-core", "serde", "serde_json", @@ -2129,9 +2147,9 @@ dependencies = [ [[package]] name = "rhema-provider-anthropic" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76136cc125a6a03f0db760879c3a417ea56298c1130d20d106f2716cbfe7d031" +checksum = "a57458493f5b1fb540fa47f558f7743094dc123d2c06815d2078f9303d9df22f" dependencies = [ "async-trait", "futures-util", @@ -2145,9 +2163,9 @@ dependencies = [ [[package]] name = "rhema-provider-chatgpt" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38088d5cfa5bb85e6641bd8986757237fab33c8d3ebd86cbc53ef5d88e1af5d4" +checksum = "7642b1e0bc194cc81d7f347182eecd6702a04a85de41912bd2d34b2cdf41ca7b" dependencies = [ "async-trait", "base64 0.22.1", @@ -2164,9 +2182,9 @@ dependencies = [ [[package]] name = "rhema-provider-copilot" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43ed3942ab1a1ea1a00d082ab85e86ee5607e4718b0ad219a4e9ba9090a302da" +checksum = "eb39fa7f059df415bdef2453e58ad5359fd74eeb39f7981179f03c78ffb5af7d" dependencies = [ "async-trait", "futures-util", @@ -2182,9 +2200,9 @@ dependencies = [ [[package]] name = "rhema-provider-google" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad86c3e875e59f166c08e144d9cecd0edd0d445a26472e65dbe0d1bdb6efc44" +checksum = "7dda76eea354cfbdfd4a2dfa1fc1ce8da823675699cf2bf4d3ace8560fec2cd7" dependencies = [ "async-trait", "futures-util", @@ -2198,9 +2216,9 @@ dependencies = [ [[package]] name = "rhema-provider-llama-cpp" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9dd148f53af3a2dbd811da63cd8519130bbc4191af0b44fb23818ca0d82b6f" +checksum = "953181611b909688db511f891e8c59e034b90bd798034f1afef36cac05409566" dependencies = [ "async-trait", "futures-util", @@ -2214,10 +2232,29 @@ dependencies = [ ] [[package]] -name = "rhema-provider-openai-compatible" -version = "0.3.0" +name = "rhema-provider-mistral" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7347b2f056473170a4bf5d7d43fa06892a3b2139eb727a580474ce9bd78f436c" +checksum = "1f657297d7d617a14b10bb6248e944d053d73a536d3b6ae4ee4cc8acabcb4a57" +dependencies = [ + "async-trait", + "base64 0.22.1", + "rand 0.8.8", + "reqwest", + "rhema-core", + "rhema-provider", + "rhema-provider-openai-compatible", + "serde", + "serde_json", + "sha2 0.10.9", + "tokio", +] + +[[package]] +name = "rhema-provider-openai-compatible" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a90f1620882b2a3dbdb00065b29c329622c5596f582027b29130fbd40003b450" dependencies = [ "async-trait", "futures-util", @@ -2231,9 +2268,9 @@ dependencies = [ [[package]] name = "rhema-provider-opencode" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29823bcfc72d76d5e75bd5c2831a2e7ee07bcbd20598fab2694802652b85a706" +checksum = "2068c980362fe3d4f7876e5e842f51c0719626449afac64192592865e11a0108" dependencies = [ "async-trait", "reqwest", @@ -2246,9 +2283,9 @@ dependencies = [ [[package]] name = "rhema-provider-openrouter" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488f07952b81a5b20b7acad0d80c2ec28b0fb51f78cc4e878bc183a48f71c32c" +checksum = "c2025f84d6a1fd1e513ffad4b374d280f0db600ffac635dfe08a58d04b03e91d" dependencies = [ "async-trait", "futures-util", @@ -2262,9 +2299,9 @@ dependencies = [ [[package]] name = "rhema-provider-registry" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3d7af90727ea9319a7553726653d0f3908ac9786d25c7ab75b832e4f93bf52" +checksum = "be5ed790e3dc4fc3a42bd9b1a633ef72204c519810ce03dafb2792a8ff0b6bf8" dependencies = [ "rhema-core", "rhema-provider", @@ -2273,6 +2310,7 @@ dependencies = [ "rhema-provider-copilot", "rhema-provider-google", "rhema-provider-llama-cpp", + "rhema-provider-mistral", "rhema-provider-openai-compatible", "rhema-provider-opencode", "rhema-provider-openrouter", @@ -2281,9 +2319,9 @@ dependencies = [ [[package]] name = "rhema-rsd" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a163669ba8f439389e0cb4b73c72b26d0b3ccd08b414283f577af9a0b69890ba" +checksum = "3a4bd0555ff3720c0501187f5e9c6ee19ebebb95c1ecdb296c509c2e2dd971ce" dependencies = [ "rhema-core", "rusqlite", @@ -2294,12 +2332,12 @@ dependencies = [ [[package]] name = "rhema-sandbox" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f35d9fcdee82dae2c455729d54aa19603c870da2d916f0dc115f2e8d8446181" +checksum = "7030dbd46aa8a2398452dcf86b6b39d13b82909b9fdc654c49e1374183594779" dependencies = [ "async-trait", - "rhema-agent-tools", + "rhema-bash", "rhema-core", "serde", "serde_json", @@ -2308,9 +2346,9 @@ dependencies = [ [[package]] name = "rhema-sandbox-http" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14df93c046a0226941c8b59a86e9af305b8c91bde69b26790ce6534d71709a1" +checksum = "b5171470a8a56246e036aa10fc63e641ae7907a3ce70ac8f4816f3c9499eb75b" dependencies = [ "async-trait", "base64 0.22.1", @@ -2321,10 +2359,47 @@ dependencies = [ ] [[package]] -name = "rhema-transcript" -version = "0.3.0" +name = "rhema-session-store" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee0104c104a9a476d7b246e36c5d7f795568afbae5dbb74f5787580ef2af61d7" +checksum = "ef2dd4aca030a56e438c136099d3f07d6fd4649a3db1be6c9838a68a6530cbf6" +dependencies = [ + "rhema-core", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "rhema-session-store-file" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ff65f110123026ae79679572b084c517693f81e0d464897e580b64985a9507" +dependencies = [ + "rhema-config", + "rhema-core", + "rhema-session-store", + "serde_json", +] + +[[package]] +name = "rhema-submissions" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d054ba904c324ef057c8fb4b9c88a40703496c8b621768844af56a8893d3fb99" +dependencies = [ + "rhema-core", + "rhema-session-store", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "rhema-transcript" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "800261e8c1f29e6ceee48769bba2aaea19ccd3496ff8c6c76c617aa7d53ec2db" dependencies = [ "async-trait", "rhema-core", diff --git a/Cargo.toml b/Cargo.toml index 1f64043..dcbe5f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["crates/*", "integrations/*"] [workspace.package] -version = "0.3.0" +version = "0.4.0" edition = "2024" rust-version = "1.89" license = "MIT" diff --git a/README.md b/README.md index 100a33a..511c233 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ surface over HTTP — native routes plus an OpenAI-compatible shim, with a web UI and an Android client talking to it. The framework it embeds (the crates under `crates/` it pulls from -crates.io: `rhema-autonomous-agent`, `rhema-coding-agent`, +crates.io: `rhema-autonomous-agent`, `rhema-host-agent`, `rhema-rsd`, and friends) lives in the [rhema repository](https://git.vhaudiquet.fr/vhaudiquet/rhema). diff --git a/crates/rhema-claw/Cargo.toml b/crates/rhema-claw/Cargo.toml index 2cff3be..24b5062 100644 --- a/crates/rhema-claw/Cargo.toml +++ b/crates/rhema-claw/Cargo.toml @@ -26,33 +26,36 @@ mock = ["rhema-core/mock"] [dependencies] # The shared toolkit: the resident agent assembles its agent from the -# shell, the approval seam, paste expansion, and revive-on-resume -rhema-agent-tools = "0.3.0" -rhema-autonomous-agent = "0.3.0" -rhema-coding-agent = "0.3.0" -rhema-config = "0.3.0" -rhema-core = "0.3.0" +# shell, the approval seam, and revive-on-resume (rhema-bash), the +# system-prompt renderer (rhema-prompt), and the driver that turns a +# provider into a host-operating agent (rhema-host-agent) +rhema-bash = "0.4.0" +rhema-prompt = "0.4.0" +rhema-host-agent = "0.4.0" +rhema-autonomous-agent = "0.4.0" +rhema-config = "0.4.0" +rhema-core = "0.4.0" # The bounded request view over the claw sessions, on by default here -rhema-transcript = "0.3.0" +rhema-transcript = "0.4.0" rhema-calendar-integration = { path = "../../integrations/rhema-calendar-integration" } rhema-forge-integration = { path = "../../integrations/rhema-forge-integration" } # The accounts layer: identities hold the forge tokens the watches poll # with, and the identity tools manage them over chat -rhema-identity = "0.3.0" -rhema-rsd = "0.3.0" +rhema-identity = "0.4.0" +rhema-rsd = "0.4.0" # The sandbox seam: where `bash` runs, local process or a daemon speaking # the wire protocol over HTTP -rhema-sandbox = "0.3.0" -rhema-sandbox-http = "0.3.0" +rhema-sandbox = "0.4.0" +rhema-sandbox-http = "0.4.0" # The tool contract: the agent-token allowlist and version the auth # middleware enforces (rhema-tools spec). The arrow runs claw -> # contract only — never the reverse. rhema-claw-tools-contract = { path = "../../tools/contract" } # The resident tier's durable memory: its tools join the resolver chain -rhema-memory = "0.3.0" +rhema-memory = "0.4.0" # The shared ModelCard the backend registry's listings return -rhema-provider = "0.3.0" -rhema-provider-registry = "0.3.0" +rhema-provider = "0.4.0" +rhema-provider-registry = "0.4.0" # Args for the two-flag binary surface clap = { version = "4.5", features = ["derive"] } serde = { workspace = true } @@ -77,7 +80,7 @@ time = { version = "0.3", default-features = false, features = ["parsing"] } # Inbound chat images ride base64; the dispatch decodes them into the # attachment store base64 = "0.22" -rhema-mcp = "0.3.0" +rhema-mcp = "0.4.0" [dev-dependencies] tempfile = "3" @@ -89,7 +92,7 @@ reqwest = { version = "0.12", features = ["json", "stream"] } bytes = "1" # The scripted provider for turn-level tests; mirrors rhema-code's mock # feature without a feature of our own — tests are the only consumer -rhema-core = { version = "0.3.0", features = ["mock"] } +rhema-core = { version = "0.4.0", features = ["mock"] } tokio = { workspace = true, features = ["rt-multi-thread", "macros", "sync", "time"] } [lints] diff --git a/crates/rhema-claw/src/bootstrap.rs b/crates/rhema-claw/src/bootstrap.rs index 11a7aa9..47a7a95 100644 --- a/crates/rhema-claw/src/bootstrap.rs +++ b/crates/rhema-claw/src/bootstrap.rs @@ -26,9 +26,9 @@ use std::collections::BTreeMap; use std::path::{Path, PathBuf}; use std::sync::Arc; -use rhema_agent_tools::render_template; use rhema_autonomous_agent::{ToolError, ToolOp, ToolRegistry, async_trait}; use rhema_core::ToolSpec; +use rhema_prompt::render_template; use serde_json::{Value, json}; /// The built-in system prompt, kept as data next to the code and read diff --git a/crates/rhema-claw/src/config.rs b/crates/rhema-claw/src/config.rs index 10d7d79..a063c12 100644 --- a/crates/rhema-claw/src/config.rs +++ b/crates/rhema-claw/src/config.rs @@ -13,6 +13,7 @@ //! binary's startup, not here — the daemon library takes the built //! provider, so tests can inject a mock. +use std::num::NonZeroU32; use std::path::PathBuf; use serde::{Deserialize, Serialize}; @@ -22,10 +23,13 @@ use serde::{Deserialize, Serialize}; pub const DEFAULT_POLL_INTERVAL_SECS: u64 = 60; /// How many tool rounds one chat turn may run, when -/// [`ClawConfig::max_turn_steps`] is unset — the coding driver's own -/// budget shape and its default: deep enough that a cap is a runaway -/// guard for an agent meant to work unattended, not a work timer. -pub const DEFAULT_MAX_TURN_STEPS: u32 = 2048; +/// [`ClawConfig::max_turn_steps`] is unset — the host agent driver's +/// own budget shape and its default: deep enough that a cap is a +/// runaway guard for an agent meant to work unattended, not a work +/// timer. `NonZeroU32`, the driver's own spelling: a turn cannot have +/// no step budget at all, and a config that names zero is refused at +/// load instead of cutting every round dead. +pub const DEFAULT_MAX_TURN_STEPS: NonZeroU32 = NonZeroU32::new(2048).unwrap(); /// Where the HTTP surface listens when [`ClawConfig::listen`] is unset: /// loopback only — the surface is for the machine's resident user. @@ -130,7 +134,7 @@ pub struct ClawConfig { /// How many tool rounds one chat turn may run before it is cut off /// with a failed outcome, the conversation intact. A follow-up /// message keeps going. [`DEFAULT_MAX_TURN_STEPS`] when unset. - pub max_turn_steps: u32, + pub max_turn_steps: NonZeroU32, /// The handler's model backend: `google`, `llama-cpp`, `openrouter`, /// `anthropic`, `openai`, or `zai`; google when unset. Keys resolve /// through the stored rhema config's default profile, env vars @@ -443,7 +447,7 @@ sandbox: "; let config: ClawConfig = serde_yaml::from_str(raw).expect("parses"); assert_eq!(config.poll_interval_secs, 30); - assert_eq!(config.max_turn_steps, 512); + assert_eq!(config.max_turn_steps, NonZeroU32::new(512).unwrap()); assert_eq!(config.provider.as_deref(), Some("anthropic")); assert_eq!(config.model.as_deref(), Some("claude-sonnet-4-5")); assert_eq!(config.listen.as_deref(), Some("192.168.1.10:7800")); diff --git a/crates/rhema-claw/src/handler.rs b/crates/rhema-claw/src/handler.rs index a54d0c1..ea7cbd8 100644 --- a/crates/rhema-claw/src/handler.rs +++ b/crates/rhema-claw/src/handler.rs @@ -10,7 +10,7 @@ //! //! Session continuity rides the dispatcher, not the filesystem: the //! agent's session JSON is stashed into `ctx.session.core.driver_state` -//! before the run returns and restored with [`CodingAgent::from_session`] +//! before the run returns and restored with [`HostAgent::from_session`] //! on the next dispatch of the same key, so a resumed thread keeps its //! conversation. Commit-before-execute rides it too: the run installs the //! context's commit hook, so the intent is in the store before the first @@ -25,9 +25,8 @@ use std::sync::{Arc, Mutex, PoisonError}; use crate::forge::{WatchCredential, record_client, resolve_watch_credential}; use crate::watch_store::ClawStore; -use rhema_agent_tools::{AllowAll, ShellTools}; use rhema_autonomous_agent::{Handler, SessionContext, async_trait}; -use rhema_coding_agent::{CodingAgent, CodingAgentConfig}; +use rhema_bash::{AllowAll, ShellTools}; use rhema_core::{Content, Event as ModelEvent, EventSink, Message, Session}; use rhema_forge_integration::ForgeKind; use rhema_forge_integration::triage::Role; @@ -35,6 +34,7 @@ use rhema_forge_integration::{ EventKind, Forge, ForgeError, ForgeEvent, Notification, RepoRef, Snapshot, ThreadState, decode, parse_key, }; +use rhema_host_agent::{HostAgent, HostAgentConfig}; use rhema_identity::IdentityStore; use rhema_rsd::{InboxItem, Outcome, ResourceKey}; use tokio::sync::OnceCell; @@ -342,16 +342,16 @@ impl ClawHandler { ctx: &SessionContext, workspace: &Path, key: &str, - ) -> Result { + ) -> Result { let (provider, model) = self.backends.current(); let config = self.agent_config(provider, &model, workspace); let agent = match &ctx.session.core.driver_state { // A never-dispatched key carries no stash: start clean. - serde_json::Value::Null => CodingAgent::new(config), + serde_json::Value::Null => HostAgent::new(config), stashed => { let session: Session = serde_json::from_value(stashed.clone()) .map_err(|err| format!("stashed session for {key} does not parse: {err}"))?; - CodingAgent::from_session(config, session) + HostAgent::from_session(config, session) } }; agent.map_err(|err| format!("cannot start the coding agent for {key}: {err}")) @@ -367,12 +367,12 @@ impl ClawHandler { provider: Arc, model: &str, workspace: &Path, - ) -> CodingAgentConfig { + ) -> HostAgentConfig { let display = match &self.sandbox { Some(sandbox) => sandbox.workspace_for(workspace), None => workspace.to_path_buf(), }; - let mut config = CodingAgentConfig::new(provider, model, &display, AllowAll); + let mut config = HostAgentConfig::new(provider, model, &display, AllowAll); // Write the resolved value, not an override: the coding agent's // own default is on now, and the config's `false` must win. config.transcript = self @@ -1100,6 +1100,7 @@ mod tests { Content::Text("on it".into()), Content::Text(" — closing.".into()), ], + annotations: Default::default(), }; assert_eq!(final_text(&message).as_deref(), Some("on it — closing.")); let tool_only = Message { @@ -1110,6 +1111,7 @@ mod tests { args: serde_json::json!({}), provider_data: serde_json::Value::Null, })], + annotations: Default::default(), }; assert_eq!(final_text(&tool_only), None, "no text, no reply"); } diff --git a/crates/rhema-claw/src/interactive.rs b/crates/rhema-claw/src/interactive.rs index fbc539e..985a2c1 100644 --- a/crates/rhema-claw/src/interactive.rs +++ b/crates/rhema-claw/src/interactive.rs @@ -64,16 +64,18 @@ //! rhema-code's UI draws for a steered turn. use std::collections::HashMap; +use std::num::NonZeroU32; use std::path::PathBuf; use std::sync::Arc; use std::sync::atomic::{AtomicBool, AtomicU64, Ordering}; use std::time::{SystemTime, UNIX_EPOCH}; -use rhema_agent_tools::{AllowAll, ExpandPastes, ShellTools, revive_dangling_calls}; use rhema_autonomous_agent::{Allowlist, Handler, ResolverChain, SessionContext, async_trait}; +use rhema_bash::{AllowAll, ShellTools}; use rhema_core::{ Agent, ChatParams, Content, Event as ModelEvent, EventSink, Image, ImageMediaType, Message, - ModelProvider, Role, Session, ToolContext, ToolResolver, close_orphaned_calls, run_turn, + ModelProvider, Role, Session, ToolContext, ToolResolver, close_orphaned_calls, + revive_dangling_calls, run_turn, }; use rhema_memory::{MemoryResolver, MemoryStore, Scope}; use rhema_rsd::{Dispatcher, Event, KeyFn, Outcome, ResourceKey}; @@ -234,7 +236,7 @@ pub struct InteractiveHandler { /// How many tool rounds one turn may run before it is cut off — the /// config's runaway guard for an agent meant to work unattended; a /// follow-up message keeps going. - max_turn_steps: u32, + max_turn_steps: NonZeroU32, /// The extension set the tool half of the chain is cut from, per /// dispatch, in the standard set's order — the same set whose /// sources the daemon's tick drives and whose boot pass runs first. @@ -243,7 +245,7 @@ pub struct InteractiveHandler { /// decorator refreshes it per request, `zoom` reads it, and it /// lives here — the agent rebuilds per dispatch, the log must not. transcript_mirror: Option>>, - /// The wired [`vision`](rhema_agent_tools::vision) section for the + /// The wired [`vision`](rhema_bash::vision) section for the /// prompt, when provisioning succeeded — the same wiring whose env /// map lights the shell's inbox up. vision: Option, @@ -271,7 +273,7 @@ impl InteractiveHandler { hub: Arc, notifications: Arc, attachments: Arc, - max_turn_steps: u32, + max_turn_steps: NonZeroU32, extensions: Arc, transcript: bool, ) -> Self { @@ -280,7 +282,7 @@ impl InteractiveHandler { // chat's commands, and its staged images attach to their // results. Local shells only — the interactive handler's // executor is this host's by construction. - let vision = rhema_agent_tools::vision::wire(std::env::var_os("BASH_ENV")); + let vision = rhema_bash::vision::wire(std::env::var_os("BASH_ENV")); let tools = Arc::new(match vision { Some(wiring) => ShellTools::with_env(&workspace, &wiring.shell_env), None => ShellTools::new(&workspace), @@ -328,12 +330,7 @@ impl InteractiveHandler { /// request advertises. fn agent(&self, key: &ResourceKey) -> Result { let (provider, model) = self.backends.current(); - // Chat input may carry embedded pastes — the compact chip form - // the UIs mint and the session keeps — so the provider wraps in - // the same expansion the coding driver wraps its own with: the - // model sees plain text, the transcript keeps the chips. - let provider: Arc = Arc::new(ExpandPastes::new(provider)); - // The view rides outside the expansion: stubs, whole messages, + // The view rides outside the engine: stubs, whole messages, // and zoom output all show the text the model would have seen. let provider: Arc = match &self.transcript_mirror { Some(mirror) => Arc::new(rhema_transcript::TranscriptView::new( @@ -575,10 +572,17 @@ impl InteractiveHandler { // future at its current await — a streaming request, or a // running shell command, whose child dies with the drop. The // next round revives whatever committed before the drop. + // Chat input may carry embedded pastes — the compact chip form + // the UIs mint — migrated here into the plain record the engine + // and its providers read: the payload sits in the text, its span + // note survives the checkpoint, and the model never sees a mark. + let mut turn_input = [Message::text_with_images(Role::User, input, core_images)]; + rhema_core::paste::migrate(&mut turn_input); + let [turn_input] = turn_input; let mut turn = Box::pin(run_turn( &mut agent, &mut session, - Message::text_with_images(Role::User, input, core_images), + turn_input, &mut sink, &tools, self.max_turn_steps, @@ -722,8 +726,16 @@ enum Round { fn restore_session(stashed: &Value, key: &str) -> Result { match stashed { Value::Null => Ok(Session::default()), - stashed => serde_json::from_value(stashed.clone()) - .map_err(|err| format!("stashed session for {key} does not parse: {err}")), + stashed => { + let mut session: Session = serde_json::from_value(stashed.clone()) + .map_err(|err| format!("stashed session for {key} does not parse: {err}"))?; + // A session stashed before paste spans existed carries the + // embedded form in its prompts; the provider must never see + // a mark. One rewrite on the way in, chips survive as the + // span note — the same pass the driver's from_session runs. + rhema_core::paste::migrate(&mut session.history); + Ok(session) + } } } @@ -837,6 +849,10 @@ impl EventSink for HubSink { | ModelEvent::Usage(_) | ModelEvent::RetryWait { .. } | ModelEvent::StepEnd { .. } => return, + // The engine's event enum is non-exhaustive: a future + // event arrives here, dropped like the rest of the engine's + // own bookkeeping until a turn-event shape exists for it. + _ => return, }; self.hub.emit(&self.key, turn); } @@ -1186,6 +1202,7 @@ mod tests { args, provider_data: serde_json::Value::Null, })], + annotations: Default::default(), }, stop_reason: StopReason::ToolUse, usage: Usage::default(), @@ -1387,11 +1404,13 @@ mod tests { Content::Text("on it".into()), Content::Text(" — done.".into()), ], + annotations: Default::default(), }; assert_eq!(final_text(&message).as_deref(), Some("on it — done.")); let empty = Message { role: Role::Assistant, content: vec![Content::Text(" ".into())], + annotations: Default::default(), }; assert_eq!(final_text(&empty), None); } @@ -1502,6 +1521,42 @@ mod tests { assert!(err.contains("does not parse"), "{err}"); } + /// A session stashed before paste spans existed carries the embedded + /// form in its prompts; the restore pass rewrites it so a provider + /// never sees a mark, and the chip rides as the span note instead. + #[test] + fn a_legacy_stash_is_migrated_on_restore() { + let payload = "l1\nl2\nl3"; + let embedded = format!("review this:\u{FFFC}{payload}\u{FFFC} please"); + let stashed = json!({ + "history": [ + { + "role": "user", + "content": [embedded] + } + ], + "driver_state": serde_json::Value::Null + }); + let session = restore_session(&stashed, "interactive:web").expect("the legacy stash loads"); + assert_eq!( + final_text(&session.history[0]), + Some(format!("review this:{payload} please")), + "the mark and its payload land as plain text" + ); + let text = final_text(&session.history[0]).expect("the prompt is text"); + // The chip rides as the span note: one span, over exactly the + // payload's range, and no mark survives the restore. + assert_eq!( + rhema_core::paste::spans(&session.history[0]).as_slice(), + &[rhema_core::paste::PasteSpan { + start: "review this:".len(), + end: "review this:".len() + payload.len(), + lines: 3, + }] + ); + assert!(!text.contains('\u{FFFC}'), "no mark survives the restore"); + } + /// The full dispatch, in-process: one message in, one scripted reply /// out, the turn streamed through the hub, the conversation stashed. #[tokio::test] diff --git a/crates/rhema-claw/src/jobs.rs b/crates/rhema-claw/src/jobs.rs index 4829f87..509e019 100644 --- a/crates/rhema-claw/src/jobs.rs +++ b/crates/rhema-claw/src/jobs.rs @@ -13,7 +13,7 @@ //! instance and job resolve through the store, the workspace is the //! instance's path, the session blob (or a fresh agent) is loaded, the //! allowlist is permissive exactly as the forge path's — and then one -//! `CodingAgent` turn runs. The final text lands in the job row and +//! `HostAgent` turn runs. The final text lands in the job row and //! the user's notifications; the turn itself streams nowhere, its //! observability is the stderr tool log. //! @@ -22,12 +22,13 @@ //! fails before any model call. The trust boundary is unchanged from //! the forge path — the bearer-gated surface and the instance list. +use std::num::NonZeroU32; use std::sync::Arc; -use rhema_agent_tools::ShellTools; use rhema_autonomous_agent::{Handler, SessionContext, Source, SourceError, async_trait}; -use rhema_coding_agent::{AllowAll, CodingAgent, CodingAgentConfig}; +use rhema_bash::{AllowAll, ShellTools}; use rhema_core::{Event as ModelEvent, EventSink}; +use rhema_host_agent::{HostAgent, HostAgentConfig}; use rhema_rsd::{Dispatcher, Event, KeyFn, Outcome, ResourceKey}; use crate::backends::BackendRegistry; @@ -139,7 +140,7 @@ pub struct CodingJobHandler { backends: Arc, store: Arc, notifications: Arc, - max_turn_steps: u32, + max_turn_steps: NonZeroU32, /// Whether the jobs run the bounded request view (the config's /// `transcript`, on unless set false). transcript: bool, @@ -156,7 +157,7 @@ impl CodingJobHandler { backends: Arc, store: Arc, notifications: Arc, - max_turn_steps: u32, + max_turn_steps: NonZeroU32, transcript: bool, ) -> Self { Self { @@ -229,7 +230,7 @@ impl CodingJobHandler { Some(sandbox) => sandbox.workspace_for(&workspace), None => workspace.clone(), }; - let mut config = CodingAgentConfig::new(provider, model, &display, AllowAll); + let mut config = HostAgentConfig::new(provider, model, &display, AllowAll); config.max_turn_steps = self.max_turn_steps; // A job's stashed session carries across runs and only ever // grows; the view is what keeps a repeat run's steps cheap. @@ -263,9 +264,9 @@ impl CodingJobHandler { self.fail(job_id, &instance_name, &reason); reason })?; - CodingAgent::from_session(config, session) + HostAgent::from_session(config, session) } - None => CodingAgent::new(config), + None => HostAgent::new(config), } .map_err(|err| { let reason = format!("cannot start the coding agent for {instance_name:?}: {err}"); @@ -275,7 +276,7 @@ impl CodingJobHandler { // Commit-before-execute rides the dispatcher exactly as the // forge handler's does: the intent is in the store before the // first tool runs, and a crash-left dangling call revives at - // turn entry (CodingAgent::turn's own revive, over the resumed + // turn entry (HostAgent::turn's own revive, over the resumed // session). agent.set_commit_hook(Some(ctx.commit_hook())); @@ -307,7 +308,7 @@ impl CodingJobHandler { Ok(Outcome::Handled) } - fn save_session(&self, instance: &str, agent: &CodingAgent) { + fn save_session(&self, instance: &str, agent: &HostAgent) { match serde_json::to_string(agent.session()) { Ok(blob) => { let _ = self.store.save_session(instance, &blob); @@ -387,7 +388,13 @@ mod tests { BackendRegistry::new(vec![Backend::headless("mock", provider)], None) .expect("a single mock backend always constructs"), ); - CodingJobHandler::new(backends, store, notifications, 16, true) + CodingJobHandler::new( + backends, + store, + notifications, + NonZeroU32::new(16).unwrap(), + true, + ) } fn reply(text: &str) -> ModelOutput { diff --git a/crates/rhema-claw/src/main.rs b/crates/rhema-claw/src/main.rs index 1f21bcf..a98f154 100644 --- a/crates/rhema-claw/src/main.rs +++ b/crates/rhema-claw/src/main.rs @@ -74,9 +74,9 @@ async fn main() { } if let Some(Command::Vision { args: rest }) = &args.command { let mut argv = Vec::with_capacity(rest.len() + 1); - argv.push(std::ffi::OsString::from(rhema_agent_tools::vision::MODE)); + argv.push(std::ffi::OsString::from(rhema_bash::vision::MODE)); argv.extend(rest.iter().cloned()); - std::process::exit(rhema_agent_tools::vision::cli_run(&argv)); + std::process::exit(rhema_bash::vision::cli_run(&argv)); } if let Err(err) = run(args).await { eprintln!("error: {err}"); diff --git a/crates/rhema-claw/src/mcp.rs b/crates/rhema-claw/src/mcp.rs index c55f275..e575852 100644 --- a/crates/rhema-claw/src/mcp.rs +++ b/crates/rhema-claw/src/mcp.rs @@ -9,7 +9,7 @@ use std::collections::BTreeSet; use std::sync::{Arc, OnceLock}; -use rhema_coding_agent::CodingAgentConfig; +use rhema_host_agent::HostAgentConfig; /// What one wiring produced, held for the process. struct Wired { @@ -61,7 +61,7 @@ fn wired() -> Option<&'static Wired> { /// init file, the socket, the token), the prompt's `mcp` lines, and /// the persisted off switch. A frontend without wiring changes /// nothing. -pub(crate) fn apply(config: &mut CodingAgentConfig) { +pub(crate) fn apply(config: &mut HostAgentConfig) { let Some(wired) = wired() else { return; }; @@ -82,11 +82,11 @@ mod tests { /// same map). #[test] fn apply_without_any_wiring_leaves_the_config_alone() { - let mut config = CodingAgentConfig::new( + let mut config = HostAgentConfig::new( rhema_core::mock::MockProvider::new([]), "m", std::path::Path::new("/tmp"), - rhema_agent_tools::AllowAll, + rhema_bash::AllowAll, ); let before = config.shell_env.clone(); apply(&mut config); diff --git a/crates/rhema-claw/src/mock.rs b/crates/rhema-claw/src/mock.rs index 36c3602..158f2c6 100644 --- a/crates/rhema-claw/src/mock.rs +++ b/crates/rhema-claw/src/mock.rs @@ -65,6 +65,7 @@ impl ModelProvider for MockLoop { message: Message { role: Role::Assistant, content: vec![Content::Text(text)], + annotations: Default::default(), }, stop_reason: StopReason::EndTurn, usage: Usage::default(), diff --git a/crates/rhema-claw/src/sandbox.rs b/crates/rhema-claw/src/sandbox.rs index fba47ca..1262f5a 100644 --- a/crates/rhema-claw/src/sandbox.rs +++ b/crates/rhema-claw/src/sandbox.rs @@ -22,7 +22,7 @@ use std::time::Duration; use async_trait::async_trait; use base64::Engine as _; -use rhema_agent_tools::exec::{Executed, ShellError, ShellExecutor, default_executor_with}; +use rhema_bash::exec::{Executed, ShellError, ShellExecutor, default_executor_with}; use rhema_sandbox::{ExecRequest, Sandbox, ShellSandbox, WorkspaceSeed}; use rhema_sandbox_http::HttpSandbox; use serde::{Deserialize, Serialize}; @@ -373,6 +373,9 @@ fn protocol_error(err: rhema_sandbox::SandboxError) -> ShellError { rhema_sandbox::SandboxError::Timeout(secs) => ShellError::Timeout(secs), rhema_sandbox::SandboxError::Unavailable(message) | rhema_sandbox::SandboxError::Failed(message) => ShellError::Failed(message), + // The error enum is non-exhaustive: an unknown failure is still + // a failure, reported in-band with its own text. + _ => ShellError::Failed(err.to_string()), } } diff --git a/crates/rhema-claw/src/vision.rs b/crates/rhema-claw/src/vision.rs index f1e8a08..b81f8fc 100644 --- a/crates/rhema-claw/src/vision.rs +++ b/crates/rhema-claw/src/vision.rs @@ -9,21 +9,15 @@ #![forbid(unsafe_code)] -use std::sync::{Arc, OnceLock}; +use std::sync::Arc; -use rhema_coding_agent::CodingAgentConfig; +use rhema_host_agent::HostAgentConfig; -static WIRED: OnceLock>> = OnceLock::new(); - -/// The daemon's wiring, established at first use and kept for the -/// process's life. `None` only when provisioning failed, cached like -/// every answer this static gives. -pub(crate) fn wired() -> Option<&'static Arc> { - WIRED - .get_or_init(|| { - rhema_agent_tools::vision::wire(std::env::var_os("BASH_ENV")).map(Arc::clone) - }) - .as_ref() +/// The daemon's wiring, provisioned at first use and kept for the +/// process's life — the toolkit's own process-wide cache holds it, so +/// `None` only when provisioning failed, and a failure does not retry. +pub(crate) fn wired() -> Option<&'static Arc> { + rhema_bash::vision::wire(std::env::var_os("BASH_ENV")) } /// The init file a later provisioner chains through — `None` when the @@ -36,7 +30,7 @@ pub(crate) fn init_path() -> Option { /// Layers the wiring onto one agent config: the shell env map (the /// init file, the binary, the staging directory) and the prompt's /// vision section. A frontend without wiring changes nothing. -pub(crate) fn apply(config: &mut CodingAgentConfig) { +pub(crate) fn apply(config: &mut HostAgentConfig) { let Some(wired) = wired() else { return; }; @@ -52,11 +46,11 @@ mod tests { /// values are constants, so extending twice is the same map. #[test] fn apply_twice_is_apply_once() { - let mut config = CodingAgentConfig::new( + let mut config = HostAgentConfig::new( rhema_core::mock::MockProvider::new([]), "m", std::path::Path::new("/tmp"), - rhema_agent_tools::AllowAll, + rhema_bash::AllowAll, ); apply(&mut config); let once = config.shell_env.clone(); diff --git a/crates/rhema-claw/tests/http.rs b/crates/rhema-claw/tests/http.rs index 56d7952..06b8ac3 100644 --- a/crates/rhema-claw/tests/http.rs +++ b/crates/rhema-claw/tests/http.rs @@ -34,6 +34,7 @@ fn reply(text: &str) -> ModelOutput { fn tool_call(id: &str, name: &str, args: Value) -> ModelOutput { ModelOutput { message: Message { + annotations: Default::default(), role: Role::Assistant, content: vec![Content::ToolCall(rhema_core::ToolCall { id: id.to_owned(), diff --git a/deploy/helm/rhema-claw/Chart.yaml b/deploy/helm/rhema-claw/Chart.yaml index 89690b2..ce61d4b 100644 --- a/deploy/helm/rhema-claw/Chart.yaml +++ b/deploy/helm/rhema-claw/Chart.yaml @@ -3,5 +3,5 @@ name: rhema-claw description: "The resident forge-watching agent daemon: forge watches and a chat HTTP surface over one SQLite store." type: application -version: 0.3.0 -appVersion: "0.3.0" +version: 0.4.0 +appVersion: "0.4.0" diff --git a/integrations/rhema-calendar-integration/Cargo.toml b/integrations/rhema-calendar-integration/Cargo.toml index 2232f98..f002fba 100644 --- a/integrations/rhema-calendar-integration/Cargo.toml +++ b/integrations/rhema-calendar-integration/Cargo.toml @@ -15,10 +15,10 @@ publish = false rusqlite = { version = "0.40", features = ["bundled"] } # The reminder source: one `Source` over the feeds, detect-pass shaped # like the task scheduler's -rhema-autonomous-agent = "0.3.0" +rhema-autonomous-agent = "0.4.0" # The reminder source ingests its slots into a `Dispatcher`; the event # and key-function shapes are the dispatcher's -rhema-rsd = "0.3.0" +rhema-rsd = "0.4.0" serde = { workspace = true } serde_json = { workspace = true } thiserror = { workspace = true } diff --git a/integrations/rhema-forge-integration/Cargo.toml b/integrations/rhema-forge-integration/Cargo.toml index 024d3e9..dfc22e6 100644 --- a/integrations/rhema-forge-integration/Cargo.toml +++ b/integrations/rhema-forge-integration/Cargo.toml @@ -13,7 +13,7 @@ publish = false [dependencies] # The dispatch seam: watches ingest into a Dispatcher -rhema-rsd = "0.3.0" +rhema-rsd = "0.4.0" serde = { workspace = true } serde_json = { workspace = true } thiserror = { workspace = true }