@naturali/cli 0.206.10 → 0.206.11
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/dist/index.mjs +59 -3
- 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.206.
|
|
20
|
+
var version = "0.206.11";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
23
23
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -5630,6 +5630,21 @@ var Tasks = class {
|
|
|
5630
5630
|
});
|
|
5631
5631
|
}
|
|
5632
5632
|
/**
|
|
5633
|
+
* Migrate a task to a newer workflow version
|
|
5634
|
+
*
|
|
5635
|
+
* Moves an open task onto a newer version of its workflow. A state the target version also declares maps to itself; `state_map` maps a state it lacks. The payload is re-validated against the target `payload_schema`. The mapped state's `on_enter` is not fired: transition the task when you want the target's automation. A task with a dispatch in flight or a transition pending approval is refused, since both belong to the version they started under. Recorded in history as a row with `transition: null` and both versions.
|
|
5636
|
+
*/
|
|
5637
|
+
static migrateTask(options) {
|
|
5638
|
+
return (options.client ?? client).post({
|
|
5639
|
+
url: "/v1/projects/{project_id}/tasks/{task_id}/migrate",
|
|
5640
|
+
...options,
|
|
5641
|
+
headers: {
|
|
5642
|
+
"Content-Type": "application/json",
|
|
5643
|
+
...options.headers
|
|
5644
|
+
}
|
|
5645
|
+
});
|
|
5646
|
+
}
|
|
5647
|
+
/**
|
|
5633
5648
|
* Pause a task
|
|
5634
5649
|
*
|
|
5635
5650
|
* Pauses a task's automation. While a pause is in force no state's `on_enter` dispatches and no retry chain continues — an agent generation, a tool call and a sub-orchestration alike — so the task stops spending without losing its place.
|
|
@@ -6421,7 +6436,7 @@ var Workflows = class {
|
|
|
6421
6436
|
/**
|
|
6422
6437
|
* Fetch an archived workflow version
|
|
6423
6438
|
*
|
|
6424
|
-
* Returns the exact state machine a given version describes. Every task records the version it
|
|
6439
|
+
* Returns the exact state machine a given version describes. Every task records the version it runs on in `workflow_version`, fixed at creation and moved only by migrate-task, so this is how you read the definition a task is actually being validated against — including a task whose workflow has been rewired since.
|
|
6425
6440
|
*
|
|
6426
6441
|
*/
|
|
6427
6442
|
static getWorkflowVersion(options) {
|
|
@@ -22420,6 +22435,47 @@ const routes = {
|
|
|
22420
22435
|
}
|
|
22421
22436
|
]
|
|
22422
22437
|
},
|
|
22438
|
+
"migrate-task": {
|
|
22439
|
+
serviceClass: "Tasks",
|
|
22440
|
+
operationId: "migrateTask",
|
|
22441
|
+
description: "Moves an open task onto a newer version of its workflow. A state the target version also declares maps to itself; `state_map` maps a state it lacks. The payload is re-validated against the target `payload_schema`. The mapped state's `on_enter` is not fired: transition the task when you want the target's automation. A task with a dispatch in flight or a transition pending approval is refused, since both belong to the version they started under. Recorded in history as a row with `transition: null` and both versions.",
|
|
22442
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/tasks",
|
|
22443
|
+
httpMethod: "post",
|
|
22444
|
+
pathParams: ["project_id", "task_id"],
|
|
22445
|
+
queryParams: [],
|
|
22446
|
+
headerParams: [],
|
|
22447
|
+
cookieParams: [],
|
|
22448
|
+
flags: [
|
|
22449
|
+
{
|
|
22450
|
+
"name": "project_id",
|
|
22451
|
+
"description": "Project public ID (proj_ prefix).",
|
|
22452
|
+
"required": true,
|
|
22453
|
+
"type": "string",
|
|
22454
|
+
"in": "path"
|
|
22455
|
+
},
|
|
22456
|
+
{
|
|
22457
|
+
"name": "task_id",
|
|
22458
|
+
"description": "The task to migrate.",
|
|
22459
|
+
"required": true,
|
|
22460
|
+
"type": "string",
|
|
22461
|
+
"in": "path"
|
|
22462
|
+
},
|
|
22463
|
+
{
|
|
22464
|
+
"name": "to_version",
|
|
22465
|
+
"description": "The workflow version to move the task onto; newer than its current one.",
|
|
22466
|
+
"required": true,
|
|
22467
|
+
"type": "integer",
|
|
22468
|
+
"in": "body"
|
|
22469
|
+
},
|
|
22470
|
+
{
|
|
22471
|
+
"name": "state_map",
|
|
22472
|
+
"description": "Current state name to a state the target version declares. Required only for a state the target lacks; an entry for a state both declare overrides the identity mapping.",
|
|
22473
|
+
"required": false,
|
|
22474
|
+
"type": "object",
|
|
22475
|
+
"in": "body"
|
|
22476
|
+
}
|
|
22477
|
+
]
|
|
22478
|
+
},
|
|
22423
22479
|
"pause-task": {
|
|
22424
22480
|
serviceClass: "Tasks",
|
|
22425
22481
|
operationId: "pauseTask",
|
|
@@ -24419,7 +24475,7 @@ const routes = {
|
|
|
24419
24475
|
"get-workflow-version": {
|
|
24420
24476
|
serviceClass: "Workflows",
|
|
24421
24477
|
operationId: "getWorkflowVersion",
|
|
24422
|
-
description: "Returns the exact state machine a given version describes. Every task records the version it
|
|
24478
|
+
description: "Returns the exact state machine a given version describes. Every task records the version it runs on in `workflow_version`, fixed at creation and moved only by migrate-task, so this is how you read the definition a task is actually being validated against — including a task whose workflow has been rewired since.",
|
|
24423
24479
|
moduleDocsUrl: "https://naturali.ai/docs/modules/workflows",
|
|
24424
24480
|
httpMethod: "get",
|
|
24425
24481
|
pathParams: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.206.
|
|
3
|
+
"version": "0.206.11",
|
|
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.206.
|
|
34
|
+
"@naturali/sdk": "0.206.11",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.5.0",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|