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:
@ -720,6 +720,24 @@ export class MockAgentGateway implements AgentGateway {
|
||||
return structuredClone(list[idx]);
|
||||
}
|
||||
|
||||
async updateProjectOrchestrator(
|
||||
projectId: string,
|
||||
agentId: string,
|
||||
): Promise<{ orchestratorAgentId: string }> {
|
||||
const list = this.getAgents(projectId);
|
||||
if (!list.some((agent) => agent.id === agentId)) {
|
||||
const err: GatewayError = {
|
||||
code: "NOT_FOUND",
|
||||
message: `agent ${agentId} not found in project ${projectId}`,
|
||||
};
|
||||
throw err;
|
||||
}
|
||||
for (let index = 0; index < list.length; index += 1) {
|
||||
list[index] = { ...list[index], isOrchestrator: list[index].id === agentId };
|
||||
}
|
||||
return { orchestratorAgentId: agentId };
|
||||
}
|
||||
|
||||
// ── Internal helpers for MockTemplateGateway (same-package use only) ──
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user