@soat/cli 0.14.2 → 0.14.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.
Files changed (2) hide show
  1. package/dist/index.mjs +169 -1
  2. 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.14.2";
14
+ var version = "0.14.4";
15
15
 
16
16
  //#endregion
17
17
  //#region src/cli-wrappers/wrappers/formations.ts
@@ -1009,6 +1009,12 @@ var routes = {
1009
1009
  "required": false,
1010
1010
  "type": "object",
1011
1011
  "in": "body"
1012
+ }, {
1013
+ "name": "action_id",
1014
+ "description": "Logical action label recorded on the generation's usage meter, so spend can be rolled up per action (e.g. an A/B/C/D operating action).",
1015
+ "required": false,
1016
+ "type": "string",
1017
+ "in": "body"
1012
1018
  }, {
1013
1019
  "name": "knowledge_config",
1014
1020
  "description": "Per-generation knowledge retrieval override. Array filters (memory_ids, memory_tags, document_ids, document_paths) are unioned with the agent's stored knowledge_config; scalar fields (min_score, limit) use the per-generation value when present.",
@@ -1203,6 +1209,42 @@ var routes = {
1203
1209
  "in": "path"
1204
1210
  }]
1205
1211
  },
1212
+ "get-ai-provider-prices": {
1213
+ serviceClass: "AIProviders",
1214
+ operationId: "getAiProviderPrices",
1215
+ description: "Returns the per-provider price overrides for this AI provider instance. An override prices this specific provider (e.g. an enterprise-negotiated rate or a gateway with markup) and wins over the global default at cost time. Authorized by the caller's access to the provider's project — so, unlike the global price book, a project's own overrides are visible here.",
1216
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/ai-providers",
1217
+ pathParams: ["ai_provider_id"],
1218
+ queryParams: [],
1219
+ flags: [{
1220
+ "name": "ai_provider_id",
1221
+ "description": "AI Provider ID",
1222
+ "required": true,
1223
+ "type": "string",
1224
+ "in": "path"
1225
+ }]
1226
+ },
1227
+ "update-ai-provider-prices": {
1228
+ serviceClass: "AIProviders",
1229
+ operationId: "updateAiProviderPrices",
1230
+ description: "Upserts price overrides for this AI provider instance, keyed on (model, effective_from). The provider slug is taken from the AI provider itself, so only the model, rates, and effective_from are supplied. Authorized by the caller's access to the provider's project. `effective_from` must be in the future — past prices are immutable, so ship corrections as new future-dated rows.",
1231
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/ai-providers",
1232
+ pathParams: ["ai_provider_id"],
1233
+ queryParams: [],
1234
+ flags: [{
1235
+ "name": "ai_provider_id",
1236
+ "description": "AI Provider ID",
1237
+ "required": true,
1238
+ "type": "string",
1239
+ "in": "path"
1240
+ }, {
1241
+ "name": "prices",
1242
+ "description": "",
1243
+ "required": true,
1244
+ "type": "array",
1245
+ "in": "body"
1246
+ }]
1247
+ },
1206
1248
  "list-api-keys": {
1207
1249
  serviceClass: "APIKeys",
1208
1250
  operationId: "listApiKeys",
@@ -3921,6 +3963,42 @@ var routes = {
3921
3963
  "in": "query"
3922
3964
  }]
3923
3965
  },
3966
+ "get-project-prices": {
3967
+ serviceClass: "Projects",
3968
+ operationId: "getProjectPrices",
3969
+ description: "Returns the project's per-provider-slug price rows — the middle pricing tier that covers every one of the project's instances of a given provider slug. At cost time a per-provider-instance override wins over these, and these win over the global default. Authorized by the caller's access to the project.",
3970
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/projects",
3971
+ pathParams: ["project_id"],
3972
+ queryParams: [],
3973
+ flags: [{
3974
+ "name": "project_id",
3975
+ "description": "Project public ID (proj_ prefix)",
3976
+ "required": true,
3977
+ "type": "string",
3978
+ "in": "path"
3979
+ }]
3980
+ },
3981
+ "update-project-prices": {
3982
+ serviceClass: "Projects",
3983
+ operationId: "updateProjectPrices",
3984
+ description: "Upserts project + provider-slug price rows, keyed on (provider, model, effective_from). A row covers all of the project's instances of that provider slug. Authorized by the caller's access to the project. `effective_from` must be in the future — past prices are immutable, so ship corrections as new future-dated rows.",
3985
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/projects",
3986
+ pathParams: ["project_id"],
3987
+ queryParams: [],
3988
+ flags: [{
3989
+ "name": "project_id",
3990
+ "description": "Project public ID (proj_ prefix)",
3991
+ "required": true,
3992
+ "type": "string",
3993
+ "in": "path"
3994
+ }, {
3995
+ "name": "prices",
3996
+ "description": "",
3997
+ "required": true,
3998
+ "type": "array",
3999
+ "in": "body"
4000
+ }]
4001
+ },
3924
4002
  "list-secrets": {
3925
4003
  serviceClass: "Secrets",
3926
4004
  operationId: "listSecrets",
@@ -4938,6 +5016,96 @@ var routes = {
4938
5016
  "in": "path"
4939
5017
  }]
