@iaforged/context-code 1.0.77 → 1.0.79

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.
Files changed (121) hide show
  1. package/README.md +68 -68
  2. package/cli.js +8515 -8515
  3. package/context-bootstrap.js +27 -27
  4. package/dist/src/bootstrap/state.js +3 -0
  5. package/dist/src/bridge/bridgeMain.js +40 -40
  6. package/dist/src/cli/print.js +12 -12
  7. package/dist/src/commands/agent/agent.js +8 -0
  8. package/dist/src/commands/commit-push-pr.js +55 -55
  9. package/dist/src/commands/createMovedToPluginCommand.js +9 -9
  10. package/dist/src/commands/init-verifiers.js +238 -238
  11. package/dist/src/commands/init.js +216 -216
  12. package/dist/src/commands/install.js +2 -2
  13. package/dist/src/commands/login/login.js +24 -10
  14. package/dist/src/commands/orchestrate/index.js +1 -1
  15. package/dist/src/commands/orchestrate/orchestrate.js +110 -24
  16. package/dist/src/commands/profile/profile.js +15 -1
  17. package/dist/src/commands/provider/index.js +1 -1
  18. package/dist/src/commands/provider/provider.js +34 -1
  19. package/dist/src/commands/review.js +22 -22
  20. package/dist/src/commands/run/index.js +2 -2
  21. package/dist/src/commands/run/run.js +63 -61
  22. package/dist/src/commands/team/index.js +1 -1
  23. package/dist/src/commands/team/team.js +84 -76
  24. package/dist/src/commands/team-auto/teamAuto.js +89 -29
  25. package/dist/src/commands/terminalSetup/terminalSetup.js +24 -24
  26. package/dist/src/commands/usage/index.js +7 -0
  27. package/dist/src/commands/usage/usage.js +5 -0
  28. package/dist/src/commands/workspace/workspace.js +39 -31
  29. package/dist/src/commands.js +0 -2
  30. package/dist/src/components/ConsoleOAuthFlow.js +92 -14
  31. package/dist/src/components/ModelPicker.js +2 -0
  32. package/dist/src/components/agents/generateAgent.js +92 -92
  33. package/dist/src/components/grove/Grove.js +10 -10
  34. package/dist/src/components/permissions/AskUserQuestionPermissionRequest/AskUserQuestionPermissionRequest.js +8 -8
  35. package/dist/src/constants/geminiOAuth.js +13 -0
  36. package/dist/src/constants/github-app.js +134 -134
  37. package/dist/src/constants/prompts.js +123 -123
  38. package/dist/src/coordinator/coordinatorMode.js +252 -252
  39. package/dist/src/hooks/useTypeahead.js +7 -7
  40. package/dist/src/ink/reconciler.js +7 -7
  41. package/dist/src/main.js +5 -5
  42. package/dist/src/memdir/findRelevantMemories.js +6 -6
  43. package/dist/src/services/MagicDocs/prompts.js +56 -56
  44. package/dist/src/services/PromptSuggestion/promptSuggestion.js +29 -29
  45. package/dist/src/services/SessionMemory/prompts.js +66 -66
  46. package/dist/src/services/api/openai.js +584 -21
  47. package/dist/src/services/limits/adapters/ollama.js +3 -3
  48. package/dist/src/services/oauth/geminiCli.js +107 -0
  49. package/dist/src/services/orchestration/execution/AgentTaskExecutor.js +5 -3
  50. package/dist/src/services/orchestration/execution/OrchestrationExecutionRuntime.js +18 -18
  51. package/dist/src/services/orchestration/global/reporting.js +2 -2
  52. package/dist/src/services/toolUseSummary/toolUseSummaryGenerator.js +9 -9
  53. package/dist/src/skills/bundled/batch.js +78 -78
  54. package/dist/src/skills/bundled/claudeApi.js +34 -34
  55. package/dist/src/skills/bundled/claudeInChrome.js +4 -4
  56. package/dist/src/skills/bundled/debug.js +36 -36
  57. package/dist/src/skills/bundled/scheduleRemoteAgents.js +151 -151
  58. package/dist/src/skills/bundled/skillify.js +132 -132
  59. package/dist/src/skills/bundled/stuck.js +53 -53
  60. package/dist/src/skills/bundled/updateConfig.js +418 -418
  61. package/dist/src/tasks/RemoteAgentTask/RemoteAgentTask.js +26 -26
  62. package/dist/src/tools/AgentTool/AgentTool.js +7 -7
  63. package/dist/src/tools/AgentTool/built-in/claudeCodeGuideAgent.js +67 -67
  64. package/dist/src/tools/AgentTool/built-in/exploreAgent.js +32 -32
  65. package/dist/src/tools/AgentTool/built-in/generalPurposeAgent.js +13 -13
  66. package/dist/src/tools/AgentTool/built-in/planAgent.js +49 -49
  67. package/dist/src/tools/AgentTool/built-in/statuslineSetup.js +129 -129
  68. package/dist/src/tools/AgentTool/built-in/verificationAgent.js +119 -119
  69. package/dist/src/tools/AgentTool/prompt.js +131 -131
  70. package/dist/src/tools/AgentTool/runAgent.js +9 -9
  71. package/dist/src/tools/BashTool/BashTool.js +10 -10
  72. package/dist/src/tools/BashTool/prompt.js +94 -94
  73. package/dist/src/tools/ConfigTool/prompt.js +29 -29
  74. package/dist/src/tools/EnterWorktreeTool/prompt.js +27 -27
  75. package/dist/src/tools/FileReadTool/prompt.js +12 -12
  76. package/dist/src/tools/PowerShellTool/prompt.js +82 -82
  77. package/dist/src/tools/RemoteTriggerTool/prompt.js +9 -9
  78. package/dist/src/tools/ScheduleCronTool/prompt.js +37 -37
  79. package/dist/src/tools/TeamCreateTool/prompt.js +110 -110
  80. package/dist/src/tools/TeamDeleteTool/prompt.js +13 -13
  81. package/dist/src/utils/advisor.js +15 -15
  82. package/dist/src/utils/api.js +2 -2
  83. package/dist/src/utils/auth.js +207 -2
  84. package/dist/src/utils/autoUpdater.js +18 -18
  85. package/dist/src/utils/bash/ShellSnapshot.js +86 -86
  86. package/dist/src/utils/bash/commands.js +61 -61
  87. package/dist/src/utils/claudeInChrome/prompt.js +53 -53
  88. package/dist/src/utils/claudeInChrome/setup.js +8 -8
  89. package/dist/src/utils/databaseMcp/server/queries.js +632 -632
  90. package/dist/src/utils/deepLink/registerProtocol.js +35 -35
  91. package/dist/src/utils/deepLink/terminalLauncher.js +12 -12
  92. package/dist/src/utils/hooks/execAgentHook.js +7 -7
  93. package/dist/src/utils/hooks/execPromptHook.js +4 -4
  94. package/dist/src/utils/hooks/skillImprovement.js +36 -36
  95. package/dist/src/utils/logoV2Utils.js +1 -1
  96. package/dist/src/utils/mcp/dateTimeParser.js +9 -9
  97. package/dist/src/utils/messages.js +191 -191
  98. package/dist/src/utils/model/model.js +18 -0
  99. package/dist/src/utils/model/modelOptions.js +51 -1
  100. package/dist/src/utils/model/modelStrings.js +5 -1
  101. package/dist/src/utils/model/modelSupportOverrides.js +3 -0
  102. package/dist/src/utils/model/providerBaseUrls.js +6 -1
  103. package/dist/src/utils/model/providerCatalog.js +64 -28
  104. package/dist/src/utils/model/providerModels.js +88 -17
  105. package/dist/src/utils/model/providerProfiles.js +8 -0
  106. package/dist/src/utils/model/providerProfilesDb.js +578 -393
  107. package/dist/src/utils/model/providerSwitch.js +12 -0
  108. package/dist/src/utils/model/providerWorkspaces.js +2 -0
  109. package/dist/src/utils/model/providers.js +65 -2
  110. package/dist/src/utils/orchestration/store/providerWorkspaceStore.js +3 -1
  111. package/dist/src/utils/orchestration/store/runStore.js +47 -47
  112. package/dist/src/utils/orchestration/store/teamStore.js +61 -61
  113. package/dist/src/utils/powershell/parser.js +253 -253
  114. package/dist/src/utils/sessionTitle.js +12 -12
  115. package/dist/src/utils/sideQuestion.js +17 -17
  116. package/dist/src/utils/status.js +1 -1
  117. package/dist/src/utils/swarm/backends/registry.js +9 -9
  118. package/dist/src/utils/telemetry/instrumentation.js +9 -9
  119. package/dist/src/utils/teleport.js +15 -15
  120. package/dist/src/utils/undercover.js +28 -28
  121. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { parseArguments } from '../../utils/argumentSubstitution.js';
