@tool-bridge/server 0.4.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-K3I4W27V.js → airtable-7TFNLFIF.js} +4 -4
- package/dist/{alt_text_generator_ai-NE5YYNW3.js → alt_text_generator_ai-VJSAHBJM.js} +4 -4
- package/dist/{amap-C2Y347XH.js → amap-KZMUDGK6.js} +4 -4
- package/dist/{anthropic-HEEOKRI7.js → anthropic-C6FCUSY7.js} +4 -4
- package/dist/{apify-4SCWADEP.js → apify-MUCWNIWU.js} +4 -4
- package/dist/{brave_search-UDLPBEMQ.js → brave_search-NRVZ4ZNY.js} +4 -4
- package/dist/{chunk-OKQUN7BC.js → chunk-3C3J36GT.js} +5 -6
- package/dist/{chunk-CYTI7JDJ.js → chunk-7GP7DRES.js} +1 -1
- package/dist/{chunk-F4O6ZRH7.js → chunk-7PM4FD5K.js} +28 -77
- package/dist/{chunk-XE34TXY6.js → chunk-B4ZA7EGO.js} +1 -1
- package/dist/{chunk-TKKRVFMK.js → chunk-FHYFPPBZ.js} +2 -2
- package/dist/{circleci-UJEIISGE.js → circleci-QY36SZIM.js} +4 -4
- package/dist/{clerk-I2I22BUO.js → clerk-ECH23XL5.js} +4 -4
- package/dist/{cloudflare_dns-5M2EY2RS.js → cloudflare_dns-F6DN2F3X.js} +4 -4
- package/dist/{cohere-XQWLOLCR.js → cohere-HD4XZOPJ.js} +4 -4
- package/dist/{confluence-JHCKTQX4.js → confluence-J4AZ2KYL.js} +4 -4
- package/dist/{convertapi-B56OVE2W.js → convertapi-BXBII5Z6.js} +4 -4
- package/dist/{currencyapi-UPOFZ5P6.js → currencyapi-HEEQ7EQJ.js} +4 -4
- package/dist/{deepseek-OS75U3HY.js → deepseek-RKRGIFPM.js} +4 -4
- package/dist/{docker_hub-LQVDQTQJ.js → docker_hub-YFSTEZVP.js} +4 -4
- package/dist/{dropbox-HWO6JJ5L.js → dropbox-VGK634PO.js} +4 -4
- package/dist/{dub-3J7YEZZ7.js → dub-GEXD3XK6.js} +4 -4
- package/dist/{e2b-KT6W4M6Y.js → e2b-LPTZQEDV.js} +4 -4
- package/dist/{exa-GWZZ6BWW.js → exa-VJENLTKN.js} +4 -4
- package/dist/{fal_ai-V4AQIJ5K.js → fal_ai-75O63LLP.js} +4 -4
- package/dist/{feishu-GLQBDJMW.js → feishu-FATBHGEJ.js} +3 -3
- package/dist/{feishu_custom_bot-TEEZ3BRW.js → feishu_custom_bot-QFSYPOLI.js} +4 -4
- package/dist/{figma-N7L3KF4A.js → figma-JED3Q56H.js} +4 -4
- package/dist/{firehydrant-WJT2MLGI.js → firehydrant-7JDKFJTB.js} +4 -4
- package/dist/{fixer-TG5NW6OA.js → fixer-ZI2JS5GU.js} +4 -4
- package/dist/{fly-LYK5NNBG.js → fly-3RA7ETFP.js} +4 -4
- package/dist/{front-MUQ4YT7O.js → front-X2CJXBYS.js} +4 -4
- package/dist/{geocodio-XXB2D3AN.js → geocodio-C6NHG5UJ.js} +4 -4
- package/dist/{ghost-MWYITKQ5.js → ghost-ZBFOMWQF.js} +4 -4
- package/dist/{github-CIBT2UB2.js → github-6QM2NIP4.js} +4 -4
- package/dist/{gmail-JZECDA2U.js → gmail-ST3MS32S.js} +4 -4
- package/dist/{googlecalendar-ICIIDGEO.js → googlecalendar-SAUTUJ3Q.js} +4 -4
- package/dist/{googledocs-AV5CHSH3.js → googledocs-2SJKS2SC.js} +4 -4
- package/dist/{grafana-SJVGZAV5.js → grafana-RP7DOS3A.js} +4 -4
- package/dist/{graphhopper-ZVBBXBHD.js → graphhopper-XSDTLJTE.js} +4 -4
- package/dist/index.d.ts +5 -11
- package/dist/index.js +2 -2
- package/dist/{ip2proxy-EJMBZ4ZQ.js → ip2proxy-IKV5IWUI.js} +4 -4
- package/dist/{ipgeolocation_io-7BP766PO.js → ipgeolocation_io-NSUWUF5X.js} +4 -4
- package/dist/{ipqualityscore-QSB62FH3.js → ipqualityscore-ZQKL3WLC.js} +4 -4
- package/dist/{jina_ai-O5GT4ZZZ.js → jina_ai-F4Y7V5AS.js} +4 -4
- package/dist/{jira-DFOD6SAV.js → jira-CYDY44ZO.js} +4 -4
- package/dist/{langsmith-B5HC4HNY.js → langsmith-74JSSJNY.js} +4 -4
- package/dist/{lemlist-63EOIXDT.js → lemlist-C3LKIPVN.js} +4 -4
- package/dist/{linear-LBQC6RCY.js → linear-YYGRHKJC.js} +4 -4
- package/dist/{logsnag-YQL67XIX.js → logsnag-YBMDJ6DO.js} +4 -4
- package/dist/main.js +101 -101
- package/dist/{mattermost-VWLKWU7X.js → mattermost-NDID4TAL.js} +4 -4
- package/dist/{mem0-2J5MMVIP.js → mem0-ASBAEBWR.js} +4 -4
- package/dist/{memos-ANAGWSHJ.js → memos-76I27HCW.js} +4 -4
- package/dist/{metabase-ONSZZ4E2.js → metabase-LCPIP2DL.js} +4 -4
- package/dist/{mistral_ai-FYNVJRRG.js → mistral_ai-YVBQ6QKO.js} +4 -4
- package/dist/{mother_duck-NRSVBZM7.js → mother_duck-J2MPBIFO.js} +4 -4
- package/dist/{ngrok-FXSVFLEE.js → ngrok-UJC2ORDH.js} +4 -4
- package/dist/{notes-VO45PFNB.js → notes-6VWWD6RW.js} +2 -2
- package/dist/{notion-AQH7ZGLG.js → notion-6LBO2KHR.js} +4 -4
- package/dist/{open_exchange_rates-G3MSI5KX.js → open_exchange_rates-OGDH4ZBX.js} +4 -4
- package/dist/{openai-SZETZOPF.js → openai-IKGD5M66.js} +4 -4
- package/dist/{opengraph_io-XNV4BFE5.js → opengraph_io-CIILQ7VK.js} +4 -4
- package/dist/{openrouter-TV5LQ55F.js → openrouter-IYG5CPG5.js} +4 -4
- package/dist/{outline-DTZCJ7NR.js → outline-R2UMBY4M.js} +4 -4
- package/dist/{paddle-T6RK3QSQ.js → paddle-IYWA7DOV.js} +4 -4
- package/dist/{perplexity-MVT3DWR2.js → perplexity-3TGYQWHT.js} +4 -4
- package/dist/{pinecone-Z4IVTJMV.js → pinecone-TEBOW4LJ.js} +4 -4
- package/dist/{pipedrive-PM2PBDDZ.js → pipedrive-ZXDY753U.js} +4 -4
- package/dist/{polar-CKXLVP45.js → polar-BVZV5A4O.js} +4 -4
- package/dist/{posthog-QTYLJI3S.js → posthog-DXKAS4PJ.js} +4 -4
- package/dist/{postmark-V6QQYQ6X.js → postmark-6RWFC3TD.js} +4 -4
- package/dist/{prerender-SQAU4FDE.js → prerender-YIXOTM3K.js} +4 -4
- package/dist/{pubmed-6ZMRZYGK.js → pubmed-2RHSZB4E.js} +4 -4
- package/dist/{railway-PJBDYQYM.js → railway-IF64BUE2.js} +4 -4
- package/dist/{readwise-KJAOWBS5.js → readwise-5XKQZNOM.js} +4 -4
- package/dist/{render-Z2YG43ZD.js → render-Q2Z66LTA.js} +4 -4
- package/dist/{replicate-AXMIH4OJ.js → replicate-SOI65IJO.js} +4 -4
- package/dist/{resend-HQBXFMOO.js → resend-O2BGONOO.js} +4 -4
- package/dist/{rootly-CJW5SJEL.js → rootly-WPQKTVU3.js} +4 -4
- package/dist/{scrapfly-7APCZZ7V.js → scrapfly-GLMBVNPG.js} +4 -4
- package/dist/{scrapingbee-HTUP6YCA.js → scrapingbee-TUER54CY.js} +4 -4
- package/dist/{screenshot_fyi-N6JAOGFQ.js → screenshot_fyi-4J4W5EKY.js} +4 -4
- package/dist/{semantic_scholar-METX5XVW.js → semantic_scholar-4PITOANV.js} +4 -4
- package/dist/{sentry-QM7OGZZK.js → sentry-4WURPLIE.js} +4 -4
- package/dist/{shodan-ZPQCN5RX.js → shodan-G3M3LFEW.js} +4 -4
- package/dist/{shopify-FPLQQJXS.js → shopify-72AIELMS.js} +4 -4
- package/dist/{stripe-NNGIPJRH.js → stripe-7C7XVPMU.js} +4 -4
- package/dist/{supabase-HKIEC7JZ.js → supabase-N4Y3YC23.js} +4 -4
- package/dist/{tavily-WMQVNVQC.js → tavily-GGLSWERP.js} +4 -4
- package/dist/{telegram-VP76Z774.js → telegram-4RH36WYP.js} +4 -4
- package/dist/{telnyx-7BGNYZMU.js → telnyx-I2KUITFV.js} +4 -4
- package/dist/{todoist-MXXO72IA.js → todoist-A3NX6X2Y.js} +4 -4
- package/dist/{trello-7RFKIFYN.js → trello-2GJYN7GR.js} +4 -4
- package/dist/{turso-SVWKUF5Y.js → turso-WKUXMTZ5.js} +4 -4
- package/dist/{twilio-WGXCKTR7.js → twilio-SSXDBOK4.js} +4 -4
- package/dist/{umami-2BB5YCC7.js → umami-SBDB4GXK.js} +4 -4
- package/dist/{unsplash-W7TX5OXX.js → unsplash-4AVC4ZGP.js} +4 -4
- package/dist/{upstash_redis-YJEWXBBX.js → upstash_redis-7XY3UHBO.js} +4 -4
- package/dist/{uptimerobot-BP4BGPOL.js → uptimerobot-QVQP3QYG.js} +4 -4
- package/dist/{v2ex-Y2ENEEYQ.js → v2ex-ASVTIKO7.js} +4 -4
- package/dist/{vercel-6EB3NZZP.js → vercel-ZQXZCGWY.js} +4 -4
- package/dist/{wolfram_alpha_api-EF3CZMNC.js → wolfram_alpha_api-RVBWQSEF.js} +4 -4
- package/dist/{wordpress-JI3YVGXG.js → wordpress-SOWKVNCX.js} +4 -4
- package/dist/{workos-YDK42RA3.js → workos-F45INANB.js} +4 -4
- package/dist/{zhihu-CNFASBUW.js → zhihu-5VODAGAP.js} +4 -4
- package/package.json +5 -5
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/airtable/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/alt_text_generator_ai/schema.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/amap/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/anthropic/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/apify/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/brave_search/api.ts
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
url,
|
|
131
131
|
validatePath,
|
|
132
132
|
virtualizeTools
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-7PM4FD5K.js";
|
|
134
134
|
|
|
135
135
|
// src/config.ts
|
|
136
136
|
var DEFAULT_PORT = 8787;
|
|
@@ -442,7 +442,7 @@ async function doBootstrap(store, adminSk, requireAdminSk) {
|
|
|
442
442
|
if (!bootstrapped) await store.put(KEY_BOOTSTRAPPED, true);
|
|
443
443
|
}
|
|
444
444
|
function runBootstrap(store, opts) {
|
|
445
|
-
return doBootstrap(store, opts?.adminSk, opts?.requireAdminSk ??
|
|
445
|
+
return doBootstrap(store, opts?.adminSk, opts?.requireAdminSk ?? true);
|
|
446
446
|
}
|
|
447
447
|
function buildDeps(opts) {
|
|
448
448
|
return {
|
|
@@ -457,8 +457,7 @@ function buildDeps(opts) {
|
|
|
457
457
|
store: opts.store,
|
|
458
458
|
probe: (manifest) => probePlugin(manifest, opts.pluginBindings),
|
|
459
459
|
fetchContract: (manifest) => fetchPluginContract(manifest, opts.pluginBindings),
|
|
460
|
-
allowInsecureHttp: opts.allowInsecureHttp
|
|
461
|
-
...opts.pluginBindings !== void 0 ? { bindings: () => [...(opts.pluginBindings ?? /* @__PURE__ */ new Map()).keys()] } : {}
|
|
460
|
+
allowInsecureHttp: opts.allowInsecureHttp
|
|
462
461
|
},
|
|
463
462
|
// federation 模块:remote host 白名单运行时存储 + env 基线。
|
|
464
463
|
federation: { store: new RemoteAllowlistStore(opts.store), base: opts.remoteAllowlistBase },
|
|
@@ -19331,7 +19330,7 @@ async function providerFor(node, ctx, deps) {
|
|
|
19331
19330
|
if (node.kind === "mcp" && node.config?.kind === "mcp") {
|
|
19332
19331
|
return createMcpProvider(node.config, deps.secrets, {
|
|
19333
19332
|
allowInsecure: insecure,
|
|
19334
|
-
//
|
|
19333
|
+
// era 判定存 StateStore(mcpera:<path>);调用结果不缓存(providers/mcp.ts)。
|
|
19335
19334
|
session: { store: deps.state, nodePath: node.path },
|
|
19336
19335
|
// auth:'oauth' 节点的托管凭证存取面(mcpoauth:*);密钥缺省 → provider 内报 unavailable。
|
|
19337
19336
|
...deps.encryptionKey !== void 0 ? { oauth: { store: deps.state, encryptionKey: deps.encryptionKey } } : {}
|
|
@@ -38337,7 +38336,7 @@ import { join as join4 } from "path";
|
|
|
38337
38336
|
// package.json
|
|
38338
38337
|
var package_default = {
|
|
38339
38338
|
name: "@tool-bridge/server",
|
|
38340
|
-
version: "0.
|
|
38339
|
+
version: "0.5.0",
|
|
38341
38340
|
description: "tool-bridge self-hosted server: run the HTBP gateway on Node with SQLite persistence, filesystem object storage and WebSocket device channel \u2014 single container via docker run",
|
|
38342
38341
|
type: "module",
|
|
38343
38342
|
license: "MIT",
|
|
@@ -15089,24 +15089,27 @@ function projectExportAuth(exported) {
|
|
|
15089
15089
|
return { kind: "fields", fields: exported.credentialFields };
|
|
15090
15090
|
}
|
|
15091
15091
|
if (exported.auth?.kind === "none") return { kind: "none" };
|
|
15092
|
+
if (exported.auth?.kind !== "single") {
|
|
15093
|
+
throw new TBError(
|
|
15094
|
+
"invalid_argument",
|
|
15095
|
+
`catalog export '${exported.id}' \u5FC5\u987B\u663E\u5F0F\u58F0\u660E auth\u3001oauth \u6216 credentialFields`
|
|
15096
|
+
);
|
|
15097
|
+
}
|
|
15092
15098
|
return {
|
|
15093
15099
|
kind: "single",
|
|
15094
|
-
|
|
15095
|
-
|
|
15096
|
-
...exported.auth
|
|
15097
|
-
...exported.auth?.description !== void 0 ? { description: exported.auth.description } : {}
|
|
15100
|
+
required: exported.auth.required ?? false,
|
|
15101
|
+
...exported.auth.label !== void 0 ? { label: exported.auth.label } : {},
|
|
15102
|
+
...exported.auth.description !== void 0 ? { description: exported.auth.description } : {}
|
|
15098
15103
|
};
|
|
15099
15104
|
}
|
|
15100
15105
|
function projectListItem(entry) {
|
|
15101
15106
|
const exports = entry.describe.exports;
|
|
15102
15107
|
const kinds = /* @__PURE__ */ new Set();
|
|
15103
|
-
const exportKinds = {};
|
|
15104
15108
|
const exportDetails = {};
|
|
15105
15109
|
for (const e of exports) {
|
|
15106
15110
|
const kind = NODE_KIND_BY_PROFILE[e.profile];
|
|
15107
15111
|
if (kind !== void 0) {
|
|
15108
15112
|
kinds.add(kind);
|
|
15109
|
-
exportKinds[e.id] = kind;
|
|
15110
15113
|
exportDetails[e.id] = {
|
|
15111
15114
|
id: e.id,
|
|
15112
15115
|
kind,
|
|
@@ -15116,20 +15119,14 @@ function projectListItem(entry) {
|
|
|
15116
15119
|
};
|
|
15117
15120
|
}
|
|
15118
15121
|
}
|
|
15119
|
-
const withFields = exports.find((e) => e.credentialFields !== void 0);
|
|
15120
|
-
const withMountConfig = exports.find((e) => e.mountConfigFields !== void 0);
|
|
15121
15122
|
const description = exports.find((e) => e.description !== void 0)?.description;
|
|
15122
15123
|
return {
|
|
15123
15124
|
id: entry.id,
|
|
15124
15125
|
digest: entry.digest,
|
|
15125
15126
|
exports: exports.map((e) => e.id),
|
|
15126
|
-
exportKinds,
|
|
15127
15127
|
exportDetails,
|
|
15128
15128
|
nodeKinds: [...kinds].sort(),
|
|
15129
|
-
|
|
15130
|
-
...description !== void 0 ? { description } : {},
|
|
15131
|
-
...withFields?.credentialFields !== void 0 ? { credentialFields: withFields.credentialFields } : {},
|
|
15132
|
-
...withMountConfig?.mountConfigFields !== void 0 ? { mountConfigFields: withMountConfig.mountConfigFields } : {}
|
|
15129
|
+
...description !== void 0 ? { description } : {}
|
|
15133
15130
|
};
|
|
15134
15131
|
}
|
|
15135
15132
|
function matches2(item, query) {
|
|
@@ -15145,7 +15142,7 @@ function catalogCmds(nodePath) {
|
|
|
15145
15142
|
path,
|
|
15146
15143
|
h: "list built-in integrations available on this host (no credentials, read scope)",
|
|
15147
15144
|
inputSchema: { type: "object", properties: { opts: LIST_OPTS_SCHEMA } },
|
|
15148
|
-
returns: "Page<CatalogListItem> \u2014 id, exports, nodeKinds,
|
|
15145
|
+
returns: "Page<CatalogListItem> \u2014 id, exports, nodeKinds, exportDetails",
|
|
15149
15146
|
scope: "read"
|
|
15150
15147
|
},
|
|
15151
15148
|
{
|
|
@@ -15505,6 +15502,12 @@ function validatePluginContract(input) {
|
|
|
15505
15502
|
throw new TBError("invalid_argument", `plugin '${manifest.id}' \u7684 export id \u91CD\u590D:'${exported.id}'`);
|
|
15506
15503
|
}
|
|
15507
15504
|
seen.add(exported.id);
|
|
15505
|
+
if (exported.auth === void 0 && exported.oauth === void 0 && exported.credentialFields === void 0) {
|
|
15506
|
+
throw new TBError(
|
|
15507
|
+
"invalid_argument",
|
|
15508
|
+
`plugin '${manifest.id}' export '${exported.id}' \u5FC5\u987B\u663E\u5F0F\u58F0\u660E auth\u3001oauth \u6216 credentialFields`
|
|
15509
|
+
);
|
|
15510
|
+
}
|
|
15508
15511
|
if (exported.auth !== void 0) {
|
|
15509
15512
|
if (exported.oauth !== void 0 || exported.credentialFields !== void 0) {
|
|
15510
15513
|
throw new TBError(
|
|
@@ -15671,14 +15674,14 @@ var authSchema = external_exports.discriminatedUnion("kind", [
|
|
|
15671
15674
|
]);
|
|
15672
15675
|
var manifestSchema = external_exports.object({
|
|
15673
15676
|
id: external_exports.string().regex(ID_RE, "id \u987B\u4E3A path-segment \u5B89\u5168\u5B57\u7B26([A-Za-z0-9._-],\u4E0D\u4EE5\u6807\u70B9\u5F00\u5934)"),
|
|
15674
|
-
protocolVersion: external_exports.string().
|
|
15677
|
+
protocolVersion: external_exports.string().refine((v) => v === PLUGIN_PROTOCOL_VERSION, {
|
|
15675
15678
|
error: `protocolVersion \u987B\u4E3A '${PLUGIN_PROTOCOL_VERSION}'`
|
|
15676
15679
|
}),
|
|
15677
15680
|
endpoint: external_exports.string().min(1),
|
|
15678
15681
|
auth: authSchema,
|
|
15679
15682
|
healthPath: external_exports.string().regex(/^\//, "healthPath \u987B\u4EE5 '/' \u5F00\u5934"),
|
|
15680
15683
|
enabled: external_exports.boolean()
|
|
15681
|
-
});
|
|
15684
|
+
}).strict();
|
|
15682
15685
|
function parsePluginManifest(value, opts = {}) {
|
|
15683
15686
|
const parsed = manifestSchema.safeParse(value);
|
|
15684
15687
|
if (!parsed.success) {
|
|
@@ -15796,15 +15799,6 @@ function pluginCmds(nodePath) {
|
|
|
15796
15799
|
inputSchema: idSchema2,
|
|
15797
15800
|
returns: "{ id, healthy, checkedAt }",
|
|
15798
15801
|
scope: "admin"
|
|
15799
|
-
},
|
|
15800
|
-
{
|
|
15801
|
-
name: "catalog",
|
|
15802
|
-
method: "POST",
|
|
15803
|
-
path,
|
|
15804
|
-
h: "list in-process plugins assembled by this host (available, not yet activated); register one via write with its endpoint value",
|
|
15805
|
-
inputSchema: { type: "object", properties: {} },
|
|
15806
|
-
returns: "{ items: Array<{ name, endpoint, registered, pluginId? }> }",
|
|
15807
|
-
scope: "admin"
|
|
15808
15802
|
}
|
|
15809
15803
|
];
|
|
15810
15804
|
}
|
|
@@ -15824,10 +15818,14 @@ function createPluginModule(deps) {
|
|
|
15824
15818
|
}
|
|
15825
15819
|
async function view(record2) {
|
|
15826
15820
|
const describe3 = await store.get(KEY_PLUGIN_META + record2.id);
|
|
15827
|
-
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
|
|
15821
|
+
if (describe3 === null) {
|
|
15822
|
+
throw new TBError(
|
|
15823
|
+
"unavailable",
|
|
15824
|
+
`plugin '${record2.id}' \u7F3A\u5C11 ~describe \u7F13\u5B58,\u8BF7\u91CD\u65B0\u6CE8\u518C`,
|
|
15825
|
+
{ retryable: false }
|
|
15826
|
+
);
|
|
15827
|
+
}
|
|
15828
|
+
return { ...projectManifest(record2), exports: describe3.exports };
|
|
15831
15829
|
}
|
|
15832
15830
|
async function revokeToken(record2) {
|
|
15833
15831
|
if (record2.tokenSkId !== void 0) await sk.delete(record2.tokenSkId);
|
|
@@ -15991,33 +15989,6 @@ function createPluginModule(deps) {
|
|
|
15991
15989
|
const record2 = await probeAndRecord(manifest);
|
|
15992
15990
|
return { id, healthy: record2.healthy, checkedAt: record2.checkedAt };
|
|
15993
15991
|
}
|
|
15994
|
-
case "catalog": {
|
|
15995
|
-
const names = deps.bindings?.() ?? [];
|
|
15996
|
-
const byEndpoint = /* @__PURE__ */ new Map();
|
|
15997
|
-
let cursor;
|
|
15998
|
-
do {
|
|
15999
|
-
const page = await store.list(KEY_PLUGIN, {
|
|
16000
|
-
limit: LIST_LIMIT_MAX,
|
|
16001
|
-
...cursor !== void 0 ? { cursor } : {}
|
|
16002
|
-
});
|
|
16003
|
-
for (const { value } of page.items) {
|
|
16004
|
-
const record2 = value;
|
|
16005
|
-
byEndpoint.set(record2.endpoint, record2.id);
|
|
16006
|
-
}
|
|
16007
|
-
cursor = page.cursor;
|
|
16008
|
-
} while (cursor !== void 0);
|
|
16009
|
-
const items = [...names].sort().map((name) => {
|
|
16010
|
-
const endpoint = `binding:${name}`;
|
|
16011
|
-
const pluginId = byEndpoint.get(endpoint);
|
|
16012
|
-
return {
|
|
16013
|
-
name,
|
|
16014
|
-
endpoint,
|
|
16015
|
-
registered: pluginId !== void 0,
|
|
16016
|
-
...pluginId !== void 0 ? { pluginId } : {}
|
|
16017
|
-
};
|
|
16018
|
-
});
|
|
16019
|
-
return { items };
|
|
16020
|
-
}
|
|
16021
15992
|
default:
|
|
16022
15993
|
throw new TBError("invalid_argument", `unknown cmd '${cmd}' on system/plugin`);
|
|
16023
15994
|
}
|
|
@@ -18247,8 +18218,7 @@ async function resolveExternalExport(store, id, nodeKind, what, exportId) {
|
|
|
18247
18218
|
}
|
|
18248
18219
|
async function resolveIntegration(store, catalog, id, nodeKind, what, exportId) {
|
|
18249
18220
|
const manifest = await store.get(KEY_PLUGIN + id);
|
|
18250
|
-
|
|
18251
|
-
if (manifest !== null && !(isBinding && catalog[id] !== void 0)) {
|
|
18221
|
+
if (manifest !== null) {
|
|
18252
18222
|
return await resolveExternalExport(store, id, nodeKind, what, exportId);
|
|
18253
18223
|
}
|
|
18254
18224
|
return resolveBuiltinExport(catalog, id, nodeKind, what, exportId);
|
|
@@ -18424,25 +18394,6 @@ function decodePluginCall(body) {
|
|
|
18424
18394
|
return parsed.data;
|
|
18425
18395
|
}
|
|
18426
18396
|
|
|
18427
|
-
// ../core/src/plugin/package.ts
|
|
18428
|
-
var PLUGIN_BUNDLE_MAX_BYTES = 5 * 1024 * 1024;
|
|
18429
|
-
var NAME_RE = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
18430
|
-
var SHA256_HEX_RE = /^[0-9a-f]{64}$/;
|
|
18431
|
-
var VERSION_RE = /^\d+\.\d+\.\d+(?:[-+.][A-Za-z0-9.-]+)?$/;
|
|
18432
|
-
var packageSchema = external_exports.object({
|
|
18433
|
-
name: external_exports.string().regex(NAME_RE, "name \u987B\u4E3A path-segment \u5B89\u5168\u5B57\u7B26([A-Za-z0-9._-],\u4E0D\u4EE5\u6807\u70B9\u5F00\u5934)"),
|
|
18434
|
-
version: external_exports.string().regex(VERSION_RE, "version \u987B\u4E3A semver(\u5982 1.2.3)"),
|
|
18435
|
-
bundleUrl: external_exports.string().min(1),
|
|
18436
|
-
sha256: external_exports.string().regex(SHA256_HEX_RE, "sha256 \u987B\u4E3A 64 \u4F4D hex \u5C0F\u5199"),
|
|
18437
|
-
protocolVersion: external_exports.string().default(PLUGIN_PROTOCOL_VERSION).refine((v) => v === PLUGIN_PROTOCOL_VERSION, {
|
|
18438
|
-
error: `protocolVersion \u987B\u4E3A '${PLUGIN_PROTOCOL_VERSION}'`
|
|
18439
|
-
}),
|
|
18440
|
-
healthPath: external_exports.string().regex(/^\//, "healthPath \u987B\u4EE5 '/' \u5F00\u5934"),
|
|
18441
|
-
description: external_exports.string().optional(),
|
|
18442
|
-
configSchema: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
18443
|
-
mountConfigSchema: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
18444
|
-
});
|
|
18445
|
-
|
|
18446
18397
|
// ../core/src/search/shortTermSql.ts
|
|
18447
18398
|
function shortTermsSql(patterns) {
|
|
18448
18399
|
return `short_terms(pattern) AS (VALUES ${patterns.map(() => "(?)").join(", ")})`;
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/circleci/api.ts
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
external_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7PM4FD5K.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
|
14
14
|
|
|
15
15
|
// ../plugins/src/clerk/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/cloudflare_dns/api.ts
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
external_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7PM4FD5K.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
|
14
14
|
|
|
15
15
|
// ../plugins/src/cohere/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireCredential,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/confluence/api.ts
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
assertPublicHttpUrl,
|
|
8
8
|
guardedFetch
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-7GP7DRES.js";
|
|
10
|
+
import "./chunk-B4ZA7EGO.js";
|
|
11
11
|
import {
|
|
12
12
|
TBError,
|
|
13
13
|
external_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7PM4FD5K.js";
|
|
15
15
|
import "./chunk-MLKGABMK.js";
|
|
16
16
|
|
|
17
17
|
// ../plugins/src/convertapi/schema.ts
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
external_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7PM4FD5K.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
|
14
14
|
|
|
15
15
|
// ../plugins/src/currencyapi/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/deepseek/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/docker_hub/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/dropbox/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/dub/api.ts
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FHYFPPBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GP7DRES.js";
|
|
9
|
+
import "./chunk-B4ZA7EGO.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PM4FD5K.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/e2b/api.ts
|