fix(runtime_provision): use team-template risk_profile, not hardcoded toolfree
The provisioner was hardcoding risk_profile=toolfree for every claw, which the ZeroClaw config explicitly configures to EXCLUDE every usable tool (shell, file_read, file_write, http_request, browser). Result: coder/tester/committer claws had zero tools and produced text in the context window with no ability to actually write files or run tests — exactly what the last mission summary showed. Fixes: - provision_claw now takes risk_profile: &str, passed through from the team template (development teams already had coding_readwrite, which now actually gets applied). - Research team templates updated from toolfree → research_readonly (file_read) and papers_research → research_web_readonly (file_read + web_search + web_fetch). Applied to both the on-disk TOML files and the live DB rows. - Added RuntimeProvisioner::default_risk_profile_for_role for auto-provision code paths that lack a template context — picks coding_readwrite for coder-like roles, research_readonly otherwise. - Split rebind_model out of provision_claw so the model-change UI path doesnt inadvertently clobber the existing risk_profile. Templates DB fixup for missions launched pre-deploy is already applied via manual UPDATE.
This commit is contained in:
@@ -994,7 +994,7 @@ pub async fn set_model(
|
||||
// model on their next turn. provision_claw overwrites
|
||||
// agents.<alias>.model_provider on the shared ZeroClaw config.
|
||||
if let Some(provisioner) = crate::runtime_provision::RuntimeProvisioner::from_env() {
|
||||
if let Err(e) = provisioner.provision_claw(id.as_uuid(), model).await {
|
||||
if let Err(e) = provisioner.rebind_model(id.as_uuid(), model).await {
|
||||
eprintln!("set_model({id}): runtime rebind failed: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user