Watch
0
0
Fork
You've already forked hyperhive
0

ruth is created from a ruth archetype that runs sonnet

This commit is contained in:
atlas 2026-11-11 01:54:01 +01:00
commit 5233259b3b

View file

@ -491,6 +491,33 @@ mod tests {
assert_eq!(by_name("with")["icon"], "<svg/>");
assert!(by_name("plain").get("icon").is_none());
}
/// `ruth`'s `meta` as `nix/archetypes/default.nix` evaluates it: the check
/// stores it, and it keeps `manage_root_agent` and the model.
#[test]
fn the_ruth_archetype_passes_the_check_with_manage_root_agent_and_sonnet() {
let r = evaluated(json!({
"ruth": {
"description": "manager",
"inference": { "model": "sonnet" },
"permissions": [
"messaging", "meta", "inbox", "execution",
"manage_root_agent", "logs", "metrics"
]
}
}));
assert!(r.refused.is_empty(), "{:?}", r.refused);
let meta = &r.archetypes["ruth"];
let perms = meta.permissions.as_deref().expect("permissions");
assert!(perms.contains(&"manage_root_agent".to_owned()));
assert!(perms.contains(&"logs".to_owned()));
assert!(perms.contains(&"metrics".to_owned()));
assert_eq!(
meta.inference.as_ref().and_then(|i| i.model.as_deref()),
Some("sonnet")
);
}
#[test]
fn a_bad_archetype_is_refused_by_name_and_the_rest_stay() {
let r = evaluated(json!({