Skip to content

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

chore: files changed crates/openhuman-core/src/memory/schemas_tests.rs,crates/openhuman-core/src/mem

Steven Enamakel7afb377739d1
diff --git a/crates/openhuman-core/src/memory/schemas_tests.rs b/crates/openhuman-core/src/memory/schemas_tests.rs
index 3cdcf0d509..b862ec8af6 100644
--- a/crates/openhuman-core/src/memory/schemas_tests.rs
+++ b/crates/openhuman-core/src/memory/schemas_tests.rs
@@ -210,6 +210,27 @@ fn required_inputs_match_the_spec() {
}
}
+#[test]
+fn sources_add_schema_lists_only_supported_kinds_and_target_formats() {
+ let schema = schema("sources_add");
+ let field = |name: &str| {
+ schema
+ .inputs
+ .iter()
+ .find(|input| input.name == name)
+ .unwrap_or_else(|| panic!("missing sources_add input {name}"))
+ };
+
+ assert_eq!(
+ field("kind").comment,
+ "folder | file | link | github | rss."
+ );
+ assert_eq!(
+ field("target").comment,
+ "Path, URL, owner/repo or feed URL."
+ );
+}
+
#[tokio::test]
async fn invalid_params_are_rejected_as_invalid_request() {
let tmp = tempfile::tempdir().unwrap();
diff --git a/crates/openhuman-core/src/memory/status_tests.rs b/crates/openhuman-core/src/memory/status_tests.rs
index 78b9a294e4..0f4f85f5be 100644
--- a/crates/openhuman-core/src/memory/status_tests.rs
+++ b/crates/openhuman-core/src/memory/status_tests.rs
@@ -18,11 +18,12 @@ fn upstream_engine_status_maps_health_reason_and_capabilities() {
];
for (health, reason, expected_health) in cases {
+ let input_contract_version = "memory-contract-fixture-2.0";
let status = tinymemory_api::EngineStatus {
health,
reason: reason.clone(),
capabilities: vec!["recall", "store"],
- contract_version: "2.0",
+ contract_version: input_contract_version,
};
let row = subsystem_status_for_engine("cortexdb".into(), status);
assert_eq!(row.slot, "memory");
@@ -30,7 +31,7 @@ fn upstream_engine_status_maps_health_reason_and_capabilities() {
assert_eq!(row.class, "external");
assert_eq!(row.health, expected_health);
assert_eq!(row.health_reason, reason);
- assert_eq!(row.contract_version, tinymemory_api::CONTRACT_VERSION);
+ assert_eq!(row.contract_version, input_contract_version);
assert_eq!(row.capabilities, vec!["recall", "store"]);
assert!(row.fell_back_from.is_none());
assert!(row.last_error.is_none());