@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
@@ -1,388 +0,0 @@
1
- import {
2
- createAuthedClient
3
- } from "./chunk-XYBU3WZH.js";
4
- import "./chunk-E6JCVKW6.js";
5
- import {
6
- asJsonObject,
7
- trimmedText
8
- } from "./chunk-JXHMDBAY.js";
9
- import {
10
- createProviderPlugin
11
- } from "./chunk-ATK45BXV.js";
12
- import "./chunk-U7B6DS2O.js";
13
- import {
14
- TBError,
15
- external_exports
16
- } from "./chunk-UZM2RXZH.js";
17
- import "./chunk-U67V476Y.js";
18
-
19
- // ../plugins/src/circleci/api.ts
20
- var SERVICE = "circleci";
21
- var API_BASE = "https://circleci.com/api/v2";
22
- var http = createAuthedClient({
23
- baseUrl: `${API_BASE}/`,
24
- service: SERVICE,
25
- auth: { kind: "header", name: "circle-token" },
26
- headers: { accept: "application/json" },
27
- // 错误消息:正文是纯串就用它,否则取 message、再退回 error。
28
- errorMessage: {
29
- keys: ["message", "error"],
30
- fallback: (status) => `CircleCI \u8FD4\u56DE HTTP ${status}`
31
- }
32
- });
33
- function trimSlashes(value) {
34
- let start = 0;
35
- let end = value.length;
36
- while (start < end && value[start] === "/") start += 1;
37
- while (end > start && value[end - 1] === "/") end -= 1;
38
- return value.slice(start, end);
39
- }
40
- function normalizeSlug(rawValue, field, stripProjectPrefix) {
41
- let value = rawValue.trim();
42
- if (stripProjectPrefix) {
43
- if (value.startsWith("/project/")) value = value.slice("/project/".length);
44
- else if (value.startsWith("project/")) value = value.slice("project/".length);
45
- }
46
- if (value.includes("%2F") || value.includes("%2f")) {
47
- try {
48
- value = decodeURIComponent(value);
49
- } catch {
50
- throw new TBError("invalid_argument", `${field} \u4E0D\u662F\u5408\u6CD5\u7684 slug`);
51
- }
52
- }
53
- value = trimSlashes(value);
54
- if (value === "") throw new TBError("invalid_argument", `${field} \u4E0D\u662F\u5408\u6CD5\u7684 slug`);
55
- return value;
56
- }
57
- function projectSlug(value) {
58
- return normalizeSlug(value, "projectSlug", true);
59
- }
60
- function orgSlug(value) {
61
- return normalizeSlug(value, "orgSlug", false);
62
- }
63
- async function request(ctx, input) {
64
- const { data } = await http.request(ctx, {
65
- path: input.path,
66
- method: input.method ?? "GET",
67
- query: Object.entries(input.query ?? {}).filter((entry) => {
68
- const value = entry[1];
69
- return value !== void 0 && value !== "";
70
- }),
71
- ...input.body === void 0 ? {} : { json: input.body },
72
- invalidJsonMessage: "CircleCI \u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94"
73
- });
74
- return data ?? {};
75
- }
76
- function getCurrentUser(_input, ctx) {
77
- return request(ctx, { path: "/me" });
78
- }
79
- function getProject(input, ctx) {
80
- return request(ctx, { path: `/project/${encodeURIComponent(projectSlug(input.projectSlug))}` });
81
- }
82
- function listPipelinesForProject(input, ctx) {
83
- return request(ctx, {
84
- path: `/project/${encodeURIComponent(projectSlug(input.projectSlug))}/pipeline`,
85
- // 入参是 camelCase 的 pageToken,上游 query 键却是连字符的 `page-token`。
86
- query: { "branch": trimmedText(input.branch), "page-token": trimmedText(input.pageToken) }
87
- });
88
- }
89
- function getPipeline(input, ctx) {
90
- return request(ctx, { path: `/pipeline/${encodeURIComponent(input.pipelineId.trim())}` });
91
- }
92
- function listWorkflowsByPipeline(input, ctx) {
93
- return request(ctx, {
94
- path: `/pipeline/${encodeURIComponent(input.pipelineId.trim())}/workflow`,
95
- query: { "page-token": trimmedText(input.pageToken) }
96
- });
97
- }
98
- function getWorkflowSummary(input, ctx) {
99
- if (typeof input.allBranches === "boolean" && trimmedText(input.branch) !== void 0) {
100
- throw new TBError("invalid_argument", "allBranches \u4E0E branch \u4E0D\u80FD\u540C\u65F6\u4F7F\u7528");
101
- }
102
- const slug = encodeURIComponent(projectSlug(input.projectSlug));
103
- const workflow = encodeURIComponent(input.workflowName.trim());
104
- return request(ctx, {
105
- path: `/insights/${slug}/workflows/${workflow}/summary`,
106
- query: {
107
- "all-branches": typeof input.allBranches === "boolean" ? String(input.allBranches) : void 0,
108
- "branch": trimmedText(input.branch)
109
- }
110
- });
111
- }
112
- function getJobDetails(input, ctx) {
113
- return request(ctx, {
114
- path: `/project/${encodeURIComponent(projectSlug(input.projectSlug))}/job/${input.jobNumber}`
115
- });
116
- }
117
- function getJobArtifacts(input, ctx) {
118
- return request(ctx, {
119
- // 注意这里**没有** `/job/` 段 —— 与 get_job_details 不对称,是 CircleCI API 的原样。
120
- path: `/project/${encodeURIComponent(projectSlug(input.projectSlug))}/${input.jobNumber}/artifacts`
121
- });
122
- }
123
- function listInsightsSummary(input, ctx) {
124
- return request(ctx, {
125
- path: `/insights/${encodeURIComponent(orgSlug(input.orgSlug))}/summary`,
126
- query: { "reporting-window": trimmedText(input.reportingWindow) }
127
- });
128
- }
129
- function triggerPipeline(input, ctx) {
130
- const branch = trimmedText(input.branch);
131
- const tag = trimmedText(input.tag);
132
- if (branch !== void 0 && tag !== void 0) {
133
- throw new TBError("invalid_argument", "branch \u4E0E tag \u4E0D\u80FD\u540C\u65F6\u4F7F\u7528");
134
- }
135
- const body = {};
136
- if (branch !== void 0) body.branch = branch;
137
- if (tag !== void 0) body.tag = tag;
138
- const parameters = asJsonObject(input.parameters);
139
- if (parameters !== void 0) body.parameters = parameters;
140
- return request(ctx, {
141
- method: "POST",
142
- path: `/project/${encodeURIComponent(projectSlug(input.projectSlug))}/pipeline`,
143
- body
144
- });
145
- }
146
- function listProjectEnvVars(input, ctx) {
147
- return request(ctx, { path: `/project/${encodeURIComponent(projectSlug(input.projectSlug))}/envvar` });
148
- }
149
-
150
- // ../plugins/src/circleci/schema.ts
151
- var getCurrentUserInput = external_exports.strictObject({}).describe("No input is required.");
152
- var getCurrentUserOutput = external_exports.looseObject({
153
- avatar_url: external_exports.string().describe("URL to the user's avatar on the VCS.").nullable().optional(),
154
- id: external_exports.string().min(1).describe("The unique ID of the user.").optional(),
155
- login: external_exports.string().min(1).describe("The VCS login of the current user.").optional(),
156
- name: external_exports.string().min(1).describe("The display name of the current user.").optional()
157
- }).describe("CircleCI user.");
158
- var getProjectInput = external_exports.strictObject({
159
- projectSlug: external_exports.string().min(1).describe("Project slug in the form `vcs-slug/org-name/repo-name`. GitHub App and GitLab projects may use an opaque CircleCI slug such as `circleci/<org-id>/<project-id>`.")
160
- }).describe("Input for getting a project.");
161
- var getProjectOutput = external_exports.looseObject({
162
- slug: external_exports.string().min(1).describe("Project slug in the form `vcs-slug/org-name/repo-name`. GitHub App and GitLab projects may use an opaque CircleCI slug such as `circleci/<org-id>/<project-id>`.").optional(),
163
- name: external_exports.string().min(1).describe("The project name.").optional(),
164
- id: external_exports.string().min(1).describe("The unique ID of the project.").optional(),
165
- organization_name: external_exports.string().describe("The organization name that owns the project.").optional(),
166
- organization_slug: external_exports.string().describe("The organization slug that owns the project.").optional(),
167
- organization_id: external_exports.string().describe("The unique ID of the organization.").optional(),
168
- vcs_info: external_exports.looseObject({}).describe("Version control information for the project.").optional()
169
- }).describe("CircleCI project.");
170
- var listPipelinesForProjectInput = external_exports.strictObject({
171
- projectSlug: external_exports.string().min(1).describe("Project slug in the form `vcs-slug/org-name/repo-name`. GitHub App and GitLab projects may use an opaque CircleCI slug such as `circleci/<org-id>/<project-id>`."),
172
- branch: external_exports.string().min(1).describe("The VCS branch name.").optional(),
173
- pageToken: external_exports.string().min(1).describe("Pagination token returned by CircleCI.").optional()
174
- }).describe("Input for listing project pipelines.");
175
- var listPipelinesForProjectOutput = external_exports.strictObject({
176
- items: external_exports.array(external_exports.looseObject({
177
- id: external_exports.string().min(1).describe("The unique ID of the CircleCI pipeline.").optional(),
178
- errors: external_exports.array(external_exports.looseObject({}).describe("CircleCI pipeline error.")).describe("Errors attached to the pipeline.").optional(),
179
- project_slug: external_exports.string().min(1).describe("Project slug in the form `vcs-slug/org-name/repo-name`. GitHub App and GitLab projects may use an opaque CircleCI slug such as `circleci/<org-id>/<project-id>`.").optional(),
180
- updated_at: external_exports.iso.datetime({ offset: true }).describe("The time when the pipeline was last updated.").optional(),
181
- number: external_exports.int().describe("The pipeline number.").optional(),
182
- state: external_exports.enum(["created", "errored", "setup-pending", "setup", "pending"]).describe("The current pipeline state reported by CircleCI.").optional(),
183
- created_at: external_exports.iso.datetime({ offset: true }).describe("The time when the pipeline was created.").optional(),
184
- trigger: external_exports.looseObject({}).describe("Trigger metadata for the pipeline.").optional(),
185
- vcs: external_exports.looseObject({}).describe("Version control metadata for the pipeline.").optional()
186
- }).describe("CircleCI pipeline.")).describe("The pipelines returned by CircleCI.").optional(),
187
- next_page_token: external_exports.string().describe("Pagination token for the next page, or null when there is no next page.").nullable().optional()
188
- }).describe("Paginated CircleCI pipeline list.");
189
- var getPipelineInput = external_exports.strictObject({
190
- pipelineId: external_exports.string().min(1).describe("The unique ID of the CircleCI pipeline.")
191
- }).describe("Input for getting a pipeline.");
192
- var getPipelineOutput = external_exports.looseObject({
193
- id: external_exports.string().min(1).describe("The unique ID of the CircleCI pipeline.").optional(),
194
- errors: external_exports.array(external_exports.looseObject({}).describe("CircleCI pipeline error.")).describe("Errors attached to the pipeline.").optional(),
195
- project_slug: external_exports.string().min(1).describe("Project slug in the form `vcs-slug/org-name/repo-name`. GitHub App and GitLab projects may use an opaque CircleCI slug such as `circleci/<org-id>/<project-id>`.").optional(),
196
- updated_at: external_exports.iso.datetime({ offset: true }).describe("The time when the pipeline was last updated.").optional(),
197
- number: external_exports.int().describe("The pipeline number.").optional(),
198
- state: external_exports.enum(["created", "errored", "setup-pending", "setup", "pending"]).describe("The current pipeline state reported by CircleCI.").optional(),
199
- created_at: external_exports.iso.datetime({ offset: true }).describe("The time when the pipeline was created.").optional(),
200
- trigger: external_exports.looseObject({}).describe("Trigger metadata for the pipeline.").optional(),
201
- vcs: external_exports.looseObject({}).describe("Version control metadata for the pipeline.").optional()
202
- }).describe("CircleCI pipeline.");
203
- var listWorkflowsByPipelineInput = external_exports.strictObject({
204
- pipelineId: external_exports.string().min(1).describe("The unique ID of the CircleCI pipeline."),
205
- pageToken: external_exports.string().min(1).describe("Pagination token returned by CircleCI.").optional()
206
- }).describe("Input for listing pipeline workflows.");
207
- var listWorkflowsByPipelineOutput = external_exports.strictObject({
208
- items: external_exports.array(external_exports.looseObject({
209
- pipeline_id: external_exports.string().min(1).describe("The unique ID of the CircleCI pipeline.").optional(),
210
- id: external_exports.string().min(1).describe("The unique ID of the workflow.").optional(),
211
- name: external_exports.string().min(1).describe("The workflow name.").optional(),
212
- project_slug: external_exports.string().min(1).describe("Project slug in the form `vcs-slug/org-name/repo-name`. GitHub App and GitLab projects may use an opaque CircleCI slug such as `circleci/<org-id>/<project-id>`.").optional(),
213
- status: external_exports.enum(["success", "canceled", "error", "failed", "failing", "not_run", "on_hold", "running", "unauthorized"]).describe("The current workflow status reported by CircleCI.").optional(),
214
- started_by: external_exports.string().min(1).describe("The user ID that started the workflow.").optional(),
215
- pipeline_number: external_exports.int().describe("The pipeline number that owns the workflow.").optional(),
216
- created_at: external_exports.iso.datetime({ offset: true }).describe("The time when the workflow was created.").optional(),
217
- stopped_at: external_exports.string().describe("The time when the workflow stopped, or null.").nullable().optional()
218
- }).describe("CircleCI workflow.")).describe("The workflows returned by CircleCI.").optional(),
219
- next_page_token: external_exports.string().describe("Pagination token for the next page, or null when there is no next page.").nullable().optional()
220
- }).describe("Paginated CircleCI workflow list.");
221
- var getWorkflowSummaryInput = external_exports.strictObject({
222
- projectSlug: external_exports.string().min(1).describe("Project slug in the form `vcs-slug/org-name/repo-name`. GitHub App and GitLab projects may use an opaque CircleCI slug such as `circleci/<org-id>/<project-id>`."),
223
- workflowName: external_exports.string().min(1).describe("The CircleCI workflow name."),
224
- allBranches: external_exports.boolean().describe("Whether to aggregate across all branches.").optional(),
225
- branch: external_exports.string().min(1).describe("The VCS branch name.").optional()
226
- }).describe("Input for getting a workflow insights summary. Do not provide both allBranches and branch.");
227
- var getWorkflowSummaryOutput = external_exports.looseObject({
228
- metrics: external_exports.looseObject({}).describe("Aggregated workflow metrics.").optional(),
229
- trends: external_exports.looseObject({}).describe("Workflow trend metrics.").optional(),
230
- workflow_names: external_exports.array(external_exports.string().min(1)).describe("Workflow names available for the project.").optional()
231
- }).describe("CircleCI workflow summary.");
232
- var getJobDetailsInput = external_exports.strictObject({
233
- projectSlug: external_exports.string().min(1).describe("Project slug in the form `vcs-slug/org-name/repo-name`. GitHub App and GitLab projects may use an opaque CircleCI slug such as `circleci/<org-id>/<project-id>`."),
234
- jobNumber: external_exports.int().min(1).describe("The CircleCI job number.")
235
- }).describe("Input for getting job details.");
236
- var getJobDetailsOutput = external_exports.looseObject({
237
- web_url: external_exports.url().describe("URL of the job in the CircleCI web UI.").optional(),
238
- project: external_exports.looseObject({}).describe("Project information for the job.").optional(),
239
- parallel_runs: external_exports.array(external_exports.looseObject({}).describe("Parallel run information.")).describe("Parallel run statuses for the job.").optional(),
240
- started_at: external_exports.iso.datetime({ offset: true }).describe("The time when the job started.").optional(),
241
- latest_workflow: external_exports.looseObject({}).describe("The latest workflow that included the job.").optional(),
242
- name: external_exports.string().min(1).describe("The CircleCI job name.").optional(),
243
- executor: external_exports.looseObject({}).describe("Executor information for the job.").optional(),
244
- parallelism: external_exports.int().describe("The number of parallel runs.").optional(),
245
- status: external_exports.enum(["success", "running", "not_run", "failed", "retried", "queued", "not_running", "infrastructure_fail", "timedout", "on_hold", "terminated-unknown", "blocked", "canceled", "unauthorized"]).describe("The current job status reported by CircleCI.").optional(),
246
- number: external_exports.int().describe("The CircleCI job number.").optional(),
247
- pipeline: external_exports.looseObject({}).describe("Pipeline information for the job.").optional()
248
- }).describe("CircleCI job details.");
249
- var getJobArtifactsInput = external_exports.strictObject({
250
- projectSlug: external_exports.string().min(1).describe("Project slug in the form `vcs-slug/org-name/repo-name`. GitHub App and GitLab projects may use an opaque CircleCI slug such as `circleci/<org-id>/<project-id>`."),
251
- jobNumber: external_exports.int().min(1).describe("The CircleCI job number.")
252
- }).describe("Input for listing job artifacts.");
253
- var getJobArtifactsOutput = external_exports.strictObject({
254
- items: external_exports.array(external_exports.looseObject({
255
- path: external_exports.string().min(1).describe("The artifact path.").optional(),
256
- node_index: external_exports.int().describe("The node index that stored the artifact.").optional(),
257
- url: external_exports.url().describe("The artifact download URL.").optional()
258
- }).describe("CircleCI artifact.")).describe("Artifacts returned by CircleCI.").optional(),
259
- next_page_token: external_exports.string().describe("Pagination token for the next page, or null when there is no next page.").nullable().optional()
260
- }).describe("Paginated CircleCI artifact list.");
261
- var listInsightsSummaryInput = external_exports.strictObject({
262
- orgSlug: external_exports.string().min(1).describe("Organization slug in the form `vcs-slug/org-name`."),
263
- reportingWindow: external_exports.enum(["last-7-days", "last-24-hours", "last-30-days", "last-60-days", "last-90-days"]).describe("The reporting window used by CircleCI Insights.").optional()
264
- }).describe("Input for listing organization insights summary.");
265
- var listInsightsSummaryOutput = external_exports.looseObject({
266
- org_data: external_exports.looseObject({}).describe("Organization-level summary data.").optional(),
267
- org_project_data: external_exports.array(external_exports.looseObject({}).describe("Project summary data.")).describe("Project summary data across the organization.").optional(),
268
- all_projects: external_exports.array(external_exports.string().min(1)).describe("All project names available in the organization.").nullable().optional()
269
- }).describe("CircleCI Insights organization summary.");
270
- var triggerPipelineInput = external_exports.strictObject({
271
- projectSlug: external_exports.string().min(1).describe("Project slug in the form `vcs-slug/org-name/repo-name`. GitHub App and GitLab projects may use an opaque CircleCI slug such as `circleci/<org-id>/<project-id>`."),
272
- branch: external_exports.string().min(1).describe("The VCS branch name.").optional(),
273
- tag: external_exports.string().min(1).describe("The VCS tag name.").optional(),
274
- parameters: external_exports.record(external_exports.string(), external_exports.union([external_exports.string().describe("A string parameter value."), external_exports.number().describe("A numeric parameter value."), external_exports.boolean().describe("A boolean parameter value.")])).describe("Pipeline parameters declared in `.circleci/config.yml`.").optional()
275
- }).describe("Input for triggering a pipeline. Provide either branch or tag, not both.");
276
- var triggerPipelineOutput = external_exports.looseObject({
277
- id: external_exports.string().min(1).describe("The unique ID of the CircleCI pipeline.").optional(),
278
- state: external_exports.enum(["created", "errored", "setup-pending", "setup", "pending"]).describe("The current pipeline state reported by CircleCI.").optional(),
279
- number: external_exports.int().describe("The pipeline number.").optional(),
280
- created_at: external_exports.iso.datetime({ offset: true }).describe("The time when the pipeline was created.").optional()
281
- }).describe("CircleCI pipeline creation response.");
282
- var listProjectEnvVarsInput = external_exports.strictObject({
283
- projectSlug: external_exports.string().min(1).describe("Project slug in the form `vcs-slug/org-name/repo-name`. GitHub App and GitLab projects may use an opaque CircleCI slug such as `circleci/<org-id>/<project-id>`.")
284
- }).describe("Input for listing project environment variables.");
285
- var listProjectEnvVarsOutput = external_exports.strictObject({
286
- items: external_exports.array(external_exports.looseObject({
287
- "name": external_exports.string().min(1).describe("The environment variable name.").optional(),
288
- "value": external_exports.string().describe("The masked environment variable value returned by CircleCI.").optional(),
289
- "created-at": external_exports.string().describe("The creation timestamp payload returned by CircleCI, when present.").optional()
290
- }).describe("CircleCI environment variable.")).describe("Environment variables returned by CircleCI.").optional(),
291
- next_page_token: external_exports.string().describe("Pagination token for the next page, or null when there is no next page.").nullable().optional()
292
- }).describe("Paginated CircleCI environment variable list.");
293
- var circleciActions = {
294
- get_current_user: {
295
- description: "Get the currently authenticated CircleCI user profile.",
296
- effect: "read",
297
- inputSchema: getCurrentUserInput,
298
- outputSchema: external_exports.toJSONSchema(getCurrentUserOutput, { io: "output", unrepresentable: "any" })
299
- },
300
- get_project: {
301
- description: "Get CircleCI project details by project slug.",
302
- effect: "read",
303
- inputSchema: getProjectInput,
304
- outputSchema: external_exports.toJSONSchema(getProjectOutput, { io: "output", unrepresentable: "any" })
305
- },
306
- list_pipelines_for_project: {
307
- description: "List CircleCI pipelines for a project.",
308
- effect: "read",
309
- inputSchema: listPipelinesForProjectInput,
310
- outputSchema: external_exports.toJSONSchema(listPipelinesForProjectOutput, { io: "output", unrepresentable: "any" })
311
- },
312
- get_pipeline: {
313
- description: "Get a CircleCI pipeline by pipeline ID.",
314
- effect: "read",
315
- inputSchema: getPipelineInput,
316
- outputSchema: external_exports.toJSONSchema(getPipelineOutput, { io: "output", unrepresentable: "any" })
317
- },
318
- list_workflows_by_pipeline: {
319
- description: "List workflows for a CircleCI pipeline.",
320
- effect: "read",
321
- inputSchema: listWorkflowsByPipelineInput,
322
- outputSchema: external_exports.toJSONSchema(listWorkflowsByPipelineOutput, { io: "output", unrepresentable: "any" })
323
- },
324
- get_workflow_summary: {
325
- description: "Get CircleCI Insights summary metrics for a workflow.",
326
- effect: "read",
327
- inputSchema: getWorkflowSummaryInput,
328
- outputSchema: external_exports.toJSONSchema(getWorkflowSummaryOutput, { io: "output", unrepresentable: "any" })
329
- },
330
- get_job_details: {
331
- description: "Get CircleCI job details by project slug and job number.",
332
- effect: "read",
333
- inputSchema: getJobDetailsInput,
334
- outputSchema: external_exports.toJSONSchema(getJobDetailsOutput, { io: "output", unrepresentable: "any" })
335
- },
336
- get_job_artifacts: {
337
- description: "List artifacts for a CircleCI job.",
338
- effect: "read",
339
- inputSchema: getJobArtifactsInput,
340
- outputSchema: external_exports.toJSONSchema(getJobArtifactsOutput, { io: "output", unrepresentable: "any" })
341
- },
342
- list_insights_summary: {
343
- description: "Get CircleCI Insights summary metrics for an organization.",
344
- effect: "read",
345
- inputSchema: listInsightsSummaryInput,
346
- outputSchema: external_exports.toJSONSchema(listInsightsSummaryOutput, { io: "output", unrepresentable: "any" })
347
- },
348
- trigger_pipeline: {
349
- description: "Trigger a new CircleCI pipeline for a project.",
350
- effect: "write",
351
- inputSchema: triggerPipelineInput,
352
- outputSchema: external_exports.toJSONSchema(triggerPipelineOutput, { io: "output", unrepresentable: "any" })
353
- },
354
- list_project_env_vars: {
355
- description: "List masked CircleCI environment variables for a project.",
356
- effect: "read",
357
- inputSchema: listProjectEnvVarsInput,
358
- outputSchema: external_exports.toJSONSchema(listProjectEnvVarsOutput, { io: "output", unrepresentable: "any" })
359
- }
360
- };
361
-
362
- // ../plugins/src/circleci/index.ts
363
- function createCircleciPlugin() {
364
- return createProviderPlugin({
365
- description: "CircleCI",
366
- actions: circleciActions,
367
- // 上游的 credentialValidators 打的就是 /me;它只读、零入参,是天然的探针。
368
- credentialProbe: "get_current_user",
369
- handlers: {
370
- get_current_user: getCurrentUser,
371
- get_project: getProject,
372
- list_pipelines_for_project: listPipelinesForProject,
373
- get_pipeline: getPipeline,
374
- list_workflows_by_pipeline: listWorkflowsByPipeline,
375
- get_workflow_summary: getWorkflowSummary,
376
- get_job_details: getJobDetails,
377
- get_job_artifacts: getJobArtifacts,
378
- list_insights_summary: listInsightsSummary,
379
- trigger_pipeline: triggerPipeline,
380
- list_project_env_vars: listProjectEnvVars
381
- }
382
- });
383
- }
384
- var circleci_default = createCircleciPlugin();
385
- export {
386
- createCircleciPlugin,
387
- circleci_default as default
388
- };