@soat/cli 0.19.2 → 0.20.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 +252 -4
- 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.
|
|
16
|
+
var version = "0.20.0";
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/cli-wrappers/wrappers/formations.ts
|
|
@@ -3970,7 +3970,7 @@ var routes = {
|
|
|
3970
3970
|
"create-guardrail": {
|
|
3971
3971
|
serviceClass: "Guardrails",
|
|
3972
3972
|
operationId: "createGuardrail",
|
|
3973
|
-
description: "Creates a new guardrail in the project. The `document` is validated on write: `class` must be a literal (A/B/C/D) or a JSON Logic expression, and every variable it (and `guard`) reference must resolve to the `args.*` / `context.*` / `soat.*` namespaces — an out-of-catalog `soat.*` key is rejected with 400.",
|
|
3973
|
+
description: "Creates a new guardrail in the project, archiving its document as version 1. The `document` is validated on write: `class` must be a literal (A/B/C/D) or a JSON Logic expression, and every variable it (and `guard`) reference must resolve to the `args.*` / `context.*` / `soat.*` namespaces — an out-of-catalog `soat.*` key is rejected with 400.",
|
|
3974
3974
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/guardrails",
|
|
3975
3975
|
httpMethod: "post",
|
|
3976
3976
|
pathParams: [],
|
|
@@ -4011,6 +4011,12 @@ var routes = {
|
|
|
4011
4011
|
"required": false,
|
|
4012
4012
|
"type": "string",
|
|
4013
4013
|
"in": "body"
|
|
4014
|
+
}, {
|
|
4015
|
+
"name": "version_label",
|
|
4016
|
+
"description": "Optional tag for the config version this write archives (e.g. `initial`). Annotates the version only — it is not stored on the guardrail and is not part of the config, so labelling a change is never itself a change.",
|
|
4017
|
+
"required": false,
|
|
4018
|
+
"type": "string",
|
|
4019
|
+
"in": "body"
|
|
4014
4020
|
}]
|
|
4015
4021
|
},
|
|
4016
4022
|
"get-guardrail": {
|
|
@@ -4032,7 +4038,7 @@ var routes = {
|
|
|
4032
4038
|
"update-guardrail": {
|
|
4033
4039
|
serviceClass: "Guardrails",
|
|
4034
4040
|
operationId: "updateGuardrail",
|
|
4035
|
-
description: "Updates an existing guardrail. A `document` write increments `version` and archives the
|
|
4041
|
+
description: "Updates an existing guardrail. A `document` write that actually changes the policy increments `version` and archives the new document as a GuardrailVersion; metadata-only edits (name / description / context), and re-writing the document the guardrail already holds, leave the version untouched.",
|
|
4036
4042
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/guardrails",
|
|
4037
4043
|
httpMethod: "patch",
|
|
4038
4044
|
pathParams: ["guardrail_id"],
|
|
@@ -4073,6 +4079,12 @@ var routes = {
|
|
|
4073
4079
|
"required": false,
|
|
4074
4080
|
"type": "string",
|
|
4075
4081
|
"in": "body"
|
|
4082
|
+
}, {
|
|
4083
|
+
"name": "version_label",
|
|
4084
|
+
"description": "Optional tag for the config version this write archives (e.g. `pre-tightening`). Annotates the version only — it is not stored on the guardrail and is not part of the config, so labelling a change is never itself a change. Ignored when the write changes no policy, since no version is created.",
|
|
4085
|
+
"required": false,
|
|
4086
|
+
"type": "string",
|
|
4087
|
+
"in": "body"
|
|
4076
4088
|
}]
|
|
4077
4089
|
},
|
|
4078
4090
|
"delete-guardrail": {
|
|
@@ -4091,10 +4103,38 @@ var routes = {
|
|
|
4091
4103
|
"in": "path"
|
|
4092
4104
|
}]
|
|
4093
4105
|
},
|
|
4106
|
+
"list-guardrail-versions": {
|
|
4107
|
+
serviceClass: "Guardrails",
|
|
4108
|
+
operationId: "listGuardrailVersions",
|
|
4109
|
+
description: "Returns the guardrail's archived configurations, newest first. A version is written on create and on every subsequent write that changes the policy `document` — through the REST API or a formation apply alike. Metadata-only edits (name, description, context binding) do not archive a version. See [Versioning](/docs/modules/guardrails#versioning).",
|
|
4110
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/guardrails",
|
|
4111
|
+
httpMethod: "get",
|
|
4112
|
+
pathParams: ["guardrail_id"],
|
|
4113
|
+
queryParams: ["limit", "offset"],
|
|
4114
|
+
flags: [{
|
|
4115
|
+
"name": "guardrail_id",
|
|
4116
|
+
"description": "",
|
|
4117
|
+
"required": true,
|
|
4118
|
+
"type": "string",
|
|
4119
|
+
"in": "path"
|
|
4120
|
+
}, {
|
|
4121
|
+
"name": "limit",
|
|
4122
|
+
"description": "Maximum number of results to return",
|
|
4123
|
+
"required": false,
|
|
4124
|
+
"type": "integer",
|
|
4125
|
+
"in": "query"
|
|
4126
|
+
}, {
|
|
4127
|
+
"name": "offset",
|
|
4128
|
+
"description": "Number of results to skip",
|
|
4129
|
+
"required": false,
|
|
4130
|
+
"type": "integer",
|
|
4131
|
+
"in": "query"
|
|
4132
|
+
}]
|
|
4133
|
+
},
|
|
4094
4134
|
"get-guardrail-version": {
|
|
4095
4135
|
serviceClass: "Guardrails",
|
|
4096
4136
|
operationId: "getGuardrailVersion",
|
|
4097
|
-
description: "Returns the exact `document` that governed at a given version. Approval items, activity entries, and exceptions record the version that governed them, so the audit chain survives edits.",
|
|
4137
|
+
description: "Returns the exact configuration — and so the exact `document` — that governed at a given version. Approval items, activity entries, and exceptions record the version that governed them, so the audit chain survives edits.",
|
|
4098
4138
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/guardrails",
|
|
4099
4139
|
httpMethod: "get",
|
|
4100
4140
|
pathParams: ["guardrail_id", "version"],
|
|
@@ -4113,6 +4153,34 @@ var routes = {
|
|
|
4113
4153
|
"in": "path"
|
|
4114
4154
|
}]
|
|
4115
4155
|
},
|
|
4156
|
+
"restore-guardrail-version": {
|
|
4157
|
+
serviceClass: "Guardrails",
|
|
4158
|
+
operationId: "restoreGuardrailVersion",
|
|
4159
|
+
description: "Writes an archived version's `document` back as the guardrail's live policy, which archives it again as a **new** version rather than rewinding the counter — so an approval item or exception citing any version in between still resolves. The restore runs through the ordinary update path, so the archived document is re-validated; restoring the policy the guardrail already holds is a no-op and archives nothing.",
|
|
4160
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/guardrails",
|
|
4161
|
+
httpMethod: "post",
|
|
4162
|
+
pathParams: ["guardrail_id", "version"],
|
|
4163
|
+
queryParams: [],
|
|
4164
|
+
flags: [{
|
|
4165
|
+
"name": "guardrail_id",
|
|
4166
|
+
"description": "",
|
|
4167
|
+
"required": true,
|
|
4168
|
+
"type": "string",
|
|
4169
|
+
"in": "path"
|
|
4170
|
+
}, {
|
|
4171
|
+
"name": "version",
|
|
4172
|
+
"description": "",
|
|
4173
|
+
"required": true,
|
|
4174
|
+
"type": "integer",
|
|
4175
|
+
"in": "path"
|
|
4176
|
+
}, {
|
|
4177
|
+
"name": "label",
|
|
4178
|
+
"description": "Optional tag for the version the restore creates. Defaults to `restored from v<version>`.",
|
|
4179
|
+
"required": false,
|
|
4180
|
+
"type": "string",
|
|
4181
|
+
"in": "body"
|
|
4182
|
+
}]
|
|
4183
|
+
},
|
|
4116
4184
|
"evaluate-guardrail": {
|
|
4117
4185
|
serviceClass: "Guardrails",
|
|
4118
4186
|
operationId: "evaluateGuardrail",
|
|
@@ -4939,6 +5007,12 @@ var routes = {
|
|
|
4939
5007
|
"required": false,
|
|
4940
5008
|
"type": "object",
|
|
4941
5009
|
"in": "body"
|
|
5010
|
+
}, {
|
|
5011
|
+
"name": "version_label",
|
|
5012
|
+
"description": "Optional tag for the version this create archives, e.g. `initial`.",
|
|
5013
|
+
"required": false,
|
|
5014
|
+
"type": "string",
|
|
5015
|
+
"in": "body"
|
|
4942
5016
|
}]
|
|
4943
5017
|
},
|
|
4944
5018
|
"validate-orchestration": {
|
|
@@ -5045,6 +5119,12 @@ var routes = {
|
|
|
5045
5119
|
"required": false,
|
|
5046
5120
|
"type": "object",
|
|
5047
5121
|
"in": "body"
|
|
5122
|
+
}, {
|
|
5123
|
+
"name": "version_label",
|
|
5124
|
+
"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.",
|
|
5125
|
+
"required": false,
|
|
5126
|
+
"type": "string",
|
|
5127
|
+
"in": "body"
|
|
5048
5128
|
}]
|
|
5049
5129
|
},
|
|
5050
5130
|
"delete-orchestration": {
|
|
@@ -5063,6 +5143,84 @@ var routes = {
|
|
|
5063
5143
|
"in": "path"
|
|
5064
5144
|
}]
|
|
5065
5145
|
},
|
|
5146
|
+
"list-orchestration-versions": {
|
|
5147
|
+
serviceClass: "Orchestrations",
|
|
5148
|
+
operationId: "listOrchestrationVersions",
|
|
5149
|
+
description: "Returns the orchestration's archived graphs, newest first. A version is written on create and on every subsequent write that changes the graph (`nodes`, `edges`, `state_schema`, `input_schema`) — through the REST API or a formation apply alike. Metadata-only edits (name, description) do not archive a version. See [Versioning](/docs/modules/orchestrations#versioning).",
|
|
5150
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/orchestrations",
|
|
5151
|
+
httpMethod: "get",
|
|
5152
|
+
pathParams: ["orchestration_id"],
|
|
5153
|
+
queryParams: ["limit", "offset"],
|
|
5154
|
+
flags: [{
|
|
5155
|
+
"name": "orchestration_id",
|
|
5156
|
+
"description": "Public ID of the orchestration (orch_...)",
|
|
5157
|
+
"required": true,
|
|
5158
|
+
"type": "string",
|
|
5159
|
+
"in": "path"
|
|
5160
|
+
}, {
|
|
5161
|
+
"name": "limit",
|
|
5162
|
+
"description": "Maximum number of results to return",
|
|
5163
|
+
"required": false,
|
|
5164
|
+
"type": "integer",
|
|
5165
|
+
"in": "query"
|
|
5166
|
+
}, {
|
|
5167
|
+
"name": "offset",
|
|
5168
|
+
"description": "Number of results to skip",
|
|
5169
|
+
"required": false,
|
|
5170
|
+
"type": "integer",
|
|
5171
|
+
"in": "query"
|
|
5172
|
+
}]
|
|
5173
|
+
},
|
|
5174
|
+
"get-orchestration-version": {
|
|
5175
|
+
serviceClass: "Orchestrations",
|
|
5176
|
+
operationId: "getOrchestrationVersion",
|
|
5177
|
+
description: "Returns the exact graph a given version describes. Every run records the version it started on in `orchestration_version` and executes that graph for its whole life, so this is how you read the topology a run actually took — including a run whose orchestration has been rewired since.",
|
|
5178
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/orchestrations",
|
|
5179
|
+
httpMethod: "get",
|
|
5180
|
+
pathParams: ["orchestration_id", "version"],
|
|
5181
|
+
queryParams: [],
|
|
5182
|
+
flags: [{
|
|
5183
|
+
"name": "orchestration_id",
|
|
5184
|
+
"description": "Public ID of the orchestration (orch_...)",
|
|
5185
|
+
"required": true,
|
|
5186
|
+
"type": "string",
|
|
5187
|
+
"in": "path"
|
|
5188
|
+
}, {
|
|
5189
|
+
"name": "version",
|
|
5190
|
+
"description": "The archived version number",
|
|
5191
|
+
"required": true,
|
|
5192
|
+
"type": "integer",
|
|
5193
|
+
"in": "path"
|
|
5194
|
+
}]
|
|
5195
|
+
},
|
|
5196
|
+
"restore-orchestration-version": {
|
|
5197
|
+
serviceClass: "Orchestrations",
|
|
5198
|
+
operationId: "restoreOrchestrationVersion",
|
|
5199
|
+
description: "Writes an archived version's graph back as the orchestration's live definition, which archives it again as a **new** version rather than rewinding the counter — so a run pinned to any version in between still resolves the graph it started on. The restore runs through the ordinary update path, so the archived graph goes through the same static validation as an authored one. Node resource references (`agent_id`, `tool_id`, `orchestration_id`) resolve when a run reaches the node, so a target deleted since the snapshot was taken restores cleanly and surfaces as a failed run rather than a `400`. Restoring the graph the orchestration already holds is a no-op and archives nothing. Runs already in flight are unaffected either way — a restore is an ordinary edit, and pinning is what keeps it from reaching them.",
|
|
5200
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/orchestrations",
|
|
5201
|
+
httpMethod: "post",
|
|
5202
|
+
pathParams: ["orchestration_id", "version"],
|
|
5203
|
+
queryParams: [],
|
|
5204
|
+
flags: [{
|
|
5205
|
+
"name": "orchestration_id",
|
|
5206
|
+
"description": "Public ID of the orchestration (orch_...)",
|
|
5207
|
+
"required": true,
|
|
5208
|
+
"type": "string",
|
|
5209
|
+
"in": "path"
|
|
5210
|
+
}, {
|
|
5211
|
+
"name": "version",
|
|
5212
|
+
"description": "The archived version number",
|
|
5213
|
+
"required": true,
|
|
5214
|
+
"type": "integer",
|
|
5215
|
+
"in": "path"
|
|
5216
|
+
}, {
|
|
5217
|
+
"name": "label",
|
|
5218
|
+
"description": "Optional tag for the version the restore creates. Defaults to `restored from v<version>`.",
|
|
5219
|
+
"required": false,
|
|
5220
|
+
"type": "string",
|
|
5221
|
+
"in": "body"
|
|
5222
|
+
}]
|
|
5223
|
+
},
|
|
5066
5224
|
"list-orchestration-runs": {
|
|
5067
5225
|
serviceClass: "Orchestrations",
|
|
5068
5226
|
operationId: "listOrchestrationRuns",
|
|
@@ -7635,6 +7793,12 @@ var routes = {
|
|
|
7635
7793
|
"required": false,
|
|
7636
7794
|
"type": "object",
|
|
7637
7795
|
"in": "body"
|
|
7796
|
+
}, {
|
|
7797
|
+
"name": "version_label",
|
|
7798
|
+
"description": "Optional tag for the version this create archives, e.g. `initial`.",
|
|
7799
|
+
"required": false,
|
|
7800
|
+
"type": "string",
|
|
7801
|
+
"in": "body"
|
|
7638
7802
|
}]
|
|
7639
7803
|
},
|
|
7640
7804
|
"get-workflow": {
|
|
@@ -7697,6 +7861,12 @@ var routes = {
|
|
|
7697
7861
|
"required": false,
|
|
7698
7862
|
"type": "object",
|
|
7699
7863
|
"in": "body"
|
|
7864
|
+
}, {
|
|
7865
|
+
"name": "version_label",
|
|
7866
|
+
"description": "Optional tag for the version this write archives, e.g. `pre-rewire`. Ignored when the write changes no definition field, since no version is archived.",
|
|
7867
|
+
"required": false,
|
|
7868
|
+
"type": "string",
|
|
7869
|
+
"in": "body"
|
|
7700
7870
|
}]
|
|
7701
7871
|
},
|
|
7702
7872
|
"delete-workflow": {
|
|
@@ -7714,6 +7884,84 @@ var routes = {
|
|
|
7714
7884
|
"type": "string",
|
|
7715
7885
|
"in": "path"
|
|
7716
7886
|
}]
|
|
7887
|
+
},
|
|
7888
|
+
"list-workflow-versions": {
|
|
7889
|
+
serviceClass: "Workflows",
|
|
7890
|
+
operationId: "listWorkflowVersions",
|
|
7891
|
+
description: "Returns the workflow's archived state machines, newest first. A version is written on create and on every subsequent write that changes the definition (`states`, `transitions`, `payload_schema`) — through the REST API or a formation apply alike. Metadata-only edits (name, description) do not archive a version. See [Versioning](/docs/modules/workflows#versioning).",
|
|
7892
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/workflows",
|
|
7893
|
+
httpMethod: "get",
|
|
7894
|
+
pathParams: ["workflow_id"],
|
|
7895
|
+
queryParams: ["limit", "offset"],
|
|
7896
|
+
flags: [{
|
|
7897
|
+
"name": "workflow_id",
|
|
7898
|
+
"description": "",
|
|
7899
|
+
"required": true,
|
|
7900
|
+
"type": "string",
|
|
7901
|
+
"in": "path"
|
|
7902
|
+
}, {
|
|
7903
|
+
"name": "limit",
|
|
7904
|
+
"description": "Maximum number of results to return",
|
|
7905
|
+
"required": false,
|
|
7906
|
+
"type": "integer",
|
|
7907
|
+
"in": "query"
|
|
7908
|
+
}, {
|
|
7909
|
+
"name": "offset",
|
|
7910
|
+
"description": "Number of results to skip",
|
|
7911
|
+
"required": false,
|
|
7912
|
+
"type": "integer",
|
|
7913
|
+
"in": "query"
|
|
7914
|
+
}]
|
|
7915
|
+
},
|
|
7916
|
+
"get-workflow-version": {
|
|
7917
|
+
serviceClass: "Workflows",
|
|
7918
|
+
operationId: "getWorkflowVersion",
|
|
7919
|
+
description: "Returns the exact state machine a given version describes. Every task records the version it entered on in `workflow_version` and runs on that machine for its whole life, so this is how you read the definition a task is actually being validated against — including a task whose workflow has been rewired since.",
|
|
7920
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/workflows",
|
|
7921
|
+
httpMethod: "get",
|
|
7922
|
+
pathParams: ["workflow_id", "version"],
|
|
7923
|
+
queryParams: [],
|
|
7924
|
+
flags: [{
|
|
7925
|
+
"name": "workflow_id",
|
|
7926
|
+
"description": "",
|
|
7927
|
+
"required": true,
|
|
7928
|
+
"type": "string",
|
|
7929
|
+
"in": "path"
|
|
7930
|
+
}, {
|
|
7931
|
+
"name": "version",
|
|
7932
|
+
"description": "The archived version number",
|
|
7933
|
+
"required": true,
|
|
7934
|
+
"type": "integer",
|
|
7935
|
+
"in": "path"
|
|
7936
|
+
}]
|
|
7937
|
+
},
|
|
7938
|
+
"restore-workflow-version": {
|
|
7939
|
+
serviceClass: "Workflows",
|
|
7940
|
+
operationId: "restoreWorkflowVersion",
|
|
7941
|
+
description: "Writes an archived version's state machine back as the workflow's live definition, which archives it again as a **new** version rather than rewinding the counter — so a task pinned to any version in between still runs on the machine it entered on. The restore runs through the ordinary update path, so the archived definition goes through the same validation as an authored one. That includes resolving every `on_enter` dispatch target, so restoring a version whose agent or orchestration has since been deleted fails with `400` rather than writing a definition that would strand a task on entry. Restoring the definition the workflow already holds is a no-op and archives nothing. Tasks already in flight are unaffected either way — a restore is an ordinary edit, and pinning is what keeps it from reaching them.",
|
|
7942
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/workflows",
|
|
7943
|
+
httpMethod: "post",
|
|
7944
|
+
pathParams: ["workflow_id", "version"],
|
|
7945
|
+
queryParams: [],
|
|
7946
|
+
flags: [{
|
|
7947
|
+
"name": "workflow_id",
|
|
7948
|
+
"description": "",
|
|
7949
|
+
"required": true,
|
|
7950
|
+
"type": "string",
|
|
7951
|
+
"in": "path"
|
|
7952
|
+
}, {
|
|
7953
|
+
"name": "version",
|
|
7954
|
+
"description": "The archived version number",
|
|
7955
|
+
"required": true,
|
|
7956
|
+
"type": "integer",
|
|
7957
|
+
"in": "path"
|
|
7958
|
+
}, {
|
|
7959
|
+
"name": "label",
|
|
7960
|
+
"description": "Optional tag for the new version the restore archives. Defaults to `restored from vN`.",
|
|
7961
|
+
"required": false,
|
|
7962
|
+
"type": "string",
|
|
7963
|
+
"in": "body"
|
|
7964
|
+
}]
|
|
7717
7965
|
}
|
|
7718
7966
|
};
|
|
7719
7967
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soat/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
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.
|
|
11
|
+
"@soat/sdk": "0.20.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@ttoss/config": "^1.37.17",
|