@soat/sdk 0.5.6 → 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 CHANGED
@@ -971,189 +971,6 @@ var Actors = class {
971
971
  });
972
972
  }
973
973
  };
974
- var AgentFormations = class {
975
- static {
976
- __name(this, "AgentFormations");
977
- }
978
- /**
979
- * Validate a formation template
980
- *
981
- * Validates a formation template without creating any resources. Returns a list of errors and warnings. Accepts the template as a JSON object or as a YAML/JSON string.
982
- *
983
- */
984
- static validateAgentFormation(options) {
985
- return (options.client ?? client).post({
986
- url: "/api/v1/agent-formations/validate",
987
- ...options,
988
- headers: {
989
- "Content-Type": "application/json",
990
- ...options.headers
991
- }
992
- });
993
- }
994
- /**
995
- * Plan a formation deployment
996
- *
997
- * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.
998
- *
999
- */
1000
- static planAgentFormation(options) {
1001
- return (options.client ?? client).post({
1002
- url: "/api/v1/agent-formations/plan",
1003
- ...options,
1004
- headers: {
1005
- "Content-Type": "application/json",
1006
- ...options.headers
1007
- }
1008
- });
1009
- }
1010
- /**
1011
- * List agent formations
1012
- *
1013
- * Returns all formation stacks for a project
1014
- */
1015
- static listAgentFormations(options) {
1016
- return (options?.client ?? client).get({
1017
- url: "/api/v1/agent-formations",
1018
- ...options
1019
- });
1020
- }
1021
- /**
1022
- * Create a new agent formation
1023
- *
1024
- * Validates the template, creates the formation record, then provisions all declared resources in dependency order.
1025
- *
1026
- */
1027
- static createAgentFormation(options) {
1028
- return (options.client ?? client).post({
1029
- url: "/api/v1/agent-formations",
1030
- ...options,
1031
- headers: {
1032
- "Content-Type": "application/json",
1033
- ...options.headers
1034
- }
1035
- });
1036
- }
1037
- /**
1038
- * Delete an agent formation
1039
- *
1040
- * Deletes the formation stack and all its managed resources in reverse dependency order.
1041
- *
1042
- */
1043
- static deleteAgentFormation(options) {
1044
- return (options.client ?? client).delete({
1045
- url: "/api/v1/agent-formations/{formation_id}",
1046
- ...options
1047
- });
1048
- }
1049
- /**
1050
- * Get a specific agent formation
1051
- *
1052
- * Returns the formation stack including its current resources.
1053
- */
1054
- static getAgentFormation(options) {
1055
- return (options.client ?? client).get({
1056
- url: "/api/v1/agent-formations/{formation_id}",
1057
- ...options
1058
- });
1059
- }
1060
- /**
1061
- * Update an agent formation
1062
- *
1063
- * Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
1064
- *
1065
- */
1066
- static updateAgentFormation(options) {
1067
- return (options.client ?? client).put({
1068
- url: "/api/v1/agent-formations/{formation_id}",
1069
- ...options,
1070
- headers: {
1071
- "Content-Type": "application/json",
1072
- ...options.headers
1073
- }
1074
- });
1075
- }
1076
- /**
1077
- * List formation operation events
1078
- *
1079
- * Returns all operations (create, update, delete) with their event logs for the formation, ordered chronologically.
1080
- *
1081
- */
1082
- static listAgentFormationEvents(options) {
1083
- return (options.client ?? client).get({
1084
- url: "/api/v1/agent-formations/{formation_id}/events",
1085
- ...options
1086
- });
1087
- }
1088
- };
1089
- var AgentTools = class {
1090
- static {
1091
- __name(this, "AgentTools");
1092
- }
1093
- /**
1094
- * List agent tools
1095
- *
1096
- * Returns all agent tools in the project.
1097
- */
1098
- static listAgentTools(options) {
1099
- return (options?.client ?? client).get({
1100
- url: "/api/v1/agents/tools",
1101
- ...options
1102
- });
1103
- }
1104
- /**
1105
- * Create an agent tool
1106
- *
1107
- * Creates a new agent tool in the project.
1108
- */
1109
- static createAgentTool(options) {
1110
- return (options.client ?? client).post({
1111
- url: "/api/v1/agents/tools",
1112
- ...options,
1113
- headers: {
1114
- "Content-Type": "application/json",
1115
- ...options.headers
1116
- }
1117
- });
1118
- }
1119
- /**
1120
- * Delete an agent tool
1121
- *
1122
- * Deletes an agent tool by ID.
1123
- */
1124
- static deleteAgentTool(options) {
1125
- return (options.client ?? client).delete({
1126
- url: "/api/v1/agents/tools/{tool_id}",
1127
- ...options
1128
- });
1129
- }
1130
- /**
1131
- * Get an agent tool
1132
- *
1133
- * Returns a single agent tool by ID.
1134
- */
1135
- static getAgentTool(options) {
1136
- return (options.client ?? client).get({
1137
- url: "/api/v1/agents/tools/{tool_id}",
1138
- ...options
1139
- });
1140
- }
1141
- /**
1142
- * Update an agent tool
1143
- *
1144
- * Updates an existing agent tool.
1145
- */
1146
- static updateAgentTool(options) {
1147
- return (options.client ?? client).put({
1148
- url: "/api/v1/agents/tools/{tool_id}",
1149
- ...options,
1150
- headers: {
1151
- "Content-Type": "application/json",
1152
- ...options.headers
1153
- }
1154
- });
1155
- }
1156
- };
1157
974
  var Agents = class {
1158
975
  static {
1159
976
  __name(this, "Agents");
@@ -1958,6 +1775,121 @@ var Files = class {
1958
1775
  });
1959
1776
  }
