@tool-bridge/server 0.12.0 → 0.13.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-E2TJFCGB.js → airtable-UNWCQOO5.js} +4 -4
- package/dist/{alt_text_generator_ai-UBV5H2N3.js → alt_text_generator_ai-7U2B7DWL.js} +4 -4
- package/dist/{amap-ASVRIYPW.js → amap-SAB3CM4I.js} +4 -4
- package/dist/{anthropic-LQSJWGV3.js → anthropic-IHWDMPTS.js} +4 -4
- package/dist/{apify-CL4YK6HT.js → apify-PJOKBSVM.js} +4 -4
- package/dist/{brave_search-WZQF2QWE.js → brave_search-UTFAT6LW.js} +4 -4
- package/dist/{chunk-P4TQJHBO.js → chunk-7KSQ6GMZ.js} +1 -1
- package/dist/{chunk-4U5OQW7F.js → chunk-EF33TVRV.js} +7 -5
- package/dist/{chunk-TXOHC56J.js → chunk-O7XJFJIP.js} +34 -33
- package/dist/{chunk-BK2ZIWLD.js → chunk-QMBAFKBX.js} +2 -2
- package/dist/{chunk-HIROW6TB.js → chunk-YZMU3Y2S.js} +1 -1
- package/dist/{circleci-EHGI2HKR.js → circleci-CYNZ4RNR.js} +4 -4
- package/dist/{clerk-OUN4SX22.js → clerk-LEO34VS5.js} +4 -4
- package/dist/{cloudflare_dns-DMU3WOPG.js → cloudflare_dns-GR2QRDOR.js} +4 -4
- package/dist/{cohere-3HDSCQIB.js → cohere-GGMHBGBX.js} +4 -4
- package/dist/{confluence-YPZXKQTQ.js → confluence-BV3HXUK5.js} +4 -4
- package/dist/{convertapi-47ENNUBY.js → convertapi-GS2YMFYF.js} +4 -4
- package/dist/{currencyapi-IX4ICDZA.js → currencyapi-PVT6NG64.js} +4 -4
- package/dist/{deepseek-SCOPJSA6.js → deepseek-N3A33XJS.js} +4 -4
- package/dist/{docker_hub-2DXJVAP4.js → docker_hub-T52LCIXM.js} +4 -4
- package/dist/{dropbox-LE2OM2SR.js → dropbox-7D5KGZWB.js} +4 -4
- package/dist/{dub-7LKKJADI.js → dub-4MYONVIJ.js} +4 -4
- package/dist/{e2b-P3EOM65Q.js → e2b-D4RJYFWX.js} +4 -4
- package/dist/{exa-AETANJQ3.js → exa-QY3FJWKM.js} +4 -4
- package/dist/{fal_ai-VWAMTEZE.js → fal_ai-KZWNB4EL.js} +4 -4
- package/dist/{feishu-VQMM3APW.js → feishu-5A2BTU5Z.js} +3 -3
- package/dist/{feishu_custom_bot-HEK63AP3.js → feishu_custom_bot-JSPSGC7F.js} +4 -4
- package/dist/{figma-7JMV3B5O.js → figma-SLJPNPIA.js} +4 -4
- package/dist/{firehydrant-SOU4P7SE.js → firehydrant-RWAQFAPG.js} +4 -4
- package/dist/{fixer-KELXNOIQ.js → fixer-KN7PNA2S.js} +4 -4
- package/dist/{fly-Y26QH6AC.js → fly-EUUMRUOA.js} +4 -4
- package/dist/{front-2RUHP54Y.js → front-NDQEA5FF.js} +4 -4
- package/dist/{geocodio-BTSXWU55.js → geocodio-43AW5OCB.js} +4 -4
- package/dist/{ghost-BA55ISIU.js → ghost-MZCUCRIB.js} +4 -4
- package/dist/{github-VUYFDSHK.js → github-2DAQEJIN.js} +4 -4
- package/dist/{gmail-3Z2WCVLT.js → gmail-XHLM4BQE.js} +4 -4
- package/dist/{googlecalendar-LZKRUXHY.js → googlecalendar-C6TQ5TPM.js} +4 -4
- package/dist/{googledocs-RBK2HMPZ.js → googledocs-PHWMCVQJ.js} +4 -4
- package/dist/{grafana-E626W3N3.js → grafana-34MZYU2V.js} +4 -4
- package/dist/{graphhopper-YNURJCFZ.js → graphhopper-X6APDY3M.js} +4 -4
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -2
- package/dist/{ip2proxy-4DAJUOUR.js → ip2proxy-AODVERWD.js} +4 -4
- package/dist/{ipgeolocation_io-3BUSFLVD.js → ipgeolocation_io-2WZ3462V.js} +4 -4
- package/dist/{ipqualityscore-7DKMRMEQ.js → ipqualityscore-AWRQEQKM.js} +4 -4
- package/dist/{jina_ai-NXXZRPT6.js → jina_ai-BTBWMSHI.js} +4 -4
- package/dist/{jira-UG7ZIKSW.js → jira-ME62KT7T.js} +4 -4
- package/dist/{langsmith-66IP4KJ6.js → langsmith-X4V62JDO.js} +4 -4
- package/dist/{lemlist-MVB4EQMS.js → lemlist-X2F4X4XI.js} +4 -4
- package/dist/{linear-6UC3AFY3.js → linear-NXXHNHYR.js} +4 -4
- package/dist/{logsnag-NFJM6O4U.js → logsnag-CMNFM5DD.js} +4 -4
- package/dist/main.js +101 -101
- package/dist/{mattermost-FTJER2B6.js → mattermost-UUPXATVV.js} +4 -4
- package/dist/{mem0-RR5ALUKD.js → mem0-J4ZT6KFD.js} +4 -4
- package/dist/{memos-WOAY3T76.js → memos-O7OLF43F.js} +4 -4
- package/dist/{metabase-ZYG7NBPU.js → metabase-LW5CT4SE.js} +4 -4
- package/dist/{mistral_ai-FTCSXHJ5.js → mistral_ai-UBPH5I2O.js} +4 -4
- package/dist/{mother_duck-ZMIGT5ZK.js → mother_duck-FSXTF7W3.js} +4 -4
- package/dist/{ngrok-TEDZ4WUB.js → ngrok-7ZEFTQFO.js} +4 -4
- package/dist/{notes-4KZGQBRF.js → notes-E2SOGAC5.js} +2 -2
- package/dist/{notion-ERLC3SKM.js → notion-6L2B5SOP.js} +4 -4
- package/dist/{open_exchange_rates-GBBHZLUS.js → open_exchange_rates-5MEDCXDA.js} +4 -4
- package/dist/{openai-24N26QWI.js → openai-DGZ4UVGN.js} +4 -4
- package/dist/{opengraph_io-MTN4TTXP.js → opengraph_io-3WZHS2G7.js} +4 -4
- package/dist/{openrouter-BK6BL7EH.js → openrouter-AEVJKGL2.js} +4 -4
- package/dist/{outline-O3LF5SNM.js → outline-NIDSWKQL.js} +4 -4
- package/dist/{paddle-IEDD5BMW.js → paddle-KXUMVYWP.js} +4 -4
- package/dist/{perplexity-HGPLFK72.js → perplexity-SGCXVRPL.js} +4 -4
- package/dist/{pinecone-FTWR4JVG.js → pinecone-TEPE2YN6.js} +4 -4
- package/dist/{pipedrive-DDMA36AB.js → pipedrive-HSLALJJF.js} +4 -4
- package/dist/{polar-YFGTOQYM.js → polar-W3MS7L3S.js} +4 -4
- package/dist/{posthog-GFEFPIH3.js → posthog-Q26LDFUB.js} +4 -4
- package/dist/{postmark-N7YCE2DZ.js → postmark-Y4CGMQ6N.js} +4 -4
- package/dist/{prerender-B77XIKL7.js → prerender-ZXDEGJFM.js} +4 -4
- package/dist/{pubmed-XAFQSOCJ.js → pubmed-M5D6VUDC.js} +4 -4
- package/dist/{railway-DJ4P5DAJ.js → railway-IMKRAE5U.js} +4 -4
- package/dist/{readwise-UNBGXBYC.js → readwise-KVO2HGRR.js} +4 -4
- package/dist/{render-Z43FLDJ3.js → render-PCF3BY2W.js} +4 -4
- package/dist/{replicate-BZAMQO7R.js → replicate-SPYM2A2X.js} +4 -4
- package/dist/{resend-MFUW2LNU.js → resend-J2VSMZEQ.js} +4 -4
- package/dist/{rootly-5CHCWRPM.js → rootly-XLVVLQ5E.js} +4 -4
- package/dist/{scrapfly-36O4IJDA.js → scrapfly-4MCQ2L3S.js} +4 -4
- package/dist/{scrapingbee-JK6HZA75.js → scrapingbee-I5B45KRL.js} +4 -4
- package/dist/{screenshot_fyi-BDEL4D53.js → screenshot_fyi-ZRVS7KGW.js} +4 -4
- package/dist/{semantic_scholar-QHHG7RWT.js → semantic_scholar-EOOCAOGH.js} +4 -4
- package/dist/{sentry-OCUW4KNC.js → sentry-NQFN5QWM.js} +4 -4
- package/dist/{shodan-5UBQ6RKP.js → shodan-NA4YQ5EF.js} +4 -4
- package/dist/{shopify-OXIMRVHL.js → shopify-SSQWQLVZ.js} +4 -4
- package/dist/{stripe-W5XRW7WG.js → stripe-4O4LFWWX.js} +4 -4
- package/dist/{supabase-DIC7ZIG7.js → supabase-L6HIG3AO.js} +4 -4
- package/dist/{tavily-NVWQPGF3.js → tavily-YIZ257JR.js} +4 -4
- package/dist/{telegram-S755MPMM.js → telegram-GCHRPOUO.js} +4 -4
- package/dist/{telnyx-MXRX75AP.js → telnyx-SAPDG42W.js} +4 -4
- package/dist/{todoist-MNVUPHIF.js → todoist-PLWNX5EV.js} +4 -4
- package/dist/{trello-T7JLVYU4.js → trello-P373RD2Z.js} +4 -4
- package/dist/{turso-JDBW2RN4.js → turso-UOK734KL.js} +4 -4
- package/dist/{twilio-EGYNUGMZ.js → twilio-QTZ5B5JF.js} +4 -4
- package/dist/{umami-QF2V23Z5.js → umami-JR24H6UL.js} +4 -4
- package/dist/{unsplash-VWTABYWL.js → unsplash-2REBXIN5.js} +4 -4
- package/dist/{upstash_redis-FKUGE73T.js → upstash_redis-JW5CLN3M.js} +4 -4
- package/dist/{uptimerobot-55LTBUWA.js → uptimerobot-T7ZY334I.js} +4 -4
- package/dist/{v2ex-LGG6X53N.js → v2ex-OZXEQ7YR.js} +4 -4
- package/dist/{vercel-VAZGWMOZ.js → vercel-IRS2BQMP.js} +4 -4
- package/dist/{wolfram_alpha_api-YLVVZTPP.js → wolfram_alpha_api-FXO3FCL6.js} +4 -4
- package/dist/{wordpress-6LDTITVV.js → wordpress-HDJP5IKC.js} +4 -4
- package/dist/{workos-ML6NIEEP.js → workos-HDXADI3J.js} +4 -4
- package/dist/{zhihu-CACG2ZNY.js → zhihu-6MRZYPMO.js} +4 -4
- package/package.json +4 -4
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/brave_search/api.ts
|
|
@@ -16830,8 +16830,8 @@ var SCOPE_BY_CMD = {
|
|
|
16830
16830
|
update: "write",
|
|
16831
16831
|
delete: "write"
|
|
16832
16832
|
};
|
|
16833
|
-
function contextScopeForCmd(
|
|
16834
|
-
return SCOPE_BY_CMD[
|
|
16833
|
+
function contextScopeForCmd(command) {
|
|
16834
|
+
return SCOPE_BY_CMD[command] ?? null;
|
|
16835
16835
|
}
|
|
16836
16836
|
var OPTS_SCHEMA = {
|
|
16837
16837
|
type: "object",
|
|
@@ -17432,7 +17432,9 @@ function deviceShellHelpModel(nodePath, shell = {}) {
|
|
|
17432
17432
|
};
|
|
17433
17433
|
return {
|
|
17434
17434
|
node: { path: nodePath, kind: "device", description: shell.description ?? SHELL_DESCRIPTION },
|
|
17435
|
-
|
|
17435
|
+
// exec 是节点下的虚拟命令叶子;HelpModel 必须宣告完整直连路径,Dashboard、CLI
|
|
17436
|
+
// 与 Agent 都直接消费该字段,不能退回只指向 shell 节点的旧信封语义。
|
|
17437
|
+
cmds: withCommandPaths(nodePath, [exec])
|
|
17436
17438
|
};
|
|
17437
17439
|
}
|
|
17438
17440
|
function deviceFsHelpModel(node, opts = {}) {
|
|
@@ -19400,8 +19402,8 @@ var SCOPE_BY_CMD2 = {
|
|
|
19400
19402
|
publish: "write",
|
|
19401
19403
|
remove: "write"
|
|
19402
19404
|
};
|
|
19403
|
-
function skillhubScopeForCmd(
|
|
19404
|
-
return SCOPE_BY_CMD2[
|
|
19405
|
+
function skillhubScopeForCmd(command) {
|
|
19406
|
+
return SCOPE_BY_CMD2[command] ?? null;
|
|
19405
19407
|
}
|
|
19406
19408
|
var OPTS_SCHEMA2 = {
|
|
19407
19409
|
type: "object",
|
|
@@ -141,7 +141,7 @@ import {
|
|
|
141
141
|
url,
|
|
142
142
|
validatePath,
|
|
143
143
|
virtualizeTools
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-EF33TVRV.js";
|
|
145
145
|
|
|
146
146
|
// src/config.ts
|
|
147
147
|
var DEFAULT_PORT = 8787;
|
|
@@ -19737,8 +19737,8 @@ async function skillhubProviderFor(node, cfg, deps, requestUrl) {
|
|
|
19737
19737
|
}
|
|
19738
19738
|
return createSkillhubProvider(objects, opts);
|
|
19739
19739
|
}
|
|
19740
|
-
async function dispatchSkillhubCmd(provider,
|
|
19741
|
-
switch (
|
|
19740
|
+
async function dispatchSkillhubCmd(provider, command, args) {
|
|
19741
|
+
switch (command.toLowerCase()) {
|
|
19742
19742
|
case "list":
|
|
19743
19743
|
return await provider.list(args.opts);
|
|
19744
19744
|
case "get":
|
|
@@ -19756,14 +19756,14 @@ async function dispatchSkillhubCmd(provider, tool, args) {
|
|
|
19756
19756
|
case "remove":
|
|
19757
19757
|
return await provider.remove(args.id);
|
|
19758
19758
|
default:
|
|
19759
|
-
throw new TBError("invalid_argument", `unknown cmd '${
|
|
19759
|
+
throw new TBError("invalid_argument", `unknown cmd '${command}'`);
|
|
19760
19760
|
}
|
|
19761
19761
|
}
|
|
19762
|
-
async function dispatchContextCmd(provider,
|
|
19762
|
+
async function dispatchContextCmd(provider, command, args) {
|
|
19763
19763
|
const unimplemented = () => {
|
|
19764
|
-
throw new TBError("invalid_argument", `unknown cmd '${
|
|
19764
|
+
throw new TBError("invalid_argument", `unknown cmd '${command}'(provider \u672A\u5B9E\u73B0)`);
|
|
19765
19765
|
};
|
|
19766
|
-
switch (
|
|
19766
|
+
switch (command.toLowerCase()) {
|
|
19767
19767
|
case "list":
|
|
19768
19768
|
if (provider.list === void 0) return unimplemented();
|
|
19769
19769
|
return await provider.list(args.path ?? "", args.opts);
|
|
@@ -19789,7 +19789,7 @@ async function dispatchContextCmd(provider, tool, args) {
|
|
|
19789
19789
|
if (provider.search === void 0) return unimplemented();
|
|
19790
19790
|
return await provider.search(args.query, args.opts);
|
|
19791
19791
|
default:
|
|
19792
|
-
throw new TBError("invalid_argument", `unknown cmd '${
|
|
19792
|
+
throw new TBError("invalid_argument", `unknown cmd '${command}'`);
|
|
19793
19793
|
}
|
|
19794
19794
|
}
|
|
19795
19795
|
async function assertContextAlive(node, cfg, registry) {
|
|
@@ -36886,7 +36886,7 @@ async function commandHelpModelFor(registry, ctx, builtins, deps, path, opts) {
|
|
|
36886
36886
|
const resolved = await registry.resolve(path).catch(() => null);
|
|
36887
36887
|
if (resolved === null || resolved.rest === "" || resolved.rest.includes("/")) return null;
|
|
36888
36888
|
const { node, rest: command } = resolved;
|
|
36889
|
-
if (!(node.kind === "builtin" || node.kind === "context" || node.kind === "skillhub")) {
|
|
36889
|
+
if (!(node.kind === "builtin" || node.kind === "context" || node.kind === "skillhub" || node.kind === "device" && node.config?.kind === "device")) {
|
|
36890
36890
|
return null;
|
|
36891
36891
|
}
|
|
36892
36892
|
const full = await helpModelFor(node, registry, ctx, builtins, deps, {
|
|
@@ -37285,17 +37285,17 @@ async function handleInvoke(c, env) {
|
|
|
37285
37285
|
if (parsed !== null && (typeof parsed !== "object" || Array.isArray(parsed))) {
|
|
37286
37286
|
throw new TBError("invalid_argument", "body must be a JSON object (command arguments)");
|
|
37287
37287
|
}
|
|
37288
|
-
return
|
|
37288
|
+
return parsed ?? {};
|
|
37289
37289
|
};
|
|
37290
37290
|
const toolMarker = deviceToolMarker(node);
|
|
37291
37291
|
if (toolMarker !== null) {
|
|
37292
37292
|
if (!check(ctx, node.path, "call").allow) {
|
|
37293
37293
|
throw new TBError("permission_denied", `no scope grants 'call' on '${node.path}'`);
|
|
37294
37294
|
}
|
|
37295
|
-
const
|
|
37295
|
+
const args2 = await readInvokeBody();
|
|
37296
37296
|
const result2 = await invokeDevice(deps, toolMarker.deviceId, {
|
|
37297
37297
|
// 帧 path 含命令叶子段:<mount 相对路径>/<命令>。
|
|
37298
|
-
path: `${relativeDevicePath(node.path, toolMarker.mountPath)}/${
|
|
37298
|
+
path: `${relativeDevicePath(node.path, toolMarker.mountPath)}/${command}`,
|
|
37299
37299
|
arguments: args2,
|
|
37300
37300
|
context: deviceCallContextFrom(ctx)
|
|
37301
37301
|
});
|
|
@@ -37305,10 +37305,10 @@ async function handleInvoke(c, env) {
|
|
|
37305
37305
|
if (!check(ctx, node.path, "call").allow) {
|
|
37306
37306
|
throw new TBError("permission_denied", `no scope grants 'call' on '${node.path}'`);
|
|
37307
37307
|
}
|
|
37308
|
-
const
|
|
37308
|
+
const args2 = await readInvokeBody();
|
|
37309
37309
|
const provider = await providerFor(node, ctx, deps);
|
|
37310
37310
|
const tools = await upstreamTools(node, provider, deps, false, (/* @__PURE__ */ new Date()).toISOString());
|
|
37311
|
-
const upstreamName = resolveUpstreamTool(node.virtualize, tools,
|
|
37311
|
+
const upstreamName = resolveUpstreamTool(node.virtualize, tools, command);
|
|
37312
37312
|
const result2 = await provider.call(upstreamName, args2);
|
|
37313
37313
|
return renderResult(result2.content, negotiate(c.req.header("accept")));
|
|
37314
37314
|
}
|
|
@@ -37316,9 +37316,9 @@ async function handleInvoke(c, env) {
|
|
|
37316
37316
|
if (!check(ctx, node.path, "call").allow) {
|
|
37317
37317
|
throw new TBError("permission_denied", `no scope grants 'call' on '${node.path}'`);
|
|
37318
37318
|
}
|
|
37319
|
-
const
|
|
37320
|
-
if (
|
|
37321
|
-
throw new TBError("invalid_argument", `unknown cmd '${
|
|
37319
|
+
const args2 = await readInvokeBody();
|
|
37320
|
+
if (command !== "exec") {
|
|
37321
|
+
throw new TBError("invalid_argument", `unknown cmd '${command}' on '${node.path}'`);
|
|
37322
37322
|
}
|
|
37323
37323
|
const result2 = await invokeDevice(deps, node.config.deviceId, {
|
|
37324
37324
|
path: "shell/exec",
|
|
@@ -37330,20 +37330,20 @@ async function handleInvoke(c, env) {
|
|
|
37330
37330
|
if (node.kind === "context" && node.config?.kind === "context") {
|
|
37331
37331
|
const cfg = node.config;
|
|
37332
37332
|
await assertContextAlive(node, cfg, registry);
|
|
37333
|
-
const
|
|
37334
|
-
const scope = contextScopeForCmd(
|
|
37333
|
+
const args2 = await readInvokeBody();
|
|
37334
|
+
const scope = contextScopeForCmd(command);
|
|
37335
37335
|
if (scope === null) {
|
|
37336
|
-
throw new TBError("invalid_argument", `unknown cmd '${
|
|
37336
|
+
throw new TBError("invalid_argument", `unknown cmd '${command}' on '${node.path}'`);
|
|
37337
37337
|
}
|
|
37338
37338
|
if (!check(ctx, node.path, scope).allow) {
|
|
37339
37339
|
throw new TBError("permission_denied", `no scope grants '${scope}' on '${node.path}'`);
|
|
37340
37340
|
}
|
|
37341
37341
|
if (cfg.readOnly === true && scope === "write") {
|
|
37342
|
-
throw new TBError("permission_denied", `readOnly \u6302\u8F7D\u62D2\u7EDD '${
|
|
37342
|
+
throw new TBError("permission_denied", `readOnly \u6302\u8F7D\u62D2\u7EDD '${command}'`);
|
|
37343
37343
|
}
|
|
37344
37344
|
if (cfg.provider === "device-fs") {
|
|
37345
37345
|
const result3 = await invokeDevice(deps, deviceIdForDeviceFs(cfg), {
|
|
37346
|
-
path: `fs/${
|
|
37346
|
+
path: `fs/${command}`,
|
|
37347
37347
|
arguments: args2,
|
|
37348
37348
|
context: deviceCallContextFrom(ctx)
|
|
37349
37349
|
});
|
|
@@ -37352,7 +37352,7 @@ async function handleInvoke(c, env) {
|
|
|
37352
37352
|
const contextMarker = deviceMarkerOf(cfg.providerConfig);
|
|
37353
37353
|
if (cfg.provider !== "r2" && cfg.provider !== "s3" && contextMarker !== null) {
|
|
37354
37354
|
const result3 = await invokeDevice(deps, contextMarker.deviceId, {
|
|
37355
|
-
path: `${relativeDevicePath(node.path, contextMarker.mountPath)}/${
|
|
37355
|
+
path: `${relativeDevicePath(node.path, contextMarker.mountPath)}/${command}`,
|
|
37356
37356
|
arguments: args2,
|
|
37357
37357
|
context: deviceCallContextFrom(ctx)
|
|
37358
37358
|
});
|
|
@@ -37361,7 +37361,7 @@ async function handleInvoke(c, env) {
|
|
|
37361
37361
|
if (cfg.provider !== "r2" && cfg.provider !== "s3") {
|
|
37362
37362
|
const local = localContext(deps, node);
|
|
37363
37363
|
if (local !== null) {
|
|
37364
|
-
const result4 = await dispatchContextCmd(local,
|
|
37364
|
+
const result4 = await dispatchContextCmd(local, command, args2);
|
|
37365
37365
|
return renderResult(result4, negotiate(c.req.header("accept")));
|
|
37366
37366
|
}
|
|
37367
37367
|
const { manifest, export: exported } = await requirePluginExport(
|
|
@@ -37381,29 +37381,29 @@ async function handleInvoke(c, env) {
|
|
|
37381
37381
|
...cfg.authRef !== void 0 ? { upstreamAuthRef: cfg.authRef } : {},
|
|
37382
37382
|
...deps.pluginBindings !== void 0 ? { bindings: deps.pluginBindings } : {}
|
|
37383
37383
|
});
|
|
37384
|
-
const result3 = await dispatchContextCmd(provider2,
|
|
37384
|
+
const result3 = await dispatchContextCmd(provider2, command, args2);
|
|
37385
37385
|
return renderResult(result3, negotiate(c.req.header("accept")));
|
|
37386
37386
|
}
|
|
37387
37387
|
const provider = await contextProviderFor(node, cfg, deps, c.req.url);
|
|
37388
|
-
const result2 = await dispatchContextCmd(provider,
|
|
37388
|
+
const result2 = await dispatchContextCmd(provider, command, args2);
|
|
37389
37389
|
return renderResult(result2, negotiate(c.req.header("accept")));
|
|
37390
37390
|
}
|
|
37391
37391
|
if (node.kind === "skillhub" && node.config?.kind === "skillhub") {
|
|
37392
37392
|
const cfg = node.config;
|
|
37393
37393
|
await assertContextAlive(node, cfg, registry);
|
|
37394
|
-
const
|
|
37395
|
-
const scope = skillhubScopeForCmd(
|
|
37394
|
+
const args2 = await readInvokeBody();
|
|
37395
|
+
const scope = skillhubScopeForCmd(command);
|
|
37396
37396
|
if (scope === null) {
|
|
37397
|
-
throw new TBError("invalid_argument", `unknown cmd '${
|
|
37397
|
+
throw new TBError("invalid_argument", `unknown cmd '${command}' on '${node.path}'`);
|
|
37398
37398
|
}
|
|
37399
37399
|
if (!check(ctx, node.path, scope).allow) {
|
|
37400
37400
|
throw new TBError("permission_denied", `no scope grants '${scope}' on '${node.path}'`);
|
|
37401
37401
|
}
|
|
37402
37402
|
if (cfg.readOnly === true && scope === "write") {
|
|
37403
|
-
throw new TBError("permission_denied", `readOnly \u6302\u8F7D\u62D2\u7EDD '${
|
|
37403
|
+
throw new TBError("permission_denied", `readOnly \u6302\u8F7D\u62D2\u7EDD '${command}'`);
|
|
37404
37404
|
}
|
|
37405
37405
|
const provider = await skillhubProviderFor(node, cfg, deps, c.req.url);
|
|
37406
|
-
const result2 = await dispatchSkillhubCmd(provider,
|
|
37406
|
+
const result2 = await dispatchSkillhubCmd(provider, command, args2);
|
|
37407
37407
|
return renderResult(result2, negotiate(c.req.header("accept")));
|
|
37408
37408
|
}
|
|
37409
37409
|
if (node.kind !== "builtin" || node.config?.kind !== "builtin") {
|
|
@@ -37412,7 +37412,8 @@ async function handleInvoke(c, env) {
|
|
|
37412
37412
|
const builtins = builtinsOf(store);
|
|
37413
37413
|
const mod = builtins.get(node.config.module);
|
|
37414
37414
|
if (!mod) throw TBError.unimplemented(`builtin module '${node.config.module}' not available`);
|
|
37415
|
-
const
|
|
37415
|
+
const args = await readInvokeBody();
|
|
37416
|
+
const cmd = command;
|
|
37416
37417
|
const spec = scopeForCmd(mod, node.path, cmd);
|
|
37417
37418
|
if (!spec) throw new TBError("invalid_argument", `unknown cmd '${cmd}' on '${node.path}'`);
|
|
37418
37419
|
if (!check(ctx, node.path, spec.scope).allow) {
|
|
@@ -38815,7 +38816,7 @@ import { join as join4 } from "path";
|
|
|
38815
38816
|
// package.json
|
|
38816
38817
|
var package_default = {
|
|
38817
38818
|
name: "@tool-bridge/server",
|
|
38818
|
-
version: "0.
|
|
38819
|
+
version: "0.13.1",
|
|
38819
38820
|
description: "tool-bridge self-hosted server: run the HTBP gateway on Node with SQLite or PostgreSQL persistence, filesystem object storage and WebSocket device channel \u2014 single container via docker run",
|
|
38820
38821
|
type: "module",
|
|
38821
38822
|
license: "MIT",
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireApiKey,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
external_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
external_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
assertPublicHttpUrl,
|
|
8
8
|
guardedFetch
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
10
|
+
import "./chunk-YZMU3Y2S.js";
|
|
11
11
|
import {
|
|
12
12
|
TBError,
|
|
13
13
|
external_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
external_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.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-QMBAFKBX.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7KSQ6GMZ.js";
|
|
9
|
+
import "./chunk-YZMU3Y2S.js";
|
|
10
10
|
import {
|
|
11
11
|
TBError,
|
|
12
12
|
external_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EF33TVRV.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
16
|
// ../plugins/src/e2b/api.ts
|