@smithery/api 0.57.0 → 0.58.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 (97) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/client.d.mts +2 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -1
  9. package/client.mjs.map +1 -1
  10. package/core/pagination.d.mts +0 -23
  11. package/core/pagination.d.mts.map +1 -1
  12. package/core/pagination.d.ts +0 -23
  13. package/core/pagination.d.ts.map +1 -1
  14. package/core/pagination.js +1 -23
  15. package/core/pagination.js.map +1 -1
  16. package/core/pagination.mjs +0 -21
  17. package/core/pagination.mjs.map +1 -1
  18. package/internal/utils/env.js +2 -2
  19. package/internal/utils/env.js.map +1 -1
  20. package/internal/utils/env.mjs +2 -2
  21. package/internal/utils/env.mjs.map +1 -1
  22. package/package.json +1 -1
  23. package/resources/connections/connections.d.mts +35 -3
  24. package/resources/connections/connections.d.mts.map +1 -1
  25. package/resources/connections/connections.d.ts +35 -3
  26. package/resources/connections/connections.d.ts.map +1 -1
  27. package/resources/connections/connections.js +3 -2
  28. package/resources/connections/connections.js.map +1 -1
  29. package/resources/connections/connections.mjs +3 -2
  30. package/resources/connections/connections.mjs.map +1 -1
  31. package/resources/index.d.mts +1 -1
  32. package/resources/index.d.ts +1 -1
  33. package/resources/index.js +1 -1
  34. package/resources/index.js.map +1 -1
  35. package/resources/index.mjs +1 -1
  36. package/resources/servers/servers.d.mts +2 -1
  37. package/resources/servers/servers.d.mts.map +1 -1
  38. package/resources/servers/servers.d.ts +2 -1
  39. package/resources/servers/servers.d.ts.map +1 -1
  40. package/resources/servers/servers.js.map +1 -1
  41. package/resources/servers/servers.mjs.map +1 -1
  42. package/resources/skills.d.mts +273 -1
  43. package/resources/skills.d.mts.map +1 -1
  44. package/resources/skills.d.ts +273 -1
  45. package/resources/skills.d.ts.map +1 -1
  46. package/resources/skills.js +78 -2
  47. package/resources/skills.js.map +1 -1
  48. package/resources/skills.mjs +76 -1
  49. package/resources/skills.mjs.map +1 -1
  50. package/src/client.ts +19 -24
  51. package/src/core/pagination.ts +0 -59
  52. package/src/internal/utils/env.ts +2 -2
  53. package/src/resources/connections/connections.ts +44 -2
  54. package/src/resources/index.ts +1 -1
  55. package/src/resources/servers/servers.ts +2 -1
  56. package/src/resources/skills.ts +427 -1
  57. package/src/version.ts +1 -1
  58. package/version.d.mts +1 -1
  59. package/version.d.ts +1 -1
  60. package/version.js +1 -1
  61. package/version.mjs +1 -1
  62. package/resources/skills/index.d.mts +0 -4
  63. package/resources/skills/index.d.mts.map +0 -1
  64. package/resources/skills/index.d.ts +0 -4
  65. package/resources/skills/index.d.ts.map +0 -1
  66. package/resources/skills/index.js +0 -11
  67. package/resources/skills/index.js.map +0 -1
  68. package/resources/skills/index.mjs +0 -5
  69. package/resources/skills/index.mjs.map +0 -1
  70. package/resources/skills/reviews.d.mts +0 -160
  71. package/resources/skills/reviews.d.mts.map +0 -1
  72. package/resources/skills/reviews.d.ts +0 -160
  73. package/resources/skills/reviews.d.ts.map +0 -1
  74. package/resources/skills/reviews.js +0 -74
  75. package/resources/skills/reviews.js.map +0 -1
  76. package/resources/skills/reviews.mjs +0 -70
  77. package/resources/skills/reviews.mjs.map +0 -1
  78. package/resources/skills/skills.d.mts +0 -297
  79. package/resources/skills/skills.d.mts.map +0 -1
  80. package/resources/skills/skills.d.ts +0 -297
  81. package/resources/skills/skills.d.ts.map +0 -1
  82. package/resources/skills/skills.js +0 -94
  83. package/resources/skills/skills.js.map +0 -1
  84. package/resources/skills/skills.mjs +0 -89
  85. package/resources/skills/skills.mjs.map +0 -1
  86. package/resources/skills/votes.d.mts +0 -72
  87. package/resources/skills/votes.d.mts.map +0 -1
  88. package/resources/skills/votes.d.ts +0 -72
  89. package/resources/skills/votes.d.ts.map +0 -1
  90. package/resources/skills/votes.js +0 -46
  91. package/resources/skills/votes.js.map +0 -1
  92. package/resources/skills/votes.mjs +0 -42
  93. package/resources/skills/votes.mjs.map +0 -1
  94. package/src/resources/skills/index.ts +0 -47
  95. package/src/resources/skills/reviews.ts +0 -254
  96. package/src/resources/skills/skills.ts +0 -512
  97. package/src/resources/skills/votes.ts +0 -110
