@smithery/api 0.34.0 → 0.35.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 (177) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +11 -7
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +11 -7
  5. package/client.d.ts.map +1 -1
  6. package/client.js +4 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +4 -3
  9. package/client.mjs.map +1 -1
  10. package/core/pagination.d.mts +46 -0
  11. package/core/pagination.d.mts.map +1 -1
  12. package/core/pagination.d.ts +46 -0
  13. package/core/pagination.d.ts.map +1 -1
  14. package/core/pagination.js +45 -1
  15. package/core/pagination.js.map +1 -1
  16. package/core/pagination.mjs +42 -0
  17. package/core/pagination.mjs.map +1 -1
  18. package/internal/parse.d.mts.map +1 -1
  19. package/internal/parse.d.ts.map +1 -1
  20. package/internal/parse.js +5 -0
  21. package/internal/parse.js.map +1 -1
  22. package/internal/parse.mjs +5 -0
  23. package/internal/parse.mjs.map +1 -1
  24. package/package.json +1 -1
  25. package/resources/experimental/agents/agents.d.mts +84 -89
  26. package/resources/experimental/agents/agents.d.mts.map +1 -1
  27. package/resources/experimental/agents/agents.d.ts +84 -89
  28. package/resources/experimental/agents/agents.d.ts.map +1 -1
  29. package/resources/experimental/agents/agents.js.map +1 -1
  30. package/resources/experimental/agents/agents.mjs.map +1 -1
  31. package/resources/experimental/agents/index.d.mts +1 -1
  32. package/resources/experimental/agents/index.d.mts.map +1 -1
  33. package/resources/experimental/agents/index.d.ts +1 -1
  34. package/resources/experimental/agents/index.d.ts.map +1 -1
  35. package/resources/experimental/agents/index.js.map +1 -1
  36. package/resources/experimental/agents/index.mjs +1 -1
  37. package/resources/experimental/agents/index.mjs.map +1 -1
  38. package/resources/experimental/agents/responses.d.mts +1 -31
  39. package/resources/experimental/agents/responses.d.mts.map +1 -1
  40. package/resources/experimental/agents/responses.d.ts +1 -31
  41. package/resources/experimental/agents/responses.d.ts.map +1 -1
  42. package/resources/experimental/connect/connections.d.mts +4 -2
  43. package/resources/experimental/connect/connections.d.mts.map +1 -1
  44. package/resources/experimental/connect/connections.d.ts +4 -2
  45. package/resources/experimental/connect/connections.d.ts.map +1 -1
  46. package/resources/experimental/connect/connections.js +4 -2
  47. package/resources/experimental/connect/connections.js.map +1 -1
  48. package/resources/experimental/connect/connections.mjs +4 -2
  49. package/resources/experimental/connect/connections.mjs.map +1 -1
  50. package/resources/experimental/experimental.d.mts +2 -2
  51. package/resources/experimental/experimental.d.mts.map +1 -1
  52. package/resources/experimental/experimental.d.ts +2 -2
  53. package/resources/experimental/experimental.d.ts.map +1 -1
  54. package/resources/experimental/experimental.js.map +1 -1
  55. package/resources/experimental/experimental.mjs +1 -1
  56. package/resources/experimental/experimental.mjs.map +1 -1
  57. package/resources/experimental/index.d.mts +1 -1
  58. package/resources/experimental/index.d.mts.map +1 -1
  59. package/resources/experimental/index.d.ts +1 -1
  60. package/resources/experimental/index.d.ts.map +1 -1
  61. package/resources/experimental/index.js.map +1 -1
  62. package/resources/experimental/index.mjs +1 -1
  63. package/resources/experimental/index.mjs.map +1 -1
  64. package/resources/index.d.mts +3 -3
  65. package/resources/index.d.mts.map +1 -1
  66. package/resources/index.d.ts +3 -3
  67. package/resources/index.d.ts.map +1 -1
  68. package/resources/index.js +1 -1
  69. package/resources/index.js.map +1 -1
  70. package/resources/index.mjs +1 -1
  71. package/resources/index.mjs.map +1 -1
  72. package/resources/namespaces/index.d.mts +1 -1
  73. package/resources/namespaces/index.d.mts.map +1 -1
  74. package/resources/namespaces/index.d.ts +1 -1
  75. package/resources/namespaces/index.d.ts.map +1 -1
  76. package/resources/namespaces/index.js.map +1 -1
  77. package/resources/namespaces/index.mjs.map +1 -1
  78. package/resources/namespaces/namespaces.d.mts +35 -11
  79. package/resources/namespaces/namespaces.d.mts.map +1 -1
  80. package/resources/namespaces/namespaces.d.ts +35 -11
  81. package/resources/namespaces/namespaces.d.ts.map +1 -1
  82. package/resources/namespaces/namespaces.js +14 -4
  83. package/resources/namespaces/namespaces.js.map +1 -1
  84. package/resources/namespaces/namespaces.mjs +14 -4
  85. package/resources/namespaces/namespaces.mjs.map +1 -1
  86. package/resources/namespaces/servers.d.mts +3 -8
  87. package/resources/namespaces/servers.d.mts.map +1 -1
  88. package/resources/namespaces/servers.d.ts +3 -8
  89. package/resources/namespaces/servers.d.ts.map +1 -1
  90. package/resources/namespaces/servers.js +3 -8
  91. package/resources/namespaces/servers.js.map +1 -1
  92. package/resources/namespaces/servers.mjs +3 -8
  93. package/resources/namespaces/servers.mjs.map +1 -1
  94. package/resources/servers/deployments.d.mts +204 -6
  95. package/resources/servers/deployments.d.mts.map +1 -1
  96. package/resources/servers/deployments.d.ts +204 -6
  97. package/resources/servers/deployments.d.ts.map +1 -1
  98. package/resources/servers/deployments.js +14 -6
  99. package/resources/servers/deployments.js.map +1 -1
  100. package/resources/servers/deployments.mjs +14 -6
  101. package/resources/servers/deployments.mjs.map +1 -1
  102. package/resources/servers/index.d.mts +1 -1
  103. package/resources/servers/index.d.mts.map +1 -1
  104. package/resources/servers/index.d.ts +1 -1
  105. package/resources/servers/index.d.ts.map +1 -1
  106. package/resources/servers/index.js.map +1 -1
  107. package/resources/servers/index.mjs.map +1 -1
  108. package/resources/servers/servers.d.mts +135 -2
  109. package/resources/servers/servers.d.mts.map +1 -1
  110. package/resources/servers/servers.d.ts +135 -2
  111. package/resources/servers/servers.d.ts.map +1 -1
  112. package/resources/servers/servers.js +33 -1
  113. package/resources/servers/servers.js.map +1 -1
  114. package/resources/servers/servers.mjs +33 -1
  115. package/resources/servers/servers.mjs.map +1 -1
  116. package/resources/skills/index.d.mts +3 -0
  117. package/resources/skills/index.d.mts.map +1 -0
  118. package/resources/skills/index.d.ts +3 -0
  119. package/resources/skills/index.d.ts.map +1 -0
  120. package/resources/skills/index.js +9 -0
  121. package/resources/skills/index.js.map +1 -0
  122. package/resources/skills/index.mjs +4 -0
  123. package/resources/skills/index.mjs.map +1 -0
  124. package/resources/skills/reviews.d.mts +123 -0
  125. package/resources/skills/reviews.d.mts.map +1 -0
  126. package/resources/skills/reviews.d.ts +123 -0
  127. package/resources/skills/reviews.d.ts.map +1 -0
  128. package/resources/skills/reviews.js +40 -0
  129. package/resources/skills/reviews.js.map +1 -0
  130. package/resources/skills/reviews.mjs +36 -0
  131. package/resources/skills/reviews.mjs.map +1 -0
  132. package/resources/skills/skills.d.mts +135 -0
  133. package/resources/skills/skills.d.mts.map +1 -0
  134. package/resources/skills/skills.d.ts +135 -0
  135. package/resources/skills/skills.d.ts.map +1 -0
  136. package/resources/skills/skills.js +33 -0
  137. package/resources/skills/skills.js.map +1 -0
  138. package/resources/skills/skills.mjs +28 -0
  139. package/resources/skills/skills.mjs.map +1 -0
  140. package/resources/skills.d.mts +1 -39
  141. package/resources/skills.d.mts.map +1 -1
  142. package/resources/skills.d.ts +1 -39
  143. package/resources/skills.d.ts.map +1 -1
  144. package/resources/skills.js +2 -13
  145. package/resources/skills.js.map +1 -1
  146. package/resources/skills.mjs +1 -11
  147. package/resources/skills.mjs.map +1 -1
  148. package/resources/tokens.d.mts +5 -1
  149. package/resources/tokens.d.mts.map +1 -1
  150. package/resources/tokens.d.ts +5 -1
  151. package/resources/tokens.d.ts.map +1 -1
  152. package/src/client.ts +38 -3
  153. package/src/core/pagination.ts +118 -0
  154. package/src/internal/parse.ts +6 -0
  155. package/src/resources/experimental/agents/agents.ts +111 -106
  156. package/src/resources/experimental/agents/index.ts +17 -1
  157. package/src/resources/experimental/agents/responses.ts +1 -44
  158. package/src/resources/experimental/connect/connections.ts +4 -2
  159. package/src/resources/experimental/experimental.ts +28 -1
  160. package/src/resources/experimental/index.ts +17 -1
  161. package/src/resources/index.ts +9 -1
  162. package/src/resources/namespaces/index.ts +2 -0
  163. package/src/resources/namespaces/namespaces.ts +49 -13
  164. package/src/resources/namespaces/servers.ts +3 -8
  165. package/src/resources/servers/deployments.ts +204 -6
  166. package/src/resources/servers/index.ts +4 -0
  167. package/src/resources/servers/servers.ts +170 -1
  168. package/src/resources/skills/index.ts +21 -0
  169. package/src/resources/skills/reviews.ts +191 -0
  170. package/src/resources/skills/skills.ts +219 -0
  171. package/src/resources/skills.ts +1 -72
  172. package/src/resources/tokens.ts +5 -1
  173. package/src/version.ts +1 -1
  174. package/version.d.mts +1 -1
  175. package/version.d.ts +1 -1
  176. package/version.js +1 -1
  177. package/version.mjs +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/resources/skills/skills.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,iEAAwC;AACxC,0CAUmB;AAEnB,yDAAuF;AAEvF,uDAAiD;AAEjD,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoBrE,CAAC;IAlBC;;;OAGG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAA,uBAA6B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,IAAY,EAAE,MAAsB,EAAE,OAAwB;QAChE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,SAAS,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;AArBD,wBAqBC;AA2JD,MAAM,CAAC,OAAO,GAAG,iBAAO,CAAC"}
