@soat/cli 0.33.1 → 0.34.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 +121 -11
- 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.34.0";
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/cli-wrappers/wrappers/formations.ts
|
|
@@ -790,13 +790,13 @@ var routes = {
|
|
|
790
790
|
"in": "body"
|
|
791
791
|
}, {
|
|
792
792
|
"name": "tool_choice",
|
|
793
|
-
"description": "Tool choice strategy. Accepts a string (`\"auto\"`, `\"required\"`) or an object (`{ \"type\": \"tool\", \"tool_name\": \"my_tool\" }`).",
|
|
793
|
+
"description": "Tool choice strategy. Accepts a string (`\"auto\"`, `\"required\"`) or an object (`{ \"type\": \"tool\", \"tool_name\": \"my_tool\" }`). A forcing value (`\"required\"` or the object form) forbids a final assistant message on every step of every turn, including a resumed or continued one, so it requires a `hasToolCall` entry in `stop_conditions` — otherwise the write is refused with `FORCED_TOOL_CHOICE_CANNOT_STOP`.",
|
|
794
794
|
"required": false,
|
|
795
795
|
"type": "any",
|
|
796
796
|
"in": "body"
|
|
797
797
|
}, {
|
|
798
798
|
"name": "stop_conditions",
|
|
799
|
-
"description": "",
|
|
799
|
+
"description": "Conditions that end the agent's work early, on top of `max_steps`. Two scopes:\n\n`{\"type\": \"hasToolCall\", \"tool_name\": \"<resolved tool name>\"}` ends the **turn** after the step that calls the named tool. It narrows when the loop ends — it never lets it run past `max_steps`.\n\n`{\"type\": \"maxChainGenerations\", \"max_generations\": <n>}` bounds the **continuation chain** instead: once the chain has spawned that many generations, further resumptions stop with `chain_limit` rather than extending it. It never shortens a turn. The effective ceiling is the smaller of this and the deployment's `MAX_CONTINUATION_CHAIN_GENERATIONS`, so an agent can be stricter than the platform but never looser.\n\nAn unknown `type`, a `hasToolCall` without a `tool_name`, a `maxChainGenerations` whose `max_generations` is not a positive integer, or a non-object entry is rejected with 400.",
|
|
800
800
|
"required": false,
|
|
801
801
|
"type": "array",
|
|
802
802
|
"in": "body"
|
|
@@ -860,6 +860,12 @@ var routes = {
|
|
|
860
860
|
"required": false,
|
|
861
861
|
"type": "string",
|
|
862
862
|
"in": "body"
|
|
863
|
+
}, {
|
|
864
|
+
"name": "on_approval_expiry",
|
|
865
|
+
"description": "What happens when one of this agent's held tool calls expires un-approved. `null` (the default) and `terminate` end the chain there — the expired approval, its `approvals.expired` event and the auto-filed `approval_expired` exception are the whole record. `react` spawns a continuation that reports the staleness to the agent, for an agent that acts on it.",
|
|
866
|
+
"required": false,
|
|
867
|
+
"type": "string",
|
|
868
|
+
"in": "body"
|
|
863
869
|
}, {
|
|
864
870
|
"name": "version_label",
|
|
865
871
|
"description": "Optional tag for the config version this write archives (e.g. `initial`). Annotates the version only — it is not stored on the agent and is not part of the config, so labelling a change is never itself a change.",
|
|
@@ -942,13 +948,13 @@ var routes = {
|
|
|
942
948
|
"in": "body"
|
|
943
949
|
}, {
|
|
944
950
|
"name": "tool_choice",
|
|
945
|
-
"description": "Tool choice strategy. Accepts a string (`\"auto\"`, `\"required\"`) or an object (`{ \"type\": \"tool\", \"tool_name\": \"my_tool\" }`).",
|
|
951
|
+
"description": "Tool choice strategy. Accepts a string (`\"auto\"`, `\"required\"`) or an object (`{ \"type\": \"tool\", \"tool_name\": \"my_tool\" }`). A forcing value (`\"required\"` or the object form) forbids a final assistant message on every step of every turn, including a resumed or continued one, so it requires a `hasToolCall` entry in `stop_conditions` — otherwise the write is refused with `FORCED_TOOL_CHOICE_CANNOT_STOP`.",
|
|
946
952
|
"required": false,
|
|
947
953
|
"type": "any",
|
|
948
954
|
"in": "body"
|
|
949
955
|
}, {
|
|
950
956
|
"name": "stop_conditions",
|
|
951
|
-
"description": "",
|
|
957
|
+
"description": "Conditions that end the agent's work early, on top of `max_steps`. Two scopes:\n\n`{\"type\": \"hasToolCall\", \"tool_name\": \"<resolved tool name>\"}` ends the **turn** after the step that calls the named tool. It narrows when the loop ends — it never lets it run past `max_steps`.\n\n`{\"type\": \"maxChainGenerations\", \"max_generations\": <n>}` bounds the **continuation chain** instead: once the chain has spawned that many generations, further resumptions stop with `chain_limit` rather than extending it. It never shortens a turn. The effective ceiling is the smaller of this and the deployment's `MAX_CONTINUATION_CHAIN_GENERATIONS`, so an agent can be stricter than the platform but never looser.\n\nAn unknown `type`, a `hasToolCall` without a `tool_name`, a `maxChainGenerations` whose `max_generations` is not a positive integer, or a non-object entry is rejected with 400.",
|
|
952
958
|
"required": false,
|
|
953
959
|
"type": "array",
|
|
954
960
|
"in": "body"
|
|
@@ -1012,6 +1018,12 @@ var routes = {
|
|
|
1012
1018
|
"required": false,
|
|
1013
1019
|
"type": "string",
|
|
1014
1020
|
"in": "body"
|
|
1021
|
+
}, {
|
|
1022
|
+
"name": "on_approval_expiry",
|
|
1023
|
+
"description": "What happens when one of this agent's held tool calls expires un-approved. `null` (the default) and `terminate` end the chain there — the expired approval, its `approvals.expired` event and the auto-filed `approval_expired` exception are the whole record. `react` spawns a continuation that reports the staleness to the agent, for an agent that acts on it.",
|
|
1024
|
+
"required": false,
|
|
1025
|
+
"type": "string",
|
|
1026
|
+
"in": "body"
|
|
1015
1027
|
}, {
|
|
1016
1028
|
"name": "version_label",
|
|
1017
1029
|
"description": "Optional tag for the config version this write archives (e.g. `pre-tone-change`). Annotates the version only — it is not stored on the agent and is not part of the config, so labelling a change is never itself a change. Ignored when the write changes nothing, since no version is created.",
|
|
@@ -1078,13 +1090,13 @@ var routes = {
|
|
|
1078
1090
|
"in": "body"
|
|
1079
1091
|
}, {
|
|
1080
1092
|
"name": "tool_choice",
|
|
1081
|
-
"description": "Tool choice strategy. Accepts a string (`\"auto\"`, `\"required\"`) or an object (`{ \"type\": \"tool\", \"tool_name\": \"my_tool\" }`).",
|
|
1093
|
+
"description": "Tool choice strategy. Accepts a string (`\"auto\"`, `\"required\"`) or an object (`{ \"type\": \"tool\", \"tool_name\": \"my_tool\" }`). A forcing value (`\"required\"` or the object form) forbids a final assistant message on every step of every turn, including a resumed or continued one, so it requires a `hasToolCall` entry in `stop_conditions` — otherwise the write is refused with `FORCED_TOOL_CHOICE_CANNOT_STOP`.",
|
|
1082
1094
|
"required": false,
|
|
1083
1095
|
"type": "any",
|
|
1084
1096
|
"in": "body"
|
|
1085
1097
|
}, {
|
|
1086
1098
|
"name": "stop_conditions",
|
|
1087
|
-
"description": "",
|
|
1099
|
+
"description": "Conditions that end the agent's work early, on top of `max_steps`. Two scopes:\n\n`{\"type\": \"hasToolCall\", \"tool_name\": \"<resolved tool name>\"}` ends the **turn** after the step that calls the named tool. It narrows when the loop ends — it never lets it run past `max_steps`.\n\n`{\"type\": \"maxChainGenerations\", \"max_generations\": <n>}` bounds the **continuation chain** instead: once the chain has spawned that many generations, further resumptions stop with `chain_limit` rather than extending it. It never shortens a turn. The effective ceiling is the smaller of this and the deployment's `MAX_CONTINUATION_CHAIN_GENERATIONS`, so an agent can be stricter than the platform but never looser.\n\nAn unknown `type`, a `hasToolCall` without a `tool_name`, a `maxChainGenerations` whose `max_generations` is not a positive integer, or a non-object entry is rejected with 400.",
|
|
1088
1100
|
"required": false,
|
|
1089
1101
|
"type": "array",
|
|
1090
1102
|
"in": "body"
|
|
@@ -1148,6 +1160,12 @@ var routes = {
|
|
|
1148
1160
|
"required": false,
|
|
1149
1161
|
"type": "string",
|
|
1150
1162
|
"in": "body"
|
|
1163
|
+
}, {
|
|
1164
|
+
"name": "on_approval_expiry",
|
|
1165
|
+
"description": "What happens when one of this agent's held tool calls expires un-approved. `null` (the default) and `terminate` end the chain there — the expired approval, its `approvals.expired` event and the auto-filed `approval_expired` exception are the whole record. `react` spawns a continuation that reports the staleness to the agent, for an agent that acts on it.",
|
|
1166
|
+
"required": false,
|
|
1167
|
+
"type": "string",
|
|
1168
|
+
"in": "body"
|
|
1151
1169
|
}, {
|
|
1152
1170
|
"name": "version_label",
|
|
1153
1171
|
"description": "Optional tag for the config version this write archives (e.g. `pre-tone-change`). Annotates the version only — it is not stored on the agent and is not part of the config, so labelling a change is never itself a change. Ignored when the write changes nothing, since no version is created.",
|
|
@@ -1970,7 +1988,7 @@ var routes = {
|
|
|
1970
1988
|
"in": "query"
|
|
1971
1989
|
}, {
|
|
1972
1990
|
"name": "resource_srn",
|
|
1973
|
-
"description": "SRN prefix match, e.g. `srn:{project}:secret:`.
|
|
1991
|
+
"description": "SRN prefix match, e.g. `srn:{project}:secret:`. The log is append-only, so a stored SRN is never rewritten; the filter matches it as stored.",
|
|
1974
1992
|
"required": false,
|
|
1975
1993
|
"type": "string",
|
|
1976
1994
|
"in": "query"
|
|
@@ -2034,7 +2052,7 @@ var routes = {
|
|
|
2034
2052
|
"in": "query"
|
|
2035
2053
|
}, {
|
|
2036
2054
|
"name": "resource_srn",
|
|
2037
|
-
"description": "SRN prefix match, e.g. `srn:{project}:secret:`.
|
|
2055
|
+
"description": "SRN prefix match, e.g. `srn:{project}:secret:`. The log is append-only, so a stored SRN is never rewritten; the filter matches it as stored.",
|
|
2038
2056
|
"required": false,
|
|
2039
2057
|
"type": "string",
|
|
2040
2058
|
"in": "query"
|
|
@@ -2068,6 +2086,62 @@ var routes = {
|
|
|
2068
2086
|
"in": "path"
|
|
2069
2087
|
}]
|
|
2070
2088
|
},
|
|
2089
|
+
"list-chains": {
|
|
2090
|
+
serviceClass: "Chains",
|
|
2091
|
+
operationId: "listChains",
|
|
2092
|
+
description: "Returns the continuation chains in a project, newest first. Filter by `status` to find the chains that may still be spending (`active`) or the ones a budget stopped (`budget_exhausted`).",
|
|
2093
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/chains",
|
|
2094
|
+
httpMethod: "get",
|
|
2095
|
+
pathParams: [],
|
|
2096
|
+
queryParams: ["project_id", "status", "agent_id", "limit", "offset"],
|
|
2097
|
+
flags: [{
|
|
2098
|
+
"name": "project_id",
|
|
2099
|
+
"description": "Project ID (required if not using project key auth)",
|
|
2100
|
+
"required": false,
|
|
2101
|
+
"type": "string",
|
|
2102
|
+
"in": "query"
|
|
2103
|
+
}, {
|
|
2104
|
+
"name": "status",
|
|
2105
|
+
"description": "Filter by chain status",
|
|
2106
|
+
"required": false,
|
|
2107
|
+
"type": "string",
|
|
2108
|
+
"in": "query"
|
|
2109
|
+
}, {
|
|
2110
|
+
"name": "agent_id",
|
|
2111
|
+
"description": "Filter by the agent whose continuation opened the chain",
|
|
2112
|
+
"required": false,
|
|
2113
|
+
"type": "string",
|
|
2114
|
+
"in": "query"
|
|
2115
|
+
}, {
|
|
2116
|
+
"name": "limit",
|
|
2117
|
+
"description": "Maximum number of results to return",
|
|
2118
|
+
"required": false,
|
|
2119
|
+
"type": "integer",
|
|
2120
|
+
"in": "query"
|
|
2121
|
+
}, {
|
|
2122
|
+
"name": "offset",
|
|
2123
|
+
"description": "Number of results to skip",
|
|
2124
|
+
"required": false,
|
|
2125
|
+
"type": "integer",
|
|
2126
|
+
"in": "query"
|
|
2127
|
+
}]
|
|
2128
|
+
},
|
|
2129
|
+
"get-chain": {
|
|
2130
|
+
serviceClass: "Chains",
|
|
2131
|
+
operationId: "getChain",
|
|
2132
|
+
description: "Returns a single continuation chain. To read the generations in it, list generations filtered by `chain_id`.",
|
|
2133
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/chains",
|
|
2134
|
+
httpMethod: "get",
|
|
2135
|
+
pathParams: ["chain_id"],
|
|
2136
|
+
queryParams: [],
|
|
2137
|
+
flags: [{
|
|
2138
|
+
"name": "chain_id",
|
|
2139
|
+
"description": "Continuation chain ID",
|
|
2140
|
+
"required": true,
|
|
2141
|
+
"type": "string",
|
|
2142
|
+
"in": "path"
|
|
2143
|
+
}]
|
|
2144
|
+
},
|
|
2071
2145
|
"list-chats": {
|
|
2072
2146
|
serviceClass: "Chats",
|
|
2073
2147
|
operationId: "listChats",
|
|
@@ -3424,6 +3498,12 @@ var routes = {
|
|
|
3424
3498
|
"required": false,
|
|
3425
3499
|
"type": "object",
|
|
3426
3500
|
"in": "body"
|
|
3501
|
+
}, {
|
|
3502
|
+
"name": "tool_context",
|
|
3503
|
+
"description": "Key/value context forwarded to every item's generation, so an agent whose tools authorize through `tool_context` is scored against the configuration it runs in production rather than with an empty bag. Each key is forwarded as one `X-Soat-Context-<key>` header and resolves any `{{context:<key>}}` token in a bound tool's headers or `preset_parameters`.\n\nStored on the run and re-read per item, since a queued run (the default) is driven by a worker with no request behind it. **Write-only**: no read of the run returns it, unlike `metadata` — a run is a report other people read, and a credential in it is not theirs to see. Cleared once the run reaches a terminal state.\n\nAn eval generation has no session, so the reserved keys `sessionId`, `actorId` and `actorExternalId` are dropped (in any casing) rather than forwarded. Every other key becomes an HTTP header name and must match that grammar, or the request is rejected with `400 INVALID_TOOL_CONTEXT_KEY` and no run is created.",
|
|
3504
|
+
"required": false,
|
|
3505
|
+
"type": "object",
|
|
3506
|
+
"in": "body"
|
|
3427
3507
|
}]
|
|
3428
3508
|
},
|
|
3429
3509
|
"get-eval-run": {
|
|
@@ -4179,7 +4259,7 @@ var routes = {
|
|
|
4179
4259
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/generations",
|
|
4180
4260
|
httpMethod: "get",
|
|
4181
4261
|
pathParams: [],
|
|
4182
|
-
queryParams: ["agent_id", "trace_id", "initiator_generation_id", "orchestration_run_id", "node_id", "status", "limit", "offset"],
|
|
4262
|
+
queryParams: ["agent_id", "trace_id", "initiator_generation_id", "chain_id", "orchestration_run_id", "node_id", "status", "limit", "offset"],
|
|
4183
4263
|
flags: [{
|
|
4184
4264
|
"name": "agent_id",
|
|
4185
4265
|
"description": "Filter by agent public ID",
|
|
@@ -4198,6 +4278,12 @@ var routes = {
|
|
|
4198
4278
|
"required": false,
|
|
4199
4279
|
"type": "string",
|
|
4200
4280
|
"in": "query"
|
|
4281
|
+
}, {
|
|
4282
|
+
"name": "chain_id",
|
|
4283
|
+
"description": "Filter by the continuation chain the generation belongs to. This is how a chain is expanded into its members — the chain record carries only their count.\n",
|
|
4284
|
+
"required": false,
|
|
4285
|
+
"type": "string",
|
|
4286
|
+
"in": "query"
|
|
4201
4287
|
}, {
|
|
4202
4288
|
"name": "orchestration_run_id",
|
|
4203
4289
|
"description": "Filter by the orchestration run that dispatched the generation. This is how a run is traced back to what its agent nodes did — a node execution record stores no generation id.\n",
|
|
@@ -5917,7 +6003,7 @@ var routes = {
|
|
|
5917
6003
|
"update-project": {
|
|
5918
6004
|
serviceClass: "Projects",
|
|
5919
6005
|
operationId: "updateProject",
|
|
5920
|
-
description: "Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.",
|
|
6006
|
+
description: "Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.",
|
|
5921
6007
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/projects",
|
|
5922
6008
|
httpMethod: "patch",
|
|
5923
6009
|
pathParams: ["project_id"],
|
|
@@ -5946,6 +6032,12 @@ var routes = {
|
|
|
5946
6032
|
"required": false,
|
|
5947
6033
|
"type": "integer",
|
|
5948
6034
|
"in": "body"
|
|
6035
|
+
}, {
|
|
6036
|
+
"name": "max_chain_generations",
|
|
6037
|
+
"description": "Generations one continuation chain in this project may hold before the platform stops resuming it. `null` clears the project's ceiling, leaving the deployment-wide `MAX_CONTINUATION_CHAIN_GENERATIONS`; otherwise an integer >= 1. The effective budget is the smallest of the deployment's ceiling, this one, and the agent's own `maxChainGenerations` stop condition, so an agent author can be stricter than this number but never exceed it.",
|
|
6038
|
+
"required": false,
|
|
6039
|
+
"type": "integer",
|
|
6040
|
+
"in": "body"
|
|
5949
6041
|
}, {
|
|
5950
6042
|
"name": "default_model_route_id",
|
|
5951
6043
|
"description": "Model route inherited by consumers in this project that bind neither `model_route_id` nor `ai_provider_id`. The route must belong to this project (`400` otherwise). `null` clears the default, which is refused with `409` while any consumer inherits it — repointing it to another route is always allowed and immediately changes which targets those consumers use.",
|
|
@@ -6110,6 +6202,12 @@ var routes = {
|
|
|
6110
6202
|
"required": false,
|
|
6111
6203
|
"type": "string",
|
|
6112
6204
|
"in": "body"
|
|
6205
|
+
}, {
|
|
6206
|
+
"name": "on_unpriced",
|
|
6207
|
+
"description": "Only for metric cost_usd (400 on any other metric). What an enforce quota does when the current window is a pricing blackout — several metered events, none of them priced, so the aggregate is 0 however much was actually spent. block (the default) refuses new generations with 409 QUOTA_UNENFORCEABLE until pricing is configured; allow accepts the unmeasurable spend explicitly. Either way a quota_unpriced exception is filed. monitor-mode quotas never block regardless.",
|
|
6208
|
+
"required": false,
|
|
6209
|
+
"type": "string",
|
|
6210
|
+
"in": "body"
|
|
6113
6211
|
}]
|
|
6114
6212
|
},
|
|
6115
6213
|
"get-quota": {
|
|
@@ -6154,6 +6252,12 @@ var routes = {
|
|
|
6154
6252
|
"required": false,
|
|
6155
6253
|
"type": "string",
|
|
6156
6254
|
"in": "body"
|
|
6255
|
+
}, {
|
|
6256
|
+
"name": "on_unpriced",
|
|
6257
|
+
"description": "New pricing posture. Only for metric cost_usd (400 on any other metric); see the create operation for what block and allow mean.",
|
|
6258
|
+
"required": false,
|
|
6259
|
+
"type": "string",
|
|
6260
|
+
"in": "body"
|
|
6157
6261
|
}]
|
|
6158
6262
|
},
|
|
6159
6263
|
"delete-quota": {
|
|
@@ -7188,6 +7292,12 @@ var routes = {
|
|
|
7188
7292
|
"required": false,
|
|
7189
7293
|
"type": "object",
|
|
7190
7294
|
"in": "body"
|
|
7295
|
+
}, {
|
|
7296
|
+
"name": "tool_context",
|
|
7297
|
+
"description": "Key/value context for this call, forwarded to the tool as `X-Soat-Context-<key>` request headers and resolving any `{{context:<key>}}` token in the tool's `execute.headers`, `mcp.headers` or `preset_parameters`. Narrowed by the tool's `context_keys` allowlist when it sets one.\nThis route has no session, so it stamps no server-derived identity: the reserved keys `sessionId`, `actorId` and `actorExternalId` are dropped from this bag (in any casing) rather than forwarded, so a downstream tool can still trust that a context header naming one is server-derived. Every other key becomes an HTTP header name and must match that grammar, or the call fails with `INVALID_TOOL_CONTEXT_KEY`.\n",
|
|
7298
|
+
"required": false,
|
|
7299
|
+
"type": "object",
|
|
7300
|
+
"in": "body"
|
|
7191
7301
|
}]
|
|
7192
7302
|
},
|
|
7193
7303
|
"list-traces": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soat/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.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.34.0",
|
|
26
26
|
"@ttoss/logger": "^0.8.19",
|
|
27
27
|
"commander": "^15.0.0",
|
|
28
28
|
"js-yaml": "^5.2.1"
|