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:
2026-09-07 22:49:12 +02:00
parent ad2c6b4354
commit cb5196fd69
24 changed files with 663 additions and 37 deletions

View File

@ -402,10 +402,11 @@ pub fn catalogue() -> Vec<ToolDef> {
},
ToolDef {
name: "idea_context_update",
description: "Directly update the global project context. Strict, orchestrator-only \
counterpart to idea_context_propose: if you are not the project's \
current orchestrator (see isOrchestrator on idea_list_agents), this call \
fails and never silently files a proposal. Pass ifMatch from a prior \
description: "Directly update the global project context. Only the project's effective \
global-context writer may call this tool (reported as isOrchestrator by \
idea_list_agents); MCP permissions do not grant this governance role. A \
non-writer call fails without writing or creating a proposal and should \
use idea_context_propose instead. Pass ifMatch from a prior \
idea_context_read to reject the write if the context changed.",
input_schema: json!({
"type": "object",
@ -1094,9 +1095,13 @@ mod tests {
tool_access("idea_context_update"),
Some(McpToolAccess::WriteAction)
);
assert!(catalogue()
let tool = catalogue()
.into_iter()
.any(|tool| tool.name == "idea_context_update"));
.find(|tool| tool.name == "idea_context_update")
.expect("idea_context_update registered");
assert!(tool.description.contains("global-context writer"));
assert!(tool.description.contains("MCP permissions do not grant"));
assert!(tool.description.contains("idea_context_propose"));
let cmd = map_tool_call(
"idea_context_update",