@naturali/cli 0.61.0 → 0.62.0

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.
package/README.md CHANGED
@@ -40,7 +40,7 @@ naturali create-agent \
40
40
  --project-id proj_V1StGXR8Z5jdHi6B \
41
41
  --provider-id aip_V1StGXR8Z5jdHi6B \
42
42
  --name support-triage \
43
- --tool-ids tool_V1StGXR8Z5jdHi6B
43
+ --tool-bindings '[{"tool_id":"tool_V1StGXR8Z5jdHi6B"}]'
44
44
  ```
45
45
 
46
46
  Where a flag's value goes — URL path, query string or request body — comes from
@@ -53,7 +53,7 @@ the spec, so you never have to know.
53
53
  | String | `--name support-triage` |
54
54
  | Number / boolean | `--temperature 0.7`, `--force` (a bare flag is `true`) |
55
55
  | Object | `--tool-choice '{"type":"tool","name":"get_weather"}'` |
56
- | Array | repeat the flag (`--tool-ids a --tool-ids b`) or pass a JSON array (`--tool-ids '["a","b"]'`) |
56
+ | Array | repeat the flag (`--capabilities a --capabilities b`) or pass a JSON array (`--tool-bindings '[{"tool_id":"tool_a"}]'`) |
57
57
 
58
58
  An array-typed field is always sent as a list, even with one value.
59
59
 
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ var __exportAll = (all, no_symbols) => {
14
14
  };
15
15
  //#endregion
16
16
  //#region package.json
17
- var version = "0.61.0";
17
+ var version = "0.62.0";
18
18
  //#endregion
19
19
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
20
20
  const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
@@ -973,7 +973,7 @@ var Agents = class {
973
973
  /**
974
974
  * Create an agent
975
975
  *
976
- * Create an agent bound to one of the project's providers (provider_id), optionally attaching tools (tool_ids). See AgentCreate for the runtime config fields.
976
+ * Create an agent bound to one of the project's providers (provider_id), optionally attaching tools (tool_bindings). See AgentCreate for the runtime config fields.
977
977
  *
978
978
  */
979
979
  static createAgent(options) {
@@ -1010,7 +1010,7 @@ var Agents = class {
1010
1010
  /**
1011
1011
  * Update an agent
1012
1012
  *
1013
- * Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_ids/tool_choice/step_rules), the structured-output schema (output_schema), or the naturali-side status. At least one field is required.
1013
+ * Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_bindings/tool_choice/step_rules), the structured-output schema (output_schema), or the naturali-side status. At least one field is required.
1014
1014
  *
1015
1015
  */
1016
1016
  static updateAgent(options) {
@@ -2700,10 +2700,13 @@ const parseFlagValue = (value) => {
2700
2700
  };
2701
2701
  /**
2702
2702
  * Builds the value for an array-typed flag. Repeated occurrences
2703
- * (`--tool-ids tool_a --tool-ids tool_b`) collect into a list; a single JSON
2704
- * array literal (`--tool-ids '["tool_a"]'`) passes through unwrapped; a single
2705
- * scalar becomes a one-element array, so an array field never reaches the API
2706
- * as a bare string.
2703
+ * (`--capabilities a --capabilities b`) collect into a list; a single JSON
2704
+ * array literal (`--capabilities '["a","b"]'`) passes through unwrapped; a
2705
+ * single scalar becomes a one-element array, so an array field never reaches
2706
+ * the API as a bare string.
2707
+ *
2708
+ * An array *of objects* — `tool_bindings` — has only the literal form:
2709
+ * `--tool-bindings '[{"tool_id":"tool_a"}]'`.
2707
2710
  */
2708
2711
  const buildArrayFlagValue = (rawValues) => {
2709
2712
  const parsed = rawValues.map((value) => {
@@ -3368,7 +3371,7 @@ const routes = {
3368
3371
  "create-agent": {
3369
3372
  serviceClass: "Agents",
3370
3373
  operationId: "createAgent",
3371
- description: "Create an agent bound to one of the project's providers (provider_id), optionally attaching tools (tool_ids). See AgentCreate for the runtime config fields.",
3374
+ description: "Create an agent bound to one of the project's providers (provider_id), optionally attaching tools (tool_bindings). See AgentCreate for the runtime config fields.",
3372
3375
  moduleDocsUrl: "https://docs.naturali.ai/docs/modules/agents",
3373
3376
  httpMethod: "post",
3374
3377
  pathParams: ["project_id"],
@@ -3431,22 +3434,22 @@ const routes = {
3431
3434
  "in": "body"
3432
3435
  },
3433
3436
  {
3434
- "name": "tool_ids",
3435
- "description": "Tools to bind to the agent — each a tool_ id registered in this project. Replaces the whole binding set; [] clears it.\n",
3437
+ "name": "tool_bindings",
3438
+ "description": "Tools to bind to the agent — each naming a tool_ id registered in this project. Replaces the whole binding set; [] clears it.\n",
3436
3439
  "required": false,
3437
3440
  "type": "array",
3438
3441
  "in": "body"
3439
3442
  },
3440
3443
  {
3441
3444
  "name": "tool_choice",
3442
- "description": "Tool choice strategy — a string (\"auto\" / \"required\") or an object ({ \"type\": \"tool\", \"name\": \"…\" }). Null (the default) leaves it unset.\n",
3445
+ "description": "Tool choice strategy — a string (`auto`, `required`, `none`) or an object naming one tool (`{ \"type\": \"tool\", \"name\": \"…\" }`). Null (the default) leaves it unset.\n\nThe shape is validated on write: an unrecognized string, an unknown field on the object form, or a `type` other than `tool` is a `400` rather than a value that is accepted and then ignored. There is exactly one spelling of each field — camelCase variants such as `toolName` are refused, not translated.\n",
3443
3446
  "required": false,
3444
3447
  "type": "string",
3445
3448
  "in": "body"
3446
3449
  },
