@naturali/cli 0.116.0 → 0.118.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.
- package/dist/index.mjs +46 -14
- 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.118.0";
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
20
20
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -1336,7 +1336,14 @@ var AiProviders = class {
|
|
|
1336
1336
|
/**
|
|
1337
1337
|
* Create an AI provider
|
|
1338
1338
|
*
|
|
1339
|
-
* Creates a new LLM provider configuration
|
|
1339
|
+
* Creates a new LLM provider configuration.
|
|
1340
|
+
*
|
|
1341
|
+
* A `bedrock` or `vertex` record must carry a credential of its own — a
|
|
1342
|
+
* linked `secret_id`, or an `apiKey` in `config`. Without one the provider
|
|
1343
|
+
* SDK signs with the server's own credentials (the AWS default credential
|
|
1344
|
+
* chain, Google Application Default Credentials), which is refused with
|
|
1345
|
+
* `400 VALIDATION_FAILED` unless the deployment allows it.
|
|
1346
|
+
*
|
|
1340
1347
|
*/
|
|
1341
1348
|
static createAiProvider(options) {
|
|
1342
1349
|
return (options.client ?? client).post({
|
|
@@ -1394,7 +1401,7 @@ var AiProviders = class {
|
|
|
1394
1401
|
* Asks the provider which models it can run, using this provider record's own credentials and configuration, and returns provider-native model ids — the same strings `default_model` and an agent's `model` carry.
|
|
1395
1402
|
* Which models are reachable is a property of the credential, not of the provider type: a Vertex provider sees only the publisher models its Google Cloud project and location serve, and a Bedrock provider only the foundation models enabled in its region. Reading the list is how a caller avoids pinning a model that fails at generation time.
|
|
1396
1403
|
* Not every provider type can answer. `azure` lists deployments an operator named rather than models, and `ollama` lists whatever was pulled onto that host, so both return `400 MODEL_LISTING_UNSUPPORTED`.
|
|
1397
|
-
* Listing resolves credentials the same way generation does, so a record that can generate can list. The API-key types (`openai`, `groq`, `xai`, `gateway`, `custom`, `anthropic`, `google`) use the record's linked secret and cannot list without one. `bedrock` and `vertex` use the linked secret
|
|
1404
|
+
* Listing resolves credentials the same way generation does, so a record that can generate can list. The API-key types (`openai`, `groq`, `xai`, `gateway`, `custom`, `anthropic`, `google`) use the record's linked secret and cannot list without one. `bedrock` and `vertex` use the linked secret — IAM keys or a Bedrock API key, a Google service-account key. A record with no `secret_id` would fall back to the server's own credentials (the AWS default credential chain, Google Application Default Credentials); it can list only on a deployment that allows a record to use them, and returns `400 AI_PROVIDER_MISCONFIGURED` otherwise.
|
|
1398
1405
|
* A Vertex record needs no `config.project` when its secret is a service-account key, since the key file names its own project. A Vertex record in express mode (API key) cannot list at all: the publisher-model listing rejects API keys and needs a credential that asserts a principal, so it returns `400 MODEL_LISTING_UNSUPPORTED`.
|
|
1399
1406
|
* The Vertex answer is the publisher catalogue the record's `config.location` region serves. The project behind the credential is billed and quota'd for the call but does not filter the result, so a listed model may still be unavailable to that project at generation time.
|
|
1400
1407
|
*
|
|
@@ -3376,7 +3383,7 @@ var Orchestrations = class {
|
|
|
3376
3383
|
/**
|
|
3377
3384
|
* List orchestration runs
|
|
3378
3385
|
*
|
|
3379
|
-
* Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, or by whether the run has a parent at all.
|
|
3386
|
+
* Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, by status, or by whether the run has a parent at all.
|
|
3380
3387
|
*
|
|
3381
3388
|
* 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.
|
|
3382
3389
|
*/
|
|
@@ -3591,7 +3598,9 @@ var Quotas = class {
|
|
|
3591
3598
|
/**
|
|
3592
3599
|
* Create a quota
|
|
3593
3600
|
*
|
|
3594
|
-
* Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor
|
|
3601
|
+
* Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`; `storage_bytes` is valid for `scope: project` only. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A `cost_usd` quota may name one `meter_type` to cap; omitting it caps every priced meter. A duplicate quota (same project, scope, scope_ref, metric, window, meter_type) is rejected with 409.
|
|
3602
|
+
*
|
|
3603
|
+
* `storage_bytes` caps a stored total rather than a windowed one, so it takes `window: current` and every other metric refuses that value (400 either way). It is enforced at the corpus write paths — file upload and create, document create, document ingest and re-ingest, memory-entry create — with `409 QUOTA_STORAGE_EXCEEDED` and no `Retry-After`, since no window reset clears a footprint.
|
|
3595
3604
|
*/
|
|
3596
3605
|
static createQuota(options) {
|
|
3597
3606
|
return (options.client ?? client).post({
|
|
@@ -3898,7 +3907,7 @@ var Tasks = class {
|
|
|
3898
3907
|
/**
|
|
3899
3908
|
* List tasks
|
|
3900
3909
|
*
|
|
3901
|
-
* Lists tasks (the board query). Filter by workflow, state, status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.
|
|
3910
|
+
* Lists tasks (the board query). Filter by workflow, state, status, automation status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.
|
|
3902
3911
|
*/
|
|
3903
3912
|
static listTasks(options) {
|
|
3904
3913
|
return (options.client ?? client).get({
|
|
@@ -6896,7 +6905,7 @@ const routes = {
|
|
|
6896
6905
|
"create-ai-provider": {
|
|
6897
6906
|
serviceClass: "AIProviders",
|
|
6898
6907
|
operationId: "createAiProvider",
|
|
6899
|
-
description: "Creates a new LLM provider configuration",
|
|
6908
|
+
description: "Creates a new LLM provider configuration. A `bedrock` or `vertex` record must carry a credential of its own — a linked `secret_id`, or an `apiKey` in `config`. Without one the provider SDK signs with the server's own credentials (the AWS default credential chain, Google Application Default Credentials), which is refused with `400 VALIDATION_FAILED` unless the deployment allows it.",
|
|
6900
6909
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/ai-providers",
|
|
6901
6910
|
httpMethod: "post",
|
|
6902
6911
|
pathParams: ["project_id"],
|
|
@@ -6932,7 +6941,7 @@ const routes = {
|
|
|
6932
6941
|
},
|
|
6933
6942
|
{
|
|
6934
6943
|
"name": "secret_id",
|
|
6935
|
-
"description": "Secret ID containing API credentials",
|
|
6944
|
+
"description": "Secret ID containing API credentials. Required for `bedrock` and `vertex` unless `config.apiKey` carries one.",
|
|
6936
6945
|
"required": false,
|
|
6937
6946
|
"type": "string",
|
|
6938
6947
|
"in": "body"
|
|
@@ -7077,7 +7086,7 @@ const routes = {
|
|
|
7077
7086
|
"list-ai-provider-models": {
|
|
7078
7087
|
serviceClass: "AIProviders",
|
|
7079
7088
|
operationId: "listAiProviderModels",
|
|
7080
|
-
description: "Asks the provider which models it can run, using this provider record's own credentials and configuration, and returns provider-native model ids — the same strings `default_model` and an agent's `model` carry. Which models are reachable is a property of the credential, not of the provider type: a Vertex provider sees only the publisher models its Google Cloud project and location serve, and a Bedrock provider only the foundation models enabled in its region. Reading the list is how a caller avoids pinning a model that fails at generation time. Not every provider type can answer. `azure` lists deployments an operator named rather than models, and `ollama` lists whatever was pulled onto that host, so both return `400 MODEL_LISTING_UNSUPPORTED`. Listing resolves credentials the same way generation does, so a record that can generate can list. The API-key types (`openai`, `groq`, `xai`, `gateway`, `custom`, `anthropic`, `google`) use the record's linked secret and cannot list without one. `bedrock` and `vertex` use the linked secret
|
|
7089
|
+
description: "Asks the provider which models it can run, using this provider record's own credentials and configuration, and returns provider-native model ids — the same strings `default_model` and an agent's `model` carry. Which models are reachable is a property of the credential, not of the provider type: a Vertex provider sees only the publisher models its Google Cloud project and location serve, and a Bedrock provider only the foundation models enabled in its region. Reading the list is how a caller avoids pinning a model that fails at generation time. Not every provider type can answer. `azure` lists deployments an operator named rather than models, and `ollama` lists whatever was pulled onto that host, so both return `400 MODEL_LISTING_UNSUPPORTED`. Listing resolves credentials the same way generation does, so a record that can generate can list. The API-key types (`openai`, `groq`, `xai`, `gateway`, `custom`, `anthropic`, `google`) use the record's linked secret and cannot list without one. `bedrock` and `vertex` use the linked secret — IAM keys or a Bedrock API key, a Google service-account key. A record with no `secret_id` would fall back to the server's own credentials (the AWS default credential chain, Google Application Default Credentials); it can list only on a deployment that allows a record to use them, and returns `400 AI_PROVIDER_MISCONFIGURED` otherwise. A Vertex record needs no `config.project` when its secret is a service-account key, since the key file names its own project. A Vertex record in express mode (API key) cannot list at all: the publisher-model listing rejects API keys and needs a credential that asserts a principal, so it returns `400 MODEL_LISTING_UNSUPPORTED`. The Vertex answer is the publisher catalogue the record's `config.location` region serves. The project behind the credential is billed and quota'd for the call but does not filter the result, so a listed model may still be unavailable to that project at generation time.",
|
|
7081
7090
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/ai-providers",
|
|
7082
7091
|
httpMethod: "get",
|
|
7083
7092
|
pathParams: ["project_id", "ai_provider_id"],
|
|
@@ -12983,7 +12992,7 @@ const routes = {
|
|
|
12983
12992
|
"list-orchestration-runs": {
|
|
12984
12993
|
serviceClass: "Orchestrations",
|
|
12985
12994
|
operationId: "listOrchestrationRuns",
|
|
12986
|
-
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.",
|
|
12995
|
+
description: "Returns orchestration runs the caller can access, optionally filtered by orchestration, by parent run, by status, 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.",
|
|
12987
12996
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/orchestrations",
|
|
12988
12997
|
httpMethod: "get",
|
|
12989
12998
|
pathParams: ["project_id"],
|
|
@@ -12991,6 +13000,7 @@ const routes = {
|
|
|
12991
13000
|
"orchestration_id",
|
|
12992
13001
|
"parent_orchestration_run_id",
|
|
12993
13002
|
"nested",
|
|
13003
|
+
"status",
|
|
12994
13004
|
"limit",
|
|
12995
13005
|
"offset"
|
|
12996
13006
|
],
|
|
@@ -13023,6 +13033,13 @@ const routes = {
|
|
|
13023
13033
|
"type": "boolean",
|
|
13024
13034
|
"in": "query"
|
|
13025
13035
|
},
|
|
13036
|
+
{
|
|
13037
|
+
"name": "status",
|
|
13038
|
+
"description": "Filter by run status. Repeat the parameter to OR values — `status=queued&status=running&status=sleeping&status=awaiting_input` is the set still driving, which is how a caller finds live work without paging every run the project ever started.\n\nThere is no `non_terminal` shorthand on purpose: which statuses count as live is the caller's policy. A value outside the enum, empty string included, is a `400`.",
|
|
13039
|
+
"required": false,
|
|
13040
|
+
"type": "array",
|
|
13041
|
+
"in": "query"
|
|
13042
|
+
},
|
|
13026
13043
|
{
|
|
13027
13044
|
"name": "limit",
|
|
13028
13045
|
"description": "Maximum number of results to return",
|
|
@@ -13469,7 +13486,7 @@ const routes = {
|
|
|
13469
13486
|
"create-quota": {
|
|
13470
13487
|
serviceClass: "Quotas",
|
|
13471
13488
|
operationId: "createQuota",
|
|
13472
|
-
description: "Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor
|
|
13489
|
+
description: "Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`; `storage_bytes` is valid for `scope: project` only. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A `cost_usd` quota may name one `meter_type` to cap; omitting it caps every priced meter. A duplicate quota (same project, scope, scope_ref, metric, window, meter_type) is rejected with 409. `storage_bytes` caps a stored total rather than a windowed one, so it takes `window: current` and every other metric refuses that value (400 either way). It is enforced at the corpus write paths — file upload and create, document create, document ingest and re-ingest, memory-entry create — with `409 QUOTA_STORAGE_EXCEEDED` and no `Retry-After`, since no window reset clears a footprint.",
|
|
13473
13490
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/quotas",
|
|
13474
13491
|
httpMethod: "post",
|
|
13475
13492
|
pathParams: ["project_id"],
|
|
@@ -13505,14 +13522,14 @@ const routes = {
|
|
|
13505
13522
|
},
|
|
13506
13523
|
{
|
|
13507
13524
|
"name": "window",
|
|
13508
|
-
"description": "The window over which the metric is aggregated",
|
|
13525
|
+
"description": "The window over which the metric is aggregated. `current` is the only accepted value for storage_bytes (a stored total is not aggregated over time) and is refused for every other metric.",
|
|
13509
13526
|
"required": true,
|
|
13510
13527
|
"type": "string",
|
|
13511
13528
|
"in": "body"
|
|
13512
13529
|
},
|
|
13513
13530
|
{
|
|
13514
13531
|
"name": "limit",
|
|
13515
|
-
"description": "The cap. Must be a positive integer for requests/tokens; fractional values are allowed for cost_usd.",
|
|
13532
|
+
"description": "The cap. Must be a positive integer for requests/tokens/storage_bytes (bytes); fractional values are allowed for cost_usd.",
|
|
13516
13533
|
"required": true,
|
|
13517
13534
|
"type": "number",
|
|
13518
13535
|
"in": "body"
|
|
@@ -13530,6 +13547,13 @@ const routes = {
|
|
|
13530
13547
|
"required": false,
|
|
13531
13548
|
"type": "string",
|
|
13532
13549
|
"in": "body"
|
|
13550
|
+
},
|
|
13551
|
+
{
|
|
13552
|
+
"name": "meter_type",
|
|
13553
|
+
"description": "Only for metric cost_usd (400 on any other metric). The meter this cap answers for. Omit it and the cap sums every priced meter, which is the existing behaviour; name one and only that meter's cost counts, so an AI spend cap is not consumed by platform meters the operator prices (and vice versa). Part of the quota's identity, so two meter scopes can share a scope/metric/window and neither conflicts with an unscoped cap. Immutable after creation — replace the quota to change it.",
|
|
13554
|
+
"required": false,
|
|
13555
|
+
"type": "string",
|
|
13556
|
+
"in": "body"
|
|
13533
13557
|
}
|
|
13534
13558
|
]
|
|
13535
13559
|
},
|
|
@@ -14313,7 +14337,7 @@ const routes = {
|
|
|
14313
14337
|
"list-tasks": {
|
|
14314
14338
|
serviceClass: "Tasks",
|
|
14315
14339
|
operationId: "listTasks",
|
|
14316
|
-
description: "Lists tasks (the board query). Filter by workflow, state, status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.",
|
|
14340
|
+
description: "Lists tasks (the board query). Filter by workflow, state, status, automation status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.",
|
|
14317
14341
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/tasks",
|
|
14318
14342
|
httpMethod: "get",
|
|
14319
14343
|
pathParams: ["project_id"],
|
|
@@ -14321,6 +14345,7 @@ const routes = {
|
|
|
14321
14345
|
"workflow_id",
|
|
14322
14346
|
"state",
|
|
14323
14347
|
"status",
|
|
14348
|
+
"automation_status",
|
|
14324
14349
|
"assignee",
|
|
14325
14350
|
"limit",
|
|
14326
14351
|
"offset"
|
|
@@ -14354,6 +14379,13 @@ const routes = {
|
|
|
14354
14379
|
"type": "string",
|
|
14355
14380
|
"in": "query"
|
|
14356
14381
|
},
|
|
14382
|
+
{
|
|
14383
|
+
"name": "automation_status",
|
|
14384
|
+
"description": "Filter by the current state's dispatch status. Repeat the parameter to OR values. `none` selects the tasks whose `automation_status` is `null` — the ones that never entered a state with an automation. It is a value a task really holds, so it is a value of the filter too; the parameter's own absence already means \"every task\".\n\nA value outside the enum, empty string included, is a `400`.",
|
|
14385
|
+
"required": false,
|
|
14386
|
+
"type": "array",
|
|
14387
|
+
"in": "query"
|
|
14388
|
+
},
|
|
14357
14389
|
{
|
|
14358
14390
|
"name": "assignee",
|
|
14359
14391
|
"description": "",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.118.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.
|
|
33
|
+
"@naturali/sdk": "0.118.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"generate": "tsx scripts/generate.ts",
|