@naturali/cli 0.50.1 → 0.51.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/dist/index.mjs +230 -1
- 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.
|
|
17
|
+
var version = "0.51.1";
|
|
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) };
|
|
@@ -1753,6 +1753,76 @@ var Providers = class {
|
|
|
1753
1753
|
});
|
|
1754
1754
|
}
|
|
1755
1755
|
};
|
|
1756
|
+
var Runs = class {
|
|
1757
|
+
/**
|
|
1758
|
+
* List runs
|
|
1759
|
+
*
|
|
1760
|
+
* Runs of one orchestration, most recent first. `orchestration_id` is required — a project-wide run feed is not offered, since the upstream runtime's own list has no project filter (see the file description).
|
|
1761
|
+
*
|
|
1762
|
+
*/
|
|
1763
|
+
static listRuns(options) {
|
|
1764
|
+
return (options.client ?? client).get({
|
|
1765
|
+
url: "/v1/projects/{project_id}/runs",
|
|
1766
|
+
...options
|
|
1767
|
+
});
|
|
1768
|
+
}
|
|
1769
|
+
/**
|
|
1770
|
+
* Start a run
|
|
1771
|
+
*
|
|
1772
|
+
* Creates a new run of the orchestration named by `orchestration_id`. By default the run executes durably in the background and this call returns immediately with status `queued`; poll `GET …/runs/{run_id}` to observe progress. Pass `wait: true` to block until the run reaches a terminal or `awaiting_input` state instead.
|
|
1773
|
+
*
|
|
1774
|
+
*/
|
|
1775
|
+
static startRun(options) {
|
|
1776
|
+
return (options.client ?? client).post({
|
|
1777
|
+
url: "/v1/projects/{project_id}/runs",
|
|
1778
|
+
...options,
|
|
1779
|
+
headers: {
|
|
1780
|
+
"Content-Type": "application/json",
|
|
1781
|
+
...options.headers
|
|
1782
|
+
}
|
|
1783
|
+
});
|
|
1784
|
+
}
|
|
1785
|
+
/**
|
|
1786
|
+
* Get a run
|
|
1787
|
+
*
|
|
1788
|
+
* One run's status, accumulated state, per-node artifacts and execution trace.
|
|
1789
|
+
*
|
|
1790
|
+
*/
|
|
1791
|
+
static getRun(options) {
|
|
1792
|
+
return (options.client ?? client).get({
|
|
1793
|
+
url: "/v1/projects/{project_id}/runs/{run_id}",
|
|
1794
|
+
...options
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1797
|
+
/**
|
|
1798
|
+
* Cancel a run
|
|
1799
|
+
*
|
|
1800
|
+
* Stops a run that has not yet reached a terminal state.
|
|
1801
|
+
*/
|
|
1802
|
+
static cancelRun(options) {
|
|
1803
|
+
return (options.client ?? client).post({
|
|
1804
|
+
url: "/v1/projects/{project_id}/runs/{run_id}:cancel",
|
|
1805
|
+
...options
|
|
1806
|
+
});
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Resume a run
|
|
1810
|
+
*
|
|
1811
|
+
* Moves a run parked at `awaiting_input` forward — the single door for every resume, whatever the run is parked on. Send `output` to answer a human-node pause and advance past it; omit it to re-drive a run without answering anything, which re-parks a human or webhook-receive pause on the same node (useful for a delay/poll wait, or to nudge a run after an external side effect completed out of band).
|
|
1812
|
+
* Only valid on a run whose status is `awaiting_input`; any other status answers 409.
|
|
1813
|
+
*
|
|
1814
|
+
*/
|
|
1815
|
+
static resumeRun(options) {
|
|
1816
|
+
return (options.client ?? client).post({
|
|
1817
|
+
url: "/v1/projects/{project_id}/runs/{run_id}:resume",
|
|
1818
|
+
...options,
|
|
1819
|
+
headers: {
|
|
1820
|
+
"Content-Type": "application/json",
|
|
1821
|
+
...options.headers
|
|
1822
|
+
}
|
|
1823
|
+
});
|
|
1824
|
+
}
|
|
1825
|
+
};
|
|
1756
1826
|
var Sessions = class {
|
|
1757
1827
|
/**
|
|
1758
1828
|
* Open a session
|
|
@@ -2387,6 +2457,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
2387
2457
|
NaturaliClient: () => NaturaliClient,
|
|
2388
2458
|
Projects: () => Projects,
|
|
2389
2459
|
Providers: () => Providers,
|
|
2460
|
+
Runs: () => Runs,
|
|
2390
2461
|
Sessions: () => Sessions,
|
|
2391
2462
|
Tasks: () => Tasks,
|
|
2392
2463
|
Tools: () => Tools,
|
|
@@ -5893,6 +5964,164 @@ const routes = {
|
|
|
5893
5964
|
}
|
|
5894
5965
|
]
|
|
5895
5966
|
},
|
|
5967
|
+
"list-runs": {
|
|
5968
|
+
serviceClass: "Runs",
|
|
5969
|
+
operationId: "listRuns",
|
|
5970
|
+
description: "Runs of one orchestration, most recent first. `orchestration_id` is required — a project-wide run feed is not offered, since the upstream runtime's own list has no project filter (see the file description).",
|
|
5971
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/runs",
|
|
5972
|
+
httpMethod: "get",
|
|
5973
|
+
pathParams: ["project_id"],
|
|
5974
|
+
queryParams: [
|
|
5975
|
+
"orchestration_id",
|
|
5976
|
+
"limit",
|
|
5977
|
+
"cursor"
|
|
5978
|
+
],
|
|
5979
|
+
flags: [
|
|
5980
|
+
{
|
|
5981
|
+
"name": "project_id",
|
|
5982
|
+
"description": "Project public ID (proj_ prefix).",
|
|
5983
|
+
"required": true,
|
|
5984
|
+
"type": "string",
|
|
5985
|
+
"in": "path"
|
|
5986
|
+
},
|
|
5987
|
+
{
|
|
5988
|
+
"name": "orchestration_id",
|
|
5989
|
+
"description": "Only runs of this orchestration. Required — see the file description for why a project-wide feed is not offered. An orchestration this project does not own is a 404, not an empty page.\n",
|
|
5990
|
+
"required": true,
|
|
5991
|
+
"type": "string",
|
|
5992
|
+
"in": "query"
|
|
5993
|
+
},
|
|
5994
|
+
{
|
|
5995
|
+
"name": "limit",
|
|
5996
|
+
"description": "Maximum items per page.",
|
|
5997
|
+
"required": false,
|
|
5998
|
+
"type": "integer",
|
|
5999
|
+
"in": "query"
|
|
6000
|
+
},
|
|
6001
|
+
{
|
|
6002
|
+
"name": "cursor",
|
|
6003
|
+
"description": "Opaque pagination cursor from a previous response's next_cursor.",
|
|
6004
|
+
"required": false,
|
|
6005
|
+
"type": "string",
|
|
6006
|
+
"in": "query"
|
|
6007
|
+
}
|
|
6008
|
+
]
|
|
6009
|
+
},
|
|
6010
|
+
"start-run": {
|
|
6011
|
+
serviceClass: "Runs",
|
|
6012
|
+
operationId: "startRun",
|
|
6013
|
+
description: "Creates a new run of the orchestration named by `orchestration_id`. By default the run executes durably in the background and this call returns immediately with status `queued`; poll `GET …/runs/{run_id}` to observe progress. Pass `wait: true` to block until the run reaches a terminal or `awaiting_input` state instead.",
|
|
6014
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/runs",
|
|
6015
|
+
httpMethod: "post",
|
|
6016
|
+
pathParams: ["project_id"],
|
|
6017
|
+
queryParams: [],
|
|
6018
|
+
flags: [
|
|
6019
|
+
{
|
|
6020
|
+
"name": "project_id",
|
|
6021
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6022
|
+
"required": true,
|
|
6023
|
+
"type": "string",
|
|
6024
|
+
"in": "path"
|
|
6025
|
+
},
|
|
6026
|
+
{
|
|
6027
|
+
"name": "orchestration_id",
|
|
6028
|
+
"description": "The orchestration to run.",
|
|
6029
|
+
"required": true,
|
|
6030
|
+
"type": "string",
|
|
6031
|
+
"in": "body"
|
|
6032
|
+
},
|
|
6033
|
+
{
|
|
6034
|
+
"name": "input",
|
|
6035
|
+
"description": "Initial state for the run, merged with the orchestration's own defaults.",
|
|
6036
|
+
"required": false,
|
|
6037
|
+
"type": "object",
|
|
6038
|
+
"in": "body"
|
|
6039
|
+
},
|
|
6040
|
+
{
|
|
6041
|
+
"name": "wait",
|
|
6042
|
+
"description": "When true, block until the run reaches a terminal or `awaiting_input` state and return the settled run. When false (default), return immediately with `status: \"queued\"`.\n",
|
|
6043
|
+
"required": false,
|
|
6044
|
+
"type": "boolean",
|
|
6045
|
+
"in": "body"
|
|
6046
|
+
}
|
|
6047
|
+
]
|
|
6048
|
+
},
|
|
6049
|
+
"get-run": {
|
|
6050
|
+
serviceClass: "Runs",
|
|
6051
|
+
operationId: "getRun",
|
|
6052
|
+
description: "One run's status, accumulated state, per-node artifacts and execution trace.",
|
|
6053
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/runs",
|
|
6054
|
+
httpMethod: "get",
|
|
6055
|
+
pathParams: ["project_id", "run_id"],
|
|
6056
|
+
queryParams: [],
|
|
6057
|
+
flags: [{
|
|
6058
|
+
"name": "project_id",
|
|
6059
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6060
|
+
"required": true,
|
|
6061
|
+
"type": "string",
|
|
6062
|
+
"in": "path"
|
|
6063
|
+
}, {
|
|
6064
|
+
"name": "run_id",
|
|
6065
|
+
"description": "Run public ID (orch_run_ prefix).",
|
|
6066
|
+
"required": true,
|
|
6067
|
+
"type": "string",
|
|
6068
|
+
"in": "path"
|
|
6069
|
+
}]
|
|
6070
|
+
},
|
|
6071
|
+
"cancel-run": {
|
|
6072
|
+
serviceClass: "Runs",
|
|
6073
|
+
operationId: "cancelRun",
|
|
6074
|
+
description: "Stops a run that has not yet reached a terminal state.",
|
|
6075
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/runs",
|
|
6076
|
+
httpMethod: "post",
|
|
6077
|
+
pathParams: ["project_id", "run_id"],
|
|
6078
|
+
queryParams: [],
|
|
6079
|
+
flags: [{
|
|
6080
|
+
"name": "project_id",
|
|
6081
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6082
|
+
"required": true,
|
|
6083
|
+
"type": "string",
|
|
6084
|
+
"in": "path"
|
|
6085
|
+
}, {
|
|
6086
|
+
"name": "run_id",
|
|
6087
|
+
"description": "Run public ID (orch_run_ prefix).",
|
|
6088
|
+
"required": true,
|
|
6089
|
+
"type": "string",
|
|
6090
|
+
"in": "path"
|
|
6091
|
+
}]
|
|
6092
|
+
},
|
|
6093
|
+
"resume-run": {
|
|
6094
|
+
serviceClass: "Runs",
|
|
6095
|
+
operationId: "resumeRun",
|
|
6096
|
+
description: "Moves a run parked at `awaiting_input` forward — the single door for every resume, whatever the run is parked on. Send `output` to answer a human-node pause and advance past it; omit it to re-drive a run without answering anything, which re-parks a human or webhook-receive pause on the same node (useful for a delay/poll wait, or to nudge a run after an external side effect completed out of band). Only valid on a run whose status is `awaiting_input`; any other status answers 409.",
|
|
6097
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/runs",
|
|
6098
|
+
httpMethod: "post",
|
|
6099
|
+
pathParams: ["project_id", "run_id"],
|
|
6100
|
+
queryParams: [],
|
|
6101
|
+
flags: [
|
|
6102
|
+
{
|
|
6103
|
+
"name": "project_id",
|
|
6104
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6105
|
+
"required": true,
|
|
6106
|
+
"type": "string",
|
|
6107
|
+
"in": "path"
|
|
6108
|
+
},
|
|
6109
|
+
{
|
|
6110
|
+
"name": "run_id",
|
|
6111
|
+
"description": "Run public ID (orch_run_ prefix).",
|
|
6112
|
+
"required": true,
|
|
6113
|
+
"type": "string",
|
|
6114
|
+
"in": "path"
|
|
6115
|
+
},
|
|
6116
|
+
{
|
|
6117
|
+
"name": "output",
|
|
6118
|
+
"description": "Answers a human-node pause and advances the run past it. Omit to re-drive the run without answering anything.\n",
|
|
6119
|
+
"required": false,
|
|
6120
|
+
"type": "object",
|
|
6121
|
+
"in": "body"
|
|
6122
|
+
}
|
|
6123
|
+
]
|
|
6124
|
+
},
|
|
5896
6125
|
"create-session": {
|
|
5897
6126
|
serviceClass: "Sessions",
|
|
5898
6127
|
operationId: "createSession",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.1",
|
|
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.
|
|
33
|
+
"@naturali/sdk": "0.51.1"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"generate": "tsx scripts/generate.ts",
|