feat(#1167): hive-wide knowledge repo — forge, local clone, bind-mount, webhook
This commit is contained in:
parent
4bb0d7f310
commit
41befe3839
6 changed files with 276 additions and 0 deletions
|
|
@ -1128,6 +1128,10 @@ async fn set_nspawn_flags(
|
|||
// Ensure /shared directory exists before binding. systemd-nspawn requires the bind source to exist.
|
||||
std::fs::create_dir_all(HOST_SHARED_ROOT)
|
||||
.with_context(|| format!("create {HOST_SHARED_ROOT}"))?;
|
||||
// Ensure /knowledge dir exists. It may be empty until forge seeds it;
|
||||
// nspawn refuses to start if the bind source is missing entirely.
|
||||
std::fs::create_dir_all(crate::knowledge::LOCAL_DIR)
|
||||
.with_context(|| format!("create {}", crate::knowledge::LOCAL_DIR))?;
|
||||
|
||||
// Logical agent name — strip the `h-` prefix.
|
||||
// For the manager: `h-ruth` → `ruth`. For sub-agents: `h-iris` → `iris`.
|
||||
|
|
@ -1156,6 +1160,11 @@ async fn set_nspawn_flags(
|
|||
container_path: CONTAINER_SHARED_MOUNT.to_owned(),
|
||||
read_only: false,
|
||||
},
|
||||
BindMount {
|
||||
host_path: crate::knowledge::LOCAL_DIR.to_owned(),
|
||||
container_path: crate::knowledge::CONTAINER_MOUNT.to_owned(),
|
||||
read_only: true,
|
||||
},
|
||||
];
|
||||
|
||||
// Own state, harness, and config dirs — same for every agent including
|
||||
|
|
|
|||
Loading…
Reference in a new issue