@soat/cli 0.18.4 → 0.18.6

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 -8
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -13,7 +13,7 @@ import { load } from "js-yaml";
13
13
  import * as os from "node:os";
14
14
 
15
15
  //#region package.json
16
- var version = "0.18.4";
16
+ var version = "0.18.6";
17
17
 
18
18
  //#endregion
19
19
  //#region src/cli-wrappers/wrappers/formations.ts
@@ -1188,7 +1188,7 @@ var routes = {
1188
1188
  "in": "body"
1189
1189
  }, {
1190
1190
  "name": "metadata",
1191
- "description": "Caller-supplied key/value metadata attached to the generation record for per-run audit attribution (e.g. the knowledge-corpus version that produced this action). Round-trips when the generation is fetched via the generations API. Reserved server-owned keys (`action_id`, `trigger_id`, `orchestration_run_id`, `node_id`, `extraction`, and internal recovery state) cannot be set here and are rejected with 400.",
1191
+ "description": "Caller-supplied key/value metadata attached to the generation record for per-run audit attribution (e.g. the knowledge-corpus version that produced this action). Round-trips verbatim when the generation is fetched via the generations API. The bag is caller-owned and no key is reserved: server-owned state (usage attribution, the served agent version, the model route's record, the extraction summary) lives in its own top-level generation fields and cannot be written from here. Use the request's own `action_id` field to set the usage-attribution label.",
1192
1192
  "required": false,
1193
1193
  "type": "object",
1194
1194
  "in": "body"
@@ -3841,7 +3841,7 @@ var routes = {
3841
3841
  "update-generation": {
3842
3842
  serviceClass: "Generations",
3843
3843
  operationId: "updateGeneration",
3844
- description: "Attaches caller-supplied key/value metadata to a generation record for per-run audit attribution (e.g. recording which knowledge-corpus version produced an AI action). The provided keys are shallow-merged over the existing metadata, so repeated patches accumulate and system-owned keys are preserved. Reserved keys (`action_id`, `trigger_id`, `orchestration_run_id`, `node_id`, `extraction`, and internal recovery state) cannot be set and are rejected with 400.",
3844
+ description: "Attaches caller-supplied key/value metadata to a generation record for per-run audit attribution (e.g. recording which knowledge-corpus version produced an AI action). The provided keys are shallow-merged over the existing `metadata`, so repeated patches accumulate. The bag is caller-owned and no key is reserved: server-owned state (usage attribution, the served agent version, the route's record, the extraction summary) lives in its own top-level fields and cannot be written from here.",
3845
3845
  moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/generations",
3846
3846
  httpMethod: "patch",
3847
3847
  pathParams: ["generation_id"],
@@ -3854,12 +3854,28 @@ var routes = {
3854
3854
  "in": "path"
3855
3855
  }, {
3856
3856
  "name": "metadata",
3857
- "description": "Caller-supplied key/value metadata to shallow-merge into the generation record. Reserved server-owned keys (`action_id`, `trigger_id`, `orchestration_run_id`, `node_id`, `extraction`, and internal recovery state) are rejected with 400.\n",
3857
+ "description": "Caller-supplied key/value metadata to shallow-merge into the generation record's caller-owned `metadata` bag. No key is reserved: server-owned state lives in its own top-level fields and cannot be written from here.\n",
3858
3858
  "required": true,
3859
3859
  "type": "object",
3860
3860
  "in": "body"
3861
3861
  }]
3862
3862
  },
3863
+ "purge-generation-content": {
3864
+ serviceClass: "Generations",
3865
+ operationId: "purgeGenerationContent",
3866
+ description: "Clears the generation's content — `metadata`, `error`, `extraction`, and the internal recovery state of a paused run — and stamps `content_redacted_at`. The usage and audit skeleton is preserved: ids, timestamps, status, stop reason, and the attribution fields (`action_id`, `trigger_id`, `orchestration_run_id`, `node_id`, `agent_version`, `routing`) the billing ledger reads. A purged generation reads back as that skeleton, not a 404. This does **not** delete the parent trace's steps object, which holds this generation's content alongside its siblings'. To erase the run's content completely, purge the trace (`DELETE /api/v1/traces/{trace_id}/content`), which cascades here. Idempotent — purging an already-purged generation succeeds and leaves the original `content_redacted_at` in place.",
3867
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/generations",
3868
+ httpMethod: "delete",
3869
+ pathParams: ["generation_id"],
3870
+ queryParams: [],
3871
+ flags: [{
3872
+ "name": "generation_id",
3873
+ "description": "Public ID of the generation",
3874
+ "required": true,
3875
+ "type": "string",
3876
+ "in": "path"
3877
+ }]
3878
+ },
3863
3879
  "list-guardrails": {
3864
3880
  serviceClass: "Guardrails",
3865
3881
  operationId: "listGuardrails",
@@ -6035,7 +6051,7 @@ var routes = {
6035
6051
  "create-task": {
6036
6052
  serviceClass: "Tasks",
6037
6053
  operationId: "createTask",
6038
- description: "Creates a task bound to a workflow. The task is placed in the workflow's initial state and that state's `on_enter` automation fires.",
6054
+ description: "Creates a task bound to a workflow. By default the task is placed in the workflow's initial state; passing `state` places it directly in that named state instead — an alternate entry point for starting a task mid-flow (e.g. \"a new recorte for an existing theme by id\"), rather than re-submitting from the initial state and hoping a guard or similarity gate recognizes it. Entering the resulting state, initial or named, behaves identically: that state's `on_enter` automation fires and its `stalled_after` clock arms.",
6039
6055
  moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/tasks",
6040
6056
  httpMethod: "post",
6041
6057
  pathParams: [],
@@ -6070,6 +6086,12 @@ var routes = {
6070
6086
  "required": false,
6071
6087
  "type": "string",
6072
6088
  "in": "body"
6089
+ }, {
6090
+ "name": "state",
6091
+ "description": "Name of a declared workflow state to create the task in directly, instead of the workflow's `initial` state. Must name a state declared on the workflow, or the request is rejected with `TASK_STATE_NOT_FOUND` (400). Defaults to the `initial` state.",
6092
+ "required": false,
6093
+ "type": "string",
6094
+ "in": "body"
6073
6095
  }]
6074
6096
  },
6075
6097
  "get-task": {
@@ -6091,7 +6113,7 @@ var routes = {
6091
6113
  "update-task": {
6092
6114
  serviceClass: "Tasks",
6093
6115
  operationId: "updateTask",
6094
- description: "Updates a task's payload, title, or assignee. `state` is never directly writable — move it with a transition; sending a `state` field is rejected as an unknown field (`VALIDATION_FAILED`). `payload` is shallow-merged over the existing payload (PATCH semantics): keys the request omits are preserved, so setting one field never discards values an on_enter automation wrote (e.g. `last_result`). The merged payload is validated against the workflow's `payload_schema`.",
6116
+ description: "Updates a task's payload, title, or assignee. `state` is never directly writable — move it with a transition; sending a `state` field is rejected as an unknown field (`VALIDATION_FAILED`). `payload` is shallow-merged over the existing payload (PATCH semantics): keys the request omits are preserved. The payload is caller-owned; the automation result lives in the read-only `last_result` field, which no patch can reach. The merged payload is validated against the workflow's `payload_schema`.",
6095
6117
  moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/tasks",
6096
6118
  httpMethod: "patch",
6097
6119
  pathParams: ["task_id"],
@@ -6250,7 +6272,7 @@ var routes = {
6250
6272
  "in": "body"
6251
6273
  }, {
6252
6274
  "name": "execute",
6253
- "description": "Execution config for http tools. Supported fields: `url` (required), `method` (default `POST`), `headers`, and `body_mode`. The `url` may contain `{paramName}` placeholders (e.g. `/users/{userId}`) that are replaced at call time with the corresponding tool argument value (URL-encoded). Arguments consumed as path parameters are excluded from the query string and request body. `body_mode` is `json` (default) or `multipart`. In `multipart` mode the merged tool arguments are sent as a `multipart/form-data` body: scalar fields become plain form fields and a field shaped like `{ content_type, filename, data_base64 }` is decoded from base64 and attached as a file part (the hardcoded `Content-Type: application/json` is dropped so `fetch` sets the multipart boundary itself).\n",
6275
+ "description": "Execution config for http tools. Supported fields: `url` (required), `method` (default `POST`), `headers`, and `body_mode`. The `url` may contain `{paramName}` placeholders (e.g. `/users/{userId}`) that are replaced at call time with the corresponding tool argument value (URL-encoded). Arguments consumed as path parameters are excluded from the query string and request body. `body_mode` is `json` (default) or `multipart`. In `multipart` mode the merged tool arguments are sent as a `multipart/form-data` body: scalar fields become plain form fields and a field shaped like `{ content_type, filename, data_base64 }` is decoded from base64 and attached as a file part (the hardcoded `Content-Type: application/json` is dropped so `fetch` sets the multipart boundary itself).\n\n`auth` adds a computed request credential, for targets whose `Authorization` value cannot be expressed as a static header. Supported `auth.type` values:\n\n- `aws_sigv4` — signs the request with AWS Signature Version 4. Requires `region`, `service`, `access_key_id` and `secret_access_key`; `session_token` is optional (temporary credentials). Incompatible with `body_mode: multipart`, whose body bytes are not known at signing time.\n- `gcp_service_account` — mints a Google OAuth 2.0 access token from a signed service account assertion and sends it as a bearer token. Requires `credentials` (the service account key file JSON, as a string) and `scopes` (a non-empty array). Tokens are cached per service account and scope set until shortly before they expire.\n\nCredential fields accept `{{secret:...}}` references and should use them — a tool is readable by anyone who can `GET /tools`, and the stored reference is what is echoed back, never the resolved value.\n",
6254
6276
  "required": false,
6255
6277
  "type": "object",
6256
6278
  "in": "body"
@@ -6354,7 +6376,7 @@ var routes = {
6354
6376
  "in": "body"
6355
6377
  }, {
6356
6378
  "name": "execute",
6357
- "description": "Execution config for http tools. Supported fields: `url` (required), `method` (default `POST`), `headers`, and `body_mode`. The `url` may contain `{paramName}` placeholders (e.g. `/users/{userId}`) that are replaced at call time with the corresponding tool argument value (URL-encoded). Arguments consumed as path parameters are excluded from the query string and request body. `body_mode` is `json` (default) or `multipart`. In `multipart` mode the merged tool arguments are sent as a `multipart/form-data` body: scalar fields become plain form fields and a field shaped like `{ content_type, filename, data_base64 }` is decoded from base64 and attached as a file part (the hardcoded `Content-Type: application/json` is dropped so `fetch` sets the multipart boundary itself).\n",
6379
+ "description": "Execution config for http tools. Supported fields: `url` (required), `method` (default `POST`), `headers`, and `body_mode`. The `url` may contain `{paramName}` placeholders (e.g. `/users/{userId}`) that are replaced at call time with the corresponding tool argument value (URL-encoded). Arguments consumed as path parameters are excluded from the query string and request body. `body_mode` is `json` (default) or `multipart`. In `multipart` mode the merged tool arguments are sent as a `multipart/form-data` body: scalar fields become plain form fields and a field shaped like `{ content_type, filename, data_base64 }` is decoded from base64 and attached as a file part (the hardcoded `Content-Type: application/json` is dropped so `fetch` sets the multipart boundary itself).\n\n`auth` adds a computed request credential, for targets whose `Authorization` value cannot be expressed as a static header. Supported `auth.type` values:\n\n- `aws_sigv4` — signs the request with AWS Signature Version 4. Requires `region`, `service`, `access_key_id` and `secret_access_key`; `session_token` is optional (temporary credentials). Incompatible with `body_mode: multipart`, whose body bytes are not known at signing time.\n- `gcp_service_account` — mints a Google OAuth 2.0 access token from a signed service account assertion and sends it as a bearer token. Requires `credentials` (the service account key file JSON, as a string) and `scopes` (a non-empty array). Tokens are cached per service account and scope set until shortly before they expire.\n\nCredential fields accept `{{secret:...}}` references and should use them — a tool is readable by anyone who can `GET /tools`, and the stored reference is what is echoed back, never the resolved value.\n",
6358
6380
  "required": false,
6359
6381
  "type": "object",
6360
6382
  "in": "body"
@@ -6512,6 +6534,22 @@ var routes = {
6512
6534
  "in": "query"
6513
6535
  }]
6514
6536
  },
6537
+ "purge-trace-content": {
6538
+ serviceClass: "Traces",
6539
+ operationId: "purgeTraceContent",
6540
+ description: "Deletes the trace's steps object from storage and clears its content columns (`file_id`, `error`), cascading to every descendant trace and to all of their generations. A descendant holds its own steps object covering the same run, so the cascade is what makes the erasure complete rather than merely partial. The rows survive as auditable skeletons with `content_redacted_at` set — ids, timestamps, step counts, and the generations' usage-attribution fields are preserved, because the billing and audit ledger must outlive a tenant's erasure of the content. A purged trace therefore reads back as a skeleton, not a 404: a 404 would prove nothing. Idempotent — purging an already-purged trace succeeds and leaves the original `content_redacted_at` in place.",
6541
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/traces",
6542
+ httpMethod: "delete",
6543
+ pathParams: ["trace_id"],
6544
+ queryParams: [],
6545
+ flags: [{
6546
+ "name": "trace_id",
6547
+ "description": "Public ID of the trace",
6548
+ "required": true,
6549
+ "type": "string",
6550
+ "in": "path"
6551
+ }]
6552
+ },
6515
6553
  "list-triggers": {
6516
6554
  serviceClass: "Triggers",
6517
6555
  operationId: "listTriggers",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/cli",
3
- "version": "0.18.4",
3
+ "version": "0.18.6",
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.18.4"
11
+ "@soat/sdk": "0.18.6"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@ttoss/config": "^1.37.17",