forked from vhaudiquet/rhema-claw
build: move the claw to rhema 0.3.0
The framework releases 0.3.0, so every rhema dependency moves with it: the workspace version, the daemon's crates, and the two integrations. The only new transitive package is webpki-roots, pulled by the provider crates' TLS stack. The agent constructors changed shape. CodingAgentConfig::new takes the provider, model, workspace, and approval, and keeps both handles: CodingAgent::new and CodingAgent::from_session take the config alone, and turn no longer takes an approval argument. The claw's forge and job paths build one config each and pass AllowAll there, the policy every turn ran under before. The vision and mcp tests build their config through the same constructor, so they hand it a MockProvider. fmt, clippy with -D warnings, the workspace tests, and a locked check pass.
This commit is contained in:
1 parent
c56f544993
commit
68671c76ce
9 files changed
+104
-75
No files matched your search
Generated
+57
-44
@@ -1079,6 +1079,7 @@ dependencies = [
|
|||||||
"tokio",
|
"tokio",
|
||||||
"tokio-rustls",
|
"tokio-rustls",
|
||||||
"tower-service",
|
"tower-service",
|
||||||
|
"webpki-roots",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1791,9 +1792,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-agent-tools"
|
name = "rhema-agent-tools"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "839fa542e680de80f25876d6f54ea45dbace72a89d5f63f52c4423e54f048f82"
|
checksum = "dec3e06eef5c867bb8bc1f2170b5f6f46a6248f52428a25d2bf50f7573adb389"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
@@ -1808,9 +1809,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-autonomous-agent"
|
name = "rhema-autonomous-agent"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2e3ee50c812fa93f31be669557cb642ed8d03154613234b2090fa9567374516e"
|
checksum = "5234ec887bccf0175975fed5ae18ae53d2801146c8e229756eac09192ae9d7b8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"rhema-core",
|
"rhema-core",
|
||||||
@@ -1824,7 +1825,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-calendar-integration"
|
name = "rhema-calendar-integration"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"quick-xml",
|
"quick-xml",
|
||||||
@@ -1843,7 +1844,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-claw"
|
name = "rhema-claw"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
@@ -1879,7 +1880,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-claw-tools-contract"
|
name = "rhema-claw-tools-contract"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@@ -1888,9 +1889,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-coding-agent"
|
name = "rhema-coding-agent"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5b5ef3b970ced4f05b4d18b9df56ca6a46bb488af7579f8d3c4a10788ca47761"
|
checksum = "a5fa7ca082f52429c159addd7cdd036ddc7aa69161ed82004bb480a2e3ae46d1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"minijinja",
|
"minijinja",
|
||||||
"rhema-agent-tools",
|
"rhema-agent-tools",
|
||||||
@@ -1905,22 +1906,23 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-config"
|
name = "rhema-config"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "efd98e6c5dd53a6e30367ae4c259ea03e5d214962aae9c1d66ab03f464487988"
|
checksum = "8c96cd6da28edeb36b8251a7a8129117ec0afa3f5851a0a6d904c10d67fbaa84"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"keyring",
|
"keyring",
|
||||||
"rhema-core",
|
"rhema-core",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_json",
|
||||||
"serde_yaml",
|
"serde_yaml",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-core"
|
name = "rhema-core"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b399005d398dd0dca791415a07f6280bacebc0aedfa84f9d3a29640f45f91144"
|
checksum = "8ac339e3dcd9c379d44c5580ac74075e338e6fce7e79c6e4fefe11fc26a3e10f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -1930,7 +1932,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-forge-integration"
|
name = "rhema-forge-integration"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
@@ -1944,9 +1946,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-identity"
|
name = "rhema-identity"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7f9355d075f5ff5800f9b6b4216e65ba087f681716bc0faf69986852eb13be26"
|
checksum = "6b9ced20fc75671b29e49890c6e7f0b5db88f6ad4b43629ee089face88bce633"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rusqlite",
|
"rusqlite",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -1955,9 +1957,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-mcp"
|
name = "rhema-mcp"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "efb7dff3b33b3931c9da4ea6577e55f41c820cf5b2b880b06b8581f15673e06e"
|
checksum = "0c96a292b7da4db6334e0dda5d25d25c2dc0e1058cc0e07df49ca3f28944beff"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-stream",
|
"async-stream",
|
||||||
"axum",
|
"axum",
|
||||||
@@ -1967,6 +1969,7 @@ dependencies = [
|
|||||||
"futures-util",
|
"futures-util",
|
||||||
"http-body-util",
|
"http-body-util",
|
||||||
"hyper",
|
"hyper",
|
||||||
|
"hyper-rustls",
|
||||||
"hyper-util",
|
"hyper-util",
|
||||||
"mcp-to-cli",
|
"mcp-to-cli",
|
||||||
"rhema-agent-tools",
|
"rhema-agent-tools",
|
||||||
@@ -1980,9 +1983,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-memory"
|
name = "rhema-memory"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a5a0f161c473ae19dc161a1ad898603150ec6be081f24262182e15ea348db3b5"
|
checksum = "8fcc03d8df84af15c992fd4f317fce11735a824853e40c2d674dff394a952d78"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"rhema-core",
|
"rhema-core",
|
||||||
@@ -1994,9 +1997,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-provider"
|
name = "rhema-provider"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d178053a9d5400cf001109670f2294e427ded6cb895b235b4f4ffc2bc20f2f09"
|
checksum = "c9500c59a8661c16e80ece7525180fe44d553eab2a3e57751194d7a8f138ea6b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
@@ -2009,9 +2012,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-provider-anthropic"
|
name = "rhema-provider-anthropic"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fc26ff01350bab0fb10a53fc11665dca939c3fda2ec1a3df93912a39b3fc8b0c"
|
checksum = "76136cc125a6a03f0db760879c3a417ea56298c1130d20d106f2716cbfe7d031"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@@ -2025,9 +2028,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-provider-chatgpt"
|
name = "rhema-provider-chatgpt"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fb807b39e95c49d2a5e8c101220ac34a9d6770aece6bece1eebcf8113b1811a2"
|
checksum = "38088d5cfa5bb85e6641bd8986757237fab33c8d3ebd86cbc53ef5d88e1af5d4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
@@ -2044,9 +2047,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-provider-copilot"
|
name = "rhema-provider-copilot"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "98cc6f041cb328de999c17abc34d3e050d586a2390d32ec9ae5fa543bd177fa0"
|
checksum = "43ed3942ab1a1ea1a00d082ab85e86ee5607e4718b0ad219a4e9ba9090a302da"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@@ -2062,9 +2065,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-provider-google"
|
name = "rhema-provider-google"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "99cbbb477a94d995b09a3154288a0f5f10aee22fd35bc1d1145bbffee27ea388"
|
checksum = "bad86c3e875e59f166c08e144d9cecd0edd0d445a26472e65dbe0d1bdb6efc44"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@@ -2078,9 +2081,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-provider-llama-cpp"
|
name = "rhema-provider-llama-cpp"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5e3491fcb305e448492868473c6a146575174bdbb7ab328c85bf43a698052f56"
|
checksum = "6d9dd148f53af3a2dbd811da63cd8519130bbc4191af0b44fb23818ca0d82b6f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@@ -2095,9 +2098,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-provider-openai-compatible"
|
name = "rhema-provider-openai-compatible"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "98976f2fd5f8f09e5838405f53e2b9f113a5e9d2ed3823a80117f4919f0249a6"
|
checksum = "7347b2f056473170a4bf5d7d43fa06892a3b2139eb727a580474ce9bd78f436c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@@ -2111,9 +2114,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-provider-opencode"
|
name = "rhema-provider-opencode"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b9f6cc7db60525e63712ec2b66881cd57f3bb7b7b8c14001eebf86f64030302a"
|
checksum = "29823bcfc72d76d5e75bd5c2831a2e7ee07bcbd20598fab2694802652b85a706"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
@@ -2126,9 +2129,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-provider-openrouter"
|
name = "rhema-provider-openrouter"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6ca68e90f9627c58e0908e52e010bd7c47e498290c40358c2ff326e95a9a20cc"
|
checksum = "488f07952b81a5b20b7acad0d80c2ec28b0fb51f78cc4e878bc183a48f71c32c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@@ -2142,9 +2145,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-provider-registry"
|
name = "rhema-provider-registry"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e8f6b0b10943f6fa4272490acc3c33040944d85490971a8a1acc8515d704bfc2"
|
checksum = "3c3d7af90727ea9319a7553726653d0f3908ac9786d25c7ab75b832e4f93bf52"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rhema-core",
|
"rhema-core",
|
||||||
"rhema-provider",
|
"rhema-provider",
|
||||||
@@ -2161,9 +2164,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-rsd"
|
name = "rhema-rsd"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c1e05417b86144a2a0dbad3018a73c0b2376b5fec378676aea6b912678b059f6"
|
checksum = "a163669ba8f439389e0cb4b73c72b26d0b3ccd08b414283f577af9a0b69890ba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rhema-core",
|
"rhema-core",
|
||||||
"rusqlite",
|
"rusqlite",
|
||||||
@@ -2174,9 +2177,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rhema-transcript"
|
name = "rhema-transcript"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b00234b8879bd894f0a45a1fd804c94c7cc3d31ea9f5361609041cb42587a719"
|
checksum = "ee0104c104a9a476d7b246e36c5d7f795568afbae5dbb74f5787580ef2af61d7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"rhema-core",
|
"rhema-core",
|
||||||
@@ -2244,6 +2247,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
|
checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
|
"ring",
|
||||||
"rustls-pki-types",
|
"rustls-pki-types",
|
||||||
"rustls-webpki",
|
"rustls-webpki",
|
||||||
"subtle",
|
"subtle",
|
||||||
@@ -3032,6 +3036,15 @@ dependencies = [
|
|||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "webpki-roots"
|
||||||
|
version = "1.0.12"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7265c9301c16a8711c992c2d8da90ee77ef54b1ed51482d6dfeb00dc756b1297"
|
||||||
|
dependencies = [
|
||||||
|
"rustls-pki-types",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-link"
|
name = "windows-link"
|
||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ resolver = "2"
|
|||||||
members = ["crates/*", "integrations/*"]
|
members = ["crates/*", "integrations/*"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.89"
|
rust-version = "1.89"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
@@ -27,28 +27,28 @@ mock = ["rhema-core/mock"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
# The shared toolkit: the resident agent assembles its agent from the
|
# The shared toolkit: the resident agent assembles its agent from the
|
||||||
# shell, the approval seam, paste expansion, and revive-on-resume
|
# shell, the approval seam, paste expansion, and revive-on-resume
|
||||||
rhema-agent-tools = "0.2.3"
|
rhema-agent-tools = "0.3.0"
|
||||||
rhema-autonomous-agent = "0.2.3"
|
rhema-autonomous-agent = "0.3.0"
|
||||||
rhema-coding-agent = "0.2.3"
|
rhema-coding-agent = "0.3.0"
|
||||||
rhema-config = "0.2.3"
|
rhema-config = "0.3.0"
|
||||||
rhema-core = "0.2.3"
|
rhema-core = "0.3.0"
|
||||||
# The bounded request view over the claw sessions, on by default here
|
# The bounded request view over the claw sessions, on by default here
|
||||||
rhema-transcript = "0.2.3"
|
rhema-transcript = "0.3.0"
|
||||||
rhema-calendar-integration = { path = "../../integrations/rhema-calendar-integration" }
|
rhema-calendar-integration = { path = "../../integrations/rhema-calendar-integration" }
|
||||||
rhema-forge-integration = { path = "../../integrations/rhema-forge-integration" }
|
rhema-forge-integration = { path = "../../integrations/rhema-forge-integration" }
|
||||||
# The accounts layer: identities hold the forge tokens the watches poll
|
# The accounts layer: identities hold the forge tokens the watches poll
|
||||||
# with, and the identity tools manage them over chat
|
# with, and the identity tools manage them over chat
|
||||||
rhema-identity = "0.2.3"
|
rhema-identity = "0.3.0"
|
||||||
rhema-rsd = "0.2.3"
|
rhema-rsd = "0.3.0"
|
||||||
# The tool contract: the agent-token allowlist and version the auth
|
# The tool contract: the agent-token allowlist and version the auth
|
||||||
# middleware enforces (rhema-tools spec). The arrow runs claw ->
|
# middleware enforces (rhema-tools spec). The arrow runs claw ->
|
||||||
# contract only — never the reverse.
|
# contract only — never the reverse.
|
||||||
rhema-claw-tools-contract = { path = "../../tools/contract" }
|
rhema-claw-tools-contract = { path = "../../tools/contract" }
|
||||||
# The resident tier's durable memory: its tools join the resolver chain
|
# The resident tier's durable memory: its tools join the resolver chain
|
||||||
rhema-memory = "0.2.3"
|
rhema-memory = "0.3.0"
|
||||||
# The shared ModelCard the backend registry's listings return
|
# The shared ModelCard the backend registry's listings return
|
||||||
rhema-provider = "0.2.3"
|
rhema-provider = "0.3.0"
|
||||||
rhema-provider-registry = "0.2.3"
|
rhema-provider-registry = "0.3.0"
|
||||||
# Args for the two-flag binary surface
|
# Args for the two-flag binary surface
|
||||||
clap = { version = "4.5", features = ["derive"] }
|
clap = { version = "4.5", features = ["derive"] }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
@@ -71,7 +71,7 @@ time = { version = "0.3", default-features = false, features = ["parsing"] }
|
|||||||
# Inbound chat images ride base64; the dispatch decodes them into the
|
# Inbound chat images ride base64; the dispatch decodes them into the
|
||||||
# attachment store
|
# attachment store
|
||||||
base64 = "0.22"
|
base64 = "0.22"
|
||||||
rhema-mcp = "0.2.3"
|
rhema-mcp = "0.3.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempfile = "3"
|
tempfile = "3"
|
||||||
@@ -83,7 +83,7 @@ reqwest = { version = "0.12", features = ["json", "stream"] }
|
|||||||
bytes = "1"
|
bytes = "1"
|
||||||
# The scripted provider for turn-level tests; mirrors rhema-code's mock
|
# The scripted provider for turn-level tests; mirrors rhema-code's mock
|
||||||
# feature without a feature of our own — tests are the only consumer
|
# feature without a feature of our own — tests are the only consumer
|
||||||
rhema-core = { version = "0.2.3", features = ["mock"] }
|
rhema-core = { version = "0.3.0", features = ["mock"] }
|
||||||
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "sync", "time"] }
|
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "sync", "time"] }
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ impl ClawHandler {
|
|||||||
let prompt = build_prompt(&key, &snapshot, &news, workspace.as_path(), role);
|
let prompt = build_prompt(&key, &snapshot, &news, workspace.as_path(), role);
|
||||||
let mut sink = TurnSink;
|
let mut sink = TurnSink;
|
||||||
let output = agent
|
let output = agent
|
||||||
.turn(prompt, &mut sink, Arc::new(AllowAll))
|
.turn(prompt, &mut sink)
|
||||||
.await
|
.await
|
||||||
.map_err(|err| format!("turn for {key} failed: {err}"))?;
|
.map_err(|err| format!("turn for {key} failed: {err}"))?;
|
||||||
|
|
||||||
@@ -332,14 +332,14 @@ impl ClawHandler {
|
|||||||
key: &str,
|
key: &str,
|
||||||
) -> Result<CodingAgent, String> {
|
) -> Result<CodingAgent, String> {
|
||||||
let (provider, model) = self.backends.current();
|
let (provider, model) = self.backends.current();
|
||||||
let config = self.agent_config(&model, workspace);
|
let config = self.agent_config(provider, &model, workspace);
|
||||||
let agent = match &ctx.session.core.driver_state {
|
let agent = match &ctx.session.core.driver_state {
|
||||||
// A never-dispatched key carries no stash: start clean.
|
// A never-dispatched key carries no stash: start clean.
|
||||||
serde_json::Value::Null => CodingAgent::new(provider, config),
|
serde_json::Value::Null => CodingAgent::new(config),
|
||||||
stashed => {
|
stashed => {
|
||||||
let session: Session = serde_json::from_value(stashed.clone())
|
let session: Session = serde_json::from_value(stashed.clone())
|
||||||
.map_err(|err| format!("stashed session for {key} does not parse: {err}"))?;
|
.map_err(|err| format!("stashed session for {key} does not parse: {err}"))?;
|
||||||
CodingAgent::from_session(provider, config, session)
|
CodingAgent::from_session(config, session)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
agent.map_err(|err| format!("cannot start the coding agent for {key}: {err}"))
|
agent.map_err(|err| format!("cannot start the coding agent for {key}: {err}"))
|
||||||
@@ -349,8 +349,13 @@ impl ClawHandler {
|
|||||||
/// agent's, with the bounded request view when the config has it on.
|
/// agent's, with the bounded request view when the config has it on.
|
||||||
/// A forge thread answers for as long as the thread lives; without
|
/// A forge thread answers for as long as the thread lives; without
|
||||||
/// the view its history would ride whole on every step.
|
/// the view its history would ride whole on every step.
|
||||||
fn agent_config(&self, model: &str, workspace: &Path) -> CodingAgentConfig {
|
fn agent_config(
|
||||||
let mut config = CodingAgentConfig::new(model, workspace);
|
&self,
|
||||||
|
provider: Arc<dyn rhema_core::ModelProvider>,
|
||||||
|
model: &str,
|
||||||
|
workspace: &Path,
|
||||||
|
) -> CodingAgentConfig {
|
||||||
|
let mut config = CodingAgentConfig::new(provider, model, workspace, AllowAll);
|
||||||
// Write the resolved value, not an override: the coding agent's
|
// Write the resolved value, not an override: the coding agent's
|
||||||
// own default is on now, and the config's `false` must win.
|
// own default is on now, and the config's `false` must win.
|
||||||
config.transcript = self
|
config.transcript = self
|
||||||
@@ -1221,6 +1226,7 @@ mod tests {
|
|||||||
.expect("constructs"),
|
.expect("constructs"),
|
||||||
);
|
);
|
||||||
let accounts = Arc::new(rhema_identity::VolatileIdentityStore::new());
|
let accounts = Arc::new(rhema_identity::VolatileIdentityStore::new());
|
||||||
|
let provider = registry.current().0;
|
||||||
let on = ClawHandler::new(
|
let on = ClawHandler::new(
|
||||||
registry.clone(),
|
registry.clone(),
|
||||||
"/tmp/w",
|
"/tmp/w",
|
||||||
@@ -1238,12 +1244,12 @@ mod tests {
|
|||||||
std::collections::BTreeMap::new(),
|
std::collections::BTreeMap::new(),
|
||||||
);
|
);
|
||||||
assert!(
|
assert!(
|
||||||
on.agent_config("m", Path::new("/tmp/w"))
|
on.agent_config(provider.clone(), "m", Path::new("/tmp/w"))
|
||||||
.transcript
|
.transcript
|
||||||
.is_some()
|
.is_some()
|
||||||
);
|
);
|
||||||
assert!(
|
assert!(
|
||||||
off.agent_config("m", Path::new("/tmp/w"))
|
off.agent_config(provider, "m", Path::new("/tmp/w"))
|
||||||
.transcript
|
.transcript
|
||||||
.is_none()
|
.is_none()
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ impl CodingJobHandler {
|
|||||||
.map_err(|err| format!("job {job_id} could not start: {err}"))?;
|
.map_err(|err| format!("job {job_id} could not start: {err}"))?;
|
||||||
|
|
||||||
let (provider, model) = self.backends.current();
|
let (provider, model) = self.backends.current();
|
||||||
let mut config = CodingAgentConfig::new(model, &workspace);
|
let mut config = CodingAgentConfig::new(provider, model, &workspace, AllowAll);
|
||||||
config.max_turn_steps = self.max_turn_steps;
|
config.max_turn_steps = self.max_turn_steps;
|
||||||
// A job's stashed session carries across runs and only ever
|
// A job's stashed session carries across runs and only ever
|
||||||
// grows; the view is what keeps a repeat run's steps cheap.
|
// grows; the view is what keeps a repeat run's steps cheap.
|
||||||
@@ -236,9 +236,9 @@ impl CodingJobHandler {
|
|||||||
self.fail(job_id, &instance_name, &reason);
|
self.fail(job_id, &instance_name, &reason);
|
||||||
reason
|
reason
|
||||||
})?;
|
})?;
|
||||||
CodingAgent::from_session(provider, config, session)
|
CodingAgent::from_session(config, session)
|
||||||
}
|
}
|
||||||
None => CodingAgent::new(provider, config),
|
None => CodingAgent::new(config),
|
||||||
}
|
}
|
||||||
.map_err(|err| {
|
.map_err(|err| {
|
||||||
let reason = format!("cannot start the coding agent for {instance_name:?}: {err}");
|
let reason = format!("cannot start the coding agent for {instance_name:?}: {err}");
|
||||||
@@ -253,7 +253,7 @@ impl CodingJobHandler {
|
|||||||
agent.set_commit_hook(Some(ctx.commit_hook()));
|
agent.set_commit_hook(Some(ctx.commit_hook()));
|
||||||
|
|
||||||
let mut sink = JobSink;
|
let mut sink = JobSink;
|
||||||
let output = match agent.turn(&job.prompt, &mut sink, Arc::new(AllowAll)).await {
|
let output = match agent.turn(&job.prompt, &mut sink).await {
|
||||||
Ok(output) => output,
|
Ok(output) => output,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
let reason = format!("the coding turn for {instance_name:?} failed: {err}");
|
let reason = format!("the coding turn for {instance_name:?} failed: {err}");
|
||||||
|
|||||||
@@ -82,7 +82,12 @@ mod tests {
|
|||||||
/// same map).
|
/// same map).
|
||||||
#[test]
|
#[test]
|
||||||
fn apply_without_any_wiring_leaves_the_config_alone() {
|
fn apply_without_any_wiring_leaves_the_config_alone() {
|
||||||
let mut config = CodingAgentConfig::new("m", std::path::Path::new("/tmp"));
|
let mut config = CodingAgentConfig::new(
|
||||||
|
rhema_core::mock::MockProvider::new([]),
|
||||||
|
"m",
|
||||||
|
std::path::Path::new("/tmp"),
|
||||||
|
rhema_agent_tools::AllowAll,
|
||||||
|
);
|
||||||
let before = config.shell_env.clone();
|
let before = config.shell_env.clone();
|
||||||
apply(&mut config);
|
apply(&mut config);
|
||||||
// The wiring only appears when the machine's global mcp.yaml
|
// The wiring only appears when the machine's global mcp.yaml
|
||||||
|
|||||||
@@ -52,7 +52,12 @@ mod tests {
|
|||||||
/// values are constants, so extending twice is the same map.
|
/// values are constants, so extending twice is the same map.
|
||||||
#[test]
|
#[test]
|
||||||
fn apply_twice_is_apply_once() {
|
fn apply_twice_is_apply_once() {
|
||||||
let mut config = CodingAgentConfig::new("m", std::path::Path::new("/tmp"));
|
let mut config = CodingAgentConfig::new(
|
||||||
|
rhema_core::mock::MockProvider::new([]),
|
||||||
|
"m",
|
||||||
|
std::path::Path::new("/tmp"),
|
||||||
|
rhema_agent_tools::AllowAll,
|
||||||
|
);
|
||||||
apply(&mut config);
|
apply(&mut config);
|
||||||
let once = config.shell_env.clone();
|
let once = config.shell_env.clone();
|
||||||
apply(&mut config);
|
apply(&mut config);
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ publish = false
|
|||||||
rusqlite = { version = "0.40", features = ["bundled"] }
|
rusqlite = { version = "0.40", features = ["bundled"] }
|
||||||
# The reminder source: one `Source` over the feeds, detect-pass shaped
|
# The reminder source: one `Source` over the feeds, detect-pass shaped
|
||||||
# like the task scheduler's
|
# like the task scheduler's
|
||||||
rhema-autonomous-agent = "0.2.3"
|
rhema-autonomous-agent = "0.3.0"
|
||||||
# The reminder source ingests its slots into a `Dispatcher`; the event
|
# The reminder source ingests its slots into a `Dispatcher`; the event
|
||||||
# and key-function shapes are the dispatcher's
|
# and key-function shapes are the dispatcher's
|
||||||
rhema-rsd = "0.2.3"
|
rhema-rsd = "0.3.0"
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ publish = false
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# The dispatch seam: watches ingest into a Dispatcher
|
# The dispatch seam: watches ingest into a Dispatcher
|
||||||
rhema-rsd = "0.2.3"
|
rhema-rsd = "0.3.0"
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
|
|||||||
Reference in new issue
Block a user