@tool-bridge/server 0.1.0 → 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-6SMIQ6QU.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,322 @@
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/mother_duck/api.ts
15
+ var SERVICE = "mother_duck";
16
+ var API_BASE = "https://api.motherduck.com";
17
+ function text(value) {
18
+ if (typeof value !== "string") return void 0;
19
+ const trimmed = value.trim();
20
+ return trimmed === "" ? void 0 : trimmed;
21
+ }
22
+ function record(value) {
23
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
24
+ }
25
+ function compact(input) {
26
+ return Object.fromEntries(Object.entries(input).filter(([, value]) => value !== void 0));
27
+ }
28
+ function errorMessage(payload) {
29
+ const body = record(payload);
30
+ if (body === void 0) return void 0;
31
+ return text(body.message) ?? text(body.error) ?? text(body.code);
32
+ }
33
+ async function readPayload(response) {
34
+ const body = await response.text().catch(() => "");
35
+ if (body.trim() === "") return {};
36
+ try {
37
+ return JSON.parse(body);
38
+ } catch {
39
+ return { message: body };
40
+ }
41
+ }
42
+ function isEmpty(payload) {
43
+ const object = record(payload);
44
+ return object !== void 0 && Object.keys(object).length === 0;
45
+ }
46
+ async function request(ctx, path, input = {}) {
47
+ const apiKey = requireApiKey(ctx, SERVICE);
48
+ const headers = {
49
+ accept: "application/json",
50
+ authorization: `Bearer ${apiKey}`
51
+ };
52
+ if (input.body !== void 0) headers["content-type"] = "application/json";
53
+ let response;
54
+ try {
55
+ response = await guardedFetch(new URL(path, API_BASE).toString(), {
56
+ method: input.method ?? "GET",
57
+ headers,
58
+ ...input.body === void 0 ? {} : { body: JSON.stringify(input.body) }
59
+ });
60
+ } catch (error) {
61
+ throw upstreamError(
62
+ 502,
63
+ error instanceof Error ? `MotherDuck \u8BF7\u6C42\u5931\u8D25: ${error.message}` : "MotherDuck \u8BF7\u6C42\u5931\u8D25"
64
+ );
65
+ }
66
+ const payload = await readPayload(response);
67
+ if (!response.ok) {
68
+ throw upstreamError(response.status, errorMessage(payload) ?? `MotherDuck \u8BF7\u6C42\u5931\u8D25,HTTP ${response.status}`);
69
+ }
70
+ if (input.allowEmpty === true && isEmpty(payload)) return {};
71
+ return payload;
72
+ }
73
+ function requireArrayProperty(payload, key) {
74
+ const value = record(payload)?.[key];
75
+ if (!Array.isArray(value)) {
76
+ throw new TBError("unavailable", `MotherDuck \u7684 ${key} \u54CD\u5E94\u975E\u6CD5`, { retryable: true });
77
+ }
78
+ return value;
79
+ }
80
+ function normalizeToken(value) {
81
+ const token = record(value);
82
+ if (token === void 0) {
83
+ throw new TBError("unavailable", "MotherDuck \u8FD4\u56DE\u7684 token \u4E0D\u662F\u5BF9\u8C61", { retryable: true });
84
+ }
85
+ return compact({
86
+ id: text(token.id),
87
+ name: text(token.name),
88
+ token: text(token.token),
89
+ expire_at: text(token.expire_at),
90
+ created_ts: text(token.created_ts),
91
+ read_only: typeof token.read_only === "boolean" ? token.read_only : void 0,
92
+ token_type: text(token.token_type),
93
+ raw: token
94
+ });
95
+ }
96
+ function responseUsername(payload, fallback) {
97
+ return text(record(payload)?.username) ?? fallback;
98
+ }
99
+ async function listActiveAccounts(_input, ctx) {
100
+ const payload = await request(ctx, "/v1/active_accounts");
101
+ return { accounts: requireArrayProperty(payload, "accounts") };
102
+ }
103
+ async function createUser(input, ctx) {
104
+ const username = input.username.trim();
105
+ const payload = await request(ctx, "/v1/users", { method: "POST", body: { username } });
106
+ return { username: responseUsername(payload, username) };
107
+ }
108
+ async function deleteUser(input, ctx) {
109
+ const username = input.username.trim();
110
+ const payload = await request(ctx, `/v1/users/${encodeURIComponent(username)}`, { method: "DELETE" });
111
+ return { username: responseUsername(payload, username) };
112
+ }
113
+ async function listTokens(input, ctx) {
114
+ const path = `/v1/users/${encodeURIComponent(input.username.trim())}/tokens`;
115
+ return { tokens: requireArrayProperty(await request(ctx, path), "tokens").map(normalizeToken) };
116
+ }
117
+ async function createToken(input, ctx) {
118
+ const path = `/v1/users/${encodeURIComponent(input.username.trim())}/tokens`;
119
+ const payload = await request(ctx, path, {
120
+ method: "POST",
121
+ body: compact({ name: input.name.trim(), ttl: input.ttl, token_type: input.token_type })
122
+ });
123
+ return { token: normalizeToken(payload) };
124
+ }
125
+ async function deleteToken(input, ctx) {
126
+ const username = encodeURIComponent(input.username.trim());
127
+ const tokenId = encodeURIComponent(input.token_id.trim());
128
+ await request(ctx, `/v1/users/${username}/tokens/${tokenId}`, { method: "DELETE", allowEmpty: true });
129
+ return { success: true };
130
+ }
131
+ async function getUserDucklingConfig(input, ctx) {
132
+ const path = `/v1/users/${encodeURIComponent(input.username.trim())}/instances`;
133
+ return { config: await request(ctx, path) };
134
+ }
135
+ async function setUserDucklingConfig(input, ctx) {
136
+ const path = `/v1/users/${encodeURIComponent(input.username.trim())}/instances`;
137
+ const payload = await request(ctx, path, { method: "PUT", body: { config: input.config } });
138
+ return { config: payload };
139
+ }
140
+
141
+ // ../plugins/src/mother_duck/schema.ts
142
+ var listActiveAccountsInput = external_exports.strictObject({}).describe("No input is required to list active MotherDuck accounts.");
143
+ var listActiveAccountsOutput = external_exports.strictObject({
144
+ accounts: external_exports.array(external_exports.strictObject({
145
+ username: external_exports.string().min(1).max(255).describe("The MotherDuck username within the organization.").optional(),
146
+ ducklings: external_exports.array(external_exports.strictObject({
147
+ id: external_exports.string().describe("The Duckling identifier, such as rw or rs.N.").optional(),
148
+ type: external_exports.enum(["read_write", "read_scaling"]).describe("The MotherDuck Duckling type.").optional(),
149
+ status: external_exports.string().min(1).describe("The MotherDuck Duckling status, such as active or cooldown.").optional()
150
+ }).describe("A MotherDuck Duckling attached to an active account.")).describe("The active Ducklings for the account.").optional()
151
+ }).describe("A MotherDuck active account.")).describe("The active accounts in the organization.")
152
+ }).describe("The active MotherDuck accounts returned by the Admin API.");
153
+ var createUserInput = external_exports.strictObject({
154
+ username: external_exports.string().min(1).max(255).describe("The MotherDuck username within the organization.")
155
+ }).describe("Input for creating a MotherDuck user.");
156
+ var createUserOutput = external_exports.strictObject({
157
+ username: external_exports.string().min(1).max(255).describe("The MotherDuck username within the organization.")
158
+ }).describe("The created MotherDuck user.");
159
+ var deleteUserInput = external_exports.strictObject({
160
+ username: external_exports.string().min(1).max(255).describe("The MotherDuck username within the organization.")
161
+ }).describe("Input for deleting a MotherDuck user.");
162
+ var deleteUserOutput = external_exports.strictObject({
163
+ username: external_exports.string().min(1).max(255).describe("The MotherDuck username within the organization.")
164
+ }).describe("The deleted MotherDuck user.");
165
+ var listTokensInput = external_exports.strictObject({
166
+ username: external_exports.string().min(1).max(255).describe("The MotherDuck username within the organization.")
167
+ }).describe("Input for listing MotherDuck user tokens.");
168
+ var listTokensOutput = external_exports.strictObject({
169
+ tokens: external_exports.array(external_exports.strictObject({
170
+ id: external_exports.string().describe("The token UUID.").optional(),
171
+ name: external_exports.string().describe("The token display name.").optional(),
172
+ token: external_exports.string().describe("The newly-created token secret when MotherDuck returns it.").optional(),
173
+ expire_at: external_exports.string().describe("The timestamp when the token expires.").optional(),
174
+ created_ts: external_exports.string().describe("The timestamp when the token was created.").optional(),
175
+ read_only: external_exports.boolean().describe("Whether the token is read-only.").optional(),
176
+ token_type: external_exports.enum(["read_write", "read_scaling"]).describe("The MotherDuck token type.").optional(),
177
+ raw: external_exports.looseObject({}).describe("The raw token object returned by MotherDuck.")
178
+ }).describe("A MotherDuck access token.")).describe("The user's MotherDuck access tokens.")
179
+ }).describe("The MotherDuck access tokens for the user.");
180
+ var createTokenInput = external_exports.strictObject({
181
+ username: external_exports.string().min(1).max(255).describe("The MotherDuck username within the organization."),
182
+ name: external_exports.string().min(1).max(255).describe("The token display name."),
183
+ ttl: external_exports.number().min(300).max(31536e3).describe("Token expiration in seconds.").optional(),
184
+ token_type: external_exports.enum(["read_write", "read_scaling"]).describe("The MotherDuck token type.").optional()
185
+ }).describe("Input for creating a MotherDuck user token.");
186
+ var createTokenOutput = external_exports.strictObject({
187
+ token: external_exports.strictObject({
188
+ id: external_exports.string().describe("The token UUID.").optional(),
189
+ name: external_exports.string().describe("The token display name.").optional(),
190
+ token: external_exports.string().describe("The newly-created token secret when MotherDuck returns it.").optional(),
191
+ expire_at: external_exports.string().describe("The timestamp when the token expires.").optional(),
192
+ created_ts: external_exports.string().describe("The timestamp when the token was created.").optional(),
193
+ read_only: external_exports.boolean().describe("Whether the token is read-only.").optional(),
194
+ token_type: external_exports.enum(["read_write", "read_scaling"]).describe("The MotherDuck token type.").optional(),
195
+ raw: external_exports.looseObject({}).describe("The raw token object returned by MotherDuck.")
196
+ }).describe("A MotherDuck access token.")
197
+ }).describe("The newly-created MotherDuck token.");
198
+ var deleteTokenInput = external_exports.strictObject({
199
+ username: external_exports.string().min(1).max(255).describe("The MotherDuck username within the organization."),
200
+ token_id: external_exports.string().min(1).describe("The MotherDuck access token identifier.")
201
+ }).describe("Input for deleting a MotherDuck user token.");
202
+ var deleteTokenOutput = external_exports.strictObject({
203
+ success: external_exports.boolean().describe("Whether MotherDuck accepted the token deletion request.")
204
+ }).describe("The normalized MotherDuck token deletion result.");
205
+ var getUserDucklingConfigInput = external_exports.strictObject({
206
+ username: external_exports.string().min(1).max(255).describe("The MotherDuck username within the organization.")
207
+ }).describe("Input for retrieving a MotherDuck user's Duckling configuration.");
208
+ var getUserDucklingConfigOutput = external_exports.strictObject({
209
+ config: external_exports.strictObject({
210
+ read_write: external_exports.strictObject({
211
+ instance_size: external_exports.enum(["pulse", "standard", "jumbo", "mega", "giga"]).describe("The MotherDuck instance size."),
212
+ cooldown_seconds: external_exports.int().min(60).max(86400).describe("Cooldown duration in seconds.").optional()
213
+ }).describe("MotherDuck read-write Duckling configuration.").optional(),
214
+ read_scaling: external_exports.strictObject({
215
+ instance_size: external_exports.enum(["pulse", "standard", "jumbo", "mega", "giga"]).describe("The MotherDuck instance size."),
216
+ flock_size: external_exports.number().min(0).max(64).describe("The number of read-scaling Ducklings."),
217
+ cooldown_seconds: external_exports.int().min(60).max(86400).describe("Cooldown duration in seconds.").optional()
218
+ }).describe("MotherDuck read-scaling Duckling configuration.").optional()
219
+ }).describe("MotherDuck Duckling configuration for a user.")
220
+ }).describe("The MotherDuck Duckling configuration for the user.");
221
+ var setUserDucklingConfigInput = external_exports.strictObject({
222
+ username: external_exports.string().min(1).max(255).describe("The MotherDuck username within the organization."),
223
+ config: external_exports.strictObject({
224
+ read_write: external_exports.strictObject({
225
+ instance_size: external_exports.enum(["pulse", "standard", "jumbo", "mega", "giga"]).describe("The MotherDuck instance size."),
226
+ cooldown_seconds: external_exports.int().min(60).max(86400).describe("Cooldown duration in seconds.").optional()
227
+ }).describe("MotherDuck read-write Duckling configuration.").optional(),
228
+ read_scaling: external_exports.strictObject({
229
+ instance_size: external_exports.enum(["pulse", "standard", "jumbo", "mega", "giga"]).describe("The MotherDuck instance size."),
230
+ flock_size: external_exports.number().min(0).max(64).describe("The number of read-scaling Ducklings."),
231
+ cooldown_seconds: external_exports.int().min(60).max(86400).describe("Cooldown duration in seconds.").optional()
232
+ }).describe("MotherDuck read-scaling Duckling configuration.").optional()
233
+ }).describe("MotherDuck Duckling configuration for a user.")
234
+ }).describe("Input for setting a MotherDuck user's Duckling configuration.");
235
+ var setUserDucklingConfigOutput = external_exports.strictObject({
236
+ config: external_exports.strictObject({
237
+ read_write: external_exports.strictObject({
238
+ instance_size: external_exports.enum(["pulse", "standard", "jumbo", "mega", "giga"]).describe("The MotherDuck instance size."),
239
+ cooldown_seconds: external_exports.int().min(60).max(86400).describe("Cooldown duration in seconds.").optional()
240
+ }).describe("MotherDuck read-write Duckling configuration.").optional(),
241
+ read_scaling: external_exports.strictObject({
242
+ instance_size: external_exports.enum(["pulse", "standard", "jumbo", "mega", "giga"]).describe("The MotherDuck instance size."),
243
+ flock_size: external_exports.number().min(0).max(64).describe("The number of read-scaling Ducklings."),
244
+ cooldown_seconds: external_exports.int().min(60).max(86400).describe("Cooldown duration in seconds.").optional()
245
+ }).describe("MotherDuck read-scaling Duckling configuration.").optional()
246
+ }).describe("MotherDuck Duckling configuration for a user.")
247
+ }).describe("The updated MotherDuck Duckling configuration for the user.");
248
+ var motherDuckActions = {
249
+ list_active_accounts: {
250
+ description: "List active MotherDuck accounts and their active Ducklings in the organization.",
251
+ effect: "read",
252
+ inputSchema: listActiveAccountsInput,
253
+ outputSchema: external_exports.toJSONSchema(listActiveAccountsOutput, { io: "output", unrepresentable: "any" })
254
+ },
255
+ create_user: {
256
+ description: "Create a MotherDuck member user in the organization.",
257
+ effect: "write",
258
+ inputSchema: createUserInput,
259
+ outputSchema: external_exports.toJSONSchema(createUserOutput, { io: "output", unrepresentable: "any" })
260
+ },
261
+ delete_user: {
262
+ description: "Permanently delete a MotherDuck user and all of their data.",
263
+ effect: "destructive",
264
+ inputSchema: deleteUserInput,
265
+ outputSchema: external_exports.toJSONSchema(deleteUserOutput, { io: "output", unrepresentable: "any" })
266
+ },
267
+ list_tokens: {
268
+ description: "List MotherDuck access tokens for a user.",
269
+ effect: "read",
270
+ inputSchema: listTokensInput,
271
+ outputSchema: external_exports.toJSONSchema(listTokensOutput, { io: "output", unrepresentable: "any" })
272
+ },
273
+ create_token: {
274
+ description: "Create a MotherDuck access token for a user.",
275
+ effect: "write",
276
+ inputSchema: createTokenInput,
277
+ outputSchema: external_exports.toJSONSchema(createTokenOutput, { io: "output", unrepresentable: "any" })
278
+ },
279
+ delete_token: {
280
+ description: "Invalidate a MotherDuck access token for a user.",
281
+ effect: "destructive",
282
+ inputSchema: deleteTokenInput,
283
+ outputSchema: external_exports.toJSONSchema(deleteTokenOutput, { io: "output", unrepresentable: "any" })
284
+ },
285
+ get_user_duckling_config: {
286
+ description: "Retrieve MotherDuck Duckling configuration for a user.",
287
+ effect: "read",
288
+ inputSchema: getUserDucklingConfigInput,
289
+ outputSchema: external_exports.toJSONSchema(getUserDucklingConfigOutput, { io: "output", unrepresentable: "any" })
290
+ },
291
+ set_user_duckling_config: {
292
+ description: "Set MotherDuck Duckling configuration for a user.",
293
+ effect: "write",
294
+ inputSchema: setUserDucklingConfigInput,
295
+ outputSchema: external_exports.toJSONSchema(setUserDucklingConfigOutput, { io: "output", unrepresentable: "any" })
296
+ }
297
+ };
298
+
299
+ // ../plugins/src/mother_duck/index.ts
300
+ function createMotherDuckPlugin() {
301
+ return createProviderPlugin({
302
+ description: "MotherDuck",
303
+ actions: motherDuckActions,
304
+ // 上游 credentialValidators 就是打 /v1/active_accounts 试凭证,这里对应到同一个 action。
305
+ credentialProbe: "list_active_accounts",
306
+ handlers: {
307
+ list_active_accounts: listActiveAccounts,
308
+ create_user: createUser,
309
+ delete_user: deleteUser,
310
+ list_tokens: listTokens,
311
+ create_token: createToken,
312
+ delete_token: deleteToken,
313
+ get_user_duckling_config: getUserDucklingConfig,
314
+ set_user_duckling_config: setUserDucklingConfig
315
+ }
316
+ });
317
+ }
318
+ var mother_duck_default = createMotherDuckPlugin();
319
+ export {
320
+ createMotherDuckPlugin,
321
+ mother_duck_default as default
322
+ };