4940
5018
  },
5019
+ "list-usage-meters": {
5020
+ serviceClass: "Usage",
5021
+ operationId: "listUsageMeters",
5022
+ 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.",
5023
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
5024
+ pathParams: [],
5025
+ queryParams: ["agent_id", "generation_id", "trace_id", "trigger_id", "action_id", "limit", "offset"],
5026
+ flags: [{
5027
+ "name": "agent_id",
5028
+ "description": "Filter by agent public ID",
5029
+ "required": false,
5030
+ "type": "string",
5031
+ "in": "query"
5032
+ }, {
5033
+ "name": "generation_id",
5034
+ "description": "Filter by generation public ID",
5035
+ "required": false,
5036
+ "type": "string",
5037
+ "in": "query"
5038
+ }, {
5039
+ "name": "trace_id",
5040
+ "description": "Filter by trace public ID",
5041
+ "required": false,
5042
+ "type": "string",
5043
+ "in": "query"
5044
+ }, {
5045
+ "name": "trigger_id",
5046
+ "description": "Filter by the trigger that initiated the generation",
5047
+ "required": false,
5048
+ "type": "string",
5049
+ "in": "query"
5050
+ }, {
5051
+ "name": "action_id",
5052
+ "description": "Filter by logical action id",
5053
+ "required": false,
5054
+ "type": "string",
5055
+ "in": "query"
5056
+ }, {
5057
+ "name": "limit",
5058
+ "description": "",
5059
+ "required": false,
5060
+ "type": "integer",
5061
+ "in": "query"
5062
+ }, {
5063
+ "name": "offset",
5064
+ "description": "",
5065
+ "required": false,
5066
+ "type": "integer",
5067
+ "in": "query"
5068
+ }]
5069
+ },
5070
+ "get-usage-receipt": {
5071
+ serviceClass: "Usage",
5072
+ operationId: "getUsageReceipt",
5073
+ description: "Returns a billing receipt for a completed generation: per-model line items (tokens, the price-book version that priced them, and cost) plus totals.",
5074
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
5075
+ pathParams: [],
5076
+ queryParams: ["generation_id"],
5077
+ flags: [{
5078
+ "name": "generation_id",
5079
+ "description": "Generation public ID",
5080
+ "required": true,
5081
+ "type": "string",
5082
+ "in": "query"
5083
+ }]
5084
+ },
5085
+ "get-price-book": {
5086
+ serviceClass: "Usage",
5087
+ operationId: "getPriceBook",
5088
+ description: "Returns the global price book — the versioned per-provider/model unit prices used to compute usage cost at write time. Readable by any authenticated user.",
5089
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
5090
+ pathParams: [],
5091
+ queryParams: [],
5092
+ flags: []
5093
+ },
5094
+ "upsert-price-book": {
5095
+ serviceClass: "Usage",
5096
+ operationId: "upsertPriceBook",
5097
+ description: "Upserts price rows keyed on (provider, model, effective_from). Admin only. `effective_from` must be in the future — past prices are immutable so recorded costs stay explainable; ship corrections as new future-dated rows.",
5098
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
5099
+ pathParams: [],
5100
+ queryParams: [],
5101
+ flags: [{
5102
+ "name": "prices",
5103
+ "description": "",
5104
+ "required": true,
5105
+ "type": "array",
5106
+ "in": "body"
5107
+ }]
5108
+ },
4941
5109
  "get-current-user": {
4942
5110
  serviceClass: "Users",
4943
5111
  operationId: "getCurrentUser",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/cli",
3
- "version": "0.14.2",
3
+ "version": "0.14.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.14.2"
11
+ "@soat/sdk": "0.14.4"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@ttoss/config": "^1.37.17",