1960
1777
  };
1778
+ var Formations = class {
1779
+ static {
1780
+ __name(this, "Formations");
1781
+ }
1782
+ /**
1783
+ * Validate a formation template
1784
+ *
1785
+ * Validates a formation template without creating any resources. Returns a list of errors and warnings. Accepts the template as a JSON object or as a YAML/JSON string.
1786
+ *
1787
+ */
1788
+ static validateFormation(options) {
1789
+ return (options.client ?? client).post({
1790
+ url: "/api/v1/formations/validate",
1791
+ ...options,
1792
+ headers: {
1793
+ "Content-Type": "application/json",
1794
+ ...options.headers
1795
+ }
1796
+ });
1797
+ }
1798
+ /**
1799
+ * Plan a formation deployment
1800
+ *
1801
+ * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.
1802
+ *
1803
+ */
1804
+ static planFormation(options) {
1805
+ return (options.client ?? client).post({
1806
+ url: "/api/v1/formations/plan",
1807
+ ...options,
1808
+ headers: {
1809
+ "Content-Type": "application/json",
1810
+ ...options.headers
1811
+ }
1812
+ });
1813
+ }
1814
+ /**
1815
+ * List formations
1816
+ *
1817
+ * Returns all formation stacks for a project
1818
+ */
1819
+ static listFormations(options) {
1820
+ return (options?.client ?? client).get({
1821
+ url: "/api/v1/formations",
1822
+ ...options
1823
+ });
1824
+ }
1825
+ /**
1826
+ * Create a new formation
1827
+ *
1828
+ * Validates the template, creates the formation record, then provisions all declared resources in dependency order.
1829
+ *
1830
+ */
1831
+ static createFormation(options) {
1832
+ return (options.client ?? client).post({
1833
+ url: "/api/v1/formations",
1834
+ ...options,
1835
+ headers: {
1836
+ "Content-Type": "application/json",
1837
+ ...options.headers
1838
+ }
1839
+ });
1840
+ }
1841
+ /**
1842
+ * Delete an formation
1843
+ *
1844
+ * Deletes the formation stack and all its managed resources in reverse dependency order.
1845
+ *
1846
+ */
1847
+ static deleteFormation(options) {
1848
+ return (options.client ?? client).delete({
1849
+ url: "/api/v1/formations/{formation_id}",
1850
+ ...options
1851
+ });
1852
+ }
1853
+ /**
1854
+ * Get a specific formation
1855
+ *
1856
+ * Returns the formation stack including its current resources.
1857
+ */
1858
+ static getFormation(options) {
1859
+ return (options.client ?? client).get({
1860
+ url: "/api/v1/formations/{formation_id}",
1861
+ ...options
1862
+ });
1863
+ }
1864
+ /**
1865
+ * Update an formation
1866
+ *
1867
+ * Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
1868
+ *
1869
+ */
1870
+ static updateFormation(options) {
1871
+ return (options.client ?? client).put({
1872
+ url: "/api/v1/formations/{formation_id}",
1873
+ ...options,
1874
+ headers: {
1875
+ "Content-Type": "application/json",
1876
+ ...options.headers
1877
+ }
1878
+ });
1879
+ }
1880
+ /**
1881
+ * List formation operation events
1882
+ *
1883
+ * Returns all operations (create, update, delete) with their event logs for the formation, ordered chronologically.
1884
+ *
1885
+ */
1886
+ static listFormationEvents(options) {
1887
+ return (options.client ?? client).get({
1888
+ url: "/api/v1/formations/{formation_id}/events",
1889
+ ...options
1890
+ });
1891
+ }
1892
+ };
1961
1893
  var Knowledge = class {
1962
1894
  static {
1963
1895
  __name(this, "Knowledge");
@@ -2462,6 +2394,92 @@ var Sessions = class {
2462
2394
  });
2463
2395
  }
