@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.mjs CHANGED
@@ -823,21 +823,6 @@ var Agents = class {
823
823
  }
824
824
  });
825
825
  }
826
- /**
827
- * Create an actor for an agent
828
- *
829
- * Creates a new actor associated with the specified agent
830
- */
831
- static createAgentActor(options) {
832
- return (options.client ?? client).post({
833
- url: "/api/v1/agents/{agent_id}/actors",
834
- ...options,
835
- headers: {
836
- "Content-Type": "application/json",
837
- ...options.headers
838
- }
839
- });
840
- }
841
826
  };
842
827
  var AiProviders = class {
843
828
  /**
@@ -1043,27 +1028,12 @@ var Chats = class {
1043
1028
  /**
1044
1029
  * Create a chat completion (stateless)
1045
1030
  *
1046
- * 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.
1031
+ * 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.
1047
1032
  *
1048
1033
  */
1049
1034
  static createChatCompletion(options) {
1050
1035
  return (options.client ?? client).post({
1051
- url: "/api/v1/chats/completions",
1052
- ...options,
1053
- headers: {
1054
- "Content-Type": "application/json",
1055
- ...options.headers
1056
- }
1057
- });
1058
- }
1059
- /**
1060
- * Create an actor for a chat
1061
- *
1062
- * Creates a new actor associated with the specified chat
1063
- */
1064
- static createChatActor(options) {
1065
- return (options.client ?? client).post({
1066
- url: "/api/v1/chats/{chat_id}/actors",
1036
+ url: "/api/v1/chat/completions",
1067
1037
  ...options,
1068
1038
  headers: {
1069
1039
  "Content-Type": "application/json",
@@ -1182,17 +1152,6 @@ var Conversations = class {
1182
1152
  });
1183
1153
  }
1184
1154
  /**
1185
- * List actors in a conversation
1186
- *
1187
- * Returns all distinct actors who have sent at least one message in the conversation
1188
- */
1189
- static listConversationActors(options) {
1190
- return (options.client ?? client).get({
1191
- url: "/api/v1/conversations/{conversation_id}/actors",
1192
- ...options
1193
- });
1194
- }
1195
- /**
1196
1155
  * Remove a message from a conversation
1197
1156
  *
1198
1157
  * Removes a document from a conversation
@@ -1643,6 +1602,18 @@ var Formations = class {
1643
1602
  }
1644
1603
  };
1645
1604
  var Generations = class {
1605
+ /**
1606
+ * List generations
1607
+ *
1608
+ * 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).
1609
+ *
1610
+ */
1611
+ static listGenerations(options) {
1612
+ return (options?.client ?? client).get({
1613
+ url: "/api/v1/generations",
1614
+ ...options
1615
+ });
1616
+ }
1646
1617
  /**
1647
1618
  * Get a generation
1648
1619
  *
@@ -1746,7 +1717,7 @@ var MemoryEntries = class {
1746
1717
  */
1747
1718
  static listMemoryEntries(options) {
1748
1719
  return (options.client ?? client).get({
1749
- url: "/api/v1/memories/{memory_id}/entries",
1720
+ url: "/api/v1/memory-entries",
1750
1721
  ...options
1751
1722
  });
1752
1723
  }
@@ -1757,7 +1728,7 @@ var MemoryEntries = class {
1757
1728
  */
1758
1729
  static createMemoryEntry(options) {
1759
1730
  return (options.client ?? client).post({
1760
- url: "/api/v1/memories/{memory_id}/entries",
1731
+ url: "/api/v1/memory-entries",
1761
1732
  ...options,
1762
1733
  headers: {
1763
1734
  "Content-Type": "application/json",
@@ -1772,7 +1743,7 @@ var MemoryEntries = class {
1772
1743
  */
1773
1744
  static deleteMemoryEntry(options) {
1774
1745
  return (options.client ?? client).delete({
1775
- url: "/api/v1/memories/{memory_id}/entries/{entry_id}",
1746
+ url: "/api/v1/memory-entries/{entry_id}",
1776
1747
  ...options
1777
1748
  });
1778
1749
  }
@@ -1783,7 +1754,7 @@ var MemoryEntries = class {
1783
1754
  */
1784
1755
  static getMemoryEntry(options) {
1785
1756
  return (options.client ?? client).get({
1786
- url: "/api/v1/memories/{memory_id}/entries/{entry_id}",
1757
+ url: "/api/v1/memory-entries/{entry_id}",
1787
1758
  ...options
1788
1759
  });
1789
1760
  }
@@ -1794,7 +1765,7 @@ var MemoryEntries = class {
1794
1765
  */
1795
1766
  static updateMemoryEntry(options) {
1796
1767
  return (options.client ?? client).put({
1797
- url: "/api/v1/memories/{memory_id}/entries/{entry_id}",
1768
+ url: "/api/v1/memory-entries/{entry_id}",
1798
1769
  ...options,
1799
1770
  headers: {
1800
1771
  "Content-Type": "application/json",
@@ -1831,6 +1802,22 @@ var Orchestrations = class {
1831
1802
  });
1832
1803
  }
1833
1804
  /**
1805
+ * Validate an orchestration graph
1806
+ *
1807
+ * 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.
1808
+ *
1809
+ */
1810
+ static validateOrchestration(options) {
1811
+ return (options.client ?? client).post({
1812
+ url: "/api/v1/orchestrations/validate",
1813
+ ...options,
1814
+ headers: {
1815
+ "Content-Type": "application/json",
1816
+ ...options.headers
1817
+ }
1818
+ });
1819
+ }
1820
+ /**
1834
1821
  * Delete an orchestration
1835
1822
  *
1836
1823
  * Deletes an orchestration definition and all its runs.
@@ -1870,22 +1857,22 @@ var Orchestrations = class {
1870
1857
  /**
1871
1858
  * List orchestration runs
1872
1859
  *
1873
- * Returns all runs for an orchestration.
1860
+ * Returns orchestration runs the caller can access, optionally filtered by orchestration.
1874
1861
  */
1875
1862
  static listOrchestrationRuns(options) {
1876
- return (options.client ?? client).get({
1877
- url: "/api/v1/orchestrations/{orchestration_id}/runs",
1863
+ return (options?.client ?? client).get({
1864
+ url: "/api/v1/orchestration-runs",
1878
1865
  ...options
1879
1866
  });
1880
1867
  }
1881
1868
  /**
1882
1869
  * Start an orchestration run
1883
1870
  *
1884
- * Creates and immediately executes a new run for the orchestration.
1871
+ * Creates and immediately executes a new run for the orchestration named by orchestration_id.
1885
1872
  */
1886
1873
  static startOrchestrationRun(options) {
1887
1874
  return (options.client ?? client).post({
1888
- url: "/api/v1/orchestrations/{orchestration_id}/runs",
1875
+ url: "/api/v1/orchestration-runs",
1889
1876
  ...options,
1890
1877
  headers: {
1891
1878
  "Content-Type": "application/json",
@@ -1900,7 +1887,7 @@ var Orchestrations = class {
1900
1887
  */
1901
1888
  static cancelOrchestrationRun(options) {
1902
1889
  return (options.client ?? client).post({
1903
- url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/cancel",
1890
+ url: "/api/v1/orchestration-runs/{run_id}/cancel",
1904
1891
  ...options
1905
1892
  });
1906
1893
  }
@@ -1911,7 +1898,7 @@ var Orchestrations = class {
1911
1898
  */
1912
1899
  static submitHumanInput(options) {
1913
1900
  return (options.client ?? client).post({
1914
- url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/human-input",
1901
+ url: "/api/v1/orchestration-runs/{run_id}/human-input",
1915
1902
  ...options,
1916
1903
  headers: {
1917
1904
  "Content-Type": "application/json",
@@ -1926,7 +1913,7 @@ var Orchestrations = class {
1926
1913
  */
1927
1914
  static resumeOrchestrationRun(options) {
1928
1915
  return (options.client ?? client).post({
1929
- url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/resume",
1916
+ url: "/api/v1/orchestration-runs/{run_id}/resume",
1930
1917
  ...options
1931
1918
  });
1932
1919
  }
@@ -1937,7 +1924,7 @@ var Orchestrations = class {
1937
1924
  */
1938
1925
  static getOrchestrationRun(options) {
1939
1926
  return (options.client ?? client).get({
1940
- url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}",
1927
+ url: "/api/v1/orchestration-runs/{run_id}",
1941
1928
  ...options
1942
1929
  });
1943
1930
  }
@@ -1946,7 +1933,8 @@ var Policies = class {
1946
1933
  /**
1947
1934
  * List all policies
1948
1935
  *
1949
- * Returns a list of all global policies. Requires admin role.
1936
+ * 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).
1937
+ *
1950
1938
  */
1951
1939
  static listPolicies(options) {
1952
1940
  return (options?.client ?? client).get({
@@ -2131,11 +2119,11 @@ var Sessions = class {
2131
2119
  /**
2132
2120
  * List sessions
2133
2121
  *
2134
- * Returns sessions for the specified agent, optionally filtered by actorId and status.
2122
+ * Returns sessions the caller can access, optionally filtered by agent, actor and status.
2135
2123
  */
2136
- static listAgentSessions(options) {
2137
- return (options.client ?? client).get({
2138
- url: "/api/v1/agents/{agent_id}/sessions",
2124
+ static listSessions(options) {
2125
+ return (options?.client ?? client).get({
2126
+ url: "/api/v1/sessions",
2139
2127
  ...options
2140
2128
  });
2141
2129
  }
@@ -2145,13 +2133,13 @@ var Sessions = class {
2145
2133
  * 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.
2146
2134
  *
2147
2135
  */
2148
- static createAgentSession(options) {
2149
- return (options.client ?? client).post({
2150
- url: "/api/v1/agents/{agent_id}/sessions",
2136
+ static createSession(options) {
2137
+ return (options?.client ?? client).post({
2138
+ url: "/api/v1/sessions",
2151
2139
  ...options,
2152
2140
  headers: {
2153
2141
  "Content-Type": "application/json",
2154
- ...options.headers
2142
+ ...options?.headers
2155
2143
  }
2156
2144
  });
2157
2145
  }
@@ -2160,9 +2148,9 @@ var Sessions = class {
2160
2148
  *
2161
2149
  * Deletes the session and its underlying conversation and actors.
2162
2150
  */
2163
- static deleteAgentSession(options) {
2151
+ static deleteSession(options) {
2164
2152
  return (options.client ?? client).delete({
2165
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
2153
+ url: "/api/v1/sessions/{session_id}",
2166
2154
  ...options
2167
2155
  });
2168
2156
  }
@@ -2171,9 +2159,9 @@ var Sessions = class {
2171
2159
  *
2172
2160
  * Returns details of a single session.
2173
2161
  */
2174
- static getAgentSession(options) {
2162
+ static getSession(options) {
2175
2163
  return (options.client ?? client).get({
2176
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
2164
+ url: "/api/v1/sessions/{session_id}",
2177
2165
  ...options
2178
2166
  });
2179
2167
  }
@@ -2184,7 +2172,7 @@ var Sessions = class {
2184
2172
  */
2185
2173
  static updateSession(options) {
2186
2174
  return (options.client ?? client).patch({
2187
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
2175
+ url: "/api/v1/sessions/{session_id}",
2188
2176
  ...options,
2189
2177
  headers: {
2190
2178
  "Content-Type": "application/json",
@@ -2193,18 +2181,6 @@ var Sessions = class {
2193
2181
  });
2194
2182
  }
2195
2183
  /**
2196
- * List session messages
2197
- *
2198
- * Returns messages in the session with simplified roles (user/assistant) instead of raw actor IDs.
2199
- *
2200
- */
2201
- static listAgentSessionMessages(options) {
2202
- return (options.client ?? client).get({
2203
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/messages",
2204
- ...options
2205
- });
2206
- }
2207
- /**
2208
2184
  * Add a user message
2209
2185
  *
2210
2186
  * 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.
@@ -2212,7 +2188,7 @@ var Sessions = class {
2212
2188
  */
2213
2189
  static addSessionMessage(options) {
2214
2190
  return (options.client ?? client).post({
2215
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/messages",
2191
+ url: "/api/v1/sessions/{session_id}/messages",
2216
2192
  ...options,
2217
2193
  headers: {
2218
2194
  "Content-Type": "application/json",
@@ -2228,7 +2204,7 @@ var Sessions = class {
2228
2204
  */
2229
2205
  static generateSessionResponse(options) {
2230
2206
  return (options.client ?? client).post({
2231
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/generate",
2207
+ url: "/api/v1/sessions/{session_id}/generate",
2232
2208
  ...options,
2233
2209
  headers: {
2234
2210
  "Content-Type": "application/json",
@@ -2244,7 +2220,7 @@ var Sessions = class {
2244
2220
  */
2245
2221
  static submitSessionToolOutputs(options) {
2246
2222
  return (options.client ?? client).post({
2247
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tool-outputs",
2223
+ url: "/api/v1/sessions/{session_id}/tool-outputs",
2248
2224
  ...options,
2249
2225
  headers: {
2250
2226
  "Content-Type": "application/json",
@@ -2259,7 +2235,7 @@ var Sessions = class {
2259
2235
  */
2260
2236
  static getSessionTags(options) {
2261
2237
  return (options.client ?? client).get({
2262
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
2238
+ url: "/api/v1/sessions/{session_id}/tags",
2263
2239
  ...options
2264
2240
  });
2265
2241
  }
@@ -2270,7 +2246,7 @@ var Sessions = class {
2270
2246
  */
2271
2247
  static mergeSessionTags(options) {
2272
2248
  return (options.client ?? client).patch({
2273
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
2249
+ url: "/api/v1/sessions/{session_id}/tags",
2274
2250
  ...options,
2275
2251
  headers: {
2276
2252
  "Content-Type": "application/json",
@@ -2285,7 +2261,7 @@ var Sessions = class {
2285
2261
  */
2286
2262
  static replaceSessionTags(options) {
2287
2263
  return (options.client ?? client).put({
2288
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
2264
+ url: "/api/v1/sessions/{session_id}/tags",
2289
2265
  ...options,
2290
2266
  headers: {
2291
2267
  "Content-Type": "application/json",
@@ -2412,17 +2388,6 @@ var Traces = class {
2412
2388
  ...options
2413
2389
  });
2414
2390
  }
2415
- /**
2416
- * Get generation IDs for a trace
2417
- *
2418
- * Returns all generation IDs associated with the trace.
2419
- */
2420
- static getTraceGenerations(options) {
2421
- return (options.client ?? client).get({
2422
- url: "/api/v1/traces/{trace_id}/generations",
2423
- ...options
2424
- });
2425
- }
2426
2391
  };
2427
2392
  var Users = class {
2428
2393
  /**
@@ -2515,17 +2480,6 @@ var Users = class {
2515
2480
  });
2516
2481
  }
2517
2482
  /**
2518
- * Get policies attached to a user
2519
- *
2520
- * Returns the list of policies attached to a user. Requires admin role.
2521
- */
2522
- static getUserPolicies(options) {
2523
- return (options.client ?? client).get({
2524
- url: "/api/v1/users/{user_id}/policies",
2525
- ...options
2526
- });
2527
- }
2528
- /**
2529
2483
  * Attach policies to a user
2530
2484
  *
2531
2485
  * Replaces the user's policy list with the provided policy IDs. Requires admin role.
@@ -2606,13 +2560,13 @@ var Webhooks = class {
2606
2560
  });
2607
2561
  }
2608
2562
  /**
2609
- * List deliveries for a webhook
2563
+ * List webhook deliveries
2610
2564
  *
2611
- * Lists all event deliveries for a specific webhook
2565
+ * Lists event deliveries for a webhook (webhook_id is required).
2612
2566
  */
2613
2567
  static listWebhookDeliveries(options) {
2614
2568
  return (options.client ?? client).get({
2615
- url: "/api/v1/webhooks/{webhook_id}/deliveries",
2569
+ url: "/api/v1/webhook-deliveries",
2616
2570
  ...options
2617
2571
  });
2618
2572
  }
@@ -2623,7 +2577,7 @@ var Webhooks = class {
2623
2577
  */
2624
2578
  static getWebhookDelivery(options) {
2625
2579
  return (options.client ?? client).get({
2626
- url: "/api/v1/webhooks/{webhook_id}/deliveries/{delivery_id}",
2580
+ url: "/api/v1/webhook-deliveries/{delivery_id}",
2627
2581
  ...options
2628
2582
  });
2629
2583
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/sdk",
3
- "version": "0.12.5",
3
+ "version": "0.13.1",
4
4
  "description": "TypeScript SDK for the SOAT API",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",