@soat/cli 0.61.1 → 0.63.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 +412 -4
  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.61.1";
16
+ var version = "0.63.0";
17
17
 
18
18
  //#endregion
19
19
  //#region src/cli-wrappers/wrappers/formations.ts
@@ -2870,6 +2870,372 @@ var routes = {
2870
2870
  "in": "path"
2871
2871
  }]
2872
2872
  },
2873
+ "list-deciders": {
2874
+ serviceClass: "Deciders",
2875
+ operationId: "listDeciders",
2876
+ description: "Returns the deciders defined in a project, newest first.",
2877
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/deciders",
2878
+ httpMethod: "get",
2879
+ pathParams: [],
2880
+ queryParams: ["project_id", "limit", "offset"],
2881
+ headerParams: [],
2882
+ cookieParams: [],
2883
+ flags: [{
2884
+ "name": "project_id",
2885
+ "description": "Project ID (required if not using project key auth)",
2886
+ "required": false,
2887
+ "type": "string",
2888
+ "in": "query"
2889
+ }, {
2890
+ "name": "limit",
2891
+ "description": "Maximum number of results to return",
2892
+ "required": false,
2893
+ "type": "integer",
2894
+ "in": "query"
2895
+ }, {
2896
+ "name": "offset",
2897
+ "description": "Number of results to skip",
2898
+ "required": false,
2899
+ "type": "integer",
2900
+ "in": "query"
2901
+ }]
2902
+ },
2903
+ "create-decider": {
2904
+ serviceClass: "Deciders",
2905
+ operationId: "createDecider",
2906
+ description: "Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must be `http` or `pipeline` and must not pin `state` or `questions` in its `preset_parameters`, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.",
2907
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/deciders",
2908
+ httpMethod: "post",
2909
+ pathParams: [],
2910
+ queryParams: [],
2911
+ headerParams: [],
2912
+ cookieParams: [],
2913
+ flags: [{
2914
+ "name": "project_id",
2915
+ "description": "Project ID (required if not using project key auth)",
2916
+ "required": false,
2917
+ "type": "string",
2918
+ "in": "body"
2919
+ }, {
2920
+ "name": "name",
2921
+ "description": "Human-readable name, unique per project",
2922
+ "required": true,
2923
+ "type": "string",
2924
+ "in": "body"
2925
+ }, {
2926
+ "name": "description",
2927
+ "description": "",
2928
+ "required": false,
2929
+ "type": "string",
2930
+ "in": "body"
2931
+ }, {
2932
+ "name": "agent_id",
2933
+ "description": "A tool-less agent that answers",
2934
+ "required": false,
2935
+ "type": "string",
2936
+ "in": "body"
2937
+ }, {
2938
+ "name": "tool_id",
2939
+ "description": "An http or pipeline tool that answers",
2940
+ "required": false,
2941
+ "type": "string",
2942
+ "in": "body"
2943
+ }, {
2944
+ "name": "questions",
2945
+ "description": "Question id → question, 1 to 20 of them. A question id starts with a letter or underscore and holds only letters, digits and underscores (at most 64), since it keys the answer object.",
2946
+ "required": true,
2947
+ "type": "object",
2948
+ "in": "body"
2949
+ }, {
2950
+ "name": "version_label",
2951
+ "description": "Optional tag for version 1, e.g. `initial`",
2952
+ "required": false,
2953
+ "type": "string",
2954
+ "in": "body"
2955
+ }]
2956
+ },
2957
+ "get-decider": {
2958
+ serviceClass: "Deciders",
2959
+ operationId: "getDecider",
2960
+ description: "Returns a decider with its current question set and version.",
2961
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/deciders",
2962
+ httpMethod: "get",
2963
+ pathParams: ["decider_id"],
2964
+ queryParams: [],
2965
+ headerParams: [],
2966
+ cookieParams: [],
2967
+ flags: [{
2968
+ "name": "decider_id",
2969
+ "description": "The decider ID",
2970
+ "required": true,
2971
+ "type": "string",
2972
+ "in": "path"
2973
+ }]
2974
+ },
2975
+ "update-decider": {
2976
+ serviceClass: "Deciders",
2977
+ operationId: "updateDecider",
2978
+ description: "Updates any of `name`, `description`, the backend and `questions`. Naming `agent_id` or `tool_id` replaces the current backend; naming both is `400`. Only a change to `questions` archives a new version; a rename, a new backend or a rewrite of the questions the decider already holds leaves `version` where it is. A new backend is held to the same rules as on create.",
2979
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/deciders",
2980
+ httpMethod: "patch",
2981
+ pathParams: ["decider_id"],
2982
+ queryParams: [],
2983
+ headerParams: ["If-Match"],
2984
+ cookieParams: [],
2985
+ flags: [{
2986
+ "name": "decider_id",
2987
+ "description": "The decider ID",
2988
+ "required": true,
2989
+ "type": "string",
2990
+ "in": "path"
2991
+ }, {
2992
+ "name": "If-Match",
2993
+ "description": "The version the caller believes the resource holds, as an entity tag (`3` or `\"3\"`). Equivalent to `expected_version` in the request body; `*` states no precondition beyond the resource existing. A mismatch is `409 VERSION_CONFLICT`.",
2994
+ "required": false,
2995
+ "type": "string",
2996
+ "in": "header"
2997
+ }, {
2998
+ "name": "name",
2999
+ "description": "",
3000
+ "required": false,
3001
+ "type": "string",
3002
+ "in": "body"
3003
+ }, {
3004
+ "name": "description",
3005
+ "description": "",
3006
+ "required": false,
3007
+ "type": "string",
3008
+ "in": "body"
3009
+ }, {
3010
+ "name": "agent_id",
3011
+ "description": "Replaces the backend with this agent",
3012
+ "required": false,
3013
+ "type": "string",
3014
+ "in": "body"
3015
+ }, {
3016
+ "name": "tool_id",
3017
+ "description": "Replaces the backend with this tool",
3018
+ "required": false,
3019
+ "type": "string",
3020
+ "in": "body"
3021
+ }, {
3022
+ "name": "questions",
3023
+ "description": "Question id → question, 1 to 20 of them. A question id starts with a letter or underscore and holds only letters, digits and underscores (at most 64), since it keys the answer object.",
3024
+ "required": false,
3025
+ "type": "object",
3026
+ "in": "body"
3027
+ }, {
3028
+ "name": "version_label",
3029
+ "description": "Optional tag for the version this write archives. Ignored when the write changes no question, since no version is archived.",
3030
+ "required": false,
3031
+ "type": "string",
3032
+ "in": "body"
3033
+ }, {
3034
+ "name": "expected_version",
3035
+ "description": "Refuses the write unless the decider is at this version.",
3036
+ "required": false,
3037
+ "type": "integer",
3038
+ "in": "body"
3039
+ }]
3040
+ },
3041
+ "delete-decider": {
3042
+ serviceClass: "Deciders",
3043
+ operationId: "deleteDecider",
3044
+ description: "Deletes a decider and its version archive. Its decisions remain and keep naming the decider's ID.",
3045
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/deciders",
3046
+ httpMethod: "delete",
3047
+ pathParams: ["decider_id"],
3048
+ queryParams: [],
3049
+ headerParams: [],
3050
+ cookieParams: [],
3051
+ flags: [{
3052
+ "name": "decider_id",
3053
+ "description": "The decider ID",
3054
+ "required": true,
3055
+ "type": "string",
3056
+ "in": "path"
3057
+ }]
3058
+ },
3059
+ "list-decider-versions": {
3060
+ serviceClass: "Deciders",
3061
+ operationId: "listDeciderVersions",
3062
+ description: "Returns the decider's archived question sets, newest first. A version is written on create and on every write that changes `questions`.",
3063
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/deciders",
3064
+ httpMethod: "get",
3065
+ pathParams: ["decider_id"],
3066
+ queryParams: ["limit", "offset"],
3067
+ headerParams: [],
3068
+ cookieParams: [],
3069
+ flags: [{
3070
+ "name": "decider_id",
3071
+ "description": "The decider ID",
3072
+ "required": true,
3073
+ "type": "string",
3074
+ "in": "path"
3075
+ }, {
3076
+ "name": "limit",
3077
+ "description": "Maximum number of results to return",
3078
+ "required": false,
3079
+ "type": "integer",
3080
+ "in": "query"
3081
+ }, {
3082
+ "name": "offset",
3083
+ "description": "Number of results to skip",
3084
+ "required": false,
3085
+ "type": "integer",
3086
+ "in": "query"
3087
+ }]
3088
+ },
3089
+ "get-decider-version": {
3090
+ serviceClass: "Deciders",
3091
+ operationId: "getDeciderVersion",
3092
+ description: "Returns the question set a version held. A decision names the `decider_version` it was answered under, so this is how its criteria are read after the decider has changed.",
3093
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/deciders",
3094
+ httpMethod: "get",
3095
+ pathParams: ["decider_id", "version"],
3096
+ queryParams: [],
3097
+ headerParams: [],
3098
+ cookieParams: [],
3099
+ flags: [{
3100
+ "name": "decider_id",
3101
+ "description": "The decider ID",
3102
+ "required": true,
3103
+ "type": "string",
3104
+ "in": "path"
3105
+ }, {
3106
+ "name": "version",
3107
+ "description": "The archived version number",
3108
+ "required": true,
3109
+ "type": "integer",
3110
+ "in": "path"
3111
+ }]
3112
+ },
3113
+ "restore-decider-version": {
3114
+ serviceClass: "Deciders",
3115
+ operationId: "restoreDeciderVersion",
3116
+ description: "Writes an archived question set back as the decider's live one, which archives it again as a new version rather than rewinding the counter. Restoring the question set the decider already holds is a no-op.",
3117
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/deciders",
3118
+ httpMethod: "post",
3119
+ pathParams: ["decider_id", "version"],
3120
+ queryParams: [],
3121
+ headerParams: [],
3122
+ cookieParams: [],
3123
+ flags: [{
3124
+ "name": "decider_id",
3125
+ "description": "The decider ID",
3126
+ "required": true,
3127
+ "type": "string",
3128
+ "in": "path"
3129
+ }, {
3130
+ "name": "version",
3131
+ "description": "The archived version number",
3132
+ "required": true,
3133
+ "type": "integer",
3134
+ "in": "path"
3135
+ }, {
3136
+ "name": "label",
3137
+ "description": "Optional tag for the new version. Defaults to `restored from vN`.",
3138
+ "required": false,
3139
+ "type": "string",
3140
+ "in": "body"
3141
+ }]
3142
+ },
3143
+ "create-decision": {
3144
+ serviceClass: "Deciders",
3145
+ operationId: "createDecision",
3146
+ description: "Evaluates the decider against `state` and records the decision. The questions come from the decider, never from the request, so a call site can only supply what is judged. Everything that can refuse the request is checked before the decision is written, so a refusal is a `4xx` and never a polled failure: the agent's tool surface (`400 DECIDER_AGENT_NOT_TOOL_LESS`), a tool that cannot answer (`400 DECIDER_TOOL_NOT_CALLABLE`), a paused project (`409 PROJECT_PAUSED`) and, for an agent, quota admission (`429 QUOTA_EXCEEDED`). A tool backend is called with `{ state, questions }` and must answer `{ answers: { <question id>: { choice | score | value, probabilities? } } }`; an answer outside that contract fails the decision with `DECISION_ANSWER_INVALID`. With `wait: false`, the default, the answer is `201` with the decision `queued`; poll `GET /api/v1/decisions/{decision_id}` or subscribe to `decisions.completed` and `decisions.failed`. With `wait: true` it is `201` with the decision settled.",
3147
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/deciders",
3148
+ httpMethod: "post",
3149
+ pathParams: ["decider_id"],
3150
+ queryParams: [],
3151
+ headerParams: [],
3152
+ cookieParams: [],
3153
+ flags: [{
3154
+ "name": "decider_id",
3155
+ "description": "The decider ID",
3156
+ "required": true,
3157
+ "type": "string",
3158
+ "in": "path"
3159
+ }, {
3160
+ "name": "state",
3161
+ "description": "What is judged: any JSON value. A string reaches the agent verbatim; anything else is serialized as JSON. Not stored.",
3162
+ "required": true,
3163
+ "type": "unknown",
3164
+ "in": "body"
3165
+ }, {
3166
+ "name": "metadata",
3167
+ "description": "Caller-owned annotations stored on the decision and returned on every read — typically the id of what was judged, since the state itself is not stored. Written once, with the decision. A non-object is rejected with `400 VALIDATION_FAILED` and no decision is written.",
3168
+ "required": false,
3169
+ "type": "object",
3170
+ "in": "body"
3171
+ }, {
3172
+ "name": "wait",
3173
+ "description": "True evaluates before answering and returns the settled decision. False — the default — returns the `queued` decision at once.",
3174
+ "required": false,
3175
+ "type": "boolean",
3176
+ "in": "body"
3177
+ }]
3178
+ },
3179
+ "list-decisions": {
3180
+ serviceClass: "Deciders",
3181
+ operationId: "listDecisions",
3182
+ description: "Returns the decisions in a project, newest first.",
3183
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/deciders",
3184
+ httpMethod: "get",
3185
+ pathParams: [],
3186
+ queryParams: ["project_id", "decider_id", "status", "limit", "offset"],
3187
+ headerParams: [],
3188
+ cookieParams: [],
3189
+ flags: [{
3190
+ "name": "project_id",
3191
+ "description": "Project ID (required if not using project key auth)",
3192
+ "required": false,
3193
+ "type": "string",
3194
+ "in": "query"
3195
+ }, {
3196
+ "name": "decider_id",
3197
+ "description": "Only decisions requested from this decider",
3198
+ "required": false,
3199
+ "type": "string",
3200
+ "in": "query"
3201
+ }, {
3202
+ "name": "status",
3203
+ "description": "Only decisions in this status",
3204
+ "required": false,
3205
+ "type": "string",
3206
+ "in": "query"
3207
+ }, {
3208
+ "name": "limit",
3209
+ "description": "Maximum number of results to return",
3210
+ "required": false,
3211
+ "type": "integer",
3212
+ "in": "query"
3213
+ }, {
3214
+ "name": "offset",
3215
+ "description": "Number of results to skip",
3216
+ "required": false,
3217
+ "type": "integer",
3218
+ "in": "query"
3219
+ }]
3220
+ },
3221
+ "get-decision": {
3222
+ serviceClass: "Deciders",
3223
+ operationId: "getDecision",
3224
+ description: "Returns a decision. Poll it after a `wait: false` request until `status` is `completed` or `failed`.",
3225
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/deciders",
3226
+ httpMethod: "get",
3227
+ pathParams: ["decision_id"],
3228
+ queryParams: [],
3229
+ headerParams: [],
3230
+ cookieParams: [],
3231
+ flags: [{
3232
+ "name": "decision_id",
3233
+ "description": "The decision ID",
3234
+ "required": true,
3235
+ "type": "string",
3236
+ "in": "path"
3237
+ }]
3238
+ },
2873
3239
  "list-documents": {
2874
3240
  serviceClass: "Documents",
2875
3241
  operationId: "listDocuments",
@@ -7718,6 +8084,48 @@ var routes = {
7718
8084
  "in": "query"
7719
8085
  }]
