@tool-bridge/server 0.21.1 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/dist/admin.js +170 -0
  2. package/dist/airtable-ML2GIGCH.js +790 -0
  3. package/dist/{alt_text_generator_ai-W7O34SNG.js → alt_text_generator_ai-FGYQAF2A.js} +12 -11
  4. package/dist/{amap-VOX4T2AW.js → amap-G7V65NGK.js} +221 -220
  5. package/dist/anthropic-6ZK24TBB.js +203 -0
  6. package/dist/apify-VDGYHP6W.js +248 -0
  7. package/dist/brave_search-TAATLZOS.js +302 -0
  8. package/dist/chunk-2IAI3XQM.js +302 -0
  9. package/dist/chunk-7ISGFRC6.js +161 -0
  10. package/dist/{chunk-E6JCVKW6.js → chunk-BNMLA2RC.js} +3 -3
  11. package/dist/chunk-HA4BGL6C.js +8429 -0
  12. package/dist/{chunk-KMTT3I6D.js → chunk-RMAWSG7E.js} +19172 -25717
  13. package/dist/{chunk-XYBU3WZH.js → chunk-RTW5VRTK.js} +3 -3
  14. package/dist/chunk-U7PTOA3U.js +7320 -0
  15. package/dist/chunk-UY6ANCOY.js +378 -0
  16. package/dist/{chunk-ATK45BXV.js → chunk-X7ZUTKHR.js} +4 -2
  17. package/dist/circleci-BQ2UWXL2.js +389 -0
  18. package/dist/clerk-2JYWQNOI.js +1019 -0
  19. package/dist/cohere-6MI7AQM4.js +185 -0
  20. package/dist/{confluence-B3EWPZVE.js → confluence-6Y6GDETF.js} +105 -104
  21. package/dist/{convertapi-EUWSQYPF.js → convertapi-HBZCSWOX.js} +32 -31
  22. package/dist/{currencyapi-KVTIK3GL.js → currencyapi-337U5TGI.js} +71 -71
  23. package/dist/deepseek-OSPASO7O.js +210 -0
  24. package/dist/docker_hub-3ATQOY5L.js +933 -0
  25. package/dist/dropbox-LSA4GM2Y.js +1305 -0
  26. package/dist/dub-VZPJSPI6.js +680 -0
  27. package/dist/e2b-6SDYQZL2.js +278 -0
  28. package/dist/exa-B6EUYDVP.js +332 -0
  29. package/dist/{fal_ai-23E7JPNT.js → fal_ai-K4Q27IME.js} +81 -80
  30. package/dist/{feishu-7QRIDUV6.js → feishu-4TKXG4SU.js} +528 -572
  31. package/dist/{feishu_custom_bot-TJ4K7QNJ.js → feishu_custom_bot-7CTEAKRB.js} +57 -53
  32. package/dist/figma-OUKSZLD5.js +777 -0
  33. package/dist/firehydrant-7MOYL7QH.js +563 -0
  34. package/dist/{fixer-BWON27UO.js → fixer-H2BV2NO4.js} +34 -33
  35. package/dist/fly-PXKY6PNH.js +469 -0
  36. package/dist/{front-QCGXYEDJ.js → front-UZYIV5DW.js} +104 -104
  37. package/dist/geocodio-NSYO7TFP.js +213 -0
  38. package/dist/ghost-QBKKQQMF.js +338 -0
  39. package/dist/github-ENLSJ4CL.js +5421 -0
  40. package/dist/gmail-KQSDEB47.js +1887 -0
  41. package/dist/googlecalendar-5YCX4SZF.js +2524 -0
  42. package/dist/{googledocs-BUHL4J2H.js → googledocs-SSWIVFKA.js} +341 -340
  43. package/dist/{grafana-GLU2DWF2.js → grafana-TF2LXDQA.js} +221 -220
  44. package/dist/graphhopper-CURBVHYK.js +325 -0
  45. package/dist/index.d.ts +1132 -332
  46. package/dist/index.js +31 -14
  47. package/dist/{ip2proxy-EZ64Y4ZH.js → ip2proxy-YNVMTZEM.js} +28 -27
  48. package/dist/ipgeolocation_io-NAU7VJ4J.js +315 -0
  49. package/dist/ipqualityscore-OT63L4TI.js +279 -0
  50. package/dist/{jina_ai-EFBHTBXL.js → jina_ai-6WBMBGWM.js} +23 -23
  51. package/dist/{jira-HQSHAA5K.js → jira-DVDVTHNO.js} +118 -117
  52. package/dist/langsmith-IM5N4YAU.js +593 -0
  53. package/dist/lemlist-277SHUQF.js +289 -0
  54. package/dist/{linear-K7RYFYAD.js → linear-AEPH7B5V.js} +327 -326
  55. package/dist/logsnag-VEWRAGBG.js +150 -0
  56. package/dist/main.js +57 -280
  57. package/dist/{mattermost-S2BRCWLQ.js → mattermost-Q3A2BIZA.js} +59 -58
  58. package/dist/mem0-AXS7GZGI.js +544 -0
  59. package/dist/memos-7TXG4ZTU.js +744 -0
  60. package/dist/{metabase-MMSEPCOF.js → metabase-NSVACWQM.js} +90 -89
  61. package/dist/mistral_ai-YZ52RGD4.js +1196 -0
  62. package/dist/{mother_duck-H7PCQNZ2.js → mother_duck-XLLL6FVL.js} +94 -93
  63. package/dist/ngrok-4O4W3WZW.js +356 -0
  64. package/dist/{notes-PFMKRO33.js → notes-YTB3TJOO.js} +11 -9
  65. package/dist/notion-4W4O7J7V.js +940 -0
  66. package/dist/open_exchange_rates-23QJXVO5.js +215 -0
  67. package/dist/openai-ZS7GLSLH.js +800 -0
  68. package/dist/opengraph_io-PMVH7OYI.js +362 -0
  69. package/dist/openrouter-ONRGFNB6.js +441 -0
  70. package/dist/outline-UCUYZZ7J.js +599 -0
  71. package/dist/paddle-35HTKTUL.js +454 -0
  72. package/dist/perplexity-NVOBYN24.js +220 -0
  73. package/dist/pinecone-55CJY73C.js +571 -0
  74. package/dist/{pipedrive-Y2O7QGFF.js → pipedrive-WMCAKS72.js} +99 -98
  75. package/dist/polar-SM4ZM53B.js +395 -0
  76. package/dist/posthog-NWCXVXNJ.js +3464 -0
  77. package/dist/postmark-QJV5PHUQ.js +427 -0
  78. package/dist/{prerender-MENYM2TY.js → prerender-2W7UT4SC.js} +31 -30
  79. package/dist/{pubmed-GOXUVVH5.js → pubmed-VVV7XYLU.js} +239 -238
  80. package/dist/{railway-V2SID4WV.js → railway-KGI57S3O.js} +118 -117
  81. package/dist/readwise-AGHTQB42.js +470 -0
  82. package/dist/render-O4HBROCK.js +461 -0
  83. package/dist/{replicate-756MXPYX.js → replicate-KWBOMX7D.js} +81 -80
  84. package/dist/{resend-ZKH3BTBI.js → resend-DRH6Y6I4.js} +20 -16
  85. package/dist/rootly-XGCUDW6X.js +336 -0
  86. package/dist/{scrapfly-NSRHFDIQ.js → scrapfly-OIQ3OY6L.js} +62 -61
  87. package/dist/{scrapingbee-OQHLAVEY.js → scrapingbee-OCZO4FHX.js} +56 -56
  88. package/dist/{screenshot_fyi-DVWG3AXC.js → screenshot_fyi-CUNGFZOC.js} +16 -16
  89. package/dist/semantic_scholar-3UJRLKES.js +611 -0
  90. package/dist/{sentry-546MNDJG.js → sentry-5BWVZFJV.js} +208 -207
  91. package/dist/{shodan-C3OON3Z3.js → shodan-HI37CTEW.js} +62 -61
  92. package/dist/shopify-LJ2EV2HH.js +610 -0
  93. package/dist/stripe-3LHMV55K.js +585 -0
  94. package/dist/{supabase-U2SL4D63.js → supabase-H2KPX3Q2.js} +245 -244
  95. package/dist/tavily-FBEWGH3Z.js +326 -0
  96. package/dist/telegram-MYYO3JND.js +1767 -0
  97. package/dist/{telnyx-CXQ4EZUX.js → telnyx-H4ALEGAX.js} +57 -56
  98. package/dist/todoist-OBWICA5Q.js +664 -0
  99. package/dist/trello-GUFUJRWO.js +1080 -0
  100. package/dist/turso-NIAK4UMS.js +416 -0
  101. package/dist/{twilio-4PDBJKWX.js → twilio-K6SLK2CX.js} +70 -69
  102. package/dist/umami-42RS2EPS.js +389 -0
  103. package/dist/unsplash-V7TOTETT.js +351 -0
  104. package/dist/{upstash_redis-G4LQBYHA.js → upstash_redis-AWQMB6Y3.js} +51 -50
  105. package/dist/uptimerobot-AZC2DHOT.js +483 -0
  106. package/dist/v2ex-4TVRNMLS.js +667 -0
  107. package/dist/vercel-DPHTJ3XR.js +1076 -0
  108. package/dist/{wolfram_alpha_api-3G4PUJWB.js → wolfram_alpha_api-XAG7IXBW.js} +36 -35
  109. package/dist/wordpress-KMPKVGUX.js +812 -0
  110. package/dist/workos-PKB2YR7S.js +664 -0
  111. package/dist/zhihu-Y4H4XYPB.js +254 -0
  112. package/package.json +18 -9
  113. package/dist/airtable-LLZDFN7M.js +0 -789
  114. package/dist/anthropic-G23NN3X5.js +0 -202
  115. package/dist/apify-Y3SS734K.js +0 -247
  116. package/dist/brave_search-ZC7OAPSZ.js +0 -301
  117. package/dist/chunk-R6P4XAE5.js +0 -248
  118. package/dist/chunk-U7B6DS2O.js +0 -977
  119. package/dist/chunk-UZM2RXZH.js +0 -23436
  120. package/dist/circleci-3BAX5FCG.js +0 -388
  121. package/dist/clerk-6LEM6TNU.js +0 -1019
  122. package/dist/cloudflare_dns-KINYTJUD.js +0 -588
  123. package/dist/cohere-XCJ5AJ6B.js +0 -185
  124. package/dist/deepseek-PC5YGNC5.js +0 -209
  125. package/dist/docker_hub-C3MA5FU6.js +0 -932
  126. package/dist/dropbox-XBV7Z2IR.js +0 -1304
  127. package/dist/dub-LDOFG3HC.js +0 -679
  128. package/dist/e2b-JMCPSVBW.js +0 -277
  129. package/dist/exa-RAK7O7RD.js +0 -331
  130. package/dist/figma-E6IX5DTH.js +0 -773
  131. package/dist/firehydrant-ZBLPQREE.js +0 -562
  132. package/dist/fly-ZH3HFCZJ.js +0 -468
  133. package/dist/geocodio-YGNI7DA4.js +0 -212
  134. package/dist/ghost-EVSGKH2Q.js +0 -337
  135. package/dist/github-MA2BGRCJ.js +0 -5420
  136. package/dist/gmail-E5E6AADE.js +0 -1886
  137. package/dist/googlecalendar-BTLFPXTD.js +0 -2523
  138. package/dist/graphhopper-WSMB3TCD.js +0 -324
  139. package/dist/ipgeolocation_io-AA7HAS22.js +0 -315
  140. package/dist/ipqualityscore-BHJXVTJT.js +0 -277
  141. package/dist/langsmith-5W6SCT6F.js +0 -592
  142. package/dist/lemlist-HJWH6UMK.js +0 -288
  143. package/dist/logsnag-4KFOHL37.js +0 -150
  144. package/dist/mem0-CAW43CIC.js +0 -543
  145. package/dist/memos-TWEGPKFM.js +0 -740
  146. package/dist/mistral_ai-64BGZQHP.js +0 -1195
  147. package/dist/ngrok-GQCUGZKJ.js +0 -356
  148. package/dist/notion-DQWZWP4N.js +0 -936
  149. package/dist/open_exchange_rates-QMMD735E.js +0 -214
  150. package/dist/openai-W6PX32NZ.js +0 -799
  151. package/dist/opengraph_io-HNDBXYNW.js +0 -361
  152. package/dist/openrouter-JJYMEAUL.js +0 -437
  153. package/dist/outline-MCBNQZYY.js +0 -595
  154. package/dist/paddle-D2SKLUDN.js +0 -453
  155. package/dist/perplexity-XIFMKUAE.js +0 -219
  156. package/dist/pinecone-HUFTALV2.js +0 -570
  157. package/dist/polar-TYTOMOSR.js +0 -394
  158. package/dist/posthog-43JAR3VW.js +0 -3463
  159. package/dist/postmark-KL2QJYSG.js +0 -426
  160. package/dist/readwise-CI4GIMMJ.js +0 -469
  161. package/dist/render-SUBJ6YRZ.js +0 -460
  162. package/dist/rootly-CD2LJHPI.js +0 -336
  163. package/dist/semantic_scholar-T4A252KW.js +0 -610
  164. package/dist/shopify-Y2HN2MCQ.js +0 -609
  165. package/dist/stripe-VE3CD3AY.js +0 -584
  166. package/dist/tavily-KCZHK6HE.js +0 -326
  167. package/dist/telegram-3URFBCMY.js +0 -1766
  168. package/dist/todoist-HNPWNYTD.js +0 -663
  169. package/dist/trello-3W2MIXRP.js +0 -1079
  170. package/dist/turso-2EQF7C2Z.js +0 -415
  171. package/dist/umami-5REN7TGP.js +0 -388
  172. package/dist/unsplash-EIXL424F.js +0 -350
  173. package/dist/uptimerobot-KNJ3EYLY.js +0 -482
  174. package/dist/v2ex-RHJ234PZ.js +0 -666
  175. package/dist/vercel-AS6NCIC7.js +0 -1075
  176. package/dist/wordpress-KNDAAUV7.js +0 -811
  177. package/dist/workos-R6UITSJ7.js +0 -663
  178. package/dist/zhihu-AGK4HILK.js +0 -253
