@soat/cli 0.59.4 → 0.61.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.
Files changed (2) hide show
  1. package/dist/index.mjs +46 -10
  2. 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.59.4";
16
+ var version = "0.61.0";
17
17
 
18
18
  //#endregion
19
19
  //#region src/cli-wrappers/wrappers/formations.ts
@@ -5345,7 +5345,7 @@ var routes = {
5345
5345
  "evaluate-guardrail": {
5346
5346
  serviceClass: "Guardrails",
5347
5347
  operationId: "evaluateGuardrail",
5348
- description: "Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `runtime.*` resolution — against caller-supplied `args` and `guardrail_context`, and returns the exact `guardrail_evaluation` record a real call would produce. Nothing executes, no approval item is filed, and no activity entry is written. This is the adoption path: preview a document's decisions against production-shaped calls before attaching it — or before editing a widely-attached one. Pass an optional `tool_id` to resolve `runtime.tool.*`.",
5348
+ description: "Runs the full evaluation pipeline — the `class` expression, the guard, the context tool per `context_mode`, live `runtime.*` resolution — against caller-supplied `args` and `guardrail_context`, and returns the exact `guardrail_evaluation` record a real call would produce. Nothing executes, no approval item is filed, and no activity entry is written. This is the adoption path: preview a document's decisions against production-shaped calls before attaching it — or before editing a widely-attached one. Pass an optional `tool_id` to resolve `runtime.tools.*`.",
5349
5349
  moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/guardrails",
5350
5350
  httpMethod: "post",
5351
5351
  pathParams: ["guardrail_id"],
@@ -5372,7 +5372,7 @@ var routes = {
5372
5372
  "in": "body"
5373
5373
  }, {
5374
5374
  "name": "tool_id",
5375
- "description": "Optional tool to resolve `runtime.tool.*` against.",
5375
+ "description": "Optional tool to resolve `runtime.tools.*` against.",
5376
5376
  "required": false,
5377
5377
  "type": "string",
5378
5378
  "in": "body"
@@ -6954,6 +6954,12 @@ var routes = {
6954
6954
  "required": false,
6955
6955
  "type": "object",
6956
6956
  "in": "body"
6957
+ }, {
6958
+ "name": "output_mapping",
6959
+ "description": "The shape of a succeeded run's `output`, owned by the orchestration rather than by its terminal node ids. Each key is an output field (a dotted key such as `summary.title` builds a nested object); each value is JSON Logic (https://jsonlogic.com) evaluated against `{ \"state\": <final run state> }`, which includes `state.input` and `state.nodes.<id>`. A missing path maps to `null`; a mapping that throws fails the run. Null (or omitted) keys `output` by terminal node id. Versioned with the graph; `null` on update clears it.",
6960
+ "required": false,
6961
+ "type": "object",
6962
+ "in": "body"
6957
6963
  }, {
6958
6964
  "name": "version_label",
6959
6965
  "description": "Optional tag for the version this create archives, e.g. `initial`.",
@@ -7080,6 +7086,12 @@ var routes = {
7080
7086
  "required": false,
7081
7087
  "type": "object",
7082
7088
  "in": "body"
7089
+ }, {
7090
+ "name": "output_mapping",
7091
+ "description": "The shape of a succeeded run's `output`, owned by the orchestration rather than by its terminal node ids. Each key is an output field (a dotted key such as `summary.title` builds a nested object); each value is JSON Logic (https://jsonlogic.com) evaluated against `{ \"state\": <final run state> }`, which includes `state.input` and `state.nodes.<id>`. A missing path maps to `null`; a mapping that throws fails the run. Null (or omitted) keys `output` by terminal node id. Versioned with the graph; `null` on update clears it.",
7092
+ "required": false,
7093
+ "type": "object",
7094
+ "in": "body"
7083
7095
  }, {
7084
7096
  "name": "version_label",
7085
7097
  "description": "Optional tag for the version this write archives, e.g. `pre-rewire`. Ignored when the write changes no graph field, since no version is archived.",
@@ -9527,11 +9539,11 @@ var routes = {
9527
9539
  "list-usage-events": {
9528
9540
  serviceClass: "Usage",
9529
9541
  operationId: "listUsageEvents",
9530
- 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.",
9542
+ 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, tool, trigger, action, outcome, 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.",
9531
9543
  moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
9532
9544
  httpMethod: "get",
9533
9545
  pathParams: [],
9534
- 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"],
9546
+ queryParams: ["agent_id", "generation_id", "trace_id", "actor_id", "session_id", "ai_provider_id", "orchestration_run_id", "orchestration_id", "model", "trigger_id", "action_id", "tool_id", "outcome", "meter_type", "source", "limit", "offset"],
9535
9547
  headerParams: [],
9536
9548
  cookieParams: [],
9537
9549
  flags: [{
@@ -9600,15 +9612,27 @@ var routes = {
9600
9612
  "required": false,
9601
9613
  "type": "string",
9602
9614
  "in": "query"
9615
+ }, {
9616
+ "name": "tool_id",
9617
+ "description": "Filter by the tool a `tool_execution` event metered. A tool that does not exist in scope yields an empty page.\n",
9618
+ "required": false,
9619
+ "type": "string",
9620
+ "in": "query"
9621
+ }, {
9622
+ "name": "outcome",
9623
+ "description": "Filter by how a `tool_execution` call ended: `ok`, `error` or `timeout`. Every other meter carries no outcome and is matched by none of them.\n",
9624
+ "required": false,
9625
+ "type": "string",
9626
+ "in": "query"
9603
9627
  }, {
9604
9628
  "name": "meter_type",
9605
- "description": "Filter by meter type (e.g. `llm_tokens`, `compute_execution`, `api_request`, `storage`)\n",
9629
+ "description": "Filter by meter type (e.g. `llm_tokens`, `compute_execution`, `api_request`, `storage`, `tool_execution`)\n",
9606
9630
  "required": false,
9607
9631
  "type": "string",
9608
9632
  "in": "query"
9609
9633
  }, {
9610
9634
  "name": "source",
9611
- "description": "Filter by what the spend was incurred for. `eval` is an eval run's item generations and `eval_judge` an `llm_judge` scorer's own completion, so verification spend is `source` in (`eval`, `eval_judge`); `embedding` is any embedding call. Ordinary agent traffic carries no source and is matched by none of them.\n",
9635
+ "description": "Filter by what the spend was incurred for. `eval` is an eval run's item generations, `eval_judge` an `llm_judge` scorer's own completion and `eval_scorer` a `tool` scorer's call, so verification spend is `source` in (`eval`, `eval_judge`, `eval_scorer`); `embedding` is any embedding call. Ordinary agent traffic carries no source and is matched by none of them.\n",
9612
9636
  "required": false,
9613
9637
  "type": "string",
9614
9638
  "in": "query"
@@ -9629,11 +9653,11 @@ var routes = {
9629
9653
  "get-usage-aggregate": {
9630
9654
  serviceClass: "Usage",
9631
9655
  operationId: "getUsageAggregate",
9632
- 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.",
9656
+ 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 fifteen filters — session, actor, agent, AI provider, orchestration run, orchestration, generation, trace, tool, meter type, model, source, trigger, action and outcome. 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 fifteen are echoed back under `filters`. The nine 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 six 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.",
9633
9657
  moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/usage",
9634
9658
  httpMethod: "get",
9635
9659
  pathParams: [],
9636
- 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"],
9660
+ 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", "tool_id", "outcome", "limit", "offset"],
9637
9661
  headerParams: [],
9638
9662
  cookieParams: [],
9639
9663
  flags: [{
@@ -9668,7 +9692,7 @@ var routes = {
9668
9692
  "in": "query"
9669
9693
  }, {
9670
9694
  "name": "meter_type",
9671
- "description": "Narrow the rollup to one meter type (e.g. `llm_tokens`, `compute_execution`, `api_request`, `storage`). Omit to include every meter. An unknown type yields an empty rollup, not an error.\n",
9695
+ "description": "Narrow the rollup to one meter type (e.g. `llm_tokens`, `compute_execution`, `api_request`, `storage`, `tool_execution`). Omit to include every meter. An unknown type yields an empty rollup, not an error.\n",
9672
9696
  "required": false,
9673
9697
  "type": "string",
9674
9698
  "in": "query"
@@ -9744,6 +9768,18 @@ var routes = {
9744
9768
  "required": false,
9745
9769
  "type": "string",
9746
9770
  "in": "query"
9771
+ }, {
9772
+ "name": "tool_id",
9773
+ "description": "Narrow to the executions of one tool. An id naming no tool in this project yields an empty rollup.\n",
9774
+ "required": false,
9775
+ "type": "string",
9776
+ "in": "query"
9777
+ }, {
9778
+ "name": "outcome",
9779
+ "description": "Narrow `tool_execution` events by how the call ended — `ok`, `error` or `timeout` — matched as recorded. `outcome=error` is a tool's failures without a second meter.\n",
9780
+ "required": false,
9781
+ "type": "string",
9782
+ "in": "query"
9747
9783
  }, {
9748
9784
  "name": "limit",
9749
9785
  "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.59.4",
3
+ "version": "0.61.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.6",
24
24
  "@inquirer/password": "^5.2.2",
25
- "@soat/sdk": "0.59.4",
25
+ "@soat/sdk": "0.61.0",
26
26
  "@ttoss/logger": "^0.8.20",
27
27
  "commander": "^15.0.0",
28
28
  "js-yaml": "^5.4.2"