@laburen/delta-cli 0.2.0-canary.10 → 0.2.0-canary.9

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 (69) hide show
  1. package/dist/bin.js +2 -6
  2. package/dist/bin.js.map +1 -1
  3. package/dist/commands/agent-checks.d.ts +1 -3
  4. package/dist/commands/agent-checks.js +2 -35
  5. package/dist/commands/agent-checks.js.map +1 -1
  6. package/dist/commands/agent-run/render.d.ts +5 -15
  7. package/dist/commands/agent-run/render.js +15 -25
  8. package/dist/commands/agent-run/render.js.map +1 -1
  9. package/dist/commands/agent-run.js +17 -55
  10. package/dist/commands/agent-run.js.map +1 -1
  11. package/dist/commands/agent-tools/add.js +5 -26
  12. package/dist/commands/agent-tools/add.js.map +1 -1
  13. package/dist/commands/agent-tools/remove.js +2 -2
  14. package/dist/commands/agent-tools/remove.js.map +1 -1
  15. package/dist/commands/agent-tools/shared.d.ts +9 -16
  16. package/dist/commands/agent-tools/shared.js +12 -25
  17. package/dist/commands/agent-tools/shared.js.map +1 -1
  18. package/dist/commands/auth.js +2 -12
  19. package/dist/commands/auth.js.map +1 -1
  20. package/dist/commands/completion.js +4 -4
  21. package/dist/commands/completion.js.map +1 -1
  22. package/dist/commands/orgs.js +2 -16
  23. package/dist/commands/orgs.js.map +1 -1
  24. package/dist/commands/skill-dir.js +0 -4
  25. package/dist/commands/skill-dir.js.map +1 -1
  26. package/dist/commands/whoami.js +1 -1
  27. package/dist/commands/whoami.js.map +1 -1
  28. package/dist/completion/files.d.ts +0 -2
  29. package/dist/completion/files.js +0 -7
  30. package/dist/completion/files.js.map +1 -1
  31. package/dist/config/link.js +8 -27
  32. package/dist/config/link.js.map +1 -1
  33. package/dist/context.d.ts +0 -2
  34. package/dist/context.js +0 -1
  35. package/dist/context.js.map +1 -1
  36. package/dist/errors.js +20 -249
  37. package/dist/errors.js.map +1 -1
  38. package/dist/generated/commands.d.ts +0 -2
  39. package/dist/generated/commands.js +7 -7
  40. package/dist/generated/commands.js.map +1 -1
  41. package/dist/generated/schemas.js +9 -11
  42. package/dist/generated/schemas.js.map +1 -1
  43. package/dist/invocation.js +1 -17
  44. package/dist/invocation.js.map +1 -1
  45. package/dist/operations/call.js +1 -4
  46. package/dist/operations/call.js.map +1 -1
  47. package/dist/operations/extensions.d.ts +1 -1
  48. package/dist/operations/params.js +2 -13
  49. package/dist/operations/params.js.map +1 -1
  50. package/dist/operations/run-operation.js +7 -9
  51. package/dist/operations/run-operation.js.map +1 -1
  52. package/dist/operations/schema-flag.d.ts +1 -1
  53. package/dist/operations/schema-flag.js.map +1 -1
  54. package/dist/operations/tables.d.ts +1 -5
  55. package/dist/operations/tables.js +2 -81
  56. package/dist/operations/tables.js.map +1 -1
  57. package/dist/output.d.ts +1 -12
  58. package/dist/output.js +10 -162
  59. package/dist/output.js.map +1 -1
  60. package/dist/program.js +3 -12
  61. package/dist/program.js.map +1 -1
  62. package/docs/SKILL.md +7 -74
  63. package/docs/references/auth-and-organizations.md +3 -3
  64. package/docs/references/commands.md +17 -48
  65. package/docs/references/output-and-errors.md +9 -27
  66. package/package.json +2 -2
  67. package/dist/stdout-policy.d.ts +0 -4
  68. package/dist/stdout-policy.js +0 -11
  69. package/dist/stdout-policy.js.map +0 -1
package/dist/errors.js CHANGED
@@ -51,192 +51,32 @@ function fillIds(parts, ids = {}) {
51
51
  });
52
52
  return ["laburen", ...words].join(" ");
53
53
  }
54
- /** El valor de una opción (`--name x` o `--name=x`) en los argumentos que escribió la persona. */
55
- function optionValue(args = [], flag) {
56
- for (let i = 0; i < args.length; i++) {
57
- const arg = args[i];
58
- if (arg === "--")
59
- return undefined;
60
- if (arg === flag)
61
- return args[i + 1];
62
- if (arg.startsWith(`${flag}=`))
63
- return arg.slice(flag.length + 1);
64
- }
65
- return undefined;
66
- }
67
- /** Los campos de `details.field` que se arreglan eligiendo otro modelo o nivel de reasoning de los que ofrece la API. */
68
- const MODEL_FIELDS = new Set([
69
- "model",
70
- "model_settings.reasoning",
71
- "config.model.id",
72
- "config.model.reasoningEffort",
73
- "config.model.reasoning_effort",
74
- ]);
75
- function agentVersionsOf(details) {
76
- if (!Array.isArray(details.agent_versions))
77
- return [];
78
- return details.agent_versions.filter((v) => typeof v === "object" &&
79
- v !== null &&
80
- typeof v.agent_id === "string" &&
81
- typeof v.version_id === "string");
82
- }
83
- /** `args` con el flag en `value`: si ya estaba se reemplaza, y se suma antes de un `--` para que siga siendo un flag. */
84
- function withOptionValue(args, flag, value) {
85
- const rest = withoutOption(args, flag);
86
- const end = rest.indexOf("--");
87
- return end === -1
88
- ? [...rest, flag, value]
89
- : [...rest.slice(0, end), flag, value, ...rest.slice(end)];
90
- }
91
- /**
92
- * El comando que muestra si un pedido que sigue corriendo ya hizo efecto: el `list` (o `get`) del recurso que
93
- * crea o edita el comando. `agents run` no tiene uno: no hay cómo ver desde la CLI un turno en curso.
94
- */
95
- function idempotencyCheckCommand(hints) {
96
- const path = hints.command;
97
- if (!path || path.length < 2)
98
- return undefined;
99
- const group = path.slice(0, -1);
100
- const verb = path[path.length - 1];
101
- const candidates = verb === "create"
102
- ? [[...group, "list"]]
103
- : verb === "update" || verb === "restore" || verb === "activate"
104
- ? [
105
- [...group, "versions", "list"],
106
- [...group, "get"],
107
- [...group, "list"],
108
- ]
109
- : [];
110
- for (const candidate of candidates) {
111
- const op = OPERATION_COMMANDS.find((o) => o.path.join(" ") === candidate.join(" "));
112
- if (!op)
113
- continue;
114
- const parts = [...candidate, ...op.positionals.map((name) => `<${name}>`)];
115
- const name = optionValue(hints.args, "--name");
116
- if (name !== undefined && op.queryFlags.some((f) => f.flag === "--search")) {
117
- parts.push("--search", name);
118
- }
119
- return fillIds(parts, hints.ids);
120
- }
121
- return undefined;
122
- }
123
54
  /** `next` de los errores comunes de la API (Q9): a qué comando ir según el `code`. */
