diff --git a/Cargo.lock b/Cargo.lock index 2849f50..e2a4c40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1277,9 +1277,9 @@ dependencies = [ [[package]] name = "fluent-uri" -version = "0.3.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1918b65d96df47d3591bed19c5cca17e3fa5d0707318e4b5ef2eae01764df7e5" +checksum = "bc74ac4d8359ae70623506d512209619e5cf8f347124910440dbc221714b328e" dependencies = [ "borrow-or-share", "ref-cast", @@ -2093,21 +2093,21 @@ dependencies = [ [[package]] name = "jsonschema" -version = "0.33.0" +version = "0.37.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d46662859bc5f60a145b75f4632fbadc84e829e45df6c5de74cfc8e05acb96b5" +checksum = "73c9ffb2b5c56d58030e1b532d8e8389da94590515f118cf35b5cb68e4764a7e" dependencies = [ "ahash", - "base64", "bytecount", + "data-encoding", "email_address", "fancy-regex 0.16.2", "fraction", + "getrandom 0.3.4", "idna", "itoa", "num-cmp", "num-traits", - "once_cell", "percent-encoding", "referencing", "regex", @@ -2115,6 +2115,7 @@ dependencies = [ "reqwest", "serde", "serde_json", + "unicode-general-category", "uuid-simd", ] @@ -3245,13 +3246,14 @@ dependencies = [ [[package]] name = "referencing" -version = "0.33.0" +version = "0.37.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e9c261f7ce75418b3beadfb3f0eb1299fe8eb9640deba45ffa2cb783098697d" +checksum = "4283168a506f0dcbdce31c9f9cce3129c924da4c6bca46e46707fcb746d2d70c" dependencies = [ "ahash", "fluent-uri", - "once_cell", + "getrandom 0.3.4", + "hashbrown 0.16.1", "parking_lot", "percent-encoding", "serde_json", @@ -4835,6 +4837,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" +[[package]] +name = "unicode-general-category" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f" + [[package]] name = "unicode-ident" version = "1.0.22" @@ -4932,7 +4940,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b082222b4f6619906941c17eb2297fff4c2fb96cb60164170522942a200bd8" dependencies = [ "outref", - "uuid", "vsimd", ] diff --git a/crates/agent-registry/Cargo.toml b/crates/agent-registry/Cargo.toml index 612a325..cecc2f0 100644 --- a/crates/agent-registry/Cargo.toml +++ b/crates/agent-registry/Cargo.toml @@ -13,7 +13,7 @@ serde_json = "1.0" toml = "0.9" thiserror = "2.0" blake3 = "1.5" -jsonschema = "0.33" +jsonschema = "0.37" tracing = "0.1" [dev-dependencies] diff --git a/crates/agent-registry/src/schema.rs b/crates/agent-registry/src/schema.rs index 6a07d0e..d1df799 100644 --- a/crates/agent-registry/src/schema.rs +++ b/crates/agent-registry/src/schema.rs @@ -14,6 +14,7 @@ pub struct SchemaViolation { /// Error returned when compiling or applying a schema fails. #[derive(Debug, Error)] +#[non_exhaustive] pub enum SchemaValidationError { #[error("invalid schema: {0}")] InvalidSchema(String), @@ -41,11 +42,11 @@ pub fn validate_instance( fn schema_violation(err: ValidationError<'_>) -> SchemaViolation { SchemaViolation { - instance_path: err.instance_path.as_str().to_string(), - schema_path: err.schema_path.as_str().to_string(), + instance_path: err.instance_path().as_str().to_string(), + schema_path: err.schema_path().as_str().to_string(), message: err.to_string(), - kind: describe_kind(&err.kind), - value: err.instance.into_owned(), + kind: describe_kind(err.kind()), + value: err.instance().clone().into_owned(), } } diff --git a/crates/kb/Cargo.toml b/crates/kb/Cargo.toml index 994aed7..aacc3e4 100644 --- a/crates/kb/Cargo.toml +++ b/crates/kb/Cargo.toml @@ -14,7 +14,7 @@ rusqlite = { version = "0.37", features = ["bundled", "chrono", "backup"] } thiserror = "2.0" parking_lot = "0.12" blake3 = "1.5" -jsonschema = "0.33" +jsonschema = "0.37" json-canon = "0.1" hex = "0.4" runloop-openings = { path = "../openings" } diff --git a/crates/rlp/src/main.rs b/crates/rlp/src/main.rs index 615cf07..f2ac439 100644 --- a/crates/rlp/src/main.rs +++ b/crates/rlp/src/main.rs @@ -1317,6 +1317,10 @@ fn run_schema_validation( } Ok(rows) } + Err(err) => Err(CliError::AgentMetadata(format!( + "schema validation error for {}: {err}", + reference + ))), } } diff --git a/docs/engineering-standards.md b/docs/engineering-standards.md index 9ff0d18..cd5a899 100644 --- a/docs/engineering-standards.md +++ b/docs/engineering-standards.md @@ -289,12 +289,12 @@ The workspace follows a layered architecture: **Keep as a module when:** -| Signal | Example | -| ------------------------ | ------------------------------------- | +| Signal | Example | +| ------------------------- | ------------------------------------- | | Tightly coupled to parent | `runner.rs` + `openings` inseparable | -| Shares private types | Internal state machines | -| Less than 500 lines | Doesn't warrant its own crate | -| No external consumers | Implementation details | +| Shares private types | Internal state machines | +| Less than 500 lines | Doesn't warrant its own crate | +| No external consumers | Implementation details | ### Crate Naming Convention