@tool-bridge/server 0.21.1 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin.js +170 -0
- package/dist/airtable-VMQVXLHK.js +790 -0
- package/dist/{alt_text_generator_ai-W7O34SNG.js → alt_text_generator_ai-FTWY4RU4.js} +12 -11
- package/dist/{amap-VOX4T2AW.js → amap-OK5VBHYC.js} +221 -220
- package/dist/anthropic-S67AZFZ3.js +203 -0
- package/dist/apify-ZE6MYQI3.js +248 -0
- package/dist/brave_search-TG2M2KOD.js +302 -0
- package/dist/chunk-2JNAI4OC.js +161 -0
- package/dist/{chunk-KMTT3I6D.js → chunk-4XJPN3DY.js} +19392 -26136
- package/dist/chunk-5ICRY3VU.js +8432 -0
- package/dist/chunk-7CTWGTDU.js +302 -0
- package/dist/chunk-BADVCN6K.js +378 -0
- package/dist/{chunk-XYBU3WZH.js → chunk-TDAWLMDE.js} +3 -3
- package/dist/chunk-U7PTOA3U.js +7320 -0
- package/dist/{chunk-E6JCVKW6.js → chunk-VWRUGUSU.js} +3 -3
- package/dist/{chunk-ATK45BXV.js → chunk-WJHG6OK7.js} +4 -2
- package/dist/circleci-3L3WJVSK.js +389 -0
- package/dist/clerk-EZPF2V7T.js +1019 -0
- package/dist/cohere-U27DPO64.js +185 -0
- package/dist/{confluence-B3EWPZVE.js → confluence-G2KL6ERH.js} +105 -104
- package/dist/{convertapi-EUWSQYPF.js → convertapi-L4CLJ2M3.js} +32 -31
- package/dist/{currencyapi-KVTIK3GL.js → currencyapi-YPYXG7YY.js} +71 -71
- package/dist/deepseek-6HT6WF3M.js +210 -0
- package/dist/docker_hub-LPE3PCVB.js +933 -0
- package/dist/dropbox-V56ABHTA.js +1305 -0
- package/dist/dub-6OKQ7MHT.js +680 -0
- package/dist/e2b-JS2U2QFU.js +278 -0
- package/dist/exa-DPWVYXSP.js +332 -0
- package/dist/{fal_ai-23E7JPNT.js → fal_ai-DK6Y27ZF.js} +81 -80
- package/dist/{feishu-7QRIDUV6.js → feishu-K7EGSRF3.js} +528 -572
- package/dist/{feishu_custom_bot-TJ4K7QNJ.js → feishu_custom_bot-2JUGFYNG.js} +57 -53
- package/dist/figma-FT5I7ITD.js +777 -0
- package/dist/firehydrant-EIKLKHX2.js +563 -0
- package/dist/{fixer-BWON27UO.js → fixer-U5QXIAKD.js} +34 -33
- package/dist/fly-T3JYFZ2M.js +469 -0
- package/dist/{front-QCGXYEDJ.js → front-D72MGVOR.js} +104 -104
- package/dist/geocodio-BOTD5TI5.js +213 -0
- package/dist/ghost-KYP7SZGB.js +338 -0
- package/dist/github-AGMZT3VY.js +5421 -0
- package/dist/gmail-BLJNJOBG.js +1887 -0
- package/dist/googlecalendar-GTHWNCF6.js +2524 -0
- package/dist/{googledocs-BUHL4J2H.js → googledocs-6EEDMEBQ.js} +341 -340
- package/dist/{grafana-GLU2DWF2.js → grafana-GMW6EKSQ.js} +221 -220
- package/dist/graphhopper-6OLGBDGB.js +325 -0
- package/dist/index.d.ts +1132 -332
- package/dist/index.js +31 -14
- package/dist/{ip2proxy-EZ64Y4ZH.js → ip2proxy-4QN42E6T.js} +28 -27
- package/dist/ipgeolocation_io-SK4XKDA2.js +315 -0
- package/dist/ipqualityscore-6ANBPXKT.js +279 -0
- package/dist/{jina_ai-EFBHTBXL.js → jina_ai-IHPSVRM5.js} +23 -23
- package/dist/{jira-HQSHAA5K.js → jira-46KKM4LC.js} +118 -117
- package/dist/langsmith-JZA345I5.js +593 -0
- package/dist/lemlist-43IV7DK6.js +289 -0
- package/dist/{linear-K7RYFYAD.js → linear-5LFH7XNL.js} +327 -326
- package/dist/logsnag-5RMYAHIL.js +150 -0
- package/dist/main.js +57 -280
- package/dist/{mattermost-S2BRCWLQ.js → mattermost-XFL6SHGG.js} +59 -58
- package/dist/mem0-NYO4DTP6.js +544 -0
- package/dist/memos-37MPQOLV.js +744 -0
- package/dist/{metabase-MMSEPCOF.js → metabase-KYBKZFMG.js} +90 -89
- package/dist/mistral_ai-6PL3K4PM.js +1196 -0
- package/dist/{mother_duck-H7PCQNZ2.js → mother_duck-2NH7W5M5.js} +94 -93
- package/dist/ngrok-UO6CDYCA.js +356 -0
- package/dist/{notes-PFMKRO33.js → notes-I3P32WP4.js} +11 -9
- package/dist/notion-BEAJFUOE.js +940 -0
- package/dist/open_exchange_rates-CMF62JB4.js +215 -0
- package/dist/openai-IHOMKVND.js +800 -0
- package/dist/opengraph_io-ZQ2FGLHX.js +362 -0
- package/dist/openrouter-HXLW3NR5.js +441 -0
- package/dist/outline-ELCP4NEU.js +599 -0
- package/dist/paddle-O77LALVN.js +454 -0
- package/dist/perplexity-JCU654QV.js +220 -0
- package/dist/pinecone-W5W4LRKL.js +571 -0
- package/dist/{pipedrive-Y2O7QGFF.js → pipedrive-ITMJLLPZ.js} +99 -98
- package/dist/polar-R33XU4L3.js +395 -0
- package/dist/posthog-JVNTOLTV.js +3464 -0
- package/dist/postmark-6SBG7HWV.js +427 -0
- package/dist/{prerender-MENYM2TY.js → prerender-GPNKTNFC.js} +31 -30
- package/dist/{pubmed-GOXUVVH5.js → pubmed-UP6ZEEIH.js} +239 -238
- package/dist/{railway-V2SID4WV.js → railway-KWEWXHTY.js} +118 -117
- package/dist/readwise-BLATSMC3.js +470 -0
- package/dist/render-QYRVIXII.js +461 -0
- package/dist/{replicate-756MXPYX.js → replicate-JYTWH4NF.js} +81 -80
- package/dist/{resend-ZKH3BTBI.js → resend-L5N75SZM.js} +20 -16
- package/dist/rootly-MHCPEQ26.js +336 -0
- package/dist/{scrapfly-NSRHFDIQ.js → scrapfly-PTPGYSJM.js} +62 -61
- package/dist/{scrapingbee-OQHLAVEY.js → scrapingbee-JN6UH5PY.js} +56 -56
- package/dist/{screenshot_fyi-DVWG3AXC.js → screenshot_fyi-4QRVSV55.js} +16 -16
- package/dist/semantic_scholar-LRSWA2GE.js +611 -0
- package/dist/{sentry-546MNDJG.js → sentry-2G6PF5W6.js} +208 -207
- package/dist/{shodan-C3OON3Z3.js → shodan-WKKPP5C6.js} +62 -61
- package/dist/shopify-64YDK5T2.js +610 -0
- package/dist/stripe-QAIGGOTF.js +585 -0
- package/dist/{supabase-U2SL4D63.js → supabase-WHTGR6ND.js} +245 -244
- package/dist/tavily-QIXCDDWO.js +326 -0
- package/dist/telegram-E6G7CWI6.js +1767 -0
- package/dist/{telnyx-CXQ4EZUX.js → telnyx-ZDVVS7PK.js} +57 -56
- package/dist/todoist-DMYF3G7J.js +664 -0
- package/dist/trello-HY2RYIRP.js +1080 -0
- package/dist/turso-HAQWMGRP.js +416 -0
- package/dist/{twilio-4PDBJKWX.js → twilio-MLXYPHJE.js} +70 -69
- package/dist/umami-DZHBLPVG.js +389 -0
- package/dist/unsplash-GS2OPXKE.js +351 -0
- package/dist/{upstash_redis-G4LQBYHA.js → upstash_redis-XMXWTNAJ.js} +51 -50
- package/dist/uptimerobot-TF5WRZ4G.js +483 -0
- package/dist/v2ex-2BVXAPDF.js +667 -0
- package/dist/vercel-YMJGQYJE.js +1076 -0
- package/dist/{wolfram_alpha_api-3G4PUJWB.js → wolfram_alpha_api-I56SXWFZ.js} +36 -35
- package/dist/wordpress-R7TDFZ2P.js +812 -0
- package/dist/workos-HDNHWVMS.js +664 -0
- package/dist/zhihu-LX6AGGDS.js +254 -0
- package/package.json +18 -9
- package/dist/airtable-LLZDFN7M.js +0 -789
- package/dist/anthropic-G23NN3X5.js +0 -202
- package/dist/apify-Y3SS734K.js +0 -247
- package/dist/brave_search-ZC7OAPSZ.js +0 -301
- package/dist/chunk-R6P4XAE5.js +0 -248
- package/dist/chunk-U7B6DS2O.js +0 -977
- package/dist/chunk-UZM2RXZH.js +0 -23436
- package/dist/circleci-3BAX5FCG.js +0 -388
- package/dist/clerk-6LEM6TNU.js +0 -1019
- package/dist/cloudflare_dns-KINYTJUD.js +0 -588
- package/dist/cohere-XCJ5AJ6B.js +0 -185
- package/dist/deepseek-PC5YGNC5.js +0 -209
- package/dist/docker_hub-C3MA5FU6.js +0 -932
- package/dist/dropbox-XBV7Z2IR.js +0 -1304
- package/dist/dub-LDOFG3HC.js +0 -679
- package/dist/e2b-JMCPSVBW.js +0 -277
- package/dist/exa-RAK7O7RD.js +0 -331
- package/dist/figma-E6IX5DTH.js +0 -773
- package/dist/firehydrant-ZBLPQREE.js +0 -562
- package/dist/fly-ZH3HFCZJ.js +0 -468
- package/dist/geocodio-YGNI7DA4.js +0 -212
- package/dist/ghost-EVSGKH2Q.js +0 -337
- package/dist/github-MA2BGRCJ.js +0 -5420
- package/dist/gmail-E5E6AADE.js +0 -1886
- package/dist/googlecalendar-BTLFPXTD.js +0 -2523
- package/dist/graphhopper-WSMB3TCD.js +0 -324
- package/dist/ipgeolocation_io-AA7HAS22.js +0 -315
- package/dist/ipqualityscore-BHJXVTJT.js +0 -277
- package/dist/langsmith-5W6SCT6F.js +0 -592
- package/dist/lemlist-HJWH6UMK.js +0 -288
- package/dist/logsnag-4KFOHL37.js +0 -150
- package/dist/mem0-CAW43CIC.js +0 -543
- package/dist/memos-TWEGPKFM.js +0 -740
- package/dist/mistral_ai-64BGZQHP.js +0 -1195
- package/dist/ngrok-GQCUGZKJ.js +0 -356
- package/dist/notion-DQWZWP4N.js +0 -936
- package/dist/open_exchange_rates-QMMD735E.js +0 -214
- package/dist/openai-W6PX32NZ.js +0 -799
- package/dist/opengraph_io-HNDBXYNW.js +0 -361
- package/dist/openrouter-JJYMEAUL.js +0 -437
- package/dist/outline-MCBNQZYY.js +0 -595
- package/dist/paddle-D2SKLUDN.js +0 -453
- package/dist/perplexity-XIFMKUAE.js +0 -219
- package/dist/pinecone-HUFTALV2.js +0 -570
- package/dist/polar-TYTOMOSR.js +0 -394
- package/dist/posthog-43JAR3VW.js +0 -3463
- package/dist/postmark-KL2QJYSG.js +0 -426
- package/dist/readwise-CI4GIMMJ.js +0 -469
- package/dist/render-SUBJ6YRZ.js +0 -460
- package/dist/rootly-CD2LJHPI.js +0 -336
- package/dist/semantic_scholar-T4A252KW.js +0 -610
- package/dist/shopify-Y2HN2MCQ.js +0 -609
- package/dist/stripe-VE3CD3AY.js +0 -584
- package/dist/tavily-KCZHK6HE.js +0 -326
- package/dist/telegram-3URFBCMY.js +0 -1766
- package/dist/todoist-HNPWNYTD.js +0 -663
- package/dist/trello-3W2MIXRP.js +0 -1079
- package/dist/turso-2EQF7C2Z.js +0 -415
- package/dist/umami-5REN7TGP.js +0 -388
- package/dist/unsplash-EIXL424F.js +0 -350
- package/dist/uptimerobot-KNJ3EYLY.js +0 -482
- package/dist/v2ex-RHJ234PZ.js +0 -666
- package/dist/vercel-AS6NCIC7.js +0 -1075
- package/dist/wordpress-KNDAAUV7.js +0 -811
- package/dist/workos-R6UITSJ7.js +0 -663
- 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
|
-
};
|