2
- import { createOrchestrationMessage, createOrchestrationRun, getOrchestrationRunById, getOrchestrationTaskById, getProviderAgentById, getProviderAgentByProviderAndName, getProviderWorkspaceById, getTeamById, getTeamByName, listOrchestrationMessages, listOrchestrationMessagesByDomain, listOrchestrationMessagesByTask, listOrchestrationRuns, listOrchestrationTaskResults, listOrchestrationTaskResultsByDomain, listOrchestrationTasks, listTeamDomainMembers, listTeamDomains, updateOrchestrationRun, updateOrchestrationTask, } from '../../utils/orchestration/store/index.js';
2
+ import { createOrchestrationMessage, createOrchestrationRun, getOrchestrationRunById, getOrchestrationTaskById, getProviderAgentById, getProviderAgentByProviderAndName, getProviderWorkspaceById, getTeamById, getTeamByName, listOrchestrationMessages, listOrchestrationMessagesByTask, listOrchestrationRuns, listOrchestrationTaskResults, listOrchestrationTasks, listTeamUnitMembers, listTeamUnits, updateOrchestrationRun, updateOrchestrationTask, } from '../../utils/orchestration/store/index.js';
3
3
  import { parseSelectionPolicy, selectAgentForTask, } from '../../services/orchestration/policy/index.js';