@@ -0,0 +1,28 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import * as ReviewsAPI from "./reviews.mjs";
4
+ import { Reviews, } from "./reviews.mjs";
5
+ import { SkillsPage } from "../../core/pagination.mjs";
6
+ import { path } from "../../internal/utils/path.mjs";
7
+ export class Skills extends APIResource {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.reviews = new ReviewsAPI.Reviews(this._client);
11
+ }
12
+ /**
13
+ * Search and browse reusable prompt-based skills. Supports full-text and semantic
14
+ * search via the `q` parameter, and filtering by category, namespace, or slug.
15
+ */
16
+ list(query = {}, options) {
17
+ return this._client.getAPIList('/skills', (SkillsPage), { query, ...options });
18
+ }
19
+ /**
20
+ * Get a single skill by its namespace and slug.
21
+ */
22
+ get(slug, params, options) {
23
+ const { namespace } = params;
24
+ return this._client.get(path `/skills/${namespace}/${slug}`, options);
25
+ }
26
+ }
27
+ Skills.Reviews = Reviews;
28
+ //# sourceMappingURL=skills.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.mjs","sourceRoot":"","sources":["../../src/resources/skills/skills.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAQL,OAAO,GAER;OAEM,EAAe,UAAU,EAAyB;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoBrE,CAAC;IAlBC;;;OAGG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAA,UAA6B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,IAAY,EAAE,MAAsB,EAAE,OAAwB;QAChE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,SAAS,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;AA2JD,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC"}
@@ -1,40 +1,2 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { PagePromise, SkillsPage, type SkillsPageParams } from "../core/pagination.mjs";
3
- import { RequestOptions } from "../internal/request-options.mjs";
4
- export declare class Skills extends APIResource {
5
- /**
6
- * Get a paginated list of skills. When q parameter is provided, uses hybrid BM25 +
7
- * vector search.
8
- */
9
- list(query?: SkillListParams | null | undefined, options?: RequestOptions): PagePromise<SkillListResponsesSkillsPage, SkillListResponse>;
10
- }
11
- export type SkillListResponsesSkillsPage = SkillsPage<SkillListResponse>;
12
- export interface SkillListResponse {
13
- id: string;
14
- createdAt: string;
15
- description: string;
16
- displayName: string;
17
- listed: boolean;
18
- namespace: string;
19
- prompt: string | null;
20
- qualityScore: number;
21
- slug: string;
22
- categories?: Array<string>;
23
- externalForks?: number;
24
- externalStars?: number;
25
- gitUrl?: string;
26
- servers?: Array<string>;
27
- totalActivations?: number;
28
- uniqueUsers?: number;
29
- }
30
- export interface SkillListParams extends SkillsPageParams {
31
- category?: string;
32
- namespace?: string;
33
- q?: string;
34
- slug?: string;
35
- topK?: number;
36
- }
37
- export declare namespace Skills {
38
- export { type SkillListResponse as SkillListResponse, type SkillListResponsesSkillsPage as SkillListResponsesSkillsPage, type SkillListParams as SkillListParams, };
39
- }
1
+ export * from "./skills/index.mjs";
40
2
  //# sourceMappingURL=skills.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skills.d.mts","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE;OAClD,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IAC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":3,"file":"skills.d.mts","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":""}
