@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,336 @@
1
+ import {
2
+ createAuthedClient
3
+ } from "./chunk-RTW5VRTK.js";
4
+ import "./chunk-BNMLA2RC.js";
5
+ import {
6
+ asJsonObject,
7
+ compactDefined,
8
+ trimmedText
9
+ } from "./chunk-JXHMDBAY.js";
10
+ import {
11
+ createProviderPlugin,
12
+ upstreamError
13
+ } from "./chunk-X7ZUTKHR.js";
14
+ import "./chunk-7ISGFRC6.js";
15
+ import "./chunk-UY6ANCOY.js";
16
+ import "./chunk-HA4BGL6C.js";
17
+ import "./chunk-U67V476Y.js";
18
+
19
+ // ../plugins/src/rootly/api.ts
20
+ var SERVICE = "rootly";
21
+ var API_BASE = "https://api.rootly.com/v1";
22
+ var JSON_API_CONTENT_TYPE = "application/vnd.api+json";
23
+ function requireRecord(value, label) {
24
+ const record = asJsonObject(value);
25
+ if (record === void 0) throw upstreamError(502, `${label} was not an object`);
26
+ return record;
27
+ }
28
+ function errorMessage(payload, status) {
29
+ const object = asJsonObject(payload);
30
+ const errors = Array.isArray(object?.errors) ? object.errors : [];
31
+ const first = asJsonObject(errors[0]);
32
+ return trimmedText(first?.detail) ?? trimmedText(first?.title) ?? `Rootly request failed with ${status}`;
33
+ }
34
+ var http = createAuthedClient({
35
+ baseUrl: `${API_BASE}/`,
36
+ service: SERVICE,
37
+ auth: { kind: "bearer" },
38
+ headers: { "accept": JSON_API_CONTENT_TYPE, "content-type": JSON_API_CONTENT_TYPE },
39
+ // JSON:API 的消息在 `errors[0].detail/title`,非 JSON 体还要包成同形再提取,整段覆写。
40
+ mapError: ({ bodyKind, data, status }) => upstreamError(
41
+ status,
42
+ errorMessage(bodyKind === "json" ? data : { errors: [{ detail: data }] }, status)
43
+ )
44
+ });
45
+ async function requestJson(ctx, path, query) {
46
+ const response = await http.request(ctx, {
47
+ path,
48
+ query: Object.entries(query),
49
+ invalidJson: "text"
50
+ });
51
+ if (response.bodyKind === "empty") return {};
52
+ if (response.bodyKind !== "json") throw upstreamError(502, "Rootly returned invalid JSON");
53
+ return response.data;
54
+ }
55
+ function readResource(value, label) {
56
+ const object = requireRecord(value, label);
57
+ const data = object.data === void 0 ? object : requireRecord(object.data, `${label} data`);
58
+ const id = trimmedText(data.id);
59
+ const type = trimmedText(data.type);
60
+ if (id === void 0 || type === void 0) {
61
+ throw upstreamError(502, `${label} did not include JSON:API id and type`);
62
+ }
63
+ return {
64
+ ...data,
65
+ id,
66
+ type,
67
+ attributes: asJsonObject(data.attributes) ?? {},
68
+ relationships: asJsonObject(data.relationships) ?? {}
69
+ };
70
+ }
71
+ function readSidecars(payload) {
72
+ const object = requireRecord(payload, "Rootly response");
73
+ const included = Array.isArray(object.included) ? object.included : void 0;
74
+ const links = asJsonObject(object.links);
75
+ const meta = asJsonObject(object.meta);
76
+ return {
77
+ ...included === void 0 ? {} : { included },
78
+ ...links === void 0 ? {} : { links },
79
+ ...meta === void 0 ? {} : { meta }
80
+ };
81
+ }
82
+ async function getSingleResource(ctx, path, query) {
83
+ const payload = await requestJson(ctx, path, query);
84
+ return { resource: readResource(payload, "Rootly resource"), ...readSidecars(payload), raw: payload };
85
+ }
86
+ async function getList(ctx, path, query) {
87
+ const payload = await requestJson(ctx, path, query);
88
+ const object = requireRecord(payload, "Rootly list response");
89
+ if (!Array.isArray(object.data)) {
90
+ throw upstreamError(502, "Rootly list response did not include data array");
91
+ }
92
+ return {
93
+ resources: object.data.map((item) => readResource(item, "Rootly list resource")),
94
+ ...readSidecars(payload),
95
+ raw: payload
96
+ };
97
+ }
98
+ function includeQuery(include) {
99
+ return { include: include === void 0 || include.length === 0 ? void 0 : include.join(",") };
100
+ }
101
+ function pageQuery(input, options = {}) {
102
+ return {
103
+ ...options.cursor === true ? { "page[after]": trimmedText(input.pageAfter) } : {},
104
+ "page[number]": input.pageNumber === void 0 ? void 0 : String(input.pageNumber),
105
+ "page[size]": input.pageSize === void 0 ? void 0 : String(input.pageSize)
106
+ };
107
+ }
108
+ function configurationQuery(input, options = {}) {
109
+ return compactDefined({
110
+ ...includeQuery(input.include),
111
+ ...pageQuery(input),
112
+ "filter[search]": trimmedText(input.search),
113
+ "filter[name]": trimmedText(input.name),
114
+ "filter[slug]": trimmedText(input.slug),
115
+ "filter[external_id]": trimmedText(input.externalId),
116
+ ...options.includeColor === true ? { "filter[color]": trimmedText(input.color) } : {},
117
+ "filter[alert_broadcast_enabled]": input.alertBroadcastEnabled === void 0 ? void 0 : String(input.alertBroadcastEnabled),
118
+ "filter[incident_broadcast_enabled]": input.incidentBroadcastEnabled === void 0 ? void 0 : String(input.incidentBroadcastEnabled),
119
+ "filter[created_at][gt]": trimmedText(input.createdAtGt),
120
+ "filter[created_at][gte]": trimmedText(input.createdAtGte),
121
+ "filter[created_at][lt]": trimmedText(input.createdAtLt),
122
+ "filter[created_at][lte]": trimmedText(input.createdAtLte),
123
+ "sort": trimmedText(input.sort)
124
+ });
125
+ }
126
+ function getCurrentUser(_input, ctx) {
127
+ return getSingleResource(ctx, "/users/me", {});
128
+ }
129
+ function listIncidents(input, ctx) {
130
+ return getList(ctx, "/incidents", compactDefined({
131
+ ...pageQuery(input, { cursor: true }),
132
+ "filter[search]": trimmedText(input.search),
133
+ "filter[kind]": trimmedText(input.kind),
134
+ "filter[status]": trimmedText(input.status),
135
+ "filter[private]": input.private === void 0 ? void 0 : String(input.private),
136
+ "filter[user_id]": input.userId === void 0 ? void 0 : String(input.userId),
137
+ "filter[severity]": trimmedText(input.severity),
138
+ "filter[severity_id]": trimmedText(input.severityId),
139
+ "filter[labels]": trimmedText(input.labels),
140
+ "filter[service_ids]": trimmedText(input.serviceIds),
141
+ "filter[service_names]": trimmedText(input.serviceNames),
142
+ "filter[team_ids]": trimmedText(input.teamIds),
143
+ "filter[team_names]": trimmedText(input.teamNames),
144
+ "filter[created_at][gt]": trimmedText(input.createdAtGt),
145
+ "filter[created_at][gte]": trimmedText(input.createdAtGte),
146
+ "filter[created_at][lt]": trimmedText(input.createdAtLt),
147
+ "filter[created_at][lte]": trimmedText(input.createdAtLte),
148
+ "sort": trimmedText(input.sort)
149
+ }));
150
+ }
151
+ function getIncident(input, ctx) {
152
+ return getSingleResource(
153
+ ctx,
154
+ `/incidents/${encodeURIComponent(input.id)}`,
155
+ compactDefined(includeQuery(input.include))
156
+ );
157
+ }
158
+ function listServices(input, ctx) {
159
+ return getList(ctx, "/services", configurationQuery(input));
160
+ }
161
+ function listTeams(input, ctx) {
162
+ return getList(ctx, "/teams", configurationQuery(input, { includeColor: true }));
163
+ }
164
+
165
+ // ../plugins/src/rootly/schema.ts
166
+ import { z } from "zod/v4";
167
+ var getCurrentUserInput = z.strictObject({}).describe("This action does not require input.");
168
+ var getCurrentUserOutput = z.strictObject({
169
+ resource: z.looseObject({
170
+ id: z.string().min(1).describe("The Rootly resource ID.").optional(),
171
+ type: z.string().min(1).describe("The Rootly resource type.").optional(),
172
+ attributes: z.looseObject({}).describe("The Rootly resource attributes.").optional(),
173
+ relationships: z.looseObject({}).describe("The Rootly resource relationships.").optional()
174
+ }).describe("A Rootly JSON:API resource."),
175
+ included: z.array(z.looseObject({}).describe("One included Rootly JSON:API resource.")).describe("Included Rootly JSON:API resources.").optional(),
176
+ raw: z.looseObject({}).describe("The raw Rootly JSON:API response.")
177
+ }).describe("A Rootly single-resource response.");
178
+ var listIncidentsInput = z.strictObject({
179
+ pageAfter: z.string().min(1).describe("The Rootly cursor from meta.next_cursor.").optional(),
180
+ pageNumber: z.int().min(1).describe("The page number to request.").optional(),
181
+ pageSize: z.int().min(1).describe("The number of records to request per page.").optional(),
182
+ search: z.string().min(1).describe("Search text for Rootly incident filtering.").optional(),
183
+ kind: z.string().min(1).describe("Rootly incident kind filter.").optional(),
184
+ status: z.string().min(1).describe("Rootly incident status filter.").optional(),
185
+ private: z.boolean().describe("Whether to filter private incidents.").optional(),
186
+ userId: z.int().min(1).describe("Rootly user ID filter.").optional(),
187
+ severity: z.string().min(1).describe("Rootly severity name filter.").optional(),
188
+ severityId: z.string().min(1).describe("Rootly severity ID filter.").optional(),
189
+ labels: z.string().min(1).describe("Comma-separated Rootly label filter.").optional(),
190
+ serviceIds: z.string().min(1).describe("Comma-separated Rootly service ID filter.").optional(),
191
+ serviceNames: z.string().min(1).describe("Comma-separated Rootly service name filter.").optional(),
192
+ teamIds: z.string().min(1).describe("Comma-separated Rootly team ID filter.").optional(),
193
+ teamNames: z.string().min(1).describe("Comma-separated Rootly team name filter.").optional(),
194
+ createdAtGt: z.iso.datetime({ offset: true }).describe("The ISO 8601 timestamp for this filter.").optional(),
195
+ createdAtGte: z.iso.datetime({ offset: true }).describe("The ISO 8601 timestamp for this filter.").optional(),
196
+ createdAtLt: z.iso.datetime({ offset: true }).describe("The ISO 8601 timestamp for this filter.").optional(),
197
+ createdAtLte: z.iso.datetime({ offset: true }).describe("The ISO 8601 timestamp for this filter.").optional(),
198
+ sort: z.string().min(1).describe("The Rootly sort expression, such as name or -created_at.").optional()
199
+ }).describe("Input for listing Rootly incidents.");
200
+ var listIncidentsOutput = z.strictObject({
201
+ resources: z.array(z.looseObject({
202
+ id: z.string().min(1).describe("The Rootly resource ID.").optional(),
203
+ type: z.string().min(1).describe("The Rootly resource type.").optional(),
204
+ attributes: z.looseObject({}).describe("The Rootly resource attributes.").optional(),
205
+ relationships: z.looseObject({}).describe("The Rootly resource relationships.").optional()
206
+ }).describe("A Rootly JSON:API resource.")).describe("Rootly JSON:API resources."),
207
+ included: z.array(z.looseObject({}).describe("One included Rootly JSON:API resource.")).describe("Included Rootly JSON:API resources.").optional(),
208
+ links: z.looseObject({}).describe("Rootly pagination or resource links.").optional(),
209
+ meta: z.looseObject({}).describe("Rootly response metadata.").optional(),
210
+ raw: z.looseObject({}).describe("The raw Rootly JSON:API response.")
211
+ }).describe("A Rootly list response.");
212
+ var getIncidentInput = z.strictObject({
213
+ id: z.string().min(1).describe("The Rootly resource UUID or slug."),
214
+ include: z.array(z.string().min(1).describe("One Rootly include value.")).min(1).describe("Related Rootly resources to include in the JSON:API response.").optional()
215
+ }).describe("Input for retrieving one Rootly resource.");
216
+ var getIncidentOutput = z.strictObject({
217
+ resource: z.looseObject({
218
+ id: z.string().min(1).describe("The Rootly resource ID.").optional(),
219
+ type: z.string().min(1).describe("The Rootly resource type.").optional(),
220
+ attributes: z.looseObject({}).describe("The Rootly resource attributes.").optional(),
221
+ relationships: z.looseObject({}).describe("The Rootly resource relationships.").optional()
222
+ }).describe("A Rootly JSON:API resource."),
223
+ included: z.array(z.looseObject({}).describe("One included Rootly JSON:API resource.")).describe("Included Rootly JSON:API resources.").optional(),
224
+ raw: z.looseObject({}).describe("The raw Rootly JSON:API response.")
225
+ }).describe("A Rootly single-resource response.");
226
+ var listServicesInput = z.strictObject({
227
+ include: z.array(z.string().min(1).describe("One Rootly include value.")).min(1).describe("Related Rootly resources to include in the JSON:API response.").optional(),
228
+ pageNumber: z.int().min(1).describe("The page number to request.").optional(),
229
+ pageSize: z.int().min(1).describe("The number of records to request per page.").optional(),
230
+ search: z.string().min(1).describe("Search text for Rootly filtering.").optional(),
231
+ name: z.string().min(1).describe("Rootly name filter.").optional(),
232
+ slug: z.string().min(1).describe("Rootly slug filter.").optional(),
233
+ externalId: z.string().min(1).describe("Rootly external ID filter.").optional(),
234
+ alertBroadcastEnabled: z.boolean().describe("Whether alert broadcast is enabled.").optional(),
235
+ incidentBroadcastEnabled: z.boolean().describe("Whether incident broadcast is enabled.").optional(),
236
+ createdAtGt: z.iso.datetime({ offset: true }).describe("The ISO 8601 timestamp for this filter.").optional(),
237
+ createdAtGte: z.iso.datetime({ offset: true }).describe("The ISO 8601 timestamp for this filter.").optional(),
238
+ createdAtLt: z.iso.datetime({ offset: true }).describe("The ISO 8601 timestamp for this filter.").optional(),
239
+ createdAtLte: z.iso.datetime({ offset: true }).describe("The ISO 8601 timestamp for this filter.").optional(),
240
+ sort: z.string().min(1).describe("The Rootly sort expression, such as name or -created_at.").optional()
241
+ }).describe("Input for listing Rootly services.");
242
+ var listServicesOutput = z.strictObject({
243
+ resources: z.array(z.looseObject({
244
+ id: z.string().min(1).describe("The Rootly resource ID.").optional(),
245
+ type: z.string().min(1).describe("The Rootly resource type.").optional(),
246
+ attributes: z.looseObject({}).describe("The Rootly resource attributes.").optional(),
247
+ relationships: z.looseObject({}).describe("The Rootly resource relationships.").optional()
248
+ }).describe("A Rootly JSON:API resource.")).describe("Rootly JSON:API resources."),
249
+ included: z.array(z.looseObject({}).describe("One included Rootly JSON:API resource.")).describe("Included Rootly JSON:API resources.").optional(),
250
+ links: z.looseObject({}).describe("Rootly pagination or resource links.").optional(),
251
+ meta: z.looseObject({}).describe("Rootly response metadata.").optional(),
252
+ raw: z.looseObject({}).describe("The raw Rootly JSON:API response.")
253
+ }).describe("A Rootly list response.");
254
+ var listTeamsInput = z.strictObject({
255
+ include: z.array(z.string().min(1).describe("One Rootly include value.")).min(1).describe("Related Rootly resources to include in the JSON:API response.").optional(),
256
+ pageNumber: z.int().min(1).describe("The page number to request.").optional(),
257
+ pageSize: z.int().min(1).describe("The number of records to request per page.").optional(),
258
+ search: z.string().min(1).describe("Search text for Rootly filtering.").optional(),
259
+ name: z.string().min(1).describe("Rootly name filter.").optional(),
260
+ slug: z.string().min(1).describe("Rootly slug filter.").optional(),
261
+ externalId: z.string().min(1).describe("Rootly external ID filter.").optional(),
262
+ alertBroadcastEnabled: z.boolean().describe("Whether alert broadcast is enabled.").optional(),
263
+ incidentBroadcastEnabled: z.boolean().describe("Whether incident broadcast is enabled.").optional(),
264
+ createdAtGt: z.iso.datetime({ offset: true }).describe("The ISO 8601 timestamp for this filter.").optional(),
265
+ createdAtGte: z.iso.datetime({ offset: true }).describe("The ISO 8601 timestamp for this filter.").optional(),
266
+ createdAtLt: z.iso.datetime({ offset: true }).describe("The ISO 8601 timestamp for this filter.").optional(),
267
+ createdAtLte: z.iso.datetime({ offset: true }).describe("The ISO 8601 timestamp for this filter.").optional(),
268
+ sort: z.string().min(1).describe("The Rootly sort expression, such as name or -created_at.").optional(),
269
+ color: z.string().min(1).describe("Rootly team color filter.").optional()
270
+ }).describe("Input for listing Rootly teams.");
271
+ var listTeamsOutput = z.strictObject({
272
+ resources: z.array(z.looseObject({
273
+ id: z.string().min(1).describe("The Rootly resource ID.").optional(),
274
+ type: z.string().min(1).describe("The Rootly resource type.").optional(),
275
+ attributes: z.looseObject({}).describe("The Rootly resource attributes.").optional(),
276
+ relationships: z.looseObject({}).describe("The Rootly resource relationships.").optional()
277
+ }).describe("A Rootly JSON:API resource.")).describe("Rootly JSON:API resources."),
278
+ included: z.array(z.looseObject({}).describe("One included Rootly JSON:API resource.")).describe("Included Rootly JSON:API resources.").optional(),
279
+ links: z.looseObject({}).describe("Rootly pagination or resource links.").optional(),
280
+ meta: z.looseObject({}).describe("Rootly response metadata.").optional(),
281
+ raw: z.looseObject({}).describe("The raw Rootly JSON:API response.")
282
+ }).describe("A Rootly list response.");
283
+ var rootlyActions = {
284
+ get_current_user: {
285
+ description: "Get the Rootly user associated with the API key.",
286
+ effect: "read",
287
+ inputSchema: getCurrentUserInput,
288
+ outputSchema: z.toJSONSchema(getCurrentUserOutput, { io: "output", unrepresentable: "any" })
289
+ },
290
+ list_incidents: {
291
+ description: "List Rootly incidents with common filters and pagination.",
292
+ effect: "read",
293
+ inputSchema: listIncidentsInput,
294
+ outputSchema: z.toJSONSchema(listIncidentsOutput, { io: "output", unrepresentable: "any" })
295
+ },
296
+ get_incident: {
297
+ description: "Retrieve one Rootly incident by UUID or slug.",
298
+ effect: "read",
299
+ inputSchema: getIncidentInput,
300
+ outputSchema: z.toJSONSchema(getIncidentOutput, { io: "output", unrepresentable: "any" })
301
+ },
302
+ list_services: {
303
+ description: "List Rootly services with common filters and pagination.",
304
+ effect: "read",
305
+ inputSchema: listServicesInput,
306
+ outputSchema: z.toJSONSchema(listServicesOutput, { io: "output", unrepresentable: "any" })
307
+ },
308
+ list_teams: {
309
+ description: "List Rootly teams with common filters and pagination.",
310
+ effect: "read",
311
+ inputSchema: listTeamsInput,
312
+ outputSchema: z.toJSONSchema(listTeamsOutput, { io: "output", unrepresentable: "any" })
313
+ }
314
+ };
315
+
316
+ // ../plugins/src/rootly/index.ts
317
+ function createRootlyPlugin() {
318
+ return createProviderPlugin({
319
+ description: "Rootly",
320
+ actions: rootlyActions,
321
+ // 上游 credentialValidators 打的就是 /users/me,与 get_current_user 同一个接口。
322
+ credentialProbe: "get_current_user",
323
+ handlers: {
324
+ get_current_user: getCurrentUser,
325
+ list_incidents: listIncidents,
326
+ get_incident: getIncident,
327
+ list_services: listServices,
328
+ list_teams: listTeams
329
+ }
330
+ });
331
+ }
332
+ var rootly_default = createRootlyPlugin();
333
+ export {
334
+ createRootlyPlugin,
335
+ rootly_default as default
336
+ };
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  createProviderHttpClient
3
- } from "./chunk-E6JCVKW6.js";
3
+ } from "./chunk-BNMLA2RC.js";
4
4
  import "./chunk-JXHMDBAY.js";
