rename agents/main→assistant, role-based default entry agent
Nightly Build / build (push) Successful in 6m31s

This commit is contained in:
2026-07-21 21:40:06 +01:00
parent 17f5769e0d
commit 8ff64cbddc
22 changed files with 204 additions and 44 deletions
+5 -2
View File
@@ -30,7 +30,7 @@ use super::{ApiError, guard::AuthUser, require_context};
pub const PROJECT_SOURCE_PREFIX: &str = "project-";
/// Agent that drives interactive project-chat sessions.
const PROJECT_COORDINATOR_AGENT: &str = "project-coordinator";
pub(crate) const PROJECT_COORDINATOR_AGENT: &str = "project-coordinator";
// ── Request/Response types ────────────────────────────────────────────────────
@@ -339,7 +339,10 @@ pub async fn provisioning_for_source(
.strip_prefix(PROJECT_SOURCE_PREFIX)
.and_then(|s| s.parse::<i64>().ok())
else {
return Ok(("main".to_string(), None));
// Non-project source → the caller's role-assigned entry agent (same resolver
// the per-user hub uses, so explicit-create and lazy-create never diverge).
let agent = skald_core::db::roles::default_chat_agent_for_user(skald.db(), user_id).await;
return Ok((agent, None));
};
let (project, _can_write) = require_member(skald, id, user_id).await?;