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:
@ -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",
|
||||
|
||||
Reference in New Issue
Block a user