@iaforged/context-code 1.2.6 → 1.2.8

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.
@@ -16,11 +16,43 @@ function formatAgent(agent) {
16
16
  }
17
17
  return parts.join(' · ');
18
18
  }
19
- export async function agentsHandler() {
19
+ export async function agentsHandler(opts = {}) {
20
20
  const cwd = getCwd();
21
21
  const { allAgents } = await getAgentDefinitionsWithOverrides(cwd);
22
22
  const activeAgents = getActiveAgentsFromList(allAgents);
23
23
  const resolvedAgents = resolveAgentOverrides(allAgents, activeAgents);
24
+ if (opts.json) {
25
+ const entries = [];
26
+ for (const { source } of AGENT_SOURCE_GROUPS) {
27
+ const groupAgents = resolvedAgents
28
+ .filter(a => a.source === source)
29
+ .sort(compareAgentsByName);
30
+ for (const agent of groupAgents) {
31
+ entries.push({
32
+ name: agent.agentType,
33
+ source: agent.source,
34
+ description: agent.whenToUse ?? '',
35
+ model: resolveAgentModelDisplay(agent) || null,
36
+ provider: agent.provider ?? null,
37
+ tools: agent.tools ?? null,
38
+ disallowedTools: agent.disallowedTools ?? null,
39
+ permissionMode: agent.permissionMode ?? null,
40
+ memory: agent.memory ?? null,
41
+ color: agent.color ?? null,
42
+ skills: agent.skills ?? null,
43
+ filename: agent.filename ?? null,
44
+ baseDir: agent.baseDir ?? null,
45
+ background: !!agent.background,
46
+ shadowed: !!agent.overriddenBy,
47
+ shadowedBy: agent.overriddenBy
48
+ ? getOverrideSourceLabel(agent.overriddenBy)
49
+ : null,
50
+ });
51
+ }
52
+ }
53
+ process.stdout.write(JSON.stringify({ cwd, agents: entries }) + '\n');
54
+ return;
55
+ }
24
56
  const lines = [];
25
57
  let totalActive = 0;
26
58
  for (const { label, source } of AGENT_SOURCE_GROUPS) {
@@ -10,7 +10,7 @@ const inputToResponse = {
10
10
  '3': 'good'
11
11
  };
12
12
  export const isValidResponseInput = (input) => RESPONSE_INPUTS.includes(input);
13
- const DEFAULT_MESSAGE = 'How is Claude doing this session? (optional)';
13
+ const DEFAULT_MESSAGE = '¿Cómo está Claude en esta sesión? (opcional)';
14
14
  export function FeedbackSurveyView(t0) {
15
15
  const $ = _c(15);
16
16
  const { onSelect, inputValue, setInputValue, message: t1 } = t0;
package/dist/src/main.js CHANGED
@@ -3832,9 +3832,9 @@ async function run() {
3832
3832
  await setupTokenHandler(root);
3833
3833
  });
3834
3834
  // Comando agents - listar agentes configurados
3835
- program.command('agents').description('Listar agentes configurados').option('--setting-sources <sources>', 'Lista de fuentes de configuración a cargar separadas por comas (user, project, local).').action(async () => {
3835
+ program.command('agents').description('Listar agentes configurados').option('--setting-sources <sources>', 'Lista de fuentes de configuración a cargar separadas por comas (user, project, local).').option('--json', 'Salida en formato JSON estructurado para consumo por herramientas externas').action(async (opts) => {
3836
3836
  const { agentsHandler } = await import('./cli/handlers/agents.js');
3837
- await agentsHandler();
3837
+ await agentsHandler({ json: !!opts.json });
3838
3838
  process.exit(0);
3839
3839
  });
3840
3840
  if (feature('TRANSCRIPT_CLASSIFIER')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iaforged/context-code",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "description": "Context Code es un asistente de desarrollo para la terminal. Puede revisar tu proyecto, editar archivos, ejecutar comandos y apoyarte en tareas reales de programacion.",
5
5
  "author": "Context AI",
6
6
  "license": "MIT",