@soat/sdk 0.5.7 → 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,74 +971,6 @@ var Actors = class {
971
971
  });
972
972
  }
973
973
  };
974
- var AgentTools = class {
975
- static {
976
- __name(this, "AgentTools");
977
- }
978
- /**
979
- * List agent tools
980
- *
981
- * Returns all agent tools in the project.
982
- */
983
- static listAgentTools(options) {
984
- return (options?.client ?? client).get({
985
- url: "/api/v1/agents/tools",
986
- ...options
987
- });
988
- }
989
- /**
990
- * Create an agent tool
991
- *
992
- * Creates a new agent tool in the project.
993
- */
994
- static createAgentTool(options) {
995
- return (options.client ?? client).post({
996
- url: "/api/v1/agents/tools",
997
- ...options,
998
- headers: {
999
- "Content-Type": "application/json",
1000
- ...options.headers
1001
- }
1002
- });
1003
- }
1004
- /**
1005
- * Delete an agent tool
1006
- *
1007
- * Deletes an agent tool by ID.
1008
- */
1009
- static deleteAgentTool(options) {
1010
- return (options.client ?? client).delete({
1011
- url: "/api/v1/agents/tools/{tool_id}",
1012
- ...options
1013
- });
1014
- }
1015
- /**
1016
- * Get an agent tool
1017
- *
1018
- * Returns a single agent tool by ID.
1019
- */
1020
- static getAgentTool(options) {
1021
- return (options.client ?? client).get({
1022
- url: "/api/v1/agents/tools/{tool_id}",
1023
- ...options
1024
- });
1025
- }
1026
- /**
1027
- * Update an agent tool
1028
- *
1029
- * Updates an existing agent tool.
1030
- */
1031
- static updateAgentTool(options) {
1032
- return (options.client ?? client).put({
1033
- url: "/api/v1/agents/tools/{tool_id}",
1034
- ...options,
1035
- headers: {
1036
- "Content-Type": "application/json",
1037
- ...options.headers
1038
- }
1039
- });
1040
- }
1041
- };
1042
974
  var Agents = class {
1043
975
  static {
1044
976
  __name(this, "Agents");
@@ -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, AgentTools, Agents, AiProviders, ApiKeys, Chats, Conversations, Documents, Files, Formations, 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 };