2464
2396
  };
2397
+ var Tools = class {
2398
+ static {
2399
+ __name(this, "Tools");
2400
+ }
2401
+ /**
2402
+ * List tools
2403
+ *
2404
+ * Returns all tools in the project.
2405
+ */
2406
+ static listTools(options) {
2407
+ return (options?.client ?? client).get({
2408
+ url: "/api/v1/tools",
2409
+ ...options
2410
+ });
2411
+ }
2412
+ /**
2413
+ * Create a tool
2414
+ *
2415
+ * Creates a new tool in the project.
2416
+ */
2417
+ static createTool(options) {
2418
+ return (options.client ?? client).post({
2419
+ url: "/api/v1/tools",
2420
+ ...options,
2421
+ headers: {
2422
+ "Content-Type": "application/json",
2423
+ ...options.headers
2424
+ }
2425
+ });
2426
+ }
2427
+ /**
2428
+ * Delete a tool
2429
+ *
2430
+ * Deletes a tool by ID.
2431
+ */
2432
+ static deleteTool(options) {
2433
+ return (options.client ?? client).delete({
2434
+ url: "/api/v1/tools/{tool_id}",
2435
+ ...options
2436
+ });
2437
+ }
2438
+ /**
2439
+ * Get a tool
2440
+ *
2441
+ * Returns a single tool by ID.
2442
+ */
2443
+ static getTool(options) {
2444
+ return (options.client ?? client).get({
2445
+ url: "/api/v1/tools/{tool_id}",
2446
+ ...options
2447
+ });
2448
+ }
2449
+ /**
2450
+ * Update a tool
2451
+ *
2452
+ * Updates an existing tool.
2453
+ */
2454
+ static updateTool(options) {
2455
+ return (options.client ?? client).patch({
2456
+ url: "/api/v1/tools/{tool_id}",
2457
+ ...options,
2458
+ headers: {
2459
+ "Content-Type": "application/json",
2460
+ ...options.headers
2461
+ }
2462
+ });
2463
+ }
2464
+ /**
2465
+ * Call a tool
2466
+ *
2467
+ * 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.
2468
+ * 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.
2469
+ * `preset_parameters` stored on the tool are merged with the caller-supplied `input` before execution; preset keys take lower precedence.
2470
+ *
2471
+ */
2472
+ static callTool(options) {
2473
+ return (options.client ?? client).post({
2474
+ url: "/api/v1/tools/{tool_id}/call",
2475
+ ...options,
2476
+ headers: {
2477
+ "Content-Type": "application/json",
2478
+ ...options.headers
2479
+ }
2480
+ });
2481
+ }
2482
+ };
2465
2483
  var Traces = class {
2466
2484
  static {
2467
2485
  __name(this, "Traces");
@@ -2699,6 +2717,17 @@ var Webhooks = class {
2699
2717
  ...options
2700
2718
  });
2701
2719
  }