@@ -1,40 +1,2 @@
1
- import { APIResource } from "../core/resource.js";
2
- import { PagePromise, SkillsPage, type SkillsPageParams } from "../core/pagination.js";
3
- import { RequestOptions } from "../internal/request-options.js";
4
- export declare class Skills extends APIResource {
5
- /**
6
- * Get a paginated list of skills. When q parameter is provided, uses hybrid BM25 +
7
- * vector search.
8
- */
9
- list(query?: SkillListParams | null | undefined, options?: RequestOptions): PagePromise<SkillListResponsesSkillsPage, SkillListResponse>;
10
- }
11
- export type SkillListResponsesSkillsPage = SkillsPage<SkillListResponse>;
12
- export interface SkillListResponse {
13
- id: string;
14
- createdAt: string;
15
- description: string;
16
- displayName: string;
17
- listed: boolean;
18
- namespace: string;
19
- prompt: string | null;
20
- qualityScore: number;
21
- slug: string;
22
- categories?: Array<string>;
23
- externalForks?: number;
24
- externalStars?: number;
25
- gitUrl?: string;
26
- servers?: Array<string>;
27
- totalActivations?: number;
28
- uniqueUsers?: number;
29
- }
30
- export interface SkillListParams extends SkillsPageParams {
31
- category?: string;
32
- namespace?: string;
33
- q?: string;
34
- slug?: string;
35
- topK?: number;
36
- }
37
- export declare namespace Skills {
38
- export { type SkillListResponse as SkillListResponse, type SkillListResponsesSkillsPage as SkillListResponsesSkillsPage, type SkillListParams as SkillListParams, };
39
- }
1
+ export * from "./skills/index.js";
40
2
  //# sourceMappingURL=skills.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE;OAClD,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,W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ict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Skills = void 0;
