@smithery/api 0.24.0 → 0.25.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.
Files changed (96) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/client.d.mts +6 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs +1 -1
  8. package/client.mjs.map +1 -1
  9. package/lib/mcp-transport.d.mts +16 -11
  10. package/lib/mcp-transport.d.mts.map +1 -1
  11. package/lib/mcp-transport.d.ts +16 -11
  12. package/lib/mcp-transport.d.ts.map +1 -1
  13. package/lib/mcp-transport.js +36 -16
  14. package/lib/mcp-transport.js.map +1 -1
  15. package/lib/mcp-transport.mjs +34 -14
  16. package/lib/mcp-transport.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/resources/beta/connect/connect.d.mts +2 -2
  19. package/resources/beta/connect/connect.d.mts.map +1 -1
  20. package/resources/beta/connect/connect.d.ts +2 -2
  21. package/resources/beta/connect/connect.d.ts.map +1 -1
  22. package/resources/beta/connect/connect.js.map +1 -1
  23. package/resources/beta/connect/connect.mjs.map +1 -1
  24. package/resources/beta/connect/connections.d.mts +38 -24
  25. package/resources/beta/connect/connections.d.mts.map +1 -1
  26. package/resources/beta/connect/connections.d.ts +38 -24
  27. package/resources/beta/connect/connections.d.ts.map +1 -1
  28. package/resources/beta/connect/connections.js +21 -21
  29. package/resources/beta/connect/connections.js.map +1 -1
  30. package/resources/beta/connect/connections.mjs +21 -21
  31. package/resources/beta/connect/connections.mjs.map +1 -1
  32. package/resources/beta/connect/index.d.mts +1 -1
  33. package/resources/beta/connect/index.d.mts.map +1 -1
  34. package/resources/beta/connect/index.d.ts +1 -1
  35. package/resources/beta/connect/index.d.ts.map +1 -1
  36. package/resources/beta/connect/index.js.map +1 -1
  37. package/resources/beta/connect/index.mjs.map +1 -1
  38. package/resources/index.d.mts +3 -3
  39. package/resources/index.d.mts.map +1 -1
  40. package/resources/index.d.ts +3 -3
  41. package/resources/index.d.ts.map +1 -1
  42. package/resources/index.js.map +1 -1
  43. package/resources/index.mjs +1 -1
  44. package/resources/index.mjs.map +1 -1
  45. package/resources/namespaces.d.mts +11 -16
  46. package/resources/namespaces.d.mts.map +1 -1
  47. package/resources/namespaces.d.ts +11 -16
  48. package/resources/namespaces.d.ts.map +1 -1
  49. package/resources/namespaces.js +12 -15
  50. package/resources/namespaces.js.map +1 -1
  51. package/resources/namespaces.mjs +12 -15
  52. package/resources/namespaces.mjs.map +1 -1
  53. package/resources/servers/deployments.d.mts +30 -27
  54. package/resources/servers/deployments.d.mts.map +1 -1
  55. package/resources/servers/deployments.d.ts +30 -27
  56. package/resources/servers/deployments.d.ts.map +1 -1
  57. package/resources/servers/deployments.js +7 -7
  58. package/resources/servers/deployments.js.map +1 -1
  59. package/resources/servers/deployments.mjs +7 -7
  60. package/resources/servers/deployments.mjs.map +1 -1
  61. package/resources/servers/index.d.mts +2 -2
  62. package/resources/servers/index.d.mts.map +1 -1
  63. package/resources/servers/index.d.ts +2 -2
  64. package/resources/servers/index.d.ts.map +1 -1
  65. package/resources/servers/servers.d.mts +30 -30
  66. package/resources/servers/servers.d.mts.map +1 -1
  67. package/resources/servers/servers.d.ts +30 -30
  68. package/resources/servers/servers.d.ts.map +1 -1
  69. package/resources/servers/servers.js +6 -6
  70. package/resources/servers/servers.js.map +1 -1
  71. package/resources/servers/servers.mjs +6 -6
  72. package/resources/servers/servers.mjs.map +1 -1
  73. package/resources/tokens.d.mts +96 -63
  74. package/resources/tokens.d.mts.map +1 -1
  75. package/resources/tokens.d.ts +96 -63
  76. package/resources/tokens.d.ts.map +1 -1
  77. package/resources/tokens.js +1 -4
  78. package/resources/tokens.js.map +1 -1
  79. package/resources/tokens.mjs +1 -4
  80. package/resources/tokens.mjs.map +1 -1
  81. package/src/client.ts +20 -5
  82. package/src/lib/mcp-transport.ts +42 -19
  83. package/src/resources/beta/connect/connect.ts +4 -2
  84. package/src/resources/beta/connect/connections.ts +53 -35
  85. package/src/resources/beta/connect/index.ts +2 -1
  86. package/src/resources/index.ts +13 -3
  87. package/src/resources/namespaces.ts +17 -17
  88. package/src/resources/servers/deployments.ts +45 -47
  89. package/src/resources/servers/index.ts +3 -3
  90. package/src/resources/servers/servers.ts +49 -49
  91. package/src/resources/tokens.ts +103 -58
  92. package/src/version.ts +1 -1
  93. package/version.d.mts +1 -1
  94. package/version.d.ts +1 -1
  95. package/version.js +1 -1
  96. package/version.mjs +1 -1
