@tool-bridge/server 0.1.1 → 0.3.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.
Files changed (107) hide show
  1. package/dist/airtable-V6446SVY.js +792 -0
  2. package/dist/alt_text_generator_ai-HV7JZPDT.js +72 -0
  3. package/dist/amap-TTTVB6WS.js +755 -0
  4. package/dist/anthropic-JH3RA363.js +224 -0
  5. package/dist/apify-ETNN7ITU.js +262 -0
  6. package/dist/brave_search-3DDR2MMB.js +322 -0
  7. package/dist/chunk-CSJEZHQO.js +252 -0
  8. package/dist/chunk-JLTYA2B3.js +20121 -0
  9. package/dist/chunk-K7FVSFUX.js +333 -0
  10. package/dist/{chunk-MQEYFCJB.js → chunk-KGYJEEBI.js} +2770 -21574
  11. package/dist/circleci-MX3TX3HC.js +409 -0
  12. package/dist/clerk-MRPORVF4.js +1036 -0
  13. package/dist/cloudflare_dns-OWP7DD7L.js +605 -0
  14. package/dist/cohere-GPECP66S.js +197 -0
  15. package/dist/confluence-BN7LZ6BC.js +436 -0
  16. package/dist/convertapi-SBEOFOFQ.js +161 -0
  17. package/dist/currencyapi-P2YY7Y7P.js +306 -0
  18. package/dist/deepseek-MWB3NYIN.js +205 -0
  19. package/dist/docker_hub-3JSCIGQ3.js +946 -0
  20. package/dist/dropbox-RFIBDAXO.js +1308 -0
  21. package/dist/dub-YVP57ELQ.js +706 -0
  22. package/dist/e2b-NFSUHTZR.js +305 -0
  23. package/dist/exa-KTDY6IV3.js +360 -0
  24. package/dist/fal_ai-OCUENLNQ.js +405 -0
  25. package/dist/feishu-5CWBQ7E5.js +225 -0
  26. package/dist/feishu_custom_bot-ZJR22OK6.js +240 -0
  27. package/dist/figma-YULGANSA.js +798 -0
  28. package/dist/firehydrant-2V6YSYAP.js +573 -0
  29. package/dist/fixer-LTCDB3CJ.js +171 -0
  30. package/dist/fly-IXPKMAML.js +478 -0
  31. package/dist/front-KRFB4M5X.js +379 -0
  32. package/dist/geocodio-VVURKYHQ.js +236 -0
  33. package/dist/ghost-6J2RIOUB.js +341 -0
  34. package/dist/github-5Z6KQRYH.js +5410 -0
  35. package/dist/gmail-KU4NZ7VA.js +1894 -0
  36. package/dist/googlecalendar-X44DFFXG.js +2539 -0
  37. package/dist/googledocs-WSGLPKSF.js +1322 -0
  38. package/dist/grafana-4PKSSDXY.js +817 -0
  39. package/dist/graphhopper-DF65ZNGK.js +336 -0
  40. package/dist/index.d.ts +181 -2
  41. package/dist/index.js +2 -1
  42. package/dist/ip2proxy-UCAQ5P2J.js +118 -0
  43. package/dist/ipgeolocation_io-UX6FCA2S.js +333 -0
  44. package/dist/ipqualityscore-MKTRXIZJ.js +287 -0
  45. package/dist/jina_ai-MRHPCSV5.js +119 -0
  46. package/dist/jira-EG7ZPOIW.js +627 -0
  47. package/dist/langsmith-FNO3RCOZ.js +597 -0
  48. package/dist/lemlist-SN6BJHSG.js +298 -0
  49. package/dist/linear-H3VU4PSD.js +2163 -0
  50. package/dist/logsnag-OY2JJT2H.js +167 -0
  51. package/dist/main.js +246 -2
  52. package/dist/mattermost-C5SQ7PGD.js +320 -0
  53. package/dist/mem0-LMLE5BFC.js +567 -0
  54. package/dist/memos-UWFAMBZC.js +781 -0
  55. package/dist/metabase-SRYDSDJ6.js +365 -0
  56. package/dist/mistral_ai-YNIJ7VDM.js +1195 -0
  57. package/dist/mother_duck-CPGOFEXE.js +322 -0
  58. package/dist/ngrok-CDJFBSOM.js +375 -0
  59. package/dist/notes-DIVFH3P3.js +109 -0
  60. package/dist/notion-HGDKS4HK.js +945 -0
  61. package/dist/open_exchange_rates-COHHYJDD.js +216 -0
  62. package/dist/openai-4TRT66GW.js +795 -0
  63. package/dist/opengraph_io-YKVW4PXI.js +377 -0
  64. package/dist/openrouter-6CV7B7V5.js +444 -0
  65. package/dist/outline-YWDUK5F7.js +604 -0
  66. package/dist/paddle-MEU7HWDZ.js +464 -0
  67. package/dist/perplexity-MRQUDBIC.js +238 -0
  68. package/dist/pinecone-JI7X2TAF.js +599 -0
  69. package/dist/pipedrive-6JQPAW23.js +453 -0
  70. package/dist/polar-7BF56CMC.js +400 -0
  71. package/dist/posthog-YPU5ADEN.js +3462 -0
  72. package/dist/postmark-BEU5OFKU.js +441 -0
  73. package/dist/prerender-UT5GOOZH.js +180 -0
  74. package/dist/pubmed-3SGOE24Q.js +1052 -0
  75. package/dist/railway-CEK4GLRQ.js +452 -0
  76. package/dist/readwise-DXQUQU67.js +482 -0
  77. package/dist/render-7TGAU5AW.js +473 -0
  78. package/dist/replicate-VICFSQ5A.js +347 -0
  79. package/dist/resend-3E76WK3O.js +100 -0
  80. package/dist/rootly-36GY46BY.js +345 -0
  81. package/dist/scrapfly-VDVUYAHX.js +289 -0
  82. package/dist/scrapingbee-3KTPMAVY.js +247 -0
  83. package/dist/screenshot_fyi-LKG62C3J.js +116 -0
  84. package/dist/semantic_scholar-4WREECYO.js +626 -0
  85. package/dist/sentry-HUQTGXOV.js +1139 -0
  86. package/dist/shodan-SGRKU4KS.js +303 -0
  87. package/dist/shopify-YCZ4L5HT.js +620 -0
  88. package/dist/stripe-OEBKMELB.js +583 -0
  89. package/dist/supabase-I3DBY7L4.js +937 -0
  90. package/dist/tavily-B2YHCNRD.js +349 -0
  91. package/dist/telegram-2VYJELZX.js +1773 -0
  92. package/dist/telnyx-HHXD3CXL.js +237 -0
  93. package/dist/todoist-PHFDEEIS.js +672 -0
  94. package/dist/trello-WUSAK6YN.js +1091 -0
  95. package/dist/turso-FW56U2B3.js +432 -0
  96. package/dist/twilio-M5JI7XHA.js +321 -0
  97. package/dist/umami-HAYODRC4.js +411 -0
  98. package/dist/unsplash-EDPTNEHJ.js +364 -0
  99. package/dist/upstash_redis-GC2CLIWD.js +299 -0
  100. package/dist/uptimerobot-XMSNYLIT.js +481 -0
  101. package/dist/v2ex-KU4ECD65.js +672 -0
  102. package/dist/vercel-THPCEFHW.js +1096 -0
  103. package/dist/wolfram_alpha_api-WHHTH4GU.js +212 -0
  104. package/dist/wordpress-O6TQEQNF.js +822 -0
  105. package/dist/workos-A3VHHWI3.js +681 -0
  106. package/dist/zhihu-BJAI64YJ.js +273 -0
  107. package/package.json +5 -4
