@tool-bridge/server 0.21.1 → 0.22.1

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 (178) hide show
  1. package/dist/admin.js +170 -0
  2. package/dist/airtable-ML2GIGCH.js +790 -0
  3. package/dist/{alt_text_generator_ai-W7O34SNG.js → alt_text_generator_ai-FGYQAF2A.js} +12 -11
  4. package/dist/{amap-VOX4T2AW.js → amap-G7V65NGK.js} +221 -220
  5. package/dist/anthropic-6ZK24TBB.js +203 -0
  6. package/dist/apify-VDGYHP6W.js +248 -0
  7. package/dist/brave_search-TAATLZOS.js +302 -0
  8. package/dist/chunk-2IAI3XQM.js +302 -0
  9. package/dist/chunk-7ISGFRC6.js +161 -0
  10. package/dist/{chunk-E6JCVKW6.js → chunk-BNMLA2RC.js} +3 -3
  11. package/dist/chunk-HA4BGL6C.js +8429 -0
  12. package/dist/{chunk-KMTT3I6D.js → chunk-RMAWSG7E.js} +19172 -25717
  13. package/dist/{chunk-XYBU3WZH.js → chunk-RTW5VRTK.js} +3 -3
  14. package/dist/chunk-U7PTOA3U.js +7320 -0
  15. package/dist/chunk-UY6ANCOY.js +378 -0
  16. package/dist/{chunk-ATK45BXV.js → chunk-X7ZUTKHR.js} +4 -2
  17. package/dist/circleci-BQ2UWXL2.js +389 -0
  18. package/dist/clerk-2JYWQNOI.js +1019 -0
  19. package/dist/cohere-6MI7AQM4.js +185 -0
  20. package/dist/{confluence-B3EWPZVE.js → confluence-6Y6GDETF.js} +105 -104
  21. package/dist/{convertapi-EUWSQYPF.js → convertapi-HBZCSWOX.js} +32 -31
  22. package/dist/{currencyapi-KVTIK3GL.js → currencyapi-337U5TGI.js} +71 -71
  23. package/dist/deepseek-OSPASO7O.js +210 -0
  24. package/dist/docker_hub-3ATQOY5L.js +933 -0
  25. package/dist/dropbox-LSA4GM2Y.js +1305 -0
  26. package/dist/dub-VZPJSPI6.js +680 -0
  27. package/dist/e2b-6SDYQZL2.js +278 -0
  28. package/dist/exa-B6EUYDVP.js +332 -0
  29. package/dist/{fal_ai-23E7JPNT.js → fal_ai-K4Q27IME.js} +81 -80
  30. package/dist/{feishu-7QRIDUV6.js → feishu-4TKXG4SU.js} +528 -572
  31. package/dist/{feishu_custom_bot-TJ4K7QNJ.js → feishu_custom_bot-7CTEAKRB.js} +57 -53
  32. package/dist/figma-OUKSZLD5.js +777 -0
  33. package/dist/firehydrant-7MOYL7QH.js +563 -0
  34. package/dist/{fixer-BWON27UO.js → fixer-H2BV2NO4.js} +34 -33
  35. package/dist/fly-PXKY6PNH.js +469 -0
  36. package/dist/{front-QCGXYEDJ.js → front-UZYIV5DW.js} +104 -104
  37. package/dist/geocodio-NSYO7TFP.js +213 -0
  38. package/dist/ghost-QBKKQQMF.js +338 -0
  39. package/dist/github-ENLSJ4CL.js +5421 -0
  40. package/dist/gmail-KQSDEB47.js +1887 -0
  41. package/dist/googlecalendar-5YCX4SZF.js +2524 -0
  42. package/dist/{googledocs-BUHL4J2H.js → googledocs-SSWIVFKA.js} +341 -340
  43. package/dist/{grafana-GLU2DWF2.js → grafana-TF2LXDQA.js} +221 -220
  44. package/dist/graphhopper-CURBVHYK.js +325 -0
  45. package/dist/index.d.ts +1132 -332
  46. package/dist/index.js +31 -14
  47. package/dist/{ip2proxy-EZ64Y4ZH.js → ip2proxy-YNVMTZEM.js} +28 -27
  48. package/dist/ipgeolocation_io-NAU7VJ4J.js +315 -0
  49. package/dist/ipqualityscore-OT63L4TI.js +279 -0
  50. package/dist/{jina_ai-EFBHTBXL.js → jina_ai-6WBMBGWM.js} +23 -23
  51. package/dist/{jira-HQSHAA5K.js → jira-DVDVTHNO.js} +118 -117
  52. package/dist/langsmith-IM5N4YAU.js +593 -0
  53. package/dist/lemlist-277SHUQF.js +289 -0
  54. package/dist/{linear-K7RYFYAD.js → linear-AEPH7B5V.js} +327 -326
  55. package/dist/logsnag-VEWRAGBG.js +150 -0
  56. package/dist/main.js +57 -280
  57. package/dist/{mattermost-S2BRCWLQ.js → mattermost-Q3A2BIZA.js} +59 -58
  58. package/dist/mem0-AXS7GZGI.js +544 -0
  59. package/dist/memos-7TXG4ZTU.js +744 -0
  60. package/dist/{metabase-MMSEPCOF.js → metabase-NSVACWQM.js} +90 -89
  61. package/dist/mistral_ai-YZ52RGD4.js +1196 -0
  62. package/dist/{mother_duck-H7PCQNZ2.js → mother_duck-XLLL6FVL.js} +94 -93
  63. package/dist/ngrok-4O4W3WZW.js +356 -0
  64. package/dist/{notes-PFMKRO33.js → notes-YTB3TJOO.js} +11 -9
  65. package/dist/notion-4W4O7J7V.js +940 -0
  66. package/dist/open_exchange_rates-23QJXVO5.js +215 -0
  67. package/dist/openai-ZS7GLSLH.js +800 -0
  68. package/dist/opengraph_io-PMVH7OYI.js +362 -0
  69. package/dist/openrouter-ONRGFNB6.js +441 -0
  70. package/dist/outline-UCUYZZ7J.js +599 -0
  71. package/dist/paddle-35HTKTUL.js +454 -0
  72. package/dist/perplexity-NVOBYN24.js +220 -0
  73. package/dist/pinecone-55CJY73C.js +571 -0
  74. package/dist/{pipedrive-Y2O7QGFF.js → pipedrive-WMCAKS72.js} +99 -98
  75. package/dist/polar-SM4ZM53B.js +395 -0
  76. package/dist/posthog-NWCXVXNJ.js +3464 -0
  77. package/dist/postmark-QJV5PHUQ.js +427 -0
  78. package/dist/{prerender-MENYM2TY.js → prerender-2W7UT4SC.js} +31 -30
  79. package/dist/{pubmed-GOXUVVH5.js → pubmed-VVV7XYLU.js} +239 -238
  80. package/dist/{railway-V2SID4WV.js → railway-KGI57S3O.js} +118 -117
  81. package/dist/readwise-AGHTQB42.js +470 -0
  82. package/dist/render-O4HBROCK.js +461 -0
  83. package/dist/{replicate-756MXPYX.js → replicate-KWBOMX7D.js} +81 -80
  84. package/dist/{resend-ZKH3BTBI.js → resend-DRH6Y6I4.js} +20 -16
  85. package/dist/rootly-XGCUDW6X.js +336 -0
  86. package/dist/{scrapfly-NSRHFDIQ.js → scrapfly-OIQ3OY6L.js} +62 -61
  87. package/dist/{scrapingbee-OQHLAVEY.js → scrapingbee-OCZO4FHX.js} +56 -56
  88. package/dist/{screenshot_fyi-DVWG3AXC.js → screenshot_fyi-CUNGFZOC.js} +16 -16
  89. package/dist/semantic_scholar-3UJRLKES.js +611 -0
  90. package/dist/{sentry-546MNDJG.js → sentry-5BWVZFJV.js} +208 -207
  91. package/dist/{shodan-C3OON3Z3.js → shodan-HI37CTEW.js} +62 -61
  92. package/dist/shopify-LJ2EV2HH.js +610 -0
  93. package/dist/stripe-3LHMV55K.js +585 -0
  94. package/dist/{supabase-U2SL4D63.js → supabase-H2KPX3Q2.js} +245 -244
  95. package/dist/tavily-FBEWGH3Z.js +326 -0
  96. package/dist/telegram-MYYO3JND.js +1767 -0
  97. package/dist/{telnyx-CXQ4EZUX.js → telnyx-H4ALEGAX.js} +57 -56
  98. package/dist/todoist-OBWICA5Q.js +664 -0
  99. package/dist/trello-GUFUJRWO.js +1080 -0
  100. package/dist/turso-NIAK4UMS.js +416 -0
  101. package/dist/{twilio-4PDBJKWX.js → twilio-K6SLK2CX.js} +70 -69
  102. package/dist/umami-42RS2EPS.js +389 -0
  103. package/dist/unsplash-V7TOTETT.js +351 -0
  104. package/dist/{upstash_redis-G4LQBYHA.js → upstash_redis-AWQMB6Y3.js} +51 -50
  105. package/dist/uptimerobot-AZC2DHOT.js +483 -0
  106. package/dist/v2ex-4TVRNMLS.js +667 -0
  107. package/dist/vercel-DPHTJ3XR.js +1076 -0
  108. package/dist/{wolfram_alpha_api-3G4PUJWB.js → wolfram_alpha_api-XAG7IXBW.js} +36 -35
  109. package/dist/wordpress-KMPKVGUX.js +812 -0
  110. package/dist/workos-PKB2YR7S.js +664 -0
  111. package/dist/zhihu-Y4H4XYPB.js +254 -0
  112. package/package.json +18 -9
  113. package/dist/airtable-LLZDFN7M.js +0 -789
  114. package/dist/anthropic-G23NN3X5.js +0 -202
  115. package/dist/apify-Y3SS734K.js +0 -247
  116. package/dist/brave_search-ZC7OAPSZ.js +0 -301
  117. package/dist/chunk-R6P4XAE5.js +0 -248
  118. package/dist/chunk-U7B6DS2O.js +0 -977
  119. package/dist/chunk-UZM2RXZH.js +0 -23436
  120. package/dist/circleci-3BAX5FCG.js +0 -388
  121. package/dist/clerk-6LEM6TNU.js +0 -1019
  122. package/dist/cloudflare_dns-KINYTJUD.js +0 -588
  123. package/dist/cohere-XCJ5AJ6B.js +0 -185
  124. package/dist/deepseek-PC5YGNC5.js +0 -209
  125. package/dist/docker_hub-C3MA5FU6.js +0 -932
  126. package/dist/dropbox-XBV7Z2IR.js +0 -1304
  127. package/dist/dub-LDOFG3HC.js +0 -679
  128. package/dist/e2b-JMCPSVBW.js +0 -277
  129. package/dist/exa-RAK7O7RD.js +0 -331
  130. package/dist/figma-E6IX5DTH.js +0 -773
  131. package/dist/firehydrant-ZBLPQREE.js +0 -562
  132. package/dist/fly-ZH3HFCZJ.js +0 -468
  133. package/dist/geocodio-YGNI7DA4.js +0 -212
  134. package/dist/ghost-EVSGKH2Q.js +0 -337
  135. package/dist/github-MA2BGRCJ.js +0 -5420
  136. package/dist/gmail-E5E6AADE.js +0 -1886
  137. package/dist/googlecalendar-BTLFPXTD.js +0 -2523
  138. package/dist/graphhopper-WSMB3TCD.js +0 -324
  139. package/dist/ipgeolocation_io-AA7HAS22.js +0 -315
  140. package/dist/ipqualityscore-BHJXVTJT.js +0 -277
  141. package/dist/langsmith-5W6SCT6F.js +0 -592
  142. package/dist/lemlist-HJWH6UMK.js +0 -288
  143. package/dist/logsnag-4KFOHL37.js +0 -150
  144. package/dist/mem0-CAW43CIC.js +0 -543
  145. package/dist/memos-TWEGPKFM.js +0 -740
  146. package/dist/mistral_ai-64BGZQHP.js +0 -1195
  147. package/dist/ngrok-GQCUGZKJ.js +0 -356
  148. package/dist/notion-DQWZWP4N.js +0 -936
  149. package/dist/open_exchange_rates-QMMD735E.js +0 -214
  150. package/dist/openai-W6PX32NZ.js +0 -799
  151. package/dist/opengraph_io-HNDBXYNW.js +0 -361
  152. package/dist/openrouter-JJYMEAUL.js +0 -437
  153. package/dist/outline-MCBNQZYY.js +0 -595
  154. package/dist/paddle-D2SKLUDN.js +0 -453
  155. package/dist/perplexity-XIFMKUAE.js +0 -219
  156. package/dist/pinecone-HUFTALV2.js +0 -570
  157. package/dist/polar-TYTOMOSR.js +0 -394
  158. package/dist/posthog-43JAR3VW.js +0 -3463
  159. package/dist/postmark-KL2QJYSG.js +0 -426
  160. package/dist/readwise-CI4GIMMJ.js +0 -469
  161. package/dist/render-SUBJ6YRZ.js +0 -460
  162. package/dist/rootly-CD2LJHPI.js +0 -336
  163. package/dist/semantic_scholar-T4A252KW.js +0 -610
  164. package/dist/shopify-Y2HN2MCQ.js +0 -609
  165. package/dist/stripe-VE3CD3AY.js +0 -584
  166. package/dist/tavily-KCZHK6HE.js +0 -326
  167. package/dist/telegram-3URFBCMY.js +0 -1766
  168. package/dist/todoist-HNPWNYTD.js +0 -663
  169. package/dist/trello-3W2MIXRP.js +0 -1079
  170. package/dist/turso-2EQF7C2Z.js +0 -415
  171. package/dist/umami-5REN7TGP.js +0 -388
  172. package/dist/unsplash-EIXL424F.js +0 -350
  173. package/dist/uptimerobot-KNJ3EYLY.js +0 -482
  174. package/dist/v2ex-RHJ234PZ.js +0 -666
  175. package/dist/vercel-AS6NCIC7.js +0 -1075
  176. package/dist/wordpress-KNDAAUV7.js +0 -811
  177. package/dist/workos-R6UITSJ7.js +0 -663
  178. package/dist/zhihu-AGK4HILK.js +0 -253
