@soat/sdk 0.12.5 → 0.13.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.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/chats/completions",
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/memories/{memory_id}/entries",
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/memories/{memory_id}/entries",
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/memories/{memory_id}/entries/{entry_id}",
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/memories/{memory_id}/entries/{entry_id}",
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/memories/{memory_id}/entries/{entry_id}",
1769
+ url: "/api/v1/memory-entries/{entry_id}",
1799
1770
  ...options,
1800
1771
  headers: {
1801
1772
  "Content-Type": "application/json",
@@ -1871,22 +1842,22 @@ var Orchestrations = class {
1871
1842
  /**
1872
1843
  * List orchestration runs
1873
1844
  *
1874
- * Returns all runs for an orchestration.
1845
+ * Returns orchestration runs the caller can access, optionally filtered by orchestration.
1875
1846
  */
1876
1847
  static listOrchestrationRuns(options) {
1877
- return (options.client ?? client).get({
1878
- url: "/api/v1/orchestrations/{orchestration_id}/runs",
1848
+ return (options?.client ?? client).get({
1849
+ url: "/api/v1/orchestration-runs",
1879
1850
  ...options
1880
1851
  });
1881
1852
  }
1882
1853
  /**
1883
1854
  * Start an orchestration run
1884
1855
  *
1885
- * Creates and immediately executes a new run for the orchestration.
1856
+ * Creates and immediately executes a new run for the orchestration named by orchestration_id.
1886
1857
  */
1887
1858
  static startOrchestrationRun(options) {
1888
1859
  return (options.client ?? client).post({
1889
- url: "/api/v1/orchestrations/{orchestration_id}/runs",
1860
+ url: "/api/v1/orchestration-runs",
1890
1861
  ...options,
1891
1862
  headers: {
1892
1863
  "Content-Type": "application/json",
@@ -1901,7 +1872,7 @@ var Orchestrations = class {
1901
1872
  */
1902
1873
  static cancelOrchestrationRun(options) {
1903
1874
  return (options.client ?? client).post({
1904
- url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/cancel",
1875
+ url: "/api/v1/orchestration-runs/{run_id}/cancel",
1905
1876
  ...options
1906
1877
  });
1907
1878
  }
@@ -1912,7 +1883,7 @@ var Orchestrations = class {
1912
1883
  */
1913
1884
  static submitHumanInput(options) {
1914
1885
  return (options.client ?? client).post({
1915
- url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/human-input",
1886
+ url: "/api/v1/orchestration-runs/{run_id}/human-input",
1916
1887
  ...options,
1917
1888
  headers: {
1918
1889
  "Content-Type": "application/json",
@@ -1927,7 +1898,7 @@ var Orchestrations = class {
1927
1898
  */
1928
1899
  static resumeOrchestrationRun(options) {
1929
1900
  return (options.client ?? client).post({
1930
- url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/resume",
1901
+ url: "/api/v1/orchestration-runs/{run_id}/resume",
1931
1902
  ...options
1932
1903
  });
1933
1904
  }
@@ -1938,7 +1909,7 @@ var Orchestrations = class {
1938
1909
  */
1939
1910
  static getOrchestrationRun(options) {
1940
1911
  return (options.client ?? client).get({
1941
- url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}",
1912
+ url: "/api/v1/orchestration-runs/{run_id}",
1942
1913
  ...options
1943
1914
  });
1944
1915
  }
@@ -1947,7 +1918,8 @@ var Policies = class {
1947
1918
  /**
1948
1919
  * List all policies
1949
1920
  *
1950
- * Returns a list of all global policies. Requires admin role.
1921
+ * 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).
1922
+ *
1951
1923
  */
1952
1924
  static listPolicies(options) {
1953
1925
  return (options?.client ?? client).get({
@@ -2132,11 +2104,11 @@ var Sessions = class {
2132
2104
  /**
2133
2105
  * List sessions
2134
2106
  *
2135
- * Returns sessions for the specified agent, optionally filtered by actorId and status.
2107
+ * Returns sessions the caller can access, optionally filtered by agent, actor and status.
2136
2108
  */
2137
- static listAgentSessions(options) {
2138
- return (options.client ?? client).get({
2139
- url: "/api/v1/agents/{agent_id}/sessions",
2109
+ static listSessions(options) {
2110
+ return (options?.client ?? client).get({
2111
+ url: "/api/v1/sessions",
2140
2112
  ...options
2141
2113
  });
2142
2114
  }
@@ -2146,13 +2118,13 @@ var Sessions = class {
2146
2118
  * 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
2119
  *
2148
2120
  */
2149
- static createAgentSession(options) {
2150
- return (options.client ?? client).post({
2151
- url: "/api/v1/agents/{agent_id}/sessions",
2121
+ static createSession(options) {
2122
+ return (options?.client ?? client).post({
2123
+ url: "/api/v1/sessions",
2152
2124
  ...options,
2153
2125
  headers: {
2154
2126
  "Content-Type": "application/json",
2155
- ...options.headers
2127
+ ...options?.headers
2156
2128
  }
2157
2129
  });
2158
2130
  }
@@ -2161,9 +2133,9 @@ var Sessions = class {
2161
2133
  *
2162
2134
  * Deletes the session and its underlying conversation and actors.
2163
2135
  */
2164
- static deleteAgentSession(options) {
2136
+ static deleteSession(options) {
2165
2137
  return (options.client ?? client).delete({
2166
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
2138
+ url: "/api/v1/sessions/{session_id}",
2167
2139
  ...options
2168
2140
  });
2169
2141
  }
@@ -2172,9 +2144,9 @@ var Sessions = class {
2172
2144
  *
2173
2145
  * Returns details of a single session.
2174
2146
  */
2175
- static getAgentSession(options) {
2147
+ static getSession(options) {
2176
2148
  return (options.client ?? client).get({
2177
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
2149
+ url: "/api/v1/sessions/{session_id}",
2178
2150
  ...options
2179
2151
  });
2180
2152
  }
@@ -2185,7 +2157,7 @@ var Sessions = class {
2185
2157
  */
2186
2158
  static updateSession(options) {
2187
2159
  return (options.client ?? client).patch({
2188
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
2160
+ url: "/api/v1/sessions/{session_id}",
2189
2161
  ...options,
2190
2162
  headers: {
2191
2163
  "Content-Type": "application/json",
@@ -2194,18 +2166,6 @@ var Sessions = class {
2194
2166
  });
2195
2167
  }
2196
2168
  /**
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
2169
  * Add a user message
2210
2170
  *
2211
2171
  * 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 +2173,7 @@ var Sessions = class {
2213
2173
  */
2214
2174
  static addSessionMessage(options) {
2215
2175
  return (options.client ?? client).post({
2216
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/messages",
2176
+ url: "/api/v1/sessions/{session_id}/messages",
2217
2177
  ...options,
2218
2178
  headers: {
2219
2179
  "Content-Type": "application/json",
@@ -2229,7 +2189,7 @@ var Sessions = class {
2229
2189
  */
2230
2190
  static generateSessionResponse(options) {
2231
2191
  return (options.client ?? client).post({
2232
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/generate",
2192
+ url: "/api/v1/sessions/{session_id}/generate",
2233
2193
  ...options,
2234
2194
  headers: {
2235
2195
  "Content-Type": "application/json",
@@ -2245,7 +2205,7 @@ var Sessions = class {
2245
2205
  */
2246
2206
  static submitSessionToolOutputs(options) {
2247
2207
  return (options.client ?? client).post({
2248
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tool-outputs",
2208
+ url: "/api/v1/sessions/{session_id}/tool-outputs",
2249
2209
  ...options,
2250
2210
  headers: {
2251
2211
  "Content-Type": "application/json",
@@ -2260,7 +2220,7 @@ var Sessions = class {
2260
2220
  */
2261
2221
  static getSessionTags(options) {
2262
2222
  return (options.client ?? client).get({
2263
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
2223
+ url: "/api/v1/sessions/{session_id}/tags",
2264
2224
  ...options
2265
2225
  });
2266
2226
  }
@@ -2271,7 +2231,7 @@ var Sessions = class {
2271
2231
  */
2272
2232
  static mergeSessionTags(options) {
2273
2233
  return (options.client ?? client).patch({
2274
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
2234
+ url: "/api/v1/sessions/{session_id}/tags",
2275
2235
  ...options,
2276
2236
  headers: {
2277
2237
  "Content-Type": "application/json",
@@ -2286,7 +2246,7 @@ var Sessions = class {
2286
2246
  */
2287
2247
  static replaceSessionTags(options) {
2288
2248
  return (options.client ?? client).put({
2289
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
2249
+ url: "/api/v1/sessions/{session_id}/tags",
2290
2250
  ...options,
2291
2251
  headers: {
2292
2252
  "Content-Type": "application/json",
@@ -2413,17 +2373,6 @@ var Traces = class {
2413
2373
  ...options
2414
2374
  });
2415
2375
  }
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
2376
  };
2428
2377
  var Users = class {
2429
2378
  /**
@@ -2516,17 +2465,6 @@ var Users = class {
2516
2465
  });
2517
2466
  }
2518
2467
  /**
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
2468
  * Attach policies to a user
2531
2469
  *
2532
2470
  * Replaces the user's policy list with the provided policy IDs. Requires admin role.
@@ -2607,13 +2545,13 @@ var Webhooks = class {
2607
2545
  });
2608
2546
  }
2609
2547
  /**
2610
- * List deliveries for a webhook
2548
+ * List webhook deliveries
2611
2549
  *
2612
- * Lists all event deliveries for a specific webhook
2550
+ * Lists event deliveries for a webhook (webhook_id is required).
2613
2551
  */
2614
2552
  static listWebhookDeliveries(options) {
2615
2553
  return (options.client ?? client).get({
2616
- url: "/api/v1/webhooks/{webhook_id}/deliveries",
2554
+ url: "/api/v1/webhook-deliveries",
2617
2555
  ...options
2618
2556
  });
2619
2557
  }
@@ -2624,7 +2562,7 @@ var Webhooks = class {
2624
2562
  */
2625
2563
  static getWebhookDelivery(options) {
2626
2564
  return (options.client ?? client).get({
2627
- url: "/api/v1/webhooks/{webhook_id}/deliveries/{delivery_id}",
2565
+ url: "/api/v1/webhook-deliveries/{delivery_id}",
2628
2566
  ...options
2629
2567
  });
2630
2568
  }