5
- const resource_1 = require("../core/resource.js");
6
- const pagination_1 = require("../core/pagination.js");
7
- class Skills extends resource_1.APIResource {
8
- /**
9
- * Get a paginated list of skills. When q parameter is provided, uses hybrid BM25 +
10
- * vector search.
11
- */
12
- list(query = {}, options) {
13
- return this._client.getAPIList('/skills', (pagination_1.SkillsPage), { query, ...options });
14
- }
15
- }
16
- exports.Skills = Skills;
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./skills/index.js"), exports);
17
6
  //# sourceMappingURL=skills.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAC/C,sDAAoF;AAGpF,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;OAGG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAA,uBAA6B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;CACF;AAXD,wBAWC"}
1
+ {"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B"}
@@ -1,13 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
3
- import { SkillsPage } from "../core/pagination.mjs";
4
- export class Skills extends APIResource {
5
- /**
6
- * Get a paginated list of skills. When q parameter is provided, uses hybrid BM25 +
7
- * vector search.
8
- */
9
- list(query = {}, options) {
10
- return this._client.getAPIList('/skills', (SkillsPage), { query, ...options });
11
- }
12
- }
2
+ export * from "./skills/index.mjs";
13
3
  //# sourceMappingURL=skills.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"skills.mjs","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAe,UAAU,EAAyB;AAGzD,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAA,UAA6B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;CACF"}
