Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed Cargo.lock,crates/openhuman-core/src/cron/client.rs

Steven Enamakel8ee6f5c9e60c
diff --git a/Cargo.lock b/Cargo.lock
index 56d5f5fca5..e6b832500e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -266,7 +266,7 @@ version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
- "windows-sys 0.60.2",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -277,7 +277,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
- "windows-sys 0.60.2",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -317,7 +317,7 @@ dependencies = [
"objc2-foundation 0.3.2",
"parking_lot",
"percent-encoding",
- "windows-sys 0.60.2",
+ "windows-sys 0.52.0",
"x11rb",
]
@@ -1060,7 +1060,7 @@ dependencies = [
"cap-primitives",
"cap-std",
"io-lifetimes 3.0.1",
- "windows-sys 0.60.2",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -1077,7 +1077,7 @@ dependencies = [
"maybe-owned",
"rustix 1.1.5",
"rustix-linux-procfs",
- "windows-sys 0.60.2",
+ "windows-sys 0.61.2",
"winx",
]
@@ -2218,7 +2218,7 @@ dependencies = [
"libc",
"option-ext",
"redox_users 0.5.2",
- "windows-sys 0.60.2",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -2494,7 +2494,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
- "windows-sys 0.60.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -3786,7 +3786,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20fd6de4ccfcc187e38bc21cfa543cb5a302cb86a8b114eb7f0bf0dc9f8ac00f"
dependencies = [
"io-lifetimes 3.0.1",
- "windows-sys 0.60.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -4841,7 +4841,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
- "windows-sys 0.60.2",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -6510,7 +6510,7 @@ dependencies = [
"once_cell",
"socket2",
"tracing",
- "windows-sys 0.60.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -7145,7 +7145,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.12.1",
- "windows-sys 0.60.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -7214,7 +7214,7 @@ dependencies = [
"security-framework 3.7.0",
"security-framework-sys",
"webpki-root-certs",
- "windows-sys 0.60.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -7859,7 +7859,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4"
dependencies = [
"libc",
- "windows-sys 0.60.2",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -8206,10 +8206,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
dependencies = [
"fastrand",
- "getrandom 0.4.3",
+ "getrandom 0.3.4",
"once_cell",
"rustix 1.1.5",
- "windows-sys 0.60.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -8222,7 +8222,7 @@ dependencies = [
"parking_lot",
"rustix 1.1.5",
"signal-hook",
- "windows-sys 0.60.2",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -9031,7 +9031,7 @@ dependencies = [
[[package]]
name = "tinyflows"
-version = "0.8.21"
+version = "0.8.22"
dependencies = [
"async-trait",
"futures-timer",
@@ -11304,7 +11304,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
- "windows-sys 0.60.2",
+ "windows-sys 0.48.0",
]
[[package]]
diff --git a/crates/openhuman-core/src/cron/client.rs b/crates/openhuman-core/src/cron/client.rs
index aef0e1f14b..e49f398683 100644
--- a/crates/openhuman-core/src/cron/client.rs
+++ b/crates/openhuman-core/src/cron/client.rs
@@ -58,6 +58,27 @@ async fn store_config(config: &Config, scope: &DocScope) -> Result<StoreConfig>
})
}
+/// `operation` as the module's JSON.
+///
+/// `CronJobPatch.agent_id` is `Option<Option<_>>` whose deserializer reads a
+/// present `null` as "clear the agent definition", but through tinyflows
+/// v0.8.22 the serializer writes `null` for an untouched field, so every patch
+/// sent over the bus would clear it. Until the contract skips the field when
+/// unset (fix on tinyflows branch `agent-id-patch-fix`), an untouched
+/// `agent_id` is dropped from the wire here; only an explicit clear
+/// (`Some(None)`) keeps its `null`.
+fn wire_operation(operation: &StoreOperation) -> Result<Value> {
+ let mut wire = serde_json::to_value(operation)?;
+ if let StoreOperation::Update { patch, .. } = operation {
+ if patch.agent_id.is_none() {
+ if let Some(patch) = wire.get_mut("patch").and_then(Value::as_object_mut) {
+ patch.remove("agent_id");
+ }
+ }
+ }
+ Ok(wire)
+}
+
/// Run one store operation in `scope` and decode its reply.
pub(crate) async fn store_in<R: DeserializeOwned>(
config: &Config,
@@ -66,7 +87,7 @@ pub(crate) async fn store_in<R: DeserializeOwned>(
) -> Result<R> {
let request = StoreRequest {
storage: store_config(config, scope).await?,
- operation: serde_json::to_value(&operation)?,
+ operation: wire_operation(&operation)?,
};
let value: Value = call(config, members::SCHEDULE_STORE, (request,)).await?;
serde_json::from_value(value).map_err(|error| {