@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
package/dist/fly-ZH3HFCZJ.js
DELETED
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createAuthedClient
|
|
3
|
-
} from "./chunk-XYBU3WZH.js";
|
|
4
|
-
import "./chunk-E6JCVKW6.js";
|
|
5
|
-
import {
|
|
6
|
-
asJsonObject,
|
|
7
|
-
compactDefined,
|
|
8
|
-
trimmedText
|
|
9
|
-
} from "./chunk-JXHMDBAY.js";
|
|
10
|
-
import {
|
|
11
|
-
createProviderPlugin,
|
|
12
|
-
upstreamError
|
|
13
|
-
} from "./chunk-ATK45BXV.js";
|
|
14
|
-
import "./chunk-U7B6DS2O.js";
|
|
15
|
-
import {
|
|
16
|
-
TBError,
|
|
17
|
-
external_exports
|
|
18
|
-
} from "./chunk-UZM2RXZH.js";
|
|
19
|
-
import "./chunk-U67V476Y.js";
|
|
20
|
-
|
|
21
|
-
// ../plugins/src/fly/api.ts
|
|
22
|
-
var SERVICE = "fly";
|
|
23
|
-
var API_BASE = "https://api.machines.dev/v1/";
|
|
24
|
-
function requireText(value, field) {
|
|
25
|
-
const result = trimmedText(value);
|
|
26
|
-
if (result === void 0) throw new TBError("invalid_argument", `${field} is required`);
|
|
27
|
-
return result;
|
|
28
|
-
}
|
|
29
|
-
function optionalBody(input) {
|
|
30
|
-
const body = compactDefined(input);
|
|
31
|
-
return Object.keys(body).length === 0 ? void 0 : body;
|
|
32
|
-
}
|
|
33
|
-
function flyPayload(data, bodyKind, headers) {
|
|
34
|
-
if (bodyKind === "empty") return void 0;
|
|
35
|
-
if (bodyKind === "json") return data;
|
|
36
|
-
const body = String(data);
|
|
37
|
-
const contentType = (headers.get("content-type") ?? "").toLowerCase();
|
|
38
|
-
const trimmed = body.trim();
|
|
39
|
-
if (contentType.includes("application/json") || trimmed.startsWith("{") || trimmed.startsWith("[")) {
|
|
40
|
-
try {
|
|
41
|
-
return JSON.parse(body);
|
|
42
|
-
} catch {
|
|
43
|
-
return body;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return body;
|
|
47
|
-
}
|
|
48
|
-
function errorMessage(payload, status) {
|
|
49
|
-
if (typeof payload === "string") {
|
|
50
|
-
const message = trimmedText(payload);
|
|
51
|
-
if (message !== void 0) return message;
|
|
52
|
-
}
|
|
53
|
-
const fields = asJsonObject(payload);
|
|
54
|
-
if (fields !== void 0) {
|
|
55
|
-
for (const key of ["error", "message", "details"]) {
|
|
56
|
-
const message = trimmedText(fields[key]);
|
|
57
|
-
if (message !== void 0) return message;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return `Fly.io request failed with status ${status}`;
|
|
61
|
-
}
|
|
62
|
-
var http = createAuthedClient({
|
|
63
|
-
baseUrl: API_BASE,
|
|
64
|
-
service: SERVICE,
|
|
65
|
-
auth: { kind: "bearer" },
|
|
66
|
-
headers: { accept: "application/json" },
|
|
67
|
-
// 错误消息要先过 flyPayload 二次解析(content-type 不可信),不是标准键序提取。
|
|
68
|
-
mapError: (context) => upstreamError(
|
|
69
|
-
context.status,
|
|
70
|
-
errorMessage(flyPayload(context.data, context.bodyKind, context.headers), context.status)
|
|
71
|
-
),
|
|
72
|
-
mapTransportError: ({ message }) => upstreamError(502, message ?? "Fly.io request failed")
|
|
73
|
-
});
|
|
74
|
-
async function request(ctx, input) {
|
|
75
|
-
const result = await http.request(ctx, {
|
|
76
|
-
path: input.path,
|
|
77
|
-
method: input.method,
|
|
78
|
-
// 空串与 undefined 同等对待:Fly 把 `?region=` 当成真的按空 region 过滤。
|
|
79
|
-
query: Object.entries(input.query ?? {}).filter(([, value]) => value !== void 0 && value !== ""),
|
|
80
|
-
...input.body === void 0 ? {} : { json: input.body },
|
|
81
|
-
invalidJson: "text",
|
|
82
|
-
responseType: "auto"
|
|
83
|
-
});
|
|
84
|
-
const payload = flyPayload(result.data, result.bodyKind, result.headers);
|
|
85
|
-
if (input.expectJson === false) return payload;
|
|
86
|
-
if (payload === void 0) {
|
|
87
|
-
throw upstreamError(502, "Fly.io returned an empty response");
|
|
88
|
-
}
|
|
89
|
-
return payload;
|
|
90
|
-
}
|
|
91
|
-
function machinePath(input) {
|
|
92
|
-
const app = encodeURIComponent(requireText(input.app_name, "app_name"));
|
|
93
|
-
const machine = encodeURIComponent(requireText(input.machine_id, "machine_id"));
|
|
94
|
-
return `apps/${app}/machines/${machine}`;
|
|
95
|
-
}
|
|
96
|
-
async function listApps(input, ctx) {
|
|
97
|
-
return request(ctx, {
|
|
98
|
-
method: "GET",
|
|
99
|
-
path: "apps",
|
|
100
|
-
query: { org_slug: requireText(input.org_slug, "org_slug"), app_role: trimmedText(input.app_role) }
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
async function getApp(input, ctx) {
|
|
104
|
-
return request(ctx, {
|
|
105
|
-
method: "GET",
|
|
106
|
-
path: `apps/${encodeURIComponent(requireText(input.app_name, "app_name"))}`
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
async function listMachines(input, ctx) {
|
|
110
|
-
return request(ctx, {
|
|
111
|
-
method: "GET",
|
|
112
|
-
path: `apps/${encodeURIComponent(requireText(input.app_name, "app_name"))}/machines`,
|
|
113
|
-
query: {
|
|
114
|
-
// 显式 false 不发:Fly 只认这两个开关的"出现即为真",带上 `=false` 反而会被当成开启。
|
|
115
|
-
include_deleted: input.include_deleted === true ? true : void 0,
|
|
116
|
-
region: trimmedText(input.region),
|
|
117
|
-
state: trimmedText(input.state),
|
|
118
|
-
summary: input.summary === true ? true : void 0
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
async function createMachine(input, ctx) {
|
|
123
|
-
const app = encodeURIComponent(requireText(input.app_name, "app_name"));
|
|
124
|
-
return request(ctx, {
|
|
125
|
-
method: "POST",
|
|
126
|
-
path: `apps/${app}/machines`,
|
|
127
|
-
// app_name 只进路径,不进请求体 —— 故这里是逐字段列举而不是整体透传。
|
|
128
|
-
body: compactDefined({
|
|
129
|
-
config: input.config,
|
|
130
|
-
lease_ttl: input.lease_ttl,
|
|
131
|
-
lsvd: input.lsvd,
|
|
132
|
-
min_secrets_version: input.min_secrets_version,
|
|
133
|
-
name: trimmedText(input.name),
|
|
134
|
-
region: trimmedText(input.region),
|
|
135
|
-
skip_launch: input.skip_launch,
|
|
136
|
-
skip_secrets: input.skip_secrets,
|
|
137
|
-
skip_service_registration: input.skip_service_registration
|
|
138
|
-
})
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
async function getMachine(input, ctx) {
|
|
142
|
-
return request(ctx, { method: "GET", path: machinePath(input) });
|
|
143
|
-
}
|
|
144
|
-
async function startMachine(input, ctx) {
|
|
145
|
-
await request(ctx, { method: "POST", expectJson: false, path: `${machinePath(input)}/start` });
|
|
146
|
-
return { ok: true };
|
|
147
|
-
}
|
|
148
|
-
async function stopMachine(input, ctx) {
|
|
149
|
-
await request(ctx, {
|
|
150
|
-
method: "POST",
|
|
151
|
-
expectJson: false,
|
|
152
|
-
path: `${machinePath(input)}/stop`,
|
|
153
|
-
// stop 的 signal/timeout 在 body 里(restart 的同名两参在 query 里,别对调)。
|
|
154
|
-
body: optionalBody({ signal: trimmedText(input.signal), timeout: trimmedText(input.timeout) })
|
|
155
|
-
});
|
|
156
|
-
return { ok: true };
|
|
157
|
-
}
|
|
158
|
-
async function restartMachine(input, ctx) {
|
|
159
|
-
await request(ctx, {
|
|
160
|
-
method: "POST",
|
|
161
|
-
expectJson: false,
|
|
162
|
-
path: `${machinePath(input)}/restart`,
|
|
163
|
-
// restart 的 signal/timeout 在 query 里(stop 的同名两参在 body 里,别对调)。
|
|
164
|
-
query: { signal: trimmedText(input.signal), timeout: trimmedText(input.timeout) }
|
|
165
|
-
});
|
|
166
|
-
return { ok: true };
|
|
167
|
-
}
|
|
168
|
-
async function waitForMachine(input, ctx) {
|
|
169
|
-
return request(ctx, {
|
|
170
|
-
method: "GET",
|
|
171
|
-
path: `${machinePath(input)}/wait`,
|
|
172
|
-
query: {
|
|
173
|
-
from_event_id: trimmedText(input.from_event_id),
|
|
174
|
-
state: trimmedText(input.state),
|
|
175
|
-
timeout: typeof input.timeout === "number" ? input.timeout : void 0,
|
|
176
|
-
version: trimmedText(input.version)
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// ../plugins/src/fly/schema.ts
|
|
182
|
-
var listAppsInput = external_exports.strictObject({
|
|
183
|
-
org_slug: external_exports.string().min(1).describe("The Fly organization slug, or personal, to filter apps."),
|
|
184
|
-
app_role: external_exports.string().describe("Optional app role filter.").optional()
|
|
185
|
-
}).describe("Input parameters for listing Fly Apps.");
|
|
186
|
-
var listAppsOutput = external_exports.looseObject({
|
|
187
|
-
apps: external_exports.array(external_exports.looseObject({
|
|
188
|
-
id: external_exports.string().describe("The app identifier.").optional(),
|
|
189
|
-
internal_numeric_id: external_exports.int().describe("The internal numeric app identifier.").optional(),
|
|
190
|
-
machine_count: external_exports.int().describe("The number of Machines in the app.").optional(),
|
|
191
|
-
name: external_exports.string().describe("The app name.").optional(),
|
|
192
|
-
network: external_exports.string().describe("The private network name associated with the app.").optional(),
|
|
193
|
-
organization: external_exports.looseObject({
|
|
194
|
-
internal_numeric_id: external_exports.int().describe("The internal numeric organization identifier.").optional(),
|
|
195
|
-
name: external_exports.string().describe("The organization display name.").optional(),
|
|
196
|
-
slug: external_exports.string().describe("The organization slug.").optional()
|
|
197
|
-
}).describe("Fly organization information for an app.").optional(),
|
|
198
|
-
status: external_exports.string().describe("The app status.").optional(),
|
|
199
|
-
volume_count: external_exports.int().describe("The number of volumes in the app.").optional()
|
|
200
|
-
}).describe("Fly App details returned by the Machines API.")).describe("Fly Apps matching the request.").optional(),
|
|
201
|
-
total_apps: external_exports.int().describe("The total number of apps returned by Fly.").optional()
|
|
202
|
-
}).describe("Apps returned by the Fly Machines API.");
|
|
203
|
-
var getAppInput = external_exports.strictObject({
|
|
204
|
-
app_name: external_exports.string().min(1).describe("The Fly App name.").optional()
|
|
205
|
-
}).describe("Input parameters for retrieving a Fly App.");
|
|
206
|
-
var getAppOutput = external_exports.looseObject({
|
|
207
|
-
id: external_exports.string().describe("The app identifier.").optional(),
|
|
208
|
-
internal_numeric_id: external_exports.int().describe("The internal numeric app identifier.").optional(),
|
|
209
|
-
machine_count: external_exports.int().describe("The number of Machines in the app.").optional(),
|
|
210
|
-
name: external_exports.string().describe("The app name.").optional(),
|
|
211
|
-
network: external_exports.string().describe("The private network name associated with the app.").optional(),
|
|
212
|
-
organization: external_exports.looseObject({
|
|
213
|
-
internal_numeric_id: external_exports.int().describe("The internal numeric organization identifier.").optional(),
|
|
214
|
-
name: external_exports.string().describe("The organization display name.").optional(),
|
|
215
|
-
slug: external_exports.string().describe("The organization slug.").optional()
|
|
216
|
-
}).describe("Fly organization information for an app.").optional(),
|
|
217
|
-
status: external_exports.string().describe("The app status.").optional(),
|
|
218
|
-
volume_count: external_exports.int().describe("The number of volumes in the app.").optional()
|
|
219
|
-
}).describe("Fly App details returned by the Machines API.");
|
|
220
|
-
var listMachinesInput = external_exports.strictObject({
|
|
221
|
-
app_name: external_exports.string().min(1).describe("The Fly App name."),
|
|
222
|
-
include_deleted: external_exports.boolean().describe("Whether to include deleted Machines.").optional(),
|
|
223
|
-
region: external_exports.string().describe("Optional Fly region filter.").optional(),
|
|
224
|
-
state: external_exports.string().describe("Comma-separated Machine states to filter, such as created, started, stopped, or suspended.").optional(),
|
|
225
|
-
summary: external_exports.boolean().describe("Whether to omit large Machine details such as config, checks, and events.").optional()
|
|
226
|
-
}).describe("Input parameters for listing Fly Machines in an app.");
|
|
227
|
-
var listMachinesOutput = external_exports.array(external_exports.looseObject({
|
|
228
|
-
checks: external_exports.array(external_exports.looseObject({
|
|
229
|
-
name: external_exports.string().describe("The check name.").optional(),
|
|
230
|
-
output: external_exports.string().describe("The latest check output.").optional(),
|
|
231
|
-
status: external_exports.string().describe("The latest check status.").optional(),
|
|
232
|
-
updated_at: external_exports.string().describe("When Fly last updated this check status.").optional()
|
|
233
|
-
}).describe("A Machine check status entry.")).describe("Check statuses for this Machine.").optional(),
|
|
234
|
-
config: external_exports.looseObject({}).describe("The Fly Machine configuration object returned by the Machines API.").optional(),
|
|
235
|
-
created_at: external_exports.string().describe("When this Machine was created.").optional(),
|
|
236
|
-
events: external_exports.array(external_exports.looseObject({
|
|
237
|
-
id: external_exports.string().describe("The event identifier.").optional(),
|
|
238
|
-
request: external_exports.looseObject({}).describe("Request details for this event.").optional(),
|
|
239
|
-
source: external_exports.string().describe("The event source.").optional(),
|
|
240
|
-
status: external_exports.string().describe("The event status.").optional(),
|
|
241
|
-
timestamp: external_exports.int().describe("The event timestamp.").optional(),
|
|
242
|
-
type: external_exports.string().describe("The event type.").optional()
|
|
243
|
-
}).describe("A Machine event returned by Fly.")).describe("Events for this Machine.").optional(),
|
|
244
|
-
host_status: external_exports.string().describe("The Machine host status.").optional(),
|
|
245
|
-
id: external_exports.string().describe("The Machine ID.").optional(),
|
|
246
|
-
image_ref: external_exports.looseObject({
|
|
247
|
-
digest: external_exports.string().describe("The image digest.").optional(),
|
|
248
|
-
labels: external_exports.record(external_exports.string(), external_exports.string().describe("A label value.")).describe("Image labels keyed by label name.").optional(),
|
|
249
|
-
registry: external_exports.string().describe("The image registry.").optional(),
|
|
250
|
-
repository: external_exports.string().describe("The image repository.").optional(),
|
|
251
|
-
tag: external_exports.string().describe("The image tag.").optional()
|
|
252
|
-
}).describe("The resolved image reference for a Machine.").optional(),
|
|
253
|
-
incomplete_config: external_exports.looseObject({}).describe("The Fly Machine configuration object returned by the Machines API.").optional(),
|
|
254
|
-
instance_id: external_exports.string().describe("The version-specific Machine instance ID.").optional(),
|
|
255
|
-
name: external_exports.string().describe("The Machine name.").optional(),
|
|
256
|
-
nonce: external_exports.string().describe("The lease nonce when the Machine is currently leased.").optional(),
|
|
257
|
-
private_ip: external_exports.string().describe("The Machine private 6PN IPv6 address.").optional(),
|
|
258
|
-
region: external_exports.string().describe("The Fly region where the Machine resides.").optional(),
|
|
259
|
-
state: external_exports.string().describe("The current Machine state.").optional(),
|
|
260
|
-
updated_at: external_exports.string().describe("When this Machine was last updated.").optional()
|
|
261
|
-
}).describe("A Fly Machine returned by the Machines API.")).describe("Machines returned for the requested Fly App.");
|
|
262
|
-
var createMachineInput = external_exports.strictObject({
|
|
263
|
-
app_name: external_exports.string().min(1).describe("The Fly App name."),
|
|
264
|
-
config: external_exports.looseObject({
|
|
265
|
-
image: external_exports.string().min(1).describe("The Docker image to run in the Machine.").optional()
|
|
266
|
-
}).describe("The Fly Machine configuration object. Include the documented image field when creating a Machine, and pass additional Fly Machine config fields as needed."),
|
|
267
|
-
lease_ttl: external_exports.int().describe("Seconds to acquire a lease on the newly created Machine.").optional(),
|
|
268
|
-
lsvd: external_exports.boolean().describe("Whether to enable Log Structured Virtual Disks for this Machine.").optional(),
|
|
269
|
-
min_secrets_version: external_exports.int().describe("Minimum secrets version required for the Machine.").optional(),
|
|
270
|
-
name: external_exports.string().describe("Unique name for this Machine. Fly generates one when omitted.").optional(),
|
|
271
|
-
region: external_exports.string().describe("Target Fly region. Fly chooses a nearby region when omitted.").optional(),
|
|
272
|
-
skip_launch: external_exports.boolean().describe("Whether to create the Machine without booting it.").optional(),
|
|
273
|
-
skip_secrets: external_exports.boolean().describe("Whether to skip applying app secrets to the Machine.").optional(),
|
|
274
|
-
skip_service_registration: external_exports.boolean().describe("Whether to leave the Machine disconnected from request routing.").optional()
|
|
275
|
-
}).describe("Input parameters for creating a Fly Machine.");
|
|
276
|
-
var createMachineOutput = external_exports.looseObject({
|
|
277
|
-
checks: external_exports.array(external_exports.looseObject({
|
|
278
|
-
name: external_exports.string().describe("The check name.").optional(),
|
|
279
|
-
output: external_exports.string().describe("The latest check output.").optional(),
|
|
280
|
-
status: external_exports.string().describe("The latest check status.").optional(),
|
|
281
|
-
updated_at: external_exports.string().describe("When Fly last updated this check status.").optional()
|
|
282
|
-
}).describe("A Machine check status entry.")).describe("Check statuses for this Machine.").optional(),
|
|
283
|
-
config: external_exports.looseObject({}).describe("The Fly Machine configuration object returned by the Machines API.").optional(),
|
|
284
|
-
created_at: external_exports.string().describe("When this Machine was created.").optional(),
|
|
285
|
-
events: external_exports.array(external_exports.looseObject({
|
|
286
|
-
id: external_exports.string().describe("The event identifier.").optional(),
|
|
287
|
-
request: external_exports.looseObject({}).describe("Request details for this event.").optional(),
|
|
288
|
-
source: external_exports.string().describe("The event source.").optional(),
|
|
289
|
-
status: external_exports.string().describe("The event status.").optional(),
|
|
290
|
-
timestamp: external_exports.int().describe("The event timestamp.").optional(),
|
|
291
|
-
type: external_exports.string().describe("The event type.").optional()
|
|
292
|
-
}).describe("A Machine event returned by Fly.")).describe("Events for this Machine.").optional(),
|
|
293
|
-
host_status: external_exports.string().describe("The Machine host status.").optional(),
|
|
294
|
-
id: external_exports.string().describe("The Machine ID.").optional(),
|
|
295
|
-
image_ref: external_exports.looseObject({
|
|
296
|
-
digest: external_exports.string().describe("The image digest.").optional(),
|
|
297
|
-
labels: external_exports.record(external_exports.string(), external_exports.string().describe("A label value.")).describe("Image labels keyed by label name.").optional(),
|
|
298
|
-
registry: external_exports.string().describe("The image registry.").optional(),
|
|
299
|
-
repository: external_exports.string().describe("The image repository.").optional(),
|
|
300
|
-
tag: external_exports.string().describe("The image tag.").optional()
|
|
301
|
-
}).describe("The resolved image reference for a Machine.").optional(),
|
|
302
|
-
incomplete_config: external_exports.looseObject({}).describe("The Fly Machine configuration object returned by the Machines API.").optional(),
|
|
303
|
-
instance_id: external_exports.string().describe("The version-specific Machine instance ID.").optional(),
|
|
304
|
-
name: external_exports.string().describe("The Machine name.").optional(),
|
|
305
|
-
nonce: external_exports.string().describe("The lease nonce when the Machine is currently leased.").optional(),
|
|
306
|
-
private_ip: external_exports.string().describe("The Machine private 6PN IPv6 address.").optional(),
|
|
307
|
-
region: external_exports.string().describe("The Fly region where the Machine resides.").optional(),
|
|
308
|
-
state: external_exports.string().describe("The current Machine state.").optional(),
|
|
309
|
-
updated_at: external_exports.string().describe("When this Machine was last updated.").optional()
|
|
310
|
-
}).describe("A Fly Machine returned by the Machines API.");
|
|
311
|
-
var getMachineInput = external_exports.strictObject({
|
|
312
|
-
app_name: external_exports.string().min(1).describe("The Fly App name.").optional(),
|
|
313
|
-
machine_id: external_exports.string().min(1).describe("The Fly Machine ID.").optional()
|
|
314
|
-
}).describe("Input parameters for selecting a Fly Machine by app and Machine ID.");
|
|
315
|
-
var getMachineOutput = external_exports.looseObject({
|
|
316
|
-
checks: external_exports.array(external_exports.looseObject({
|
|
317
|
-
name: external_exports.string().describe("The check name.").optional(),
|
|
318
|
-
output: external_exports.string().describe("The latest check output.").optional(),
|
|
319
|
-
status: external_exports.string().describe("The latest check status.").optional(),
|
|
320
|
-
updated_at: external_exports.string().describe("When Fly last updated this check status.").optional()
|
|
321
|
-
}).describe("A Machine check status entry.")).describe("Check statuses for this Machine.").optional(),
|
|
322
|
-
config: external_exports.looseObject({}).describe("The Fly Machine configuration object returned by the Machines API.").optional(),
|
|
323
|
-
created_at: external_exports.string().describe("When this Machine was created.").optional(),
|
|
324
|
-
events: external_exports.array(external_exports.looseObject({
|
|
325
|
-
id: external_exports.string().describe("The event identifier.").optional(),
|
|
326
|
-
request: external_exports.looseObject({}).describe("Request details for this event.").optional(),
|
|
327
|
-
source: external_exports.string().describe("The event source.").optional(),
|
|
328
|
-
status: external_exports.string().describe("The event status.").optional(),
|
|
329
|
-
timestamp: external_exports.int().describe("The event timestamp.").optional(),
|
|
330
|
-
type: external_exports.string().describe("The event type.").optional()
|
|
331
|
-
}).describe("A Machine event returned by Fly.")).describe("Events for this Machine.").optional(),
|
|
332
|
-
host_status: external_exports.string().describe("The Machine host status.").optional(),
|
|
333
|
-
id: external_exports.string().describe("The Machine ID.").optional(),
|
|
334
|
-
image_ref: external_exports.looseObject({
|
|
335
|
-
digest: external_exports.string().describe("The image digest.").optional(),
|
|
336
|
-
labels: external_exports.record(external_exports.string(), external_exports.string().describe("A label value.")).describe("Image labels keyed by label name.").optional(),
|
|
337
|
-
registry: external_exports.string().describe("The image registry.").optional(),
|
|
338
|
-
repository: external_exports.string().describe("The image repository.").optional(),
|
|
339
|
-
tag: external_exports.string().describe("The image tag.").optional()
|
|
340
|
-
}).describe("The resolved image reference for a Machine.").optional(),
|
|
341
|
-
incomplete_config: external_exports.looseObject({}).describe("The Fly Machine configuration object returned by the Machines API.").optional(),
|
|
342
|
-
instance_id: external_exports.string().describe("The version-specific Machine instance ID.").optional(),
|
|
343
|
-
name: external_exports.string().describe("The Machine name.").optional(),
|
|
344
|
-
nonce: external_exports.string().describe("The lease nonce when the Machine is currently leased.").optional(),
|
|
345
|
-
private_ip: external_exports.string().describe("The Machine private 6PN IPv6 address.").optional(),
|
|
346
|
-
region: external_exports.string().describe("The Fly region where the Machine resides.").optional(),
|
|
347
|
-
state: external_exports.string().describe("The current Machine state.").optional(),
|
|
348
|
-
updated_at: external_exports.string().describe("When this Machine was last updated.").optional()
|
|
349
|
-
}).describe("A Fly Machine returned by the Machines API.");
|
|
350
|
-
var startMachineInput = external_exports.strictObject({
|
|
351
|
-
app_name: external_exports.string().min(1).describe("The Fly App name.").optional(),
|
|
352
|
-
machine_id: external_exports.string().min(1).describe("The Fly Machine ID.").optional()
|
|
353
|
-
}).describe("Input parameters for selecting a Fly Machine by app and Machine ID.");
|
|
354
|
-
var startMachineOutput = external_exports.strictObject({
|
|
355
|
-
ok: external_exports.literal(true).optional()
|
|
356
|
-
}).describe("Acknowledgement for a successful Fly lifecycle request.");
|
|
357
|
-
var stopMachineInput = external_exports.strictObject({
|
|
358
|
-
app_name: external_exports.string().min(1).describe("The Fly App name."),
|
|
359
|
-
machine_id: external_exports.string().min(1).describe("The Fly Machine ID."),
|
|
360
|
-
signal: external_exports.enum(["SIGHUP", "SIGINT", "SIGQUIT", "SIGKILL", "SIGUSR1", "SIGUSR2", "SIGTERM"]).describe("Unix signal to send when stopping the Machine.").optional(),
|
|
361
|
-
timeout: external_exports.string().describe("Stop timeout as a Go duration string, such as 1s.").optional()
|
|
362
|
-
}).describe("Input parameters for stopping a Fly Machine.");
|
|
363
|
-
var stopMachineOutput = external_exports.strictObject({
|
|
364
|
-
ok: external_exports.literal(true).optional()
|
|
365
|
-
}).describe("Acknowledgement for a successful Fly lifecycle request.");
|
|
366
|
-
var restartMachineInput = external_exports.strictObject({
|
|
367
|
-
app_name: external_exports.string().min(1).describe("The Fly App name."),
|
|
368
|
-
machine_id: external_exports.string().min(1).describe("The Fly Machine ID."),
|
|
369
|
-
signal: external_exports.enum(["SIGHUP", "SIGINT", "SIGQUIT", "SIGKILL", "SIGUSR1", "SIGUSR2", "SIGTERM"]).describe("Unix signal to use for the restart.").optional(),
|
|
370
|
-
timeout: external_exports.string().describe("Restart timeout as a Go duration string or number of seconds.").optional()
|
|
371
|
-
}).describe("Input parameters for restarting a Fly Machine.");
|
|
372
|
-
var restartMachineOutput = external_exports.strictObject({
|
|
373
|
-
ok: external_exports.literal(true).optional()
|
|
374
|
-
}).describe("Acknowledgement for a successful Fly lifecycle request.");
|
|
375
|
-
var waitForMachineInput = external_exports.strictObject({
|
|
376
|
-
app_name: external_exports.string().min(1).describe("The Fly App name."),
|
|
377
|
-
machine_id: external_exports.string().min(1).describe("The Fly Machine ID."),
|
|
378
|
-
from_event_id: external_exports.string().describe("Machine event ID to start waiting after.").optional(),
|
|
379
|
-
state: external_exports.enum(["started", "stopped", "suspended", "destroyed", "failed", "settled"]).describe("Desired Machine state to wait for.").optional(),
|
|
380
|
-
timeout: external_exports.int().describe("Maximum wait time in seconds. Fly defaults to 60 seconds.").optional(),
|
|
381
|
-
version: external_exports.string().describe("Machine version ID to wait for.").optional()
|
|
382
|
-
}).describe("Input parameters for waiting until a Fly Machine reaches a state.");
|
|
383
|
-
var waitForMachineOutput = external_exports.looseObject({
|
|
384
|
-
event_id: external_exports.string().describe("The event ID observed by the wait request.").optional(),
|
|
385
|
-
ok: external_exports.boolean().describe("Whether the Machine reached the desired state.").optional(),
|
|
386
|
-
state: external_exports.string().describe("The Machine state observed by Fly.").optional(),
|
|
387
|
-
version: external_exports.string().describe("The Machine version observed by Fly.").optional()
|
|
388
|
-
}).describe("Result returned after waiting for a Fly Machine state.");
|
|
389
|
-
var flyActions = {
|
|
390
|
-
list_apps: {
|
|
391
|
-
description: "List Fly Apps for an organization through the Machines API.",
|
|
392
|
-
effect: "read",
|
|
393
|
-
inputSchema: listAppsInput,
|
|
394
|
-
outputSchema: external_exports.toJSONSchema(listAppsOutput, { io: "output", unrepresentable: "any" })
|
|
395
|
-
},
|
|
396
|
-
get_app: {
|
|
397
|
-
description: "Retrieve details for a Fly App by name.",
|
|
398
|
-
effect: "read",
|
|
399
|
-
inputSchema: getAppInput,
|
|
400
|
-
outputSchema: external_exports.toJSONSchema(getAppOutput, { io: "output", unrepresentable: "any" })
|
|
401
|
-
},
|
|
402
|
-
list_machines: {
|
|
403
|
-
description: "List Fly Machines in an app with optional state, region, and summary filters.",
|
|
404
|
-
effect: "read",
|
|
405
|
-
inputSchema: listMachinesInput,
|
|
406
|
-
outputSchema: external_exports.toJSONSchema(listMachinesOutput, { io: "output", unrepresentable: "any" })
|
|
407
|
-
},
|
|
408
|
-
create_machine: {
|
|
409
|
-
description: "Create a Fly Machine in an app using a JSON Machine configuration.",
|
|
410
|
-
effect: "write",
|
|
411
|
-
inputSchema: createMachineInput,
|
|
412
|
-
outputSchema: external_exports.toJSONSchema(createMachineOutput, { io: "output", unrepresentable: "any" })
|
|
413
|
-
},
|
|
414
|
-
get_machine: {
|
|
415
|
-
description: "Retrieve a Fly Machine by app and Machine ID.",
|
|
416
|
-
effect: "read",
|
|
417
|
-
inputSchema: getMachineInput,
|
|
418
|
-
outputSchema: external_exports.toJSONSchema(getMachineOutput, { io: "output", unrepresentable: "any" })
|
|
419
|
-
},
|
|
420
|
-
start_machine: {
|
|
421
|
-
description: "Start a Fly Machine.",
|
|
422
|
-
effect: "write",
|
|
423
|
-
inputSchema: startMachineInput,
|
|
424
|
-
outputSchema: external_exports.toJSONSchema(startMachineOutput, { io: "output", unrepresentable: "any" })
|
|
425
|
-
},
|
|
426
|
-
stop_machine: {
|
|
427
|
-
description: "Stop a Fly Machine, optionally with a Unix signal and timeout.",
|
|
428
|
-
effect: "write",
|
|
429
|
-
inputSchema: stopMachineInput,
|
|
430
|
-
outputSchema: external_exports.toJSONSchema(stopMachineOutput, { io: "output", unrepresentable: "any" })
|
|
431
|
-
},
|
|
432
|
-
restart_machine: {
|
|
433
|
-
description: "Restart a Fly Machine, optionally with a Unix signal and timeout.",
|
|
434
|
-
effect: "write",
|
|
435
|
-
inputSchema: restartMachineInput,
|
|
436
|
-
outputSchema: external_exports.toJSONSchema(restartMachineOutput, { io: "output", unrepresentable: "any" })
|
|
437
|
-
},
|
|
438
|
-
wait_for_machine: {
|
|
439
|
-
description: "Wait for a Fly Machine to reach a desired state.",
|
|
440
|
-
effect: "write",
|
|
441
|
-
inputSchema: waitForMachineInput,
|
|
442
|
-
outputSchema: external_exports.toJSONSchema(waitForMachineOutput, { io: "output", unrepresentable: "any" })
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
|
-
|
|
446
|
-
// ../plugins/src/fly/index.ts
|
|
447
|
-
function createFlyPlugin() {
|
|
448
|
-
return createProviderPlugin({
|
|
449
|
-
description: "Fly.io",
|
|
450
|
-
actions: flyActions,
|
|
451
|
-
handlers: {
|
|
452
|
-
list_apps: listApps,
|
|
453
|
-
get_app: getApp,
|
|
454
|
-
list_machines: listMachines,
|
|
455
|
-
create_machine: createMachine,
|
|
456
|
-
get_machine: getMachine,
|
|
457
|
-
start_machine: startMachine,
|
|
458
|
-
stop_machine: stopMachine,
|
|
459
|
-
restart_machine: restartMachine,
|
|
460
|
-
wait_for_machine: waitForMachine
|
|
461
|
-
}
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
var fly_default = createFlyPlugin();
|
|
465
|
-
export {
|
|
466
|
-
createFlyPlugin,
|
|
467
|
-
fly_default as default
|
|
468
|
-
};
|