@@ -6,11 +6,11 @@ import {
6
6
  DeployPayload,
7
7
  DeploymentDeployParams,
8
8
  DeploymentDeployResponse,
9
+ DeploymentGetParams,
10
+ DeploymentGetResponse,
9
11
  DeploymentListResponse,
10
12
  DeploymentResumeParams,
11
13
  DeploymentResumeResponse,
12
- DeploymentRetrieveParams,
13
- DeploymentRetrieveResponse,
14
14
  Deployments,
15
15
  ExternalDeployPayload,
16
16
  HostedDeployPayload,
@@ -39,13 +39,6 @@ export class Servers extends APIResource {
39
39
  logs: LogsAPI.Logs = new LogsAPI.Logs(this._client);
40
40
  secrets: SecretsAPI.Secrets = new SecretsAPI.Secrets(this._client);
41
41
 
42
- /**
43
- * Get a single server by its qualified name.
44
- */
45
- retrieve(qualifiedName: string, options?: RequestOptions): APIPromise<ServerRetrieveResponse> {
46
- return this._client.get(path`/servers/${qualifiedName}`, options);
47
- }
48
-
49
42
  /**
50
43
  * Get a paginated list of all servers. Use the `q` parameter to search.
51
44
  */
@@ -73,6 +66,13 @@ export class Servers extends APIResource {
73
66
  __binaryResponse: true,
74
67
  });
75
68
  }
69
+
70
+ /**
71
+ * Get a single server by its qualified name.
72
+ */
73
+ get(qualifiedName: string, options?: RequestOptions): APIPromise<ServerGetResponse> {
74
+ return this._client.get(path`/servers/${qualifiedName}`, options);
75
+ }
76
76
  }
77
77
 
78
78
  export type ServerListResponsesSmitheryPage = SmitheryPage<ServerListResponse>;
@@ -134,8 +134,40 @@ export namespace ProjectConfig {
134
134
  }
135
135
  }
136
136
 