@@ -1,415 +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/turso/api.ts
22
- var SERVICE = "turso";
23
- var API_BASE = "https://api.turso.tech";
24
- var http = createAuthedClient({
25
- baseUrl: `${API_BASE}/`,
26
- service: SERVICE,
27
- auth: { kind: "bearer" },
28
- headers: { accept: "application/json" },
29
- errorMessage: {
30
- // Turso 的错误消息散落在五六个键里,按上游的顺序找。
31
- keys: ["message", "error", "detail", "title", "error.message", "error.detail"],
32
- fallback: (status) => `Turso request failed with ${status}`
33
- },
34
- mapTransportError: ({ message }) => upstreamError(
35
- 502,
36
- message === void 0 ? "Turso request failed" : `Turso request failed: ${message}`
37
- )
38
- });
39
- function requireText(value, field) {
40
- const result = trimmedText(value);
41
- if (result === void 0) throw new TBError("invalid_argument", `${field} is required.`);
42
- return result;
43
- }
44
- function responseError(message) {
45
- return new TBError("unavailable", message, { retryable: true });
46
- }
47
- function normalizeResource(raw) {
48
- return compactDefined({
49
- slug: trimmedText(raw.slug),
50
- name: trimmedText(raw.name),
51
- type: trimmedText(raw.type),
52
- location: trimmedText(raw.location),
53
- uuid: trimmedText(raw.uuid),
54
- group: trimmedText(raw.group),
55
- hostname: trimmedText(raw.hostname),
56
- code: trimmedText(raw.code),
57
- raw
58
- });
59
- }
60
- function normalizeItems(items) {
61
- return items.flatMap((item) => {
62
- const fields = asJsonObject(item);
63
- return fields === void 0 ? [] : [normalizeResource(fields)];
64
- });
65
- }
66
- function resourceList(payload, keys) {
67
- if (Array.isArray(payload)) return normalizeItems(payload);
68
- const fields = asJsonObject(payload);
69
- if (fields === void 0) throw responseError("Turso returned an invalid list response");
70
- for (const key of [...keys, "data"]) {
71
- const value = fields[key];
72
- if (Array.isArray(value)) return normalizeItems(value);
73
- }
74
- throw responseError("Turso list response is missing items");
75
- }
76
- function singleResource(payload, keys) {
77
- const fields = asJsonObject(payload);
78
- if (fields === void 0) throw responseError("Turso returned an invalid resource response");
79
- for (const key of [...keys, "data"]) {
80
- const value = asJsonObject(fields[key]);
81
- if (value !== void 0) return normalizeResource(value);
82
- }
83
- return normalizeResource(fields);
84
- }
85
- async function request(ctx, input) {
86
- const response = await http.request(ctx, {
87
- method: input.method,
88
- path: input.path,
89
- ...input.body === void 0 ? {} : { json: input.body },
90
- invalidJson: "text"
91
- });
92
- if (response.bodyKind === "empty") return {};
93
- return response.bodyKind === "json" ? response.data : { message: response.data };
94
- }
95
- function organizationPath(organizationSlug) {
96
- return `/v1/organizations/${encodeURIComponent(requireText(organizationSlug, "organizationSlug"))}`;
97
- }
98
- function extensions(value) {
99
- if (value === void 0 || value === "all") return value;
100
- return value.map((item) => requireText(item, "extensions"));
101
- }
102
- async function listOrganizations(_input, ctx) {
103
- const payload = await request(ctx, { method: "GET", path: "/v1/organizations" });
104
- return { organizations: resourceList(payload, ["organizations"]) };
105
- }
106
- async function getOrganization(input, ctx) {
107
- const payload = await request(ctx, { method: "GET", path: organizationPath(input.organizationSlug) });
108
- return { organization: singleResource(payload, ["organization"]) };
109
- }
110
- async function listLocations(_input, ctx) {
111
- const payload = await request(ctx, { method: "GET", path: "/v1/locations" });
112
- return { locations: resourceList(payload, ["locations", "regions"]) };
113
- }
114
- async function listGroups(input, ctx) {
115
- const payload = await request(ctx, { method: "GET", path: `${organizationPath(input.organizationSlug)}/groups` });
116
- return { groups: resourceList(payload, ["groups"]) };
117
- }
118
- async function getGroup(input, ctx) {
119
- const name = encodeURIComponent(requireText(input.name, "name"));
120
- const payload = await request(ctx, {
121
- method: "GET",
122
- path: `${organizationPath(input.organizationSlug)}/groups/${name}`
123
- });
124
- return { group: singleResource(payload, ["group"]) };
125
- }
126
- async function createGroup(input, ctx) {
127
- const payload = await request(ctx, {
128
- method: "POST",
129
- path: `${organizationPath(input.organizationSlug)}/groups`,
130
- body: compactDefined({
131
- name: requireText(input.name, "name"),
132
- location: requireText(input.location, "location"),
133
- extensions: extensions(input.extensions)
134
- })
135
- });
136
- return { group: singleResource(payload, ["group"]) };
137
- }
138
- async function listDatabases(input, ctx) {
139
- const payload = await request(ctx, { method: "GET", path: `${organizationPath(input.organizationSlug)}/databases` });
140
- return { databases: resourceList(payload, ["databases"]) };
141
- }
142
- async function getDatabase(input, ctx) {
143
- const name = encodeURIComponent(requireText(input.name, "name"));
144
- const payload = await request(ctx, {
145
- method: "GET",
146
- path: `${organizationPath(input.organizationSlug)}/databases/${name}`
147
- });
148
- return { database: singleResource(payload, ["database"]) };
149
- }
150
- async function createDatabase(input, ctx) {
151
- const payload = await request(ctx, {
152
- method: "POST",
153
- path: `${organizationPath(input.organizationSlug)}/databases`,
154
- // 上游这里没走 compactObject:两个字段都是必填,给不出就该在断言处炸。
155
- body: {
156
- name: requireText(input.name, "name"),
157
- group: requireText(input.group, "group")
158
- }
159
- });
160
- return { database: singleResource(payload, ["database"]) };
161
- }
162
- async function deleteDatabase(input, ctx) {
163
- const name = encodeURIComponent(requireText(input.name, "name"));
164
- await request(ctx, {
165
- method: "DELETE",
166
- path: `${organizationPath(input.organizationSlug)}/databases/${name}`
167
- });
168
- return { deleted: true };
169
- }
170
-
171
- // ../plugins/src/turso/schema.ts
172
- var listOrganizationsInput = external_exports.strictObject({}).describe("The input payload for listing Turso organizations.");
173
- var listOrganizationsOutput = external_exports.strictObject({
174
- organizations: external_exports.array(external_exports.strictObject({
175
- slug: external_exports.string().min(1).describe("The resource slug when Turso returns one.").optional(),
176
- name: external_exports.string().min(1).describe("The resource name when Turso returns one.").optional(),
177
- type: external_exports.string().min(1).describe("The resource type when Turso returns one.").optional(),
178
- location: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
179
- uuid: external_exports.string().min(1).describe("The UUID when Turso returns one.").optional(),
180
- group: external_exports.string().min(1).describe("The group name when Turso returns one.").optional(),
181
- hostname: external_exports.string().min(1).describe("The database hostname when Turso returns one.").optional(),
182
- code: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
183
- raw: external_exports.looseObject({}).describe("The raw Turso resource object returned by the Platform API.")
184
- }).describe("A normalized Turso Platform API resource.")).describe("The organizations visible to the current API token.")
185
- }).describe("The organizations returned by the Turso Platform API.");
186
- var getOrganizationInput = external_exports.strictObject({
187
- organizationSlug: external_exports.string().min(1).describe("The organization slug used in the Turso API path.")
188
- }).describe("The input payload for retrieving one organization.");
189
- var getOrganizationOutput = external_exports.strictObject({
190
- organization: external_exports.strictObject({
191
- slug: external_exports.string().min(1).describe("The resource slug when Turso returns one.").optional(),
192
- name: external_exports.string().min(1).describe("The resource name when Turso returns one.").optional(),
193
- type: external_exports.string().min(1).describe("The resource type when Turso returns one.").optional(),
194
- location: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
195
- uuid: external_exports.string().min(1).describe("The UUID when Turso returns one.").optional(),
196
- group: external_exports.string().min(1).describe("The group name when Turso returns one.").optional(),
197
- hostname: external_exports.string().min(1).describe("The database hostname when Turso returns one.").optional(),
198
- code: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
199
- raw: external_exports.looseObject({}).describe("The raw Turso resource object returned by the Platform API.")
200
- }).describe("A normalized Turso Platform API resource.")
201
- }).describe("The organization returned by the Turso Platform API.");
202
- var listLocationsInput = external_exports.strictObject({}).describe("The input payload for listing Turso locations.");
203
- var listLocationsOutput = external_exports.strictObject({
204
- locations: external_exports.array(external_exports.strictObject({
205
- slug: external_exports.string().min(1).describe("The resource slug when Turso returns one.").optional(),
206
- name: external_exports.string().min(1).describe("The resource name when Turso returns one.").optional(),
207
- type: external_exports.string().min(1).describe("The resource type when Turso returns one.").optional(),
208
- location: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
209
- uuid: external_exports.string().min(1).describe("The UUID when Turso returns one.").optional(),
210
- group: external_exports.string().min(1).describe("The group name when Turso returns one.").optional(),
211
- hostname: external_exports.string().min(1).describe("The database hostname when Turso returns one.").optional(),
212
- code: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
213
- raw: external_exports.looseObject({}).describe("The raw Turso resource object returned by the Platform API.")
214
- }).describe("A normalized Turso Platform API resource.")).describe("The available Turso locations.")
215
- }).describe("The locations returned by the Turso Platform API.");
216
- var listGroupsInput = external_exports.strictObject({
217
- organizationSlug: external_exports.string().min(1).describe("The organization slug used in the Turso API path.")
218
- }).describe("The input payload for listing Turso groups.");
219
- var listGroupsOutput = external_exports.strictObject({
220
- groups: external_exports.array(external_exports.strictObject({
221
- slug: external_exports.string().min(1).describe("The resource slug when Turso returns one.").optional(),
222
- name: external_exports.string().min(1).describe("The resource name when Turso returns one.").optional(),
223
- type: external_exports.string().min(1).describe("The resource type when Turso returns one.").optional(),
224
- location: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
225
- uuid: external_exports.string().min(1).describe("The UUID when Turso returns one.").optional(),
226
- group: external_exports.string().min(1).describe("The group name when Turso returns one.").optional(),
227
- hostname: external_exports.string().min(1).describe("The database hostname when Turso returns one.").optional(),
228
- code: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
229
- raw: external_exports.looseObject({}).describe("The raw Turso resource object returned by the Platform API.")
230
- }).describe("A normalized Turso Platform API resource.")).describe("The Turso groups belonging to the organization.")
231
- }).describe("The Turso groups returned for one organization.");
232
- var getGroupInput = external_exports.strictObject({
233
- organizationSlug: external_exports.string().min(1).describe("The organization slug used in the Turso API path."),
234
- name: external_exports.string().min(1).describe("The Turso group name.")
235
- }).describe("The input payload for retrieving one Turso group.");
236
- var getGroupOutput = external_exports.strictObject({
237
- group: external_exports.strictObject({
238
- slug: external_exports.string().min(1).describe("The resource slug when Turso returns one.").optional(),
239
- name: external_exports.string().min(1).describe("The resource name when Turso returns one.").optional(),
240
- type: external_exports.string().min(1).describe("The resource type when Turso returns one.").optional(),
241
- location: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
242
- uuid: external_exports.string().min(1).describe("The UUID when Turso returns one.").optional(),
243
- group: external_exports.string().min(1).describe("The group name when Turso returns one.").optional(),
244
- hostname: external_exports.string().min(1).describe("The database hostname when Turso returns one.").optional(),
245
- code: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
246
- raw: external_exports.looseObject({}).describe("The raw Turso resource object returned by the Platform API.")
247
- }).describe("A normalized Turso Platform API resource.")
248
- }).describe("The Turso group returned by the Platform API.");
249
- var createGroupInput = external_exports.strictObject({
250
- organizationSlug: external_exports.string().min(1).describe("The organization slug used in the Turso API path."),
251
- name: external_exports.string().min(1).describe("The Turso group name."),
252
- location: external_exports.string().min(1).describe("The primary Turso location code for the group."),
253
- extensions: external_exports.union([external_exports.enum(["all"]).describe("Enable every supported extension."), external_exports.array(external_exports.string().min(1).describe("One Turso extension name.")).min(1).describe("The explicit extension names to enable for new databases in the group.")]).describe("The extensions to enable for new databases in the group.").optional()
254
- }).describe("The input payload for creating a Turso group.");
255
- var createGroupOutput = external_exports.strictObject({
256
- group: external_exports.strictObject({
257
- slug: external_exports.string().min(1).describe("The resource slug when Turso returns one.").optional(),
258
- name: external_exports.string().min(1).describe("The resource name when Turso returns one.").optional(),
259
- type: external_exports.string().min(1).describe("The resource type when Turso returns one.").optional(),
260
- location: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
261
- uuid: external_exports.string().min(1).describe("The UUID when Turso returns one.").optional(),
262
- group: external_exports.string().min(1).describe("The group name when Turso returns one.").optional(),
263
- hostname: external_exports.string().min(1).describe("The database hostname when Turso returns one.").optional(),
264
- code: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
265
- raw: external_exports.looseObject({}).describe("The raw Turso resource object returned by the Platform API.")
266
- }).describe("A normalized Turso Platform API resource.")
267
- }).describe("The newly created Turso group.");
268
- var listDatabasesInput = external_exports.strictObject({
269
- organizationSlug: external_exports.string().min(1).describe("The organization slug used in the Turso API path.")
270
- }).describe("The input payload for listing Turso databases.");
271
- var listDatabasesOutput = external_exports.strictObject({
272
- databases: external_exports.array(external_exports.strictObject({
273
- slug: external_exports.string().min(1).describe("The resource slug when Turso returns one.").optional(),
274
- name: external_exports.string().min(1).describe("The resource name when Turso returns one.").optional(),
275
- type: external_exports.string().min(1).describe("The resource type when Turso returns one.").optional(),
276
- location: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
277
- uuid: external_exports.string().min(1).describe("The UUID when Turso returns one.").optional(),
278
- group: external_exports.string().min(1).describe("The group name when Turso returns one.").optional(),
279
- hostname: external_exports.string().min(1).describe("The database hostname when Turso returns one.").optional(),
280
- code: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
281
- raw: external_exports.looseObject({}).describe("The raw Turso resource object returned by the Platform API.")
282
- }).describe("A normalized Turso Platform API resource.")).describe("The Turso databases belonging to the organization.")
283
- }).describe("The Turso databases returned for one organization.");
284
- var getDatabaseInput = external_exports.strictObject({
285
- organizationSlug: external_exports.string().min(1).describe("The organization slug used in the Turso API path."),
286
- name: external_exports.string().min(1).describe("The Turso database name.")
287
- }).describe("The input payload for retrieving one Turso database.");
288
- var getDatabaseOutput = external_exports.strictObject({
289
- database: external_exports.strictObject({
290
- slug: external_exports.string().min(1).describe("The resource slug when Turso returns one.").optional(),
291
- name: external_exports.string().min(1).describe("The resource name when Turso returns one.").optional(),
292
- type: external_exports.string().min(1).describe("The resource type when Turso returns one.").optional(),
293
- location: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
294
- uuid: external_exports.string().min(1).describe("The UUID when Turso returns one.").optional(),
295
- group: external_exports.string().min(1).describe("The group name when Turso returns one.").optional(),
296
- hostname: external_exports.string().min(1).describe("The database hostname when Turso returns one.").optional(),
297
- code: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
298
- raw: external_exports.looseObject({}).describe("The raw Turso resource object returned by the Platform API.")
299
- }).describe("A normalized Turso Platform API resource.")
300
- }).describe("The Turso database returned by the Platform API.");
301
- var createDatabaseInput = external_exports.strictObject({
302
- organizationSlug: external_exports.string().min(1).describe("The organization slug used in the Turso API path."),
303
- name: external_exports.string().min(1).describe("The Turso database name."),
304
- group: external_exports.string().min(1).describe("The Turso group where the database should be created.")
305
- }).describe("The input payload for creating a Turso database.");
306
- var createDatabaseOutput = external_exports.strictObject({
307
- database: external_exports.strictObject({
308
- slug: external_exports.string().min(1).describe("The resource slug when Turso returns one.").optional(),
309
- name: external_exports.string().min(1).describe("The resource name when Turso returns one.").optional(),
310
- type: external_exports.string().min(1).describe("The resource type when Turso returns one.").optional(),
311
- location: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
312
- uuid: external_exports.string().min(1).describe("The UUID when Turso returns one.").optional(),
313
- group: external_exports.string().min(1).describe("The group name when Turso returns one.").optional(),
314
- hostname: external_exports.string().min(1).describe("The database hostname when Turso returns one.").optional(),
315
- code: external_exports.string().min(1).describe("The location code when Turso returns one.").optional(),
316
- raw: external_exports.looseObject({}).describe("The raw Turso resource object returned by the Platform API.")
317
- }).describe("A normalized Turso Platform API resource.")
318
- }).describe("The newly created Turso database.");
319
- var deleteDatabaseInput = external_exports.strictObject({
320
- organizationSlug: external_exports.string().min(1).describe("The organization slug used in the Turso API path."),
321
- name: external_exports.string().min(1).describe("The Turso database name.")
322
- }).describe("The input payload for deleting one Turso database.");
323
- var deleteDatabaseOutput = external_exports.strictObject({
324
- deleted: external_exports.boolean().describe("Whether the connector finished the delete request successfully.")
325
- }).describe("The normalized delete result returned by the connector.");
326
- var tursoActions = {
327
- list_organizations: {
328
- description: "List organizations visible to the current Turso Platform API token.",
329
- effect: "read",
330
- inputSchema: listOrganizationsInput,
331
- outputSchema: external_exports.toJSONSchema(listOrganizationsOutput, { io: "output", unrepresentable: "any" })
332
- },
333
- get_organization: {
334
- description: "Retrieve one Turso organization by slug.",
335
- effect: "read",
336
- inputSchema: getOrganizationInput,
337
- outputSchema: external_exports.toJSONSchema(getOrganizationOutput, { io: "output", unrepresentable: "any" })
338
- },
339
- list_locations: {
340
- description: "List available Turso locations that can host groups.",
341
- effect: "read",
342
- inputSchema: listLocationsInput,
343
- outputSchema: external_exports.toJSONSchema(listLocationsOutput, { io: "output", unrepresentable: "any" })
344
- },
345
- list_groups: {
346
- description: "List Turso groups for one organization.",
347
- effect: "read",
348
- inputSchema: listGroupsInput,
349
- outputSchema: external_exports.toJSONSchema(listGroupsOutput, { io: "output", unrepresentable: "any" })
350
- },
351
- get_group: {
352
- description: "Retrieve one Turso group by name within an organization.",
353
- effect: "read",
354
- inputSchema: getGroupInput,
355
- outputSchema: external_exports.toJSONSchema(getGroupOutput, { io: "output", unrepresentable: "any" })
356
- },
357
- create_group: {
358
- description: "Create a Turso group in one organization with a primary location.",
359
- effect: "write",
360
- inputSchema: createGroupInput,
361
- outputSchema: external_exports.toJSONSchema(createGroupOutput, { io: "output", unrepresentable: "any" })
362
- },
363
- list_databases: {
364
- description: "List Turso databases for one organization.",
365
- effect: "read",
366
- inputSchema: listDatabasesInput,
367
- outputSchema: external_exports.toJSONSchema(listDatabasesOutput, { io: "output", unrepresentable: "any" })
368
- },
369
- get_database: {
370
- description: "Retrieve one Turso database by name within an organization.",
371
- effect: "read",
372
- inputSchema: getDatabaseInput,
373
- outputSchema: external_exports.toJSONSchema(getDatabaseOutput, { io: "output", unrepresentable: "any" })
374
- },
375
- create_database: {
376
- description: "Create a Turso database in one organization and group.",
377
- effect: "write",
378
- inputSchema: createDatabaseInput,
379
- outputSchema: external_exports.toJSONSchema(createDatabaseOutput, { io: "output", unrepresentable: "any" })
380
- },
381
- delete_database: {
382
- description: "Delete a Turso database from one organization.",
383
- effect: "destructive",
384
- inputSchema: deleteDatabaseInput,
385
- outputSchema: external_exports.toJSONSchema(deleteDatabaseOutput, { io: "output", unrepresentable: "any" })
386
- }
387
- };
388
-
389
- // ../plugins/src/turso/index.ts
390
- function createTursoPlugin() {
391
- return createProviderPlugin({
392
- description: "Turso",
393
- actions: tursoActions,
394
- // 上游 credentialValidators 打的 `/v1/auth/validate` 没有对应 action;`list_organizations`
395
- // 同样只读、无必填入参,且同样要求 Platform token 有效,拿它当挂载时的凭证探针。
396
- credentialProbe: "list_organizations",
397
- handlers: {
398
- list_organizations: listOrganizations,
399
- get_organization: getOrganization,
400
- list_locations: listLocations,
401
- list_groups: listGroups,
402
- get_group: getGroup,
403
- create_group: createGroup,
404
- list_databases: listDatabases,
405
- get_database: getDatabase,
406
- create_database: createDatabase,
407
- delete_database: deleteDatabase
408
- }
409
- });
410
- }
411
- var turso_default = createTursoPlugin();
412
- export {
413
- createTursoPlugin,
414
- turso_default as default
415
- };