@soat/sdk 0.12.5 → 0.13.1
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.cjs +69 -115
- package/dist/index.d.cts +253 -460
- package/dist/index.d.mts +253 -460
- package/dist/index.mjs +69 -115
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -824,21 +824,6 @@ var Agents = class {
|
|
|
824
824
|
}
|
|
825
825
|
});
|
|
826
826
|
}
|
|
827
|
-
/**
|
|
828
|
-
* Create an actor for an agent
|
|
829
|
-
*
|
|
830
|
-
* Creates a new actor associated with the specified agent
|
|
831
|
-
*/
|
|
832
|
-
static createAgentActor(options) {
|
|
833
|
-
return (options.client ?? client).post({
|
|
834
|
-
url: "/api/v1/agents/{agent_id}/actors",
|
|
835
|
-
...options,
|
|
836
|
-
headers: {
|
|
837
|
-
"Content-Type": "application/json",
|
|
838
|
-
...options.headers
|
|
839
|
-
}
|
|
840
|
-
});
|
|
841
|
-
}
|
|
842
827
|
};
|
|
843
828
|
var AiProviders = class {
|
|
844
829
|
/**
|
|
@@ -1044,27 +1029,12 @@ var Chats = class {
|
|
|
1044
1029
|
/**
|
|
1045
1030
|
* Create a chat completion (stateless)
|
|
1046
1031
|
*
|
|
1047
|
-
* OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required — there is no server-side model fallback.
|
|
1032
|
+
* OpenAI Chat Completions-compatible endpoint. Mirrors OpenAI's `POST /v1/chat/completions` path so an OpenAI SDK can target it by base URL alone. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required — there is no server-side model fallback.
|
|
1048
1033
|
*
|
|
1049
1034
|
*/
|
|
1050
1035
|
static createChatCompletion(options) {
|
|
1051
1036
|
return (options.client ?? client).post({
|
|
1052
|
-
url: "/api/v1/
|
|
1053
|
-
...options,
|
|
1054
|
-
headers: {
|
|
1055
|
-
"Content-Type": "application/json",
|
|
1056
|
-
...options.headers
|
|
1057
|
-
}
|
|
1058
|
-
});
|
|
1059
|
-
}
|
|
1060
|
-
/**
|
|
1061
|
-
* Create an actor for a chat
|
|
1062
|
-
*
|
|
1063
|
-
* Creates a new actor associated with the specified chat
|
|
1064
|
-
*/
|
|
1065
|
-
static createChatActor(options) {
|
|
1066
|
-
return (options.client ?? client).post({
|
|
1067
|
-
url: "/api/v1/chats/{chat_id}/actors",
|
|
1037
|
+
url: "/api/v1/chat/completions",
|
|
1068
1038
|
...options,
|
|
1069
1039
|
headers: {
|
|
1070
1040
|
"Content-Type": "application/json",
|
|
@@ -1183,17 +1153,6 @@ var Conversations = class {
|
|
|
1183
1153
|
});
|
|
1184
1154
|
}
|
|
1185
1155
|
/**
|
|
1186
|
-
* List actors in a conversation
|
|
1187
|
-
*
|
|
1188
|
-
* Returns all distinct actors who have sent at least one message in the conversation
|
|
1189
|
-
*/
|
|
1190
|
-
static listConversationActors(options) {
|
|
1191
|
-
return (options.client ?? client).get({
|
|
1192
|
-
url: "/api/v1/conversations/{conversation_id}/actors",
|
|
1193
|
-
...options
|
|
1194
|
-
});
|
|
1195
|
-
}
|
|
1196
|
-
/**
|
|
1197
1156
|
* Remove a message from a conversation
|
|
1198
1157
|
*
|
|
1199
1158
|
* Removes a document from a conversation
|
|
@@ -1644,6 +1603,18 @@ var Formations = class {
|
|
|
1644
1603
|
}
|
|
1645
1604
|
};
|
|
1646
1605
|
var Generations = class {
|
|
1606
|
+
/**
|
|
1607
|
+
* List generations
|
|
1608
|
+
*
|
|
1609
|
+
* Returns generations the caller can access, optionally filtered by agent, trace, and status. Replaces the former per-trace generations endpoint (use the trace_id query filter).
|
|
1610
|
+
*
|
|
1611
|
+
*/
|
|
1612
|
+
static listGenerations(options) {
|
|
1613
|
+
return (options?.client ?? client).get({
|
|
1614
|
+
url: "/api/v1/generations",
|
|
1615
|
+
...options
|
|
1616
|
+
});
|
|
1617
|
+
}
|
|
1647
1618
|
/**
|
|
1648
1619
|
* Get a generation
|
|
1649
1620
|
*
|
|
@@ -1747,7 +1718,7 @@ var MemoryEntries = class {
|
|
|
1747
1718
|
*/
|
|
1748
1719
|
static listMemoryEntries(options) {
|
|
1749
1720
|
return (options.client ?? client).get({
|
|
1750
|
-
url: "/api/v1/
|
|
1721
|
+
url: "/api/v1/memory-entries",
|
|
1751
1722
|
...options
|
|
1752
1723
|
});
|
|
1753
1724
|
}
|
|
@@ -1758,7 +1729,7 @@ var MemoryEntries = class {
|
|
|
1758
1729
|
*/
|
|
1759
1730
|
static createMemoryEntry(options) {
|
|
1760
1731
|
return (options.client ?? client).post({
|
|
1761
|
-
url: "/api/v1/
|
|
1732
|
+
url: "/api/v1/memory-entries",
|
|
1762
1733
|
...options,
|
|
1763
1734
|
headers: {
|
|
1764
1735
|
"Content-Type": "application/json",
|
|
@@ -1773,7 +1744,7 @@ var MemoryEntries = class {
|
|
|
1773
1744
|
*/
|
|
1774
1745
|
static deleteMemoryEntry(options) {
|
|
1775
1746
|
return (options.client ?? client).delete({
|
|
1776
|
-
url: "/api/v1/
|
|
1747
|
+
url: "/api/v1/memory-entries/{entry_id}",
|
|
1777
1748
|
...options
|
|
1778
1749
|
});
|
|
1779
1750
|
}
|
|
@@ -1784,7 +1755,7 @@ var MemoryEntries = class {
|
|
|
1784
1755
|
*/
|
|
1785
1756
|
static getMemoryEntry(options) {
|
|
1786
1757
|
return (options.client ?? client).get({
|
|
1787
|
-
url: "/api/v1/
|
|
1758
|
+
url: "/api/v1/memory-entries/{entry_id}",
|
|
1788
1759
|
...options
|
|
1789
1760
|
});
|
|
1790
1761
|
}
|
|
@@ -1795,7 +1766,7 @@ var MemoryEntries = class {
|
|
|
1795
1766
|
*/
|
|
1796
1767
|
static updateMemoryEntry(options) {
|
|
1797
1768
|
return (options.client ?? client).put({
|
|
1798
|
-
url: "/api/v1/
|
|
1769
|
+
url: "/api/v1/memory-entries/{entry_id}",
|
|
1799
1770
|
...options,
|
|
1800
1771
|
headers: {
|
|
1801
1772
|
"Content-Type": "application/json",
|
|
@@ -1832,6 +1803,22 @@ var Orchestrations = class {
|
|
|
1832
1803
|
});
|
|
1833
1804
|
}
|
|
1834
1805
|
/**
|
|
1806
|
+
* Validate an orchestration graph
|
|
1807
|
+
*
|
|
1808
|
+
* Statically validates an orchestration graph without persisting anything. Checks that every node has its required field, node ids are unique, edges reference existing nodes, the graph is acyclic (unless it contains a loop node), and every `input_mapping` `{"var": "..."}` reference resolves to a state key written by an upstream node or seeded by `input_schema`. Returns blocking `errors` and non-blocking `warnings` (e.g. a state key only written on a conditional branch). The same `errors` checks are enforced on create and update, which fail with `400` when any error is present.
|
|
1809
|
+
*
|
|
1810
|
+
*/
|
|
1811
|
+
static validateOrchestration(options) {
|
|
1812
|
+
return (options.client ?? client).post({
|
|
1813
|
+
url: "/api/v1/orchestrations/validate",
|
|
1814
|
+
...options,
|
|
1815
|
+
headers: {
|
|
1816
|
+
"Content-Type": "application/json",
|
|
1817
|
+
...options.headers
|
|
1818
|
+
}
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1821
|
+
/**
|
|
1835
1822
|
* Delete an orchestration
|
|
1836
1823
|
*
|
|
1837
1824
|
* Deletes an orchestration definition and all its runs.
|
|
@@ -1871,22 +1858,22 @@ var Orchestrations = class {
|
|
|
1871
1858
|
/**
|
|
1872
1859
|
* List orchestration runs
|
|
1873
1860
|
*
|
|
1874
|
-
* Returns
|
|
1861
|
+
* Returns orchestration runs the caller can access, optionally filtered by orchestration.
|
|
1875
1862
|
*/
|
|
1876
1863
|
static listOrchestrationRuns(options) {
|
|
1877
|
-
return (options
|
|
1878
|
-
url: "/api/v1/
|
|
1864
|
+
return (options?.client ?? client).get({
|
|
1865
|
+
url: "/api/v1/orchestration-runs",
|
|
1879
1866
|
...options
|
|
1880
1867
|
});
|
|
1881
1868
|
}
|
|
1882
1869
|
/**
|
|
1883
1870
|
* Start an orchestration run
|
|
1884
1871
|
*
|
|
1885
|
-
* Creates and immediately executes a new run for the orchestration.
|
|
1872
|
+
* Creates and immediately executes a new run for the orchestration named by orchestration_id.
|
|
1886
1873
|
*/
|
|
1887
1874
|
static startOrchestrationRun(options) {
|
|
1888
1875
|
return (options.client ?? client).post({
|
|
1889
|
-
url: "/api/v1/
|
|
1876
|
+
url: "/api/v1/orchestration-runs",
|
|
1890
1877
|
...options,
|
|
1891
1878
|
headers: {
|
|
1892
1879
|
"Content-Type": "application/json",
|
|
@@ -1901,7 +1888,7 @@ var Orchestrations = class {
|
|
|
1901
1888
|
*/
|
|
1902
1889
|
static cancelOrchestrationRun(options) {
|
|
1903
1890
|
return (options.client ?? client).post({
|
|
1904
|
-
url: "/api/v1/
|
|
1891
|
+
url: "/api/v1/orchestration-runs/{run_id}/cancel",
|
|
1905
1892
|
...options
|
|
1906
1893
|
});
|
|
1907
1894
|
}
|
|
@@ -1912,7 +1899,7 @@ var Orchestrations = class {
|
|
|
1912
1899
|
*/
|
|
1913
1900
|
static submitHumanInput(options) {
|
|
1914
1901
|
return (options.client ?? client).post({
|
|
1915
|
-
url: "/api/v1/
|
|
1902
|
+
url: "/api/v1/orchestration-runs/{run_id}/human-input",
|
|
1916
1903
|
...options,
|
|
1917
1904
|
headers: {
|
|
1918
1905
|
"Content-Type": "application/json",
|
|
@@ -1927,7 +1914,7 @@ var Orchestrations = class {
|
|
|
1927
1914
|
*/
|
|
1928
1915
|
static resumeOrchestrationRun(options) {
|
|
1929
1916
|
return (options.client ?? client).post({
|
|
1930
|
-
url: "/api/v1/
|
|
1917
|
+
url: "/api/v1/orchestration-runs/{run_id}/resume",
|
|
1931
1918
|
...options
|
|
1932
1919
|
});
|
|
1933
1920
|
}
|
|
@@ -1938,7 +1925,7 @@ var Orchestrations = class {
|
|
|
1938
1925
|
*/
|
|
1939
1926
|
static getOrchestrationRun(options) {
|
|
1940
1927
|
return (options.client ?? client).get({
|
|
1941
|
-
url: "/api/v1/
|
|
1928
|
+
url: "/api/v1/orchestration-runs/{run_id}",
|
|
1942
1929
|
...options
|
|
1943
1930
|
});
|
|
1944
1931
|
}
|
|
@@ -1947,7 +1934,8 @@ var Policies = class {
|
|
|
1947
1934
|
/**
|
|
1948
1935
|
* List all policies
|
|
1949
1936
|
*
|
|
1950
|
-
* Returns
|
|
1937
|
+
* Returns global policies. Requires admin role. Pass user_id to list only the policies attached to that user (replaces the former per-user policies endpoint).
|
|
1938
|
+
*
|
|
1951
1939
|
*/
|
|
1952
1940
|
static listPolicies(options) {
|
|
1953
1941
|
return (options?.client ?? client).get({
|
|
@@ -2132,11 +2120,11 @@ var Sessions = class {
|
|
|
2132
2120
|
/**
|
|
2133
2121
|
* List sessions
|
|
2134
2122
|
*
|
|
2135
|
-
* Returns sessions
|
|
2123
|
+
* Returns sessions the caller can access, optionally filtered by agent, actor and status.
|
|
2136
2124
|
*/
|
|
2137
|
-
static
|
|
2138
|
-
return (options
|
|
2139
|
-
url: "/api/v1/
|
|
2125
|
+
static listSessions(options) {
|
|
2126
|
+
return (options?.client ?? client).get({
|
|
2127
|
+
url: "/api/v1/sessions",
|
|
2140
2128
|
...options
|
|
2141
2129
|
});
|
|
2142
2130
|
}
|
|
@@ -2146,13 +2134,13 @@ var Sessions = class {
|
|
|
2146
2134
|
* Creates a new session for the specified agent. Internally creates a conversation and two actors (agent + user) so the caller only needs this single call to start interacting with the agent.
|
|
2147
2135
|
*
|
|
2148
2136
|
*/
|
|
2149
|
-
static
|
|
2150
|
-
return (options
|
|
2151
|
-
url: "/api/v1/
|
|
2137
|
+
static createSession(options) {
|
|
2138
|
+
return (options?.client ?? client).post({
|
|
2139
|
+
url: "/api/v1/sessions",
|
|
2152
2140
|
...options,
|
|
2153
2141
|
headers: {
|
|
2154
2142
|
"Content-Type": "application/json",
|
|
2155
|
-
...options
|
|
2143
|
+
...options?.headers
|
|
2156
2144
|
}
|
|
2157
2145
|
});
|
|
2158
2146
|
}
|
|
@@ -2161,9 +2149,9 @@ var Sessions = class {
|
|
|
2161
2149
|
*
|
|
2162
2150
|
* Deletes the session and its underlying conversation and actors.
|
|
2163
2151
|
*/
|
|
2164
|
-
static
|
|
2152
|
+
static deleteSession(options) {
|
|
2165
2153
|
return (options.client ?? client).delete({
|
|
2166
|
-
url: "/api/v1/
|
|
2154
|
+
url: "/api/v1/sessions/{session_id}",
|
|
2167
2155
|
...options
|
|
2168
2156
|
});
|
|
2169
2157
|
}
|
|
@@ -2172,9 +2160,9 @@ var Sessions = class {
|
|
|
2172
2160
|
*
|
|
2173
2161
|
* Returns details of a single session.
|
|
2174
2162
|
*/
|
|
2175
|
-
static
|
|
2163
|
+
static getSession(options) {
|
|
2176
2164
|
return (options.client ?? client).get({
|
|
2177
|
-
url: "/api/v1/
|
|
2165
|
+
url: "/api/v1/sessions/{session_id}",
|
|
2178
2166
|
...options
|
|
2179
2167
|
});
|
|
2180
2168
|
}
|
|
@@ -2185,7 +2173,7 @@ var Sessions = class {
|
|
|
2185
2173
|
*/
|
|
2186
2174
|
static updateSession(options) {
|
|
2187
2175
|
return (options.client ?? client).patch({
|
|
2188
|
-
url: "/api/v1/
|
|
2176
|
+
url: "/api/v1/sessions/{session_id}",
|
|
2189
2177
|
...options,
|
|
2190
2178
|
headers: {
|
|
2191
2179
|
"Content-Type": "application/json",
|
|
@@ -2194,18 +2182,6 @@ var Sessions = class {
|
|
|
2194
2182
|
});
|
|
2195
2183
|
}
|
|
2196
2184
|
/**
|
|
2197
|
-
* List session messages
|
|
2198
|
-
*
|
|
2199
|
-
* Returns messages in the session with simplified roles (user/assistant) instead of raw actor IDs.
|
|
2200
|
-
*
|
|
2201
|
-
*/
|
|
2202
|
-
static listAgentSessionMessages(options) {
|
|
2203
|
-
return (options.client ?? client).get({
|
|
2204
|
-
url: "/api/v1/agents/{agent_id}/sessions/{session_id}/messages",
|
|
2205
|
-
...options
|
|
2206
|
-
});
|
|
2207
|
-
}
|
|
2208
|
-
/**
|
|
2209
2185
|
* Add a user message
|
|
2210
2186
|
*
|
|
2211
2187
|
* Saves a user message to the session. When autoGenerate is enabled on the session and no generation is currently in progress, generation is triggered automatically and the response mirrors GenerateSessionResponse. Otherwise returns the saved user message.
|
|
@@ -2213,7 +2189,7 @@ var Sessions = class {
|
|
|
2213
2189
|
*/
|
|
2214
2190
|
static addSessionMessage(options) {
|
|
2215
2191
|
return (options.client ?? client).post({
|
|
2216
|
-
url: "/api/v1/
|
|
2192
|
+
url: "/api/v1/sessions/{session_id}/messages",
|
|
2217
2193
|
...options,
|
|
2218
2194
|
headers: {
|
|
2219
2195
|
"Content-Type": "application/json",
|
|
@@ -2229,7 +2205,7 @@ var Sessions = class {
|
|
|
2229
2205
|
*/
|
|
2230
2206
|
static generateSessionResponse(options) {
|
|
2231
2207
|
return (options.client ?? client).post({
|
|
2232
|
-
url: "/api/v1/
|
|
2208
|
+
url: "/api/v1/sessions/{session_id}/generate",
|
|
2233
2209
|
...options,
|
|
2234
2210
|
headers: {
|
|
2235
2211
|
"Content-Type": "application/json",
|
|
@@ -2245,7 +2221,7 @@ var Sessions = class {
|
|
|
2245
2221
|
*/
|
|
2246
2222
|
static submitSessionToolOutputs(options) {
|
|
2247
2223
|
return (options.client ?? client).post({
|
|
2248
|
-
url: "/api/v1/
|
|
2224
|
+
url: "/api/v1/sessions/{session_id}/tool-outputs",
|
|
2249
2225
|
...options,
|
|
2250
2226
|
headers: {
|
|
2251
2227
|
"Content-Type": "application/json",
|
|
@@ -2260,7 +2236,7 @@ var Sessions = class {
|
|
|
2260
2236
|
*/
|
|
2261
2237
|
static getSessionTags(options) {
|
|
2262
2238
|
return (options.client ?? client).get({
|
|
2263
|
-
url: "/api/v1/
|
|
2239
|
+
url: "/api/v1/sessions/{session_id}/tags",
|
|
2264
2240
|
...options
|
|
2265
2241
|
});
|
|
2266
2242
|
}
|
|
@@ -2271,7 +2247,7 @@ var Sessions = class {
|
|
|
2271
2247
|
*/
|
|
2272
2248
|
static mergeSessionTags(options) {
|
|
2273
2249
|
return (options.client ?? client).patch({
|
|
2274
|
-
url: "/api/v1/
|
|
2250
|
+
url: "/api/v1/sessions/{session_id}/tags",
|
|
2275
2251
|
...options,
|
|
2276
2252
|
headers: {
|
|
2277
2253
|
"Content-Type": "application/json",
|
|
@@ -2286,7 +2262,7 @@ var Sessions = class {
|
|
|
2286
2262
|
*/
|
|
2287
2263
|
static replaceSessionTags(options) {
|
|
2288
2264
|
return (options.client ?? client).put({
|
|
2289
|
-
url: "/api/v1/
|
|
2265
|
+
url: "/api/v1/sessions/{session_id}/tags",
|
|
2290
2266
|
...options,
|
|
2291
2267
|
headers: {
|
|
2292
2268
|
"Content-Type": "application/json",
|
|
@@ -2413,17 +2389,6 @@ var Traces = class {
|
|
|
2413
2389
|
...options
|
|
2414
2390
|
});
|
|
2415
2391
|
}
|
|
2416
|
-
/**
|
|
2417
|
-
* Get generation IDs for a trace
|
|
2418
|
-
*
|
|
2419
|
-
* Returns all generation IDs associated with the trace.
|
|
2420
|
-
*/
|
|
2421
|
-
static getTraceGenerations(options) {
|
|
2422
|
-
return (options.client ?? client).get({
|
|
2423
|
-
url: "/api/v1/traces/{trace_id}/generations",
|
|
2424
|
-
...options
|
|
2425
|
-
});
|
|
2426
|
-
}
|
|
2427
2392
|
};
|
|
2428
2393
|
var Users = class {
|
|
2429
2394
|
/**
|
|
@@ -2516,17 +2481,6 @@ var Users = class {
|
|
|
2516
2481
|
});
|
|
2517
2482
|
}
|
|
2518
2483
|
/**
|
|
2519
|
-
* Get policies attached to a user
|
|
2520
|
-
*
|
|
2521
|
-
* Returns the list of policies attached to a user. Requires admin role.
|
|
2522
|
-
*/
|
|
2523
|
-
static getUserPolicies(options) {
|
|
2524
|
-
return (options.client ?? client).get({
|
|
2525
|
-
url: "/api/v1/users/{user_id}/policies",
|
|
2526
|
-
...options
|
|
2527
|
-
});
|
|
2528
|
-
}
|
|
2529
|
-
/**
|
|
2530
2484
|
* Attach policies to a user
|
|
2531
2485
|
*
|
|
2532
2486
|
* Replaces the user's policy list with the provided policy IDs. Requires admin role.
|
|
@@ -2607,13 +2561,13 @@ var Webhooks = class {
|
|
|
2607
2561
|
});
|
|
2608
2562
|
}
|
|
2609
2563
|
/**
|
|
2610
|
-
* List deliveries
|
|
2564
|
+
* List webhook deliveries
|
|
2611
2565
|
*
|
|
2612
|
-
* Lists
|
|
2566
|
+
* Lists event deliveries for a webhook (webhook_id is required).
|
|
2613
2567
|
*/
|
|
2614
2568
|
static listWebhookDeliveries(options) {
|
|
2615
2569
|
return (options.client ?? client).get({
|
|
2616
|
-
url: "/api/v1/
|
|
2570
|
+
url: "/api/v1/webhook-deliveries",
|
|
2617
2571
|
...options
|
|
2618
2572
|
});
|
|
2619
2573
|
}
|
|
@@ -2624,7 +2578,7 @@ var Webhooks = class {
|
|
|
2624
2578
|
*/
|
|
2625
2579
|
static getWebhookDelivery(options) {
|
|
2626
2580
|
return (options.client ?? client).get({
|
|
2627
|
-
url: "/api/v1/
|
|
2581
|
+
url: "/api/v1/webhook-deliveries/{delivery_id}",
|
|
2628
2582
|
...options
|
|
2629
2583
|
});
|
|
2630
2584
|
}
|