@@ -1,3 +1,78 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- export * from "./skills/index.mjs";
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { SkillsPage } from "../core/pagination.mjs";
4
+ import { buildHeaders } from "../internal/headers.mjs";
5
+ import { multipartFormRequestOptions } from "../internal/uploads.mjs";
6
+ import { path } from "../internal/utils/path.mjs";
7
+ /**
8
+ * Discover and search reusable prompt-based skills for MCP servers
9
+ */
10
+ export class Skills extends APIResource {
11
+ /**
12
+ * **Deprecated:** Use PUT /skills/{namespace}/{slug} instead. Create a new skill
13
+ * by linking a GitHub repository containing a SKILL.md file.
14
+ *
15
+ * @deprecated
16
+ */
17
+ create(body, options) {
18
+ return this._client.post('/skills', { body, ...options });
19
+ }
20
+ /**
21
+ * Search and browse reusable prompt-based skills. Supports full-text and semantic
22
+ * search via the `q` parameter, and filtering by category, namespace, or slug.
23
+ */
24
+ list(query = {}, options) {
25
+ return this._client.getAPIList('/skills', (SkillsPage), { query, ...options });
26
+ }
27
+ /**
28
+ * Delete a skill by namespace and slug. Requires ownership of the namespace.
29
+ */
30
+ delete(slug, params, options) {
31
+ const { namespace } = params;
32
+ return this._client.delete(path `/skills/${namespace}/${slug}`, options);
33
+ }
34
+ /**
35
+ * Download a ZIP bundle containing all skill files.
36
+ */
37
+ download(slug, params, options) {
38
+ const { namespace } = params;
39
+ return this._client.get(path `/skills/${namespace}/${slug}/download`, {
40
+ ...options,
41
+ headers: buildHeaders([{ Accept: 'application/zip' }, options?.headers]),
42
+ __binaryResponse: true,
43
+ });
44
+ }
45
+ /**
46
+ * Get a single skill by its namespace and slug.
47
+ */
48
+ get(slug, params, options) {
49
+ const { namespace } = params;
50
+ return this._client.get(path `/skills/${namespace}/${slug}`, options);
51
+ }
52
+ /**
53
+ * Idempotent endpoint to create or update a GitHub-backed skill. Send
54
+ * application/json with `gitUrl`.
55
+ */
56
+ set(slug, params, options) {
57
+ const { namespace, body } = params;
58
+ return this._client.put(path `/skills/${namespace}/${slug}`, { body: body, ...options });
59
+ }
60
+ /**
61
+ * **Deprecated:** Use PUT /skills/{namespace}/{slug} instead. Refetch SKILL.md and
62
+ * repository stars from GitHub and update the skill record.
63
+ *
64
+ * @deprecated
65
+ */
66
+ sync(slug, params, options) {
67
+ const { namespace } = params;
68
+ return this._client.post(path `/skills/${namespace}/${slug}/sync`, options);
69
+ }
70
+ /**
71
+ * Upload or replace a skill bundle via multipart/form-data with an `archive` file.
72
+ */
73
+ upload(slug, params, options) {
74
+ const { namespace, ...body } = params;
75
+ return this._client.put(path `/skills/${namespace}/${slug}/upload`, multipartFormRequestOptions({ body, ...options }, this._client));
76
+ }
77
+ }
3
78
  //# sourceMappingURL=skills.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"skills.mjs","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