3447
3450
  {
3448
3451
  "name": "step_rules",
3449
- "description": "Per-step overrides of `tool_choice` (and, implicitly, which tools are active), applied on top of the agent's own `tool_choice` for the step number they name. The overall `tool_choice` otherwise governs every step of the run, with no relaxation once a tool has been called — the way to force a tool call on the first step without forcing one on every later step too (which runs the full `max_steps` before it can stop) is a rule for `step: 1` only. Null (the default) leaves it unset.\n",
3452
+ "description": "Per-step overrides of `tool_choice` (and, implicitly, which tools are active), applied on top of the agent's own `tool_choice` for the step number they name. The overall `tool_choice` otherwise governs every step of the run, with no relaxation once a tool has been called — the way to force a tool call on the first step without forcing one on every later step too (which runs the full `max_steps` before it can stop) is a rule for `step: 1` only. Null (the default) leaves it unset.\n\nA rule carries `step` and `tool_choice` and nothing else. An unknown field is a `400` naming it, because a rule the runtime does not recognize is dropped rather than corrected — the agent would keep running with the rule silently not applied.\n",
3450
3453
  "required": false,
3451
3454
  "type": "array",
3452
3455
  "in": "body"
@@ -3492,7 +3495,7 @@ const routes = {
3492
3495
  "update-agent": {
3493
3496
  serviceClass: "Agents",
3494
3497
  operationId: "updateAgent",
3495
- description: "Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_ids/tool_choice/step_rules), the structured-output schema (output_schema), or the naturali-side status. At least one field is required.",
3498
+ description: "Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_bindings/tool_choice/step_rules), the structured-output schema (output_schema), or the naturali-side status. At least one field is required.",
3496
3499
  moduleDocsUrl: "https://docs.naturali.ai/docs/modules/agents",
3497
3500
  httpMethod: "patch",
3498
3501
  pathParams: ["project_id", "agent_id"],
@@ -3562,22 +3565,22 @@ const routes = {
3562
3565
  "in": "body"
3563
3566
  },
3564
3567
  {
3565
- "name": "tool_ids",
3566
- "description": "Replace the agent's bound tools with exactly this set (each a tool_ id in this project); [] detaches all tools.\n",
3568
+ "name": "tool_bindings",
3569
+ "description": "Replace the agent's bound tools with exactly this set (each naming a tool_ id in this project); [] detaches all tools.\n",
3567
3570
  "required": false,
3568
3571
  "type": "array",
3569
3572
  "in": "body"
3570
3573
  },
3571
3574
  {
3572
3575
  "name": "tool_choice",
3573
- "description": "Tool choice strategy — a string (\"auto\" / \"required\") or an object ({ \"type\": \"tool\", \"name\": \"…\" }). Null (the default) leaves it unset.\n",
3576
+ "description": "Tool choice strategy — a string (`auto`, `required`, `none`) or an object naming one tool (`{ \"type\": \"tool\", \"name\": \"…\" }`). Null (the default) leaves it unset.\n\nThe shape is validated on write: an unrecognized string, an unknown field on the object form, or a `type` other than `tool` is a `400` rather than a value that is accepted and then ignored. There is exactly one spelling of each field — camelCase variants such as `toolName` are refused, not translated.\n",
3574
3577
  "required": false,
3575
3578
  "type": "string",
3576
3579
  "in": "body"
3577
3580
  },
3578
3581
  {
3579
3582
  "name": "step_rules",
3580
- "description": "Per-step overrides of `tool_choice` (and, implicitly, which tools are active), applied on top of the agent's own `tool_choice` for the step number they name. The overall `tool_choice` otherwise governs every step of the run, with no relaxation once a tool has been called — the way to force a tool call on the first step without forcing one on every later step too (which runs the full `max_steps` before it can stop) is a rule for `step: 1` only. Null (the default) leaves it unset.\n",
3583
+ "description": "Per-step overrides of `tool_choice` (and, implicitly, which tools are active), applied on top of the agent's own `tool_choice` for the step number they name. The overall `tool_choice` otherwise governs every step of the run, with no relaxation once a tool has been called — the way to force a tool call on the first step without forcing one on every later step too (which runs the full `max_steps` before it can stop) is a rule for `step: 1` only. Null (the default) leaves it unset.\n\nA rule carries `step` and `tool_choice` and nothing else. An unknown field is a `400` naming it, because a rule the runtime does not recognize is dropped rather than corrected — the agent would keep running with the rule silently not applied.\n",
3581
3584
  "required": false,
3582
3585
  "type": "array",
3583
3586
  "in": "body"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.61.0",
3
+ "version": "0.62.0",
4
4
  "description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "type": "module",
6
6
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "tsx": "^4.23.1",
31
31
  "typescript": "~6.0.3",
32
32
  "vitest": "^4.1.10",
33
- "@naturali/sdk": "0.61.0"
33
+ "@naturali/sdk": "0.62.0"
34
34
  },
35
35
  "scripts": {
36
36
  "generate": "tsx scripts/generate.ts",