@naturali/cli 0.78.5 → 0.79.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.
Files changed (2) hide show
  1. package/dist/index.mjs +61 -8
  2. package/package.json +2 -2
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.78.5";
17
+ var version = "0.79.0";
18
18
  //#endregion
19
19
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
20
20
  const serializeFormDataPair = (data, key, value) => {
@@ -3139,7 +3139,9 @@ var Orchestrations = class {
3139
3139
  /**
3140
3140
  * List orchestration runs
3141
3141
  *
3142
- * Returns orchestration runs the caller can access, optionally filtered by orchestration.
3142
+ * Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, or by whether the run has a parent at all.
3143
+ *
3144
+ * Note when aggregating: a run's `usage` covers its whole subtree, so summing it over a list that contains both a parent and its children counts the children more than once. Pass `nested=false` to sum over runs a caller started.
3143
3145
  */
3144
3146
  static listOrchestrationRuns(options) {
3145
3147
  return (options.client ?? client).get({
@@ -3789,7 +3791,7 @@ var Tools = class {
3789
3791
  *
3790
3792
  * Directly invokes a tool and returns its output. Supported for `http`, `mcp`, and `pipeline` tools. `client` tools cannot be invoked server-side and will return 422. A `pipeline` tool runs its declared steps in order and returns the mapped `output` (or the last step's output); `action` is ignored and `input` is the pipeline input.
3791
3793
  * For `mcp` tools the `action` field is required and identifies which tool name to invoke. For `http` tools `action` is ignored. When an `mcp` tool declares an `actions` allowlist, an action outside it is rejected with `400 VALIDATION_FAILED` ("not available on this tool") before any outbound request is made.
3792
- * `preset_parameters` stored on the tool are merged with the caller-supplied `input` before execution; preset keys take lower precedence.
3794
+ * `preset_parameters` stored on the tool are pinned over the caller-supplied `input` before execution: a key the tool presets keeps its preset value even when `input` sets it. Keys the presets do not name are taken from `input` as sent.
3793
3795
  *
3794
3796
  */
3795
3797
  static callTool(options) {
@@ -9486,6 +9488,13 @@ const routes = {
9486
9488
  "required": false,
9487
9489
  "type": "string",
9488
9490
  "in": "body"
9491
+ },
9492
+ {
9493
+ "name": "metadata",
9494
+ "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.",
9495
+ "required": false,
9496
+ "type": "object",
9497
+ "in": "body"
9489
9498
  }
9490
9499
  ]
9491
9500
  },
@@ -12066,12 +12075,14 @@ const routes = {
12066
12075
  "list-orchestration-runs": {
12067
12076
  serviceClass: "Orchestrations",
12068
12077
  operationId: "listOrchestrationRuns",
12069
- description: "Returns orchestration runs the caller can access, optionally filtered by orchestration.",
12078
+ description: "Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, or by whether the run has a parent at all. Note when aggregating: a run's `usage` covers its whole subtree, so summing it over a list that contains both a parent and its children counts the children more than once. Pass `nested=false` to sum over runs a caller started.",
12070
12079
  moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
12071
12080
  httpMethod: "get",
12072
12081
  pathParams: ["project_id"],
12073
12082
  queryParams: [
12074
12083
  "orchestration_id",
12084
+ "parent_orchestration_run_id",
12085
+ "nested",
12075
12086
  "limit",
12076
12087
  "offset"
12077
12088
  ],
@@ -12090,6 +12101,20 @@ const routes = {
12090
12101
  "type": "string",
12091
12102
  "in": "query"
12092
12103
  },
12104
+ {
12105
+ "name": "parent_orchestration_run_id",
12106
+ "description": "Filter to the runs one specific parent run's `loop` / `sub_orchestration` nodes started (run_...). This is how a caller holding a parent names the individual children behind its `usage`.",
12107
+ "required": false,
12108
+ "type": "string",
12109
+ "in": "query"
12110
+ },
12111
+ {
12112
+ "name": "nested",
12113
+ "description": "Filter by whether the run was started by another run. `false` returns only the runs a caller started (no parent), which is the set to sum `usage` over; `true` returns only the runs a `loop` / `sub_orchestration` node started, across every parent. Omit to return both.\n\nContradicting `parent_orchestration_run_id` with `nested=false` is a `400`; any value other than `true` or `false` is a `400`.",
12114
+ "required": false,
12115
+ "type": "boolean",
12116
+ "in": "query"
12117
+ },
12093
12118
  {
12094
12119
  "name": "limit",
12095
12120
  "description": "Maximum number of results to return",
@@ -12143,6 +12168,13 @@ const routes = {
12143
12168
  "type": "object",
12144
12169
  "in": "body"
12145
12170
  },
12171
+ {
12172
+ "name": "metadata",
12173
+ "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.",
12174
+ "required": false,
12175
+ "type": "object",
12176
+ "in": "body"
12177
+ },
12146
12178
  {
12147
12179
  "name": "wait",
12148
12180
  "description": "When true, block until the run reaches a terminal (succeeded/failed) or awaiting_input state and return the settled run. When false (default), return immediately with status \"queued\" and execute the run in the background.",
@@ -13432,6 +13464,13 @@ const routes = {
13432
13464
  "required": false,
13433
13465
  "type": "object",
13434
13466
  "in": "body"
13467
+ },
13468
+ {
13469
+ "name": "metadata",
13470
+ "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.",
13471
+ "required": false,
13472
+ "type": "object",
13473
+ "in": "body"
13435
13474
  }
13436
13475
  ]
13437
13476
  },
@@ -13706,7 +13745,7 @@ const routes = {
13706
13745
  },
13707
13746
  {
13708
13747
  "name": "preset_parameters",
13709
- "description": "Fixed parameters merged into every action-based tool call. Keys matching fields in the action's input schema are removed from the schema shown to the model and injected automatically at execution time.",
13748
+ "description": "Fixed parameters pinned on every call this tool makes, whatever its type. Keys matching fields in the input schema are removed from the schema shown to the model, and a pinned value wins over one the model or a direct caller supplies for the same key.\n\nValues accept `{{context:<key>}}` references, resolved per call from the caller's `tool_context`, so a pin can be the run's own value — the one account this run may act on — rather than one fixed when the tool was created. A resolved value is retyped to the parameter's declared schema type; a key missing from the call's `tool_context` fails the call with `MISSING_TOOL_CONTEXT_KEY` rather than sending the literal placeholder. `{{secret:...}}` is not resolved here. See the Tool Context reference.",
13710
13749
  "required": false,
13711
13750
  "type": "object",
13712
13751
  "in": "body"
@@ -13844,7 +13883,7 @@ const routes = {
13844
13883
  },
13845
13884
  {
13846
13885
  "name": "preset_parameters",
13847
- "description": "Fixed parameters merged into every action-based tool call. Keys matching fields in the action's input schema are removed from the schema shown to the model and injected automatically at execution time.",
13886
+ "description": "Fixed parameters pinned on every call this tool makes, whatever its type. Keys matching fields in the input schema are removed from the schema shown to the model, and a pinned value wins over one the model or a direct caller supplies for the same key.\n\nValues accept `{{context:<key>}}` references, resolved per call from the caller's `tool_context`, so a pin can be the run's own value — the one account this run may act on — rather than one fixed when the tool was created. A resolved value is retyped to the parameter's declared schema type; a key missing from the call's `tool_context` fails the call with `MISSING_TOOL_CONTEXT_KEY` rather than sending the literal placeholder. `{{secret:...}}` is not resolved here. See the Tool Context reference.",
13848
13887
  "required": false,
13849
13888
  "type": "object",
13850
13889
  "in": "body"
@@ -13897,7 +13936,7 @@ const routes = {
13897
13936
  "call-tool": {
13898
13937
  serviceClass: "Tools",
13899
13938
  operationId: "callTool",
13900
- description: "Directly invokes a tool and returns its output. Supported for `http`, `mcp`, and `pipeline` tools. `client` tools cannot be invoked server-side and will return 422. A `pipeline` tool runs its declared steps in order and returns the mapped `output` (or the last step's output); `action` is ignored and `input` is the pipeline input. For `mcp` tools the `action` field is required and identifies which tool name to invoke. For `http` tools `action` is ignored. When an `mcp` tool declares an `actions` allowlist, an action outside it is rejected with `400 VALIDATION_FAILED` (\"not available on this tool\") before any outbound request is made. `preset_parameters` stored on the tool are merged with the caller-supplied `input` before execution; preset keys take lower precedence.",
13939
+ description: "Directly invokes a tool and returns its output. Supported for `http`, `mcp`, and `pipeline` tools. `client` tools cannot be invoked server-side and will return 422. A `pipeline` tool runs its declared steps in order and returns the mapped `output` (or the last step's output); `action` is ignored and `input` is the pipeline input. For `mcp` tools the `action` field is required and identifies which tool name to invoke. For `http` tools `action` is ignored. When an `mcp` tool declares an `actions` allowlist, an action outside it is rejected with `400 VALIDATION_FAILED` (\"not available on this tool\") before any outbound request is made. `preset_parameters` stored on the tool are pinned over the caller-supplied `input` before execution: a key the tool presets keeps its preset value even when `input` sets it. Keys the presets do not name are taken from `input` as sent.",
13901
13940
  moduleDocsUrl: "https://docs.naturali.ai/docs/modules/tools",
13902
13941
  httpMethod: "post",
13903
13942
  pathParams: ["project_id", "tool_id"],
@@ -13926,7 +13965,7 @@ const routes = {
13926
13965
  },
13927
13966
  {
13928
13967
  "name": "input",
13929
- "description": "Input parameters for the tool call. These are merged with the tool's `preset_parameters` before execution (caller-supplied values take precedence).\n",
13968
+ "description": "Input parameters for the tool call. These are merged with the tool's `preset_parameters` before execution; a preset value wins over the same key sent here.\n",
13930
13969
  "required": false,
13931
13970
  "type": "object",
13932
13971
  "in": "body"
@@ -14164,6 +14203,13 @@ const routes = {
14164
14203
  "type": "string",
14165
14204
  "in": "body"
14166
14205
  },
14206
+ {
14207
+ "name": "event_pattern",
14208
+ "description": "Internal-event subscription pattern. Required when type is event, rejected otherwise. `*` matches every event, `prefix.*` a namespace, or give an exact event name such as `documents.ingested`",
14209
+ "required": false,
14210
+ "type": "string",
14211
+ "in": "body"
14212
+ },
14167
14213
  {
14168
14214
  "name": "active",
14169
14215
  "description": "",
@@ -14274,6 +14320,13 @@ const routes = {
14274
14320
  "type": "string",
14275
14321
  "in": "body"
14276
14322
  },
14323
+ {
14324
+ "name": "event_pattern",
14325
+ "description": "",
14326
+ "required": false,
14327
+ "type": "string",
14328
+ "in": "body"
14329
+ },
14277
14330
  {
14278
14331
  "name": "active",
14279
14332
  "description": "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.78.5",
3
+ "version": "0.79.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.78.5"
33
+ "@naturali/sdk": "0.79.0"
34
34
  },
35
35
  "scripts": {
36
36
  "generate": "tsx scripts/generate.ts",