@@ -0,0 +1,461 @@
1
+ import {
2
+ createAuthedClient
3
+ } from "./chunk-RTW5VRTK.js";
4
+ import "./chunk-BNMLA2RC.js";
5
+ import {
6
+ trimmedText
7
+ } from "./chunk-JXHMDBAY.js";
8
+ import {
9
+ createProviderPlugin,
10
+ upstreamError
11
+ } from "./chunk-X7ZUTKHR.js";
12
+ import "./chunk-7ISGFRC6.js";
13
+ import "./chunk-UY6ANCOY.js";
14
+ import {
15
+ TBError
16
+ } from "./chunk-HA4BGL6C.js";
17
+ import "./chunk-U67V476Y.js";
18
+
19
+ // ../plugins/src/render/api.ts
20
+ var SERVICE = "render";
21
+ var API_BASE = "https://api.render.com/v1";
22
+ function pathSegment(value, field) {
23
+ const parsed = trimmedText(value);
24
+ if (parsed === void 0) throw new TBError("invalid_argument", `${field} \u4E0D\u80FD\u4E3A\u7A7A`);
25
+ return encodeURIComponent(parsed);
26
+ }
27
+ function firstString(...values) {
28
+ for (const value of values) {
29
+ if (typeof value === "string" && value !== "") return value;
30
+ }
31
+ return void 0;
32
+ }
33
+ function errorMessage(context) {
34
+ if (context.bodyKind === "empty") return `Render \u8FD4\u56DE HTTP ${context.status}`;
35
+ if (context.bodyKind !== "json") return String(context.data);
36
+ const payload = context.data;
37
+ if (payload !== null && typeof payload === "object" && !Array.isArray(payload)) {
38
+ const object = payload;
39
+ const direct = firstString(object.message, object.error, object.detail, object.title);
40
+ if (direct !== void 0) return direct;
41
+ const errors = object.errors;
42
+ if (Array.isArray(errors) && errors.length > 0) {
43
+ const first = errors[0];
44
+ if (typeof first === "string" && first !== "") return first;
45
+ if (first !== null && typeof first === "object" && !Array.isArray(first)) {
46
+ const nested = firstString(first.message, first.error, first.detail);
47
+ if (nested !== void 0) return nested;
48
+ }
49
+ }
50
+ }
51
+ return `Render \u8FD4\u56DE HTTP ${context.status}`;
52
+ }
53
+ var http = createAuthedClient({
54
+ baseUrl: `${API_BASE}/`,
55
+ service: SERVICE,
56
+ auth: { kind: "bearer" },
57
+ headers: { accept: "application/json" },
58
+ // errors 数组与 bodyKind 分叉(非 JSON 原文 String 化不 trim),标准键序提取表达不了,整段覆写。
59
+ mapError: (context) => upstreamError(context.status, errorMessage(context)),
60
+ mapTransportError: ({ message }) => new TBError(
61
+ "unavailable",
62
+ message === void 0 ? "Render \u8BF7\u6C42\u5931\u8D25" : `Render \u8BF7\u6C42\u5931\u8D25: ${message}`,
63
+ { retryable: true }
64
+ )
65
+ });
66
+ async function send(ctx, input) {
67
+ const query = Object.entries(input.query ?? {}).flatMap(([key, value]) => {
68
+ if (Array.isArray(value)) return value.length === 0 ? [] : [[key, value.join(",")]];
69
+ return [[key, value]];
70
+ });
71
+ return await http.request(ctx, {
72
+ method: input.method ?? "GET",
73
+ path: input.path,
74
+ query,
75
+ ...input.body === void 0 ? {} : { json: input.body },
76
+ invalidJson: "text"
77
+ });
78
+ }
79
+ async function requestJson(ctx, input) {
80
+ const response = await send(ctx, input);
81
+ if (response.bodyKind !== "json") {
82
+ throw new TBError("unavailable", "Render \u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94", { retryable: true });
83
+ }
84
+ return response.data;
85
+ }
86
+ async function requestAck(ctx, input) {
87
+ await send(ctx, input);
88
+ }
89
+ function unwrapCursorList(payload, key) {
90
+ if (!Array.isArray(payload)) {
91
+ throw new TBError("unavailable", "Render \u5217\u8868\u54CD\u5E94\u4E0D\u662F\u6570\u7EC4", { retryable: true });
92
+ }
93
+ const items = [];
94
+ let nextCursor = null;
95
+ for (const entry of payload) {
96
+ if (entry === null || typeof entry !== "object" || Array.isArray(entry)) {
97
+ throw new TBError("unavailable", "Render \u5217\u8868\u9879\u4E0D\u662F\u5BF9\u8C61", { retryable: true });
98
+ }
99
+ const record = entry;
100
+ const value = record[key];
101
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
102
+ throw new TBError("unavailable", `Render \u54CD\u5E94\u7F3A\u5C11 ${key}`, { retryable: true });
103
+ }
104
+ items.push(value);
105
+ nextCursor = trimmedText(typeof record.cursor === "string" ? record.cursor : void 0) ?? nextCursor;
106
+ }
107
+ return { items, nextCursor };
108
+ }
109
+ async function getCurrentUser(_input, ctx) {
110
+ return await requestJson(ctx, { path: "/users" });
111
+ }
112
+ async function listWorkspaces(input, ctx) {
113
+ const payload = await requestJson(ctx, {
114
+ path: "/owners",
115
+ query: {
116
+ name: input.name,
117
+ email: input.email,
118
+ cursor: trimmedText(input.cursor),
119
+ limit: input.limit
120
+ }
121
+ });
122
+ const { items, nextCursor } = unwrapCursorList(payload, "owner");
123
+ return { workspaces: items, nextCursor };
124
+ }
125
+ async function listServices(input, ctx) {
126
+ const payload = await requestJson(ctx, {
127
+ path: "/services",
128
+ query: {
129
+ name: input.name,
130
+ type: input.type,
131
+ ownerId: input.ownerId,
132
+ suspended: input.suspended,
133
+ includePreviews: input.includePreviews,
134
+ cursor: trimmedText(input.cursor),
135
+ limit: input.limit
136
+ }
137
+ });
138
+ const { items, nextCursor } = unwrapCursorList(payload, "service");
139
+ return { services: items, nextCursor };
140
+ }
141
+ async function getService(input, ctx) {
142
+ return await requestJson(ctx, { path: `/services/${pathSegment(input.serviceId, "serviceId")}` });
143
+ }
144
+ async function listDeploys(input, ctx) {
145
+ const payload = await requestJson(ctx, {
146
+ path: `/services/${pathSegment(input.serviceId, "serviceId")}/deploys`,
147
+ query: {
148
+ status: input.status,
149
+ cursor: trimmedText(input.cursor),
150
+ limit: input.limit
151
+ }
152
+ });
153
+ const { items, nextCursor } = unwrapCursorList(payload, "deploy");
154
+ return { deploys: items, nextCursor };
155
+ }
156
+ async function triggerDeploy(input, ctx) {
157
+ const serviceId = pathSegment(input.serviceId, "serviceId");
158
+ if (input.deployMode !== void 0 && (input.commitId !== void 0 || input.imageUrl !== void 0 || input.clearCache !== void 0)) {
159
+ throw new TBError("invalid_argument", "deployMode \u4E0D\u80FD\u4E0E commitId\u3001imageUrl\u3001clearCache \u540C\u65F6\u7ED9");
160
+ }
161
+ const response = await send(ctx, {
162
+ path: `/services/${serviceId}/deploys`,
163
+ method: "POST",
164
+ // clearCache 没给时上游也显式发 do_not_clear(而不是省略),保持等价。
165
+ body: {
166
+ clearCache: input.clearCache === true ? "clear" : "do_not_clear",
167
+ ...trimmedText(input.commitId) === void 0 ? {} : { commitId: trimmedText(input.commitId) },
168
+ ...trimmedText(input.imageUrl) === void 0 ? {} : { imageUrl: trimmedText(input.imageUrl) },
169
+ ...input.deployMode === void 0 ? {} : { deployMode: input.deployMode }
170
+ }
171
+ });
172
+ if (response.status === 202) return { queued: true, serviceId: input.serviceId };
173
+ if (response.bodyKind !== "json") {
174
+ throw new TBError("unavailable", "Render \u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94", { retryable: true });
175
+ }
176
+ return response.data;
177
+ }
178
+ async function rollbackDeploy(input, ctx) {
179
+ const serviceId = pathSegment(input.serviceId, "serviceId");
180
+ const deployId = trimmedText(input.deployId);
181
+ if (deployId === void 0) throw new TBError("invalid_argument", "deployId \u4E0D\u80FD\u4E3A\u7A7A");
182
+ return await requestJson(ctx, {
183
+ path: `/services/${serviceId}/rollback`,
184
+ method: "POST",
185
+ body: { deployId }
186
+ });
187
+ }
188
+ async function restartService(input, ctx) {
189
+ await requestAck(ctx, {
190
+ path: `/services/${pathSegment(input.serviceId, "serviceId")}/restart`,
191
+ method: "POST"
192
+ });
193
+ return { ok: true, serviceId: input.serviceId, action: "restart" };
194
+ }
195
+ async function suspendService(input, ctx) {
196
+ await requestAck(ctx, {
197
+ path: `/services/${pathSegment(input.serviceId, "serviceId")}/suspend`,
198
+ method: "POST"
199
+ });
200
+ return { ok: true, serviceId: input.serviceId, action: "suspend" };
201
+ }
202
+ async function resumeService(input, ctx) {
203
+ await requestAck(ctx, {
204
+ path: `/services/${pathSegment(input.serviceId, "serviceId")}/resume`,
205
+ method: "POST"
206
+ });
207
+ return { ok: true, serviceId: input.serviceId, action: "resume" };
208
+ }
209
+
210
+ // ../plugins/src/render/schema.ts
211
+ import { z } from "zod/v4";
212
+ var getCurrentUserInput = z.strictObject({}).describe("Action input.");
213
+ var getCurrentUserOutput = z.strictObject({
214
+ email: z.email().describe("Email address of the authenticated Render user.").optional(),
215
+ name: z.string().describe("Display name of the authenticated Render user.").optional()
216
+ }).describe("Render user.");
217
+ var listWorkspacesInput = z.strictObject({
218
+ name: z.array(z.string().min(1)).min(1).describe("Only return resources with one of these exact names.").optional(),
219
+ email: z.array(z.email().describe("Workspace owner email.")).min(1).describe("Only return workspaces owned by one of these email addresses.").optional(),
220
+ cursor: z.string().min(1).describe("Pagination cursor returned by a previous Render response.").optional(),
221
+ limit: z.int().min(1).max(100).describe("Maximum number of results to return.").optional()
222
+ });
223
+ var listWorkspacesOutput = z.strictObject({
224
+ workspaces: z.array(z.looseObject({
225
+ id: z.string().describe("Unique identifier of the workspace.").optional(),
226
+ name: z.string().describe("Workspace display name.").optional(),
227
+ email: z.email().describe("Primary email address of the workspace.").optional(),
228
+ type: z.enum(["user", "team"]).describe("Workspace type.").optional(),
229
+ ipAllowList: z.array(z.looseObject({}).describe("Object returned by Render.")).describe("IP allow list entries configured for the workspace, when present.").optional(),
230
+ twoFactorAuthEnabled: z.boolean().describe("Whether two-factor authentication is enabled for the workspace owner.").optional()
231
+ }).describe("Render workspace.")).describe("Workspaces returned by Render.").optional(),
232
+ nextCursor: z.string().describe("Cursor for the next page of workspaces, or null when there is no next page.").nullable().optional()
233
+ }).describe("Paginated Render workspace list.");
234
+ var listServicesInput = z.strictObject({
235
+ name: z.array(z.string().min(1)).min(1).describe("Only return resources with one of these exact names.").optional(),
236
+ type: z.array(z.enum(["static_site", "web_service", "private_service", "background_worker", "cron_job"]).describe("Type of service on Render.")).min(1).describe("Only return services with these types.").optional(),
237
+ ownerId: z.array(z.string().min(1)).min(1).describe("Only return resources for one of these workspace IDs.").optional(),
238
+ suspended: z.array(z.enum(["suspended", "not_suspended"]).describe("Suspension state reported by Render.")).min(1).describe("Only return services in one of these suspension states.").optional(),
239
+ includePreviews: z.boolean().describe("Whether preview services should be included in the response.").optional(),
240
+ cursor: z.string().min(1).describe("Pagination cursor returned by a previous Render response.").optional(),
241
+ limit: z.int().min(1).max(100).describe("Maximum number of results to return.").optional()
242
+ });
243
+ var listServicesOutput = z.strictObject({
244
+ services: z.array(z.looseObject({
245
+ id: z.string().describe("Unique identifier of the service.").optional(),
246
+ name: z.string().describe("Name of the service.").optional(),
247
+ ownerId: z.string().describe("Workspace ID that owns the service.").optional(),
248
+ type: z.enum(["static_site", "web_service", "private_service", "background_worker", "cron_job"]).describe("Type of service on Render.").optional(),
249
+ createdAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
250
+ dashboardUrl: z.string().describe("Dashboard URL for the service.").optional(),
251
+ updatedAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
252
+ suspended: z.enum(["suspended", "not_suspended"]).describe("Suspension state reported by Render.").optional(),
253
+ suspenders: z.array(z.enum(["admin", "billing", "user", "parent_service", "stuck_crashlooping", "hipaa_enablement", "unknown"]).describe("Reason why the service is suspended.")).describe("Suspension reasons reported for the service.").optional(),
254
+ autoDeploy: z.enum(["yes", "no"]).describe("Whether Render auto-deploys changes for the service.").optional(),
255
+ notifyOnFail: z.enum(["default", "notify", "ignore"]).describe("Notification setting when a deploy fails.").optional(),
256
+ slug: z.string().describe("URL-friendly slug of the service.").optional(),
257
+ serviceDetails: z.looseObject({}).describe("Object returned by Render.").optional(),
258
+ rootDir: z.string().describe("Repository root directory configured for the service.").optional(),
259
+ branch: z.string().describe("Git branch used by the service, when present.").optional(),
260
+ buildFilter: z.looseObject({}).describe("Object returned by Render.").optional(),
261
+ environmentId: z.string().describe("Environment ID attached to the service, when present.").optional(),
262
+ imagePath: z.string().describe("Docker image path used by the service, when present.").optional(),
263
+ registryCredential: z.looseObject({}).describe("Object returned by Render.").optional(),
264
+ repo: z.string().describe("Source repository URL for the service, when present.").optional()
265
+ }).describe("Render service.")).describe("Services returned by Render.").optional(),
266
+ nextCursor: z.string().describe("Cursor for the next page of services, or null when there is no next page.").nullable().optional()
267
+ }).describe("Paginated Render service list.");
268
+ var getServiceInput = z.strictObject({
269
+ serviceId: z.string().min(1).describe("The unique identifier of the Render service.").optional()
270
+ });
271
+ var getServiceOutput = z.looseObject({
272
+ id: z.string().describe("Unique identifier of the service.").optional(),
273
+ name: z.string().describe("Name of the service.").optional(),
274
+ ownerId: z.string().describe("Workspace ID that owns the service.").optional(),
275
+ type: z.enum(["static_site", "web_service", "private_service", "background_worker", "cron_job"]).describe("Type of service on Render.").optional(),
276
+ createdAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
277
+ dashboardUrl: z.string().describe("Dashboard URL for the service.").optional(),
278
+ updatedAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
279
+ suspended: z.enum(["suspended", "not_suspended"]).describe("Suspension state reported by Render.").optional(),
280
+ suspenders: z.array(z.enum(["admin", "billing", "user", "parent_service", "stuck_crashlooping", "hipaa_enablement", "unknown"]).describe("Reason why the service is suspended.")).describe("Suspension reasons reported for the service.").optional(),
281
+ autoDeploy: z.enum(["yes", "no"]).describe("Whether Render auto-deploys changes for the service.").optional(),
282
+ notifyOnFail: z.enum(["default", "notify", "ignore"]).describe("Notification setting when a deploy fails.").optional(),
283
+ slug: z.string().describe("URL-friendly slug of the service.").optional(),
284
+ serviceDetails: z.looseObject({}).describe("Object returned by Render.").optional(),
285
+ rootDir: z.string().describe("Repository root directory configured for the service.").optional(),
286
+ branch: z.string().describe("Git branch used by the service, when present.").optional(),
287
+ buildFilter: z.looseObject({}).describe("Object returned by Render.").optional(),
288
+ environmentId: z.string().describe("Environment ID attached to the service, when present.").optional(),
289
+ imagePath: z.string().describe("Docker image path used by the service, when present.").optional(),
290
+ registryCredential: z.looseObject({}).describe("Object returned by Render.").optional(),
291
+ repo: z.string().describe("Source repository URL for the service, when present.").optional()
292
+ }).describe("Render service.");
293
+ var listDeploysInput = z.strictObject({
294
+ serviceId: z.string().min(1).describe("The unique identifier of the Render service."),
295
+ status: z.array(z.enum(["created", "queued", "build_in_progress", "update_in_progress", "live", "deactivated", "build_failed", "update_failed", "canceled", "pre_deploy_in_progress", "pre_deploy_failed"]).describe("Deploy status reported by Render.")).min(1).describe("Only return deploys with these statuses.").optional(),
296
+ cursor: z.string().min(1).describe("Pagination cursor returned by a previous Render response.").optional(),
297
+ limit: z.int().min(1).max(100).describe("Maximum number of results to return.").optional()
298
+ });
299
+ var listDeploysOutput = z.strictObject({
300
+ deploys: z.array(z.looseObject({
301
+ id: z.string().describe("Unique identifier of the deploy.").optional(),
302
+ commit: z.looseObject({}).describe("Object returned by Render.").optional(),
303
+ image: z.looseObject({}).describe("Object returned by Render.").optional(),
304
+ status: z.enum(["created", "queued", "build_in_progress", "update_in_progress", "live", "deactivated", "build_failed", "update_failed", "canceled", "pre_deploy_in_progress", "pre_deploy_failed"]).describe("Deploy status reported by Render.").optional(),
305
+ trigger: z.string().describe("Event that triggered the deploy.").optional(),
306
+ startedAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
307
+ finishedAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
308
+ createdAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
309
+ updatedAt: z.string().describe("Timestamp in ISO 8601 format.").optional()
310
+ }).describe("Render deploy.")).describe("Deploys returned by Render.").optional(),
311
+ nextCursor: z.string().describe("Cursor for the next page of deploys, or null when there is no next page.").nullable().optional()
312
+ }).describe("Paginated Render deploy list.");
313
+ var triggerDeployInput = z.strictObject({
314
+ serviceId: z.string().min(1).describe("The unique identifier of the Render service."),
315
+ clearCache: z.boolean().describe("Whether Render should clear the build cache before deploying.").optional(),
316
+ commitId: z.string().min(1).describe("Specific Git commit SHA to deploy instead of the latest commit.").optional(),
317
+ imageUrl: z.string().min(1).describe("Image URL to deploy for an image-backed service.").optional(),
318
+ deployMode: z.enum(["deploy_only", "build_and_deploy"]).describe("Deployment behavior to use when triggering a deploy.").optional()
319
+ }).describe("Input for triggering a Render deploy. deployMode cannot be combined with commitId, imageUrl, or clearCache.");
320
+ var triggerDeployOutput = z.union([z.looseObject({
321
+ id: z.string().describe("Unique identifier of the deploy.").optional(),
322
+ commit: z.looseObject({}).describe("Object returned by Render.").optional(),
323
+ image: z.looseObject({}).describe("Object returned by Render.").optional(),
324
+ status: z.enum(["created", "queued", "build_in_progress", "update_in_progress", "live", "deactivated", "build_failed", "update_failed", "canceled", "pre_deploy_in_progress", "pre_deploy_failed"]).describe("Deploy status reported by Render.").optional(),
325
+ trigger: z.string().describe("Event that triggered the deploy.").optional(),
326
+ startedAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
327
+ finishedAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
328
+ createdAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
329
+ updatedAt: z.string().describe("Timestamp in ISO 8601 format.").optional()
330
+ }).describe("Render deploy."), z.strictObject({
331
+ queued: z.boolean().describe("Whether the deploy request was accepted and queued.").optional(),
332
+ serviceId: z.string().min(1).describe("The unique identifier of the Render service.").optional()
333
+ }).describe("Acknowledgement for a queued Render deploy request.")]);
334
+ var rollbackDeployInput = z.strictObject({
335
+ serviceId: z.string().min(1).describe("The unique identifier of the Render service.").optional(),
336
+ deployId: z.string().min(1).describe("The unique identifier of the Render deploy.").optional()
337
+ });
338
+ var rollbackDeployOutput = z.looseObject({
339
+ id: z.string().describe("Unique identifier of the deploy.").optional(),
340
+ commit: z.looseObject({}).describe("Object returned by Render.").optional(),
341
+ image: z.looseObject({}).describe("Object returned by Render.").optional(),
342
+ status: z.enum(["created", "queued", "build_in_progress", "update_in_progress", "live", "deactivated", "build_failed", "update_failed", "canceled", "pre_deploy_in_progress", "pre_deploy_failed"]).describe("Deploy status reported by Render.").optional(),
343
+ trigger: z.string().describe("Event that triggered the deploy.").optional(),
344
+ startedAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
345
+ finishedAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
346
+ createdAt: z.string().describe("Timestamp in ISO 8601 format.").optional(),
347
+ updatedAt: z.string().describe("Timestamp in ISO 8601 format.").optional()
348
+ }).describe("Render deploy.");
349
+ var restartServiceInput = z.strictObject({
350
+ serviceId: z.string().min(1).describe("The unique identifier of the Render service.").optional()
351
+ });
352
+ var restartServiceOutput = z.strictObject({
353
+ ok: z.boolean().describe("Whether the lifecycle operation request was accepted.").optional(),
354
+ serviceId: z.string().min(1).describe("The unique identifier of the Render service.").optional(),
355
+ action: z.enum(["restart", "suspend", "resume"]).describe("Lifecycle action requested.").optional()
356
+ }).describe("Acknowledgement for a Render lifecycle operation.");
357
+ var suspendServiceInput = z.strictObject({
358
+ serviceId: z.string().min(1).describe("The unique identifier of the Render service.").optional()
359
+ });
360
+ var suspendServiceOutput = z.strictObject({
361
+ ok: z.boolean().describe("Whether the lifecycle operation request was accepted.").optional(),
362
+ serviceId: z.string().min(1).describe("The unique identifier of the Render service.").optional(),
363
+ action: z.enum(["restart", "suspend", "resume"]).describe("Lifecycle action requested.").optional()
364
+ }).describe("Acknowledgement for a Render lifecycle operation.");
365
+ var resumeServiceInput = z.strictObject({
366
+ serviceId: z.string().min(1).describe("The unique identifier of the Render service.").optional()
367
+ });
368
+ var resumeServiceOutput = z.strictObject({
369
+ ok: z.boolean().describe("Whether the lifecycle operation request was accepted.").optional(),
370
+ serviceId: z.string().min(1).describe("The unique identifier of the Render service.").optional(),
371
+ action: z.enum(["restart", "suspend", "resume"]).describe("Lifecycle action requested.").optional()
372
+ }).describe("Acknowledgement for a Render lifecycle operation.");
373
+ var renderActions = {
374
+ get_current_user: {
375
+ description: "Get the currently authenticated Render user profile.",
376
+ effect: "read",
377
+ inputSchema: getCurrentUserInput,
378
+ outputSchema: z.toJSONSchema(getCurrentUserOutput, { io: "output", unrepresentable: "any" })
379
+ },
380
+ list_workspaces: {
381
+ description: "List Render workspaces available to the authenticated API key.",
382
+ effect: "read",
383
+ inputSchema: listWorkspacesInput,
384
+ outputSchema: z.toJSONSchema(listWorkspacesOutput, { io: "output", unrepresentable: "any" })
385
+ },
386
+ list_services: {
387
+ description: "List Render services with optional workspace, type, and suspension filters.",
388
+ effect: "read",
389
+ inputSchema: listServicesInput,
390
+ outputSchema: z.toJSONSchema(listServicesOutput, { io: "output", unrepresentable: "any" })
391
+ },
392
+ get_service: {
393
+ description: "Get Render service details by service ID.",
394
+ effect: "read",
395
+ inputSchema: getServiceInput,
396
+ outputSchema: z.toJSONSchema(getServiceOutput, { io: "output", unrepresentable: "any" })
397
+ },
398
+ list_deploys: {
399
+ description: "List recent Render deploys for a service.",
400
+ effect: "read",
401
+ inputSchema: listDeploysInput,
402
+ outputSchema: z.toJSONSchema(listDeploysOutput, { io: "output", unrepresentable: "any" })
403
+ },
404
+ trigger_deploy: {
405
+ description: "Trigger a new deploy for a Render service.",
406
+ effect: "write",
407
+ inputSchema: triggerDeployInput,
408
+ outputSchema: z.toJSONSchema(triggerDeployOutput, { io: "output", unrepresentable: "any" })
409
+ },
410
+ rollback_deploy: {
411
+ description: "Trigger a rollback to a previous deploy for a Render service.",
412
+ effect: "write",
413
+ inputSchema: rollbackDeployInput,
414
+ outputSchema: z.toJSONSchema(rollbackDeployOutput, { io: "output", unrepresentable: "any" })
415
+ },
416
+ restart_service: {
417
+ description: "Restart a Render service.",
418
+ effect: "write",
419
+ inputSchema: restartServiceInput,
420
+ outputSchema: z.toJSONSchema(restartServiceOutput, { io: "output", unrepresentable: "any" })
421
+ },
422
+ suspend_service: {
423
+ description: "Suspend a Render service.",
424
+ effect: "write",
425
+ inputSchema: suspendServiceInput,
426
+ outputSchema: z.toJSONSchema(suspendServiceOutput, { io: "output", unrepresentable: "any" })
427
+ },
428
+ resume_service: {
429
+ description: "Resume a suspended Render service.",
430
+ effect: "write",
431
+ inputSchema: resumeServiceInput,
432
+ outputSchema: z.toJSONSchema(resumeServiceOutput, { io: "output", unrepresentable: "any" })
433
+ }
434
+ };
435
+
436
+ // ../plugins/src/render/index.ts
437
+ function createRenderPlugin() {
438
+ return createProviderPlugin({
439
+ description: "Render",
440
+ actions: renderActions,
441
+ // 上游的 credentialValidators 就打 /users;get_current_user 是它的同一个调用。
442
+ credentialProbe: "get_current_user",
443
+ handlers: {
444
+ get_current_user: getCurrentUser,
445
+ list_workspaces: listWorkspaces,
446
+ list_services: listServices,
447
+ get_service: getService,
448
+ list_deploys: listDeploys,
449
+ trigger_deploy: triggerDeploy,
450
+ rollback_deploy: rollbackDeploy,
451
+ restart_service: restartService,
452
+ suspend_service: suspendService,
453
+ resume_service: resumeService
454
+ }
455
+ });
456
+ }
457
+ var render_default = createRenderPlugin();
458
+ export {
459
+ createRenderPlugin,
460
+ render_default as default
461
+ };