@naturali/cli 0.52.0 → 0.53.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 +627 -9
- 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.53.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) };
|
|
@@ -1611,6 +1611,163 @@ var Models = class {
|
|
|
1611
1611
|
});
|
|
1612
1612
|
}
|
|
1613
1613
|
};
|
|
1614
|
+
var Orchestrations = class {
|
|
1615
|
+
/**
|
|
1616
|
+
* List orchestrations
|
|
1617
|
+
*
|
|
1618
|
+
* Lists the project's orchestration definitions.
|
|
1619
|
+
*/
|
|
1620
|
+
static listOrchestrations(options) {
|
|
1621
|
+
return (options.client ?? client).get({
|
|
1622
|
+
url: "/v1/projects/{project_id}/orchestrations",
|
|
1623
|
+
...options
|
|
1624
|
+
});
|
|
1625
|
+
}
|
|
1626
|
+
/**
|
|
1627
|
+
* Create an orchestration
|
|
1628
|
+
*
|
|
1629
|
+
* Creates a new orchestration (pipeline) definition in the project.
|
|
1630
|
+
*/
|
|
1631
|
+
static createOrchestration(options) {
|
|
1632
|
+
return (options.client ?? client).post({
|
|
1633
|
+
url: "/v1/projects/{project_id}/orchestrations",
|
|
1634
|
+
...options,
|
|
1635
|
+
headers: {
|
|
1636
|
+
"Content-Type": "application/json",
|
|
1637
|
+
...options.headers
|
|
1638
|
+
}
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
/**
|
|
1642
|
+
* Validate an orchestration graph
|
|
1643
|
+
*
|
|
1644
|
+
* Statically validates a graph without persisting anything — the same checks `create`/`update` enforce (unique node ids, edges reference existing nodes, the graph is acyclic unless it contains a loop node, every `input_mapping` reference resolves). Returns blocking `errors` and non-blocking `warnings`.
|
|
1645
|
+
*
|
|
1646
|
+
*/
|
|
1647
|
+
static validateOrchestration(options) {
|
|
1648
|
+
return (options.client ?? client).post({
|
|
1649
|
+
url: "/v1/projects/{project_id}/orchestrations/validate",
|
|
1650
|
+
...options,
|
|
1651
|
+
headers: {
|
|
1652
|
+
"Content-Type": "application/json",
|
|
1653
|
+
...options.headers
|
|
1654
|
+
}
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
/**
|
|
1658
|
+
* Delete an orchestration
|
|
1659
|
+
*
|
|
1660
|
+
* Deletes the orchestration definition and all of its runs.
|
|
1661
|
+
*/
|
|
1662
|
+
static deleteOrchestration(options) {
|
|
1663
|
+
return (options.client ?? client).delete({
|
|
1664
|
+
url: "/v1/projects/{project_id}/orchestrations/{orchestration_id}",
|
|
1665
|
+
...options
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
/**
|
|
1669
|
+
* Get an orchestration
|
|
1670
|
+
*
|
|
1671
|
+
* Returns one orchestration with its nodes and edges. Belonging to another project responds `404`, not `403` — existence is not leaked.
|
|
1672
|
+
*
|
|
1673
|
+
*/
|
|
1674
|
+
static getOrchestration(options) {
|
|
1675
|
+
return (options.client ?? client).get({
|
|
1676
|
+
url: "/v1/projects/{project_id}/orchestrations/{orchestration_id}",
|
|
1677
|
+
...options
|
|
1678
|
+
});
|
|
1679
|
+
}
|
|
1680
|
+
/**
|
|
1681
|
+
* Update an orchestration
|
|
1682
|
+
*
|
|
1683
|
+
* Partially updates an orchestration's definition.
|
|
1684
|
+
*/
|
|
1685
|
+
static updateOrchestration(options) {
|
|
1686
|
+
return (options.client ?? client).patch({
|
|
1687
|
+
url: "/v1/projects/{project_id}/orchestrations/{orchestration_id}",
|
|
1688
|
+
...options,
|
|
1689
|
+
headers: {
|
|
1690
|
+
"Content-Type": "application/json",
|
|
1691
|
+
...options.headers
|
|
1692
|
+
}
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
/**
|
|
1696
|
+
* List orchestration runs
|
|
1697
|
+
*
|
|
1698
|
+
* Lists runs of one orchestration. `orchestration_id` is required — it is what scopes the list to this project, since a run carries no cheaper project-level filter of its own.
|
|
1699
|
+
*
|
|
1700
|
+
*/
|
|
1701
|
+
static listOrchestrationRuns(options) {
|
|
1702
|
+
return (options.client ?? client).get({
|
|
1703
|
+
url: "/v1/projects/{project_id}/orchestration-runs",
|
|
1704
|
+
...options
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1707
|
+
/**
|
|
1708
|
+
* Start an orchestration run
|
|
1709
|
+
*
|
|
1710
|
+
* Starts a new run of the orchestration named by `orchestration_id`, which must belong to this project. By default the run executes durably in the background and this returns immediately with `status: "queued"`; pass `wait: true` to block until the run reaches a terminal or `awaiting_input` state instead.
|
|
1711
|
+
*/
|
|
1712
|
+
static startOrchestrationRun(options) {
|
|
1713
|
+
return (options.client ?? client).post({
|
|
1714
|
+
url: "/v1/projects/{project_id}/orchestration-runs",
|
|
1715
|
+
...options,
|
|
1716
|
+
headers: {
|
|
1717
|
+
"Content-Type": "application/json",
|
|
1718
|
+
...options.headers
|
|
1719
|
+
}
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
/**
|
|
1723
|
+
* Get an orchestration run
|
|
1724
|
+
*
|
|
1725
|
+
* Returns the status, state, and artifacts of one run.
|
|
1726
|
+
*/
|
|
1727
|
+
static getOrchestrationRun(options) {
|
|
1728
|
+
return (options.client ?? client).get({
|
|
1729
|
+
url: "/v1/projects/{project_id}/orchestration-runs/{orchestration_run_id}",
|
|
1730
|
+
...options
|
|
1731
|
+
});
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* Cancel an orchestration run
|
|
1735
|
+
*
|
|
1736
|
+
* Cancels a run that has not yet reached a terminal state.
|
|
1737
|
+
*/
|
|
1738
|
+
static cancelOrchestrationRun(options) {
|
|
1739
|
+
return (options.client ?? client).post({
|
|
1740
|
+
url: "/v1/projects/{project_id}/orchestration-runs/{orchestration_run_id}/cancel",
|
|
1741
|
+
...options
|
|
1742
|
+
});
|
|
1743
|
+
}
|
|
1744
|
+
/**
|
|
1745
|
+
* Resume an orchestration run
|
|
1746
|
+
*
|
|
1747
|
+
* Re-drives an `awaiting_input` run from its last checkpoint. This does not satisfy the pause itself — a run parked on a human or webhook node re-parks on the same node. Use `human-input` to supply the awaited payload and advance the run.
|
|
1748
|
+
*/
|
|
1749
|
+
static resumeOrchestrationRun(options) {
|
|
1750
|
+
return (options.client ?? client).post({
|
|
1751
|
+
url: "/v1/projects/{project_id}/orchestration-runs/{orchestration_run_id}/resume",
|
|
1752
|
+
...options
|
|
1753
|
+
});
|
|
1754
|
+
}
|
|
1755
|
+
/**
|
|
1756
|
+
* Submit human input
|
|
1757
|
+
*
|
|
1758
|
+
* Provides human input to a run that is `awaiting_input` at a human node, and advances it.
|
|
1759
|
+
*/
|
|
1760
|
+
static submitHumanInput(options) {
|
|
1761
|
+
return (options.client ?? client).post({
|
|
1762
|
+
url: "/v1/projects/{project_id}/orchestration-runs/{orchestration_run_id}/human-input",
|
|
1763
|
+
...options,
|
|
1764
|
+
headers: {
|
|
1765
|
+
"Content-Type": "application/json",
|
|
1766
|
+
...options.headers
|
|
1767
|
+
}
|
|
1768
|
+
});
|
|
1769
|
+
}
|
|
1770
|
+
};
|
|
1614
1771
|
var Projects = class {
|
|
1615
1772
|
/**
|
|
1616
1773
|
* List projects
|
|
@@ -2060,7 +2217,9 @@ var Triggers = class {
|
|
|
2060
2217
|
/**
|
|
2061
2218
|
* List triggers
|
|
2062
2219
|
*
|
|
2063
|
-
* The project's schedule triggers.
|
|
2220
|
+
* The project's schedule triggers, of either fronted target kind.
|
|
2221
|
+
* `total` is the runtime's count of the project's schedule triggers, so it can exceed the rows returned when a trigger was authored directly against the runtime with a target this surface doesn't front (the same bypass `getTrigger` answers `404` for). Pass `target_type` — which is filtered and counted upstream — when an exact count matters.
|
|
2222
|
+
*
|
|
2064
2223
|
*/
|
|
2065
2224
|
static listTriggers(options) {
|
|
2066
2225
|
return (options.client ?? client).get({
|
|
@@ -2071,7 +2230,7 @@ var Triggers = class {
|
|
|
2071
2230
|
/**
|
|
2072
2231
|
* Create a trigger
|
|
2073
2232
|
*
|
|
2074
|
-
* Schedules `target_id`
|
|
2233
|
+
* Schedules `target_id` — an agent or an orchestration in this project, per `target_type` — to run on `cron`, a 5-field cron expression evaluated in UTC.
|
|
2075
2234
|
*
|
|
2076
2235
|
*/
|
|
2077
2236
|
static createTrigger(options) {
|
|
@@ -2107,7 +2266,7 @@ var Triggers = class {
|
|
|
2107
2266
|
/**
|
|
2108
2267
|
* Update a trigger
|
|
2109
2268
|
*
|
|
2110
|
-
* Retune the schedule, its target, or whether it fires at all. At least one field is required. `type`
|
|
2269
|
+
* Retune the schedule, its target, or whether it fires at all. At least one field is required. `type` is immutable; `target_type` may be changed only together with `target_id`.
|
|
2111
2270
|
*
|
|
2112
2271
|
*/
|
|
2113
2272
|
static updateTrigger(options) {
|
|
@@ -2335,12 +2494,14 @@ var NaturaliClient = class {
|
|
|
2335
2494
|
generations;
|
|
2336
2495
|
knowledge;
|
|
2337
2496
|
models;
|
|
2497
|
+
orchestrations;
|
|
2338
2498
|
projects;
|
|
2339
2499
|
providers;
|
|
2340
2500
|
sessions;
|
|
2341
2501
|
tasks;
|
|
2342
2502
|
tools;
|
|
2343
2503
|
traces;
|
|
2504
|
+
triggers;
|
|
2344
2505
|
webhooks;
|
|
2345
2506
|
/** The underlying HTTP client, for interceptors or one-off requests. */
|
|
2346
2507
|
http;
|
|
@@ -2362,12 +2523,14 @@ var NaturaliClient = class {
|
|
|
2362
2523
|
this.generations = bindResource(Generations, this.http);
|
|
2363
2524
|
this.knowledge = bindResource(Knowledge, this.http);
|
|
2364
2525
|
this.models = bindResource(Models, this.http);
|
|
2526
|
+
this.orchestrations = bindResource(Orchestrations, this.http);
|
|
2365
2527
|
this.projects = bindResource(Projects, this.http);
|
|
2366
2528
|
this.providers = bindResource(Providers, this.http);
|
|
2367
2529
|
this.sessions = bindResource(Sessions, this.http);
|
|
2368
2530
|
this.tasks = bindResource(Tasks, this.http);
|
|
2369
2531
|
this.tools = bindResource(Tools, this.http);
|
|
2370
2532
|
this.traces = bindResource(Traces, this.http);
|
|
2533
|
+
this.triggers = bindResource(Triggers, this.http);
|
|
2371
2534
|
this.webhooks = bindResource(Webhooks, this.http);
|
|
2372
2535
|
}
|
|
2373
2536
|
};
|
|
@@ -2385,6 +2548,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
2385
2548
|
Knowledge: () => Knowledge,
|
|
2386
2549
|
Models: () => Models,
|
|
2387
2550
|
NaturaliClient: () => NaturaliClient,
|
|
2551
|
+
Orchestrations: () => Orchestrations,
|
|
2388
2552
|
Projects: () => Projects,
|
|
2389
2553
|
Providers: () => Providers,
|
|
2390
2554
|
Sessions: () => Sessions,
|
|
@@ -5529,6 +5693,435 @@ const routes = {
|
|
|
5529
5693
|
"in": "path"
|
|
5530
5694
|
}]
|
|
5531
5695
|
},
|
|
5696
|
+
"list-orchestrations": {
|
|
5697
|
+
serviceClass: "Orchestrations",
|
|
5698
|
+
operationId: "listOrchestrations",
|
|
5699
|
+
description: "Lists the project's orchestration definitions.",
|
|
5700
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
5701
|
+
httpMethod: "get",
|
|
5702
|
+
pathParams: ["project_id"],
|
|
5703
|
+
queryParams: ["limit", "offset"],
|
|
5704
|
+
flags: [
|
|
5705
|
+
{
|
|
5706
|
+
"name": "project_id",
|
|
5707
|
+
"description": "Project public ID (proj_ prefix).",
|
|
5708
|
+
"required": true,
|
|
5709
|
+
"type": "string",
|
|
5710
|
+
"in": "path"
|
|
5711
|
+
},
|
|
5712
|
+
{
|
|
5713
|
+
"name": "limit",
|
|
5714
|
+
"description": "Maximum items to return (1–100).",
|
|
5715
|
+
"required": false,
|
|
5716
|
+
"type": "integer",
|
|
5717
|
+
"in": "query"
|
|
5718
|
+
},
|
|
5719
|
+
{
|
|
5720
|
+
"name": "offset",
|
|
5721
|
+
"description": "Items to skip. These lists page by offset rather than by naturali's usual opaque cursor because the upstream ordering is offset-based; a cursor here would only imitate a keyset.\n",
|
|
5722
|
+
"required": false,
|
|
5723
|
+
"type": "integer",
|
|
5724
|
+
"in": "query"
|
|
5725
|
+
}
|
|
5726
|
+
]
|
|
5727
|
+
},
|
|
5728
|
+
"create-orchestration": {
|
|
5729
|
+
serviceClass: "Orchestrations",
|
|
5730
|
+
operationId: "createOrchestration",
|
|
5731
|
+
description: "Creates a new orchestration (pipeline) definition in the project.",
|
|
5732
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
5733
|
+
httpMethod: "post",
|
|
5734
|
+
pathParams: ["project_id"],
|
|
5735
|
+
queryParams: [],
|
|
5736
|
+
flags: [
|
|
5737
|
+
{
|
|
5738
|
+
"name": "project_id",
|
|
5739
|
+
"description": "Project public ID (proj_ prefix).",
|
|
5740
|
+
"required": true,
|
|
5741
|
+
"type": "string",
|
|
5742
|
+
"in": "path"
|
|
5743
|
+
},
|
|
5744
|
+
{
|
|
5745
|
+
"name": "name",
|
|
5746
|
+
"description": "",
|
|
5747
|
+
"required": true,
|
|
5748
|
+
"type": "string",
|
|
5749
|
+
"in": "body"
|
|
5750
|
+
},
|
|
5751
|
+
{
|
|
5752
|
+
"name": "description",
|
|
5753
|
+
"description": "",
|
|
5754
|
+
"required": false,
|
|
5755
|
+
"type": "string",
|
|
5756
|
+
"in": "body"
|
|
5757
|
+
},
|
|
5758
|
+
{
|
|
5759
|
+
"name": "nodes",
|
|
5760
|
+
"description": "",
|
|
5761
|
+
"required": true,
|
|
5762
|
+
"type": "array",
|
|
5763
|
+
"in": "body"
|
|
5764
|
+
},
|
|
5765
|
+
{
|
|
5766
|
+
"name": "edges",
|
|
5767
|
+
"description": "",
|
|
5768
|
+
"required": true,
|
|
5769
|
+
"type": "array",
|
|
5770
|
+
"in": "body"
|
|
5771
|
+
},
|
|
5772
|
+
{
|
|
5773
|
+
"name": "state_schema",
|
|
5774
|
+
"description": "",
|
|
5775
|
+
"required": false,
|
|
5776
|
+
"type": "object",
|
|
5777
|
+
"in": "body"
|
|
5778
|
+
},
|
|
5779
|
+
{
|
|
5780
|
+
"name": "input_schema",
|
|
5781
|
+
"description": "",
|
|
5782
|
+
"required": false,
|
|
5783
|
+
"type": "object",
|
|
5784
|
+
"in": "body"
|
|
5785
|
+
}
|
|
5786
|
+
]
|
|
5787
|
+
},
|
|
5788
|
+
"validate-orchestration": {
|
|
5789
|
+
serviceClass: "Orchestrations",
|
|
5790
|
+
operationId: "validateOrchestration",
|
|
5791
|
+
description: "Statically validates a graph without persisting anything — the same checks `create`/`update` enforce (unique node ids, edges reference existing nodes, the graph is acyclic unless it contains a loop node, every `input_mapping` reference resolves). Returns blocking `errors` and non-blocking `warnings`.",
|
|
5792
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
5793
|
+
httpMethod: "post",
|
|
5794
|
+
pathParams: ["project_id"],
|
|
5795
|
+
queryParams: [],
|
|
5796
|
+
flags: [
|
|
5797
|
+
{
|
|
5798
|
+
"name": "project_id",
|
|
5799
|
+
"description": "Project public ID (proj_ prefix).",
|
|
5800
|
+
"required": true,
|
|
5801
|
+
"type": "string",
|
|
5802
|
+
"in": "path"
|
|
5803
|
+
},
|
|
5804
|
+
{
|
|
5805
|
+
"name": "nodes",
|
|
5806
|
+
"description": "",
|
|
5807
|
+
"required": false,
|
|
5808
|
+
"type": "array",
|
|
5809
|
+
"in": "body"
|
|
5810
|
+
},
|
|
5811
|
+
{
|
|
5812
|
+
"name": "edges",
|
|
5813
|
+
"description": "",
|
|
5814
|
+
"required": false,
|
|
5815
|
+
"type": "array",
|
|
5816
|
+
"in": "body"
|
|
5817
|
+
},
|
|
5818
|
+
{
|
|
5819
|
+
"name": "input_schema",
|
|
5820
|
+
"description": "",
|
|
5821
|
+
"required": false,
|
|
5822
|
+
"type": "object",
|
|
5823
|
+
"in": "body"
|
|
5824
|
+
}
|
|
5825
|
+
]
|
|
5826
|
+
},
|
|
5827
|
+
"get-orchestration": {
|
|
5828
|
+
serviceClass: "Orchestrations",
|
|
5829
|
+
operationId: "getOrchestration",
|
|
5830
|
+
description: "Returns one orchestration with its nodes and edges. Belonging to another project responds `404`, not `403` — existence is not leaked.",
|
|
5831
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
5832
|
+
httpMethod: "get",
|
|
5833
|
+
pathParams: ["project_id", "orchestration_id"],
|
|
5834
|
+
queryParams: [],
|
|
5835
|
+
flags: [{
|
|
5836
|
+
"name": "project_id",
|
|
5837
|
+
"description": "Project public ID (proj_ prefix).",
|
|
5838
|
+
"required": true,
|
|
5839
|
+
"type": "string",
|
|
5840
|
+
"in": "path"
|
|
5841
|
+
}, {
|
|
5842
|
+
"name": "orchestration_id",
|
|
5843
|
+
"description": "Orchestration public ID (orch_ prefix).",
|
|
5844
|
+
"required": true,
|
|
5845
|
+
"type": "string",
|
|
5846
|
+
"in": "path"
|
|
5847
|
+
}]
|
|
5848
|
+
},
|
|
5849
|
+
"update-orchestration": {
|
|
5850
|
+
serviceClass: "Orchestrations",
|
|
5851
|
+
operationId: "updateOrchestration",
|
|
5852
|
+
description: "Partially updates an orchestration's definition.",
|
|
5853
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
5854
|
+
httpMethod: "patch",
|
|
5855
|
+
pathParams: ["project_id", "orchestration_id"],
|
|
5856
|
+
queryParams: [],
|
|
5857
|
+
flags: [
|
|
5858
|
+
{
|
|
5859
|
+
"name": "project_id",
|
|
5860
|
+
"description": "Project public ID (proj_ prefix).",
|
|
5861
|
+
"required": true,
|
|
5862
|
+
"type": "string",
|
|
5863
|
+
"in": "path"
|
|
5864
|
+
},
|
|
5865
|
+
{
|
|
5866
|
+
"name": "orchestration_id",
|
|
5867
|
+
"description": "Orchestration public ID (orch_ prefix).",
|
|
5868
|
+
"required": true,
|
|
5869
|
+
"type": "string",
|
|
5870
|
+
"in": "path"
|
|
5871
|
+
},
|
|
5872
|
+
{
|
|
5873
|
+
"name": "name",
|
|
5874
|
+
"description": "",
|
|
5875
|
+
"required": false,
|
|
5876
|
+
"type": "string",
|
|
5877
|
+
"in": "body"
|
|
5878
|
+
},
|
|
5879
|
+
{
|
|
5880
|
+
"name": "description",
|
|
5881
|
+
"description": "",
|
|
5882
|
+
"required": false,
|
|
5883
|
+
"type": "string",
|
|
5884
|
+
"in": "body"
|
|
5885
|
+
},
|
|
5886
|
+
{
|
|
5887
|
+
"name": "nodes",
|
|
5888
|
+
"description": "",
|
|
5889
|
+
"required": false,
|
|
5890
|
+
"type": "array",
|
|
5891
|
+
"in": "body"
|
|
5892
|
+
},
|
|
5893
|
+
{
|
|
5894
|
+
"name": "edges",
|
|
5895
|
+
"description": "",
|
|
5896
|
+
"required": false,
|
|
5897
|
+
"type": "array",
|
|
5898
|
+
"in": "body"
|
|
5899
|
+
},
|
|
5900
|
+
{
|
|
5901
|
+
"name": "state_schema",
|
|
5902
|
+
"description": "",
|
|
5903
|
+
"required": false,
|
|
5904
|
+
"type": "object",
|
|
5905
|
+
"in": "body"
|
|
5906
|
+
},
|
|
5907
|
+
{
|
|
5908
|
+
"name": "input_schema",
|
|
5909
|
+
"description": "",
|
|
5910
|
+
"required": false,
|
|
5911
|
+
"type": "object",
|
|
5912
|
+
"in": "body"
|
|
5913
|
+
}
|
|
5914
|
+
]
|
|
5915
|
+
},
|
|
5916
|
+
"delete-orchestration": {
|
|
5917
|
+
serviceClass: "Orchestrations",
|
|
5918
|
+
operationId: "deleteOrchestration",
|
|
5919
|
+
description: "Deletes the orchestration definition and all of its runs.",
|
|
5920
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
5921
|
+
httpMethod: "delete",
|
|
5922
|
+
pathParams: ["project_id", "orchestration_id"],
|
|
5923
|
+
queryParams: [],
|
|
5924
|
+
flags: [{
|
|
5925
|
+
"name": "project_id",
|
|
5926
|
+
"description": "Project public ID (proj_ prefix).",
|
|
5927
|
+
"required": true,
|
|
5928
|
+
"type": "string",
|
|
5929
|
+
"in": "path"
|
|
5930
|
+
}, {
|
|
5931
|
+
"name": "orchestration_id",
|
|
5932
|
+
"description": "Orchestration public ID (orch_ prefix).",
|
|
5933
|
+
"required": true,
|
|
5934
|
+
"type": "string",
|
|
5935
|
+
"in": "path"
|
|
5936
|
+
}]
|
|
5937
|
+
},
|
|
5938
|
+
"list-orchestration-runs": {
|
|
5939
|
+
serviceClass: "Orchestrations",
|
|
5940
|
+
operationId: "listOrchestrationRuns",
|
|
5941
|
+
description: "Lists runs of one orchestration. `orchestration_id` is required — it is what scopes the list to this project, since a run carries no cheaper project-level filter of its own.",
|
|
5942
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
5943
|
+
httpMethod: "get",
|
|
5944
|
+
pathParams: ["project_id"],
|
|
5945
|
+
queryParams: [
|
|
5946
|
+
"orchestration_id",
|
|
5947
|
+
"limit",
|
|
5948
|
+
"offset"
|
|
5949
|
+
],
|
|
5950
|
+
flags: [
|
|
5951
|
+
{
|
|
5952
|
+
"name": "project_id",
|
|
5953
|
+
"description": "Project public ID (proj_ prefix).",
|
|
5954
|
+
"required": true,
|
|
5955
|
+
"type": "string",
|
|
5956
|
+
"in": "path"
|
|
5957
|
+
},
|
|
5958
|
+
{
|
|
5959
|
+
"name": "orchestration_id",
|
|
5960
|
+
"description": "Orchestration public ID to list runs of.",
|
|
5961
|
+
"required": true,
|
|
5962
|
+
"type": "string",
|
|
5963
|
+
"in": "query"
|
|
5964
|
+
},
|
|
5965
|
+
{
|
|
5966
|
+
"name": "limit",
|
|
5967
|
+
"description": "Maximum items to return (1–100).",
|
|
5968
|
+
"required": false,
|
|
5969
|
+
"type": "integer",
|
|
5970
|
+
"in": "query"
|
|
5971
|
+
},
|
|
5972
|
+
{
|
|
5973
|
+
"name": "offset",
|
|
5974
|
+
"description": "Items to skip. These lists page by offset rather than by naturali's usual opaque cursor because the upstream ordering is offset-based; a cursor here would only imitate a keyset.\n",
|
|
5975
|
+
"required": false,
|
|
5976
|
+
"type": "integer",
|
|
5977
|
+
"in": "query"
|
|
5978
|
+
}
|
|
5979
|
+
]
|
|
5980
|
+
},
|
|
5981
|
+
"start-orchestration-run": {
|
|
5982
|
+
serviceClass: "Orchestrations",
|
|
5983
|
+
operationId: "startOrchestrationRun",
|
|
5984
|
+
description: "Starts a new run of the orchestration named by `orchestration_id`, which must belong to this project. By default the run executes durably in the background and this returns immediately with `status: \"queued\"`; pass `wait: true` to block until the run reaches a terminal or `awaiting_input` state instead.",
|
|
5985
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
5986
|
+
httpMethod: "post",
|
|
5987
|
+
pathParams: ["project_id"],
|
|
5988
|
+
queryParams: [],
|
|
5989
|
+
flags: [
|
|
5990
|
+
{
|
|
5991
|
+
"name": "project_id",
|
|
5992
|
+
"description": "Project public ID (proj_ prefix).",
|
|
5993
|
+
"required": true,
|
|
5994
|
+
"type": "string",
|
|
5995
|
+
"in": "path"
|
|
5996
|
+
},
|
|
5997
|
+
{
|
|
5998
|
+
"name": "orchestration_id",
|
|
5999
|
+
"description": "Orchestration to run.",
|
|
6000
|
+
"required": true,
|
|
6001
|
+
"type": "string",
|
|
6002
|
+
"in": "body"
|
|
6003
|
+
},
|
|
6004
|
+
{
|
|
6005
|
+
"name": "input",
|
|
6006
|
+
"description": "Initial state for the run, merged with orchestration defaults.",
|
|
6007
|
+
"required": false,
|
|
6008
|
+
"type": "object",
|
|
6009
|
+
"in": "body"
|
|
6010
|
+
},
|
|
6011
|
+
{
|
|
6012
|
+
"name": "wait",
|
|
6013
|
+
"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\"`.",
|
|
6014
|
+
"required": false,
|
|
6015
|
+
"type": "boolean",
|
|
6016
|
+
"in": "body"
|
|
6017
|
+
}
|
|
6018
|
+
]
|
|
6019
|
+
},
|
|
6020
|
+
"get-orchestration-run": {
|
|
6021
|
+
serviceClass: "Orchestrations",
|
|
6022
|
+
operationId: "getOrchestrationRun",
|
|
6023
|
+
description: "Returns the status, state, and artifacts of one run.",
|
|
6024
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
6025
|
+
httpMethod: "get",
|
|
6026
|
+
pathParams: ["project_id", "orchestration_run_id"],
|
|
6027
|
+
queryParams: [],
|
|
6028
|
+
flags: [{
|
|
6029
|
+
"name": "project_id",
|
|
6030
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6031
|
+
"required": true,
|
|
6032
|
+
"type": "string",
|
|
6033
|
+
"in": "path"
|
|
6034
|
+
}, {
|
|
6035
|
+
"name": "orchestration_run_id",
|
|
6036
|
+
"description": "Orchestration run public ID (orch_run_ prefix).",
|
|
6037
|
+
"required": true,
|
|
6038
|
+
"type": "string",
|
|
6039
|
+
"in": "path"
|
|
6040
|
+
}]
|
|
6041
|
+
},
|
|
6042
|
+
"cancel-orchestration-run": {
|
|
6043
|
+
serviceClass: "Orchestrations",
|
|
6044
|
+
operationId: "cancelOrchestrationRun",
|
|
6045
|
+
description: "Cancels a run that has not yet reached a terminal state.",
|
|
6046
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
6047
|
+
httpMethod: "post",
|
|
6048
|
+
pathParams: ["project_id", "orchestration_run_id"],
|
|
6049
|
+
queryParams: [],
|
|
6050
|
+
flags: [{
|
|
6051
|
+
"name": "project_id",
|
|
6052
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6053
|
+
"required": true,
|
|
6054
|
+
"type": "string",
|
|
6055
|
+
"in": "path"
|
|
6056
|
+
}, {
|
|
6057
|
+
"name": "orchestration_run_id",
|
|
6058
|
+
"description": "Orchestration run public ID (orch_run_ prefix).",
|
|
6059
|
+
"required": true,
|
|
6060
|
+
"type": "string",
|
|
6061
|
+
"in": "path"
|
|
6062
|
+
}]
|
|
6063
|
+
},
|
|
6064
|
+
"resume-orchestration-run": {
|
|
6065
|
+
serviceClass: "Orchestrations",
|
|
6066
|
+
operationId: "resumeOrchestrationRun",
|
|
6067
|
+
description: "Re-drives an `awaiting_input` run from its last checkpoint. This does not satisfy the pause itself — a run parked on a human or webhook node re-parks on the same node. Use `human-input` to supply the awaited payload and advance the run.",
|
|
6068
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
6069
|
+
httpMethod: "post",
|
|
6070
|
+
pathParams: ["project_id", "orchestration_run_id"],
|
|
6071
|
+
queryParams: [],
|
|
6072
|
+
flags: [{
|
|
6073
|
+
"name": "project_id",
|
|
6074
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6075
|
+
"required": true,
|
|
6076
|
+
"type": "string",
|
|
6077
|
+
"in": "path"
|
|
6078
|
+
}, {
|
|
6079
|
+
"name": "orchestration_run_id",
|
|
6080
|
+
"description": "Orchestration run public ID (orch_run_ prefix).",
|
|
6081
|
+
"required": true,
|
|
6082
|
+
"type": "string",
|
|
6083
|
+
"in": "path"
|
|
6084
|
+
}]
|
|
6085
|
+
},
|
|
6086
|
+
"submit-human-input": {
|
|
6087
|
+
serviceClass: "Orchestrations",
|
|
6088
|
+
operationId: "submitHumanInput",
|
|
6089
|
+
description: "Provides human input to a run that is `awaiting_input` at a human node, and advances it.",
|
|
6090
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
6091
|
+
httpMethod: "post",
|
|
6092
|
+
pathParams: ["project_id", "orchestration_run_id"],
|
|
6093
|
+
queryParams: [],
|
|
6094
|
+
flags: [
|
|
6095
|
+
{
|
|
6096
|
+
"name": "project_id",
|
|
6097
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6098
|
+
"required": true,
|
|
6099
|
+
"type": "string",
|
|
6100
|
+
"in": "path"
|
|
6101
|
+
},
|
|
6102
|
+
{
|
|
6103
|
+
"name": "orchestration_run_id",
|
|
6104
|
+
"description": "Orchestration run public ID (orch_run_ prefix).",
|
|
6105
|
+
"required": true,
|
|
6106
|
+
"type": "string",
|
|
6107
|
+
"in": "path"
|
|
6108
|
+
},
|
|
6109
|
+
{
|
|
6110
|
+
"name": "node_id",
|
|
6111
|
+
"description": "ID of the human node to satisfy.",
|
|
6112
|
+
"required": true,
|
|
6113
|
+
"type": "string",
|
|
6114
|
+
"in": "body"
|
|
6115
|
+
},
|
|
6116
|
+
{
|
|
6117
|
+
"name": "output",
|
|
6118
|
+
"description": "Output/response provided by the human reviewer.",
|
|
6119
|
+
"required": false,
|
|
6120
|
+
"type": "object",
|
|
6121
|
+
"in": "body"
|
|
6122
|
+
}
|
|
6123
|
+
]
|
|
6124
|
+
},
|
|
5532
6125
|
"list-projects": {
|
|
5533
6126
|
serviceClass: "Projects",
|
|
5534
6127
|
operationId: "listProjects",
|
|
@@ -6844,11 +7437,15 @@ const routes = {
|
|
|
6844
7437
|
"list-triggers": {
|
|
6845
7438
|
serviceClass: "Triggers",
|
|
6846
7439
|
operationId: "listTriggers",
|
|
6847
|
-
description: "The project's schedule triggers.",
|
|
7440
|
+
description: "The project's schedule triggers, of either fronted target kind. `total` is the runtime's count of the project's schedule triggers, so it can exceed the rows returned when a trigger was authored directly against the runtime with a target this surface doesn't front (the same bypass `getTrigger` answers `404` for). Pass `target_type` — which is filtered and counted upstream — when an exact count matters.",
|
|
6848
7441
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/triggers",
|
|
6849
7442
|
httpMethod: "get",
|
|
6850
7443
|
pathParams: ["project_id"],
|
|
6851
|
-
queryParams: [
|
|
7444
|
+
queryParams: [
|
|
7445
|
+
"target_type",
|
|
7446
|
+
"limit",
|
|
7447
|
+
"offset"
|
|
7448
|
+
],
|
|
6852
7449
|
flags: [
|
|
6853
7450
|
{
|
|
6854
7451
|
"name": "project_id",
|
|
@@ -6857,6 +7454,13 @@ const routes = {
|
|
|
6857
7454
|
"type": "string",
|
|
6858
7455
|
"in": "path"
|
|
6859
7456
|
},
|
|
7457
|
+
{
|
|
7458
|
+
"name": "target_type",
|
|
7459
|
+
"description": "Narrow the page to one target kind. Filtered and counted upstream, so `total` is exact. Omit it to list both kinds — see the operation's note on `total`.\n",
|
|
7460
|
+
"required": false,
|
|
7461
|
+
"type": "string",
|
|
7462
|
+
"in": "query"
|
|
7463
|
+
},
|
|
6860
7464
|
{
|
|
6861
7465
|
"name": "limit",
|
|
6862
7466
|
"description": "Maximum items to return (1–100).",
|
|
@@ -6876,7 +7480,7 @@ const routes = {
|
|
|
6876
7480
|
"create-trigger": {
|
|
6877
7481
|
serviceClass: "Triggers",
|
|
6878
7482
|
operationId: "createTrigger",
|
|
6879
|
-
description: "Schedules `target_id`
|
|
7483
|
+
description: "Schedules `target_id` — an agent or an orchestration in this project, per `target_type` — to run on `cron`, a 5-field cron expression evaluated in UTC.",
|
|
6880
7484
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/triggers",
|
|
6881
7485
|
httpMethod: "post",
|
|
6882
7486
|
pathParams: ["project_id"],
|
|
@@ -6903,9 +7507,16 @@ const routes = {
|
|
|
6903
7507
|
"type": "string",
|
|
6904
7508
|
"in": "body"
|
|
6905
7509
|
},
|
|
7510
|
+
{
|
|
7511
|
+
"name": "target_type",
|
|
7512
|
+
"description": "Which kind of resource `target_id` names. Defaults to `agent`, so a body written before the orchestration target existed keeps its meaning.\n",
|
|
7513
|
+
"required": false,
|
|
7514
|
+
"type": "string",
|
|
7515
|
+
"in": "body"
|
|
7516
|
+
},
|
|
6906
7517
|
{
|
|
6907
7518
|
"name": "target_id",
|
|
6908
|
-
"description": "The agent this trigger runs
|
|
7519
|
+
"description": "The agent or orchestration this trigger runs, per `target_type`. Must belong to this project — an id from another project is `404`.\n",
|
|
6909
7520
|
"required": true,
|
|
6910
7521
|
"type": "string",
|
|
6911
7522
|
"in": "body"
|
|
@@ -6958,7 +7569,7 @@ const routes = {
|
|
|
6958
7569
|
"update-trigger": {
|
|
6959
7570
|
serviceClass: "Triggers",
|
|
6960
7571
|
operationId: "updateTrigger",
|
|
6961
|
-
description: "Retune the schedule, its target, or whether it fires at all. At least one field is required. `type`
|
|
7572
|
+
description: "Retune the schedule, its target, or whether it fires at all. At least one field is required. `type` is immutable; `target_type` may be changed only together with `target_id`.",
|
|
6962
7573
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/triggers",
|
|
6963
7574
|
httpMethod: "patch",
|
|
6964
7575
|
pathParams: ["project_id", "trigger_id"],
|
|
@@ -6992,6 +7603,13 @@ const routes = {
|
|
|
6992
7603
|
"type": "string",
|
|
6993
7604
|
"in": "body"
|
|
6994
7605
|
},
|
|
7606
|
+
{
|
|
7607
|
+
"name": "target_type",
|
|
7608
|
+
"description": "Change what kind of resource the trigger runs. Must be sent **together with `target_id`** — the kind and the id are one target, and accepting the kind alone would leave the trigger pointing at an id of the wrong kind (`400`). Sending `target_id` on its own is fine and keeps the trigger's current kind, which is the kind the new id is validated against.\n",
|
|
7609
|
+
"required": false,
|
|
7610
|
+
"type": "string",
|
|
7611
|
+
"in": "body"
|
|
7612
|
+
},
|
|
6995
7613
|
{
|
|
6996
7614
|
"name": "target_id",
|
|
6997
7615
|
"description": "",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.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.53.1"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"generate": "tsx scripts/generate.ts",
|