@soat/cli 0.15.3 → 0.15.4
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 +114 -6
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { load } from "js-yaml";
|
|
|
11
11
|
import * as os from "node:os";
|
|
12
12
|
|
|
13
13
|
//#region package.json
|
|
14
|
-
var version = "0.15.
|
|
14
|
+
var version = "0.15.4";
|
|
15
15
|
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/cli-wrappers/wrappers/formations.ts
|
|
@@ -5166,7 +5166,7 @@ var routes = {
|
|
|
5166
5166
|
description: "Returns the raw usage-meter rows the caller can access, most recent first, optionally filtered by agent and generation. Each row is the per-generation token usage as reported by the provider, for audit and reconciliation.",
|
|
5167
5167
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
|
|
5168
5168
|
pathParams: [],
|
|
5169
|
-
queryParams: ["agent_id", "generation_id", "trace_id", "trigger_id", "action_id", "limit", "offset"],
|
|
5169
|
+
queryParams: ["agent_id", "generation_id", "trace_id", "trigger_id", "action_id", "meter_type", "limit", "offset"],
|
|
5170
5170
|
flags: [{
|
|
5171
5171
|
"name": "agent_id",
|
|
5172
5172
|
"description": "Filter by agent public ID",
|
|
@@ -5197,6 +5197,12 @@ var routes = {
|
|
|
5197
5197
|
"required": false,
|
|
5198
5198
|
"type": "string",
|
|
5199
5199
|
"in": "query"
|
|
5200
|
+
}, {
|
|
5201
|
+
"name": "meter_type",
|
|
5202
|
+
"description": "Filter by meter type (e.g. `llm_tokens`, `compute_execution`, `api_request`, `storage`)\n",
|
|
5203
|
+
"required": false,
|
|
5204
|
+
"type": "string",
|
|
5205
|
+
"in": "query"
|
|
5200
5206
|
}, {
|
|
5201
5207
|
"name": "limit",
|
|
5202
5208
|
"description": "",
|
|
@@ -5211,17 +5217,119 @@ var routes = {
|
|
|
5211
5217
|
"in": "query"
|
|
5212
5218
|
}]
|
|
5213
5219
|
},
|
|
5220
|
+
"get-usage": {
|
|
5221
|
+
serviceClass: "Usage",
|
|
5222
|
+
operationId: "getUsage",
|
|
5223
|
+
description: "Returns a project's usage rolled up over an optional `[from, to]` time window, bucketed by a single dimension. Each group and the grand total carry summed token counts and `cost_usd` (null when no event in the bucket was priced). This is the per-project cost-by-range/by-category query — a monthly figure without scanning raw meter rows client-side.",
|
|
5224
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
|
|
5225
|
+
pathParams: [],
|
|
5226
|
+
queryParams: ["project_id", "group_by", "from", "to"],
|
|
5227
|
+
flags: [{
|
|
5228
|
+
"name": "project_id",
|
|
5229
|
+
"description": "Project public ID to aggregate usage for",
|
|
5230
|
+
"required": true,
|
|
5231
|
+
"type": "string",
|
|
5232
|
+
"in": "query"
|
|
5233
|
+
}, {
|
|
5234
|
+
"name": "group_by",
|
|
5235
|
+
"description": "Dimension to bucket by. `day` buckets on the event's UTC calendar day; the others bucket on the matching column.\n",
|
|
5236
|
+
"required": true,
|
|
5237
|
+
"type": "string",
|
|
5238
|
+
"in": "query"
|
|
5239
|
+
}, {
|
|
5240
|
+
"name": "from",
|
|
5241
|
+
"description": "Inclusive lower bound (ISO-8601 timestamp) on the event created_at. Omit for no lower bound.\n",
|
|
5242
|
+
"required": false,
|
|
5243
|
+
"type": "string",
|
|
5244
|
+
"in": "query"
|
|
5245
|
+
}, {
|
|
5246
|
+
"name": "to",
|
|
5247
|
+
"description": "Inclusive upper bound (ISO-8601 timestamp) on the event created_at. Omit for no upper bound.\n",
|
|
5248
|
+
"required": false,
|
|
5249
|
+
"type": "string",
|
|
5250
|
+
"in": "query"
|
|
5251
|
+
}]
|
|
5252
|
+
},
|
|
5253
|
+
"list-usage-thresholds": {
|
|
5254
|
+
serviceClass: "Usage",
|
|
5255
|
+
operationId: "listUsageThresholds",
|
|
5256
|
+
description: "Lists the usage alert thresholds the caller can access, optionally filtered by project_id. Each threshold fires the `usage.threshold_crossed` webhook when a project's cost or token usage over a calendar-month or rolling-24h window crosses the configured value.",
|
|
5257
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
|
|
5258
|
+
pathParams: [],
|
|
5259
|
+
queryParams: ["project_id"],
|
|
5260
|
+
flags: [{
|
|
5261
|
+
"name": "project_id",
|
|
5262
|
+
"description": "Filter by project public ID",
|
|
5263
|
+
"required": false,
|
|
5264
|
+
"type": "string",
|
|
5265
|
+
"in": "query"
|
|
5266
|
+
}]
|
|
5267
|
+
},
|
|
5268
|
+
"create-usage-threshold": {
|
|
5269
|
+
serviceClass: "Usage",
|
|
5270
|
+
operationId: "createUsageThreshold",
|
|
5271
|
+
description: "Creates a usage alert threshold on a project. Thresholds are immutable apart from deletion — to change one, delete and recreate it (which resets its fire state).",
|
|
5272
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
|
|
5273
|
+
pathParams: [],
|
|
5274
|
+
queryParams: [],
|
|
5275
|
+
flags: [{
|
|
5276
|
+
"name": "project_id",
|
|
5277
|
+
"description": "",
|
|
5278
|
+
"required": true,
|
|
5279
|
+
"type": "string",
|
|
5280
|
+
"in": "body"
|
|
5281
|
+
}, {
|
|
5282
|
+
"name": "metric",
|
|
5283
|
+
"description": "",
|
|
5284
|
+
"required": true,
|
|
5285
|
+
"type": "string",
|
|
5286
|
+
"in": "body"
|
|
5287
|
+
}, {
|
|
5288
|
+
"name": "window",
|
|
5289
|
+
"description": "",
|
|
5290
|
+
"required": true,
|
|
5291
|
+
"type": "string",
|
|
5292
|
+
"in": "body"
|
|
5293
|
+
}, {
|
|
5294
|
+
"name": "threshold",
|
|
5295
|
+
"description": "Must be greater than 0",
|
|
5296
|
+
"required": true,
|
|
5297
|
+
"type": "number",
|
|
5298
|
+
"in": "body"
|
|
5299
|
+
}]
|
|
5300
|
+
},
|
|
5301
|
+
"delete-usage-threshold": {
|
|
5302
|
+
serviceClass: "Usage",
|
|
5303
|
+
operationId: "deleteUsageThreshold",
|
|
5304
|
+
description: "Deletes a usage threshold, resetting its fire state. Recreating a threshold starts its once-per-window / hysteresis state fresh.",
|
|
5305
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
|
|
5306
|
+
pathParams: ["threshold_id"],
|
|
5307
|
+
queryParams: [],
|
|
5308
|
+
flags: [{
|
|
5309
|
+
"name": "threshold_id",
|
|
5310
|
+
"description": "Threshold public ID",
|
|
5311
|
+
"required": true,
|
|
5312
|
+
"type": "string",
|
|
5313
|
+
"in": "path"
|
|
5314
|
+
}]
|
|
5315
|
+
},
|
|
5214
5316
|
"get-usage-receipt": {
|
|
5215
5317
|
serviceClass: "Usage",
|
|
5216
5318
|
operationId: "getUsageReceipt",
|
|
5217
|
-
description: "Returns a billing receipt for a
|
|
5319
|
+
description: "Returns a billing receipt. Pass generation_id for a per-generation receipt, or run_id for a per-run receipt summed across the orchestration run's meters — both share the same shape (per-model line items with tokens, the price-book version that priced them, and cost, plus totals). Exactly one of generation_id or run_id must be supplied.",
|
|
5218
5320
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
|
|
5219
5321
|
pathParams: [],
|
|
5220
|
-
queryParams: ["generation_id"],
|
|
5322
|
+
queryParams: ["generation_id", "run_id"],
|
|
5221
5323
|
flags: [{
|
|
5222
5324
|
"name": "generation_id",
|
|
5223
|
-
"description": "Generation public ID",
|
|
5224
|
-
"required":
|
|
5325
|
+
"description": "Generation public ID. Mutually exclusive with run_id.\n",
|
|
5326
|
+
"required": false,
|
|
5327
|
+
"type": "string",
|
|
5328
|
+
"in": "query"
|
|
5329
|
+
}, {
|
|
5330
|
+
"name": "run_id",
|
|
5331
|
+
"description": "Orchestration run public ID. Returns the receipt summed across every generation the run metered. Mutually exclusive with generation_id.\n",
|
|
5332
|
+
"required": false,
|
|
5225
5333
|
"type": "string",
|
|
5226
5334
|
"in": "query"
|
|
5227
5335
|
}]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soat/cli",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@inquirer/input": "^5.1.2",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@ttoss/logger": "^0.8.19",
|
|
9
9
|
"commander": "^15.0.0",
|
|
10
10
|
"js-yaml": "^5.2.1",
|
|
11
|
-
"@soat/sdk": "0.15.
|
|
11
|
+
"@soat/sdk": "0.15.4"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@ttoss/config": "^1.37.17",
|