@adecore/agents 0.31.10 → 0.31.12

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.
@@ -332,6 +332,8 @@ function str(value) {
332
332
  return typeof value === 'string' && value !== '' ? value : null;
333
333
  }
334
334
  /* A field of the agent's own input, which no schema promises; the first one that is a non-empty string. */
335
+ // Where agents put the command a call runs; Antigravity names it `CommandLine`.
336
+ const COMMAND_KEYS = ['command', 'cmd', 'CommandLine'];
335
337
  function rawField(raw, ...keys) {
336
338
  if (!isRecord(raw)) {
337
339
  return null;
@@ -375,7 +377,7 @@ export function toolRow(tool) {
375
377
  const raw = isRecord(tool.rawInput) ? tool.rawInput : {};
376
378
  switch (tool.kind) {
377
379
  case 'execute':
378
- return { name: 'Bash', input: { ...raw, description, command: rawField(tool.rawInput, 'command', 'cmd') ?? description } };
380
+ return { name: 'Bash', input: { ...raw, description, command: rawField(tool.rawInput, ...COMMAND_KEYS) ?? description } };
379
381
  case 'read':
380
382
  return { name: 'Read', input: { ...raw, description, ...(path === null ? {} : { file_path: path }) } };
381
383
  case 'search':
@@ -548,7 +550,7 @@ export class AcpProtocol {
548
550
  description: tool.title === '' ? null : tool.title,
549
551
  canAllowAlways: options.some((option) => option.kind === 'allow_always')
550
552
  });
551
- const command = rawField(tool.rawInput, 'command', 'cmd');
553
+ const command = rawField(tool.rawInput, ...COMMAND_KEYS);
552
554
  const asked = { kind: tool.kind, title: tool.title === '' ? null : tool.title, commands: [...(command === null ? [] : [command]), ...tool.text] };
553
555
  return { requestId, rpcId, kind: tool.kind, request: asked, events };
554
556
  }
@@ -69,7 +69,8 @@ export class ModelCatalog {
69
69
  legacy: model.legacy === true,
70
70
  isDefault: model.slug === this.data.defaultModel,
71
71
  options: this.profileOf(model.slug)?.options ?? [],
72
- ...(model.minCliVersion === undefined ? {} : { minCliVersion: model.minCliVersion })
72
+ ...(model.minCliVersion === undefined ? {} : { minCliVersion: model.minCliVersion }),
73
+ ...(model.tools === undefined ? {} : { tools: model.tools })
73
74
  }));
74
75
  }
75
76
  /* What a person reads for a model, so an error in a thread names it the way the picker does. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agents",
3
- "version": "0.31.10",
3
+ "version": "0.31.12",
4
4
  "description": "Node-compatible agent chat hosts, providers, accounts, usage and durable task coordination.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -81,8 +81,8 @@
81
81
  "test": "bun --conditions=source test"
82
82
  },
83
83
  "dependencies": {
84
- "@adecore/agent-contracts": "0.31.10",
85
- "@adecore/intelligent-ui": "0.31.10",
84
+ "@adecore/agent-contracts": "0.31.12",
85
+ "@adecore/intelligent-ui": "0.31.12",
86
86
  "zod": "^4.6.5"
87
87
  },
88
88
  "devDependencies": {
@@ -493,6 +493,9 @@ function str(value: unknown): string | null {
493
493
  }
494
494
 
495
495
  /* A field of the agent's own input, which no schema promises; the first one that is a non-empty string. */
496
+ // Where agents put the command a call runs; Antigravity names it `CommandLine`.
497
+ const COMMAND_KEYS = ['command', 'cmd', 'CommandLine'];
498
+
496
499
  function rawField(raw: unknown, ...keys: string[]): string | null {
497
500
  if (!isRecord(raw)) {
498
501
  return null;
@@ -541,7 +544,7 @@ export function toolRow(tool: Pick<ToolState, 'title' | 'name' | 'kind' | 'rawIn
541
544
  const raw = isRecord(tool.rawInput) ? tool.rawInput : {};
542
545
  switch (tool.kind) {
543
546
  case 'execute':
544
- return { name: 'Bash', input: { ...raw, description, command: rawField(tool.rawInput, 'command', 'cmd') ?? description } };
547
+ return { name: 'Bash', input: { ...raw, description, command: rawField(tool.rawInput, ...COMMAND_KEYS) ?? description } };
545
548
  case 'read':
546
549
  return { name: 'Read', input: { ...raw, description, ...(path === null ? {} : { file_path: path }) } };
547
550
  case 'search':
@@ -752,7 +755,7 @@ export class AcpProtocol {
752
755
  description: tool.title === '' ? null : tool.title,
753
756
  canAllowAlways: options.some((option) => option.kind === 'allow_always')
754
757
  });
755
- const command = rawField(tool.rawInput, 'command', 'cmd');
758
+ const command = rawField(tool.rawInput, ...COMMAND_KEYS);
756
759
  const asked = { kind: tool.kind, title: tool.title === '' ? null : tool.title, commands: [...(command === null ? [] : [command]), ...tool.text] };
757
760
  return { requestId, rpcId, kind: tool.kind, request: asked, events };
758
761
  }
@@ -85,7 +85,8 @@ export class ModelCatalog {
85
85
  legacy: model.legacy === true,
86
86
  isDefault: model.slug === this.data.defaultModel,
87
87
  options: this.profileOf(model.slug)?.options ?? [],
88
- ...(model.minCliVersion === undefined ? {} : { minCliVersion: model.minCliVersion })
88
+ ...(model.minCliVersion === undefined ? {} : { minCliVersion: model.minCliVersion }),
89
+ ...(model.tools === undefined ? {} : { tools: model.tools })
89
90
  }));
90
91
  }
91
92