@soat/cli 0.15.9 → 0.15.10
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 +22 -6
- 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.15.
|
|
16
|
+
var version = "0.15.10";
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/cli-wrappers/wrappers/formations.ts
|
|
@@ -1253,16 +1253,22 @@ var routes = {
|
|
|
1253
1253
|
"delete-ai-provider": {
|
|
1254
1254
|
serviceClass: "AIProviders",
|
|
1255
1255
|
operationId: "deleteAiProvider",
|
|
1256
|
-
description: "Deletes an AI provider configuration",
|
|
1256
|
+
description: "Deletes an AI provider configuration. Live references — chats, agents, and discussions that use this provider — always block deletion with `409 AI_PROVIDER_HAS_DEPENDENTS`; `force` does not override them, so delete or repoint those resources first. Soft dependents — price overrides, usage/generation records, and discussion participants — also block with `409` unless `force=true`, which deletes the provider's price overrides and unlinks (nulls) its usage and participant history, preserving those rows. The `409` body's `error.meta` reports the counts, a sample of offending IDs, and a `forcible` flag that is `true` when a `force=true` retry would succeed.",
|
|
1257
1257
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/ai-providers",
|
|
1258
1258
|
pathParams: ["ai_provider_id"],
|
|
1259
|
-
queryParams: [],
|
|
1259
|
+
queryParams: ["force"],
|
|
1260
1260
|
flags: [{
|
|
1261
1261
|
"name": "ai_provider_id",
|
|
1262
1262
|
"description": "AI Provider ID",
|
|
1263
1263
|
"required": true,
|
|
1264
1264
|
"type": "string",
|
|
1265
1265
|
"in": "path"
|
|
1266
|
+
}, {
|
|
1267
|
+
"name": "force",
|
|
1268
|
+
"description": "When `true`, delete the provider's price overrides and unlink its usage/participant history so a provider with only soft dependents can be removed. Has no effect on live references (chats, agents, discussions), which always block deletion.\n",
|
|
1269
|
+
"required": false,
|
|
1270
|
+
"type": "boolean",
|
|
1271
|
+
"in": "query"
|
|
1266
1272
|
}]
|
|
1267
1273
|
},
|
|
1268
1274
|
"get-ai-provider-prices": {
|
|
@@ -4724,7 +4730,7 @@ var routes = {
|
|
|
4724
4730
|
"update-task": {
|
|
4725
4731
|
serviceClass: "Tasks",
|
|
4726
4732
|
operationId: "updateTask",
|
|
4727
|
-
description: "Updates a task's payload, title, or assignee. `state` is never directly writable — move it with a transition. `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`.",
|
|
4733
|
+
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`.",
|
|
4728
4734
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/tasks",
|
|
4729
4735
|
pathParams: ["task_id"],
|
|
4730
4736
|
queryParams: [],
|
|
@@ -4772,7 +4778,7 @@ var routes = {
|
|
|
4772
4778
|
"transition-task": {
|
|
4773
4779
|
serviceClass: "Tasks",
|
|
4774
4780
|
operationId: "transitionTask",
|
|
4775
|
-
description: "Fires a named transition on a task. The transition must exist in the workflow and be valid from the task's current state; its guard must pass. This is the single path every state change routes through.",
|
|
4781
|
+
description: "Fires a named transition on a task. The transition must exist in the workflow and be valid from the task's current state; its guard must pass. This is the single path every state change routes through. A transition declaring `requires_approval` does not move the task — it parks a pending ApprovalItem and returns the task with `pending_transition` set; the move applies only when the approval is approved.",
|
|
4776
4782
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/tasks",
|
|
4777
4783
|
pathParams: ["task_id"],
|
|
4778
4784
|
queryParams: [],
|
|
@@ -6115,6 +6121,16 @@ var toCanonical = s => {
|
|
|
6115
6121
|
var kebabToSnake = s => {
|
|
6116
6122
|
return s.replace(/-/g, "_");
|
|
6117
6123
|
};
|
|
6124
|
+
/**
|
|
6125
|
+
* Convert snake_case or camelCase to kebab-case for flag *display* in --help
|
|
6126
|
+
* (e.g. project_id → project-id). Kebab-case is the documented canonical CLI
|
|
6127
|
+
* flag convention (see the generated docs pages and tutorials); the parser is
|
|
6128
|
+
* lenient and accepts snake/kebab/camel alike via `toCanonical`, so this only
|
|
6129
|
+
* affects how flags are printed (#610).
|
|
6130
|
+
*/
|
|
6131
|
+
var toKebab = s => {
|
|
6132
|
+
return s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/_/g, "-").toLowerCase();
|
|
6133
|
+
};
|
|
6118
6134
|
var parseFlagValue = value => {
|
|
6119
6135
|
const trimmed = value.trim();
|
|
6120
6136
|
if (trimmed.startsWith("{") || trimmed.startsWith("[") || trimmed === "true" || trimmed === "false" || trimmed === "null" || /^-?\d+(\.\d+)?$/.test(trimmed)) try {
|
|
@@ -6305,7 +6321,7 @@ program.argument("[command]", "API command in kebab-case (e.g. list-actors)").ar
|
|
|
6305
6321
|
for (const f of allFlags) {
|
|
6306
6322
|
const req = f.required ? " [required]" : "";
|
|
6307
6323
|
const desc = f.description ? ` ${f.description}` : "";
|
|
6308
|
-
console.log(` --${f.name} <${f.type}>${req}${desc}`);
|
|
6324
|
+
console.log(` --${toKebab(f.name)} <${f.type}>${req}${desc}`);
|
|
6309
6325
|
}
|
|
6310
6326
|
}
|
|
6311
6327
|
process.exit(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soat/cli",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.10",
|
|
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.15.
|
|
11
|
+
"@soat/sdk": "0.15.10"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@ttoss/config": "^1.37.17",
|