@naturali/cli 0.202.0 → 0.203.1
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 +1 -1
- package/dist/index.mjs +88 -62
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ the environment:
|
|
|
17
17
|
| Variable | Purpose |
|
|
18
18
|
| --- | --- |
|
|
19
19
|
| `NATURALI_TOKEN` | Bearer credential (`nat_sk_…` or a session JWT). Required. |
|
|
20
|
-
| `
|
|
20
|
+
| `NATURALI_PROJECT_ID` | Default `--project-id` for commands that take one. An explicit `--project-id` still wins. |
|
|
21
21
|
|
|
22
22
|
## Commands
|
|
23
23
|
|
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.
|
|
20
|
+
var version = "0.203.1";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
23
23
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -2925,7 +2925,7 @@ var Evaluations = class {
|
|
|
2925
2925
|
/**
|
|
2926
2926
|
* Cancel an eval run
|
|
2927
2927
|
*
|
|
2928
|
-
* Cancels a queued or running run: its outstanding item tasks are dropped so it stops consuming provider budget, and the run settles as `
|
|
2928
|
+
* Cancels a queued or running run: its outstanding item tasks are dropped so it stops consuming provider budget, and the run settles as `cancelled`.
|
|
2929
2929
|
*
|
|
2930
2930
|
* Results already written are kept — they are real measurements of generations that were really paid for — and `completed_count` / `errored_count` report what ran. `aggregate_scores` is deliberately left null: a partial roll-up in the same field a completed run uses would read as a whole-dataset verdict.
|
|
2931
2931
|
*
|
|
@@ -4287,7 +4287,7 @@ var Orchestrations = class {
|
|
|
4287
4287
|
/**
|
|
4288
4288
|
* Validate an orchestration graph
|
|
4289
4289
|
*
|
|
4290
|
-
* Statically validates an orchestration graph without persisting anything. Checks that every node has its required field, node ids are unique, edges reference existing nodes, the graph is acyclic (unless it contains a loop node), and every `input_mapping` `{"var": "..."}` reference resolves to a state key written by an upstream node or seeded by `input_schema`. Returns blocking `
|
|
4290
|
+
* Statically validates an orchestration graph without persisting anything. Checks that every node has its required field, node ids are unique, edges reference existing nodes, the graph is acyclic (unless it contains a loop node), and every `input_mapping` `{"var": "..."}` reference resolves to a state key written by an upstream node or seeded by `input_schema`. Returns blocking `problems` and non-blocking `warnings` (e.g. a state key only written on a conditional branch). The same checks are enforced on create and update, which fail with `400 ORCHESTRATION_VALIDATION_FAILED` listing the same items under `meta.problems` and `meta.warnings`.
|
|
4291
4291
|
*
|
|
4292
4292
|
*/
|
|
4293
4293
|
static validateOrchestration(options) {
|
|
@@ -4438,7 +4438,7 @@ var Orchestrations = class {
|
|
|
4438
4438
|
/**
|
|
4439
4439
|
* Start an orchestration run
|
|
4440
4440
|
*
|
|
4441
|
-
* Creates a new run for the orchestration named by orchestration_id. By default the run executes durably in the background: the response returns immediately with status "queued" (a worker then claims it and moves it to "running") and progress is observed via get-orchestration-run or run lifecycle webhook events (orchestration_runs.started/awaiting_input/
|
|
4441
|
+
* Creates a new run for the orchestration named by orchestration_id. By default the run executes durably in the background: the response returns immediately with status "queued" (a worker then claims it and moves it to "running") and progress is observed via get-orchestration-run or run lifecycle webhook events (orchestration_runs.started/awaiting_input/completed/failed). Delay and poll waits park the run as "sleeping" and are woken by a background scheduler, surviving restarts. Pass wait=true to block until the run reaches a terminal or awaiting_input state.
|
|
4442
4442
|
*/
|
|
4443
4443
|
static startOrchestrationRun(options) {
|
|
4444
4444
|
return (options.client ?? client).post({
|
|
@@ -4715,7 +4715,7 @@ var Playbooks = class {
|
|
|
4715
4715
|
/**
|
|
4716
4716
|
* List what a node still needs
|
|
4717
4717
|
*
|
|
4718
|
-
* Returns the manual inputs still unset, or refused by their schema, before `
|
|
4718
|
+
* Returns the manual inputs still unset, or refused by their schema, before `node_id` can be reached, grouped in waves: nothing in a later wave can run before the earlier ones are filled.
|
|
4719
4719
|
*/
|
|
4720
4720
|
static getPlaybookCaseMissing(options) {
|
|
4721
4721
|
return (options.client ?? client).get({
|
|
@@ -4778,7 +4778,7 @@ var Playbooks = class {
|
|
|
4778
4778
|
/**
|
|
4779
4779
|
* Export a final node
|
|
4780
4780
|
*
|
|
4781
|
-
* Renders one revision of a final node as files, one export per transformation: each transformation's tool is called with the case's `case_id` and `subject`, the `
|
|
4781
|
+
* Renders one revision of a final node as files, one export per transformation: each transformation's tool is called with the case's `case_id` and `subject`, the `node_id`, the `revision` and that revision's `output`, and must answer a file (`execute.response_mode: base64`) of its `format`'s content type. The file is kept in the project's files under `/.system/playbooks/`. An export never feeds a node.
|
|
4782
4782
|
*
|
|
4783
4783
|
* Without `revision` the node's current output is exported, which needs the node `done` (`409 PLAYBOOK_NODE_NOT_EXPORTABLE`); a `revision` names an earlier output or confirmation of the node. Each tool runs as the author of the case's playbook version, whose permission to call it is checked here (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`). A paused case is `409 PLAYBOOK_CASE_PAUSED`, and a case in a paused project `409 PROJECT_PAUSED`.
|
|
4784
4784
|
*
|
|
@@ -4819,7 +4819,7 @@ var Playbooks = class {
|
|
|
4819
4819
|
/**
|
|
4820
4820
|
* Upgrade a case
|
|
4821
4821
|
*
|
|
4822
|
-
* Moves a case to another version of its playbook: the playbook's current version, or the `version` named, an earlier one included. Values carry over by node
|
|
4822
|
+
* Moves a case to another version of its playbook: the playbook's current version, or the `version` named, an earlier one included. Values carry over by node ID, and every node's state is read against the new version: a node added is open, a node removed leaves the structure while its entries stay, a node whose input reads another field is `stale`, and a value its input's new schema refuses is missing again. The cascade then runs what became runnable. With `wait: true` it answers once every execution queued, and every one those queue, has settled or parked. Each upgrade is recorded with what moved; the version the case is already on records nothing.
|
|
4823
4823
|
*
|
|
4824
4824
|
* An execution running is `409 PLAYBOOK_CASE_BUSY`; one queued but not started settles `superseded`. An upgrade made with a credential the case's own work runs as is `403 PLAYBOOK_SELF_WRITE`.
|
|
4825
4825
|
*/
|
|
@@ -5419,7 +5419,7 @@ var Sessions = class {
|
|
|
5419
5419
|
/**
|
|
5420
5420
|
* Add a user message
|
|
5421
5421
|
*
|
|
5422
|
-
* Saves a user message to the session. When
|
|
5422
|
+
* Saves a user message to the session. When `auto_generate` is enabled on the session and no generation is currently in progress, generation is triggered automatically and the response is the generated turn, the same body `?wait=true` generate answers. Otherwise returns the saved user message.
|
|
5423
5423
|
*
|
|
5424
5424
|
*/
|
|
5425
5425
|
static addSessionMessage(options) {
|
|
@@ -7018,13 +7018,14 @@ const placeFlags = (args) => {
|
|
|
7018
7018
|
};
|
|
7019
7019
|
const PROJECT_ID_PARAM = "project_id";
|
|
7020
7020
|
/**
|
|
7021
|
-
* Falls back to `
|
|
7021
|
+
* Falls back to `NATURALI_PROJECT_ID` for the `project_id` path or query
|
|
7022
7022
|
* parameter when a command doesn't pass `--project-id` explicitly, so a user
|
|
7023
7023
|
* working within one project doesn't have to repeat it on every command.
|
|
7024
|
+
* `NATURALI_PROJECT` is read after it so shells that still export it work.
|
|
7024
7025
|
*/
|
|
7025
7026
|
const applyProjectIdEnvDefault = (args) => {
|
|
7026
7027
|
const { route, call } = args;
|
|
7027
|
-
const envProjectId = process.env["NATURALI_PROJECT"];
|
|
7028
|
+
const envProjectId = process.env["NATURALI_PROJECT_ID"] || process.env["NATURALI_PROJECT"];
|
|
7028
7029
|
if (!envProjectId) return;
|
|
7029
7030
|
if (route.pathParams.includes(PROJECT_ID_PARAM) && !(PROJECT_ID_PARAM in call.path)) call.path[PROJECT_ID_PARAM] = envProjectId;
|
|
7030
7031
|
else if (route.queryParams.includes(PROJECT_ID_PARAM) && !(PROJECT_ID_PARAM in call.query)) call.query[PROJECT_ID_PARAM] = envProjectId;
|
|
@@ -7191,6 +7192,15 @@ const buildCallOptions = (args) => {
|
|
|
7191
7192
|
* renamed operation fails a test instead of silently disarming this.
|
|
7192
7193
|
*/
|
|
7193
7194
|
const OUTCOME_IN_BODY = /* @__PURE__ */ new Set(["createFormation", "updateFormation"]);
|
|
7195
|
+
/** `CODE: message` from a formation's `StoredError`, when it carries either. */
|
|
7196
|
+
const storedErrorReason = (error) => {
|
|
7197
|
+
if (typeof error !== "object" || error === null) return void 0;
|
|
7198
|
+
const { code, message } = error;
|
|
7199
|
+
const parts = [code, message].filter((part) => {
|
|
7200
|
+
return typeof part === "string" && part.length > 0;
|
|
7201
|
+
});
|
|
7202
|
+
return parts.length > 0 ? parts.join(": ") : void 0;
|
|
7203
|
+
};
|
|
7194
7204
|
/**
|
|
7195
7205
|
* The stderr line for a `2xx` body that reports its own failure, or `undefined`
|
|
7196
7206
|
* when there is nothing to report.
|
|
@@ -7201,7 +7211,7 @@ const bodyReportedFailure = (args) => {
|
|
|
7201
7211
|
if (typeof data !== "object" || data === null) return void 0;
|
|
7202
7212
|
const body = data;
|
|
7203
7213
|
if (body["status"] !== "failed") return void 0;
|
|
7204
|
-
return `Deploy failed: ${
|
|
7214
|
+
return `Deploy failed: ${storedErrorReason(body["error"]) ?? "no reason given"}`;
|
|
7205
7215
|
};
|
|
7206
7216
|
/**
|
|
7207
7217
|
* Runs one generated command: parses its flags, resolves credentials, calls the
|
|
@@ -9883,7 +9893,8 @@ const routes = {
|
|
|
9883
9893
|
queryParams: [
|
|
9884
9894
|
"status",
|
|
9885
9895
|
"origin",
|
|
9886
|
-
"
|
|
9896
|
+
"expires_from",
|
|
9897
|
+
"expires_to",
|
|
9887
9898
|
"limit",
|
|
9888
9899
|
"offset"
|
|
9889
9900
|
],
|
|
@@ -9899,9 +9910,9 @@ const routes = {
|
|
|
9899
9910
|
},
|
|
9900
9911
|
{
|
|
9901
9912
|
"name": "status",
|
|
9902
|
-
"description": "Filter by lifecycle status",
|
|
9913
|
+
"description": "Filter by lifecycle status. Repeat the parameter to OR values. A value outside the enum, empty string included, is a `400`.",
|
|
9903
9914
|
"required": false,
|
|
9904
|
-
"type": "
|
|
9915
|
+
"type": "array",
|
|
9905
9916
|
"in": "query"
|
|
9906
9917
|
},
|
|
9907
9918
|
{
|
|
@@ -9912,8 +9923,15 @@ const routes = {
|
|
|
9912
9923
|
"in": "query"
|
|
9913
9924
|
},
|
|
9914
9925
|
{
|
|
9915
|
-
"name": "
|
|
9916
|
-
"description": "
|
|
9926
|
+
"name": "expires_from",
|
|
9927
|
+
"description": "Only items whose `expires_at` is at or after this timestamp (ISO 8601)",
|
|
9928
|
+
"required": false,
|
|
9929
|
+
"type": "string",
|
|
9930
|
+
"in": "query"
|
|
9931
|
+
},
|
|
9932
|
+
{
|
|
9933
|
+
"name": "expires_to",
|
|
9934
|
+
"description": "Only items whose `expires_at` is at or before this timestamp (ISO 8601)",
|
|
9917
9935
|
"required": false,
|
|
9918
9936
|
"type": "string",
|
|
9919
9937
|
"in": "query"
|
|
@@ -9959,9 +9977,9 @@ const routes = {
|
|
|
9959
9977
|
},
|
|
9960
9978
|
{
|
|
9961
9979
|
"name": "status",
|
|
9962
|
-
"description": "Lifecycle
|
|
9980
|
+
"description": "Lifecycle statuses the groups are built from (default `rejected`). Repeat the parameter to OR values. A value outside the enum, empty string included, is a `400`.",
|
|
9963
9981
|
"required": false,
|
|
9964
|
-
"type": "
|
|
9982
|
+
"type": "array",
|
|
9965
9983
|
"in": "query"
|
|
9966
9984
|
},
|
|
9967
9985
|
{
|
|
@@ -10589,9 +10607,9 @@ const routes = {
|
|
|
10589
10607
|
},
|
|
10590
10608
|
{
|
|
10591
10609
|
"name": "status",
|
|
10592
|
-
"description": "Filter by chain status",
|
|
10610
|
+
"description": "Filter by chain status. Repeat the parameter to OR values. A value outside the enum, empty string included, is a `400`.",
|
|
10593
10611
|
"required": false,
|
|
10594
|
-
"type": "
|
|
10612
|
+
"type": "array",
|
|
10595
10613
|
"in": "query"
|
|
10596
10614
|
},
|
|
10597
10615
|
{
|
|
@@ -12448,9 +12466,9 @@ const routes = {
|
|
|
12448
12466
|
},
|
|
12449
12467
|
{
|
|
12450
12468
|
"name": "status",
|
|
12451
|
-
"description": "Only decisions in
|
|
12469
|
+
"description": "Only decisions in these statuses. Repeat the parameter to OR values. A value outside the enum, empty string included, is a `400`.",
|
|
12452
12470
|
"required": false,
|
|
12453
|
-
"type": "
|
|
12471
|
+
"type": "array",
|
|
12454
12472
|
"in": "query"
|
|
12455
12473
|
},
|
|
12456
12474
|
{
|
|
@@ -14229,7 +14247,7 @@ const routes = {
|
|
|
14229
14247
|
"cancel-eval-run": {
|
|
14230
14248
|
serviceClass: "Evaluations",
|
|
14231
14249
|
operationId: "cancelEvalRun",
|
|
14232
|
-
description: "Cancels a queued or running run: its outstanding item tasks are dropped so it stops consuming provider budget, and the run settles as `
|
|
14250
|
+
description: "Cancels a queued or running run: its outstanding item tasks are dropped so it stops consuming provider budget, and the run settles as `cancelled`. Results already written are kept — they are real measurements of generations that were really paid for — and `completed_count` / `errored_count` report what ran. `aggregate_scores` is deliberately left null: a partial roll-up in the same field a completed run uses would read as a whole-dataset verdict. A run that has already finished is rejected with 400.",
|
|
14233
14251
|
moduleDocsUrl: "https://naturali.ai/docs/modules/evaluations",
|
|
14234
14252
|
httpMethod: "post",
|
|
14235
14253
|
pathParams: [
|
|
@@ -14290,9 +14308,9 @@ const routes = {
|
|
|
14290
14308
|
},
|
|
14291
14309
|
{
|
|
14292
14310
|
"name": "status",
|
|
14293
|
-
"description": "Filter by triage status",
|
|
14311
|
+
"description": "Filter by triage status. Repeat the parameter to OR values. A value outside the enum, empty string included, is a `400`.",
|
|
14294
14312
|
"required": false,
|
|
14295
|
-
"type": "
|
|
14313
|
+
"type": "array",
|
|
14296
14314
|
"in": "query"
|
|
14297
14315
|
},
|
|
14298
14316
|
{
|
|
@@ -15226,9 +15244,9 @@ const routes = {
|
|
|
15226
15244
|
},
|
|
15227
15245
|
{
|
|
15228
15246
|
"name": "status",
|
|
15229
|
-
"description": "Filter by lifecycle status",
|
|
15247
|
+
"description": "Filter by lifecycle status. Repeat the parameter to OR values. A value outside the enum, empty string included, is a `400`.",
|
|
15230
15248
|
"required": false,
|
|
15231
|
-
"type": "
|
|
15249
|
+
"type": "array",
|
|
15232
15250
|
"in": "query"
|
|
15233
15251
|
},
|
|
15234
15252
|
{
|
|
@@ -16045,7 +16063,7 @@ const routes = {
|
|
|
16045
16063
|
},
|
|
16046
16064
|
{
|
|
16047
16065
|
"name": "metadata",
|
|
16048
|
-
"description": "A `MetadataBag` on a field where `null` is meaningful
|
|
16066
|
+
"description": "A `MetadataBag` on a request field where `null` is meaningful: a full-replacement update that clears the bag. A record whose bag is unset leaves the field out.",
|
|
16049
16067
|
"required": false,
|
|
16050
16068
|
"type": "object",
|
|
16051
16069
|
"in": "body"
|
|
@@ -17133,7 +17151,7 @@ const routes = {
|
|
|
17133
17151
|
},
|
|
17134
17152
|
{
|
|
17135
17153
|
"name": "on",
|
|
17136
|
-
"description": "The event a firing reads. `
|
|
17154
|
+
"description": "The event a firing reads. `generations.completed` fires once per completed turn whatever the transport, and is the only event the built-in extractor may bind to. `conversation_messages.generated` fires per persisted assistant reply and is conversation-backed, so it is for custom handlers.",
|
|
17137
17155
|
"required": true,
|
|
17138
17156
|
"type": "string",
|
|
17139
17157
|
"in": "body"
|
|
@@ -17254,7 +17272,7 @@ const routes = {
|
|
|
17254
17272
|
},
|
|
17255
17273
|
{
|
|
17256
17274
|
"name": "on",
|
|
17257
|
-
"description": "The event a firing reads. `
|
|
17275
|
+
"description": "The event a firing reads. `generations.completed` fires once per completed turn whatever the transport, and is the only event the built-in extractor may bind to. `conversation_messages.generated` fires per persisted assistant reply and is conversation-backed, so it is for custom handlers.",
|
|
17258
17276
|
"required": false,
|
|
17259
17277
|
"type": "string",
|
|
17260
17278
|
"in": "body"
|
|
@@ -17569,7 +17587,8 @@ const routes = {
|
|
|
17569
17587
|
"mechanism",
|
|
17570
17588
|
"outcome",
|
|
17571
17589
|
"generation_id",
|
|
17572
|
-
"
|
|
17590
|
+
"from",
|
|
17591
|
+
"to",
|
|
17573
17592
|
"limit",
|
|
17574
17593
|
"offset"
|
|
17575
17594
|
],
|
|
@@ -17612,8 +17631,15 @@ const routes = {
|
|
|
17612
17631
|
"in": "query"
|
|
17613
17632
|
},
|
|
17614
17633
|
{
|
|
17615
|
-
"name": "
|
|
17616
|
-
"description": "Only assertions recorded at or after this instant.",
|
|
17634
|
+
"name": "from",
|
|
17635
|
+
"description": "Only assertions recorded at or after this instant (ISO 8601).",
|
|
17636
|
+
"required": false,
|
|
17637
|
+
"type": "string",
|
|
17638
|
+
"in": "query"
|
|
17639
|
+
},
|
|
17640
|
+
{
|
|
17641
|
+
"name": "to",
|
|
17642
|
+
"description": "Only assertions recorded at or before this instant (ISO 8601).",
|
|
17617
17643
|
"required": false,
|
|
17618
17644
|
"type": "string",
|
|
17619
17645
|
"in": "query"
|
|
@@ -18343,7 +18369,7 @@ const routes = {
|
|
|
18343
18369
|
},
|
|
18344
18370
|
{
|
|
18345
18371
|
"name": "output_mapping",
|
|
18346
|
-
"description": "The shape of a
|
|
18372
|
+
"description": "The shape of a completed run's `output`, owned by the orchestration rather than by its terminal node ids. Each key is an output field (a dotted key such as `summary.title` builds a nested object); each value is JSON Logic (https://jsonlogic.com) evaluated against `{ \"state\": <final run state> }`, which includes `state.input` and `state.nodes.<id>`. A missing path maps to `null`; a mapping that throws fails the run. Null (or omitted) keys `output` by terminal node id. Versioned with the graph; `null` on update clears it.",
|
|
18347
18373
|
"required": false,
|
|
18348
18374
|
"type": "object",
|
|
18349
18375
|
"in": "body"
|
|
@@ -18360,7 +18386,7 @@ const routes = {
|
|
|
18360
18386
|
"validate-orchestration": {
|
|
18361
18387
|
serviceClass: "Orchestrations",
|
|
18362
18388
|
operationId: "validateOrchestration",
|
|
18363
|
-
description: "Statically validates an orchestration graph without persisting anything. Checks that every node has its required field, node ids are unique, edges reference existing nodes, the graph is acyclic (unless it contains a loop node), and every `input_mapping` `{\"var\": \"...\"}` reference resolves to a state key written by an upstream node or seeded by `input_schema`. Returns blocking `
|
|
18389
|
+
description: "Statically validates an orchestration graph without persisting anything. Checks that every node has its required field, node ids are unique, edges reference existing nodes, the graph is acyclic (unless it contains a loop node), and every `input_mapping` `{\"var\": \"...\"}` reference resolves to a state key written by an upstream node or seeded by `input_schema`. Returns blocking `problems` and non-blocking `warnings` (e.g. a state key only written on a conditional branch). The same checks are enforced on create and update, which fail with `400 ORCHESTRATION_VALIDATION_FAILED` listing the same items under `meta.problems` and `meta.warnings`.",
|
|
18364
18390
|
moduleDocsUrl: "https://naturali.ai/docs/modules/orchestrations",
|
|
18365
18391
|
httpMethod: "post",
|
|
18366
18392
|
pathParams: ["project_id"],
|
|
@@ -18550,7 +18576,7 @@ const routes = {
|
|
|
18550
18576
|
},
|
|
18551
18577
|
{
|
|
18552
18578
|
"name": "output_mapping",
|
|
18553
|
-
"description": "The shape of a
|
|
18579
|
+
"description": "The shape of a completed run's `output`, owned by the orchestration rather than by its terminal node ids. Each key is an output field (a dotted key such as `summary.title` builds a nested object); each value is JSON Logic (https://jsonlogic.com) evaluated against `{ \"state\": <final run state> }`, which includes `state.input` and `state.nodes.<id>`. A missing path maps to `null`; a mapping that throws fails the run. Null (or omitted) keys `output` by terminal node id. Versioned with the graph; `null` on update clears it.",
|
|
18554
18580
|
"required": false,
|
|
18555
18581
|
"type": "object",
|
|
18556
18582
|
"in": "body"
|
|
@@ -18791,7 +18817,7 @@ const routes = {
|
|
|
18791
18817
|
"start-orchestration-run": {
|
|
18792
18818
|
serviceClass: "Orchestrations",
|
|
18793
18819
|
operationId: "startOrchestrationRun",
|
|
18794
|
-
description: "Creates a new run for the orchestration named by orchestration_id. By default the run executes durably in the background: the response returns immediately with status \"queued\" (a worker then claims it and moves it to \"running\") and progress is observed via get-orchestration-run or run lifecycle webhook events (orchestration_runs.started/awaiting_input/
|
|
18820
|
+
description: "Creates a new run for the orchestration named by orchestration_id. By default the run executes durably in the background: the response returns immediately with status \"queued\" (a worker then claims it and moves it to \"running\") and progress is observed via get-orchestration-run or run lifecycle webhook events (orchestration_runs.started/awaiting_input/completed/failed). Delay and poll waits park the run as \"sleeping\" and are woken by a background scheduler, surviving restarts. Pass wait=true to block until the run reaches a terminal or awaiting_input state.",
|
|
18795
18821
|
moduleDocsUrl: "https://naturali.ai/docs/modules/orchestrations",
|
|
18796
18822
|
httpMethod: "post",
|
|
18797
18823
|
pathParams: ["project_id"],
|
|
@@ -18829,7 +18855,7 @@ const routes = {
|
|
|
18829
18855
|
},
|
|
18830
18856
|
{
|
|
18831
18857
|
"name": "tool_context",
|
|
18832
|
-
"description": "Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `mcp` tool call made by an agent node of this run — including the agents of any child run a `loop` or `sub_orchestration` node starts. The header name is `X-Naturali-Context-` plus the key verbatim; no character is re-cased.\n\nThe bag is stored on the run and re-read on every step, so it survives an `awaiting_input` pause, a `sleeping` wait, a background worker drive and a crash redrive. It is **write-only**: a run is a record every principal who may read runs can read, and a credential in it is not theirs to see, so it is never returned on one. It also does not outlive the run: reaching a terminal status (`
|
|
18858
|
+
"description": "Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `mcp` tool call made by an agent node of this run — including the agents of any child run a `loop` or `sub_orchestration` node starts. The header name is `X-Naturali-Context-` plus the key verbatim; no character is re-cased.\n\nThe bag is stored on the run and re-read on every step, so it survives an `awaiting_input` pause, a `sleeping` wait, a background worker drive and a crash redrive. It is **write-only**: a run is a record every principal who may read runs can read, and a credential in it is not theirs to see, so it is never returned on one. It also does not outlive the run: reaching a terminal status (`completed`, `failed`, `cancelled` or `expired`) clears it. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with `400 INVALID_TOOL_CONTEXT_KEY` and no run is created.\n\nThe reserved identity keys (`session_id`, `actor_id`, `actor_external_id`) are stripped at generation time — a caller cannot address them from here.",
|
|
18833
18859
|
"required": false,
|
|
18834
18860
|
"type": "object",
|
|
18835
18861
|
"in": "body"
|
|
@@ -18850,7 +18876,7 @@ const routes = {
|
|
|
18850
18876
|
},
|
|
18851
18877
|
{
|
|
18852
18878
|
"name": "wait",
|
|
18853
|
-
"description": "When true, block until the run reaches a terminal (
|
|
18879
|
+
"description": "When true, block until the run reaches a terminal (completed/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.",
|
|
18854
18880
|
"required": false,
|
|
18855
18881
|
"type": "boolean",
|
|
18856
18882
|
"in": "body"
|
|
@@ -19458,9 +19484,9 @@ const routes = {
|
|
|
19458
19484
|
},
|
|
19459
19485
|
{
|
|
19460
19486
|
"name": "automation_status",
|
|
19461
|
-
"description": "Only the cases in
|
|
19487
|
+
"description": "Only the cases in these automation statuses. Repeat the parameter to OR values. A value outside the enum, empty string included, is a `400`.",
|
|
19462
19488
|
"required": false,
|
|
19463
|
-
"type": "
|
|
19489
|
+
"type": "array",
|
|
19464
19490
|
"in": "query"
|
|
19465
19491
|
},
|
|
19466
19492
|
{
|
|
@@ -19571,11 +19597,11 @@ const routes = {
|
|
|
19571
19597
|
"get-playbook-case-missing": {
|
|
19572
19598
|
serviceClass: "Playbooks",
|
|
19573
19599
|
operationId: "getPlaybookCaseMissing",
|
|
19574
|
-
description: "Returns the manual inputs still unset, or refused by their schema, before `
|
|
19600
|
+
description: "Returns the manual inputs still unset, or refused by their schema, before `node_id` can be reached, grouped in waves: nothing in a later wave can run before the earlier ones are filled.",
|
|
19575
19601
|
moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
|
|
19576
19602
|
httpMethod: "get",
|
|
19577
19603
|
pathParams: ["project_id", "case_id"],
|
|
19578
|
-
queryParams: ["
|
|
19604
|
+
queryParams: ["node_id"],
|
|
19579
19605
|
headerParams: [],
|
|
19580
19606
|
cookieParams: [],
|
|
19581
19607
|
flags: [
|
|
@@ -19594,8 +19620,8 @@ const routes = {
|
|
|
19594
19620
|
"in": "path"
|
|
19595
19621
|
},
|
|
19596
19622
|
{
|
|
19597
|
-
"name": "
|
|
19598
|
-
"description": "The
|
|
19623
|
+
"name": "node_id",
|
|
19624
|
+
"description": "The ID of the node to reach, usually a final node",
|
|
19599
19625
|
"required": true,
|
|
19600
19626
|
"type": "string",
|
|
19601
19627
|
"in": "query"
|
|
@@ -19610,7 +19636,7 @@ const routes = {
|
|
|
19610
19636
|
httpMethod: "get",
|
|
19611
19637
|
pathParams: ["project_id", "case_id"],
|
|
19612
19638
|
queryParams: [
|
|
19613
|
-
"
|
|
19639
|
+
"node_id",
|
|
19614
19640
|
"limit",
|
|
19615
19641
|
"offset"
|
|
19616
19642
|
],
|
|
@@ -19632,7 +19658,7 @@ const routes = {
|
|
|
19632
19658
|
"in": "path"
|
|
19633
19659
|
},
|
|
19634
19660
|
{
|
|
19635
|
-
"name": "
|
|
19661
|
+
"name": "node_id",
|
|
19636
19662
|
"description": "Only the entries of this node",
|
|
19637
19663
|
"required": false,
|
|
19638
19664
|
"type": "string",
|
|
@@ -19685,7 +19711,7 @@ const routes = {
|
|
|
19685
19711
|
},
|
|
19686
19712
|
{
|
|
19687
19713
|
"name": "node",
|
|
19688
|
-
"description": "The
|
|
19714
|
+
"description": "The ID of a node of the case's playbook version",
|
|
19689
19715
|
"required": true,
|
|
19690
19716
|
"type": "string",
|
|
19691
19717
|
"in": "path"
|
|
@@ -19707,7 +19733,7 @@ const routes = {
|
|
|
19707
19733
|
httpMethod: "get",
|
|
19708
19734
|
pathParams: ["project_id", "case_id"],
|
|
19709
19735
|
queryParams: [
|
|
19710
|
-
"
|
|
19736
|
+
"node_id",
|
|
19711
19737
|
"limit",
|
|
19712
19738
|
"offset"
|
|
19713
19739
|
],
|
|
@@ -19729,7 +19755,7 @@ const routes = {
|
|
|
19729
19755
|
"in": "path"
|
|
19730
19756
|
},
|
|
19731
19757
|
{
|
|
19732
|
-
"name": "
|
|
19758
|
+
"name": "node_id",
|
|
19733
19759
|
"description": "Only the executions of this node",
|
|
19734
19760
|
"required": false,
|
|
19735
19761
|
"type": "string",
|
|
@@ -19792,7 +19818,7 @@ const routes = {
|
|
|
19792
19818
|
"export-playbook-case-node": {
|
|
19793
19819
|
serviceClass: "Playbooks",
|
|
19794
19820
|
operationId: "exportPlaybookCaseNode",
|
|
19795
|
-
description: "Renders one revision of a final node as files, one export per transformation: each transformation's tool is called with the case's `case_id` and `subject`, the `
|
|
19821
|
+
description: "Renders one revision of a final node as files, one export per transformation: each transformation's tool is called with the case's `case_id` and `subject`, the `node_id`, the `revision` and that revision's `output`, and must answer a file (`execute.response_mode: base64`) of its `format`'s content type. The file is kept in the project's files under `/.system/playbooks/`. An export never feeds a node. Without `revision` the node's current output is exported, which needs the node `done` (`409 PLAYBOOK_NODE_NOT_EXPORTABLE`); a `revision` names an earlier output or confirmation of the node. Each tool runs as the author of the case's playbook version, whose permission to call it is checked here (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`). A paused case is `409 PLAYBOOK_CASE_PAUSED`, and a case in a paused project `409 PROJECT_PAUSED`. Without `wait` every export answers `running` and settles in the background; with `wait: true` it answers once each has its file or its error.",
|
|
19796
19822
|
moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
|
|
19797
19823
|
httpMethod: "post",
|
|
19798
19824
|
pathParams: [
|
|
@@ -19820,7 +19846,7 @@ const routes = {
|
|
|
19820
19846
|
},
|
|
19821
19847
|
{
|
|
19822
19848
|
"name": "node",
|
|
19823
|
-
"description": "The
|
|
19849
|
+
"description": "The ID of a node of the case's playbook version",
|
|
19824
19850
|
"required": true,
|
|
19825
19851
|
"type": "string",
|
|
19826
19852
|
"in": "path"
|
|
@@ -19856,7 +19882,7 @@ const routes = {
|
|
|
19856
19882
|
httpMethod: "get",
|
|
19857
19883
|
pathParams: ["project_id", "case_id"],
|
|
19858
19884
|
queryParams: [
|
|
19859
|
-
"
|
|
19885
|
+
"node_id",
|
|
19860
19886
|
"transformation",
|
|
19861
19887
|
"limit",
|
|
19862
19888
|
"offset"
|
|
@@ -19879,7 +19905,7 @@ const routes = {
|
|
|
19879
19905
|
"in": "path"
|
|
19880
19906
|
},
|
|
19881
19907
|
{
|
|
19882
|
-
"name": "
|
|
19908
|
+
"name": "node_id",
|
|
19883
19909
|
"description": "Only the exports of this node",
|
|
19884
19910
|
"required": false,
|
|
19885
19911
|
"type": "string",
|
|
@@ -19949,7 +19975,7 @@ const routes = {
|
|
|
19949
19975
|
"upgrade-playbook-case": {
|
|
19950
19976
|
serviceClass: "Playbooks",
|
|
19951
19977
|
operationId: "upgradePlaybookCase",
|
|
19952
|
-
description: "Moves a case to another version of its playbook: the playbook's current version, or the `version` named, an earlier one included. Values carry over by node
|
|
19978
|
+
description: "Moves a case to another version of its playbook: the playbook's current version, or the `version` named, an earlier one included. Values carry over by node ID, and every node's state is read against the new version: a node added is open, a node removed leaves the structure while its entries stay, a node whose input reads another field is `stale`, and a value its input's new schema refuses is missing again. The cascade then runs what became runnable. With `wait: true` it answers once every execution queued, and every one those queue, has settled or parked. Each upgrade is recorded with what moved; the version the case is already on records nothing. An execution running is `409 PLAYBOOK_CASE_BUSY`; one queued but not started settles `superseded`. An upgrade made with a credential the case's own work runs as is `403 PLAYBOOK_SELF_WRITE`.",
|
|
19953
19979
|
moduleDocsUrl: "https://naturali.ai/docs/modules/playbooks",
|
|
19954
19980
|
httpMethod: "post",
|
|
19955
19981
|
pathParams: ["project_id", "case_id"],
|
|
@@ -20107,7 +20133,7 @@ const routes = {
|
|
|
20107
20133
|
},
|
|
20108
20134
|
{
|
|
20109
20135
|
"name": "node",
|
|
20110
|
-
"description": "The
|
|
20136
|
+
"description": "The ID of a node of the case's playbook version",
|
|
20111
20137
|
"required": true,
|
|
20112
20138
|
"type": "string",
|
|
20113
20139
|
"in": "path"
|
|
@@ -21072,7 +21098,7 @@ const routes = {
|
|
|
21072
21098
|
},
|
|
21073
21099
|
{
|
|
21074
21100
|
"name": "mode",
|
|
21075
|
-
"description": "enforce blocks with 429 (requests at the middleware, tokens/cost_usd at the pre-generation check); monitor observes without blocking — a breach fires the
|
|
21101
|
+
"description": "enforce blocks with 429 (requests at the middleware, tokens/cost_usd at the pre-generation check); monitor observes without blocking — a breach fires the quotas.exceeded webhook and writes a quotas:MonitorBreach audit entry, but the request is let through.",
|
|
21076
21102
|
"required": false,
|
|
21077
21103
|
"type": "string",
|
|
21078
21104
|
"in": "body"
|
|
@@ -21397,9 +21423,9 @@ const routes = {
|
|
|
21397
21423
|
},
|
|
21398
21424
|
{
|
|
21399
21425
|
"name": "status",
|
|
21400
|
-
"description": "Filter by session status
|
|
21426
|
+
"description": "Filter by session status. Repeat the parameter to OR values. A value outside the enum, empty string included, is a `400`.",
|
|
21401
21427
|
"required": false,
|
|
21402
|
-
"type": "
|
|
21428
|
+
"type": "array",
|
|
21403
21429
|
"in": "query"
|
|
21404
21430
|
},
|
|
21405
21431
|
{
|
|
@@ -21635,7 +21661,7 @@ const routes = {
|
|
|
21635
21661
|
"add-session-message": {
|
|
21636
21662
|
serviceClass: "Sessions",
|
|
21637
21663
|
operationId: "addSessionMessage",
|
|
21638
|
-
description: "Saves a user message to the session. When
|
|
21664
|
+
description: "Saves a user message to the session. When `auto_generate` is enabled on the session and no generation is currently in progress, generation is triggered automatically and the response is the generated turn, the same body `?wait=true` generate answers. Otherwise returns the saved user message.",
|
|
21639
21665
|
moduleDocsUrl: "https://naturali.ai/docs/modules/sessions",
|
|
21640
21666
|
httpMethod: "post",
|
|
21641
21667
|
pathParams: ["project_id", "session_id"],
|
|
@@ -22020,9 +22046,9 @@ const routes = {
|
|
|
22020
22046
|
},
|
|
22021
22047
|
{
|
|
22022
22048
|
"name": "status",
|
|
22023
|
-
"description": "",
|
|
22049
|
+
"description": "Filter by whether the task is open or closed. Repeat the parameter to OR values. A value outside the enum, empty string included, is a `400`.",
|
|
22024
22050
|
"required": false,
|
|
22025
|
-
"type": "
|
|
22051
|
+
"type": "array",
|
|
22026
22052
|
"in": "query"
|
|
22027
22053
|
},
|
|
22028
22054
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.203.1",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"naturali",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"yaml": "^2.9.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@naturali/sdk": "0.
|
|
34
|
+
"@naturali/sdk": "0.203.1",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.5.0",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|