2720
+ /**
2721
+ * Get webhook secret
2722
+ *
2723
+ * Retrieves the signing secret for the specified webhook
2724
+ */
2725
+ static getWebhookSecret(options) {
2726
+ return (options.client ?? client).get({
2727
+ url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}/secret",
2728
+ ...options
2729
+ });
2730
+ }
2702
2731
  /**
2703
2732
  * Rotate webhook secret
2704
2733
  *
@@ -2734,7 +2763,6 @@ var SoatClient = class {
2734
2763
  __name(this, "SoatClient");
2735
2764
  }
2736
2765
  actors;
2737
- agentTools;
2738
2766
  agents;
2739
2767
  aiProviders;
2740
2768
  apiKeys;
@@ -2742,10 +2770,15 @@ var SoatClient = class {
2742
2770
  conversations;
2743
2771
  documents;
2744
2772
  files;
2773
+ formations;
2774
+ knowledge;
2775
+ memories;
2776
+ memoryEntries;
2745
2777
  policies;
2746
2778
  projects;
2747
2779
  secrets;
2748
2780
  sessions;
2781
+ tools;
2749
2782
  traces;
2750
2783
  users;
2751
2784
  webhooks;
@@ -2765,7 +2798,6 @@ var SoatClient = class {
2765
2798
  }
2766
2799
  }));
2767
2800
  this.actors = bindResource(Actors, httpClient);
2768
- this.agentTools = bindResource(AgentTools, httpClient);
2769
2801
  this.agents = bindResource(Agents, httpClient);
2770
2802
  this.aiProviders = bindResource(AiProviders, httpClient);
2771
2803
  this.apiKeys = bindResource(ApiKeys, httpClient);
@@ -2773,13 +2805,18 @@ var SoatClient = class {
2773
2805
  this.conversations = bindResource(Conversations, httpClient);
2774
2806
  this.documents = bindResource(Documents, httpClient);
2775
2807
  this.files = bindResource(Files, httpClient);
2808
+ this.formations = bindResource(Formations, httpClient);
2809
+ this.knowledge = bindResource(Knowledge, httpClient);
2810
+ this.memories = bindResource(Memories, httpClient);
2811
+ this.memoryEntries = bindResource(MemoryEntries, httpClient);
2776
2812
  this.policies = bindResource(Policies, httpClient);
2777
2813
  this.projects = bindResource(Projects, httpClient);
2778
2814
  this.secrets = bindResource(Secrets, httpClient);
2779
2815
  this.sessions = bindResource(Sessions, httpClient);
2816
+ this.tools = bindResource(Tools, httpClient);
2780
2817
  this.traces = bindResource(Traces, httpClient);
2781
2818
  this.users = bindResource(Users, httpClient);
2782
2819
  this.webhooks = bindResource(Webhooks, httpClient);
2783
2820
  }
2784
2821
  };
2785
- export { Actors, AgentFormations, AgentTools, Agents, AiProviders, ApiKeys, Chats, Conversations, Documents, Files, Knowledge, Memories, MemoryEntries, Policies, Projects, Secrets, Sessions, SoatClient, Traces, Users, Webhooks, createClient, createConfig };
2822
+ export { Actors, Agents, AiProviders, ApiKeys, Chats, Conversations, Documents, Files, Formations, Knowledge, Memories, MemoryEntries, Policies, Projects, Secrets, Sessions, SoatClient, Tools, Traces, Users, Webhooks, createClient, createConfig };