feat(agents): role orchestrateur du contexte global expose et configurable par agent — isOrchestrator distinct des permissions MCP, DTO update_project_orchestrator (terminologie wire legacy conservee), refus idea_context_update explicite avec writer effectif + orientation idea_context_propose, surface AgentsPanel + adaptateurs frontend — #276 (QA verte: cargo fmt/check, tests cibles application/app-tauri/infrastructure/backend, npm typecheck, 69/69 tests frontend agents/adapters)
This commit is contained in:
@ -3132,6 +3132,27 @@ pub struct UpdateAgentContactableRequestDto {
|
||||
pub contactable: bool,
|
||||
}
|
||||
|
||||
/// Request DTO for `update_project_orchestrator`.
|
||||
///
|
||||
/// The legacy `orchestrator` terminology is intentionally kept on the wire for
|
||||
/// compatibility; the product-facing role is the global project-context writer.
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct UpdateProjectOrchestratorRequestDto {
|
||||
/// Id of the owning project.
|
||||
pub project_id: String,
|
||||
/// Existing project agent that becomes the single effective writer.
|
||||
pub agent_id: String,
|
||||
}
|
||||
|
||||
/// Response DTO for `update_project_orchestrator`.
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct UpdateProjectOrchestratorResponseDto {
|
||||
/// Effective writer agent id after the update.
|
||||
pub orchestrator_agent_id: String,
|
||||
}
|
||||
|
||||
/// Response DTO for `change_agent_profile`: the mutated agent plus the freshly
|
||||
/// relaunched session when a live session was hot-swapped (absent otherwise).
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
|
||||
@ -57,9 +57,9 @@ use application::{
|
||||
UninstallPlugin, UnlinkIssues, UpdateAgentContactable, UpdateAgentContext, UpdateAgentEffort,
|
||||
UpdateAgentMcpToolPermissions, UpdateAgentPermissions, UpdateAgentSystemPermissions,
|
||||
UpdateIssue, UpdateIssueCarnet, UpdateLiveState, UpdateMemory, UpdateProjectContext,
|
||||
UpdateProjectMcpToolPermissions, UpdateProjectPermissions, UpdateProjectSystemPermissions,
|
||||
UpdateSkill, UpdateTemplate, WakeSessionProvider, WriteMemory, WriteToTerminal,
|
||||
AGENT_MEMORY_RECALL_BUDGET,
|
||||
UpdateProjectMcpToolPermissions, UpdateProjectOrchestrator, UpdateProjectPermissions,
|
||||
UpdateProjectSystemPermissions, UpdateSkill, UpdateTemplate, WakeSessionProvider, WriteMemory,
|
||||
WriteToTerminal, AGENT_MEMORY_RECALL_BUDGET,
|
||||
};
|
||||
use async_trait::async_trait;
|
||||
use domain::ports::{
|
||||
@ -1338,6 +1338,8 @@ pub struct BackendCore {
|
||||
pub update_agent_effort: Arc<UpdateAgentEffort>,
|
||||
/// Update one agent's cross-project contactability.
|
||||
pub update_agent_contactable: Arc<UpdateAgentContactable>,
|
||||
/// Change the single agent allowed to write the global project context.
|
||||
pub update_project_orchestrator: Arc<UpdateProjectOrchestrator>,
|
||||
/// Resolve effective permissions for one agent.
|
||||
pub resolve_agent_permissions: Arc<ResolveAgentPermissions>,
|
||||
/// Read the project system permission document.
|
||||
@ -2509,6 +2511,10 @@ impl BackendCore {
|
||||
let update_agent_effort = Arc::new(UpdateAgentEffort::new(Arc::clone(&contexts_port)));
|
||||
let update_agent_contactable =
|
||||
Arc::new(UpdateAgentContactable::new(Arc::clone(&contexts_port)));
|
||||
let update_project_orchestrator = Arc::new(UpdateProjectOrchestrator::new(
|
||||
Arc::clone(&contexts_port),
|
||||
Arc::clone(&events_port),
|
||||
));
|
||||
let resolve_agent_permissions = Arc::new(ResolveAgentPermissions::new(Arc::clone(
|
||||
&permission_store_port,
|
||||
)));
|
||||
@ -3363,6 +3369,7 @@ impl BackendCore {
|
||||
update_agent_permissions,
|
||||
update_agent_effort,
|
||||
update_agent_contactable,
|
||||
update_project_orchestrator,
|
||||
resolve_agent_permissions,
|
||||
get_project_system_permissions,
|
||||
update_project_system_permissions,
|
||||
|
||||
Reference in New Issue
Block a user