@naturali/cli 0.141.5 → 0.141.7

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 (2) hide show
  1. package/dist/index.mjs +46 -38
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ var __exportAll = (all, no_symbols) => {
17
17
  };
18
18
  //#endregion
19
19
  //#region package.json
20
- var version = "0.141.5";
20
+ var version = "0.141.7";
21
21
  //#endregion
22
22
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
23
23
  const serializeFormDataPair = (data, key, value) => {
@@ -895,7 +895,8 @@ var Channels = class {
895
895
  /**
896
896
  * Replace a route
897
897
  *
898
- * Full replace, the same validation as create.
898
+ * Full replace, the same validation as create: an omitted field takes its create default. Where that default would widen a value the route sets, omission is `400 replace_omits_fields`, naming the fields in `details.fields`, and nothing is written: a set `surface` (the default is any surface), a non-empty `match` (every message), a non-empty `config` (it carries the Discord allowlist), and `status` on a `disabled` route (the default re-activates it). Send the value to keep it, or `"surface": null`, `"match": {}`, `"config": null`, `"status": "active"` to clear it.
899
+ *
899
900
  */
900
901
  static updateChannelRoute(options) {
901
902
  return (options.client ?? client).patch({
@@ -1258,7 +1259,7 @@ var Agents = class {
1258
1259
  /**
1259
1260
  * Run an agent generation
1260
1261
  *
1261
- * Sends messages to the agent, resolves its tools, and runs the AI model loop. Background by default: returns `202 Accepted` with a `generation_id` to poll via `GET /v1/projects/{project_id}/generations/{generation_id}`. Pass `?wait=true` to block and receive the result inline, where client tools pause the generation and return `requires_action`. Streaming (`stream: true`) implies waiting.
1262
+ * Sends messages to the agent, resolves its tools, and runs the AI model loop. Background by default: returns `202 Accepted` with a `generation_id` to poll via `GET /v1/projects/{project_id}/generations/{generation_id}`. Pass `?wait=true` to block and receive the result inline, where client tools pause the generation and return `requires_action`. Streaming (`stream: true`) implies waiting. Pass `idempotency_key` to make a retry safe: a request whose key is already claimed runs nothing and answers `202` with the generation the key names.
1262
1263
  *
1263
1264
  */
1264
1265
  static createAgentGeneration(options) {
@@ -7267,7 +7268,7 @@ const routes = {
7267
7268
  "name": "expected_version",
7268
7269
  "description": "Refuses the write unless the resource is at this version.",
7269
7270
  "required": false,
7270
- "type": "string",
7271
+ "type": "integer",
7271
7272
  "in": "body"
7272
7273
  }
7273
7274
  ]
@@ -7462,7 +7463,7 @@ const routes = {
7462
7463
  "name": "expected_version",
7463
7464
  "description": "Refuses the write unless the resource is at this version.",
7464
7465
  "required": false,
7465
- "type": "string",
7466
+ "type": "integer",
7466
7467
  "in": "body"
7467
7468
  }
7468
7469
  ]
@@ -7504,7 +7505,7 @@ const routes = {
7504
7505
  "create-agent-generation": {
7505
7506
  serviceClass: "Agents",
7506
7507
  operationId: "createAgentGeneration",
7507
- description: "Sends messages to the agent, resolves its tools, and runs the AI model loop. Background by default: returns `202 Accepted` with a `generation_id` to poll via `GET /v1/projects/{project_id}/generations/{generation_id}`. Pass `?wait=true` to block and receive the result inline, where client tools pause the generation and return `requires_action`. Streaming (`stream: true`) implies waiting.",
7508
+ description: "Sends messages to the agent, resolves its tools, and runs the AI model loop. Background by default: returns `202 Accepted` with a `generation_id` to poll via `GET /v1/projects/{project_id}/generations/{generation_id}`. Pass `?wait=true` to block and receive the result inline, where client tools pause the generation and return `requires_action`. Streaming (`stream: true`) implies waiting. Pass `idempotency_key` to make a retry safe: a request whose key is already claimed runs nothing and answers `202` with the generation the key names.",
7508
7509
  moduleDocsUrl: "https://docs.naturali.ai/docs/modules/agents",
7509
7510
  httpMethod: "post",
7510
7511
  pathParams: ["project_id", "agent_id"],
@@ -7600,6 +7601,13 @@ const routes = {
7600
7601
  "name": "metadata",
7601
7602
  "description": "Caller-supplied key/value metadata attached to the generation record for per-run audit attribution (e.g. the knowledge-corpus version that produced this action). Round-trips verbatim when the generation is fetched via the generations API. The bag is caller-owned and no key is reserved: server-owned state (usage attribution, the served agent version, the model route's record, the extraction summary) lives in its own top-level generation fields and cannot be written from here. Use the request's own `action_id` field to set the usage-attribution label.",
7602
7603
  "required": false,
7604
+ "type": "object",
7605
+ "in": "body"
7606
+ },
7607
+ {
7608
+ "name": "idempotency_key",
7609
+ "description": "Deduplication key, unique within the project, that makes a retry of an at-least-once delivery or an ambiguous failure safe. The first request under a key runs the generation; any later request carrying it runs nothing and answers `202` with the generation the key names, whatever state it has reached — including a retry that arrives while the original is still running. The key is claimed by the generation record for as long as the record exists.\n\nEvery other body field except `stream` is the request the key names: reusing a key with any of them changed, or on another agent of the project, is `409 IDEMPOTENCY_KEY_REUSED`. `stream` and `wait` say how the caller receives the generation, not what it is, so a retry may flip them.",
7610
+ "required": false,
7603
7611
  "type": "string",
7604
7612
  "in": "body"
7605
7613
  },
@@ -9149,7 +9157,7 @@ const routes = {
9149
9157
  "update-channel-route": {
9150
9158
  serviceClass: "Channels",
9151
9159
  operationId: "updateChannelRoute",
9152
- description: "Full replace, the same validation as create.",
9160
+ description: "Full replace, the same validation as create: an omitted field takes its create default. Where that default would widen a value the route sets, omission is `400 replace_omits_fields`, naming the fields in `details.fields`, and nothing is written: a set `surface` (the default is any surface), a non-empty `match` (every message), a non-empty `config` (it carries the Discord allowlist), and `status` on a `disabled` route (the default re-activates it). Send the value to keep it, or `\"surface\": null`, `\"match\": {}`, `\"config\": null`, `\"status\": \"active\"` to clear it.",
9153
9161
  moduleDocsUrl: "https://docs.naturali.ai/docs/modules/channel-routes",
9154
9162
  httpMethod: "patch",
9155
9163
  pathParams: [
@@ -10081,7 +10089,7 @@ const routes = {
10081
10089
  "name": "metadata",
10082
10090
  "description": "Caller-owned annotations on the message (e.g. a phone number, a channel), stored as sent and returned verbatim. The platform does not read the bag, so nothing in it reaches the model: a value the model should see belongs in `message`.",
10083
10091
  "required": false,
10084
- "type": "string",
10092
+ "type": "object",
10085
10093
  "in": "body"
10086
10094
  }
10087
10095
  ]
@@ -10385,7 +10393,7 @@ const routes = {
10385
10393
  "name": "metadata",
10386
10394
  "description": "Arbitrary metadata object. Unlike other body fields, keys are stored and returned verbatim in the casing supplied — they are not converted between snake_case and camelCase.",
10387
10395
  "required": false,
10388
- "type": "string",
10396
+ "type": "object",
10389
10397
  "in": "body"
10390
10398
  },
10391
10399
  {
@@ -10592,7 +10600,7 @@ const routes = {
10592
10600
  "name": "metadata",
10593
10601
  "description": "Arbitrary metadata object, replacing the stored bag; `null` clears it. Unlike other body fields, keys are stored and returned verbatim in the casing supplied — they are not converted between snake_case and camelCase.",
10594
10602
  "required": false,
10595
- "type": "string",
10603
+ "type": "object",
10596
10604
  "in": "body"
10597
10605
  },
10598
10606
  {
@@ -10606,7 +10614,7 @@ const routes = {
10606
10614
  "name": "expected_version",
10607
10615
  "description": "Refuses the write unless the document is at this version.",
10608
10616
  "required": false,
10609
- "type": "string",
10617
+ "type": "integer",
10610
10618
  "in": "body"
10611
10619
  }
10612
10620
  ]
@@ -10805,7 +10813,7 @@ const routes = {
10805
10813
  "name": "expected_version",
10806
10814
  "description": "Refuses the withdrawal unless the document is at this version.",
10807
10815
  "required": false,
10808
- "type": "string",
10816
+ "type": "integer",
10809
10817
  "in": "body"
10810
10818
  }
10811
10819
  ]
@@ -11336,7 +11344,7 @@ const routes = {
11336
11344
  "name": "metadata",
11337
11345
  "description": "Free-form tags, opaque to the platform",
11338
11346
  "required": false,
11339
- "type": "string",
11347
+ "type": "object",
11340
11348
  "in": "body"
11341
11349
  }
11342
11350
  ]
@@ -11384,7 +11392,7 @@ const routes = {
11384
11392
  "name": "metadata",
11385
11393
  "description": "Free-form tags, opaque to the platform",
11386
11394
  "required": false,
11387
- "type": "string",
11395
+ "type": "object",
11388
11396
  "in": "body"
11389
11397
  }
11390
11398
  ]
@@ -11443,7 +11451,7 @@ const routes = {
11443
11451
  "name": "metadata",
11444
11452
  "description": "",
11445
11453
  "required": false,
11446
- "type": "string",
11454
+ "type": "object",
11447
11455
  "in": "body"
11448
11456
  }
11449
11457
  ]
@@ -11776,7 +11784,7 @@ const routes = {
11776
11784
  "name": "metadata",
11777
11785
  "description": "Caller-supplied key/value metadata attached to the run record for attribution — what this measurement was of (the commit or release candidate being scored, the CI job that asked for it). Round-trips verbatim on every read of the run, the list included.\n\nThe bag is caller-owned and no key is reserved: everything the platform decides about a run (`status`, `agent_version`, `baseline_run_id`, `aggregate_scores`, `passed`, the counts) is a field of its own and cannot be written from here. Nothing in the scoring path reads it. A non-object is rejected with `400 VALIDATION_FAILED` and no run is created.",
11778
11786
  "required": false,
11779
- "type": "string",
11787
+ "type": "object",
11780
11788
  "in": "body"
11781
11789
  },
11782
11790
  {
@@ -12351,7 +12359,7 @@ const routes = {
12351
12359
  "name": "metadata",
12352
12360
  "description": "Replaces the stored bag; `null` clears it.",
12353
12361
  "required": false,
12354
- "type": "string",
12362
+ "type": "object",
12355
12363
  "in": "body"
12356
12364
  },
12357
12365
  {
@@ -12628,7 +12636,7 @@ const routes = {
12628
12636
  "name": "metadata",
12629
12637
  "description": "Static annotations stored on the formation record. This field is NOT a substitution site: `sub`/`param`/`ref` expressions are rejected with 400 (`FORMATION_INVALID_METADATA`). For deploy-time substitution use the template's top-level `metadata` block, which is resolved into `resolved_metadata`.\n",
12630
12638
  "required": false,
12631
- "type": "string",
12639
+ "type": "object",
12632
12640
  "in": "body"
12633
12641
  }
12634
12642
  ]
@@ -12700,7 +12708,7 @@ const routes = {
12700
12708
  "name": "metadata",
12701
12709
  "description": "Static annotations stored on the formation record. This field is NOT a substitution site: `sub`/`param`/`ref` expressions are rejected with 400 (`FORMATION_INVALID_METADATA`). For deploy-time substitution use the template's top-level `metadata` block, which is resolved into `resolved_metadata`.\n",
12702
12710
  "required": false,
12703
- "type": "string",
12711
+ "type": "object",
12704
12712
  "in": "body"
12705
12713
  }
12706
12714
  ]
@@ -12932,7 +12940,7 @@ const routes = {
12932
12940
  "name": "metadata",
12933
12941
  "description": "Caller-supplied key/value metadata to shallow-merge into the generation record's caller-owned `metadata` bag. No key is reserved: server-owned state lives in its own top-level fields and cannot be written from here.\n",
12934
12942
  "required": true,
12935
- "type": "string",
12943
+ "type": "object",
12936
12944
  "in": "body"
12937
12945
  }
12938
12946
  ]
@@ -13183,7 +13191,7 @@ const routes = {
13183
13191
  "name": "expected_version",
13184
13192
  "description": "Refuses the write unless the resource is at this version.",
13185
13193
  "required": false,
13186
- "type": "string",
13194
+ "type": "integer",
13187
13195
  "in": "body"
13188
13196
  }
13189
13197
  ]
@@ -13510,7 +13518,7 @@ const routes = {
13510
13518
  "name": "metadata",
13511
13519
  "description": "Arbitrary JSON metadata",
13512
13520
  "required": false,
13513
- "type": "string",
13521
+ "type": "object",
13514
13522
  "in": "body"
13515
13523
  }
13516
13524
  ]
@@ -13759,14 +13767,14 @@ const routes = {
13759
13767
  "name": "tags",
13760
13768
  "description": "Filter results to documents and memories whose `tags` contain every one of these key-value pairs (exact, case-sensitive match). Scopes both stores, so passing it alone searches both — as `query` does. For memories it matches at memory granularity: a memory is returned when its parent memory store's tags match or its own do.",
13761
13769
  "required": false,
13762
- "type": "string",
13770
+ "type": "object",
13763
13771
  "in": "body"
13764
13772
  },
13765
13773
  {
13766
13774
  "name": "metadata",
13767
13775
  "description": "Filter document results by their `metadata` bag. A document-store filter: a memory carries no such bag, so passing it alone searches documents, as `document_paths` does.",
13768
13776
  "required": false,
13769
- "type": "string",
13777
+ "type": "object",
13770
13778
  "in": "body"
13771
13779
  }
13772
13780
  ]
@@ -13882,14 +13890,14 @@ const routes = {
13882
13890
  "name": "tags",
13883
13891
  "description": "Per-memory key-value tags, used for memory-granularity filtering by `tags` in search-knowledge.",
13884
13892
  "required": false,
13885
- "type": "string",
13893
+ "type": "object",
13886
13894
  "in": "body"
13887
13895
  },
13888
13896
  {
13889
13897
  "name": "metadata",
13890
13898
  "description": "Arbitrary structured metadata attached to the memory",
13891
13899
  "required": false,
13892
- "type": "string",
13900
+ "type": "object",
13893
13901
  "in": "body"
13894
13902
  },
13895
13903
  {
@@ -13982,21 +13990,21 @@ const routes = {
13982
13990
  "name": "tags",
13983
13991
  "description": "Replaces the memory's tags. Pass null or an empty object to clear.",
13984
13992
  "required": false,
13985
- "type": "string",
13993
+ "type": "object",
13986
13994
  "in": "body"
13987
13995
  },
13988
13996
  {
13989
13997
  "name": "metadata",
13990
13998
  "description": "Replaces the memory's metadata. Pass null to clear.",
13991
13999
  "required": false,
13992
- "type": "string",
14000
+ "type": "object",
13993
14001
  "in": "body"
13994
14002
  },
13995
14003
  {
13996
14004
  "name": "expected_version",
13997
14005
  "description": "Refuses the write unless the memory is at this version.",
13998
14006
  "required": false,
13999
- "type": "string",
14007
+ "type": "integer",
14000
14008
  "in": "body"
14001
14009
  }
14002
14010
  ]
@@ -14061,7 +14069,7 @@ const routes = {
14061
14069
  "name": "expected_version",
14062
14070
  "description": "Refuses the retraction unless the memory is at this version.",
14063
14071
  "required": false,
14064
- "type": "string",
14072
+ "type": "integer",
14065
14073
  "in": "body"
14066
14074
  }
14067
14075
  ]
@@ -14547,7 +14555,7 @@ const routes = {
14547
14555
  "name": "tags",
14548
14556
  "description": "Optional key-value tags. Scopes the memory store in knowledge search, where every requested pair must match exactly.",
14549
14557
  "required": false,
14550
- "type": "string",
14558
+ "type": "object",
14551
14559
  "in": "body"
14552
14560
  },
14553
14561
  {
@@ -14633,7 +14641,7 @@ const routes = {
14633
14641
  "name": "tags",
14634
14642
  "description": "Optional key-value tags. Replaces the stored bag; `null` clears it.",
14635
14643
  "required": false,
14636
- "type": "string",
14644
+ "type": "object",
14637
14645
  "in": "body"
14638
14646
  },
14639
14647
  {
@@ -14980,7 +14988,7 @@ const routes = {
14980
14988
  "name": "metadata",
14981
14989
  "description": "The bag to judge. Absent or `null` is judged as an empty bag.",
14982
14990
  "required": false,
14983
- "type": "string",
14991
+ "type": "object",
14984
14992
  "in": "body"
14985
14993
  }
14986
14994
  ]
@@ -15616,7 +15624,7 @@ const routes = {
15616
15624
  "name": "expected_version",
15617
15625
  "description": "Refuses the write unless the resource is at this version.",
15618
15626
  "required": false,
15619
- "type": "string",
15627
+ "type": "integer",
15620
15628
  "in": "body"
15621
15629
  }
15622
15630
  ]
@@ -15881,7 +15889,7 @@ const routes = {
15881
15889
  "name": "metadata",
15882
15890
  "description": "Caller-supplied key/value metadata attached to the run record for per-run attribution (e.g. which of your own tenants this run belongs to, or the dispatch batch that started it). Round-trips verbatim on every read of the run, on the list as well as the single read.\n\nThe bag is caller-owned and no key is reserved: server-owned state (status, the pinned orchestration version, the trace, usage, artifacts, the run's own `input` and accumulated `state`) lives in its own top-level field and cannot be written from here.\n\nIt is **not** merged into run state: no graph node sees it, and an `input_schema` never has to tolerate it — which is what makes it the place for an infrastructural label, rather than `input`. Keys are never transformed. It is not inherited by the child runs a `loop` or `sub_orchestration` node starts; each child carries whatever the graph gives it, which today is nothing.",
15883
15891
  "required": false,
15884
- "type": "string",
15892
+ "type": "object",
15885
15893
  "in": "body"
15886
15894
  },
15887
15895
  {
@@ -17842,7 +17850,7 @@ const routes = {
17842
17850
  "name": "metadata",
17843
17851
  "description": "Caller-supplied key/value metadata attached to the task record for attribution — which of your own tenants the task belongs to, the ticket that raised it, the import batch that created it. Round-trips verbatim on every read of the task, the list included, and survives every transition (a transition supplies no metadata of its own).\n\nThe bag is caller-owned and no key is reserved: everything the engine decides about a task (`state`, `status`, `workflow_version`, `last_result`, `active_dispatch`, the automation fields) is a field of its own and cannot be written from here.\n\nPrefer this over `payload` for anything that is not task data: `payload` is read by every guard as `task.payload` and may be written by the workflow's declared `payload_writes`, so a label parked there is neither invisible to the state machine nor safe from it. A non-object is rejected with `400 VALIDATION_FAILED` and no task is created.",
17844
17852
  "required": false,
17845
- "type": "string",
17853
+ "type": "object",
17846
17854
  "in": "body"
17847
17855
  }
17848
17856
  ]
@@ -18670,7 +18678,7 @@ const routes = {
18670
18678
  },
18671
18679
  {
18672
18680
  "name": "tool_context",
18673
- "description": "Caller context every firing forwards to the run it starts, so an agent whose tools authorize through `{{context:<key>}}` can be put on a schedule — a firing has no request to carry one. Each key is forwarded as one `X-Naturali-Context-<key>` header.\n\n**Write-only.** It is accepted here and never returned on a read, so the record cannot be used to recover a value.\n\nA value may be a `{{secret:...}}` reference, which keeps the credential in the [secret](/docs/modules/secrets) store and leaves only its name on the trigger; it is resolved at fire time, so rotating the secret changes the next firing without touching the trigger. A reference naming a secret that does not exist in this project is refused here rather than at fire time.\n",
18681
+ "description": "Caller context every firing forwards to the run it starts, so an agent whose tools authorize through `{{context:<key>}}` can be put on a schedule — a firing has no request to carry one. Each key is forwarded as one `X-Naturali-Context-<key>` header.\n\n**Write-only.** It is accepted here and never returned on a read, so the record cannot be used to recover a value.\n\nA value may be a `{{secret:sec_...}}` reference, which keeps the credential in the [secret](/docs/modules/secrets) store and leaves only its id on the trigger; it is resolved at fire time, so rotating the secret changes the next firing without touching the trigger. A reference is refused here rather than at fire time when it is not in that id form (a secret's name does not resolve) or names a secret that does not exist in this project.\n",
18674
18682
  "required": false,
18675
18683
  "type": "object",
18676
18684
  "in": "body"
@@ -19585,7 +19593,7 @@ const routes = {
19585
19593
  "name": "expected_version",
19586
19594
  "description": "Refuses the write unless the resource is at this version.",
19587
19595
  "required": false,
19588
- "type": "string",
19596
+ "type": "integer",
19589
19597
  "in": "body"
19590
19598
  }
19591
19599
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.141.5",
3
+ "version": "0.141.7",
4
4
  "description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "type": "module",
6
6
  "bin": {
@@ -25,7 +25,7 @@
25
25
  "yaml": "^2.9.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@naturali/sdk": "0.141.5",
28
+ "@naturali/sdk": "0.141.7",
29
29
  "@ttoss/openapi-codegen": "^0.3.1",
30
30
  "@types/node": "^26.5.1",
31
31
  "tsdown": "^0.23.0",