124
- function apiNext(code, hints, details = {}, message = "") {
125
- // Una versión con la tool `thinking` y un modelo que razona: `models list` no lo arregla, hay que apagar el reasoning de la corrida o correr otra versión.
126
- if (code === "invalid_request" &&
127
- details.field === "model_settings.reasoning" &&
128
- /thinking tool/.test(message)) {
129
- const steps = [];
130
- // Solo si el modelo puede apagar el reasoning; uno que "always reasons" no acepta `off`.
131
- if (/already reasons/.test(message)) {
132
- steps.push({
133
- command: hints.args?.length
134
- ? commandText(withOptionValue(hints.args, "--reasoning", "off"))
135
- : "laburen agents run <agent_id> <message> --reasoning off",
136
- when: "to run it with reasoning off, which the thinking tool allows",
137
- });
138
- }
139
- steps.push({
140
- command: fillIds(["agents", "versions", "list", "<agent_id>"], hints.ids),
141
- when: "to find a version without the thinking tool; run it with --version-id",
142
- });
143
- return steps;
144
- }
145
- // El nombre o el nivel de reasoning no es de los que ofrece la API: `models list` dice cuáles hay.
146
- // Hay errores de forma ("must be a non-empty string") que `models list` no arregla: solo cuando el mensaje dice que no se ofrece.
147
- if ((code === "invalid_request" || code === "invalid_agent_config") &&
148
- typeof details.field === "string" &&
149
- MODEL_FIELDS.has(details.field) &&
150
- /not offered|is invalid|not allowed/.test(message)) {
151
- return [
152
- {
153
- command: "laburen models list",
154
- when: "the model or reasoning level is not available; to see the offered models and their reasoning levels",
155
- },
156
- ];
157
- }
158
- // Repetir el comando manda un pedido nuevo (otra key) y puede duplicar: primero se mira si el primero ya hizo efecto.
159
- if (code === "idempotency_key_in_progress") {
160
- const check = idempotencyCheckCommand(hints);
161
- return check
162
- ? [
163
- {
164
- command: check,
165
- when: "the first request is still running and may finish; wait, then check here that it did not apply before running the command again (running it again sends a new request and can duplicate)",
166
- },
167
- ]
168
- : [];
169
- }
55
+ function apiNext(code, hints) {
170
56
  if (code === "organization_access_denied") {
171
- return [
172
- {
173
- command: "laburen orgs list",
174
- when: "to see the organizations you can use",
175
- omitGlobals: ["--org"],
176
- },
177
- ];
57
+ return [{ command: "laburen orgs list", when: "to see the organizations you can use" }];
178
58
  }
179
- // `whoami` muestra los permisos del token y anda con cualquier token.
180
59
  if (code === "insufficient_permissions") {
181
60
  return [
182
61
  {
183
- command: "laburen whoami",
184
- when: "the token you used does not have the permission this command needs; whoami shows the permissions it has",
62
+ command: "laburen tokens list",
63
+ when: "the token you used does not have the permission this command needs; check the permissions of your tokens",
185
64
  },
186
65
  ];
187
66
  }
188
67
  if (code === "skill_name_taken") {
189
- const name = optionValue(hints.args, "--name");
190
- return [
191
- name === undefined
192
- ? {
193
- command: "laburen skills list --search <value>",
194
- when: "to find the skill that already has this name (put the name instead of <value>)",
195
- }
196
- : {
197
- command: fillIds(["skills", "list", "--search", name]),
198
- when: "to find the skill that already has this name",
199
- },
200
- ];
68
+ return [{ command: "laburen skills list", when: "to see the skill names already taken" }];
201
69
  }
202
70
  if (code === "mcp_connection_name_taken") {
203
- const name = optionValue(hints.args, "--name");
204
71
  return [
205
- name === undefined
206
- ? {
207
- command: "laburen mcp connections list --search <value>",
208
- when: "to find the connection that already has this name (put the name instead of <value>)",
209
- }
210
- : {
211
- command: fillIds(["mcp", "connections", "list", "--search", name]),
212
- when: "to find the connection that already has this name",
213
- },
72
+ {
73
+ command: "laburen mcp connections list --search <value>",
74
+ when: "to find the connection that already has this name (put the name instead of <value>)",
75
+ },
214
76
  ];
215
77
  }
216
- // `details.agent_ids` dice qué agentes usan el recurso: se ve de cada uno qué versión lo tiene.
78
+ // La API no dice qué versiones de agente usan el recurso (solo cuántas): la ayuda dice cómo seguir.
217
79
  if (code === "resource_in_use") {
218
- // Con `agent_versions` se sabe cuáles borrar: solo `is_active === false` se borra; la activa o dudosa, esa se mira para cambiarla primero.
219
- const versions = agentVersionsOf(details);
220
- if (versions.length > 0) {
221
- return versions.map((v) => v.is_active !== false
222
- ? {
223
- command: fillIds(["agents", "versions", "get", v.agent_id, v.version_id]),
224
- when: "this is the active version: create a new version without the resource (agents update … --activate) before deleting",
225
- }
226
- : {
227
- command: fillIds(["agents", "versions", "delete", v.agent_id, v.version_id]),
228
- when: "this inactive version uses the resource; delete it, then retry",
229
- });
230
- }
231
- const agentIds = Array.isArray(details.agent_ids)
232
- ? details.agent_ids.filter((id) => typeof id === "string")
233
- : [];
234
- if (agentIds.length > 0) {
235
- return agentIds.map((id) => ({
236
- command: fillIds(["agents", "versions", "list", id]),
237
- when: "this agent has versions that use the resource; versions are not editable: delete those versions (inactive ones can be deleted) or the agent itself, then retry",
238
- }));
239
- }
240
80
  return [
241
81
  {
242
82
  command: helpCommand(hints.command),
@@ -244,51 +84,6 @@ function apiNext(code, hints, details = {}, message = "") {
244
84
  },
245
85
  ];
246
86
  }
247
- // El mismo comando sin el flag que no encaja con la conversación existente.
248
- if (code === "thread_resource_mismatch" || code === "conversation_not_found") {
249
- const flag = code === "thread_resource_mismatch" ? "--resource" : "--thread";
250
- return [
251
- {
252
- command: hints.args?.length
253
- ? commandText(withoutOption(hints.args, flag))
254
- : `laburen agents run <agent_id> <message>`,
255
- when: code === "thread_resource_mismatch"
256
- ? "to run it without --resource (the thread already belongs to another end user)"
257
- : "to run it without --thread and start a new conversation",
258
- },
259
- ];
260
- }
261
- // La IA está apagada en ese hilo (la tomó una persona): el mismo comando sin `--thread` abre una conversación nueva.
262
- if (code === "ai_disabled_for_conversation") {
263
- return [
264
- {
265
- command: hints.args?.length
266
- ? commandText(withoutOption(hints.args, "--thread"))
267
- : "laburen agents run <agent_id> <message>",
268
- when: "the AI is off in that thread (a human took over); to run it without --thread and start a new conversation",
269
- },
270
- ];
271
- }
272
- // Un id de `config.knowledge.project_ids` que no existe en la organización: `knowledge projects list` dice cuáles hay.
273
- if ((code === "invalid_request" || code === "invalid_agent_config") &&
274
- typeof details.field === "string" &&
275
- details.field.startsWith("config.knowledge.project_ids")) {
276
- return [
277
- {
278
- command: "laburen knowledge projects list",
279
- when: "to see the knowledge project ids of this organization",
280
- },
281
- ];
282
- }
283
- // `mcp connections versions list` tiene la columna HOST: ahí se ve a qué host apunta cada versión.
284
- if (code === "mcp_server_unreachable") {
285
- return [
286
- {
287
- command: fillIds(["mcp", "connections", "versions", "list", "<connection_id>"], hints.ids),
288
- when: "to see the host each version of the connection points to (HOST column)",
289
- },
290
- ];
291
- }
292
87
  // Alguien creó otra versión después de la lectura (E19): se ven las versiones y se corre de nuevo el comando.
293
88
  if (code === "base_version_mismatch") {
294
89
  const parent = hints.command?.[0] === "mcp" ? "mcp" : "agents";
@@ -302,26 +97,6 @@ function apiNext(code, hints, details = {}, message = "") {
302
97
  },
303
98
  ];
304
99
  }
305
- // Un agente sin versión activa no se puede correr: se ven sus versiones y se activa una.
306
- // Otros invalid_agent_config (una versión con la config rota) no se arreglan activando: caen en el `--help` genérico.
307
- if (code === "invalid_agent_config" &&
308
- hints.command?.join(" ") === "agents run" &&
309
- /no active version/i.test(message)) {
310
- return [
311
- {
312
- command: fillIds(["agents", "versions", "list", "<agent_id>"], hints.ids),
313
- when: "the agent has no active version; see its versions",
314
- },
315
- {
316
- command: fillIds(["agents", "versions", "activate", "<agent_id>", "<version_id>"], hints.ids),
317
- when: "to make one the active version, then run again",
318
- },
319
- {
320
- command: fillIds(["agents", "versions", "create", "<agent_id>", "--config", "@config.json"], hints.ids),
321
- when: "or create a first version from a config file, then activate it",
322
- },
323
- ];
324
- }
325
100
  const list = NOT_FOUND_LIST[code];
326
101
  if (list)
327
102
  return [{ command: fillIds(list, hints.ids), when: "to see the ids that exist" }];
@@ -353,13 +128,7 @@ export function toCliError(err, hints = {}) {
353
128
  // Commander repite el flag tal cual (`unknown option '--api-key=x'`): sin ningún valor, sea o no secreto (M6).
354
129
  const message = redactSecrets(err.message.replace(/^error: /, ""), hints.args ?? []).replace(/(--[\w-]+)=[^'\s]*/g, `$1=${VALUE_PLACEHOLDER}`);
355
130
  const missing = err.code.includes("missing") || err.code.includes("Missing");
356
- // Un valor fuera de la lista de un flag de opciones (`--reasoning ultra`) es un valor inválido, no argumentos mal armados (C12).
357
- const reason = missing
358
- ? "missing_arguments"
359
- : err.code === "commander.invalidArgument"
360
- ? "invalid_flag_value"
361
- : "invalid_arguments";
362
- return new CliError(reason, message, 2, [
131
+ return new CliError(missing ? "missing_arguments" : "invalid_arguments", message, 2, [
363
132
  { command: helpCommand(hints.command), when: "to see the arguments and flags it accepts" },
364
133
  ]);
365
134
  }
@@ -379,16 +148,18 @@ export function toCliError(err, hints = {}) {
379
148
  { command: rerun, when: "to run it for one of those organizations" },
380
149
  ], requestId, extra);
381
150
  }
382
- const next = apiNext(reason, hints, err.details, err.message);
383
- if (hints.continueCommand) {
151
+ const next = apiNext(reason, hints);
152
+ // Un pedido que la API rechaza por inválido se arregla mirando qué acepta el comando (Q16).
153
+ if (err.status === 200) {
384
154
  // Un error a mitad del stream (de cualquier familia) no es un pedido mal armado: `--help` no sirve, seguir el thread sí.
385
- next.push({
386
- command: hints.continueCommand,
387
- when: "to keep going with the same conversation",
388
- });
155
+ if (hints.continueCommand) {
156
+ next.push({
157
+ command: hints.continueCommand,
158
+ when: "to keep going with the same conversation",
159
+ });
160
+ }
389
161
  }
390
162
  else if (next.length === 0 && err.type === "invalid_request_error" && hints.command?.length) {
391
- // Un pedido que la API rechaza por inválido se arregla mirando qué acepta el comando (Q16).
392
163
  next.push({
393
164
  command: helpCommand(hints.command),
394
165
  when: "to see the arguments and flags it accepts",
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACN,WAAW,EACX,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,aAAa,GACb,MAAM,iBAAiB,CAAC;AAiCzB,uHAAuH;AACvH,MAAM,OAAO,QAAS,SAAQ,KAAK;IAOxB;IAEA;IACA;IACA;IAVD,MAAM,CAAe;IACrB,OAAO,CAA0B;IACjC,kBAAkB,CAAU;IAC5B,OAAO,CAA4B;IAE5C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O,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACrE,CAAC;IACD,IAAI,wBAAwB,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,iFAAiF;QACjF,MAAM,OAAO,GAAG,qBAAqB,CAAC,GAAG,CAAC;YACzC,CAAC,CAAC,yCAAyC;YAC3C,CAAC,CAAC,wGAAwG,CAAC;QAC5G,OAAO,IAAI,QAAQ,CAAC,eAAe,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE;YAC/D,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE;SAC/B,CAAC,CAAC;IACJ,CAAC;IACD,IAAI,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,IAAI,QAAQ,CAAC,kBAAkB,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9F,CAAC"}
@@ -4,8 +4,6 @@ export interface FlagSpec {
4
4
  flag: string;
5
5
  type: "string" | "number" | "boolean" | "json";
6
6
  required: boolean;
7
- /** El campo acepta null en el contrato: el valor `null` del flag manda null de verdad. */
8
- nullable?: boolean;
9
7
  /** Qué es el campo, tal como lo dice el contrato; el `--help` la muestra. */
10
8
  description?: string;
11
9
  /** Valores que acepta, si el contrato los enumera (`enum` o `const`); en un flag `json` de lista, los de cada ítem. */
@@ -1,13 +1,13 @@
1
1
  // GENERADO por scripts/generate-commands.mjs a partir de ../delta-sdk/contract/openapi.json. No editar a mano.
2
2
  export const OPERATION_COMMANDS = [
3
- { "id": "agents.create", "path": ["agents", "create"], "summary": "Create a Mastra agent; with config it also creates its first version.", "positionals": [], "queryFlags": [], "bodyFlags": [{ "name": "activate", "flag": "--activate", "type": "boolean", "required": false, "description": "Whether to make the new version the active one. Requires config. Defaults to true." }, { "name": "config", "flag": "--config", "type": "json", "required": false, "description": "Config of the first version. When omitted, no version is created." }, { "name": "description", "flag": "--description", "type": "string", "required": false, "description": "What the agent is for. Defaults to an empty string." }, { "name": "harness_type", "flag": "--harness-type", "type": "string", "required": true, "description": "Runtime of the agent. Only `mastra` can be created through this API.", "values": ["mastra"] }, { "name": "mcp_connections", "flag": "--mcp-connections", "type": "json", "required": false, "description": "MCP connections to assign. Requires config. Each connection_id is the id of an MCP connection of the organization." }, { "name": "name", "flag": "--name", "type": "string", "required": true, "description": "Name of the agent." }, { "name": "skills", "flag": "--skills", "type": "json", "required": false, "description": "Skills to assign. Requires config. Each skill_id is the id of a skill of the organization." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": {} },
3
+ { "id": "agents.create", "path": ["agents", "create"], "summary": "Create a Mastra agent; with config it also creates its first version.", "positionals": [], "queryFlags": [], "bodyFlags": [{ "name": "activate", "flag": "--activate", "type": "boolean", "required": false, "description": "Whether to make the new version the active one. Requires config. Defaults to true." }, { "name": "config", "flag": "--config", "type": "json", "required": false, "description": "Config of the first version. When omitted, no version is created." }, { "name": "description", "flag": "--description", "type": "string", "required": false, "description": "What the agent is for. Defaults to an empty string." }, { "name": "harness_type", "flag": "--harness-type", "type": "string", "required": true, "description": "Runtime of the agent. Only `mastra` can be created through this API.", "values": ["mastra"] }, { "name": "mcp_connections", "flag": "--mcp-connections", "type": "json", "required": false, "description": "MCP connections to assign. Requires config. Each connection_id comes from `laburen mcp connections create` or `mcp connections list`." }, { "name": "name", "flag": "--name", "type": "string", "required": true, "description": "Name of the agent." }, { "name": "skills", "flag": "--skills", "type": "json", "required": false, "description": "Skills to assign. Requires config. Each skill_id comes from `laburen skills create` or `skills list`." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": {} },
4
4
  { "id": "agents.delete", "path": ["agents", "delete"], "summary": "Delete a Mastra agent.", "positionals": ["agent_id"], "queryFlags": [], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": true, "idSources": { "agent_id": { "list": "agents.list", "needs": [] } } },
5
5
  { "id": "agents.get", "path": ["agents", "get"], "summary": "Get an agent.", "positionals": ["agent_id"], "queryFlags": [], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "agent_id": { "list": "agents.list", "needs": [] } } },
6
6
  { "id": "agents.list", "path": ["agents", "list"], "summary": "List the agents of the organization.", "positionals": [], "queryFlags": [{ "name": "limit", "flag": "--limit", "type": "number", "required": false, "description": "Maximum number of items to return (1 to 100)." }, { "name": "after_id", "flag": "--after-id", "type": "string", "required": false, "description": "Cursor: return the items after this id. Use the `last_id` of the previous page." }, { "name": "before_id", "flag": "--before-id", "type": "string", "required": false, "description": "Cursor: return the items before this id. Use the `first_id` of the previous page." }, { "name": "search", "flag": "--search", "type": "string", "required": false, "description": "Case-insensitive filter by name." }], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": true, "destructive": false, "idSources": {}, "choice": { "label": "name" } },
7
- { "id": "agents.update", "path": ["agents", "update"], "summary": "Edit name and description; config, skills or MCP connections create a new version.", "positionals": ["agent_id"], "queryFlags": [], "bodyFlags": [{ "name": "activate", "flag": "--activate", "type": "boolean", "required": false, "description": "Whether to make the new version the active one. Only applies when a version is created. Defaults to false." }, { "name": "base_version_id", "flag": "--base-version-id", "type": "string", "required": false, "nullable": true, "description": "Id of the version you based this change on. If it is not the latest version, the call fails with 409 `base_version_mismatch` and `details.latest_version_id`. Send `null` to say the resource has no versions yet; omit it to skip the check." }, { "name": "change_message", "flag": "--change-message", "type": "string", "required": false, "description": "Note stored with the new version. Used only when a version is created." }, { "name": "config", "flag": "--config", "type": "json", "required": false, "description": "Changes to the config. Creates a new version." }, { "name": "description", "flag": "--description", "type": "string", "required": false, "description": "New description of the agent." }, { "name": "mcp_connections", "flag": "--mcp-connections", "type": "json", "required": false, "description": "Replaces the assigned MCP connections. Creates a new version. Each connection_id is the id of an MCP connection of the organization." }, { "name": "name", "flag": "--name", "type": "string", "required": false, "description": "New name of the agent." }, { "name": "skills", "flag": "--skills", "type": "json", "required": false, "description": "Replaces the assigned skills. Creates a new version. Each skill_id is the id of a skill of the organization." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "agent_id": { "list": "agents.list", "needs": [] } } },
7
+ { "id": "agents.update", "path": ["agents", "update"], "summary": "Edit name and description; config, skills or MCP connections create a new version.", "positionals": ["agent_id"], "queryFlags": [], "bodyFlags": [{ "name": "activate", "flag": "--activate", "type": "boolean", "required": false, "description": "Whether to make the new version the active one. Only applies when a version is created. Defaults to false." }, { "name": "base_version_id", "flag": "--base-version-id", "type": "string", "required": false, "description": "Id of the version you based this change on. If it is not the latest version, the call fails with 409 `base_version_mismatch` and `details.latest_version_id`. Send `null` to say the resource has no versions yet; omit it to skip the check." }, { "name": "change_message", "flag": "--change-message", "type": "string", "required": false, "description": "Note stored with the new version. Used only when a version is created." }, { "name": "config", "flag": "--config", "type": "json", "required": false, "description": "Changes to the config. Creates a new version." }, { "name": "description", "flag": "--description", "type": "string", "required": false, "description": "New description of the agent." }, { "name": "mcp_connections", "flag": "--mcp-connections", "type": "json", "required": false, "description": "Replaces the assigned MCP connections. Creates a new version. Each connection_id comes from `laburen mcp connections create` or `mcp connections list`." }, { "name": "name", "flag": "--name", "type": "string", "required": false, "description": "New name of the agent." }, { "name": "skills", "flag": "--skills", "type": "json", "required": false, "description": "Replaces the assigned skills. Creates a new version. Each skill_id comes from `laburen skills create` or `skills list`." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "agent_id": { "list": "agents.list", "needs": [] } } },
8
8
  { "id": "agents.versions.activate", "path": ["agents", "versions", "activate"], "summary": "Make a version the active one.", "positionals": ["agent_id", "version_id"], "queryFlags": [], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "agent_id": { "list": "agents.list", "needs": [] }, "version_id": { "list": "agents.versions.list", "needs": ["agent_id"] } } },
9
9
  { "id": "agents.versions.compare", "path": ["agents", "versions", "compare"], "summary": "Compare two versions of the agent.", "positionals": ["agent_id"], "queryFlags": [{ "name": "from", "flag": "--from", "type": "string", "required": true, "description": "Id of the version to compare from." }, { "name": "to", "flag": "--to", "type": "string", "required": true, "description": "Id of the version to compare to." }], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "agent_id": { "list": "agents.list", "needs": [] } }, "compareSource": { "list": "agents.versions.list", "needs": ["agent_id"] } },
10
- { "id": "agents.versions.create", "path": ["agents", "versions", "create"], "summary": "Create a version of the agent without activating it.", "positionals": ["agent_id"], "queryFlags": [], "bodyFlags": [{ "name": "base_version_id", "flag": "--base-version-id", "type": "string", "required": false, "nullable": true, "description": "Id of the version you based this change on. If it is not the latest version, the call fails with 409 `base_version_mismatch` and `details.latest_version_id`. Send `null` to say the resource has no versions yet; omit it to skip the check." }, { "name": "change_message", "flag": "--change-message", "type": "string", "required": false, "description": "Note stored with the version." }, { "name": "config", "flag": "--config", "type": "json", "required": true, "description": "Config to create an agent version. `model` is required; omitted keys use their defaults." }, { "name": "mcp_connections", "flag": "--mcp-connections", "type": "json", "required": false, "description": "MCP connections to assign. Each connection_id is the id of an MCP connection of the organization." }, { "name": "skills", "flag": "--skills", "type": "json", "required": false, "description": "Skills to assign. Each skill_id is the id of a skill of the organization." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "agent_id": { "list": "agents.list", "needs": [] } } },
10
+ { "id": "agents.versions.create", "path": ["agents", "versions", "create"], "summary": "Create a version of the agent without activating it.", "positionals": ["agent_id"], "queryFlags": [], "bodyFlags": [{ "name": "base_version_id", "flag": "--base-version-id", "type": "string", "required": false, "description": "Id of the version you based this change on. If it is not the latest version, the call fails with 409 `base_version_mismatch` and `details.latest_version_id`. Send `null` to say the resource has no versions yet; omit it to skip the check." }, { "name": "change_message", "flag": "--change-message", "type": "string", "required": false, "description": "Note stored with the version." }, { "name": "config", "flag": "--config", "type": "json", "required": true, "description": "Config to create an agent version. `model` is required; omitted keys use their defaults." }, { "name": "mcp_connections", "flag": "--mcp-connections", "type": "json", "required": false, "description": "MCP connections to assign. Each connection_id comes from `laburen mcp connections create` or `mcp connections list`." }, { "name": "skills", "flag": "--skills", "type": "json", "required": false, "description": "Skills to assign. Each skill_id comes from `laburen skills create` or `skills list`." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "agent_id": { "list": "agents.list", "needs": [] } } },
11
11
  { "id": "agents.versions.delete", "path": ["agents", "versions", "delete"], "summary": "Delete a version that is not the active one.", "positionals": ["agent_id", "version_id"], "queryFlags": [], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": true, "idSources": { "agent_id": { "list": "agents.list", "needs": [] }, "version_id": { "list": "agents.versions.list", "needs": ["agent_id"] } } },
12
12
  { "id": "agents.versions.get", "path": ["agents", "versions", "get"], "summary": "Get a version of the agent.", "positionals": ["agent_id", "version_id"], "queryFlags": [], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "agent_id": { "list": "agents.list", "needs": [] }, "version_id": { "list": "agents.versions.list", "needs": ["agent_id"] } } },
13
13
  { "id": "agents.versions.list", "path": ["agents", "versions", "list"], "summary": "List the versions of the agent, newest first.", "positionals": ["agent_id"], "queryFlags": [{ "name": "limit", "flag": "--limit", "type": "number", "required": false, "description": "Maximum number of items to return (1 to 100)." }, { "name": "after_id", "flag": "--after-id", "type": "string", "required": false, "description": "Cursor: return the items after this id. Use the `last_id` of the previous page." }, { "name": "before_id", "flag": "--before-id", "type": "string", "required": false, "description": "Cursor: return the items before this id. Use the `first_id` of the previous page." }], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": true, "destructive": false, "idSources": { "agent_id": { "list": "agents.list", "needs": [] } }, "choice": { "label": "version_number", "current": "is_active" } },
@@ -21,15 +21,15 @@ export const OPERATION_COMMANDS = [
21
21
  { "id": "mcp.connections.update", "path": ["mcp", "connections", "update"], "summary": "Rename an MCP connection.", "positionals": ["connection_id"], "queryFlags": [], "bodyFlags": [{ "name": "name", "flag": "--name", "type": "string", "required": true, "description": "New name of the connection." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "connection_id": { "list": "mcp.connections.list", "needs": [] } } },
22
22
  { "id": "mcp.connections.versions.activate", "path": ["mcp", "connections", "versions", "activate"], "summary": "Make a version the active one.", "positionals": ["connection_id", "version_id"], "queryFlags": [], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "connection_id": { "list": "mcp.connections.list", "needs": [] }, "version_id": { "list": "mcp.connections.versions.list", "needs": ["connection_id"] } } },
23
23
  { "id": "mcp.connections.versions.compare", "path": ["mcp", "connections", "versions", "compare"], "summary": "Compare two versions of the connection.", "positionals": ["connection_id"], "queryFlags": [{ "name": "from", "flag": "--from", "type": "string", "required": true, "description": "Id of the version to compare from." }, { "name": "to", "flag": "--to", "type": "string", "required": true, "description": "Id of the version to compare to." }], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "connection_id": { "list": "mcp.connections.list", "needs": [] } }, "compareSource": { "list": "mcp.connections.versions.list", "needs": ["connection_id"] } },
24
- { "id": "mcp.connections.versions.create", "path": ["mcp", "connections", "versions", "create"], "summary": "Create a version of the connection without activating it.", "positionals": ["connection_id"], "queryFlags": [], "bodyFlags": [{ "name": "base_version_id", "flag": "--base-version-id", "type": "string", "required": false, "nullable": true, "description": "Id of the version you based this change on. If it is not the latest version, the call fails with 409 `base_version_mismatch` and `details.latest_version_id`. Send `null` to say the resource has no versions yet; omit it to skip the check." }, { "name": "change_message", "flag": "--change-message", "type": "string", "required": false, "description": "Note stored with the version." }, { "name": "headers", "flag": "--headers", "type": "json", "required": false, "description": "Headers sent to the MCP server: name to value. Omit it to keep the headers of the latest version; send `{}` to remove them." }, { "name": "url", "flag": "--url", "type": "string", "required": false, "description": "URL of the MCP server. Omit it to keep the URL of the latest version." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "connection_id": { "list": "mcp.connections.list", "needs": [] } } },
24
+ { "id": "mcp.connections.versions.create", "path": ["mcp", "connections", "versions", "create"], "summary": "Create a version of the connection without activating it.", "positionals": ["connection_id"], "queryFlags": [], "bodyFlags": [{ "name": "base_version_id", "flag": "--base-version-id", "type": "string", "required": false, "description": "Id of the version you based this change on. If it is not the latest version, the call fails with 409 `base_version_mismatch` and `details.latest_version_id`. Send `null` to say the resource has no versions yet; omit it to skip the check." }, { "name": "change_message", "flag": "--change-message", "type": "string", "required": false, "description": "Note stored with the version." }, { "name": "headers", "flag": "--headers", "type": "json", "required": false, "description": "Headers sent to the MCP server: name to value." }, { "name": "url", "flag": "--url", "type": "string", "required": true, "description": "URL of the MCP server." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "connection_id": { "list": "mcp.connections.list", "needs": [] } } },
25
25
  { "id": "mcp.connections.versions.delete", "path": ["mcp", "connections", "versions", "delete"], "summary": "Delete a version that is neither the active one nor pinned by an agent.", "positionals": ["connection_id", "version_id"], "queryFlags": [], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": true, "idSources": { "connection_id": { "list": "mcp.connections.list", "needs": [] }, "version_id": { "list": "mcp.connections.versions.list", "needs": ["connection_id"] } } },
26
26
  { "id": "mcp.connections.versions.get", "path": ["mcp", "connections", "versions", "get"], "summary": "Get a version of the connection.", "positionals": ["connection_id", "version_id"], "queryFlags": [], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "connection_id": { "list": "mcp.connections.list", "needs": [] }, "version_id": { "list": "mcp.connections.versions.list", "needs": ["connection_id"] } } },
27
27
  { "id": "mcp.connections.versions.list", "path": ["mcp", "connections", "versions", "list"], "summary": "List the versions of the connection, newest first.", "positionals": ["connection_id"], "queryFlags": [{ "name": "limit", "flag": "--limit", "type": "number", "required": false, "description": "Maximum number of items to return (1 to 100)." }, { "name": "after_id", "flag": "--after-id", "type": "string", "required": false, "description": "Cursor: return the items after this id. Use the `last_id` of the previous page." }, { "name": "before_id", "flag": "--before-id", "type": "string", "required": false, "description": "Cursor: return the items before this id. Use the `first_id` of the previous page." }], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": true, "destructive": false, "idSources": { "connection_id": { "list": "mcp.connections.list", "needs": [] } }, "choice": { "label": "version_number", "current": "is_active" } },
28
28
  { "id": "mcp.connections.versions.restore", "path": ["mcp", "connections", "versions", "restore"], "summary": "Create a new version by copying an earlier one; it is activated unless activate is false.", "positionals": ["connection_id", "version_id"], "queryFlags": [], "bodyFlags": [{ "name": "activate", "flag": "--activate", "type": "boolean", "required": false, "description": "Whether to make the restored copy the active version. Defaults to true." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "connection_id": { "list": "mcp.connections.list", "needs": [] }, "version_id": { "list": "mcp.connections.versions.list", "needs": ["connection_id"] } } },
29
29
  { "id": "me.get", "path": ["me", "get"], "summary": "Show who is calling and with which credential and permissions.", "positionals": [], "queryFlags": [], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": {} },
30
30
  { "id": "me.organizations.list", "path": ["me", "organizations", "list"], "summary": "List the organizations of the caller; does not need the X-Laburen-Organization header.", "positionals": [], "queryFlags": [{ "name": "limit", "flag": "--limit", "type": "number", "required": false, "description": "Maximum number of items to return (1 to 100)." }, { "name": "after_id", "flag": "--after-id", "type": "string", "required": false, "description": "Cursor: return the items after this id. Use the `last_id` of the previous page." }, { "name": "before_id", "flag": "--before-id", "type": "string", "required": false, "description": "Cursor: return the items before this id. Use the `first_id` of the previous page." }], "bodyFlags": [], "hasBody": false, "organizationHeader": false, "paginated": true, "destructive": false, "idSources": {}, "choice": { "label": "name" } },
31
- { "id": "models.list", "path": ["models", "list"], "summary": "List the models an agent can use.", "positionals": [], "queryFlags": [{ "name": "limit", "flag": "--limit", "type": "number", "required": false, "description": "Maximum number of items to return (1 to 100)." }, { "name": "after_id", "flag": "--after-id", "type": "string", "required": false, "description": "Cursor: return the items after this id. Use the `last_id` of the previous page." }, { "name": "before_id", "flag": "--before-id", "type": "string", "required": false, "description": "Cursor: return the items before this id. Use the `first_id` of the previous page." }, { "name": "search", "flag": "--search", "type": "string", "required": false, "description": "Case-insensitive filter by model id or display name." }], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": true, "destructive": false, "idSources": {}, "choice": { "label": "id" } },
32
- { "id": "skills.create", "path": ["skills", "create"], "summary": "Create a skill with its first version, active unless activate is false.", "positionals": [], "queryFlags": [], "bodyFlags": [{ "name": "activate", "flag": "--activate", "type": "boolean", "required": false, "description": "Whether to make the first version the active one. Defaults to true." }, { "name": "change_message", "flag": "--change-message", "type": "string", "required": false, "description": "Note stored with the first version." }, { "name": "files", "flag": "--files", "type": "json", "required": true, "description": "Files of the skill: path to content. `SKILL.md` is required." }, { "name": "name", "flag": "--name", "type": "string", "required": true, "description": "Name of the skill." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": {} },
31
+ { "id": "models.list", "path": ["models", "list"], "summary": "List the models an agent can use.", "positionals": [], "queryFlags": [{ "name": "limit", "flag": "--limit", "type": "number", "required": false, "description": "Maximum number of items to return (1 to 100)." }, { "name": "after_id", "flag": "--after-id", "type": "string", "required": false, "description": "Cursor: return the items after this id. Use the `last_id` of the previous page." }, { "name": "before_id", "flag": "--before-id", "type": "string", "required": false, "description": "Cursor: return the items before this id. Use the `first_id` of the previous page." }], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": true, "destructive": false, "idSources": {}, "choice": { "label": "id" } },
32
+ { "id": "skills.create", "path": ["skills", "create"], "summary": "Create a skill (as a draft) with its first version.", "positionals": [], "queryFlags": [], "bodyFlags": [{ "name": "change_message", "flag": "--change-message", "type": "string", "required": false, "description": "Note stored with the first version." }, { "name": "files", "flag": "--files", "type": "json", "required": true, "description": "Files of the skill: path to content. `SKILL.md` is required." }, { "name": "name", "flag": "--name", "type": "string", "required": true, "description": "Name of the skill." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": {} },
33
33
  { "id": "skills.delete", "path": ["skills", "delete"], "summary": "Delete a skill and its versions when no agent has it assigned.", "positionals": ["skill_id"], "queryFlags": [], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": true, "idSources": { "skill_id": { "list": "skills.list", "needs": [] } } },
34
34
  { "id": "skills.get", "path": ["skills", "get"], "summary": "Get a skill.", "positionals": ["skill_id"], "queryFlags": [], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "skill_id": { "list": "skills.list", "needs": [] } } },
35
35
  { "id": "skills.list", "path": ["skills", "list"], "summary": "List the skills of the organization.", "positionals": [], "queryFlags": [{ "name": "limit", "flag": "--limit", "type": "number", "required": false, "description": "Maximum number of items to return (1 to 100)." }, { "name": "after_id", "flag": "--after-id", "type": "string", "required": false, "description": "Cursor: return the items after this id. Use the `last_id` of the previous page." }, { "name": "before_id", "flag": "--before-id", "type": "string", "required": false, "description": "Cursor: return the items before this id. Use the `first_id` of the previous page." }, { "name": "search", "flag": "--search", "type": "string", "required": false, "description": "Case-insensitive filter by name." }], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": true, "destructive": false, "idSources": {}, "choice": { "label": "name" } },
@@ -43,7 +43,7 @@ export const OPERATION_COMMANDS = [
43
43
  { "id": "tokens.create", "path": ["tokens", "create"], "summary": "Create a token; its value is shown only in this response.", "positionals": [], "queryFlags": [], "bodyFlags": [{ "name": "all_organizations", "flag": "--all-organizations", "type": "boolean", "required": false, "description": "For a personal token: make it work in every organization you belong to. Then X-Laburen-Organization is required on each call." }, { "name": "description", "flag": "--description", "type": "string", "required": false, "description": "What the token is used for (up to 500 characters)." }, { "name": "expires_at", "flag": "--expires-at", "type": "string", "required": false, "description": "When the token expires (RFC 3339). When omitted, it does not expire." }, { "name": "kind", "flag": "--kind", "type": "string", "required": true, "description": "`personal` acts as you; `organization` acts as the organization and needs admin.", "values": ["personal", "organization"] }, { "name": "name", "flag": "--name", "type": "string", "required": true, "description": "Name of the token (1 to 100 characters)." }, { "name": "permissions", "flag": "--permissions", "type": "json", "required": true, "description": "Permissions to grant. They cannot exceed your own.", "values": ["query", "read", "write", "admin"] }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": {} },
44
44
  { "id": "tokens.list", "path": ["tokens", "list"], "summary": "List your personal tokens and, with admin, the credentials of the organization.", "positionals": [], "queryFlags": [{ "name": "limit", "flag": "--limit", "type": "number", "required": false, "description": "Maximum number of items to return (1 to 100)." }, { "name": "after_id", "flag": "--after-id", "type": "string", "required": false, "description": "Cursor: return the items after this id. Use the `last_id` of the previous page." }, { "name": "before_id", "flag": "--before-id", "type": "string", "required": false, "description": "Cursor: return the items before this id. Use the `first_id` of the previous page." }, { "name": "search", "flag": "--search", "type": "string", "required": false, "description": "Case-insensitive filter by name." }], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": true, "destructive": false, "idSources": {}, "choice": { "label": "name" } },
45
45
  { "id": "tokens.revoke", "path": ["tokens", "revoke"], "summary": "Revoke a token; it stays in the list with revoked_at set.", "positionals": ["token_id"], "queryFlags": [], "bodyFlags": [], "hasBody": false, "organizationHeader": true, "paginated": false, "destructive": true, "idSources": { "token_id": { "list": "tokens.list", "needs": [] } } },
46
- { "id": "tokens.update", "path": ["tokens", "update"], "summary": "Change the name or description of a token.", "positionals": ["token_id"], "queryFlags": [], "bodyFlags": [{ "name": "description", "flag": "--description", "type": "string", "required": false, "nullable": true, "description": "New description; `null` clears it." }, { "name": "name", "flag": "--name", "type": "string", "required": false, "description": "Name of the token (1 to 100 characters)." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "token_id": { "list": "tokens.list", "needs": [] } } },
46
+ { "id": "tokens.update", "path": ["tokens", "update"], "summary": "Change the name or description of a token.", "positionals": ["token_id"], "queryFlags": [], "bodyFlags": [{ "name": "description", "flag": "--description", "type": "string", "required": false, "description": "New description; `null` clears it." }, { "name": "name", "flag": "--name", "type": "string", "required": false, "description": "Name of the token (1 to 100 characters)." }], "hasBody": true, "organizationHeader": true, "paginated": false, "destructive": false, "idSources": { "token_id": { "list": "tokens.list", "needs": [] } } },
47
47
  ];
48
48
  /** Descripción de cada grupo de comandos (`agents.versions`), de los `tags` de la raíz del contrato. */
49
49
  export const GROUP_DESCRIPTIONS = { "agents": "Create and manage agents.", "agents.versions": "Versions of an agent: create, compare, activate and restore.", "skills": "Create and manage skills.", "skills.versions": "Versions of a skill: create, compare, activate and restore.", "mcp": "MCP integrations.", "mcp.connections": "Connections to MCP servers.", "mcp.connections.versions": "Versions of an MCP connection: create, compare, activate and restore.", "mcp.connections.tools": "Tools an MCP connection offers, read live from the server.", "knowledge": "Knowledge an agent can search.", "knowledge.projects": "Knowledge projects of the organization: sources an agent can search.", "models": "Models an agent can use.", "tokens": "Create and manage API tokens.", "me": "The authenticated user.", "me.organizations": "Organizations the authenticated user belongs to.", "oauth": "OAuth token exchange and revocation.", "oauth.device": "Device authorization flow used by the CLI login.", "meta": "Information about the API itself.", "meta.schemas": "JSON Schemas published for tooling, such as the agent config." };