@@ -0,0 +1,305 @@
1
+ import {
2
+ createProviderPlugin,
3
+ guardedFetch,
4
+ requireApiKey,
5
+ upstreamError
6
+ } from "./chunk-CSJEZHQO.js";
7
+ import "./chunk-K7FVSFUX.js";
8
+ import {
9
+ TBError,
10
+ external_exports
11
+ } from "./chunk-JLTYA2B3.js";
12
+ import "./chunk-MLKGABMK.js";
13
+
14
+ // ../plugins/src/e2b/api.ts
15
+ var SERVICE = "e2b";
16
+ var API_BASE = "https://api.e2b.app";
17
+ var REQUEST_TIMEOUT_MS = 3e4;
18
+ function text(value) {
19
+ if (typeof value !== "string") return void 0;
20
+ const trimmed = value.trim();
21
+ return trimmed === "" ? void 0 : trimmed;
22
+ }
23
+ function record(value) {
24
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
25
+ }
26
+ function compact(input) {
27
+ return Object.fromEntries(
28
+ Object.entries(input).filter(([, value]) => value !== void 0)
29
+ );
30
+ }
31
+ function requireText(value, field) {
32
+ const result = text(value);
33
+ if (result === void 0) throw new TBError("invalid_argument", `${field} is required.`);
34
+ return result;
35
+ }
36
+ function requireRecord(value, label) {
37
+ const result = record(value);
38
+ if (result === void 0) throw upstreamError(502, `${label} was not an object`);
39
+ return result;
40
+ }
41
+ function stringArray(value) {
42
+ if (!Array.isArray(value)) return void 0;
43
+ const items = value.filter((item) => typeof item === "string" && item !== "");
44
+ return items.length > 0 ? items : void 0;
45
+ }
46
+ function errorMessage(payload, status) {
47
+ if (typeof payload === "string") {
48
+ const trimmed = payload.trim();
49
+ if (trimmed !== "") return trimmed;
50
+ }
51
+ const body = record(payload);
52
+ return text(body?.message) ?? text(body?.error) ?? text(body?.detail) ?? `E2B request failed with status ${status}`;
53
+ }
54
+ function buildUrl(path, query) {
55
+ const url = new URL(`${API_BASE}${path}`);
56
+ for (const [key, value] of Object.entries(query ?? {})) {
57
+ if (value === void 0) continue;
58
+ url.searchParams.set(key, Array.isArray(value) ? value.join(",") : String(value));
59
+ }
60
+ return url.toString();
61
+ }
62
+ async function request(ctx, options) {
63
+ const headers = {
64
+ "accept": "application/json",
65
+ "x-api-key": requireApiKey(ctx, SERVICE)
66
+ };
67
+ if (options.body !== void 0) headers["content-type"] = "application/json";
68
+ let response;
69
+ try {
70
+ response = await guardedFetch(buildUrl(options.path, options.query), {
71
+ method: options.method ?? "GET",
72
+ headers,
73
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
74
+ ...options.body === void 0 ? {} : { body: JSON.stringify(options.body) }
75
+ });
76
+ } catch (error) {
77
+ if (error instanceof TBError) throw error;
78
+ if (error instanceof Error && error.name === "TimeoutError") {
79
+ throw upstreamError(504, `E2B ${REQUEST_TIMEOUT_MS / 1e3}s \u5185\u6CA1\u6709\u8FD4\u56DE`);
80
+ }
81
+ throw upstreamError(502, error instanceof Error ? `E2B request failed: ${error.message}` : "E2B request failed");
82
+ }
83
+ const raw = response.status === 204 ? "" : await response.text().catch(() => "");
84
+ let payload = raw === "" ? options.emptySuccess ?? null : null;
85
+ if (raw !== "") {
86
+ try {
87
+ payload = JSON.parse(raw);
88
+ } catch {
89
+ if (!response.ok) payload = raw;
90
+ else throw upstreamError(502, "E2B returned invalid JSON");
91
+ }
92
+ }
93
+ if (!response.ok) throw upstreamError(response.status, errorMessage(payload, response.status));
94
+ return payload;
95
+ }
96
+ async function requestSandboxArray(ctx, options) {
97
+ const payload = await request(ctx, options);
98
+ if (!Array.isArray(payload)) throw upstreamError(502, "E2B returned a non-array sandboxes payload");
99
+ return payload.map((sandbox) => requireRecord(sandbox, "E2B sandbox"));
100
+ }
101
+ async function createSandbox(input, ctx) {
102
+ const payload = await request(ctx, {
103
+ // 创建走的是 v1 路径,不是列表那个 /v2/sandboxes。
104
+ path: "/sandboxes",
105
+ method: "POST",
106
+ body: compact({
107
+ templateID: requireText(input.templateID, "templateID"),
108
+ timeout: input.timeout,
109
+ autoPause: input.autoPause,
110
+ autoPauseMemory: input.autoPauseMemory,
111
+ autoResume: input.autoResume,
112
+ secure: input.secure,
113
+ allow_internet_access: input.allow_internet_access,
114
+ network: input.network,
115
+ metadata: input.metadata,
116
+ envVars: input.envVars,
117
+ // `mcp: null` 是"显式关掉 MCP",与"没给这个字段"不是一回事,故不能被 compact 掉。
118
+ mcp: input.mcp === null ? null : record(input.mcp),
119
+ volumeMounts: input.volumeMounts
120
+ })
121
+ });
122
+ return { sandbox: requireRecord(payload, "E2B create sandbox response") };
123
+ }
124
+ async function listSandboxes(input, ctx) {
125
+ const sandboxes = await requestSandboxArray(ctx, {
126
+ path: "/v2/sandboxes",
127
+ query: compact({
128
+ metadata: text(input.metadata),
129
+ state: stringArray(input.state),
130
+ nextToken: text(input.nextToken),
131
+ limit: input.limit
132
+ })
133
+ });
134
+ return { sandboxes };
135
+ }
136
+ async function getSandbox(input, ctx) {
137
+ const sandboxID = requireText(input.sandboxID, "sandboxID");
138
+ const payload = await request(ctx, { path: `/sandboxes/${encodeURIComponent(sandboxID)}` });
139
+ return { sandbox: requireRecord(payload, "E2B get sandbox response") };
140
+ }
141
+ async function deleteSandbox(input, ctx) {
142
+ const sandboxID = requireText(input.sandboxID, "sandboxID");
143
+ await request(ctx, {
144
+ path: `/sandboxes/${encodeURIComponent(sandboxID)}`,
145
+ method: "DELETE",
146
+ // 删除成功是 204 空 body,出参 schema 要的这个形状由本层合成。
147
+ emptySuccess: { sandboxID, success: true }
148
+ });
149
+ return { sandboxID, success: true };
150
+ }
151
+
152
+ // ../plugins/src/e2b/schema.ts
153
+ var createSandboxInput = external_exports.strictObject({
154
+ templateID: external_exports.string().min(1).regex(new RegExp("\\S")).describe("The E2B template identifier used to create the sandbox."),
155
+ timeout: external_exports.int().min(0).describe("Time to live for the sandbox in seconds.").optional(),
156
+ autoPause: external_exports.boolean().describe("Whether E2B should automatically pause the sandbox after timeout.").optional(),
157
+ autoPauseMemory: external_exports.boolean().describe("Whether auto-pause should preserve the sandbox memory snapshot when autoPause is true.").optional(),
158
+ autoResume: external_exports.strictObject({
159
+ enabled: external_exports.boolean().describe("Whether auto-resume is enabled for paused sandboxes.").optional()
160
+ }).describe("Auto-resume configuration for paused sandboxes.").optional(),
161
+ secure: external_exports.boolean().describe("Whether E2B should secure all system communication with the sandbox.").optional(),
162
+ allow_internet_access: external_exports.boolean().describe("Whether the sandbox can access the internet.").optional(),
163
+ network: external_exports.looseObject({
164
+ allowPublicTraffic: external_exports.boolean().describe("Whether sandbox URLs are publicly accessible.").optional(),
165
+ allowOut: external_exports.array(external_exports.string().describe("One allowed destination such as a CIDR block, IP address, or domain.")).describe("Allowed outbound destinations for sandbox egress traffic.").optional(),
166
+ denyOut: external_exports.array(external_exports.string().describe("One denied CIDR block or IP address.")).describe("Denied outbound CIDR blocks or IP addresses for sandbox egress traffic.").optional(),
167
+ egressProxy: external_exports.looseObject({}).describe("The egress proxy configuration returned or accepted by E2B.").nullable().optional(),
168
+ maskRequestHost: external_exports.string().describe("The host mask used for sandbox requests.").optional(),
169
+ rules: external_exports.looseObject({}).describe("Per-domain outbound request transform rules.").optional()
170
+ }).describe("The E2B sandbox network configuration object.").optional(),
171
+ metadata: external_exports.record(external_exports.string(), external_exports.string().describe("One sandbox metadata value.")).describe("String metadata attached to the sandbox.").optional(),
172
+ envVars: external_exports.record(external_exports.string(), external_exports.string().describe("One sandbox environment variable value.")).describe("Environment variables passed to the sandbox.").optional(),
173
+ mcp: external_exports.looseObject({}).describe("MCP configuration for the sandbox.").nullable().optional(),
174
+ volumeMounts: external_exports.array(external_exports.strictObject({
175
+ name: external_exports.string().describe("The volume name.").optional(),
176
+ path: external_exports.string().describe("The volume mount path inside the sandbox.").optional()
177
+ }).describe("An E2B sandbox volume mount.")).describe("Volume mounts to attach to the sandbox.").optional()
178
+ }).describe("The input payload for creating an E2B sandbox.");
179
+ var createSandboxOutput = external_exports.strictObject({
180
+ sandbox: external_exports.looseObject({
181
+ templateID: external_exports.string().describe("Identifier of the template from which the sandbox was created.").optional(),
182
+ sandboxID: external_exports.string().describe("Identifier of the sandbox.").optional(),
183
+ alias: external_exports.string().describe("Alias of the template when returned by E2B.").optional(),
184
+ clientID: external_exports.string().describe("Deprecated E2B client identifier.").optional(),
185
+ envdVersion: external_exports.string().describe("Version of envd running in the sandbox.").optional(),
186
+ envdAccessToken: external_exports.string().describe("Access token for envd requests when the sandbox is secure.").nullable().optional(),
187
+ trafficAccessToken: external_exports.string().describe("Token required for accessing the sandbox through the E2B proxy when returned.").nullable().optional(),
188
+ domain: external_exports.string().describe("Deprecated E2B sandbox domain field.").nullable().optional()
189
+ }).describe("The E2B sandbox created by the API.").optional()
190
+ }).describe("The response returned when creating an E2B sandbox.");
191
+ var listSandboxesInput = external_exports.strictObject({
192
+ metadata: external_exports.string().min(1).describe('Metadata query used to filter sandboxes, such as "user=abc&app=prod". Keys and values must already be URL encoded.').optional(),
193
+ state: external_exports.array(external_exports.enum(["running", "paused"]).describe("The E2B sandbox lifecycle state.")).min(1).describe("Sandbox states used to filter the list.").optional(),
194
+ nextToken: external_exports.string().min(1).describe("Cursor returned by E2B for the next page.").optional(),
195
+ limit: external_exports.int().min(1).max(100).describe("Maximum number of sandboxes to return per page.").optional()
196
+ }).describe("The input payload for listing E2B sandboxes.");
197
+ var listSandboxesOutput = external_exports.strictObject({
198
+ sandboxes: external_exports.array(external_exports.looseObject({
199
+ templateID: external_exports.string().describe("Identifier of the template from which the sandbox was created.").optional(),
200
+ alias: external_exports.string().describe("Alias of the template when returned by E2B.").optional(),
201
+ sandboxID: external_exports.string().describe("Identifier of the sandbox.").optional(),
202
+ clientID: external_exports.string().describe("Deprecated E2B client identifier.").optional(),
203
+ startedAt: external_exports.iso.datetime({ offset: true }).describe("Time when the sandbox was started.").optional(),
204
+ endAt: external_exports.iso.datetime({ offset: true }).describe("Time when the sandbox will expire.").optional(),
205
+ cpuCount: external_exports.int().describe("CPU cores allocated to the sandbox.").optional(),
206
+ memoryMB: external_exports.int().describe("Memory allocated to the sandbox in MiB.").optional(),
207
+ diskSizeMB: external_exports.int().describe("Disk size allocated to the sandbox in MiB.").optional(),
208
+ metadata: external_exports.record(external_exports.string(), external_exports.string().describe("One sandbox metadata value.")).describe("String metadata attached to the sandbox.").optional(),
209
+ state: external_exports.enum(["running", "paused"]).describe("The E2B sandbox lifecycle state.").optional(),
210
+ envdVersion: external_exports.string().describe("Version of envd running in the sandbox.").optional(),
211
+ volumeMounts: external_exports.array(external_exports.strictObject({
212
+ name: external_exports.string().describe("The volume name.").optional(),
213
+ path: external_exports.string().describe("The volume mount path inside the sandbox.").optional()
214
+ }).describe("An E2B sandbox volume mount.")).describe("Volume mounts attached to the sandbox.").optional()
215
+ }).describe("An E2B sandbox returned by the sandbox list endpoint.")).describe("The sandboxes returned by E2B.").optional()
216
+ }).describe("The response returned when listing E2B sandboxes.");
217
+ var getSandboxInput = external_exports.strictObject({
218
+ sandboxID: external_exports.string().min(1).regex(new RegExp("\\S")).describe("The E2B sandbox identifier.").optional()
219
+ }).describe("The input payload for selecting an E2B sandbox.");
220
+ var getSandboxOutput = external_exports.strictObject({
221
+ sandbox: external_exports.looseObject({
222
+ templateID: external_exports.string().describe("Identifier of the template from which the sandbox was created.").optional(),
223
+ alias: external_exports.string().describe("Alias of the template when returned by E2B.").optional(),
224
+ sandboxID: external_exports.string().describe("Identifier of the sandbox.").optional(),
225
+ clientID: external_exports.string().describe("Deprecated E2B client identifier.").optional(),
226
+ startedAt: external_exports.iso.datetime({ offset: true }).describe("Time when the sandbox was started.").optional(),
227
+ endAt: external_exports.iso.datetime({ offset: true }).describe("Time when the sandbox will expire.").optional(),
228
+ envdVersion: external_exports.string().describe("Version of envd running in the sandbox.").optional(),
229
+ envdAccessToken: external_exports.string().describe("Access token for envd requests when the sandbox is secure.").nullable().optional(),
230
+ trafficAccessToken: external_exports.string().describe("Token required for accessing the sandbox through the E2B proxy when returned.").nullable().optional(),
231
+ domain: external_exports.string().describe("Deprecated E2B sandbox domain field.").nullable().optional(),
232
+ allowInternetAccess: external_exports.boolean().describe("Whether internet access was explicitly enabled or disabled for the sandbox.").nullable().optional(),
233
+ cpuCount: external_exports.int().describe("CPU cores allocated to the sandbox.").optional(),
234
+ memoryMB: external_exports.int().describe("Memory allocated to the sandbox in MiB.").optional(),
235
+ diskSizeMB: external_exports.int().describe("Disk size allocated to the sandbox in MiB.").optional(),
236
+ metadata: external_exports.record(external_exports.string(), external_exports.string().describe("One sandbox metadata value.")).describe("String metadata attached to the sandbox.").optional(),
237
+ state: external_exports.enum(["running", "paused"]).describe("The E2B sandbox lifecycle state.").optional(),
238
+ network: external_exports.looseObject({
239
+ allowPublicTraffic: external_exports.boolean().describe("Whether sandbox URLs are publicly accessible.").optional(),
240
+ allowOut: external_exports.array(external_exports.string().describe("One allowed destination such as a CIDR block, IP address, or domain.")).describe("Allowed outbound destinations for sandbox egress traffic.").optional(),
241
+ denyOut: external_exports.array(external_exports.string().describe("One denied CIDR block or IP address.")).describe("Denied outbound CIDR blocks or IP addresses for sandbox egress traffic.").optional(),
242
+ egressProxy: external_exports.looseObject({}).describe("The egress proxy configuration returned or accepted by E2B.").nullable().optional(),
243
+ maskRequestHost: external_exports.string().describe("The host mask used for sandbox requests.").optional(),
244
+ rules: external_exports.looseObject({}).describe("Per-domain outbound request transform rules.").optional()
245
+ }).describe("The E2B sandbox network configuration object.").optional(),
246
+ lifecycle: external_exports.looseObject({}).describe("Sandbox lifecycle configuration returned by E2B.").optional(),
247
+ volumeMounts: external_exports.array(external_exports.strictObject({
248
+ name: external_exports.string().describe("The volume name.").optional(),
249
+ path: external_exports.string().describe("The volume mount path inside the sandbox.").optional()
250
+ }).describe("An E2B sandbox volume mount.")).describe("Volume mounts attached to the sandbox.").optional()
251
+ }).describe("Detailed E2B sandbox information.").optional()
252
+ }).describe("The response returned when retrieving an E2B sandbox.");
253
+ var deleteSandboxInput = external_exports.strictObject({
254
+ sandboxID: external_exports.string().min(1).regex(new RegExp("\\S")).describe("The E2B sandbox identifier.").optional()
255
+ }).describe("The input payload for selecting an E2B sandbox.");
256
+ var deleteSandboxOutput = external_exports.strictObject({
257
+ sandboxID: external_exports.string().min(1).regex(new RegExp("\\S")).describe("The E2B sandbox identifier.").optional(),
258
+ success: external_exports.boolean().describe("Whether the sandbox delete request completed successfully.").optional()
259
+ }).describe("The response returned after deleting an E2B sandbox.");
260
+ var e2bActions = {
261
+ create_sandbox: {
262
+ description: "Create an E2B sandbox from a template.",
263
+ effect: "write",
264
+ inputSchema: createSandboxInput,
265
+ outputSchema: external_exports.toJSONSchema(createSandboxOutput, { io: "output", unrepresentable: "any" })
266
+ },
267
+ list_sandboxes: {
268
+ description: "List E2B sandboxes visible to the current API key.",
269
+ effect: "read",
270
+ inputSchema: listSandboxesInput,
271
+ outputSchema: external_exports.toJSONSchema(listSandboxesOutput, { io: "output", unrepresentable: "any" })
272
+ },
273
+ get_sandbox: {
274
+ description: "Get one E2B sandbox by sandbox identifier.",
275
+ effect: "read",
276
+ inputSchema: getSandboxInput,
277
+ outputSchema: external_exports.toJSONSchema(getSandboxOutput, { io: "output", unrepresentable: "any" })
278
+ },
279
+ delete_sandbox: {
280
+ description: "Kill an E2B sandbox by sandbox identifier.",
281
+ effect: "destructive",
282
+ inputSchema: deleteSandboxInput,
283
+ outputSchema: external_exports.toJSONSchema(deleteSandboxOutput, { io: "output", unrepresentable: "any" })
284
+ }
285
+ };
286
+
287
+ // ../plugins/src/e2b/index.ts
288
+ function createE2bPlugin() {
289
+ return createProviderPlugin({
290
+ description: "E2B",
291
+ credentialProbe: "list_sandboxes",
292
+ actions: e2bActions,
293
+ handlers: {
294
+ create_sandbox: createSandbox,
295
+ list_sandboxes: listSandboxes,
296
+ get_sandbox: getSandbox,
297
+ delete_sandbox: deleteSandbox
298
+ }
299
+ });
300
+ }
301
+ var e2b_default = createE2bPlugin();
302
+ export {
303
+ createE2bPlugin,
304
+ e2b_default as default
305
+ };