7720
8086
  },
8087
+ "pause-project": {
8088
+ serviceClass: "Projects",
8089
+ operationId: "pauseProject",
8090
+ description: "Stops everything the project runs, with one call. From the moment it answers, nothing new starts in the project: agent, session and conversation generations, tool-output continuations, chat completions, direct tool calls, orchestration runs, eval runs and trigger firings are refused with `409 PROJECT_PAUSED`, and so is resuming a single run or task the pause holds. What is already in motion is parked rather than discarded: every live orchestration run is paused the way pause-orchestration-run pauses it (a running one parks at its next checkpoint), every open task's automation is paused, schedule triggers stop firing, and queued eval items wait unclaimed. A generation or node already in flight finishes. Reads and configuration writes keep working. Idempotent: pausing a paused project answers it unchanged and keeps the first `reason`. Emits `projects.paused`.",
8091
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/projects",
8092
+ httpMethod: "post",
8093
+ pathParams: ["project_id"],
8094
+ queryParams: [],
8095
+ headerParams: [],
8096
+ cookieParams: [],
8097
+ flags: [{
8098
+ "name": "project_id",
8099
+ "description": "Project public ID (proj_ prefix)",
8100
+ "required": true,
8101
+ "type": "string",
8102
+ "in": "path"
8103
+ }, {
8104
+ "name": "reason",
8105
+ "description": "Why the project is paused. Stored as `pause_reason` and carried onto every run and task the pause parks.",
8106
+ "required": false,
8107
+ "type": "string",
8108
+ "in": "body"
8109
+ }]
8110
+ },
8111
+ "resume-project": {
8112
+ serviceClass: "Projects",
8113
+ operationId: "resumeProject",
8114
+ description: "Lifts the project's pause and hands back exactly what it held: the runs and tasks the pause parked are resumed (a run the way resume-orchestration-run resumes it, in the background; a task's suppressed dispatch runs as the caller), and schedule triggers fire again from their next occurrence after now — an occurrence that fell due while paused is not fired late. A run or task an operator paused before the project was paused keeps its own pause. Eval runs continue from the item they stopped at. Emits `projects.resumed`.",
8115
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/projects",
8116
+ httpMethod: "post",
8117
+ pathParams: ["project_id"],
8118
+ queryParams: [],
8119
+ headerParams: [],
8120
+ cookieParams: [],
8121
+ flags: [{
8122
+ "name": "project_id",
8123
+ "description": "Project public ID (proj_ prefix)",
8124
+ "required": true,
8125
+ "type": "string",
8126
+ "in": "path"
8127
+ }]
8128
+ },
7721
8129
  "get-project-prices": {
7722
8130
  serviceClass: "Projects",
7723
8131
  operationId: "getProjectPrices",
@@ -9029,7 +9437,7 @@ var routes = {
9029
9437
  "delete-tool": {
9030
9438
  serviceClass: "Tools",
9031
9439
  operationId: "deleteTool",
9032
- description: "Deletes a tool by ID.",
9440
+ description: "Deletes a tool by ID. A tool that is a decider's backend is refused with `409 TOOL_HAS_DEPENDENTS`.",
9033
9441
  moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/tools",
9034
9442
  httpMethod: "delete",
9035
9443
  pathParams: ["tool_id"],
@@ -9632,7 +10040,7 @@ var routes = {
9632
10040
  "in": "query"
9633
10041
  }, {
9634
10042
  "name": "source",
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",
10043
+ "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`); `decider` is a decision's evaluation; `embedding` is any embedding call. Ordinary agent traffic carries no source and is matched by none of them.\n",
9636
10044
  "required": false,
9637
10045
  "type": "string",
9638
10046
  "in": "query"
@@ -9752,7 +10160,7 @@ var routes = {
9752
10160
  "in": "query"
9753
10161
  }, {
9754
10162
  "name": "source",
9755
- "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",
10163
+ "description": "Narrow by what the spend was incurred for — `eval` and `eval_judge` are verification spend, `decider` is decision spend. Ordinary traffic carries no source, so it cannot be selected by this filter; omit the filter for everything.\n",
9756
10164
  "required": false,
9757
10165
  "type": "string",
9758
10166
  "in": "query"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/cli",
3
- "version": "0.61.1",
3
+ "version": "0.63.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.61.1",
25
+ "@soat/sdk": "0.63.0",
26
26
  "@ttoss/logger": "^0.8.20",
27
27
  "commander": "^15.0.0",
28
28
  "js-yaml": "^5.4.2"