@naturali/sdk 0.220.1 → 0.220.3

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
@@ -2213,7 +2213,7 @@ var Deciders = class {
2213
2213
  /**
2214
2214
  * Create a decider
2215
2215
  *
2216
- * Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must be `http` or `pipeline` and must not pin `input` or `questions` in its `preset_parameters`, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.
2216
+ * Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must run server-side with no `action` (not `client` or `mcp`) and must not pin `input` or `questions` in its `preset_parameters`, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.
2217
2217
  */
2218
2218
  static createDecider(options) {
2219
2219
  return (options.client ?? client).post({
@@ -3753,6 +3753,112 @@ var Listings = class {
3753
3753
  });
3754
3754
  }
3755
3755
  };
3756
+ var McpServers = class {
3757
+ /**
3758
+ * List MCP servers
3759
+ *
3760
+ * The project's MCP servers, newest first.
3761
+ */
3762
+ static listMcpServers(options) {
3763
+ return (options.client ?? client).get({
3764
+ url: "/v1/projects/{project_id}/mcp-servers",
3765
+ ...options
3766
+ });
3767
+ }
3768
+ /**
3769
+ * Create an MCP server
3770
+ *
3771
+ * Each item of `tools` is checked against the tool it names: the project's own or an installed one, else `400`. `action` is required, and must be one of the tool's available actions, when the tool declares `actions`; otherwise it is ignored and stored as `null`. A tool whose definition reads `{{context:naturali_caller_…}}` is refused unless `auth.type` is `oauth`.
3772
+ * `daily_call_limit` is required when `auth` is `none` or `oauth` with `mode: any_account`.
3773
+ *
3774
+ */
3775
+ static createMcpServer(options) {
3776
+ return (options.client ?? client).post({
3777
+ url: "/v1/projects/{project_id}/mcp-servers",
3778
+ ...options,
3779
+ headers: {
3780
+ "Content-Type": "application/json",
3781
+ ...options.headers
3782
+ }
3783
+ });
3784
+ }
3785
+ /**
3786
+ * Delete an MCP server
3787
+ *
3788
+ * Removes the server and its keys.
3789
+ */
3790
+ static deleteMcpServer(options) {
3791
+ return (options.client ?? client).delete({
3792
+ url: "/v1/projects/{project_id}/mcp-servers/{mcp_server_id}",
3793
+ ...options
3794
+ });
3795
+ }
3796
+ /**
3797
+ * Get an MCP server
3798
+ *
3799
+ * The server, with the keys of its context; values are never returned.
3800
+ */
3801
+ static getMcpServer(options) {
3802
+ return (options.client ?? client).get({
3803
+ url: "/v1/projects/{project_id}/mcp-servers/{mcp_server_id}",
3804
+ ...options
3805
+ });
3806
+ }
3807
+ /**
3808
+ * Update an MCP server
3809
+ *
3810
+ * A field sent replaces the stored one, `tools`, `context` and `auth` whole; `null` clears an optional field. The result is checked as on create. Changing `auth.type` away from `header` deletes the server's keys.
3811
+ *
3812
+ */
3813
+ static updateMcpServer(options) {
3814
+ return (options.client ?? client).patch({
3815
+ url: "/v1/projects/{project_id}/mcp-servers/{mcp_server_id}",
3816
+ ...options,
3817
+ headers: {
3818
+ "Content-Type": "application/json",
3819
+ ...options.headers
3820
+ }
3821
+ });
3822
+ }
3823
+ /**
3824
+ * List MCP server keys
3825
+ *
3826
+ * The server's keys, newest first. The secret is not returned.
3827
+ */
3828
+ static listMcpServerKeys(options) {
3829
+ return (options.client ?? client).get({
3830
+ url: "/v1/projects/{project_id}/mcp-servers/{mcp_server_id}/keys",
3831
+ ...options
3832
+ });
3833
+ }
3834
+ /**
3835
+ * Create an MCP server key
3836
+ *
3837
+ * A key confined to this server, for a server whose `auth.type` is `header`. The response carries `key`; **this is the only time it is returned.** `idempotency_key` is refused.
3838
+ *
3839
+ */
3840
+ static createMcpServerKey(options) {
3841
+ return (options.client ?? client).post({
3842
+ url: "/v1/projects/{project_id}/mcp-servers/{mcp_server_id}/keys",
3843
+ ...options,
3844
+ headers: {
3845
+ "Content-Type": "application/json",
3846
+ ...options.headers
3847
+ }
3848
+ });
3849
+ }
3850
+ /**
3851
+ * Revoke an MCP server key
3852
+ *
3853
+ * Deletes the key; a client holding it can no longer connect.
3854
+ */
3855
+ static deleteMcpServerKey(options) {
3856
+ return (options.client ?? client).delete({
3857
+ url: "/v1/projects/{project_id}/mcp-servers/{mcp_server_id}/keys/{key_id}",
3858
+ ...options
3859
+ });
3860
+ }
3861
+ };
3756
3862
  var Memories = class {
3757
3863
  /**
3758
3864
  * List memories
@@ -6589,6 +6695,7 @@ var NaturaliClient = class {
6589
6695
  installs;
6590
6696
  knowledge;
6591
6697
  listings;
6698
+ mcpServers;
6592
6699
  memories;
6593
6700
  memoryRules;
6594
6701
  memoryStores;
@@ -6645,6 +6752,7 @@ var NaturaliClient = class {
6645
6752
  this.installs = bindResource(Installs, this.http);
6646
6753
  this.knowledge = bindResource(Knowledge, this.http);
6647
6754
  this.listings = bindResource(Listings, this.http);
6755
+ this.mcpServers = bindResource(McpServers, this.http);
6648
6756
  this.memories = bindResource(Memories, this.http);
6649
6757
  this.memoryRules = bindResource(MemoryRules, this.http);
6650
6758
  this.memoryStores = bindResource(MemoryStores, this.http);
@@ -6667,4 +6775,4 @@ var NaturaliClient = class {
6667
6775
  }
6668
6776
  };
6669
6777
  //#endregion
6670
- export { Activity, Actors, Admin, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, Assistant, AuditLog, Auth, Chains, Channels, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Installs, Knowledge, Listings, Memories, MemoryRules, MemoryStores, MetadataSchemas, ModelRoutes, Models, NaturaliClient, Orchestrations, Playbooks, Projects, Quotas, Secrets, Sessions, Tasks, Tools, Traces, Triggers, Users, Webhooks, Workflows, createClient, createConfig };
6778
+ export { Activity, Actors, Admin, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, Assistant, AuditLog, Auth, Chains, Channels, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Installs, Knowledge, Listings, McpServers, Memories, MemoryRules, MemoryStores, MetadataSchemas, ModelRoutes, Models, NaturaliClient, Orchestrations, Playbooks, Projects, Quotas, Secrets, Sessions, Tasks, Tools, Traces, Triggers, Users, Webhooks, Workflows, createClient, createConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.220.1",
3
+ "version": "0.220.3",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hey-api/openapi-ts": "^0.99.0",
41
- "@naturali/api": "0.220.1",
41
+ "@naturali/api": "0.220.3",
42
42
  "@ttoss/openapi-codegen": "^0.10.0",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",