137
- export interface ServerRetrieveResponse {
138
- connections: Array<ServerRetrieveResponse.StdioConnection | ServerRetrieveResponse.HTTPConnection>;
137
+ export interface ServerListResponse {
138
+ id: string;
139
+
140
+ createdAt: string;
141
+
142
+ description: string;
143
+
144
+ displayName: string;
145
+
146
+ homepage: string;
147
+
148
+ iconUrl: string | null;
149
+
150
+ isDeployed: boolean;
151
+
152
+ owner: string | null;
153
+
154
+ qualifiedName: string;
155
+
156
+ remote: boolean | null;
157
+
158
+ useCount: number;
159
+
160
+ verified: boolean;
161
+ }
162
+
163
+ export interface ServerDeleteResponse {
164
+ qualifiedName: string;
165
+
166
+ success: boolean;
167
+ }
168
+
169
+ export interface ServerGetResponse {
170
+ connections: Array<ServerGetResponse.StdioConnection | ServerGetResponse.HTTPConnection>;
139
171
 
140
172
  deploymentUrl: string | null;
141
173
 
@@ -149,12 +181,12 @@ export interface ServerRetrieveResponse {
149
181
 
150
182
  remote: boolean;
151
183
 
152
- security: ServerRetrieveResponse.Security | null;
184
+ security: ServerGetResponse.Security | null;
153
185
 
154
- tools: Array<ServerRetrieveResponse.Tool> | null;
186
+ tools: Array<ServerGetResponse.Tool> | null;
155
187
  }
156
188
 
157
- export namespace ServerRetrieveResponse {
189
+ export namespace ServerGetResponse {
158
190
  export interface StdioConnection {
159
191
  configSchema: { [key: string]: unknown };
160
192
 
@@ -196,38 +228,6 @@ export namespace ServerRetrieveResponse {
196
228
  }
197
229
  }
198
230
 
199
- export interface ServerListResponse {
200
- id: string;
201
-
202
- createdAt: string;
203
-
204
- description: string;
205
-
206
- displayName: string;
207
-
208
- homepage: string;
209
-
210
- iconUrl: string | null;
211
-
212
- isDeployed: boolean;
213
-
214
- owner: string | null;
215
-
216
- qualifiedName: string;
217
-
218
- remote: boolean | null;
219
-
220
- useCount: number;
221
-
222
- verified: boolean;
223
- }
224
-
225
- export interface ServerDeleteResponse {
226
- qualifiedName: string;
227
-
228
- success: boolean;
229
- }
230
-
231
231
  export interface ServerListParams extends SmitheryPageParams {
232
232
  ids?: Array<string>;
233
233
 
@@ -259,9 +259,9 @@ export declare namespace Servers {
259
259
  type BuildConfig as BuildConfig,
260
260
  type DeploymentTarget as DeploymentTarget,
261
261
  type ProjectConfig as ProjectConfig,
262
- type ServerRetrieveResponse as ServerRetrieveResponse,
263
262
  type ServerListResponse as ServerListResponse,
264
263
  type ServerDeleteResponse as ServerDeleteResponse,
264
+ type ServerGetResponse as ServerGetResponse,
265
265
  type ServerListResponsesSmitheryPage as ServerListResponsesSmitheryPage,
266
266
  type ServerListParams as ServerListParams,
267
267
  };
@@ -273,12 +273,12 @@ export declare namespace Servers {
273
273
  type HostedDeployPayload as HostedDeployPayload,
274
274
  type ServerCard as ServerCard,
275
275
  type StdioDeployPayload as StdioDeployPayload,
276
- type DeploymentRetrieveResponse as DeploymentRetrieveResponse,
277
276
  type DeploymentListResponse as DeploymentListResponse,
278
277
  type DeploymentDeployResponse as DeploymentDeployResponse,
278
+ type DeploymentGetResponse as DeploymentGetResponse,
279
279
  type DeploymentResumeResponse as DeploymentResumeResponse,
280
- type DeploymentRetrieveParams as DeploymentRetrieveParams,
281
280
  type DeploymentDeployParams as DeploymentDeployParams,
281
+ type DeploymentGetParams as DeploymentGetParams,
282
282
  type DeploymentResumeParams as DeploymentResumeParams,
283
283
  };
284
284
 
@@ -12,10 +12,7 @@ export class Tokens extends APIResource {
12
12
  * @example
13
13
  * ```ts
14
14
  * const createTokenResponse = await client.tokens.create({
15
- * permissions: {
16
- * connections: { can: ['read', 'write'] },
17
- * 'connections.rpc': { can: ['write'] },
18
- * },
15
+ * allow: {},
19
16
  * ttlSeconds: 3600,
20
17
  * });
21
18
  * ```
@@ -25,50 +22,85 @@ export class Tokens extends APIResource {
25
22
  }
26
23
  }
27
24
 
28
- export interface CreateTokenRequest {
25
+ /**
26
+ * Permission action. 'read' allows reading/listing. 'write' allows
27
+ * create/modify/delete.
28
+ */
29
+ export type Action = 'read' | 'write';
30
+
31
+ /**
32
+ * Permission grants with per-resource scoping. Each resource defines its own
33
+ * namespaces and constraints.
34
+ */
35
+ export interface Allow {
29
36
  /**
30
- * Permissions to grant. Format: { [subject]: { can: [actions] } }
37
+ * Scope for managing MCP connections.
31
38
  */
32
- permissions: { [key: string]: CreateTokenRequest.Permissions };
39
+ connections?: ConnectionScope;
33
40
 
34
41
  /**
35
- * Token TTL in seconds. Required. Max 86400 (24 hours).
42
+ * Scope for deployment operations.
36
43
  */
37
- ttlSeconds: number;
44
+ deployments?: ResourceScope;
38
45
 
39
46
  /**
40
- * Optional constraints to limit token access.
47
+ * Scope for namespace management.
41
48
  */
42
- constraints?: CreateTokenRequest.Constraints;
49
+ namespaces?: ResourceScope;
43
50
 
44
51
  /**
45
- * Profile to scope the token to. If not provided, uses the default profile.
52
+ * Scope for making RPC calls on connections.
46
53
  */
47
- profileSlug?: string;
54
+ rpc?: RpcScope;
55
+
56
+ /**
57
+ * Scope for server metadata and configuration.
58
+ */
59
+ servers?: ResourceScope;
60
+
61
+ /**
62
+ * Scope for token creation.
63
+ */
64
+ tokens?: ResourceScope;
48
65
  }
49
66
 
50
- export namespace CreateTokenRequest {
51
- export interface Permissions {
52
- /**
53
- * Actions granted on this subject.
54
- */
55
- can: Array<'read' | 'write'>;
56
- }
67
+ /**
68
+ * Scope for connection operations.
69
+ */
70
+ export interface ConnectionScope {
71
+ /**
72
+ * Actions allowed on connections.
73
+ */
74
+ actions: Array<Action>;
57
75
 
58
76
  /**
59
- * Optional constraints to limit token access.
77
+ * Namespaces this scope applies to. Use '\*' for all namespaces.
60
78
  */
61
- export interface Constraints {
62
- /**
63
- * Limit access to specific namespace IDs.
64
- */
65
- namespaceIds?: Array<string>;
79
+ namespaces: Array<string>;
66
80
 
67
- /**
68
- * Limit access to specific server qualified names.
69
- */
70
- serverQualifiedNames?: Array<string>;
71
- }
81
+ /**
82
+ * Filter access to connections with matching metadata. All keys must match (AND
83
+ * semantics).
84
+ */
85
+ metadata?: { [key: string]: string };
86
+ }
87
+
88
+ export interface CreateTokenRequest {
89
+ /**
90
+ * Per-resource permission grants. Format: { [resource]: { actions: [...],
91
+ * namespaces: [...], metadata?: {...} } }
92
+ */
93
+ allow: Allow;
94
+
95
+ /**
96
+ * Token TTL in seconds. Required. Max 86400 (24 hours).
97
+ */
98
+ ttlSeconds: number;
99
+
100
+ /**
101
+ * Profile to scope the token to. If not provided, uses the default profile.
102
+ */
103
+ profileSlug?: string;
72
104
  }
73
105
 
74
106
  export interface CreateTokenResponse {
@@ -83,56 +115,69 @@ export interface CreateTokenResponse {
83
115
  expiresAt: string;
84
116
  }
85
117
 
86
- export interface TokenCreateParams {
118
+ /**
119
+ * Scope for resource operations.
120
+ */
121
+ export interface ResourceScope {
87
122
  /**
88
- * Permissions to grant. Format: { [subject]: { can: [actions] } }
123
+ * Actions allowed on this resource.
89
124
  */
90
- permissions: { [key: string]: TokenCreateParams.Permissions };
125
+ actions: Array<Action>;
91
126
 
92
127
  /**
93
- * Token TTL in seconds. Required. Max 86400 (24 hours).
128
+ * Namespaces this scope applies to. Use '\*' for all namespaces.
94
129
  */
95
- ttlSeconds: number;
130
+ namespaces: Array<string>;
131
+ }
96
132
 
133
+ /**
134
+ * Scope for RPC operations on connections.
135
+ */
136
+ export interface RpcScope {
97
137
  /**
98
- * Optional constraints to limit token access.
138
+ * Actions allowed for RPC calls.
99
139
  */
100
- constraints?: TokenCreateParams.Constraints;
140
+ actions: Array<Action>;
101
141
 
102
142
  /**
103
- * Profile to scope the token to. If not provided, uses the default profile.
143
+ * Namespaces this scope applies to. Use '\*' for all namespaces.
104
144
  */
105
- profileSlug?: string;
145
+ namespaces: Array<string>;
146
+
147
+ /**
148
+ * Filter access to connections with matching metadata. All keys must match (AND
149
+ * semantics).
150
+ */
151
+ metadata?: { [key: string]: string };
106
152
  }
107
153
 
108
- export namespace TokenCreateParams {
109
- export interface Permissions {
110
- /**
111
- * Actions granted on this subject.
112
- */
113
- can: Array<'read' | 'write'>;
114
- }
154
+ export interface TokenCreateParams {
155
+ /**
156
+ * Per-resource permission grants. Format: { [resource]: { actions: [...],
157
+ * namespaces: [...], metadata?: {...} } }
158
+ */
159
+ allow: Allow;
115
160
 
116
161
  /**
117
- * Optional constraints to limit token access.
162
+ * Token TTL in seconds. Required. Max 86400 (24 hours).
118
163
  */
119
- export interface Constraints {
120
- /**
121
- * Limit access to specific namespace IDs.
122
- */
123
- namespaceIds?: Array<string>;
164
+ ttlSeconds: number;
124
165
 
125
- /**
126
- * Limit access to specific server qualified names.
127
- */
128
- serverQualifiedNames?: Array<string>;
129
- }
166
+ /**
167
+ * Profile to scope the token to. If not provided, uses the default profile.
168
+ */
169
+ profileSlug?: string;
130
170
  }
131
171
 
132
172
  export declare namespace Tokens {
133
173
  export {
174
+ type Action as Action,
175
+ type Allow as Allow,
176
+ type ConnectionScope as ConnectionScope,
134
177
  type CreateTokenRequest as CreateTokenRequest,
135
178
  type CreateTokenResponse as CreateTokenResponse,
179
+ type ResourceScope as ResourceScope,
180
+ type RpcScope as RpcScope,
136
181
  type TokenCreateParams as TokenCreateParams,
137
182
  };
138
183
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.24.0'; // x-release-please-version
1
+ export const VERSION = '0.25.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.24.0";
1
+ export declare const VERSION = "0.25.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.24.0";
1
+ export declare const VERSION = "0.25.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.24.0'; // x-release-please-version
4
+ exports.VERSION = '0.25.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.24.0'; // x-release-please-version
1
+ export const VERSION = '0.25.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map