@soat/cli 0.45.0 → 0.46.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 +145 -13
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import * as os from "node:os";
|
|
|
13
13
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
14
14
|
|
|
15
15
|
//#region package.json
|
|
16
|
-
var version = "0.
|
|
16
|
+
var version = "0.46.0";
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/cli-wrappers/wrappers/formations.ts
|
|
@@ -481,7 +481,7 @@ var routes = {
|
|
|
481
481
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/actors",
|
|
482
482
|
httpMethod: "get",
|
|
483
483
|
pathParams: [],
|
|
484
|
-
queryParams: ["project_id", "external_id", "agent_id", "chat_id", "conversation_id", "limit", "offset"],
|
|
484
|
+
queryParams: ["project_id", "external_id", "name", "agent_id", "chat_id", "conversation_id", "limit", "offset"],
|
|
485
485
|
flags: [{
|
|
486
486
|
"name": "project_id",
|
|
487
487
|
"description": "Project ID (optional)",
|
|
@@ -494,6 +494,12 @@ var routes = {
|
|
|
494
494
|
"required": false,
|
|
495
495
|
"type": "string",
|
|
496
496
|
"in": "query"
|
|
497
|
+
}, {
|
|
498
|
+
"name": "name",
|
|
499
|
+
"description": "Case-insensitive substring match on the actor name",
|
|
500
|
+
"required": false,
|
|
501
|
+
"type": "string",
|
|
502
|
+
"in": "query"
|
|
497
503
|
}, {
|
|
498
504
|
"name": "agent_id",
|
|
499
505
|
"description": "Return only actors linked to this agent",
|
|
@@ -3933,13 +3939,19 @@ var routes = {
|
|
|
3933
3939
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
|
|
3934
3940
|
httpMethod: "get",
|
|
3935
3941
|
pathParams: ["file_id"],
|
|
3936
|
-
queryParams: [],
|
|
3942
|
+
queryParams: ["token"],
|
|
3937
3943
|
flags: [{
|
|
3938
3944
|
"name": "file_id",
|
|
3939
3945
|
"description": "File ID",
|
|
3940
3946
|
"required": true,
|
|
3941
3947
|
"type": "string",
|
|
3942
3948
|
"in": "path"
|
|
3949
|
+
}, {
|
|
3950
|
+
"name": "token",
|
|
3951
|
+
"description": "Signed single-file download token, an alternative to a bearer credential (issued for ingestion-rule converters).",
|
|
3952
|
+
"required": false,
|
|
3953
|
+
"type": "string",
|
|
3954
|
+
"in": "query"
|
|
3943
3955
|
}]
|
|
3944
3956
|
},
|
|
3945
3957
|
"update-file-metadata": {
|
|
@@ -3983,13 +3995,19 @@ var routes = {
|
|
|
3983
3995
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
|
|
3984
3996
|
httpMethod: "get",
|
|
3985
3997
|
pathParams: ["file_id"],
|
|
3986
|
-
queryParams: [],
|
|
3998
|
+
queryParams: ["token"],
|
|
3987
3999
|
flags: [{
|
|
3988
4000
|
"name": "file_id",
|
|
3989
4001
|
"description": "File ID",
|
|
3990
4002
|
"required": true,
|
|
3991
4003
|
"type": "string",
|
|
3992
4004
|
"in": "path"
|
|
4005
|
+
}, {
|
|
4006
|
+
"name": "token",
|
|
4007
|
+
"description": "Signed single-file download token, an alternative to a bearer credential (issued for ingestion-rule converters).",
|
|
4008
|
+
"required": false,
|
|
4009
|
+
"type": "string",
|
|
4010
|
+
"in": "query"
|
|
3993
4011
|
}]
|
|
3994
4012
|
},
|
|
3995
4013
|
"get-file-tags": {
|
|
@@ -4265,7 +4283,7 @@ var routes = {
|
|
|
4265
4283
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/generations",
|
|
4266
4284
|
httpMethod: "get",
|
|
4267
4285
|
pathParams: [],
|
|
4268
|
-
queryParams: ["agent_id", "trace_id", "initiator_generation_id", "chain_id", "orchestration_run_id", "node_id", "status", "limit", "offset"],
|
|
4286
|
+
queryParams: ["agent_id", "trace_id", "session_id", "actor_id", "initiator_generation_id", "chain_id", "orchestration_run_id", "node_id", "status", "limit", "offset"],
|
|
4269
4287
|
flags: [{
|
|
4270
4288
|
"name": "agent_id",
|
|
4271
4289
|
"description": "Filter by agent public ID",
|
|
@@ -4278,6 +4296,18 @@ var routes = {
|
|
|
4278
4296
|
"required": false,
|
|
4279
4297
|
"type": "string",
|
|
4280
4298
|
"in": "query"
|
|
4299
|
+
}, {
|
|
4300
|
+
"name": "session_id",
|
|
4301
|
+
"description": "Return only the generations dispatched through one session — the turns behind that conversation's spend. A session that does not exist in scope yields an empty page.\n",
|
|
4302
|
+
"required": false,
|
|
4303
|
+
"type": "string",
|
|
4304
|
+
"in": "query"
|
|
4305
|
+
}, {
|
|
4306
|
+
"name": "actor_id",
|
|
4307
|
+
"description": "Return only the generations one end user started, across every session they appear in. An actor that does not exist in scope yields an empty page.\n",
|
|
4308
|
+
"required": false,
|
|
4309
|
+
"type": "string",
|
|
4310
|
+
"in": "query"
|
|
4281
4311
|
}, {
|
|
4282
4312
|
"name": "initiator_generation_id",
|
|
4283
4313
|
"description": "Filter by the public ID of the parent generation. Returns all generations triggered by that generation — sub-agent invocations. Null-initiated (top-level) generations are not returned.\n",
|
|
@@ -6429,13 +6459,19 @@ var routes = {
|
|
|
6429
6459
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/secrets",
|
|
6430
6460
|
httpMethod: "delete",
|
|
6431
6461
|
pathParams: ["secret_id"],
|
|
6432
|
-
queryParams: [],
|
|
6462
|
+
queryParams: ["force"],
|
|
6433
6463
|
flags: [{
|
|
6434
6464
|
"name": "secret_id",
|
|
6435
6465
|
"description": "Secret ID",
|
|
6436
6466
|
"required": true,
|
|
6437
6467
|
"type": "string",
|
|
6438
6468
|
"in": "path"
|
|
6469
|
+
}, {
|
|
6470
|
+
"name": "force",
|
|
6471
|
+
"description": "Delete the secret even when AI providers reference it, destroying those providers too. Without it a referenced secret answers SECRET_HAS_DEPENDENTS.",
|
|
6472
|
+
"required": false,
|
|
6473
|
+
"type": "boolean",
|
|
6474
|
+
"in": "query"
|
|
6439
6475
|
}]
|
|
6440
6476
|
},
|
|
6441
6477
|
"list-sessions": {
|
|
@@ -6533,7 +6569,7 @@ var routes = {
|
|
|
6533
6569
|
"get-session": {
|
|
6534
6570
|
serviceClass: "Sessions",
|
|
6535
6571
|
operationId: "getSession",
|
|
6536
|
-
description: "Returns details of a single session.",
|
|
6572
|
+
description: "Returns details of a single session, including a `usage` roll-up of what its generations cost. The listing omits `usage`; for a window, a split by day or model, or one end user across every session, narrow the usage aggregate with `session_id` / `actor_id` instead.",
|
|
6537
6573
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
|
|
6538
6574
|
httpMethod: "get",
|
|
6539
6575
|
pathParams: ["session_id"],
|
|
@@ -7803,11 +7839,11 @@ var routes = {
|
|
|
7803
7839
|
"list-usage-events": {
|
|
7804
7840
|
serviceClass: "Usage",
|
|
7805
7841
|
operationId: "listUsageEvents",
|
|
7806
|
-
description: "Returns the raw usage events the caller can access, most recent first,
|
|
7842
|
+
description: "Returns the raw usage events the caller can access, most recent first, narrowed by any combination of the same filters the aggregate takes — agent, generation, trace, actor, session, AI provider, orchestration run, orchestration, trigger, action, meter type, model or `source` — so a rollup and the events behind it are addressed the same way. Each event is the per-generation token usage as reported by the provider, for audit and reconciliation. An id naming nothing in scope yields an empty page rather than dropping the filter, so a mistyped narrowing can never widen the list past what was asked for.",
|
|
7807
7843
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
|
|
7808
7844
|
httpMethod: "get",
|
|
7809
7845
|
pathParams: [],
|
|
7810
|
-
queryParams: ["agent_id", "generation_id", "trace_id", "actor_id", "session_id", "trigger_id", "action_id", "meter_type", "source", "limit", "offset"],
|
|
7846
|
+
queryParams: ["agent_id", "generation_id", "trace_id", "actor_id", "session_id", "ai_provider_id", "orchestration_run_id", "orchestration_id", "model", "trigger_id", "action_id", "meter_type", "source", "limit", "offset"],
|
|
7811
7847
|
flags: [{
|
|
7812
7848
|
"name": "agent_id",
|
|
7813
7849
|
"description": "Filter by agent public ID",
|
|
@@ -7838,6 +7874,30 @@ var routes = {
|
|
|
7838
7874
|
"required": false,
|
|
7839
7875
|
"type": "string",
|
|
7840
7876
|
"in": "query"
|
|
7877
|
+
}, {
|
|
7878
|
+
"name": "ai_provider_id",
|
|
7879
|
+
"description": "Filter by the provider record the spend was billed against. A provider that does not exist in scope yields an empty page.\n",
|
|
7880
|
+
"required": false,
|
|
7881
|
+
"type": "string",
|
|
7882
|
+
"in": "query"
|
|
7883
|
+
}, {
|
|
7884
|
+
"name": "orchestration_run_id",
|
|
7885
|
+
"description": "Filter by the orchestration run that metered the event. A run that does not exist in scope yields an empty page.\n",
|
|
7886
|
+
"required": false,
|
|
7887
|
+
"type": "string",
|
|
7888
|
+
"in": "query"
|
|
7889
|
+
}, {
|
|
7890
|
+
"name": "orchestration_id",
|
|
7891
|
+
"description": "Filter by orchestration — the events of the runs it started itself, not the subtree its `loop` or `sub_orchestration` nodes started. An orchestration that does not exist in scope yields an empty page.\n",
|
|
7892
|
+
"required": false,
|
|
7893
|
+
"type": "string",
|
|
7894
|
+
"in": "query"
|
|
7895
|
+
}, {
|
|
7896
|
+
"name": "model",
|
|
7897
|
+
"description": "Filter by the as-billed SKU the event recorded. Matched as recorded, so it still selects events whose provider has since been deleted.\n",
|
|
7898
|
+
"required": false,
|
|
7899
|
+
"type": "string",
|
|
7900
|
+
"in": "query"
|
|
7841
7901
|
}, {
|
|
7842
7902
|
"name": "trigger_id",
|
|
7843
7903
|
"description": "Filter by the trigger that initiated the generation",
|
|
@@ -7879,11 +7939,11 @@ var routes = {
|
|
|
7879
7939
|
"get-usage-aggregate": {
|
|
7880
7940
|
serviceClass: "Usage",
|
|
7881
7941
|
operationId: "getUsageAggregate",
|
|
7882
|
-
description: "Returns a project's usage rolled up over an optional `[from, to]` time window, bucketed by a single dimension and
|
|
7942
|
+
description: "Returns a project's usage rolled up over an optional `[from, to]` time window, optionally bucketed by a single dimension and narrowed by any combination of thirteen filters — session, actor, agent, AI provider, orchestration run, orchestration, generation, trace, meter type, model, source, trigger and action. That is how \"what did this conversation cost\", \"what has this end user cost\" and \"what did this agent cost\" are answered. Each group and the grand total carry an `event_count`, summed token counts, a measured `quantity` per component (so infra meters report their real amount, not zeros), 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 usage events client-side. Narrowings intersect and apply to the whole rollup — every bucket, `totals` and `totals.distinct` alike — so each composes with any `group_by`, and all thirteen are echoed back under `filters`. The eight naming a resource are resolved against the project, and one naming nothing there empties the rollup rather than being dropped: a mistyped id must never read back as the project's whole spend. The other five are matched against the value the event recorded. `groups` is paginated. Its `total` is the number of distinct buckets in the window — bucket cardinality, including a null bucket for the events the dimension does not apply to, and never a count of entities. To count entities, send `include=distinct` and read `totals.distinct`. `totals` always describes the whole window — never the page above it, and never the bucketing: omit `group_by` and `totals` is unchanged while `groups` is empty.",
|
|
7883
7943
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
|
|
7884
7944
|
httpMethod: "get",
|
|
7885
7945
|
pathParams: [],
|
|
7886
|
-
queryParams: ["project_id", "group_by", "include", "from", "to", "meter_type", "limit", "offset"],
|
|
7946
|
+
queryParams: ["project_id", "group_by", "include", "from", "to", "meter_type", "session_id", "actor_id", "agent_id", "ai_provider_id", "orchestration_run_id", "orchestration_id", "generation_id", "trace_id", "model", "source", "trigger_id", "action_id", "limit", "offset"],
|
|
7887
7947
|
flags: [{
|
|
7888
7948
|
"name": "project_id",
|
|
7889
7949
|
"description": "Project public ID to aggregate usage for",
|
|
@@ -7892,8 +7952,8 @@ var routes = {
|
|
|
7892
7952
|
"in": "query"
|
|
7893
7953
|
}, {
|
|
7894
7954
|
"name": "group_by",
|
|
7895
|
-
"description": "Dimension to bucket by. `day` buckets on the event's UTC calendar day; the others bucket on the matching column. `ai_provider` buckets on the provider the spend was billed against — a routed generation's serving target, or the agent's pinned provider. `model` buckets on the model id *and* the provider that served it, so one model name served by two providers is two groups (see `ai_provider_id`). `source` buckets by what the spend was incurred for (`eval`, `eval_judge`), which is how verification spend is priced apart from the traffic serving real users; unlabelled traffic collapses into the single `null` bucket. `orchestration_run` buckets on the orchestration run the event belongs to — a standalone generation runs no orchestration and collapses into the single `null` bucket, so the bucket count under this dimension is not a count of runs.\n",
|
|
7896
|
-
"required":
|
|
7955
|
+
"description": "Dimension to bucket by. Omit it to skip bucketing entirely: `totals` still describes the whole window and `groups` is an empty page, which is what \"what did this one thing cost\" wants. A value naming no dimension is a `400`. `day` buckets on the event's UTC calendar day; the others bucket on the matching column. `ai_provider` buckets on the provider the spend was billed against — a routed generation's serving target, or the agent's pinned provider. `model` buckets on the model id *and* the provider that served it, so one model name served by two providers is two groups (see `ai_provider_id`). `source` buckets by what the spend was incurred for (`eval`, `eval_judge`), which is how verification spend is priced apart from the traffic serving real users; unlabelled traffic collapses into the single `null` bucket. `orchestration_run` buckets on the orchestration run the event belongs to — a standalone generation runs no orchestration and collapses into the single `null` bucket, so the bucket count under this dimension is not a count of runs.\n",
|
|
7956
|
+
"required": false,
|
|
7897
7957
|
"type": "string",
|
|
7898
7958
|
"in": "query"
|
|
7899
7959
|
}, {
|
|
@@ -7920,6 +7980,78 @@ var routes = {
|
|
|
7920
7980
|
"required": false,
|
|
7921
7981
|
"type": "string",
|
|
7922
7982
|
"in": "query"
|
|
7983
|
+
}, {
|
|
7984
|
+
"name": "session_id",
|
|
7985
|
+
"description": "Narrow the whole rollup — every bucket, `totals` and `totals.distinct` alike — to one session's traffic. Combines with `group_by`: `group_by=day&session_id=…` is a conversation's spend per day, `group_by=model` is the same spend split by model. An id naming no session in this project yields an empty rollup, never the project total.\n",
|
|
7986
|
+
"required": false,
|
|
7987
|
+
"type": "string",
|
|
7988
|
+
"in": "query"
|
|
7989
|
+
}, {
|
|
7990
|
+
"name": "actor_id",
|
|
7991
|
+
"description": "The same narrowing, for one end user across every session they appear in. This is the figure behind a `scope: actor`, `metric: cost_usd` quota — what that actor has spent, against the cap it is held to.\n",
|
|
7992
|
+
"required": false,
|
|
7993
|
+
"type": "string",
|
|
7994
|
+
"in": "query"
|
|
7995
|
+
}, {
|
|
7996
|
+
"name": "agent_id",
|
|
7997
|
+
"description": "Narrow to one agent's traffic, across every session, run and trigger that dispatched it.\n",
|
|
7998
|
+
"required": false,
|
|
7999
|
+
"type": "string",
|
|
8000
|
+
"in": "query"
|
|
8001
|
+
}, {
|
|
8002
|
+
"name": "ai_provider_id",
|
|
8003
|
+
"description": "Narrow to the spend billed against one provider record — a routed generation's serving target, or the agent's pinned provider.\n",
|
|
8004
|
+
"required": false,
|
|
8005
|
+
"type": "string",
|
|
8006
|
+
"in": "query"
|
|
8007
|
+
}, {
|
|
8008
|
+
"name": "orchestration_run_id",
|
|
8009
|
+
"description": "Narrow to the events one orchestration run metered.",
|
|
8010
|
+
"required": false,
|
|
8011
|
+
"type": "string",
|
|
8012
|
+
"in": "query"
|
|
8013
|
+
}, {
|
|
8014
|
+
"name": "orchestration_id",
|
|
8015
|
+
"description": "Narrow to the runs of one orchestration — the runs it started itself, never the subtree a `loop` or `sub_orchestration` node started under it, which is metered against the child orchestration where it was incurred. Additive: summed across a project's orchestrations the figures reach the project total exactly once. For the subtree figure of a single invocation, read `usage` on the run.\n",
|
|
8016
|
+
"required": false,
|
|
8017
|
+
"type": "string",
|
|
8018
|
+
"in": "query"
|
|
8019
|
+
}, {
|
|
8020
|
+
"name": "generation_id",
|
|
8021
|
+
"description": "Narrow to one generation's events. A generation writes more than one when it meters several dimensions (tokens and compute).\n",
|
|
8022
|
+
"required": false,
|
|
8023
|
+
"type": "string",
|
|
8024
|
+
"in": "query"
|
|
8025
|
+
}, {
|
|
8026
|
+
"name": "trace_id",
|
|
8027
|
+
"description": "Narrow to the events recorded under one trace.",
|
|
8028
|
+
"required": false,
|
|
8029
|
+
"type": "string",
|
|
8030
|
+
"in": "query"
|
|
8031
|
+
}, {
|
|
8032
|
+
"name": "model",
|
|
8033
|
+
"description": "Narrow to one model, matched against the as-billed SKU the event recorded. A value naming no model yields an empty rollup, not an error. Under `group_by=model` this is a single-bucket rollup; under any other dimension it is that model's spend split by the dimension.\n",
|
|
8034
|
+
"required": false,
|
|
8035
|
+
"type": "string",
|
|
8036
|
+
"in": "query"
|
|
8037
|
+
}, {
|
|
8038
|
+
"name": "source",
|
|
8039
|
+
"description": "Narrow by what the spend was incurred for — `eval` and `eval_judge` are verification spend. Ordinary traffic carries no source, so it cannot be selected by this filter; omit the filter for everything.\n",
|
|
8040
|
+
"required": false,
|
|
8041
|
+
"type": "string",
|
|
8042
|
+
"in": "query"
|
|
8043
|
+
}, {
|
|
8044
|
+
"name": "trigger_id",
|
|
8045
|
+
"description": "Narrow to the spend one trigger initiated. Matched as recorded rather than resolved, so it still selects the spend of a trigger that has since been deleted.\n",
|
|
8046
|
+
"required": false,
|
|
8047
|
+
"type": "string",
|
|
8048
|
+
"in": "query"
|
|
8049
|
+
}, {
|
|
8050
|
+
"name": "action_id",
|
|
8051
|
+
"description": "Narrow to one caller-supplied action label, for per-action spend. Matched as recorded, like `trigger_id`.\n",
|
|
8052
|
+
"required": false,
|
|
8053
|
+
"type": "string",
|
|
8054
|
+
"in": "query"
|
|
7923
8055
|
}, {
|
|
7924
8056
|
"name": "limit",
|
|
7925
8057
|
"description": "Maximum number of `groups` entries to return. Clamped to 100. Does not affect `totals` or `groups.total`, which describe the whole window.\n",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soat/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"description": "CLI for SOAT — open-source infrastructure for production-ready AI agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@inquirer/input": "^5.1.2",
|
|
24
24
|
"@inquirer/password": "^5.1.1",
|
|
25
|
-
"@soat/sdk": "0.
|
|
25
|
+
"@soat/sdk": "0.46.0",
|
|
26
26
|
"@ttoss/logger": "^0.8.19",
|
|
27
27
|
"commander": "^15.0.0",
|
|
28
28
|
"js-yaml": "^5.2.1"
|