1
+ {"version":3,"file":"skills.mjs","sourceRoot":"","sources":["../src/resources/skills.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -10,7 +10,11 @@ export declare class Tokens extends APIResource {
10
10
  }
11
11
  export interface Constraint {
12
12
  /**
13
- * Metadata filter facts. Each object is an OR condition; keys within are AND-ed.
13
+ * Metadata key-value pairs for fine-grained access control. When an array is
14
+ * provided, each object is evaluated as an OR condition (any must match). Within a
15
+ * single object, all key-value pairs must match (AND). For example, [{"userId":
16
+ * "alice"}, {"team": "backend"}] allows access if userId is alice OR team is
17
+ * backend.
14
18
  */
15
19
  metadata?: {
16
20
  [key: string]: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.d.mts","sourceRoot":"","sources":["../src/resources/tokens.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,MAAM,CACJ,IAAI,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;CAGnC;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE;QA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AK,CAAC,UAAU,CAAC,CAAC;IAE3B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -10,7 +10,11 @@ export declare class Tokens extends APIResource {
10
10
  }
11
11
  export interface Constraint {
12
12
  /**
13
- * Metadata filter facts. Each object is an OR condition; keys within are AND-ed.
13
+ * Metadata key-value pairs for fine-grained access control. When an array is
14
+ * provided, each object is evaluated as an OR condition (any must match). Within a
15
+ * single object, all key-value pairs must match (AND). For example, [{"userId":
16
+ * "alice"}, {"team": "backend"}] allows access if userId is alice OR team is
17
+ * backend.
14
18
  */
15
19
  metadata?: {
16
20
  [key: string]: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/resources/tokens.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,MAAM,CACJ,IAAI,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;CAGnC;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,KAAK,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC,CAAC;IAExE;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAEpC;;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,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
package/src/client.ts CHANGED
@@ -17,6 +17,10 @@ import * as Errors from './core/error';
17
17
  import * as Pagination from './core/pagination';
18
18
  import {
19
19
  AbstractPage,
20
+ type NamespacesPageParams,
21
+ NamespacesPageResponse,
22
+ type ReviewsPageParams,
23
+ ReviewsPageResponse,
20
24
  type SkillsPageParams,
21
25
  SkillsPageResponse,
22
26
  type SmitheryPageParams,
@@ -26,7 +30,6 @@ import * as Uploads from './core/uploads';
26
30
  import * as API from './resources/index';
27
31
  import { APIPromise } from './core/api-promise';
28
32
  import { Health, HealthCheckResponse } from './resources/health';
29
- import { SkillListParams, SkillListResponse, SkillListResponsesSkillsPage, Skills } from './resources/skills';
30
33
  import {
31
34
  Constraint,
32
35
  CreateTokenRequest,
@@ -38,7 +41,9 @@ import { Uplink, UplinkCreateTokenResponse } from './resources/uplink';
38
41
  import { Experimental } from './resources/experimental/experimental';
39
42
  import {
40
43
  NamespaceCreateResponse,
44
+ NamespaceListParams,
41
45
  NamespaceListResponse,
46
+ NamespaceListResponsesNamespacesPage,
42
47
  NamespaceSetResponse,
43
48
  Namespaces,
44
49
  } from './resources/namespaces/namespaces';
@@ -46,6 +51,10 @@ import {
46
51
  BuildConfig,
47
52
  DeploymentTarget,
48
53
  ProjectConfig,
54
+ ServerCreateByNamespaceParams,
55
+ ServerCreateByNamespaceResponse,
56
+ ServerCreateParams,
57
+ ServerCreateResponse,
49
58
  ServerDeleteParams,
50
59
  ServerDeleteResponse,
51
60
  ServerDownloadParams,
@@ -57,6 +66,14 @@ import {
57
66
  ServerListResponsesSmitheryPage,
58
67
  Servers,
59
68
  } from './resources/servers/servers';
69
+ import {
70
+ SkillGetParams,
71
+ SkillGetResponse,
72
+ SkillListParams,
73
+ SkillListResponse,
74
+ SkillListResponsesSkillsPage,
75
+ Skills,
76
+ } from './resources/skills/skills';
60
77
  import { type Fetch } from './internal/builtin-types';
61
78
  import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
62
79
  import { FinalRequestOptions, RequestOptions } from './internal/request-options';
@@ -532,9 +549,10 @@ export class Smithery {
532
549
  controller: AbortController,
533
550
  ): Promise<Response> {
534
551
  const { signal, method, ...options } = init || {};
535
- if (signal) signal.addEventListener('abort', () => controller.abort());
552
+ const abort = controller.abort.bind(controller);
553
+ if (signal) signal.addEventListener('abort', abort, { once: true });
536
554
 
537
- const timeout = setTimeout(() => controller.abort(), ms);
555
+ const timeout = setTimeout(abort, ms);
538
556
 
539
557
  const isReadableBody =
540
558
  ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) ||
@@ -783,6 +801,15 @@ export declare namespace Smithery {
783
801
  export import SkillsPage = Pagination.SkillsPage;
784
802
  export { type SkillsPageParams as SkillsPageParams, type SkillsPageResponse as SkillsPageResponse };
785
803
 
804
+ export import NamespacesPage = Pagination.NamespacesPage;
805
+ export {
806
+ type NamespacesPageParams as NamespacesPageParams,
807
+ type NamespacesPageResponse as NamespacesPageResponse,
808
+ };
809
+
810
+ export import ReviewsPage = Pagination.ReviewsPage;
811
+ export { type ReviewsPageParams as ReviewsPageParams, type ReviewsPageResponse as ReviewsPageResponse };
812
+
786
813
  export { Health as Health, type HealthCheckResponse as HealthCheckResponse };
787
814
 
788
815
  export {
@@ -790,13 +817,17 @@ export declare namespace Smithery {
790
817
  type BuildConfig as BuildConfig,
791
818
  type DeploymentTarget as DeploymentTarget,
792
819
  type ProjectConfig as ProjectConfig,
820
+ type ServerCreateResponse as ServerCreateResponse,
793
821
  type ServerListResponse as ServerListResponse,
794
822
  type ServerDeleteResponse as ServerDeleteResponse,
823
+ type ServerCreateByNamespaceResponse as ServerCreateByNamespaceResponse,
795
824
  type ServerGetResponse as ServerGetResponse,
796
825
  type ServerGetByNamespaceResponse as ServerGetByNamespaceResponse,
797
826
  type ServerListResponsesSmitheryPage as ServerListResponsesSmitheryPage,
827
+ type ServerCreateParams as ServerCreateParams,
798
828
  type ServerListParams as ServerListParams,
799
829
  type ServerDeleteParams as ServerDeleteParams,
830
+ type ServerCreateByNamespaceParams as ServerCreateByNamespaceParams,
800
831
  type ServerDownloadParams as ServerDownloadParams,
801
832
  type ServerGetParams as ServerGetParams,
802
833
  };
@@ -806,8 +837,10 @@ export declare namespace Smithery {
806
837
  export {
807
838
  Skills as Skills,
808
839
  type SkillListResponse as SkillListResponse,
840
+ type SkillGetResponse as SkillGetResponse,
809
841
  type SkillListResponsesSkillsPage as SkillListResponsesSkillsPage,
810
842
  type SkillListParams as SkillListParams,
843
+ type SkillGetParams as SkillGetParams,
811
844
  };
812
845
 
813
846
  export {
@@ -815,6 +848,8 @@ export declare namespace Smithery {
815
848
  type NamespaceCreateResponse as NamespaceCreateResponse,
816
849
  type NamespaceListResponse as NamespaceListResponse,
817
850
  type NamespaceSetResponse as NamespaceSetResponse,
851
+ type NamespaceListResponsesNamespacesPage as NamespaceListResponsesNamespacesPage,
852
+ type NamespaceListParams as NamespaceListParams,
818
853
  };
819
854
 
820
855
  export {
@@ -224,3 +224,121 @@ export class SkillsPage<Item> extends AbstractPage<Item> implements SkillsPageRe
224
224
  };
225
225
  }
226
226
  }
227
+
228
+ export interface NamespacesPageResponse<Item> {
229
+ namespaces: Array<Item>;
230
+
231
+ pagination: NamespacesPageResponse.Pagination;
232
+ }
233
+
234
+ export namespace NamespacesPageResponse {
235
+ export interface Pagination {
236
+ currentPage?: number;
237
+
238
+ pageSize?: number;
239
+
240
+ totalCount?: number;
241
+
242
+ totalPages?: number;
243
+ }
244
+ }
245
+
246
+ export interface NamespacesPageParams {
247
+ page?: number;
248
+
249
+ pageSize?: number;
250
+ }
251
+
252
+ export class NamespacesPage<Item> extends AbstractPage<Item> implements NamespacesPageResponse<Item> {
253
+ namespaces: Array<Item>;
254
+
255
+ pagination: NamespacesPageResponse.Pagination;
256
+
257
+ constructor(
258
+ client: Smithery,
259
+ response: Response,
260
+ body: NamespacesPageResponse<Item>,
261
+ options: FinalRequestOptions,
262
+ ) {
263
+ super(client, response, body, options);
264
+
265
+ this.namespaces = body.namespaces || [];
266
+ this.pagination = body.pagination || {};
267
+ }
268
+
269
+ getPaginatedItems(): Item[] {
270
+ return this.namespaces ?? [];
271
+ }
272
+
273
+ nextPageRequestOptions(): PageRequestOptions | null {
274
+ const query = this.options.query as NamespacesPageParams;
275
+ const currentPage = query?.page ?? 1;
276
+
277
+ return {
278
+ ...this.options,
279
+ query: {
280
+ ...maybeObj(this.options.query),
281
+ page: currentPage + 1,
282
+ },
283
+ };
284
+ }
285
+ }
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
+ }
@@ -43,6 +43,12 @@ export async function defaultParseResponse<T>(client: Smithery, props: APIRespon
43
43
  const mediaType = contentType?.split(';')[0]?.trim();
44
44
  const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
45
45
  if (isJSON) {
46
+ const contentLength = response.headers.get('content-length');
47
+ if (contentLength === '0') {
48
+ // if there is no content we can't do anything
49
+ return undefined as T;
50
+ }
51
+
46
52
  const json = await response.json();
47
53
  return json as T;
48
54
  }