@soat/cli 0.4.17 → 0.5.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/esm/index.js +118 -37
- 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.
|
|
19
|
+
version: "0.5.0",
|
|
20
20
|
type: "module",
|
|
21
21
|
scripts: {
|
|
22
22
|
generate: "tsx scripts/generate.ts",
|
|
@@ -87,24 +87,24 @@ var resolveClient = /* @__PURE__ */__name(profileName => {
|
|
|
87
87
|
}
|
|
88
88
|
}));
|
|
89
89
|
}
|
|
90
|
-
if (envBaseUrl && !envToken) {
|
|
91
|
-
return createClient(createConfig({
|
|
92
|
-
baseUrl: envBaseUrl
|
|
93
|
-
}));
|
|
94
|
-
}
|
|
95
90
|
const name = profileName ?? process.env["SOAT_PROFILE"] ?? "default";
|
|
96
91
|
const config = readConfig();
|
|
97
92
|
const profile = config[name];
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
if (profile) {
|
|
94
|
+
return createClient(createConfig({
|
|
95
|
+
baseUrl: envBaseUrl ?? profile.baseUrl,
|
|
96
|
+
headers: {
|
|
97
|
+
Authorization: `Bearer ${profile.token}`
|
|
98
|
+
}
|
|
99
|
+
}));
|
|
101
100
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
})
|
|
101
|
+
if (envBaseUrl) {
|
|
102
|
+
return createClient(createConfig({
|
|
103
|
+
baseUrl: envBaseUrl
|
|
104
|
+
}));
|
|
105
|
+
}
|
|
106
|
+
console.error(`Profile "${name}" not found. Run: soat configure${name !== "default" ? ` --profile ${name}` : ""}`);
|
|
107
|
+
process.exit(1);
|
|
108
108
|
}, "resolveClient");
|
|
109
109
|
|
|
110
110
|
// src/generated/routes.ts
|
|
@@ -200,20 +200,6 @@ var routes = {
|
|
|
200
200
|
pathParams: ["tool_id"],
|
|
201
201
|
queryParams: []
|
|
202
202
|
},
|
|
203
|
-
"list-agent-traces": {
|
|
204
|
-
serviceClass: "AgentTraces",
|
|
205
|
-
operationId: "listAgentTraces",
|
|
206
|
-
description: "List agent traces",
|
|
207
|
-
pathParams: [],
|
|
208
|
-
queryParams: ["project_id", "limit", "offset"]
|
|
209
|
-
},
|
|
210
|
-
"get-agent-trace": {
|
|
211
|
-
serviceClass: "AgentTraces",
|
|
212
|
-
operationId: "getAgentTrace",
|
|
213
|
-
description: "Get a trace",
|
|
214
|
-
pathParams: ["trace_id"],
|
|
215
|
-
queryParams: []
|
|
216
|
-
},
|
|
217
203
|
"list-agents": {
|
|
218
204
|
serviceClass: "Agents",
|
|
219
205
|
operationId: "listAgents",
|
|
@@ -536,13 +522,6 @@ var routes = {
|
|
|
536
522
|
pathParams: ["document_id"],
|
|
537
523
|
queryParams: []
|
|
538
524
|
},
|
|
539
|
-
"search-documents": {
|
|
540
|
-
serviceClass: "Documents",
|
|
541
|
-
operationId: "searchDocuments",
|
|
542
|
-
description: "Semantic search over documents",
|
|
543
|
-
pathParams: [],
|
|
544
|
-
queryParams: []
|
|
545
|
-
},
|
|
546
525
|
"list-files": {
|
|
547
526
|
serviceClass: "Files",
|
|
548
527
|
operationId: "listFiles",
|
|
@@ -627,6 +606,83 @@ var routes = {
|
|
|
627
606
|
pathParams: ["file_id"],
|
|
628
607
|
queryParams: []
|
|
629
608
|
},
|
|
609
|
+
"search-knowledge": {
|
|
610
|
+
serviceClass: "Knowledge",
|
|
611
|
+
operationId: "searchKnowledge",
|
|
612
|
+
description: "Search knowledge",
|
|
613
|
+
pathParams: [],
|
|
614
|
+
queryParams: []
|
|
615
|
+
},
|
|
616
|
+
"list-memories": {
|
|
617
|
+
serviceClass: "Memories",
|
|
618
|
+
operationId: "listMemories",
|
|
619
|
+
description: "List memories",
|
|
620
|
+
pathParams: [],
|
|
621
|
+
queryParams: ["project_id"]
|
|
622
|
+
},
|
|
623
|
+
"create-memory": {
|
|
624
|
+
serviceClass: "Memories",
|
|
625
|
+
operationId: "createMemory",
|
|
626
|
+
description: "Create a memory",
|
|
627
|
+
pathParams: [],
|
|
628
|
+
queryParams: []
|
|
629
|
+
},
|
|
630
|
+
"get-memory": {
|
|
631
|
+
serviceClass: "Memories",
|
|
632
|
+
operationId: "getMemory",
|
|
633
|
+
description: "Get a memory",
|
|
634
|
+
pathParams: ["memory_id"],
|
|
635
|
+
queryParams: []
|
|
636
|
+
},
|
|
637
|
+
"update-memory": {
|
|
638
|
+
serviceClass: "Memories",
|
|
639
|
+
operationId: "updateMemory",
|
|
640
|
+
description: "Update a memory",
|
|
641
|
+
pathParams: ["memory_id"],
|
|
642
|
+
queryParams: []
|
|
643
|
+
},
|
|
644
|
+
"delete-memory": {
|
|
645
|
+
serviceClass: "Memories",
|
|
646
|
+
operationId: "deleteMemory",
|
|
647
|
+
description: "Delete a memory",
|
|
648
|
+
pathParams: ["memory_id"],
|
|
649
|
+
queryParams: []
|
|
650
|
+
},
|
|
651
|
+
"list-memory-entries": {
|
|
652
|
+
serviceClass: "MemoryEntries",
|
|
653
|
+
operationId: "listMemoryEntries",
|
|
654
|
+
description: "List memory entries",
|
|
655
|
+
pathParams: ["memory_id"],
|
|
656
|
+
queryParams: []
|
|
657
|
+
},
|
|
658
|
+
"create-memory-entry": {
|
|
659
|
+
serviceClass: "MemoryEntries",
|
|
660
|
+
operationId: "createMemoryEntry",
|
|
661
|
+
description: "Create a memory entry",
|
|
662
|
+
pathParams: ["memory_id"],
|
|
663
|
+
queryParams: []
|
|
664
|
+
},
|
|
665
|
+
"get-memory-entry": {
|
|
666
|
+
serviceClass: "MemoryEntries",
|
|
667
|
+
operationId: "getMemoryEntry",
|
|
668
|
+
description: "Get a memory entry",
|
|
669
|
+
pathParams: ["memory_id", "entry_id"],
|
|
670
|
+
queryParams: []
|
|
671
|
+
},
|
|
672
|
+
"update-memory-entry": {
|
|
673
|
+
serviceClass: "MemoryEntries",
|
|
674
|
+
operationId: "updateMemoryEntry",
|
|
675
|
+
description: "Update a memory entry",
|
|
676
|
+
pathParams: ["memory_id", "entry_id"],
|
|
677
|
+
queryParams: []
|
|
678
|
+
},
|
|
679
|
+
"delete-memory-entry": {
|
|
680
|
+
serviceClass: "MemoryEntries",
|
|
681
|
+
operationId: "deleteMemoryEntry",
|
|
682
|
+
description: "Delete a memory entry",
|
|
683
|
+
pathParams: ["memory_id", "entry_id"],
|
|
684
|
+
queryParams: []
|
|
685
|
+
},
|
|
630
686
|
"list-policies": {
|
|
631
687
|
serviceClass: "Policies",
|
|
632
688
|
operationId: "listPolicies",
|
|
@@ -802,6 +858,27 @@ var routes = {
|
|
|
802
858
|
pathParams: ["agent_id", "session_id"],
|
|
803
859
|
queryParams: []
|
|
804
860
|
},
|
|
861
|
+
"list-traces": {
|
|
862
|
+
serviceClass: "Traces",
|
|
863
|
+
operationId: "listTraces",
|
|
864
|
+
description: "List traces",
|
|
865
|
+
pathParams: [],
|
|
866
|
+
queryParams: ["project_id", "limit", "offset"]
|
|
867
|
+
},
|
|
868
|
+
"get-trace": {
|
|
869
|
+
serviceClass: "Traces",
|
|
870
|
+
operationId: "getTrace",
|
|
871
|
+
description: "Get a trace",
|
|
872
|
+
pathParams: ["trace_id"],
|
|
873
|
+
queryParams: []
|
|
874
|
+
},
|
|
875
|
+
"get-trace-tree": {
|
|
876
|
+
serviceClass: "Traces",
|
|
877
|
+
operationId: "getTraceTree",
|
|
878
|
+
description: "Get trace tree",
|
|
879
|
+
pathParams: ["trace_id"],
|
|
880
|
+
queryParams: []
|
|
881
|
+
},
|
|
805
882
|
"list-users": {
|
|
806
883
|
serviceClass: "Users",
|
|
807
884
|
operationId: "listUsers",
|
|
@@ -1160,9 +1237,13 @@ program.argument("[command]", "API command in kebab-case (e.g. list-actors)").ar
|
|
|
1160
1237
|
const result = await method(callOpts);
|
|
1161
1238
|
if (result.error) {
|
|
1162
1239
|
const status = result.response && "status" in result.response ? result.response.status : void 0;
|
|
1240
|
+
const errorPayload = result.error instanceof Error ? {
|
|
1241
|
+
name: result.error.name,
|
|
1242
|
+
message: result.error.message
|
|
1243
|
+
} : result.error;
|
|
1163
1244
|
console.error(JSON.stringify({
|
|
1164
1245
|
status,
|
|
1165
|
-
error:
|
|
1246
|
+
error: errorPayload
|
|
1166
1247
|
}, null, 2));
|
|
1167
1248
|
process.exit(1);
|
|
1168
1249
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soat/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@inquirer/input": "^5.0.12",
|
|
7
7
|
"@inquirer/password": "^5.0.12",
|
|
8
8
|
"@ttoss/logger": "^0.8.10",
|
|
9
9
|
"commander": "^14.0.3",
|
|
10
|
-
"@soat/sdk": "0.
|
|
10
|
+
"@soat/sdk": "0.5.0"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@ttoss/config": "^1.37.10",
|