1
+ {"version":3,"file":"skills.mjs","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAe,UAAU,EAAyB;OAElD,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;OAKG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACH,I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,SAAS,IAAI,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;OAKG;IACH,IAAI,CAAC,IAAY,EAAE,MAAuB,EAAE,OAAwB;QAClE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,WAAW,SAAS,IAAI,IAAI,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAY,EAAE,MAAyB,EAAE,OAAwB;QACtE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CACrB,IAAI,CAAA,WAAW,SAAS,IAAI,IAAI,SAAS,EACzC,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -21,8 +21,6 @@ import {
21
21
  NamespacesPageResponse,
22
22
  type ReleasesPageParams,
23
23
  ReleasesPageResponse,
24
- type ReviewsPageParams,
25
- ReviewsPageResponse,
26
24
  type SkillsPageParams,
27
25
  SkillsPageResponse,
28
26
  type SmitheryPageParams,
@@ -32,6 +30,25 @@ import * as Uploads from './core/uploads';
32
30
  import * as API from './resources/index';
33
31
  import { APIPromise } from './core/api-promise';
34
32
  import { Health, HealthCheckResponse } from './resources/health';
33
+ import {
34
+ SkillCreateParams,
35
+ SkillCreateResponse,
36
+ SkillDeleteParams,
37
+ SkillDeleteResponse,
38
+ SkillDownloadParams,
39
+ SkillGetParams,
40
+ SkillGetResponse,
41
+ SkillListParams,
42
+ SkillListResponse,
43
+ SkillListResponsesSkillsPage,
44
+ SkillSetParams,
45
+ SkillSetResponse,
46
+ SkillSyncParams,
47
+ SkillSyncResponse,
48
+ SkillUploadParams,
49
+ SkillUploadResponse,
50
+ Skills,
51
+ } from './resources/skills';
35
52
  import {
36
53
  Constraint,
37
54
  CreateTokenRequest,
@@ -77,25 +94,6 @@ import {
77
94
  ServerUpdateResponse,
78
95
  Servers,
79
96
  } from './resources/servers/servers';
80
- import {
81
- SkillCreateParams,
82
- SkillCreateResponse,
83
- SkillDeleteParams,
84
- SkillDeleteResponse,
85
- SkillDownloadParams,
86
- SkillGetParams,
87
- SkillGetResponse,
88
- SkillListParams,
89
- SkillListResponse,
90
- SkillListResponsesSkillsPage,
91
- SkillSetParams,
92
- SkillSetResponse,
93
- SkillSyncParams,
94
- SkillSyncResponse,
95
- SkillUploadParams,
96
- SkillUploadResponse,
97
- Skills,
98
- } from './resources/skills/skills';
99
97
  import { type Fetch } from './internal/builtin-types';
100
98
  import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
101
99
  import { FinalRequestOptions, RequestOptions } from './internal/request-options';
@@ -860,9 +858,6 @@ export declare namespace Smithery {
860
858
  type NamespacesPageResponse as NamespacesPageResponse,
861
859
  };
862
860
 
863
- export import ReviewsPage = Pagination.ReviewsPage;
864
- export { type ReviewsPageParams as ReviewsPageParams, type ReviewsPageResponse as ReviewsPageResponse };
865
-
866
861
  export import ReleasesPage = Pagination.ReleasesPage;
867
862
  export { type ReleasesPageParams as ReleasesPageParams, type ReleasesPageResponse as ReleasesPageResponse };
868
863
 
@@ -284,65 +284,6 @@ export class NamespacesPage<Item> extends AbstractPage<Item> implements Namespac
284
284
  }
285
285
  }
286
286
 
