@tool-bridge/server 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{airtable-V6446SVY.js → airtable-7TFNLFIF.js} +6 -4
- package/dist/{alt_text_generator_ai-HV7JZPDT.js → alt_text_generator_ai-VJSAHBJM.js} +6 -4
- package/dist/{amap-TTTVB6WS.js → amap-KZMUDGK6.js} +6 -4
- package/dist/{anthropic-JH3RA363.js → anthropic-C6FCUSY7.js} +6 -4
- package/dist/{apify-ETNN7ITU.js → apify-MUCWNIWU.js} +6 -4
- package/dist/{brave_search-3DDR2MMB.js → brave_search-NRVZ4ZNY.js} +6 -4
- package/dist/{chunk-KGYJEEBI.js → chunk-3C3J36GT.js} +106 -61
- package/dist/{chunk-CSJEZHQO.js → chunk-7GP7DRES.js} +13 -82
- package/dist/{chunk-JLTYA2B3.js → chunk-7PM4FD5K.js} +100 -71
- package/dist/{chunk-K7FVSFUX.js → chunk-B4ZA7EGO.js} +47 -3
- package/dist/chunk-FHYFPPBZ.js +90 -0
- package/dist/{circleci-MX3TX3HC.js → circleci-QY36SZIM.js} +6 -4
- package/dist/{clerk-MRPORVF4.js → clerk-ECH23XL5.js} +6 -4
- package/dist/{cloudflare_dns-OWP7DD7L.js → cloudflare_dns-F6DN2F3X.js} +6 -4
- package/dist/{cohere-GPECP66S.js → cohere-HD4XZOPJ.js} +6 -4
- package/dist/{confluence-BN7LZ6BC.js → confluence-J4AZ2KYL.js} +6 -4
- package/dist/{convertapi-SBEOFOFQ.js → convertapi-BXBII5Z6.js} +7 -5
- package/dist/{currencyapi-P2YY7Y7P.js → currencyapi-HEEQ7EQJ.js} +6 -4
- package/dist/{deepseek-MWB3NYIN.js → deepseek-RKRGIFPM.js} +6 -4
- package/dist/{docker_hub-3JSCIGQ3.js → docker_hub-YFSTEZVP.js} +6 -4
- package/dist/{dropbox-RFIBDAXO.js → dropbox-VGK634PO.js} +6 -4
- package/dist/{dub-YVP57ELQ.js → dub-GEXD3XK6.js} +6 -4
- package/dist/{e2b-NFSUHTZR.js → e2b-LPTZQEDV.js} +6 -4
- package/dist/{exa-KTDY6IV3.js → exa-VJENLTKN.js} +6 -4
- package/dist/{fal_ai-OCUENLNQ.js → fal_ai-75O63LLP.js} +6 -4
- package/dist/{feishu-5CWBQ7E5.js → feishu-FATBHGEJ.js} +12 -4
- package/dist/{feishu_custom_bot-ZJR22OK6.js → feishu_custom_bot-QFSYPOLI.js} +6 -4
- package/dist/{figma-YULGANSA.js → figma-JED3Q56H.js} +6 -4
- package/dist/{firehydrant-2V6YSYAP.js → firehydrant-7JDKFJTB.js} +6 -4
- package/dist/{fixer-LTCDB3CJ.js → fixer-ZI2JS5GU.js} +6 -4
- package/dist/{fly-IXPKMAML.js → fly-3RA7ETFP.js} +6 -4
- package/dist/{front-KRFB4M5X.js → front-X2CJXBYS.js} +6 -4
- package/dist/{geocodio-VVURKYHQ.js → geocodio-C6NHG5UJ.js} +6 -4
- package/dist/{ghost-6J2RIOUB.js → ghost-ZBFOMWQF.js} +7 -5
- package/dist/{github-5Z6KQRYH.js → github-6QM2NIP4.js} +6 -4
- package/dist/{gmail-KU4NZ7VA.js → gmail-ST3MS32S.js} +6 -4
- package/dist/{googlecalendar-X44DFFXG.js → googlecalendar-SAUTUJ3Q.js} +6 -4
- package/dist/{googledocs-WSGLPKSF.js → googledocs-2SJKS2SC.js} +6 -4
- package/dist/{grafana-4PKSSDXY.js → grafana-RP7DOS3A.js} +13 -5
- package/dist/{graphhopper-DF65ZNGK.js → graphhopper-XSDTLJTE.js} +6 -4
- package/dist/index.d.ts +43 -10
- package/dist/index.js +2 -2
- package/dist/{ip2proxy-UCAQ5P2J.js → ip2proxy-IKV5IWUI.js} +6 -4
- package/dist/{ipgeolocation_io-UX6FCA2S.js → ipgeolocation_io-NSUWUF5X.js} +6 -4
- package/dist/{ipqualityscore-MKTRXIZJ.js → ipqualityscore-ZQKL3WLC.js} +6 -4
- package/dist/{jina_ai-MRHPCSV5.js → jina_ai-F4Y7V5AS.js} +6 -4
- package/dist/{jira-EG7ZPOIW.js → jira-CYDY44ZO.js} +7 -5
- package/dist/{langsmith-FNO3RCOZ.js → langsmith-74JSSJNY.js} +19 -4
- package/dist/{lemlist-SN6BJHSG.js → lemlist-C3LKIPVN.js} +6 -4
- package/dist/{linear-H3VU4PSD.js → linear-YYGRHKJC.js} +6 -4
- package/dist/{logsnag-OY2JJT2H.js → logsnag-YBMDJ6DO.js} +6 -4
- package/dist/main.js +184 -184
- package/dist/{mattermost-C5SQ7PGD.js → mattermost-NDID4TAL.js} +7 -5
- package/dist/{mem0-LMLE5BFC.js → mem0-ASBAEBWR.js} +6 -4
- package/dist/{memos-UWFAMBZC.js → memos-76I27HCW.js} +13 -5
- package/dist/{metabase-SRYDSDJ6.js → metabase-LCPIP2DL.js} +13 -5
- package/dist/{mistral_ai-YNIJ7VDM.js → mistral_ai-YVBQ6QKO.js} +7 -5
- package/dist/{mother_duck-CPGOFEXE.js → mother_duck-J2MPBIFO.js} +6 -4
- package/dist/{ngrok-CDJFBSOM.js → ngrok-UJC2ORDH.js} +6 -4
- package/dist/{notes-DIVFH3P3.js → notes-6VWWD6RW.js} +10 -3
- package/dist/{notion-HGDKS4HK.js → notion-6LBO2KHR.js} +6 -4
- package/dist/{open_exchange_rates-COHHYJDD.js → open_exchange_rates-OGDH4ZBX.js} +6 -4
- package/dist/{openai-4TRT66GW.js → openai-IKGD5M66.js} +7 -5
- package/dist/{opengraph_io-YKVW4PXI.js → opengraph_io-CIILQ7VK.js} +7 -5
- package/dist/{openrouter-6CV7B7V5.js → openrouter-IYG5CPG5.js} +6 -4
- package/dist/{outline-YWDUK5F7.js → outline-R2UMBY4M.js} +13 -5
- package/dist/{paddle-MEU7HWDZ.js → paddle-IYWA7DOV.js} +6 -4
- package/dist/{perplexity-MRQUDBIC.js → perplexity-3TGYQWHT.js} +6 -4
- package/dist/{pinecone-JI7X2TAF.js → pinecone-TEBOW4LJ.js} +6 -4
- package/dist/{pipedrive-6JQPAW23.js → pipedrive-ZXDY753U.js} +6 -4
- package/dist/{polar-7BF56CMC.js → polar-BVZV5A4O.js} +6 -4
- package/dist/{posthog-YPU5ADEN.js → posthog-DXKAS4PJ.js} +20 -5
- package/dist/{postmark-BEU5OFKU.js → postmark-6RWFC3TD.js} +6 -4
- package/dist/{prerender-UT5GOOZH.js → prerender-YIXOTM3K.js} +6 -4
- package/dist/{pubmed-3SGOE24Q.js → pubmed-2RHSZB4E.js} +6 -4
- package/dist/{railway-CEK4GLRQ.js → railway-IF64BUE2.js} +12 -4
- package/dist/{readwise-DXQUQU67.js → readwise-5XKQZNOM.js} +6 -4
- package/dist/{render-7TGAU5AW.js → render-Q2Z66LTA.js} +6 -4
- package/dist/{replicate-VICFSQ5A.js → replicate-SOI65IJO.js} +6 -4
- package/dist/{resend-3E76WK3O.js → resend-O2BGONOO.js} +6 -4
- package/dist/{rootly-36GY46BY.js → rootly-WPQKTVU3.js} +6 -4
- package/dist/{scrapfly-VDVUYAHX.js → scrapfly-GLMBVNPG.js} +6 -4
- package/dist/{scrapingbee-3KTPMAVY.js → scrapingbee-TUER54CY.js} +6 -4
- package/dist/{screenshot_fyi-LKG62C3J.js → screenshot_fyi-4J4W5EKY.js} +6 -4
- package/dist/{semantic_scholar-4WREECYO.js → semantic_scholar-4PITOANV.js} +6 -4
- package/dist/{sentry-HUQTGXOV.js → sentry-4WURPLIE.js} +6 -4
- package/dist/{shodan-SGRKU4KS.js → shodan-G3M3LFEW.js} +6 -4
- package/dist/{shopify-YCZ4L5HT.js → shopify-72AIELMS.js} +6 -4
- package/dist/{stripe-OEBKMELB.js → stripe-7C7XVPMU.js} +6 -4
- package/dist/{supabase-I3DBY7L4.js → supabase-N4Y3YC23.js} +6 -4
- package/dist/{tavily-B2YHCNRD.js → tavily-GGLSWERP.js} +6 -4
- package/dist/{telegram-2VYJELZX.js → telegram-4RH36WYP.js} +7 -5
- package/dist/{telnyx-HHXD3CXL.js → telnyx-I2KUITFV.js} +6 -4
- package/dist/{todoist-PHFDEEIS.js → todoist-A3NX6X2Y.js} +6 -4
- package/dist/{trello-WUSAK6YN.js → trello-2GJYN7GR.js} +6 -4
- package/dist/{turso-FW56U2B3.js → turso-WKUXMTZ5.js} +6 -4
- package/dist/{twilio-M5JI7XHA.js → twilio-SSXDBOK4.js} +6 -4
- package/dist/{umami-HAYODRC4.js → umami-SBDB4GXK.js} +6 -4
- package/dist/{unsplash-EDPTNEHJ.js → unsplash-4AVC4ZGP.js} +6 -4
- package/dist/{upstash_redis-GC2CLIWD.js → upstash_redis-7XY3UHBO.js} +6 -4
- package/dist/{uptimerobot-XMSNYLIT.js → uptimerobot-QVQP3QYG.js} +6 -4
- package/dist/{v2ex-KU4ECD65.js → v2ex-ASVTIKO7.js} +6 -4
- package/dist/{vercel-THPCEFHW.js → vercel-ZQXZCGWY.js} +6 -4
- package/dist/{wolfram_alpha_api-WHHTH4GU.js → wolfram_alpha_api-RVBWQSEF.js} +6 -4
- package/dist/{wordpress-O6TQEQNF.js → wordpress-SOWKVNCX.js} +7 -5
- package/dist/{workos-A3VHHWI3.js → workos-F45INANB.js} +6 -4
- package/dist/{zhihu-BJAI64YJ.js → zhihu-5VODAGAP.js} +6 -4
- package/package.json +5 -5
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/deepseek/api.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/docker_hub/api.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/dropbox/api.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/dub/api.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/e2b/api.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/exa/api.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/fal_ai/api.ts
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createGuardedFetch
|
|
3
|
+
} from "./chunk-7GP7DRES.js";
|
|
1
4
|
import {
|
|
2
5
|
createPlugin
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-B4ZA7EGO.js";
|
|
4
7
|
import {
|
|
5
8
|
TBError,
|
|
6
9
|
isTBError,
|
|
7
10
|
normalizeUpstreamError
|
|
8
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7PM4FD5K.js";
|
|
9
12
|
import "./chunk-MLKGABMK.js";
|
|
10
13
|
|
|
11
14
|
// ../plugins/src/feishu/feishuMcp.ts
|
|
@@ -17,12 +20,16 @@ import { CfWorkerJsonSchemaValidator } from "@modelcontextprotocol/sdk/validatio
|
|
|
17
20
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
18
21
|
var DEFAULT_MCP_URL = "https://mcp.feishu.cn/mcp";
|
|
19
22
|
var sessions = /* @__PURE__ */ new Map();
|
|
23
|
+
var feishuMcpFetch = createGuardedFetch({
|
|
24
|
+
crossOriginRedirect: "error",
|
|
25
|
+
sensitiveHeaders: ["x-lark-mcp-tat"]
|
|
26
|
+
});
|
|
20
27
|
var noStandaloneSseFetch = (input, init) => {
|
|
21
28
|
const method = init?.method ?? (input instanceof Request ? input.method : "GET");
|
|
22
29
|
if (String(method).toUpperCase() === "GET") {
|
|
23
30
|
return Promise.resolve(new Response(null, { status: 405, statusText: "Method Not Allowed" }));
|
|
24
31
|
}
|
|
25
|
-
return
|
|
32
|
+
return feishuMcpFetch(input, init);
|
|
26
33
|
};
|
|
27
34
|
function isSessionInvalid(err) {
|
|
28
35
|
return err instanceof StreamableHTTPError && (err.code === 404 || err.code === 400);
|
|
@@ -111,6 +118,7 @@ async function callTool(cfg, name, args) {
|
|
|
111
118
|
// ../plugins/src/feishu/tat.ts
|
|
112
119
|
var DEFAULT_AUTH_URL = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal";
|
|
113
120
|
var REFRESH_MARGIN_MS = 5 * 6e4;
|
|
121
|
+
var feishuAuthFetch = createGuardedFetch({ crossOriginRedirect: "error" });
|
|
114
122
|
var cache = /* @__PURE__ */ new Map();
|
|
115
123
|
async function tenantAccessToken(cfg, force = false) {
|
|
116
124
|
const cached = cache.get(cfg.appId);
|
|
@@ -119,7 +127,7 @@ async function tenantAccessToken(cfg, force = false) {
|
|
|
119
127
|
}
|
|
120
128
|
let resp;
|
|
121
129
|
try {
|
|
122
|
-
resp = await
|
|
130
|
+
resp = await feishuAuthFetch(cfg.authUrl ?? DEFAULT_AUTH_URL, {
|
|
123
131
|
method: "POST",
|
|
124
132
|
headers: { "content-type": "application/json; charset=utf-8" },
|
|
125
133
|
body: JSON.stringify({ app_id: cfg.appId, app_secret: cfg.appSecret })
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireCredential,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/feishu_custom_bot/api.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/figma/api.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/firehydrant/api.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/fixer/api.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/fly/api.ts
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
external_exports
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7PM4FD5K.js";
|
|
11
13
|
import "./chunk-MLKGABMK.js";
|
|
12
14
|
|
|
13
15
|
// ../plugins/src/front/api.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/geocodio/api.ts
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
assertPublicHttpUrl,
|
|
3
2
|
createProviderPlugin,
|
|
4
|
-
guardedFetch,
|
|
5
3
|
requireCredential,
|
|
6
4
|
upstreamError
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
assertPublicHttpUrl,
|
|
8
|
+
guardedFetch
|
|
9
|
+
} from "./chunk-7GP7DRES.js";
|
|
10
|
+
import "./chunk-B4ZA7EGO.js";
|
|
9
11
|
import {
|
|
10
12
|
TBError,
|
|
11
13
|
external_exports
|
|
12
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7PM4FD5K.js";
|
|
13
15
|
import "./chunk-MLKGABMK.js";
|
|
14
16
|
|
|
15
17
|
// ../plugins/src/ghost/api.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/github/api/shared.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/gmail/api/shared.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/googlecalendar/api/shared.ts
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/googledocs/api/shared.ts
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
assertPublicHttpUrl,
|
|
3
2
|
createProviderPlugin,
|
|
4
|
-
guardedFetch,
|
|
5
3
|
requireApiKey,
|
|
6
4
|
upstreamError
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
assertPublicHttpUrl,
|
|
8
|
+
guardedFetch
|
|
9
|
+
} from "./chunk-7GP7DRES.js";
|
|
10
|
+
import "./chunk-B4ZA7EGO.js";
|
|
9
11
|
import {
|
|
10
12
|
TBError,
|
|
11
13
|
external_exports
|
|
12
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7PM4FD5K.js";
|
|
13
15
|
import "./chunk-MLKGABMK.js";
|
|
14
16
|
|
|
15
17
|
// ../plugins/src/grafana/api.ts
|
|
@@ -787,6 +789,12 @@ function createGrafanaPlugin() {
|
|
|
787
789
|
description: "Grafana",
|
|
788
790
|
actions: grafanaActions,
|
|
789
791
|
credentialProbe: "search_dashboards",
|
|
792
|
+
mountConfigFields: [{
|
|
793
|
+
key: "baseUrl",
|
|
794
|
+
label: "\u5B9E\u4F8B\u5730\u5740",
|
|
795
|
+
description: "Grafana \u5B9E\u4F8B\u6839\u5730\u5740(Cloud \u6216\u81EA\u5EFA),\u5982 https://x.grafana.net",
|
|
796
|
+
required: true
|
|
797
|
+
}],
|
|
790
798
|
handlers: {
|
|
791
799
|
list_folders: listFolders,
|
|
792
800
|
get_folder: getFolder,
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/graphhopper/api.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -211,6 +211,8 @@ type PluginOAuth = z.infer<typeof pluginOAuthSchema>;
|
|
|
211
211
|
type PluginProfile = 'tools/v1' | 'context/v1';
|
|
212
212
|
/** 单个 export 的声明。 */
|
|
213
213
|
interface PluginExport {
|
|
214
|
+
/** 明确声明无需凭证,或声明单值凭证的展示/必填语义;与 oauth/credentialFields 三选一。 */
|
|
215
|
+
auth?: PluginExportAuth;
|
|
214
216
|
capabilities?: string[];
|
|
215
217
|
/**
|
|
216
218
|
* 多字段凭证的字段声明(仅 tools/v1)。
|
|
@@ -241,6 +243,15 @@ interface PluginExport {
|
|
|
241
243
|
description?: string;
|
|
242
244
|
id: string;
|
|
243
245
|
methods?: string[];
|
|
246
|
+
/**
|
|
247
|
+
* 非凭证的挂载配置字段声明。声明了它,平台就知道该 export 挂载时还需要
|
|
248
|
+
* 哪些 `providerConfig`(如 memos 的 baseUrl),管理面据此渲染带标签的输入框、缺必填项
|
|
249
|
+
* 可在挂载前拦下 —— 此前这些需求只写在插件源码注释里,用户要到运行时才发现。
|
|
250
|
+
*
|
|
251
|
+
* 见 {@link PluginMountConfigField}:它与 `credentialFields` 是两条通道,值明文进节点记录,
|
|
252
|
+
* 故只放非密钥配置。
|
|
253
|
+
*/
|
|
254
|
+
mountConfigFields?: PluginMountConfigField[];
|
|
244
255
|
/**
|
|
245
256
|
* provider 型 OAuth2 的声明(仅 tools/v1)。
|
|
246
257
|
*
|
|
@@ -264,6 +275,34 @@ interface PluginCredentialField {
|
|
|
264
275
|
/** 敏感字段:管理面不回显、日志不打印。缺省按敏感处理。 */
|
|
265
276
|
secret?: boolean;
|
|
266
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* 非凭证挂载配置的单个字段声明(providerConfig)。
|
|
280
|
+
*
|
|
281
|
+
* 与 `PluginCredentialField` 的分工是硬边界,不是风格选择:凭证走 `authRef` → 加密的
|
|
282
|
+
* SecretStore(只写不读);这里的值明文进节点记录,`system/registry get` 会回显给任何
|
|
283
|
+
* 对该节点有 `read` 的 SK。**所以这里没有 `secret` 字段** —— 能声明"遮蔽输入"会诱导作者
|
|
284
|
+
* 把密钥放进来,而那条通道根本不加密。密钥永远走 `credentialFields`。
|
|
285
|
+
*
|
|
286
|
+
* 典型值:自建实例的 `baseUrl`/`instanceUrl`、`region`、`workspaceId`。`required` 缺省
|
|
287
|
+
* 视为**非必填**(与 providerConfig "有就用、没有走默认" 的既有语义一致;凭证字段那边
|
|
288
|
+
* 缺省是必填,方向相反是因为两者的失败代价不同 —— 少个 baseUrl 多半有云端兜底,
|
|
289
|
+
* 少个凭证字段则必然调不通)。
|
|
290
|
+
*/
|
|
291
|
+
interface PluginMountConfigField {
|
|
292
|
+
description?: string;
|
|
293
|
+
key: string;
|
|
294
|
+
label?: string;
|
|
295
|
+
required?: boolean;
|
|
296
|
+
}
|
|
297
|
+
/** export 的上游凭证形态补充;多字段与 OAuth 由既有声明表达。 */
|
|
298
|
+
type PluginExportAuth = {
|
|
299
|
+
kind: 'none';
|
|
300
|
+
} | {
|
|
301
|
+
description?: string;
|
|
302
|
+
kind: 'single';
|
|
303
|
+
label?: string;
|
|
304
|
+
required?: boolean;
|
|
305
|
+
};
|
|
267
306
|
/** `/~describe` 响应形状(v2)。 */
|
|
268
307
|
interface PluginDescribe {
|
|
269
308
|
exports: PluginExport[];
|
|
@@ -277,14 +316,8 @@ interface PluginDescribe {
|
|
|
277
316
|
* `/~describe` 生成(`@tool-bridge/plugins` 的 `catalog.generated.ts`),与插件代码同一份
|
|
278
317
|
* 构建产物 —— 故不可能陈旧,也不需要落 KV。
|
|
279
318
|
*
|
|
280
|
-
*
|
|
281
|
-
* (
|
|
282
|
-
* 让"删掉一个 plugin 后随便读一次就复活",而 7 个调用点里传 `deps` 还是传裸 store
|
|
283
|
-
* 是随手决定的 —— 同一个语义在四条链上有四种行为。
|
|
284
|
-
*
|
|
285
|
-
* 修法不是"约定读路径要传只读的东西",而是**让解析函数结构上拿不到写能力**:
|
|
286
|
-
* 下面三个函数的入参只有 catalog(纯值)与 {@link ReadOnlyStore}(只有 get)。
|
|
287
|
-
* 想在这里写库得先改签名,而那是 code review 能看见的事。
|
|
319
|
+
* 这里定的是**解析函数的能力边界**。下面三个函数的入参只有 catalog(纯值)与
|
|
320
|
+
* {@link ReadOnlyStore}(只有 get),因此 help/call 等读路径结构上不能创建或修写注册状态。
|
|
288
321
|
*/
|
|
289
322
|
|
|
290
323
|
/** 一个内置目录项:插件声明了什么,以及它的 descriptor 指纹。 */
|
|
@@ -665,7 +698,7 @@ interface DeviceInvokeRequest {
|
|
|
665
698
|
path: string;
|
|
666
699
|
tool: string;
|
|
667
700
|
}
|
|
668
|
-
/** 设备通道宿主(CF = DeviceSession DO / Docker = ws
|
|
701
|
+
/** 设备通道宿主(CF = DeviceSession DO / Docker = ws)。 */
|
|
669
702
|
interface DeviceChannel {
|
|
670
703
|
/** HTTP→WS 调用转发:结果为 DeviceCallResult 形状(设备侧 result 帧)。 */
|
|
671
704
|
invoke(deviceId: string, req: DeviceInvokeRequest): Promise<unknown>;
|
|
@@ -713,7 +746,7 @@ interface TbAppDeps {
|
|
|
713
746
|
/**
|
|
714
747
|
* 内置插件目录(descriptor)。**编译期常量**,由 `@tool-bridge/plugins` 的
|
|
715
748
|
* `catalog.generated.ts` 求值生成 —— 内置插件的目录项与它的代码是同一份构建产物,
|
|
716
|
-
* 故不会陈旧、也不落库(见 `llmdoc/
|
|
749
|
+
* 故不会陈旧、也不落库(见 `llmdoc/architecture/plugin-runtime.md`)。
|
|
717
750
|
*
|
|
718
751
|
* 与 {@link pluginBindings} **是一对**:catalog 说"声明了什么"(挂载校验、选 export、
|
|
719
752
|
* 列凭证字段),bindings 说"代码在哪"(实际调用)。装配了 binding 却没给 catalog,
|
package/dist/index.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
configFromEnv,
|
|
7
7
|
createDataObjectStore,
|
|
8
8
|
createTbServer
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-3C3J36GT.js";
|
|
10
|
+
import "./chunk-7PM4FD5K.js";
|
|
11
11
|
import "./chunk-MLKGABMK.js";
|
|
12
12
|
export {
|
|
13
13
|
DEVICE_WS_PATH,
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderPlugin,
|
|
3
|
-
guardedFetch,
|
|
4
3
|
requireApiKey,
|
|
5
4
|
upstreamError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
|
+
import {
|
|
7
|
+
guardedFetch
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
8
10
|
import {
|
|
9
11
|
TBError,
|
|
10
12
|
external_exports
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
12
14
|
import "./chunk-MLKGABMK.js";
|
|
13
15
|
|
|
14
16
|
// ../plugins/src/ip2proxy/schema.ts
|