5
5
  import {
6
6
  createProviderPlugin,
7
7
  requireApiKey,
8
8
  upstreamError
9
- } from "./chunk-ATK45BXV.js";
10
- import "./chunk-U7B6DS2O.js";
9
+ } from "./chunk-X7ZUTKHR.js";
10
+ import "./chunk-7ISGFRC6.js";
11
+ import "./chunk-UY6ANCOY.js";
11
12
  import {
12
- TBError,
13
- external_exports
14
- } from "./chunk-UZM2RXZH.js";
13
+ TBError
14
+ } from "./chunk-HA4BGL6C.js";
15
15
  import "./chunk-U67V476Y.js";
16
16
 
17
17
  // ../plugins/src/scrapfly/api.ts
@@ -189,78 +189,79 @@ async function getMonitoringMetrics(input, ctx) {
189
189
  }
190
190
 
191
191
  // ../plugins/src/scrapfly/schema.ts
192
- var scrapeInput = external_exports.strictObject({
193
- url: external_exports.url().describe("The public URL Scrapfly should scrape."),
194
- method: external_exports.enum(["GET", "POST", "PUT", "PATCH", "HEAD", "OPTIONS"]).describe("The HTTP method Scrapfly should use against the target URL.").optional(),
195
- body: external_exports.string().describe("The raw request body Scrapfly should send to the target URL.").optional(),
196
- content_type: external_exports.string().min(1).describe("The Content-Type header for the target request body.").optional(),
197
- format: external_exports.string().min(1).describe("The content format Scrapfly should return.").optional(),
198
- country: external_exports.string().min(2).describe("The proxy country selection accepted by Scrapfly, such as us, us,ca,mx, or -gb.").optional(),
199
- proxy_pool: external_exports.enum(["public_datacenter_pool", "public_residential_pool"]).describe("The Scrapfly proxy pool to use for the scrape.").optional(),
200
- render_js: external_exports.boolean().describe("Whether Scrapfly should render JavaScript before returning.").optional(),
201
- asp: external_exports.boolean().describe("Whether Scrapfly should enable Anti Scraping Protection.").optional(),
202
- retry: external_exports.boolean().describe("Whether Scrapfly should retry the scrape request.").optional(),
203
- timeout: external_exports.int().min(1e3).max(15e4).describe("The scrape timeout in milliseconds.").optional(),
204
- wait_for_selector: external_exports.string().min(1).describe("The CSS selector Scrapfly should wait for before returning content.").optional(),
205
- cache: external_exports.boolean().describe("Whether Scrapfly should use cached scrape results when available.").optional(),
206
- cache_ttl: external_exports.int().min(1).describe("The cache time-to-live in seconds.").optional(),
207
- cache_clear: external_exports.boolean().describe("Whether Scrapfly should clear any matching cached result.").optional(),
208
- session: external_exports.string().min(1).max(255).describe("The Scrapfly session name used to keep browsing state.").optional(),
209
- session_sticky_proxy: external_exports.boolean().describe("Whether Scrapfly should keep the session proxy sticky.").optional(),
210
- headers: external_exports.record(external_exports.string(), external_exports.string().describe("A target request header value.")).describe("Target request headers Scrapfly should send to the scraped website.").optional(),
211
- tags: external_exports.array(external_exports.string().min(1).describe("One Scrapfly monitoring tag.")).describe("Tags for grouping the scrape in Scrapfly monitoring.").optional(),
212
- correlation_id: external_exports.string().min(1).describe("A caller-provided correlation identifier for monitoring.").optional(),
213
- debug: external_exports.boolean().describe("Whether Scrapfly should expose debug data for the scrape.").optional()
192
+ import { z } from "zod/v4";
193
+ var scrapeInput = z.strictObject({
194
+ url: z.url().describe("The public URL Scrapfly should scrape."),
195
+ method: z.enum(["GET", "POST", "PUT", "PATCH", "HEAD", "OPTIONS"]).describe("The HTTP method Scrapfly should use against the target URL.").optional(),
196
+ body: z.string().describe("The raw request body Scrapfly should send to the target URL.").optional(),
197
+ content_type: z.string().min(1).describe("The Content-Type header for the target request body.").optional(),
198
+ format: z.string().min(1).describe("The content format Scrapfly should return.").optional(),
199
+ country: z.string().min(2).describe("The proxy country selection accepted by Scrapfly, such as us, us,ca,mx, or -gb.").optional(),
200
+ proxy_pool: z.enum(["public_datacenter_pool", "public_residential_pool"]).describe("The Scrapfly proxy pool to use for the scrape.").optional(),
201
+ render_js: z.boolean().describe("Whether Scrapfly should render JavaScript before returning.").optional(),
202
+ asp: z.boolean().describe("Whether Scrapfly should enable Anti Scraping Protection.").optional(),
203
+ retry: z.boolean().describe("Whether Scrapfly should retry the scrape request.").optional(),
204
+ timeout: z.int().min(1e3).max(15e4).describe("The scrape timeout in milliseconds.").optional(),
205
+ wait_for_selector: z.string().min(1).describe("The CSS selector Scrapfly should wait for before returning content.").optional(),
206
+ cache: z.boolean().describe("Whether Scrapfly should use cached scrape results when available.").optional(),
207
+ cache_ttl: z.int().min(1).describe("The cache time-to-live in seconds.").optional(),
208
+ cache_clear: z.boolean().describe("Whether Scrapfly should clear any matching cached result.").optional(),
209
+ session: z.string().min(1).max(255).describe("The Scrapfly session name used to keep browsing state.").optional(),
210
+ session_sticky_proxy: z.boolean().describe("Whether Scrapfly should keep the session proxy sticky.").optional(),
211
+ headers: z.record(z.string(), z.string().describe("A target request header value.")).describe("Target request headers Scrapfly should send to the scraped website.").optional(),
212
+ tags: z.array(z.string().min(1).describe("One Scrapfly monitoring tag.")).describe("Tags for grouping the scrape in Scrapfly monitoring.").optional(),
213
+ correlation_id: z.string().min(1).describe("A caller-provided correlation identifier for monitoring.").optional(),
214
+ debug: z.boolean().describe("Whether Scrapfly should expose debug data for the scrape.").optional()
214
215
  }).describe("The input payload for scraping a URL with Scrapfly.");
215
- var scrapeOutput = external_exports.strictObject({
216
- result: external_exports.looseObject({
217
- content: external_exports.unknown().describe("The scraped content, a large object URL, or encoded binary content."),
218
- status_code: external_exports.int().describe("The HTTP status code returned by the target website."),
219
- format: external_exports.string().describe("The Scrapfly result content format.")
216
+ var scrapeOutput = z.strictObject({
217
+ result: z.looseObject({
218
+ content: z.unknown().describe("The scraped content, a large object URL, or encoded binary content."),
219
+ status_code: z.int().describe("The HTTP status code returned by the target website."),
220
+ format: z.string().describe("The Scrapfly result content format.")
220
221
  }).describe("The result object returned by Scrapfly.").optional(),
221
- config: external_exports.looseObject({}).describe("The scrape configuration returned by Scrapfly.").optional(),
222
- context: external_exports.looseObject({}).describe("Additional context returned by Scrapfly.").optional(),
223
- metadata: external_exports.strictObject({
224
- status_code: external_exports.int().describe("The HTTP status code returned by Scrapfly.").optional(),
225
- api_cost: external_exports.int().describe("The API credit cost reported by Scrapfly.").nullable().optional(),
226
- remaining_api_credit: external_exports.int().describe("Remaining API credit reported by Scrapfly.").nullable().optional(),
227
- reject_code: external_exports.string().describe("The Scrapfly reject code when a scrape is rejected.").nullable().optional(),
228
- reject_description: external_exports.string().describe("The Scrapfly reject documentation URL when a scrape is rejected.").nullable().optional(),
229
- reject_retryable: external_exports.string().describe("Whether Scrapfly reported the rejection as retryable.").nullable().optional()
222
+ config: z.looseObject({}).describe("The scrape configuration returned by Scrapfly.").optional(),
223
+ context: z.looseObject({}).describe("Additional context returned by Scrapfly.").optional(),
224
+ metadata: z.strictObject({
225
+ status_code: z.int().describe("The HTTP status code returned by Scrapfly.").optional(),
226
+ api_cost: z.int().describe("The API credit cost reported by Scrapfly.").nullable().optional(),
227
+ remaining_api_credit: z.int().describe("Remaining API credit reported by Scrapfly.").nullable().optional(),
228
+ reject_code: z.string().describe("The Scrapfly reject code when a scrape is rejected.").nullable().optional(),
229
+ reject_description: z.string().describe("The Scrapfly reject documentation URL when a scrape is rejected.").nullable().optional(),
230
+ reject_retryable: z.string().describe("Whether Scrapfly reported the rejection as retryable.").nullable().optional()
230
231
  }).describe("Metadata collected from Scrapfly response headers.").optional(),
231
- headers: external_exports.record(external_exports.string(), external_exports.string().describe("One response header value.")).describe("Response headers returned by Scrapfly.").optional()
232
+ headers: z.record(z.string(), z.string().describe("One response header value.")).describe("Response headers returned by Scrapfly.").optional()
232
233
  }).describe("The response returned when scraping with Scrapfly.");
233
- var getMonitoringMetricsInput = external_exports.strictObject({
234
- aggregation: external_exports.string().min(1).describe("The metrics aggregation list accepted by Scrapfly, such as account, project, or account,project,target.").optional(),
235
- period: external_exports.enum(["last5m", "last1h", "last7d", "last24h", "subscription"]).describe("The monitoring period to retrieve.").optional(),
236
- start: external_exports.string().min(1).describe("The UTC start date accepted by Scrapfly when period is omitted.").optional(),
237
- end: external_exports.string().min(1).describe("The UTC end date accepted by Scrapfly when period is omitted.").optional(),
238
- group_subdomain: external_exports.boolean().describe("Whether target aggregation should group subdomains.").optional()
234
+ var getMonitoringMetricsInput = z.strictObject({
235
+ aggregation: z.string().min(1).describe("The metrics aggregation list accepted by Scrapfly, such as account, project, or account,project,target.").optional(),
236
+ period: z.enum(["last5m", "last1h", "last7d", "last24h", "subscription"]).describe("The monitoring period to retrieve.").optional(),
237
+ start: z.string().min(1).describe("The UTC start date accepted by Scrapfly when period is omitted.").optional(),
238
+ end: z.string().min(1).describe("The UTC end date accepted by Scrapfly when period is omitted.").optional(),
239
+ group_subdomain: z.boolean().describe("Whether target aggregation should group subdomains.").optional()
239
240
  }).describe("The input payload for retrieving Scrapfly monitoring metrics.");
240
- var getMonitoringMetricsOutput = external_exports.strictObject({
241
- metrics: external_exports.looseObject({}).describe("Monitoring metrics returned by Scrapfly.").optional(),
242
- metadata: external_exports.strictObject({
243
- status_code: external_exports.int().describe("The HTTP status code returned by Scrapfly.").optional(),
244
- api_cost: external_exports.int().describe("The API credit cost reported by Scrapfly.").nullable().optional(),
245
- remaining_api_credit: external_exports.int().describe("Remaining API credit reported by Scrapfly.").nullable().optional(),
246
- reject_code: external_exports.string().describe("The Scrapfly reject code when a scrape is rejected.").nullable().optional(),
247
- reject_description: external_exports.string().describe("The Scrapfly reject documentation URL when a scrape is rejected.").nullable().optional(),
248
- reject_retryable: external_exports.string().describe("Whether Scrapfly reported the rejection as retryable.").nullable().optional()
241
+ var getMonitoringMetricsOutput = z.strictObject({
242
+ metrics: z.looseObject({}).describe("Monitoring metrics returned by Scrapfly.").optional(),
243
+ metadata: z.strictObject({
244
+ status_code: z.int().describe("The HTTP status code returned by Scrapfly.").optional(),
245
+ api_cost: z.int().describe("The API credit cost reported by Scrapfly.").nullable().optional(),
246
+ remaining_api_credit: z.int().describe("Remaining API credit reported by Scrapfly.").nullable().optional(),
247
+ reject_code: z.string().describe("The Scrapfly reject code when a scrape is rejected.").nullable().optional(),
248
+ reject_description: z.string().describe("The Scrapfly reject documentation URL when a scrape is rejected.").nullable().optional(),
249
+ reject_retryable: z.string().describe("Whether Scrapfly reported the rejection as retryable.").nullable().optional()
249
250
  }).describe("Metadata collected from Scrapfly response headers.").optional(),
250
- headers: external_exports.record(external_exports.string(), external_exports.string().describe("One response header value.")).describe("Response headers returned by Scrapfly.").optional()
251
+ headers: z.record(z.string(), z.string().describe("One response header value.")).describe("Response headers returned by Scrapfly.").optional()
251
252
  }).describe("The response returned when retrieving Scrapfly monitoring metrics.");
252
253
  var scrapflyActions = {
253
254
  scrape: {
254
255
  description: "Scrape one public URL through Scrapfly and return the documented JSON response envelope.",
255
256
  effect: "write",
256
257
  inputSchema: scrapeInput,
257
- outputSchema: external_exports.toJSONSchema(scrapeOutput, { io: "output", unrepresentable: "any" })
258
+ outputSchema: z.toJSONSchema(scrapeOutput, { io: "output", unrepresentable: "any" })
258
259
  },
259
260
  get_monitoring_metrics: {
260
261
  description: "Retrieve Scrapfly monitoring metrics for the connected API key.",
261
262
  effect: "read",
262
263
  inputSchema: getMonitoringMetricsInput,
263
- outputSchema: external_exports.toJSONSchema(getMonitoringMetricsOutput, { io: "output", unrepresentable: "any" })
264
+ outputSchema: z.toJSONSchema(getMonitoringMetricsOutput, { io: "output", unrepresentable: "any" })
264
265
  }
265
266
  };
266
267