@soat/cli 0.5.7 → 0.5.8
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/esm/index.js +120 -77
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { program } from "commander";
|
|
|
16
16
|
// package.json
|
|
17
17
|
var package_default = {
|
|
18
18
|
name: "@soat/cli",
|
|
19
|
-
version: "0.5.
|
|
19
|
+
version: "0.5.8",
|
|
20
20
|
type: "module",
|
|
21
21
|
scripts: {
|
|
22
22
|
generate: "tsx scripts/generate.ts",
|
|
@@ -550,75 +550,6 @@ var routes = {
|
|
|
550
550
|
"in": "path"
|
|
551
551
|
}]
|
|
552
552
|
},
|
|
553
|
-
"list-agent-tools": {
|
|
554
|
-
serviceClass: "AgentTools",
|
|
555
|
-
operationId: "listAgentTools",
|
|
556
|
-
description: "Returns all agent tools in the project.",
|
|
557
|
-
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
|
|
558
|
-
pathParams: [],
|
|
559
|
-
queryParams: ["project_id"],
|
|
560
|
-
flags: [{
|
|
561
|
-
"name": "project_id",
|
|
562
|
-
"description": "Project public ID to filter by",
|
|
563
|
-
"required": false,
|
|
564
|
-
"type": "string",
|
|
565
|
-
"in": "query"
|
|
566
|
-
}]
|
|
567
|
-
},
|
|
568
|
-
"create-agent-tool": {
|
|
569
|
-
serviceClass: "AgentTools",
|
|
570
|
-
operationId: "createAgentTool",
|
|
571
|
-
description: "Creates a new agent tool in the project.",
|
|
572
|
-
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
|
|
573
|
-
pathParams: [],
|
|
574
|
-
queryParams: [],
|
|
575
|
-
flags: []
|
|
576
|
-
},
|
|
577
|
-
"get-agent-tool": {
|
|
578
|
-
serviceClass: "AgentTools",
|
|
579
|
-
operationId: "getAgentTool",
|
|
580
|
-
description: "Returns a single agent tool by ID.",
|
|
581
|
-
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
|
|
582
|
-
pathParams: ["tool_id"],
|
|
583
|
-
queryParams: [],
|
|
584
|
-
flags: [{
|
|
585
|
-
"name": "tool_id",
|
|
586
|
-
"description": "",
|
|
587
|
-
"required": true,
|
|
588
|
-
"type": "string",
|
|
589
|
-
"in": "path"
|
|
590
|
-
}]
|
|
591
|
-
},
|
|
592
|
-
"update-agent-tool": {
|
|
593
|
-
serviceClass: "AgentTools",
|
|
594
|
-
operationId: "updateAgentTool",
|
|
595
|
-
description: "Updates an existing agent tool.",
|
|
596
|
-
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
|
|
597
|
-
pathParams: ["tool_id"],
|
|
598
|
-
queryParams: [],
|
|
599
|
-
flags: [{
|
|
600
|
-
"name": "tool_id",
|
|
601
|
-
"description": "",
|
|
602
|
-
"required": true,
|
|
603
|
-
"type": "string",
|
|
604
|
-
"in": "path"
|
|
605
|
-
}]
|
|
606
|
-
},
|
|
607
|
-
"delete-agent-tool": {
|
|
608
|
-
serviceClass: "AgentTools",
|
|
609
|
-
operationId: "deleteAgentTool",
|
|
610
|
-
description: "Deletes an agent tool by ID.",
|
|
611
|
-
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
|
|
612
|
-
pathParams: ["tool_id"],
|
|
613
|
-
queryParams: [],
|
|
614
|
-
flags: [{
|
|
615
|
-
"name": "tool_id",
|
|
616
|
-
"description": "",
|
|
617
|
-
"required": true,
|
|
618
|
-
"type": "string",
|
|
619
|
-
"in": "path"
|
|
620
|
-
}]
|
|
621
|
-
},
|
|
622
553
|
"list-agents": {
|
|
623
554
|
serviceClass: "Agents",
|
|
624
555
|
operationId: "listAgents",
|
|
@@ -2857,6 +2788,90 @@ var routes = {
|
|
|
2857
2788
|
"in": "path"
|
|
2858
2789
|
}]
|
|
2859
2790
|
},
|
|
2791
|
+
"list-tools": {
|
|
2792
|
+
serviceClass: "Tools",
|
|
2793
|
+
operationId: "listTools",
|
|
2794
|
+
description: "Returns all tools in the project.",
|
|
2795
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/tools",
|
|
2796
|
+
pathParams: [],
|
|
2797
|
+
queryParams: ["project_id"],
|
|
2798
|
+
flags: [{
|
|
2799
|
+
"name": "project_id",
|
|
2800
|
+
"description": "Project public ID to filter by",
|
|
2801
|
+
"required": false,
|
|
2802
|
+
"type": "string",
|
|
2803
|
+
"in": "query"
|
|
2804
|
+
}]
|
|
2805
|
+
},
|
|
2806
|
+
"create-tool": {
|
|
2807
|
+
serviceClass: "Tools",
|
|
2808
|
+
operationId: "createTool",
|
|
2809
|
+
description: "Creates a new tool in the project.",
|
|
2810
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/tools",
|
|
2811
|
+
pathParams: [],
|
|
2812
|
+
queryParams: [],
|
|
2813
|
+
flags: []
|
|
2814
|
+
},
|
|
2815
|
+
"get-tool": {
|
|
2816
|
+
serviceClass: "Tools",
|
|
2817
|
+
operationId: "getTool",
|
|
2818
|
+
description: "Returns a single tool by ID.",
|
|
2819
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/tools",
|
|
2820
|
+
pathParams: ["tool_id"],
|
|
2821
|
+
queryParams: [],
|
|
2822
|
+
flags: [{
|
|
2823
|
+
"name": "tool_id",
|
|
2824
|
+
"description": "",
|
|
2825
|
+
"required": true,
|
|
2826
|
+
"type": "string",
|
|
2827
|
+
"in": "path"
|
|
2828
|
+
}]
|
|
2829
|
+
},
|
|
2830
|
+
"update-tool": {
|
|
2831
|
+
serviceClass: "Tools",
|
|
2832
|
+
operationId: "updateTool",
|
|
2833
|
+
description: "Updates an existing tool.",
|
|
2834
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/tools",
|
|
2835
|
+
pathParams: ["tool_id"],
|
|
2836
|
+
queryParams: [],
|
|
2837
|
+
flags: [{
|
|
2838
|
+
"name": "tool_id",
|
|
2839
|
+
"description": "",
|
|
2840
|
+
"required": true,
|
|
2841
|
+
"type": "string",
|
|
2842
|
+
"in": "path"
|
|
2843
|
+
}]
|
|
2844
|
+
},
|
|
2845
|
+
"delete-tool": {
|
|
2846
|
+
serviceClass: "Tools",
|
|
2847
|
+
operationId: "deleteTool",
|
|
2848
|
+
description: "Deletes a tool by ID.",
|
|
2849
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/tools",
|
|
2850
|
+
pathParams: ["tool_id"],
|
|
2851
|
+
queryParams: [],
|
|
2852
|
+
flags: [{
|
|
2853
|
+
"name": "tool_id",
|
|
2854
|
+
"description": "",
|
|
2855
|
+
"required": true,
|
|
2856
|
+
"type": "string",
|
|
2857
|
+
"in": "path"
|
|
2858
|
+
}]
|
|
2859
|
+
},
|
|
2860
|
+
"call-tool": {
|
|
2861
|
+
serviceClass: "Tools",
|
|
2862
|
+
operationId: "callTool",
|
|
2863
|
+
description: "Directly invokes a tool and returns its output. Supported for `http`, `soat`, and `mcp` tools. `client` tools cannot be invoked server-side and will return 422. For `soat` and `mcp` tools the `action` field is required and identifies which action (SOAT) or tool name (MCP) to invoke. For `http` tools `action` is ignored. `preset_parameters` stored on the tool are merged with the caller-supplied `input` before execution; preset keys take lower precedence.",
|
|
2864
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/tools",
|
|
2865
|
+
pathParams: ["tool_id"],
|
|
2866
|
+
queryParams: [],
|
|
2867
|
+
flags: [{
|
|
2868
|
+
"name": "tool_id",
|
|
2869
|
+
"description": "",
|
|
2870
|
+
"required": true,
|
|
2871
|
+
"type": "string",
|
|
2872
|
+
"in": "path"
|
|
2873
|
+
}]
|
|
2874
|
+
},
|
|
2860
2875
|
"list-traces": {
|
|
2861
2876
|
serviceClass: "Traces",
|
|
2862
2877
|
operationId: "listTraces",
|
|
@@ -3211,6 +3226,27 @@ var routes = {
|
|
|
3211
3226
|
"in": "path"
|
|
3212
3227
|
}]
|
|
3213
3228
|
},
|
|
3229
|
+
"get-webhook-secret": {
|
|
3230
|
+
serviceClass: "Webhooks",
|
|
3231
|
+
operationId: "getWebhookSecret",
|
|
3232
|
+
description: "Retrieves the signing secret for the specified webhook",
|
|
3233
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/webhooks",
|
|
3234
|
+
pathParams: ["project_id", "webhook_id"],
|
|
3235
|
+
queryParams: [],
|
|
3236
|
+
flags: [{
|
|
3237
|
+
"name": "project_id",
|
|
3238
|
+
"description": "",
|
|
3239
|
+
"required": true,
|
|
3240
|
+
"type": "string",
|
|
3241
|
+
"in": "path"
|
|
3242
|
+
}, {
|
|
3243
|
+
"name": "webhook_id",
|
|
3244
|
+
"description": "",
|
|
3245
|
+
"required": true,
|
|
3246
|
+
"type": "string",
|
|
3247
|
+
"in": "path"
|
|
3248
|
+
}]
|
|
3249
|
+
},
|
|
3214
3250
|
"rotate-webhook-secret": {
|
|
3215
3251
|
serviceClass: "Webhooks",
|
|
3216
3252
|
operationId: "rotateWebhookSecret",
|
|
@@ -3503,14 +3539,21 @@ Usage: soat ${commandName} [flags]
|
|
|
3503
3539
|
const result = await method(callOpts);
|
|
3504
3540
|
if (result.error) {
|
|
3505
3541
|
const status = result.response && "status" in result.response ? result.response.status : void 0;
|
|
3506
|
-
const
|
|
3507
|
-
|
|
3508
|
-
message: result.error.message
|
|
3509
|
-
} : result.error;
|
|
3510
|
-
console.error(JSON.stringify({
|
|
3542
|
+
const rawError = result.error;
|
|
3543
|
+
const errorOutput = rawError instanceof Error ? {
|
|
3511
3544
|
status,
|
|
3512
|
-
error:
|
|
3513
|
-
|
|
3545
|
+
error: {
|
|
3546
|
+
name: rawError.name,
|
|
3547
|
+
message: rawError.message
|
|
3548
|
+
}
|
|
3549
|
+
} : typeof rawError === "object" && rawError !== null ? {
|
|
3550
|
+
status,
|
|
3551
|
+
...rawError
|
|
3552
|
+
} : {
|
|
3553
|
+
status,
|
|
3554
|
+
error: rawError
|
|
3555
|
+
};
|
|
3556
|
+
console.error(JSON.stringify(errorOutput, null, 2));
|
|
3514
3557
|
process.exit(1);
|
|
3515
3558
|
}
|
|
3516
3559
|
console.log(JSON.stringify(result.data, null, 2));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soat/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@inquirer/input": "^5.0.12",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@ttoss/logger": "^0.8.10",
|
|
9
9
|
"commander": "^14.0.3",
|
|
10
10
|
"js-yaml": "^4.1.1",
|
|
11
|
-
"@soat/sdk": "0.5.
|
|
11
|
+
"@soat/sdk": "0.5.8"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@ttoss/config": "^1.37.10",
|