4
4
  let executionApiPromise = null;
5
5
  function buildUsage() {
@@ -17,7 +17,7 @@ function buildUsage() {
17
17
  '/run cancel <run-id>',
18
18
  '/run retry <run-id> [task-id]',
19
19
  '/run cancel-task <task-id>',
20
- '/run domain <run-id> <domain>',
20
+ '/run equipo <run-id> <equipo>',
21
21
  '/run reassign <task-id> <provider>/<agent>',
22
22
  '/run optimize <run-id> [policy]',
23
23
  '/run assign <run-id> [policy]',
@@ -91,17 +91,17 @@ async function formatTeamLabel(teamId) {
91
91
  const team = await getTeamById(teamId);
92
92
  return team ? team.name : teamId;
93
93
  }
94
- async function loadDomains(teamId) {
95
- return listTeamDomains(teamId);
94
+ async function loadUnits(teamId) {
95
+ return listTeamUnits(teamId);
96
96
  }
97
- function findDomain(domains, teamDomainId) {
98
- if (!teamDomainId) {
97
+ function findUnit(units, teamUnitId) {
98
+ if (!teamUnitId) {
99
99
  return null;
100
100
  }
101
- return domains.find(item => item.id === teamDomainId) ?? null;
101
+ return units.find(item => item.id === teamUnitId) ?? null;
102
102
  }
103
- async function formatDomainLabel(domains, teamDomainId) {
104
- return findDomain(domains, teamDomainId)?.domainName ?? 'n/a';
103
+ async function formatTeamUnitLabel(units, teamUnitId) {
104
+ return findUnit(units, teamUnitId)?.unitName ?? 'n/a';
105
105
  }
106
106
  function parseProviderAgentRef(ref) {
107
107
  const [provider, ...agentParts] = ref.split('/');
@@ -113,6 +113,8 @@ function parseProviderAgentRef(ref) {
113
113
  'openrouter',
114
114
  'ollama',
115
115
  'ollama-cloud',
116
+ 'gemini-api',
117
+ 'gemini-google',
116
118
  'zai',
117
119
  'minimax',
118
120
  ]);
@@ -121,38 +123,38 @@ function parseProviderAgentRef(ref) {
121
123
  }
122
124
  return { provider: providerId, agentName };
123
125
  }
124
- async function findDomainByRef(teamId, domainRef) {
125
- const domains = await loadDomains(teamId);
126
- const normalized = domainRef.trim().toLowerCase();
127
- return domains.find(domain => domain.id === domainRef || domain.domainName.toLowerCase() === normalized) ?? null;
126
+ async function findUnitByRef(teamId, unitRef) {
127
+ const units = await loadUnits(teamId);
128
+ const normalized = unitRef.trim().toLowerCase();
129
+ return units.find(unit => unit.id === unitRef || unit.unitName.toLowerCase() === normalized) ?? null;
128
130
  }
129
- async function buildDomainReports(run, tasks) {
130
- const domains = await loadDomains(run.teamId);
131
+ async function buildTeamReports(run, tasks) {
132
+ const units = await loadUnits(run.teamId);
131
133
  const reports = new Map();
132
- for (const domain of domains) {
133
- reports.set(domain.id, {
134
- domainName: domain.domainName,
135
- domain,
134
+ for (const unit of units) {
135
+ reports.set(unit.id, {
136
+ unitName: unit.unitName,
137
+ unit,
136
138
  tasks: [],
137
- members: (await listTeamDomainMembers(domain.id)).length,
139
+ members: (await listTeamUnitMembers(unit.id)).length,
138
140
  });
139
141
  }
140
142
  for (const task of tasks) {
141
- const key = task.teamDomainId ?? 'unassigned';
142
- const domain = findDomain(domains, task.teamDomainId);
143
+ const key = task.teamUnitId ?? 'unassigned';
144
+ const unit = findUnit(units, task.teamUnitId);
143
145
  const existing = reports.get(key);
144
146
  if (existing) {
145
147
  existing.tasks.push(task);
146
148
  continue;
147
149
  }
148
150
  reports.set(key, {
149
- domainName: domain?.domainName ?? 'sin dominio',
150
- domain,
151
+ unitName: unit?.unitName ?? 'sin equipo',
152
+ unit,
151
153
  tasks: [task],
152
154
  members: 0,
153
155
  });
154
156
  }
155
- return [...reports.values()].sort((a, b) => a.domainName.localeCompare(b.domainName));
157
+ return [...reports.values()].sort((a, b) => a.unitName.localeCompare(b.unitName));
156
158
  }
157
159
  async function loadExecutionApi() {
158
160
  if (!executionApiPromise) {
@@ -327,9 +329,9 @@ async function formatLatestTaskResult(task) {
327
329
  async function buildRunListMessage() {
328
330
  const runs = await listOrchestrationRuns();
329
331
  if (runs.length === 0) {
330
- return 'No hay corridas de orquestacion guardadas.';
332
+ return 'No hay ejecuciones de orquestacion guardadas.';
331
333
  }
332
- const lines = ['Corridas de orquestacion:'];
334
+ const lines = ['Ejecuciones de orquestacion:'];
333
335
  for (const run of runs) {
334
336
  const team = await formatTeamLabel(run.teamId);
335
337
  const tasks = await loadTasks(run.id);
@@ -341,13 +343,13 @@ async function buildRunListMessage() {
341
343
  async function buildTaskListMessage(runId) {
342
344
  const run = await getOrchestrationRunById(runId);
343
345
  if (!run) {
344
- return `No existe la corrida ${runId}.`;
346
+ return `No existe la ejecucion ${runId}.`;
345
347
  }
346
348
  const tasks = await loadTasks(run.id);
347
349
  const domains = await loadDomains(run.teamId);
348
350
  const teamLabel = await formatTeamLabel(run.teamId);
349
351
  const lines = [
350
- `Run: ${run.id}`,
352
+ `Ejecucion: ${run.id}`,
351
353
  `Team: ${teamLabel}`,
352
354
  `Estado: ${run.status}`,
353
355
  `Objetivo: ${run.goal}`,
@@ -358,7 +360,7 @@ async function buildTaskListMessage(runId) {
358
360
  lines.push('- sin tareas');
359
361
  return lines.join('\n');
360
362
  }
361
- lines.push('', 'Tareas por dominio:');
363
+ lines.push('', 'Tareas por equipo:');
362
364
  for (const report of await buildDomainReports(run, tasks)) {
363
365
  lines.push(`- ${report.domainName}: ${summarizeTasks(report.tasks)} | miembros=${report.members}`);
364
366
  for (const task of report.tasks) {
@@ -373,18 +375,18 @@ async function buildTaskListMessage(runId) {
373
375
  }
374
376
  const unlisted = tasks.filter(task => task.teamDomainId && !findDomain(domains, task.teamDomainId));
375
377
  if (unlisted.length > 0) {
376
- lines.push('', `Advertencia: ${unlisted.length} tareas apuntan a dominios no encontrados.`);
378
+ lines.push('', `Advertencia: ${unlisted.length} tareas apuntan a equipos no encontrados.`);
377
379
  }
378
380
  return lines.join('\n');
379
381
  }
380
382
  async function buildMessageListMessage(runId) {
381
383
  const run = await getOrchestrationRunById(runId);
382
384
  if (!run) {
383
- return `No existe la corrida ${runId}.`;
385
+ return `No existe la ejecucion ${runId}.`;
384
386
  }
385
387
  const messages = await loadMessages(runId);
386
388
  if (messages.length === 0) {
387
- return `La corrida ${runId} no tiene mensajes.`;
389
+ return `La ejecucion ${runId} no tiene mensajes.`;
388
390
  }
389
391
  const lines = [`Mensajes de ${runId}:`];
390
392
  for (const message of messages) {
@@ -411,8 +413,8 @@ async function buildTaskDetailMessage(taskId) {
411
413
  const results = await listOrchestrationTaskResults(task.id);
412
414
  const lines = [
413
415
  `Task: ${task.id}`,
414
- `Run: ${task.runId}`,
415
- `Dominio: ${domain}`,
416
+ `Ejecucion: ${task.runId}`,
417
+ `Equipo: ${domain}`,
416
418
  `Estado: ${task.status}`,
417
419
  `Assigned: ${assignedAgent}`,
418
420
  `Titulo: ${task.title}`,
@@ -441,7 +443,7 @@ async function buildConsolidatedReport(snapshot, operationLabel) {
441
443
  const globalOrchestrator = await formatAgentLabel(run.globalOrchestratorAgentId);
442
444
  const lines = [
443
445
  operationLabel ? `Operacion: ${operationLabel}` : null,
444
- `Run: ${run.id}`,
446
+ `Ejecucion: ${run.id}`,
445
447
  `Team: ${team}`,
446
448
  `Estado: ${run.status}`,
447
449
  `Objetivo: ${run.goal}`,
@@ -449,11 +451,11 @@ async function buildConsolidatedReport(snapshot, operationLabel) {
449
451
  `Resumen tareas: ${summarizeTasks(tasks)}`,
450
452
  `Mensajes: ${messages.length}`,
451
453
  '',
452
- 'Reporte consolidado por escuadron:',
454
+ 'Reporte consolidado por equipo:',
453
455
  ].filter(Boolean);
454
456
  const reports = await buildDomainReports(run, tasks);
455
457
  if (reports.length === 0) {
456
- lines.push('- sin dominios configurados');
458
+ lines.push('- sin equipos configurados');
457
459
  return lines.join('\n');
458
460
  }
459
461
  for (const report of reports) {
@@ -482,7 +484,7 @@ async function buildConsolidatedReport(snapshot, operationLabel) {
482
484
  async function buildRunShowMessage(runId) {
483
485
  const run = await getOrchestrationRunById(runId);
484
486
  if (!run) {
485
- return `No existe la corrida ${runId}.`;
487
+ return `No existe la ejecucion ${runId}.`;
486
488
  }
487
489
  const tasks = await loadTasks(run.id);
488
490
  const messages = await loadMessages(run.id);
@@ -491,11 +493,11 @@ async function buildRunShowMessage(runId) {
491
493
  async function buildDomainDetailMessage(runId, domainRef) {
492
494
  const run = await getOrchestrationRunById(runId);
493
495
  if (!run) {
494
- return `No existe la corrida ${runId}.`;
496
+ return `No existe la ejecucion ${runId}.`;
495
497
  }
496
498
  const domain = await findDomainByRef(run.teamId, domainRef);
497
499
  if (!domain) {
498
- return `No existe el dominio ${domainRef} en la corrida ${runId}.`;
500
+ return `No existe el equipo ${domainRef} en la ejecucion ${runId}.`;
499
501
  }
500
502
  const tasks = (await loadTasks(run.id)).filter(task => task.teamDomainId === domain.id);
501
503
  const members = await listTeamDomainMembers(domain.id);
@@ -504,9 +506,9 @@ async function buildDomainDetailMessage(runId, domainRef) {
504
506
  const localOrchestrator = await formatAgentLabel(domain.localOrchestratorAgentId ?? domain.leadAgentId);
505
507
  const lead = await formatAgentLabel(domain.leadAgentId);
506
508
  const lines = [
507
- `Run: ${run.id}`,
508
- `Dominio: ${domain.domainName}`,
509
- `Estado run: ${run.status}`,
509
+ `Ejecucion: ${run.id}`,
510
+ `Equipo: ${domain.domainName}`,
511
+ `Estado ejecucion: ${run.status}`,
510
512
  `Orquestador local: ${localOrchestrator}`,
511
513
  `Lead: ${lead}`,
512
514
  `Miembros: ${members.length}`,
@@ -517,7 +519,7 @@ async function buildDomainDetailMessage(runId, domainRef) {
517
519
  'Tareas:',
518
520
  ];
519
521
  if (tasks.length === 0) {
520
- lines.push('- sin tareas para este dominio');
522
+ lines.push('- sin tareas para este equipo');
521
523
  }
522
524
  for (const task of tasks) {
523
525
  const assignedAgent = await formatAgentLabel(task.assignedAgentId);
@@ -531,7 +533,7 @@ async function buildDomainDetailMessage(runId, domainRef) {
531
533
  }
532
534
  }
533
535
  if (messages.length > 0) {
534
- lines.push('', 'Mensajes del dominio:');
536
+ lines.push('', 'Mensajes del equipo:');
535
537
  for (const message of messages.slice(-10)) {
536
538
  lines.push(`- ${message.createdAt} | ${message.messageType}: ${message.content}`);
537
539
  }
@@ -575,7 +577,7 @@ function setOrchestrationActivity(context, activity) {
575
577
  async function resumeRunWithFallback(runId, context) {
576
578
  const existing = await getOrchestrationRunById(runId);
577
579
  if (!existing) {
578
- return `No existe la corrida ${runId}.`;
580
+ return `No existe la ejecucion ${runId}.`;
579
581
  }
580
582
  const teamName = await formatTeamLabel(existing.teamId);
581
583
  setOrchestrationActivity(context, {
@@ -615,7 +617,7 @@ async function resumeRunWithFallback(runId, context) {
615
617
  }
616
618
  }
617
619
  if (existing.status === 'completed') {
618
- return `La corrida ${runId} ya esta completada y no se puede reanudar.`;
620
+ return `La ejecucion ${runId} ya esta completada y no se puede reanudar.`;
619
621
  }
620
622
  const updated = await updateOrchestrationRun(runId, {
621
623
  status: 'in_progress',
@@ -639,7 +641,7 @@ async function resumeRunWithFallback(runId, context) {
639
641
  async function cancelRunWithFallback(runId) {
640
642
  const existing = await getOrchestrationRunById(runId);
641
643
  if (!existing) {
642
- return `No existe la corrida ${runId}.`;
644
+ return `No existe la ejecucion ${runId}.`;
643
645
  }
644
646
  const api = await loadExecutionApi();
645
647
  if (api?.cancelOrchestrationRun) {
@@ -684,17 +686,17 @@ async function retryTask(task) {
684
686
  async function retryRunWithFallback(runId, taskId) {
685
687
  const run = await getOrchestrationRunById(runId);
686
688
  if (!run) {
687
- return `No existe la corrida ${runId}.`;
689
+ return `No existe la ejecucion ${runId}.`;
688
690
  }
689
691
  const tasks = await listOrchestrationTasks(run.id);
690
692
  const selectedTasks = taskId
691
693
  ? tasks.filter(task => task.id === taskId)
692
694
  : tasks.filter(task => task.status === 'failed' || task.status === 'blocked');
693
695
  if (taskId && selectedTasks.length === 0) {
694
- return `La tarea ${taskId} no pertenece a la corrida ${runId}.`;
696
+ return `La tarea ${taskId} no pertenece a la ejecucion ${runId}.`;
695
697
  }
696
698
  if (selectedTasks.length === 0) {
697
- return `La corrida ${runId} no tiene tareas fallidas o bloqueadas para reintentar.`;
699
+ return `La ejecucion ${runId} no tiene tareas fallidas o bloqueadas para reintentar.`;
698
700
  }
699
701
  if (run.status === 'failed' || run.status === 'completed' || run.status === 'cancelled') {
700
702
  await updateOrchestrationRun(run.id, {
@@ -795,11 +797,11 @@ function formatDecision(task, decision) {
795
797
  async function optimizeRunWithPolicy(runId, policyRef) {
796
798
  const run = await getOrchestrationRunById(runId);
797
799
  if (!run) {
798
- return `No existe la corrida ${runId}.`;
800
+ return `No existe la ejecucion ${runId}.`;
799
801
  }
800
802
  const tasks = (await listOrchestrationTasks(run.id)).filter(task => task.status !== 'completed');
801
803
  if (tasks.length === 0) {
802
- return `La corrida ${runId} no tiene tareas abiertas para optimizar.`;
804
+ return `La ejecucion ${runId} no tiene tareas abiertas para optimizar.`;
803
805
  }
804
806
  const lines = [`Optimización Fase 4 para ${run.id}:`, `Policy: ${parseSelectionPolicy(policyRef).id}`];
805
807
  for (const task of tasks) {
@@ -810,11 +812,11 @@ async function optimizeRunWithPolicy(runId, policyRef) {
810
812
  async function assignRunWithPolicy(runId, policyRef) {
811
813
  const run = await getOrchestrationRunById(runId);
812
814
  if (!run) {
813
- return `No existe la corrida ${runId}.`;
815
+ return `No existe la ejecucion ${runId}.`;
814
816
  }
815
817
  const tasks = (await listOrchestrationTasks(run.id)).filter(task => task.status === 'pending' || task.status === 'ready' || task.status === 'blocked' || task.status === 'failed');
816
818
  if (tasks.length === 0) {
817
- return `La corrida ${runId} no tiene tareas asignables.`;
819
+ return `La ejecucion ${runId} no tiene tareas asignables.`;
818
820
  }
819
821
  const lines = [`Asignación Fase 4 para ${run.id}:`, `Policy: ${parseSelectionPolicy(policyRef).id}`];
820
822
  for (const task of tasks) {
@@ -850,16 +852,16 @@ async function assignRunWithPolicy(runId, policyRef) {
850
852
  async function fallbackRunWithPolicy(runId, taskId, policyRef) {
851
853
  const run = await getOrchestrationRunById(runId);
852
854
  if (!run) {
853
- return `No existe la corrida ${runId}.`;
855
+ return `No existe la ejecucion ${runId}.`;
854
856
  }
855
857
  const tasks = (await listOrchestrationTasks(run.id)).filter(task => taskId
856
858
  ? task.id === taskId
857
859
  : task.status === 'failed' || task.status === 'blocked');
858
860
  if (taskId && tasks.length === 0) {
859
- return `La tarea ${taskId} no pertenece a la corrida ${runId}.`;
861
+ return `La tarea ${taskId} no pertenece a la ejecucion ${runId}.`;
860
862
  }
861
863
  if (tasks.length === 0) {
862
- return `La corrida ${runId} no tiene tareas fallidas o bloqueadas para fallback.`;
864
+ return `La ejecucion ${runId} no tiene tareas fallidas o bloqueadas para fallback.`;
863
865
  }
864
866
  const policy = policyRef ?? 'score-with-fallback:resilience';
865
867
  const lines = [`Fallback Fase 4 para ${run.id}:`, `Policy: ${parseSelectionPolicy(policy).id}`];
@@ -899,7 +901,7 @@ async function fallbackRunWithPolicy(runId, taskId, policyRef) {
899
901
  async function explainRunPolicy(runId) {
900
902
  const run = await getOrchestrationRunById(runId);
901
903
  if (!run) {
902
- return `No existe la corrida ${runId}.`;
904
+ return `No existe la ejecucion ${runId}.`;
903
905
  }
904
906
  const messages = (await listOrchestrationMessages(run.id)).filter(message => message.messageType.startsWith('policy.'));
905
907
  const lines = [`Explicación Fase 4 para ${run.id}:`];
@@ -1028,7 +1030,7 @@ export const call = async (args, context) => {
1028
1030
  type: 'text',
1029
1031
  value: await cancelTaskWithFallback(parsed.runId),
1030
1032
  };
1031
- case 'domain': {
1033
+ case 'equipo': {
1032
1034
  const tokens = parseTokens(trimmed);
1033
1035
  if (!parsed.runId || !tokens[2]) {
1034
1036
  return {
@@ -3,7 +3,7 @@ export default {
3
3
  type: 'local-jsx',
4
4
  name: 'team',
5
5
  description: 'Gestiona equipos de swarm y sus perfiles de provider/agente',
6
- argumentHint: '[list|create <name>|show <name>|orchestrator|domain <team> <domain> <provider>/<agent>|add-member <team> <domain> <provider>/<agent> [duty]]',
6
+ argumentHint: '[list|create <name>|show <name>|orchestrator|equipo <team> <equipo> <provider>/<agent>|add-member <team> <equipo> <provider>/<agent> [duty]]',
7
7
  isEnabled: () => true,
8
8
  load: () => import('./team.js'),
9
9
  };