287
- export interface ReviewsPageResponse<Item> {
288
- reviews: Array<Item>;
289
-
290
- pagination: ReviewsPageResponse.Pagination;
291
- }
292
-
293
- export namespace ReviewsPageResponse {
294
- export interface Pagination {
295
- currentPage?: number;
296
-
297
- pageSize?: number;
298
-
299
- totalCount?: number;
300
-
301
- totalPages?: number;
302
- }
303
- }
304
-
305
- export interface ReviewsPageParams {
306
- page?: number;
307
-
308
- limit?: number;
309
- }
310
-
311
- export class ReviewsPage<Item> extends AbstractPage<Item> implements ReviewsPageResponse<Item> {
312
- reviews: Array<Item>;
313
-
314
- pagination: ReviewsPageResponse.Pagination;
315
-
316
- constructor(
317
- client: Smithery,
318
- response: Response,
319
- body: ReviewsPageResponse<Item>,
320
- options: FinalRequestOptions,
321
- ) {
322
- super(client, response, body, options);
323
-
324
- this.reviews = body.reviews || [];
325
- this.pagination = body.pagination || {};
326
- }
327
-
328
- getPaginatedItems(): Item[] {
329
- return this.reviews ?? [];
330
- }
331
-
332
- nextPageRequestOptions(): PageRequestOptions | null {
333
- const query = this.options.query as ReviewsPageParams;
334
- const currentPage = query?.page ?? 1;
335
-
336
- return {
337
- ...this.options,
338
- query: {
339
- ...maybeObj(this.options.query),
340
- page: currentPage + 1,
341
- },
342
- };
343
- }
344
- }
345
-
346
287
  export interface ReleasesPageResponse<Item> {
347
288
  releases: Array<Item>;
348
289
 
@@ -9,10 +9,10 @@
9
9
  */
10
10
  export const readEnv = (env: string): string | undefined => {
11
11
  if (typeof (globalThis as any).process !== 'undefined') {
12
- return (globalThis as any).process.env?.[env]?.trim() ?? undefined;
12
+ return (globalThis as any).process.env?.[env]?.trim() || undefined;
13
13
  }
14
14
  if (typeof (globalThis as any).Deno !== 'undefined') {
15
- return (globalThis as any).Deno.env?.get?.(env)?.trim();
15
+ return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
16
16
  }
17
17
  return undefined;
18
18
  };
@@ -85,8 +85,9 @@ export class Connections extends APIResource {
85
85
  /**
86
86
  * Create or update an MCP connection with the given ID. mcpUrl is required when
87
87
  * creating a new connection, but optional when updating (omit to keep the existing
88
- * URL). Returns 409 if a different mcpUrl is provided - delete and recreate to
89
- * change URL. Requires API key and namespace ownership.
88
+ * URL). Returns 409 if a different mcpUrl is provided, except while the connection
89
+ * is input_required and the new URL keeps the same host and path. Requires API key
90
+ * and namespace ownership.
90
91
  *
91
92
  * @example
92
93
  * ```ts
@@ -138,6 +139,7 @@ export interface Connection {
138
139
  status?:
139
140
  | Connection.ConnectionStatusConnected
140
141
  | Connection.ConnectionStatusAuthRequired
142
+ | Connection.ConnectionStatusInputRequired
141
143
  | Connection.ConnectionStatusError;
142
144
  }
143
145
 
@@ -184,6 +186,46 @@ export namespace Connection {
184
186
  authorizationUrl?: string;
185
187
  }
186
188
 
189
+ export interface ConnectionStatusInputRequired {
190
+ http: ConnectionStatusInputRequired.HTTP;
191
+
192
+ missing: ConnectionStatusInputRequired.Missing;
193
+
194
+ state: 'input_required';
195
+ }
196
+
197
+ export namespace ConnectionStatusInputRequired {
198
+ export interface HTTP {
199
+ headers?: { [key: string]: HTTP.Headers };
200
+
201
+ query?: { [key: string]: HTTP.Query };
202
+ }
203
+
204
+ export namespace HTTP {
205
+ export interface Headers {
206
+ label: string;
207
+
208
+ description?: string;
209
+
210
+ required?: boolean;
211
+ }
212
+
213
+ export interface Query {
214
+ label: string;
215
+
216
+ description?: string;
217
+
218
+ required?: boolean;
219
+ }
220
+ }
221
+
222
+ export interface Missing {
223
+ headers: Array<string>;
224
+
225
+ query: Array<string>;
226
+ }
227
+ }
228
+
187
229
  export interface ConnectionStatusError {
188
230
  /**
189
231
  * Error message
@@ -56,7 +56,7 @@ export {
56
56
  type SkillSyncParams,
57
57
  type SkillUploadParams,
58
58
  type SkillListResponsesSkillsPage,
59
- } from './skills/skills';
59
+ } from './skills';
60
60
  export {
61
61
  Tokens,
62
62
  type Constraint,
@@ -253,7 +253,8 @@ export interface ServerListResponse {
253
253
  displayName: string;
254
254
 
255
255
  /**
256
- * URL to the server's page on smithery.ai.
256
+ * The server owner's homepage URL, or the server's Smithery page as a fallback.
257
+ * Will become nullable in a future release.
257
258
  */
258
259
  homepage: string;
259
260