Watch
0
0
Fork
You've already forked hyperhive
0

controller: turn an archetype agent into a custom one

This commit is contained in:
atlas 2026-11-01 12:02:38 +01:00 • committed by mara
commit 0737798d78

View file

@ -418,26 +418,29 @@ async fn render(
CONFIG_ORG,
&agent.name,
Some(CONFIG_BRANCH),
&["flake.lock"],
&["flake.lock", "flake.nix"],
)
.await?
else {
tracing::warn!(agent = %agent.name, "meta flake: its config repo has no commit on {CONFIG_BRANCH}; leaving the agent out");
continue;
};
let lock = head
.files
.first()
.map(|f| String::from_utf8_lossy(&f.bytes).into_owned());
let read = |path: &str| {
head.files
.iter()
.find(|f| f.path == path)
.map(|f| String::from_utf8_lossy(&f.bytes).into_owned())
};
let (lock, flake) = (read("flake.lock"), read("flake.nix"));
Some(hive_meta_flake::AgentPin {
url: hive_meta_flake::pinned_git_url(
&settings.git_url(CONFIG_ORG, &agent.name),
Some(&head.commit),
)?,
canonical_inputs: lock
.as_deref()
.map(hive_meta_flake::canonical_inputs_in_lock)
.unwrap_or_default(),
canonical_inputs: hive_meta_flake::canonical_inputs_declared(
lock.as_deref(),
flake.as_deref(),
),
})
};
specs.push(hive_meta_flake::AgentSpec {