@tool-bridge/server 0.21.0 → 0.21.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.
- package/dist/{airtable-DMJEEGJP.js → airtable-LLZDFN7M.js} +5 -5
- package/dist/{alt_text_generator_ai-RELFQ5FV.js → alt_text_generator_ai-W7O34SNG.js} +4 -4
- package/dist/{amap-YSYEACKQ.js → amap-VOX4T2AW.js} +4 -4
- package/dist/{anthropic-D5X5GSYE.js → anthropic-G23NN3X5.js} +5 -5
- package/dist/{apify-5NVFU3IZ.js → apify-Y3SS734K.js} +5 -5
- package/dist/{brave_search-X557FMGO.js → brave_search-ZC7OAPSZ.js} +5 -5
- package/dist/{chunk-QR4LK3HF.js → chunk-ATK45BXV.js} +1 -1
- package/dist/{chunk-Q74GLIDK.js → chunk-E6JCVKW6.js} +6 -5
- package/dist/{chunk-MDY7K5CX.js → chunk-KMTT3I6D.js} +23 -263
- package/dist/chunk-R6P4XAE5.js +248 -0
- package/dist/{chunk-ZTTN6AJG.js → chunk-U7B6DS2O.js} +1 -1
- package/dist/{chunk-MZCIPUNQ.js → chunk-UZM2RXZH.js} +18 -6
- package/dist/{chunk-JEWFX6Z6.js → chunk-XYBU3WZH.js} +3 -3
- package/dist/{circleci-3P3QTUX2.js → circleci-3BAX5FCG.js} +5 -5
- package/dist/{clerk-GNMZQ2MY.js → clerk-6LEM6TNU.js} +5 -5
- package/dist/{cloudflare_dns-VWZH3ZTR.js → cloudflare_dns-KINYTJUD.js} +5 -5
- package/dist/{cohere-C7QVIIMG.js → cohere-XCJ5AJ6B.js} +5 -5
- package/dist/{confluence-52I37IUT.js → confluence-B3EWPZVE.js} +5 -5
- package/dist/{convertapi-3TRJ3WEO.js → convertapi-EUWSQYPF.js} +3 -3
- package/dist/{currencyapi-LWEANWVI.js → currencyapi-KVTIK3GL.js} +5 -5
- package/dist/{deepseek-5U24YG4P.js → deepseek-PC5YGNC5.js} +5 -5
- package/dist/{docker_hub-CMISLRSE.js → docker_hub-C3MA5FU6.js} +4 -4
- package/dist/{dropbox-TW4QN6FT.js → dropbox-XBV7Z2IR.js} +5 -5
- package/dist/{dub-EFXGI5UH.js → dub-LDOFG3HC.js} +5 -5
- package/dist/{e2b-PHM63OVF.js → e2b-JMCPSVBW.js} +5 -5
- package/dist/{exa-DYOQWURR.js → exa-RAK7O7RD.js} +5 -5
- package/dist/{fal_ai-VJPMCNRH.js → fal_ai-23E7JPNT.js} +5 -5
- package/dist/feishu-7QRIDUV6.js +12019 -0
- package/dist/{feishu_custom_bot-ADSE23KU.js → feishu_custom_bot-TJ4K7QNJ.js} +3 -3
- package/dist/{figma-4AK47AYY.js → figma-E6IX5DTH.js} +5 -5
- package/dist/{firehydrant-RGPTW4EA.js → firehydrant-ZBLPQREE.js} +5 -5
- package/dist/{fixer-OAMF4DKP.js → fixer-BWON27UO.js} +4 -4
- package/dist/{fly-YB4AQD4O.js → fly-ZH3HFCZJ.js} +5 -5
- package/dist/{front-6GTVYKUM.js → front-QCGXYEDJ.js} +5 -5
- package/dist/{geocodio-YRT4K25M.js → geocodio-YGNI7DA4.js} +4 -4
- package/dist/{ghost-JCW6UIP2.js → ghost-EVSGKH2Q.js} +4 -4
- package/dist/{github-CEGVRMNX.js → github-MA2BGRCJ.js} +5 -5
- package/dist/{gmail-JCMJD55P.js → gmail-E5E6AADE.js} +5 -5
- package/dist/{googlecalendar-2EAW4MNM.js → googlecalendar-BTLFPXTD.js} +11 -10
- package/dist/{googledocs-YNKKBM6Q.js → googledocs-BUHL4J2H.js} +6 -5
- package/dist/{grafana-353VSGXN.js → grafana-GLU2DWF2.js} +5 -5
- package/dist/{graphhopper-H3IVJNDS.js → graphhopper-WSMB3TCD.js} +4 -4
- package/dist/index.js +4 -3
- package/dist/{ip2proxy-DBGRWH7S.js → ip2proxy-EZ64Y4ZH.js} +4 -4
- package/dist/{ipgeolocation_io-5I2BDVMG.js → ipgeolocation_io-AA7HAS22.js} +4 -4
- package/dist/{ipqualityscore-ILV7TQCV.js → ipqualityscore-BHJXVTJT.js} +4 -4
- package/dist/{jina_ai-L5BH455V.js → jina_ai-EFBHTBXL.js} +5 -5
- package/dist/{jira-IGTILUZA.js → jira-HQSHAA5K.js} +5 -5
- package/dist/{langsmith-BYRX4AOF.js → langsmith-5W6SCT6F.js} +5 -5
- package/dist/{lemlist-ZGNYTIQO.js → lemlist-HJWH6UMK.js} +5 -5
- package/dist/{linear-HLGOWISN.js → linear-K7RYFYAD.js} +6 -5
- package/dist/{logsnag-5RGTMTU2.js → logsnag-4KFOHL37.js} +5 -5
- package/dist/main.js +103 -102
- package/dist/{mattermost-BONGXVC7.js → mattermost-S2BRCWLQ.js} +5 -5
- package/dist/{mem0-RUVNUPTE.js → mem0-CAW43CIC.js} +5 -5
- package/dist/{memos-TED4HI54.js → memos-TWEGPKFM.js} +8 -7
- package/dist/{metabase-ZHXHRHZK.js → metabase-MMSEPCOF.js} +5 -5
- package/dist/{mistral_ai-NGP5SHU7.js → mistral_ai-64BGZQHP.js} +5 -5
- package/dist/{mother_duck-TKVQM35M.js → mother_duck-H7PCQNZ2.js} +5 -5
- package/dist/{ngrok-BYCUJ7QV.js → ngrok-GQCUGZKJ.js} +5 -5
- package/dist/{notes-KXRNNYDW.js → notes-PFMKRO33.js} +1 -1
- package/dist/{notion-2ILYKJOO.js → notion-DQWZWP4N.js} +5 -5
- package/dist/{open_exchange_rates-JU4DC6HZ.js → open_exchange_rates-QMMD735E.js} +4 -4
- package/dist/{openai-6SOT26ZK.js → openai-W6PX32NZ.js} +5 -5
- package/dist/{opengraph_io-ZEFHV2OL.js → opengraph_io-HNDBXYNW.js} +4 -4
- package/dist/{openrouter-R4P7JL5L.js → openrouter-JJYMEAUL.js} +5 -5
- package/dist/{outline-VCTQ5V2X.js → outline-MCBNQZYY.js} +5 -5
- package/dist/{paddle-AZOAKBJS.js → paddle-D2SKLUDN.js} +5 -5
- package/dist/{perplexity-OMRLGVAT.js → perplexity-XIFMKUAE.js} +5 -5
- package/dist/{pinecone-DI62W3ZX.js → pinecone-HUFTALV2.js} +5 -5
- package/dist/{pipedrive-CW7HONYW.js → pipedrive-Y2O7QGFF.js} +5 -5
- package/dist/{polar-5DRGTXNR.js → polar-TYTOMOSR.js} +5 -5
- package/dist/{posthog-3DTHFCKE.js → posthog-43JAR3VW.js} +5 -5
- package/dist/{postmark-ME2V2XXI.js → postmark-KL2QJYSG.js} +5 -5
- package/dist/{prerender-5EAY7GDM.js → prerender-MENYM2TY.js} +4 -4
- package/dist/{pubmed-GRQUBGVA.js → pubmed-GOXUVVH5.js} +6 -5
- package/dist/{railway-FTM75TMX.js → railway-V2SID4WV.js} +3 -3
- package/dist/{readwise-IJQGV6IQ.js → readwise-CI4GIMMJ.js} +5 -5
- package/dist/{render-TMSPHRTY.js → render-SUBJ6YRZ.js} +5 -5
- package/dist/{replicate-RJCMDB7H.js → replicate-756MXPYX.js} +5 -5
- package/dist/{resend-YYN22NIL.js → resend-ZKH3BTBI.js} +5 -5
- package/dist/{rootly-7RXE4K7L.js → rootly-CD2LJHPI.js} +5 -5
- package/dist/{scrapfly-ZJJ6XM4Q.js → scrapfly-NSRHFDIQ.js} +4 -4
- package/dist/{scrapingbee-QNGEOD6D.js → scrapingbee-OQHLAVEY.js} +4 -4
- package/dist/{screenshot_fyi-SPZAABVD.js → screenshot_fyi-DVWG3AXC.js} +4 -4
- package/dist/{semantic_scholar-SDPVGDDI.js → semantic_scholar-T4A252KW.js} +5 -5
- package/dist/{sentry-SJ5NN4C4.js → sentry-546MNDJG.js} +5 -5
- package/dist/{shodan-YMGOY7KW.js → shodan-C3OON3Z3.js} +4 -4
- package/dist/{shopify-SU5ABP54.js → shopify-Y2HN2MCQ.js} +5 -5
- package/dist/{stripe-JAC425KE.js → stripe-VE3CD3AY.js} +3 -3
- package/dist/{supabase-GQ2OFVIL.js → supabase-U2SL4D63.js} +5 -5
- package/dist/{tavily-Y7MDA5CI.js → tavily-KCZHK6HE.js} +5 -5
- package/dist/{telegram-OIDT3ZLH.js → telegram-3URFBCMY.js} +4 -4
- package/dist/{telnyx-4JGMC3K7.js → telnyx-CXQ4EZUX.js} +5 -5
- package/dist/{todoist-O7S2OUGX.js → todoist-HNPWNYTD.js} +5 -5
- package/dist/{trello-3LDE4TAQ.js → trello-3W2MIXRP.js} +4 -4
- package/dist/{turso-MUQ44KCA.js → turso-2EQF7C2Z.js} +5 -5
- package/dist/{twilio-VYF3HUU6.js → twilio-4PDBJKWX.js} +6 -5
- package/dist/{umami-SVQIK26J.js → umami-5REN7TGP.js} +5 -5
- package/dist/{unsplash-333XYDCJ.js → unsplash-EIXL424F.js} +5 -5
- package/dist/{upstash_redis-IUM2HDLU.js → upstash_redis-G4LQBYHA.js} +5 -5
- package/dist/{uptimerobot-7ZRU2NJV.js → uptimerobot-KNJ3EYLY.js} +3 -3
- package/dist/{v2ex-AVSJCQPS.js → v2ex-RHJ234PZ.js} +5 -5
- package/dist/{vercel-J7RGXNSA.js → vercel-AS6NCIC7.js} +5 -5
- package/dist/{wolfram_alpha_api-6CRVUZOJ.js → wolfram_alpha_api-3G4PUJWB.js} +4 -4
- package/dist/{wordpress-THOJLPKA.js → wordpress-KNDAAUV7.js} +5 -5
- package/dist/{workos-ENTGRWF2.js → workos-R6UITSJ7.js} +5 -5
- package/dist/{zhihu-W2BXICTX.js → zhihu-AGK4HILK.js} +5 -5
- package/package.json +3 -3
- package/dist/feishu-TFIZXPIN.js +0 -231
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E6JCVKW6.js";
|
|
4
4
|
import {
|
|
5
5
|
asJsonObject,
|
|
6
6
|
booleanValue,
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
createProviderPlugin,
|
|
12
12
|
requireCredential,
|
|
13
13
|
upstreamError
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-ATK45BXV.js";
|
|
15
|
+
import "./chunk-U7B6DS2O.js";
|
|
16
16
|
import {
|
|
17
17
|
TBError,
|
|
18
18
|
external_exports
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UZM2RXZH.js";
|
|
20
20
|
import "./chunk-U67V476Y.js";
|
|
21
21
|
|
|
22
22
|
// ../plugins/src/trello/api.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAuthedClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-XYBU3WZH.js";
|
|
4
|
+
import "./chunk-E6JCVKW6.js";
|
|
5
5
|
import {
|
|
6
6
|
asJsonObject,
|
|
7
7
|
compactDefined,
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
createProviderPlugin,
|
|
12
12
|
upstreamError
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-ATK45BXV.js";
|
|
14
|
+
import "./chunk-U7B6DS2O.js";
|
|
15
15
|
import {
|
|
16
16
|
TBError,
|
|
17
17
|
external_exports
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UZM2RXZH.js";
|
|
19
19
|
import "./chunk-U67V476Y.js";
|
|
20
20
|
|
|
21
21
|
// ../plugins/src/turso/api.ts
|
|
@@ -7,14 +7,15 @@ import {
|
|
|
7
7
|
createProviderPlugin,
|
|
8
8
|
requireCredential,
|
|
9
9
|
upstreamError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ATK45BXV.js";
|
|
11
11
|
import {
|
|
12
12
|
guardedFetch
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-U7B6DS2O.js";
|
|
14
14
|
import {
|
|
15
15
|
TBError,
|
|
16
|
-
external_exports
|
|
17
|
-
|
|
16
|
+
external_exports,
|
|
17
|
+
isTBError
|
|
18
|
+
} from "./chunk-UZM2RXZH.js";
|
|
18
19
|
import "./chunk-U67V476Y.js";
|
|
19
20
|
|
|
20
21
|
// ../plugins/src/twilio/api.ts
|
|
@@ -61,7 +62,7 @@ async function request(ctx, options) {
|
|
|
61
62
|
...options.form === void 0 ? {} : { body: options.form.toString() }
|
|
62
63
|
});
|
|
63
64
|
} catch (error) {
|
|
64
|
-
if (error
|
|
65
|
+
if (isTBError(error)) throw error;
|
|
65
66
|
throw upstreamError(
|
|
66
67
|
502,
|
|
67
68
|
error instanceof Error ? `Twilio request failed: ${error.message}` : "Twilio request failed"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAuthedClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-XYBU3WZH.js";
|
|
4
|
+
import "./chunk-E6JCVKW6.js";
|
|
5
5
|
import {
|
|
6
6
|
asJsonObject,
|
|
7
7
|
trimmedText
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
createProviderPlugin,
|
|
11
11
|
upstreamError
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-ATK45BXV.js";
|
|
13
|
+
import "./chunk-U7B6DS2O.js";
|
|
14
14
|
import {
|
|
15
15
|
TBError,
|
|
16
16
|
external_exports
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UZM2RXZH.js";
|
|
18
18
|
import "./chunk-U67V476Y.js";
|
|
19
19
|
|
|
20
20
|
// ../plugins/src/umami/api.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAuthedClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-XYBU3WZH.js";
|
|
4
|
+
import "./chunk-E6JCVKW6.js";
|
|
5
5
|
import {
|
|
6
6
|
asJsonObject,
|
|
7
7
|
finiteNumber,
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
createProviderPlugin,
|
|
12
12
|
requireApiKey,
|
|
13
13
|
upstreamError
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-ATK45BXV.js";
|
|
15
|
+
import "./chunk-U7B6DS2O.js";
|
|
16
16
|
import {
|
|
17
17
|
TBError,
|
|
18
18
|
external_exports
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UZM2RXZH.js";
|
|
20
20
|
import "./chunk-U67V476Y.js";
|
|
21
21
|
|
|
22
22
|
// ../plugins/src/unsplash/api.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAuthedClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-XYBU3WZH.js";
|
|
4
|
+
import "./chunk-E6JCVKW6.js";
|
|
5
5
|
import {
|
|
6
6
|
asJsonObject,
|
|
7
7
|
trimmedText
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
createProviderPlugin,
|
|
11
11
|
requireCredential,
|
|
12
12
|
upstreamError
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-ATK45BXV.js";
|
|
14
|
+
import "./chunk-U7B6DS2O.js";
|
|
15
15
|
import {
|
|
16
16
|
TBError,
|
|
17
17
|
external_exports
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UZM2RXZH.js";
|
|
19
19
|
import "./chunk-U67V476Y.js";
|
|
20
20
|
|
|
21
21
|
// ../plugins/src/upstash_redis/api.ts
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
createProviderPlugin,
|
|
6
6
|
requireApiKey,
|
|
7
7
|
upstreamError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ATK45BXV.js";
|
|
9
9
|
import {
|
|
10
10
|
guardedFetch
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-U7B6DS2O.js";
|
|
12
12
|
import {
|
|
13
13
|
TBError,
|
|
14
14
|
external_exports
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UZM2RXZH.js";
|
|
16
16
|
import "./chunk-U67V476Y.js";
|
|
17
17
|
|
|
18
18
|
// ../plugins/src/uptimerobot/api.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAuthedClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-XYBU3WZH.js";
|
|
4
|
+
import "./chunk-E6JCVKW6.js";
|
|
5
5
|
import {
|
|
6
6
|
asJsonObject,
|
|
7
7
|
trimmedText
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
createProviderPlugin,
|
|
11
11
|
requireApiKey,
|
|
12
12
|
upstreamError
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-ATK45BXV.js";
|
|
14
|
+
import "./chunk-U7B6DS2O.js";
|
|
15
15
|
import {
|
|
16
16
|
TBError,
|
|
17
17
|
external_exports
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UZM2RXZH.js";
|
|
19
19
|
import "./chunk-U67V476Y.js";
|
|
20
20
|
|
|
21
21
|
// ../plugins/src/v2ex/api.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAuthedClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-XYBU3WZH.js";
|
|
4
|
+
import "./chunk-E6JCVKW6.js";
|
|
5
5
|
import {
|
|
6
6
|
asJsonObject,
|
|
7
7
|
booleanValue,
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
} from "./chunk-JXHMDBAY.js";
|
|
12
12
|
import {
|
|
13
13
|
createProviderPlugin
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-ATK45BXV.js";
|
|
15
|
+
import "./chunk-U7B6DS2O.js";
|
|
16
16
|
import {
|
|
17
17
|
TBError,
|
|
18
18
|
external_exports
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UZM2RXZH.js";
|
|
20
20
|
import "./chunk-U67V476Y.js";
|
|
21
21
|
|
|
22
22
|
// ../plugins/src/vercel/api.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E6JCVKW6.js";
|
|
4
4
|
import {
|
|
5
5
|
asJsonObject,
|
|
6
6
|
trimmedText
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
createProviderPlugin,
|
|
10
10
|
requireApiKey,
|
|
11
11
|
upstreamError
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-ATK45BXV.js";
|
|
13
|
+
import "./chunk-U7B6DS2O.js";
|
|
14
14
|
import {
|
|
15
15
|
TBError,
|
|
16
16
|
external_exports
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UZM2RXZH.js";
|
|
18
18
|
import "./chunk-U67V476Y.js";
|
|
19
19
|
|
|
20
20
|
// ../plugins/src/wolfram_alpha_api/api.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAuthedClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-XYBU3WZH.js";
|
|
4
|
+
import "./chunk-E6JCVKW6.js";
|
|
5
5
|
import {
|
|
6
6
|
asJsonObject,
|
|
7
7
|
compactDefined,
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
createProviderPlugin,
|
|
12
12
|
requireCredential,
|
|
13
13
|
upstreamError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ATK45BXV.js";
|
|
15
15
|
import {
|
|
16
16
|
assertPublicHttpUrl
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-U7B6DS2O.js";
|
|
18
18
|
import {
|
|
19
19
|
TBError,
|
|
20
20
|
external_exports
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-UZM2RXZH.js";
|
|
22
22
|
import "./chunk-U67V476Y.js";
|
|
23
23
|
|
|
24
24
|
// ../plugins/src/wordpress/api.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAuthedClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-XYBU3WZH.js";
|
|
4
|
+
import "./chunk-E6JCVKW6.js";
|
|
5
5
|
import {
|
|
6
6
|
compactDefined
|
|
7
7
|
} from "./chunk-JXHMDBAY.js";
|
|
8
8
|
import {
|
|
9
9
|
createProviderPlugin,
|
|
10
10
|
upstreamError
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-ATK45BXV.js";
|
|
12
|
+
import "./chunk-U7B6DS2O.js";
|
|
13
13
|
import {
|
|
14
14
|
TBError,
|
|
15
15
|
external_exports
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UZM2RXZH.js";
|
|
17
17
|
import "./chunk-U67V476Y.js";
|
|
18
18
|
|
|
19
19
|
// ../plugins/src/workos/api.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAuthedClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-XYBU3WZH.js";
|
|
4
|
+
import "./chunk-E6JCVKW6.js";
|
|
5
5
|
import {
|
|
6
6
|
asJsonObject,
|
|
7
7
|
trimmedText
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
createProviderPlugin,
|
|
11
11
|
upstreamError
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-ATK45BXV.js";
|
|
13
|
+
import "./chunk-U7B6DS2O.js";
|
|
14
14
|
import {
|
|
15
15
|
TBError,
|
|
16
16
|
external_exports
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UZM2RXZH.js";
|
|
18
18
|
import "./chunk-U67V476Y.js";
|
|
19
19
|
|
|
20
20
|
// ../plugins/src/zhihu/api.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tool-bridge/server",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"description": "tool-bridge self-hosted server: run the HTBP gateway on Node with SQLite or PostgreSQL persistence, filesystem object storage and WebSocket device channel — single container via docker run",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"ioredis": "^6.0.0",
|
|
41
41
|
"postgres": "^3.4.9",
|
|
42
42
|
"ws": "8.21.0",
|
|
43
|
-
"@tool-bridge/dashboard": "0.27.
|
|
43
|
+
"@tool-bridge/dashboard": "0.27.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/better-sqlite3": "^7.6.13",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"tsup": "^8.5.1",
|
|
50
50
|
"tsx": "^4.23.0",
|
|
51
51
|
"vitest": "^4.1.10",
|
|
52
|
-
"@tool-bridge/app": "0.20.
|
|
52
|
+
"@tool-bridge/app": "0.20.1",
|
|
53
53
|
"@tool-bridge/core": "0.1.0",
|
|
54
54
|
"@tool-bridge/plugins": "0.1.0"
|
|
55
55
|
},
|
package/dist/feishu-TFIZXPIN.js
DELETED
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createGuardedFetch
|
|
3
|
-
} from "./chunk-ZTTN6AJG.js";
|
|
4
|
-
import {
|
|
5
|
-
TBError,
|
|
6
|
-
createPlugin,
|
|
7
|
-
isTBError,
|
|
8
|
-
normalizeUpstreamError
|
|
9
|
-
} from "./chunk-MZCIPUNQ.js";
|
|
10
|
-
import "./chunk-U67V476Y.js";
|
|
11
|
-
|
|
12
|
-
// ../plugins/src/feishu/feishuMcp.ts
|
|
13
|
-
import {
|
|
14
|
-
StreamableHTTPClientTransport,
|
|
15
|
-
StreamableHTTPError
|
|
16
|
-
} from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
17
|
-
import { CfWorkerJsonSchemaValidator } from "@modelcontextprotocol/sdk/validation/cfworker";
|
|
18
|
-
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
19
|
-
var DEFAULT_MCP_URL = "https://mcp.feishu.cn/mcp";
|
|
20
|
-
var sessions = /* @__PURE__ */ new Map();
|
|
21
|
-
var feishuMcpFetch = createGuardedFetch({
|
|
22
|
-
crossOriginRedirect: "error",
|
|
23
|
-
sensitiveHeaders: ["x-lark-mcp-tat"]
|
|
24
|
-
});
|
|
25
|
-
var noStandaloneSseFetch = (input, init) => {
|
|
26
|
-
const method = init?.method ?? (input instanceof Request ? input.method : "GET");
|
|
27
|
-
if (String(method).toUpperCase() === "GET") {
|
|
28
|
-
return Promise.resolve(new Response(null, { status: 405, statusText: "Method Not Allowed" }));
|
|
29
|
-
}
|
|
30
|
-
return feishuMcpFetch(input, init);
|
|
31
|
-
};
|
|
32
|
-
function isSessionInvalid(err) {
|
|
33
|
-
return err instanceof StreamableHTTPError && (err.code === 404 || err.code === 400);
|
|
34
|
-
}
|
|
35
|
-
function isUnauthorized(err) {
|
|
36
|
-
return err instanceof StreamableHTTPError && err.code === 401;
|
|
37
|
-
}
|
|
38
|
-
async function withSession(cfg, fn) {
|
|
39
|
-
const makeTransport = (sessionId) => new StreamableHTTPClientTransport(new URL(cfg.url), {
|
|
40
|
-
fetch: noStandaloneSseFetch,
|
|
41
|
-
requestInit: {
|
|
42
|
-
headers: {
|
|
43
|
-
"X-Lark-MCP-TAT": cfg.tat,
|
|
44
|
-
"X-Lark-MCP-Allowed-Tools": cfg.allowedTools
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
...sessionId !== void 0 ? { sessionId } : {}
|
|
48
|
-
});
|
|
49
|
-
const makeClient = () => new Client(
|
|
50
|
-
{ name: "tb-plugin-feishu", version: "0.1.0" },
|
|
51
|
-
{ jsonSchemaValidator: new CfWorkerJsonSchemaValidator() }
|
|
52
|
-
);
|
|
53
|
-
const runFresh = async () => {
|
|
54
|
-
const transport = makeTransport(void 0);
|
|
55
|
-
const client = makeClient();
|
|
56
|
-
await client.connect(transport);
|
|
57
|
-
if (transport.sessionId !== void 0) {
|
|
58
|
-
sessions.set(cfg.appId, {
|
|
59
|
-
sessionId: transport.sessionId,
|
|
60
|
-
...transport.protocolVersion !== void 0 ? { protocolVersion: transport.protocolVersion } : {}
|
|
61
|
-
});
|
|
62
|
-
} else {
|
|
63
|
-
sessions.delete(cfg.appId);
|
|
64
|
-
}
|
|
65
|
-
return await fn(client);
|
|
66
|
-
};
|
|
67
|
-
const session = sessions.get(cfg.appId);
|
|
68
|
-
if (session !== void 0) {
|
|
69
|
-
const transport = makeTransport(session.sessionId);
|
|
70
|
-
const client = makeClient();
|
|
71
|
-
await client.connect(transport);
|
|
72
|
-
if (session.protocolVersion !== void 0) {
|
|
73
|
-
transport.setProtocolVersion(session.protocolVersion);
|
|
74
|
-
}
|
|
75
|
-
try {
|
|
76
|
-
return await fn(client);
|
|
77
|
-
} catch (err) {
|
|
78
|
-
if (!isSessionInvalid(err)) throw err;
|
|
79
|
-
sessions.delete(cfg.appId);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return await runFresh();
|
|
83
|
-
}
|
|
84
|
-
async function guard(fn) {
|
|
85
|
-
try {
|
|
86
|
-
return await fn();
|
|
87
|
-
} catch (err) {
|
|
88
|
-
if (isTBError(err) || isUnauthorized(err)) throw err;
|
|
89
|
-
if (err instanceof StreamableHTTPError && err.code !== void 0) {
|
|
90
|
-
throw normalizeUpstreamError({ kind: "http", status: err.code, message: err.message });
|
|
91
|
-
}
|
|
92
|
-
throw normalizeUpstreamError({
|
|
93
|
-
kind: "network",
|
|
94
|
-
message: err instanceof Error ? err.message : String(err)
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
async function listTools(cfg) {
|
|
99
|
-
return guard(async () => {
|
|
100
|
-
const res = await withSession(cfg, (c) => c.listTools());
|
|
101
|
-
if (res.tools.length === 0 && cfg.allowedTools.trim() === "") {
|
|
102
|
-
throw new TBError("unavailable", "FEISHU_ALLOWED_TOOLS \u4E3A\u7A7A:\u98DE\u4E66 MCP \u4E0D\u5BA3\u544A\u4EFB\u4F55\u5DE5\u5177", {
|
|
103
|
-
retryable: false
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
return res.tools;
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
async function callTool(cfg, name, args) {
|
|
110
|
-
return guard(async () => {
|
|
111
|
-
const res = await withSession(cfg, (c) => c.callTool({ name, arguments: args }));
|
|
112
|
-
return res;
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// ../plugins/src/feishu/tat.ts
|
|
117
|
-
var DEFAULT_AUTH_URL = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal";
|
|
118
|
-
var REFRESH_MARGIN_MS = 5 * 6e4;
|
|
119
|
-
var feishuAuthFetch = createGuardedFetch({ crossOriginRedirect: "error" });
|
|
120
|
-
var cache = /* @__PURE__ */ new Map();
|
|
121
|
-
async function tenantAccessToken(cfg, force = false) {
|
|
122
|
-
const cached = cache.get(cfg.appId);
|
|
123
|
-
if (!force && cached !== void 0 && cached.expiresAtMs - Date.now() > REFRESH_MARGIN_MS) {
|
|
124
|
-
return cached.token;
|
|
125
|
-
}
|
|
126
|
-
let resp;
|
|
127
|
-
try {
|
|
128
|
-
resp = await feishuAuthFetch(cfg.authUrl ?? DEFAULT_AUTH_URL, {
|
|
129
|
-
method: "POST",
|
|
130
|
-
headers: { "content-type": "application/json; charset=utf-8" },
|
|
131
|
-
body: JSON.stringify({ app_id: cfg.appId, app_secret: cfg.appSecret })
|
|
132
|
-
});
|
|
133
|
-
} catch (err) {
|
|
134
|
-
throw new TBError(
|
|
135
|
-
"unavailable",
|
|
136
|
-
`\u98DE\u4E66 TAT \u6362\u53D1\u7F51\u7EDC\u5931\u8D25:${err instanceof Error ? err.message : String(err)}`,
|
|
137
|
-
{ retryable: true }
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
const body = await resp.json().catch(() => null);
|
|
141
|
-
if (!resp.ok || body === null || body.code !== 0 || typeof body.tenant_access_token !== "string") {
|
|
142
|
-
throw new TBError(
|
|
143
|
-
"unavailable",
|
|
144
|
-
`\u98DE\u4E66 TAT \u6362\u53D1\u5931\u8D25:HTTP ${resp.status} code=${body?.code ?? "?"} ${body?.msg ?? ""}`.trim(),
|
|
145
|
-
{ retryable: false }
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
const expireSec = typeof body.expire === "number" ? body.expire : 0;
|
|
149
|
-
cache.set(cfg.appId, {
|
|
150
|
-
token: body.tenant_access_token,
|
|
151
|
-
expiresAtMs: Date.now() + expireSec * 1e3
|
|
152
|
-
});
|
|
153
|
-
return body.tenant_access_token;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// ../plugins/src/feishu/index.ts
|
|
157
|
-
function credentialOf(ctx) {
|
|
158
|
-
const values = ctx.credentials;
|
|
159
|
-
if (values === void 0) {
|
|
160
|
-
throw new TBError(
|
|
161
|
-
"unavailable",
|
|
162
|
-
"\u7F3A\u4E0A\u6E38\u51ED\u8BC1:\u6302\u8F7D\u8282\u70B9\u987B\u914D\u7F6E authRef,\u51ED\u8BC1\u7528 `tb secret set <name> --field app_id=... --field app_secret=...` \u5199\u5165",
|
|
163
|
-
{ retryable: false }
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
return { app_id: values.app_id, app_secret: values.app_secret };
|
|
167
|
-
}
|
|
168
|
-
function toSpec(t) {
|
|
169
|
-
const spec = { name: t.name };
|
|
170
|
-
if (t.description !== void 0) spec.description = t.description;
|
|
171
|
-
if (t.inputSchema !== void 0) spec.inputSchema = t.inputSchema;
|
|
172
|
-
if (t.annotations?.readOnlyHint === true) spec.effect = "read";
|
|
173
|
-
else if (t.annotations?.destructiveHint === true) spec.effect = "destructive";
|
|
174
|
-
return spec;
|
|
175
|
-
}
|
|
176
|
-
async function mcpConfig(env, cred, forceTat = false) {
|
|
177
|
-
const tat = await tenantAccessToken(
|
|
178
|
-
{
|
|
179
|
-
appId: cred.app_id,
|
|
180
|
-
appSecret: cred.app_secret,
|
|
181
|
-
...env.FEISHU_AUTH_URL !== void 0 ? { authUrl: env.FEISHU_AUTH_URL } : {}
|
|
182
|
-
},
|
|
183
|
-
forceTat
|
|
184
|
-
);
|
|
185
|
-
return {
|
|
186
|
-
url: env.FEISHU_MCP_URL ?? DEFAULT_MCP_URL,
|
|
187
|
-
appId: cred.app_id,
|
|
188
|
-
tat,
|
|
189
|
-
allowedTools: env.FEISHU_ALLOWED_TOOLS ?? ""
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
async function withTatRetry(ctx, fn) {
|
|
193
|
-
const cred = credentialOf(ctx);
|
|
194
|
-
try {
|
|
195
|
-
return await fn(await mcpConfig(ctx.env, cred));
|
|
196
|
-
} catch (err) {
|
|
197
|
-
if (!isUnauthorized(err)) throw err;
|
|
198
|
-
return await fn(await mcpConfig(ctx.env, cred, true));
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
function createFeishuPlugin() {
|
|
202
|
-
const plugin = createPlugin({ token: (env) => env.PLUGIN_TOKEN });
|
|
203
|
-
plugin.proxyTools("actions", {
|
|
204
|
-
description: "Feishu actions (docs, wiki, messaging) via the official MCP upstream",
|
|
205
|
-
// 飞书自建应用凭证:两个字段,由平台在挂载时校验齐全(见 core PluginExport.credentialFields)。
|
|
206
|
-
credentialFields: [
|
|
207
|
-
{
|
|
208
|
-
key: "app_id",
|
|
209
|
-
label: "App ID",
|
|
210
|
-
required: true,
|
|
211
|
-
description: "\u98DE\u4E66\u81EA\u5EFA\u5E94\u7528\u7684 app_id(\u5F00\u653E\u5E73\u53F0\u300C\u51ED\u8BC1\u4E0E\u57FA\u7840\u4FE1\u606F\u300D\u9875)"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
key: "app_secret",
|
|
215
|
-
label: "App Secret",
|
|
216
|
-
required: true,
|
|
217
|
-
secret: true,
|
|
218
|
-
description: "\u98DE\u4E66\u81EA\u5EFA\u5E94\u7528\u7684 app_secret,\u7528\u4E8E\u6362\u53D1 tenant_access_token"
|
|
219
|
-
}
|
|
220
|
-
],
|
|
221
|
-
list: async (ctx) => (await withTatRetry(ctx, listTools)).map(toSpec),
|
|
222
|
-
// MCP RPC 业务错误(isError)是正常返回值,原样进 ToolResult。
|
|
223
|
-
call: async ({ name, args }, ctx) => await withTatRetry(ctx, (cfg) => callTool(cfg, name, args))
|
|
224
|
-
});
|
|
225
|
-
return plugin;
|
|
226
|
-
}
|
|
227
|
-
var feishu_default = createFeishuPlugin();
|
|
228
|
-
export {
|
|
229
|
-
createFeishuPlugin,
|
|
230
|
-
feishu_default as default
|
|
231
|
-
};
|