@soat/cli 0.17.4 → 0.18.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 +187 -11
- 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.18.0";
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/cli-wrappers/wrappers/formations.ts
|
|
@@ -670,8 +670,14 @@ var routes = {
|
|
|
670
670
|
"in": "body"
|
|
671
671
|
}, {
|
|
672
672
|
"name": "ai_provider_id",
|
|
673
|
-
"description": "Public ID of the AI provider",
|
|
674
|
-
"required":
|
|
673
|
+
"description": "Public ID of the AI provider to pin. Mutually exclusive with `model_route_id`.",
|
|
674
|
+
"required": false,
|
|
675
|
+
"type": "string",
|
|
676
|
+
"in": "body"
|
|
677
|
+
}, {
|
|
678
|
+
"name": "model_route_id",
|
|
679
|
+
"description": "Public ID of a model route in the same project. The agent's completion model is then resolved through the route's ordered targets with failover. Mutually exclusive with `ai_provider_id` and `model`.",
|
|
680
|
+
"required": false,
|
|
675
681
|
"type": "string",
|
|
676
682
|
"in": "body"
|
|
677
683
|
}, {
|
|
@@ -820,6 +826,12 @@ var routes = {
|
|
|
820
826
|
"required": false,
|
|
821
827
|
"type": "string",
|
|
822
828
|
"in": "body"
|
|
829
|
+
}, {
|
|
830
|
+
"name": "model_route_id",
|
|
831
|
+
"description": "Model route in the same project. Mutually exclusive with `ai_provider_id` and `model`; set to null to clear.",
|
|
832
|
+
"required": false,
|
|
833
|
+
"type": "string",
|
|
834
|
+
"in": "body"
|
|
823
835
|
}, {
|
|
824
836
|
"name": "name",
|
|
825
837
|
"description": "",
|
|
@@ -950,6 +962,12 @@ var routes = {
|
|
|
950
962
|
"required": false,
|
|
951
963
|
"type": "string",
|
|
952
964
|
"in": "body"
|
|
965
|
+
}, {
|
|
966
|
+
"name": "model_route_id",
|
|
967
|
+
"description": "Model route in the same project. Mutually exclusive with `ai_provider_id` and `model`; set to null to clear.",
|
|
968
|
+
"required": false,
|
|
969
|
+
"type": "string",
|
|
970
|
+
"in": "body"
|
|
953
971
|
}, {
|
|
954
972
|
"name": "name",
|
|
955
973
|
"description": "",
|
|
@@ -1349,7 +1367,7 @@ var routes = {
|
|
|
1349
1367
|
"delete-ai-provider": {
|
|
1350
1368
|
serviceClass: "AIProviders",
|
|
1351
1369
|
operationId: "deleteAiProvider",
|
|
1352
|
-
description: "Deletes an AI provider configuration. Live references — chats, agents, and
|
|
1370
|
+
description: "Deletes an AI provider configuration. Live references — chats, agents, discussions, and model routes whose targets name 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.",
|
|
1353
1371
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/ai-providers",
|
|
1354
1372
|
httpMethod: "delete",
|
|
1355
1373
|
pathParams: ["ai_provider_id"],
|
|
@@ -1362,7 +1380,7 @@ var routes = {
|
|
|
1362
1380
|
"in": "path"
|
|
1363
1381
|
}, {
|
|
1364
1382
|
"name": "force",
|
|
1365
|
-
"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",
|
|
1383
|
+
"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, model routes), which always block deletion.\n",
|
|
1366
1384
|
"required": false,
|
|
1367
1385
|
"type": "boolean",
|
|
1368
1386
|
"in": "query"
|
|
@@ -1838,8 +1856,8 @@ var routes = {
|
|
|
1838
1856
|
queryParams: [],
|
|
1839
1857
|
flags: [{
|
|
1840
1858
|
"name": "ai_provider_id",
|
|
1841
|
-
"description": "Public ID of the AI provider",
|
|
1842
|
-
"required":
|
|
1859
|
+
"description": "Public ID of the AI provider to pin. Optional: omit it to inherit the project's `default_model_route_id`, which gives the chat provider failover. Omitting it returns `400` when the project has no default, and cannot be combined with `model` — each route target names its own.",
|
|
1860
|
+
"required": false,
|
|
1843
1861
|
"type": "string",
|
|
1844
1862
|
"in": "body"
|
|
1845
1863
|
}, {
|
|
@@ -2336,8 +2354,8 @@ var routes = {
|
|
|
2336
2354
|
"in": "body"
|
|
2337
2355
|
}, {
|
|
2338
2356
|
"name": "ai_provider_id",
|
|
2339
|
-
"description": "Default AI provider participants and synthesis fall back to.",
|
|
2340
|
-
"required":
|
|
2357
|
+
"description": "Default AI provider participants and synthesis fall back to. Optional: omit it to inherit the project's `default_model_route_id`, which gives every turn provider failover. Omitting it returns `400` when the project has no default.",
|
|
2358
|
+
"required": false,
|
|
2341
2359
|
"type": "string",
|
|
2342
2360
|
"in": "body"
|
|
2343
2361
|
}, {
|
|
@@ -2432,7 +2450,7 @@ var routes = {
|
|
|
2432
2450
|
"in": "body"
|
|
2433
2451
|
}, {
|
|
2434
2452
|
"name": "ai_provider_id",
|
|
2435
|
-
"description": "",
|
|
2453
|
+
"description": "Repins the default AI provider. An explicit `null` unpins the discussion onto the project's `default_model_route_id`, and returns `400` when the project has no default.",
|
|
2436
2454
|
"required": false,
|
|
2437
2455
|
"type": "string",
|
|
2438
2456
|
"in": "body"
|
|
@@ -4450,6 +4468,158 @@ var routes = {
|
|
|
4450
4468
|
"in": "path"
|
|
4451
4469
|
}]
|
|
4452
4470
|
},
|
|
4471
|
+
"list-model-routes": {
|
|
4472
|
+
serviceClass: "ModelRoutes",
|
|
4473
|
+
operationId: "listModelRoutes",
|
|
4474
|
+
description: "Returns the model routes defined in a project",
|
|
4475
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/model-routes",
|
|
4476
|
+
httpMethod: "get",
|
|
4477
|
+
pathParams: [],
|
|
4478
|
+
queryParams: ["project_id", "limit", "offset"],
|
|
4479
|
+
flags: [{
|
|
4480
|
+
"name": "project_id",
|
|
4481
|
+
"description": "Project ID (required if not using project key auth)",
|
|
4482
|
+
"required": false,
|
|
4483
|
+
"type": "string",
|
|
4484
|
+
"in": "query"
|
|
4485
|
+
}, {
|
|
4486
|
+
"name": "limit",
|
|
4487
|
+
"description": "Maximum number of results to return",
|
|
4488
|
+
"required": false,
|
|
4489
|
+
"type": "integer",
|
|
4490
|
+
"in": "query"
|
|
4491
|
+
}, {
|
|
4492
|
+
"name": "offset",
|
|
4493
|
+
"description": "Number of results to skip",
|
|
4494
|
+
"required": false,
|
|
4495
|
+
"type": "integer",
|
|
4496
|
+
"in": "query"
|
|
4497
|
+
}]
|
|
4498
|
+
},
|
|
4499
|
+
"create-model-route": {
|
|
4500
|
+
serviceClass: "ModelRoutes",
|
|
4501
|
+
operationId: "createModelRoute",
|
|
4502
|
+
description: "Creates a project-scoped model route: a named, ordered list of provider+model targets tried in array order. Every target must reference an AI provider in the same project (400 otherwise), and the total attempt budget — the sum of `1 + max_retries` over all targets — may not exceed 10 (400 naming the computed total). A duplicate `name` in the project is rejected with 409.",
|
|
4503
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/model-routes",
|
|
4504
|
+
httpMethod: "post",
|
|
4505
|
+
pathParams: [],
|
|
4506
|
+
queryParams: [],
|
|
4507
|
+
flags: [{
|
|
4508
|
+
"name": "project_id",
|
|
4509
|
+
"description": "Project ID (required if not using project key auth)",
|
|
4510
|
+
"required": false,
|
|
4511
|
+
"type": "string",
|
|
4512
|
+
"in": "body"
|
|
4513
|
+
}, {
|
|
4514
|
+
"name": "name",
|
|
4515
|
+
"description": "Human-readable name, unique per project",
|
|
4516
|
+
"required": true,
|
|
4517
|
+
"type": "string",
|
|
4518
|
+
"in": "body"
|
|
4519
|
+
}, {
|
|
4520
|
+
"name": "targets",
|
|
4521
|
+
"description": "Ordered failover targets. Position is priority: target 0 is tried first, and a retryable failure falls through to the next target.",
|
|
4522
|
+
"required": true,
|
|
4523
|
+
"type": "array",
|
|
4524
|
+
"in": "body"
|
|
4525
|
+
}, {
|
|
4526
|
+
"name": "retry_on",
|
|
4527
|
+
"description": "Which failure classes are failover-eligible. A failure whose class is not listed (and every deterministic failure — 400-class, auth, content policy) fails the generation immediately instead of spending another target's budget.",
|
|
4528
|
+
"required": false,
|
|
4529
|
+
"type": "array",
|
|
4530
|
+
"in": "body"
|
|
4531
|
+
}, {
|
|
4532
|
+
"name": "failure_threshold",
|
|
4533
|
+
"description": "Consecutive retryable failures after which a target is skipped for `cooldown_seconds`. Breaker state is in-process per node and keyed by (provider, model), so it is shared by every route pointing at the same backend.",
|
|
4534
|
+
"required": false,
|
|
4535
|
+
"type": "integer",
|
|
4536
|
+
"in": "body"
|
|
4537
|
+
}, {
|
|
4538
|
+
"name": "cooldown_seconds",
|
|
4539
|
+
"description": "How long a tripped target is skipped before being probed again",
|
|
4540
|
+
"required": false,
|
|
4541
|
+
"type": "integer",
|
|
4542
|
+
"in": "body"
|
|
4543
|
+
}]
|
|
4544
|
+
},
|
|
4545
|
+
"get-model-route": {
|
|
4546
|
+
serviceClass: "ModelRoutes",
|
|
4547
|
+
operationId: "getModelRoute",
|
|
4548
|
+
description: "Returns a specific model route",
|
|
4549
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/model-routes",
|
|
4550
|
+
httpMethod: "get",
|
|
4551
|
+
pathParams: ["route_id"],
|
|
4552
|
+
queryParams: [],
|
|
4553
|
+
flags: [{
|
|
4554
|
+
"name": "route_id",
|
|
4555
|
+
"description": "Model route ID",
|
|
4556
|
+
"required": true,
|
|
4557
|
+
"type": "string",
|
|
4558
|
+
"in": "path"
|
|
4559
|
+
}]
|
|
4560
|
+
},
|
|
4561
|
+
"update-model-route": {
|
|
4562
|
+
serviceClass: "ModelRoutes",
|
|
4563
|
+
operationId: "updateModelRoute",
|
|
4564
|
+
description: "Updates a model route's name, targets, retry classes, or breaker configuration. Omitted fields are left unchanged.",
|
|
4565
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/model-routes",
|
|
4566
|
+
httpMethod: "put",
|
|
4567
|
+
pathParams: ["route_id"],
|
|
4568
|
+
queryParams: [],
|
|
4569
|
+
flags: [{
|
|
4570
|
+
"name": "route_id",
|
|
4571
|
+
"description": "Model route ID",
|
|
4572
|
+
"required": true,
|
|
4573
|
+
"type": "string",
|
|
4574
|
+
"in": "path"
|
|
4575
|
+
}, {
|
|
4576
|
+
"name": "name",
|
|
4577
|
+
"description": "New name (unique per project)",
|
|
4578
|
+
"required": false,
|
|
4579
|
+
"type": "string",
|
|
4580
|
+
"in": "body"
|
|
4581
|
+
}, {
|
|
4582
|
+
"name": "targets",
|
|
4583
|
+
"description": "Replacement target list (ordered)",
|
|
4584
|
+
"required": false,
|
|
4585
|
+
"type": "array",
|
|
4586
|
+
"in": "body"
|
|
4587
|
+
}, {
|
|
4588
|
+
"name": "retry_on",
|
|
4589
|
+
"description": "",
|
|
4590
|
+
"required": false,
|
|
4591
|
+
"type": "array",
|
|
4592
|
+
"in": "body"
|
|
4593
|
+
}, {
|
|
4594
|
+
"name": "failure_threshold",
|
|
4595
|
+
"description": "",
|
|
4596
|
+
"required": false,
|
|
4597
|
+
"type": "integer",
|
|
4598
|
+
"in": "body"
|
|
4599
|
+
}, {
|
|
4600
|
+
"name": "cooldown_seconds",
|
|
4601
|
+
"description": "",
|
|
4602
|
+
"required": false,
|
|
4603
|
+
"type": "integer",
|
|
4604
|
+
"in": "body"
|
|
4605
|
+
}]
|
|
4606
|
+
},
|
|
4607
|
+
"delete-model-route": {
|
|
4608
|
+
serviceClass: "ModelRoutes",
|
|
4609
|
+
operationId: "deleteModelRoute",
|
|
4610
|
+
description: "Deletes a model route. Returns 409 when an agent still references it — a routed agent has no pinned provider to fall back on, so the reference must be repointed or the agent deleted first.",
|
|
4611
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/model-routes",
|
|
4612
|
+
httpMethod: "delete",
|
|
4613
|
+
pathParams: ["route_id"],
|
|
4614
|
+
queryParams: [],
|
|
4615
|
+
flags: [{
|
|
4616
|
+
"name": "route_id",
|
|
4617
|
+
"description": "Model route ID",
|
|
4618
|
+
"required": true,
|
|
4619
|
+
"type": "string",
|
|
4620
|
+
"in": "path"
|
|
4621
|
+
}]
|
|
4622
|
+
},
|
|
4453
4623
|
"list-orchestrations": {
|
|
4454
4624
|
serviceClass: "Orchestrations",
|
|
4455
4625
|
operationId: "listOrchestrations",
|
|
@@ -4963,7 +5133,7 @@ var routes = {
|
|
|
4963
5133
|
"update-project": {
|
|
4964
5134
|
serviceClass: "Projects",
|
|
4965
5135
|
operationId: "updateProject",
|
|
4966
|
-
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`), and/or its read-auditing opt-in (`audit_reads_enabled`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.",
|
|
5136
|
+
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`), and/or its read-auditing opt-in (`audit_reads_enabled`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.",
|
|
4967
5137
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/projects",
|
|
4968
5138
|
httpMethod: "patch",
|
|
4969
5139
|
pathParams: ["project_id"],
|
|
@@ -4992,6 +5162,12 @@ var routes = {
|
|
|
4992
5162
|
"required": false,
|
|
4993
5163
|
"type": "integer",
|
|
4994
5164
|
"in": "body"
|
|
5165
|
+
}, {
|
|
5166
|
+
"name": "default_model_route_id",
|
|
5167
|
+
"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.",
|
|
5168
|
+
"required": false,
|
|
5169
|
+
"type": "string",
|
|
5170
|
+
"in": "body"
|
|
4995
5171
|
}, {
|
|
4996
5172
|
"name": "audit_reads_enabled",
|
|
4997
5173
|
"description": "Opt the project into read auditing. When true, `GET` requests that name this project are recorded in the audit log alongside mutations. Defaults to `false`.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soat/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.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.18.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@ttoss/config": "^1.37.17",
|