@naturali/cli 0.37.1 → 0.38.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 +47 -2
- 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.38.0";
|
|
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) };
|
|
@@ -1251,6 +1251,21 @@ var Generations = class {
|
|
|
1251
1251
|
...options
|
|
1252
1252
|
});
|
|
1253
1253
|
}
|
|
1254
|
+
/**
|
|
1255
|
+
* Get a generation's cost
|
|
1256
|
+
*
|
|
1257
|
+
* What this one generation cost, and the tokens it was charged on — the billing-grade receipt SOAT froze at write time, per model line item.
|
|
1258
|
+
* This is the per-generation grain that `GET /v1/projects/{project_id}/usage` cannot express: that meter buckets a whole project by model, agent, run, day or meter type, and a run can hold more than one generation. Use this to price a single turn, and the project meter to roll spend up.
|
|
1259
|
+
* `cost_usd` is `null` when nothing was priced — never that the work was free. Only naturali-managed providers are priced; a BYOK generation runs on your own provider account, so it carries no LLM cost here (its tokens are still reported).
|
|
1260
|
+
* A generation belonging to another project responds `404`, not `403`.
|
|
1261
|
+
*
|
|
1262
|
+
*/
|
|
1263
|
+
static getGenerationUsage(options) {
|
|
1264
|
+
return (options.client ?? client).get({
|
|
1265
|
+
url: "/v1/projects/{project_id}/generations/{generation_id}/usage",
|
|
1266
|
+
...options
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1254
1269
|
};
|
|
1255
1270
|
var Knowledge = class {
|
|
1256
1271
|
/**
|
|
@@ -3980,6 +3995,28 @@ const routes = {
|
|
|
3980
3995
|
"in": "path"
|
|
3981
3996
|
}]
|
|
3982
3997
|
},
|
|
3998
|
+
"get-generation-usage": {
|
|
3999
|
+
serviceClass: "Generations",
|
|
4000
|
+
operationId: "getGenerationUsage",
|
|
4001
|
+
description: "What this one generation cost, and the tokens it was charged on — the billing-grade receipt SOAT froze at write time, per model line item. This is the per-generation grain that `GET /v1/projects/{project_id}/usage` cannot express: that meter buckets a whole project by model, agent, run, day or meter type, and a run can hold more than one generation. Use this to price a single turn, and the project meter to roll spend up. `cost_usd` is `null` when nothing was priced — never that the work was free. Only naturali-managed providers are priced; a BYOK generation runs on your own provider account, so it carries no LLM cost here (its tokens are still reported). A generation belonging to another project responds `404`, not `403`.",
|
|
4002
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/generations",
|
|
4003
|
+
httpMethod: "get",
|
|
4004
|
+
pathParams: ["project_id", "generation_id"],
|
|
4005
|
+
queryParams: [],
|
|
4006
|
+
flags: [{
|
|
4007
|
+
"name": "project_id",
|
|
4008
|
+
"description": "Project public ID (proj_ prefix).",
|
|
4009
|
+
"required": true,
|
|
4010
|
+
"type": "string",
|
|
4011
|
+
"in": "path"
|
|
4012
|
+
}, {
|
|
4013
|
+
"name": "generation_id",
|
|
4014
|
+
"description": "Generation public ID (gen_ prefix).",
|
|
4015
|
+
"required": true,
|
|
4016
|
+
"type": "string",
|
|
4017
|
+
"in": "path"
|
|
4018
|
+
}]
|
|
4019
|
+
},
|
|
3983
4020
|
"list-knowledge-collections": {
|
|
3984
4021
|
serviceClass: "Knowledge",
|
|
3985
4022
|
operationId: "listKnowledgeCollections",
|
|
@@ -4379,7 +4416,8 @@ const routes = {
|
|
|
4379
4416
|
"vendor",
|
|
4380
4417
|
"provider",
|
|
4381
4418
|
"modality",
|
|
4382
|
-
"status"
|
|
4419
|
+
"status",
|
|
4420
|
+
"managed"
|
|
4383
4421
|
],
|
|
4384
4422
|
flags: [
|
|
4385
4423
|
{
|
|
@@ -4423,6 +4461,13 @@ const routes = {
|
|
|
4423
4461
|
"required": false,
|
|
4424
4462
|
"type": "string",
|
|
4425
4463
|
"in": "query"
|
|
4464
|
+
},
|
|
4465
|
+
{
|
|
4466
|
+
"name": "managed",
|
|
4467
|
+
"description": "Filter by whether the model can back a managed provider — `managed=true` is the set you can pass to `POST /v1/projects/{project_id}/providers` with `kind: managed`. Omit to leave the catalog unfiltered on this axis; `false` returns only the BYOK-only models. Any other value is a 400.\n",
|
|
4468
|
+
"required": false,
|
|
4469
|
+
"type": "boolean",
|
|
4470
|
+
"in": "query"
|
|
4426
4471
|
}
|
|
4427
4472
|
]
|
|
4428
4473
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.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.38.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"generate": "tsx scripts/generate.ts",
|