archetypes: build an archetype agent from its archetype's module on the hive
The hive reads the agent-archetype key when it provisions and rebuilds an agent and keeps it in swarm-agent-archetypes.json. For an archetype agent the meta flake has no agent-<name> input and mkAgent imports hyperhive.hyperhiveArchetypes.<name>.module; provisioning, rebuilds, the meta-input cascade, a deploy's rev and the startup migration skip the config repos. The harness gets HIVE_ARCHETYPE and the system prompt says the agent has no config repo. The create form sends the picked archetype. Adds the android-dev built-in. Refs #5386
This commit is contained in:
parent
b199c83899
commit
553ed8376c
24 changed files with 557 additions and 92 deletions
|
|
@ -2043,7 +2043,9 @@ impl CreateSettings {
|
|||
|
||||
/// Whether any setting is given.
|
||||
fn any(&self) -> bool {
|
||||
self.limits.is_some() || self.inference.is_some() || self.permissions.is_some()
|
||||
self.limits.is_some()
|
||||
|| self.inference.is_some()
|
||||
|| self.permissions.is_some()
|
||||
|| self.archetype.is_some()
|
||||
}
|
||||
|
||||
|
|
@ -5527,7 +5529,10 @@ mod tests {
|
|||
"mint_agent_matrix_account",
|
||||
"set_agent_wanted",
|
||||
] {
|
||||
assert!(archetype.iter().any(|l| l == kept), "archetype lacks {kept}");
|
||||
assert!(
|
||||
archetype.iter().any(|l| l == kept),
|
||||
"archetype lacks {kept}"
|
||||
);
|
||||
assert!(custom.iter().any(|l| l == kept), "custom lacks {kept}");
|
||||
}
|
||||
assert!(archetype_waits.iter().any(|l| l == "set_agent_wanted"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue