@lucashca/claudecontrol 0.3.28 → 0.3.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,7 +43,7 @@ function loadCustomContext(cwd: string): string {
43
43
  } catch { return ''; }
44
44
  }
45
45
 
46
- function getOrchestratorRole(workspaceId: string): string {
46
+ export function getOrchestratorRole(workspaceId: string): string {
47
47
  const workspace = getWorkspaceById(workspaceId);
48
48
  if (workspace?.orchestratorRole) return workspace.orchestratorRole;
49
49
  const cwd = workspace?.cwd;
@@ -8,7 +8,7 @@ import {
8
8
  persistAgents, persistLogEntry, addAgentToIndex, pushLog, hideLogEntry,
9
9
  delegations, agentQueues,
10
10
  } from '../agents/store.js';
11
- import { sendToAgent, runAgentQuery, delegateTask, compactAgentContext } from '../agents/lifecycle.js';
11
+ import { sendToAgent, runAgentQuery, delegateTask, compactAgentContext, getOrchestratorRole } from '../agents/lifecycle.js';
12
12
  import { spawnRequests, createSpawnRequest, resolveSpawnRequest } from '../agents/spawn-requests.js';
13
13
 
14
14
  export async function handleAgentRoutes(
@@ -206,7 +206,8 @@ export async function handleAgentRoutes(
206
206
  const fromAgent = from ? agents.get(from) : null;
207
207
  const workspaceId = fromAgent?.workspaceId;
208
208
  if (!workspaceId) { jsonError(res, 'from agent not found or has no workspace'); return true; }
209
- if (!fromAgent?.isOrchestrator) { jsonError(res, 'Apenas orquestradores podem delegar tarefas', 403); return true; }
209
+ const isOrch = fromAgent.isOrchestrator === true || fromAgent.role === getOrchestratorRole(workspaceId);
210
+ if (!isOrch) { jsonError(res, 'Apenas orquestradores podem delegar tarefas', 403); return true; }
210
211
 
211
212
  try {
212
213
  const result = await delegateTask(from, to, task, workspaceId, model, toId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucashca/claudecontrol",
3
- "version": "0.3.28",
3
+ "version": "0.3.29",
4
4
  "description": "AI Agent Dashboard — manage multiple Claude Code agents across projects",
5
5
  "type": "module",
6
6
  "bin": {
package/version.json CHANGED
@@ -1 +1 @@
1
- {"version":"0.3.28","build":"2026-04-03T23:25:03.559Z"}
1
+ {"version":"0.3.29","build":"2026-04-03T23:43:47.390Z"}