@tool-bridge/server 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/{airtable-ZNWHIJMO.js → airtable-DMJEEGJP.js} +19 -16
  2. package/dist/{alt_text_generator_ai-X7RMDDM5.js → alt_text_generator_ai-RELFQ5FV.js} +4 -4
  3. package/dist/{amap-3VER75VH.js → amap-YSYEACKQ.js} +4 -4
  4. package/dist/{anthropic-N7NTB3UC.js → anthropic-D5X5GSYE.js} +23 -25
  5. package/dist/{apify-JB5P5AJI.js → apify-5NVFU3IZ.js} +20 -19
  6. package/dist/{brave_search-USL5OOBS.js → brave_search-X557FMGO.js} +16 -14
  7. package/dist/chunk-JEWFX6Z6.js +71 -0
  8. package/dist/{chunk-RVUERWUZ.js → chunk-MDY7K5CX.js} +748 -788
  9. package/dist/{chunk-WIGQCP6O.js → chunk-MZCIPUNQ.js} +141 -176
  10. package/dist/{chunk-6X55ALDX.js → chunk-Q74GLIDK.js} +3 -3
  11. package/dist/{chunk-6ANLYNFB.js → chunk-QR4LK3HF.js} +1 -1
  12. package/dist/{chunk-3WL6EXYX.js → chunk-ZTTN6AJG.js} +1 -1
  13. package/dist/{circleci-LBGB25LP.js → circleci-3P3QTUX2.js} +20 -24
  14. package/dist/{clerk-6RX37CNZ.js → clerk-GNMZQ2MY.js} +22 -21
  15. package/dist/{cloudflare_dns-NQGW7FHV.js → cloudflare_dns-VWZH3ZTR.js} +21 -17
  16. package/dist/{cohere-XPC2NAEW.js → cohere-C7QVIIMG.js} +19 -17
  17. package/dist/{confluence-ZUG2LT5A.js → confluence-52I37IUT.js} +16 -11
  18. package/dist/{convertapi-ZLXKWV3L.js → convertapi-3TRJ3WEO.js} +3 -3
  19. package/dist/{currencyapi-T3A3HSOD.js → currencyapi-LWEANWVI.js} +23 -26
  20. package/dist/{deepseek-NJMOD23E.js → deepseek-5U24YG4P.js} +27 -17
  21. package/dist/{docker_hub-D2MQCSJ7.js → docker_hub-CMISLRSE.js} +4 -4
  22. package/dist/{dropbox-MI6U3SOT.js → dropbox-TW4QN6FT.js} +9 -8
  23. package/dist/{dub-P2BYBYV4.js → dub-EFXGI5UH.js} +22 -19
  24. package/dist/{e2b-BGKIAE54.js → e2b-PHM63OVF.js} +20 -20
  25. package/dist/{exa-EUY7VV4C.js → exa-DYOQWURR.js} +22 -25
  26. package/dist/{fal_ai-AAOG5FYJ.js → fal_ai-VJPMCNRH.js} +18 -17
  27. package/dist/{feishu-AN5IJYOW.js → feishu-TFIZXPIN.js} +2 -2
  28. package/dist/{feishu_custom_bot-BWGMNVXF.js → feishu_custom_bot-ADSE23KU.js} +3 -3
  29. package/dist/{figma-SJSWYCGD.js → figma-4AK47AYY.js} +21 -23
  30. package/dist/{firehydrant-MOXK2PST.js → firehydrant-RGPTW4EA.js} +15 -15
  31. package/dist/{fixer-ISIDUDZU.js → fixer-OAMF4DKP.js} +4 -4
  32. package/dist/{fly-U4KPSGBF.js → fly-YB4AQD4O.js} +20 -16
  33. package/dist/{front-ZHM2YX2E.js → front-6GTVYKUM.js} +20 -23
  34. package/dist/{geocodio-SVCCAXAV.js → geocodio-YRT4K25M.js} +4 -4
  35. package/dist/{ghost-INTR7FIY.js → ghost-JCW6UIP2.js} +4 -4
  36. package/dist/{github-T275VVWR.js → github-CEGVRMNX.js} +28 -27
  37. package/dist/{gmail-KSSPOE67.js → gmail-JCMJD55P.js} +17 -17
  38. package/dist/{googlecalendar-JB5RW27L.js → googlecalendar-2EAW4MNM.js} +16 -14
  39. package/dist/{googledocs-G522PUGW.js → googledocs-YNKKBM6Q.js} +3 -3
  40. package/dist/{grafana-44ZPIV5P.js → grafana-353VSGXN.js} +24 -25
  41. package/dist/{graphhopper-2MORXLOW.js → graphhopper-H3IVJNDS.js} +4 -4
  42. package/dist/index.d.ts +31 -30
  43. package/dist/index.js +3 -3
  44. package/dist/{ip2proxy-R4K4KEMI.js → ip2proxy-DBGRWH7S.js} +4 -4
  45. package/dist/{ipgeolocation_io-H4J55OGI.js → ipgeolocation_io-5I2BDVMG.js} +4 -4
  46. package/dist/{ipqualityscore-XGID4OHA.js → ipqualityscore-ILV7TQCV.js} +4 -4
  47. package/dist/{jina_ai-7ZVDOR3Z.js → jina_ai-L5BH455V.js} +20 -21
  48. package/dist/{jira-CTIYZTT3.js → jira-IGTILUZA.js} +20 -16
  49. package/dist/{langsmith-ISP567FS.js → langsmith-BYRX4AOF.js} +25 -25
  50. package/dist/{lemlist-OGKK272F.js → lemlist-ZGNYTIQO.js} +23 -24
  51. package/dist/{linear-6JX4E3JI.js → linear-HLGOWISN.js} +3 -3
  52. package/dist/{logsnag-BVB36ZCL.js → logsnag-5RGTMTU2.js} +20 -22
  53. package/dist/main.js +102 -102
  54. package/dist/{mattermost-UECVPZGY.js → mattermost-BONGXVC7.js} +21 -17
  55. package/dist/{mem0-EUA7S2OO.js → mem0-RUVNUPTE.js} +15 -15
  56. package/dist/{memos-BYSBJRWZ.js → memos-TED4HI54.js} +36 -32
  57. package/dist/{metabase-4JXZH3YG.js → metabase-ZHXHRHZK.js} +22 -18
  58. package/dist/{mistral_ai-2C5BTBKW.js → mistral_ai-NGP5SHU7.js} +24 -21
  59. package/dist/{mother_duck-ZGNNNR3X.js → mother_duck-TKVQM35M.js} +23 -19
  60. package/dist/{ngrok-NTPGMRXI.js → ngrok-BYCUJ7QV.js} +17 -22
  61. package/dist/{notes-KGYXX6N6.js → notes-KXRNNYDW.js} +1 -1
  62. package/dist/{notion-EX3X2G7G.js → notion-2ILYKJOO.js} +20 -17
  63. package/dist/{open_exchange_rates-2V2LIGPS.js → open_exchange_rates-JU4DC6HZ.js} +4 -4
  64. package/dist/{openai-KQFQPK7Z.js → openai-6SOT26ZK.js} +22 -16
  65. package/dist/{opengraph_io-B63SEYJY.js → opengraph_io-ZEFHV2OL.js} +4 -4
  66. package/dist/{openrouter-62A4H62Q.js → openrouter-R4P7JL5L.js} +19 -14
  67. package/dist/{outline-QC33XLCK.js → outline-VCTQ5V2X.js} +18 -20
  68. package/dist/{paddle-HDZG35Y7.js → paddle-AZOAKBJS.js} +17 -15
  69. package/dist/{perplexity-M7LOMJWA.js → perplexity-OMRLGVAT.js} +19 -23
  70. package/dist/{pinecone-Y7YCJRZM.js → pinecone-DI62W3ZX.js} +19 -24
  71. package/dist/{pipedrive-FLJA62UX.js → pipedrive-CW7HONYW.js} +22 -23
  72. package/dist/{polar-AE55Q425.js → polar-5DRGTXNR.js} +19 -17
  73. package/dist/{posthog-IAY5D3YW.js → posthog-3DTHFCKE.js} +29 -24
  74. package/dist/{postmark-NMKAXDXZ.js → postmark-ME2V2XXI.js} +19 -17
  75. package/dist/{prerender-CDJM7I7N.js → prerender-5EAY7GDM.js} +4 -4
  76. package/dist/{pubmed-N437ZJOR.js → pubmed-GRQUBGVA.js} +3 -3
  77. package/dist/{railway-NBWYXCUM.js → railway-FTM75TMX.js} +3 -3
  78. package/dist/{readwise-QRO3UC3R.js → readwise-IJQGV6IQ.js} +16 -15
  79. package/dist/{render-NEW7SROG.js → render-TMSPHRTY.js} +21 -20
  80. package/dist/{replicate-73YQLRTY.js → replicate-RJCMDB7H.js} +20 -21
  81. package/dist/{resend-R5BAZFHZ.js → resend-YYN22NIL.js} +15 -11
  82. package/dist/{rootly-5BLALPCS.js → rootly-7RXE4K7L.js} +19 -18
  83. package/dist/{scrapfly-EHFLNNUZ.js → scrapfly-ZJJ6XM4Q.js} +4 -4
  84. package/dist/{scrapingbee-UXLYS72S.js → scrapingbee-QNGEOD6D.js} +4 -4
  85. package/dist/{screenshot_fyi-KC3NLTJ6.js → screenshot_fyi-SPZAABVD.js} +4 -4
  86. package/dist/{semantic_scholar-SA5OIUWA.js → semantic_scholar-SDPVGDDI.js} +21 -20
  87. package/dist/{sentry-BAE3XLJN.js → sentry-SJ5NN4C4.js} +22 -19
  88. package/dist/{shodan-FJR6MKKW.js → shodan-YMGOY7KW.js} +4 -4
  89. package/dist/{shopify-7OA6SLN5.js → shopify-SU5ABP54.js} +23 -19
  90. package/dist/{stripe-MUWDZGGF.js → stripe-JAC425KE.js} +3 -3
  91. package/dist/{supabase-SWWGNWYR.js → supabase-GQ2OFVIL.js} +18 -17
  92. package/dist/{tavily-XQNJ5EDI.js → tavily-Y7MDA5CI.js} +20 -20
  93. package/dist/{telegram-RR6JPZOG.js → telegram-OIDT3ZLH.js} +4 -4
  94. package/dist/{telnyx-7PKXOWSO.js → telnyx-4JGMC3K7.js} +19 -19
  95. package/dist/{todoist-63X5IUJE.js → todoist-O7S2OUGX.js} +18 -17
  96. package/dist/{trello-MOG63DAI.js → trello-3LDE4TAQ.js} +4 -4
  97. package/dist/{turso-ENWTSHDL.js → turso-MUQ44KCA.js} +23 -30
  98. package/dist/{twilio-FDXUN7VX.js → twilio-VYF3HUU6.js} +3 -3
  99. package/dist/{umami-TM7PROWF.js → umami-SVQIK26J.js} +23 -28
  100. package/dist/{unsplash-NWXLKSOW.js → unsplash-333XYDCJ.js} +19 -18
  101. package/dist/{upstash_redis-CUTQ5L2N.js → upstash_redis-IUM2HDLU.js} +17 -13
  102. package/dist/{uptimerobot-NNO32M3I.js → uptimerobot-7ZRU2NJV.js} +3 -3
  103. package/dist/{v2ex-24KMSWS7.js → v2ex-AVSJCQPS.js} +35 -18
  104. package/dist/{vercel-B45LPF6I.js → vercel-J7RGXNSA.js} +21 -18
  105. package/dist/{wolfram_alpha_api-DKJWVR6G.js → wolfram_alpha_api-6CRVUZOJ.js} +4 -4
  106. package/dist/{wordpress-XYFSDZXY.js → wordpress-THOJLPKA.js} +21 -17
  107. package/dist/{workos-BEM7EPHM.js → workos-ENTGRWF2.js} +26 -27
  108. package/dist/{zhihu-CFHZ4NC7.js → zhihu-W2BXICTX.js} +21 -21
  109. package/package.json +5 -5
@@ -1,25 +1,24 @@
1
1
  import {
2
- createProviderHttpClient
3
- } from "./chunk-6X55ALDX.js";
2
+ createAuthedClient
3
+ } from "./chunk-JEWFX6Z6.js";
4
+ import "./chunk-Q74GLIDK.js";
4
5
  import {
5
6
  compactDefined
6
7
  } from "./chunk-JXHMDBAY.js";
7
8
  import {
8
9
  createProviderPlugin,
9
- requireApiKey,
10
10
  upstreamError
11
- } from "./chunk-6ANLYNFB.js";
12
- import "./chunk-3WL6EXYX.js";
11
+ } from "./chunk-QR4LK3HF.js";
12
+ import "./chunk-ZTTN6AJG.js";
13
13
  import {
14
14
  TBError,
15
15
  external_exports
16
- } from "./chunk-WIGQCP6O.js";
16
+ } from "./chunk-MZCIPUNQ.js";
17
17
  import "./chunk-U67V476Y.js";
18
18
 
19
19
  // ../plugins/src/workos/api.ts
20
20
  var SERVICE = "workos";
21
21
  var API_BASE = "https://api.workos.com";
22
- var http = createProviderHttpClient({ baseUrl: `${API_BASE}/`, service: SERVICE });
23
22
  function errorMessage(payload, status) {
24
23
  const error = payload.error;
25
24
  if (error !== null && typeof error === "object" && !Array.isArray(error)) {
@@ -31,32 +30,32 @@ function errorMessage(payload, status) {
31
30
  }
32
31
  return `WorkOS \u8FD4\u56DE HTTP ${status}`;
33
32
  }
33
+ var http = createAuthedClient({
34
+ baseUrl: `${API_BASE}/`,
35
+ service: SERVICE,
36
+ auth: { kind: "bearer" },
37
+ headers: { accept: "application/json" },
38
+ mapError: ({ bodyKind, data, status }) => {
39
+ if (bodyKind === "invalid-json") {
40
+ return new TBError("unavailable", "WorkOS \u8FD4\u56DE\u4E86\u975E\u6CD5 JSON", { retryable: true });
41
+ }
42
+ const payload = bodyKind === "empty" ? {} : data !== null && typeof data === "object" && !Array.isArray(data) ? data : void 0;
43
+ return payload === void 0 ? new TBError("unavailable", "WorkOS \u8FD4\u56DE\u7684\u4E0D\u662F JSON \u5BF9\u8C61", { retryable: true }) : upstreamError(status, errorMessage(payload, status));
44
+ },
45
+ mapTransportError: ({ message }) => new TBError(
46
+ "unavailable",
47
+ message === void 0 ? "WorkOS \u8BF7\u6C42\u5931\u8D25" : `WorkOS \u8BF7\u6C42\u5931\u8D25: ${message}`,
48
+ { retryable: true }
49
+ )
50
+ });
34
51
  async function request(ctx, input) {
35
- const apiKey = requireApiKey(ctx, SERVICE);
36
- const headers = {
37
- accept: "application/json",
38
- authorization: `Bearer ${apiKey}`
39
- };
40
- const response = await http.request({
52
+ const response = await http.request(ctx, {
41
53
  method: input.method,
42
54
  path: input.path,
43
55
  // 多值过滤是重复同名键(与 Render 的逗号拼接不同)。
44
56
  query: Object.entries(input.query ?? {}),
45
- headers,
46
57
  ...input.body === void 0 ? {} : { json: input.body },
47
- invalidJsonMessage: "WorkOS \u8FD4\u56DE\u4E86\u975E\u6CD5 JSON",
48
- mapError: ({ bodyKind, data, status }) => {
49
- if (bodyKind === "invalid-json") {
50
- return new TBError("unavailable", "WorkOS \u8FD4\u56DE\u4E86\u975E\u6CD5 JSON", { retryable: true });
51
- }
52
- const payload2 = bodyKind === "empty" ? {} : data !== null && typeof data === "object" && !Array.isArray(data) ? data : void 0;
53
- return payload2 === void 0 ? new TBError("unavailable", "WorkOS \u8FD4\u56DE\u7684\u4E0D\u662F JSON \u5BF9\u8C61", { retryable: true }) : upstreamError(status, errorMessage(payload2, status));
54
- },
55
- mapTransportError: ({ message }) => new TBError(
56
- "unavailable",
57
- message === void 0 ? "WorkOS \u8BF7\u6C42\u5931\u8D25" : `WorkOS \u8BF7\u6C42\u5931\u8D25: ${message}`,
58
- { retryable: true }
59
- )
58
+ invalidJsonMessage: "WorkOS \u8FD4\u56DE\u4E86\u975E\u6CD5 JSON"
60
59
  });
61
60
  const payload = response.bodyKind === "empty" ? {} : response.data !== null && typeof response.data === "object" && !Array.isArray(response.data) ? response.data : void 0;
62
61
  if (payload === void 0) {
@@ -1,26 +1,25 @@
1
1
  import {
2
- createProviderHttpClient
3
- } from "./chunk-6X55ALDX.js";
2
+ createAuthedClient
3
+ } from "./chunk-JEWFX6Z6.js";
4
+ import "./chunk-Q74GLIDK.js";
4
5
  import {
5
6
  asJsonObject,
6
7
  trimmedText
7
8
  } from "./chunk-JXHMDBAY.js";
8
9
  import {
9
10
  createProviderPlugin,
10
- requireApiKey,
11
11
  upstreamError
12
- } from "./chunk-6ANLYNFB.js";
13
- import "./chunk-3WL6EXYX.js";
12
+ } from "./chunk-QR4LK3HF.js";
13
+ import "./chunk-ZTTN6AJG.js";
14
14
  import {
15
15
  TBError,
16
16
  external_exports
17
- } from "./chunk-WIGQCP6O.js";
17
+ } from "./chunk-MZCIPUNQ.js";
18
18
  import "./chunk-U67V476Y.js";
19
19
 
20
20
  // ../plugins/src/zhihu/api.ts
21
21
  var SERVICE = "zhihu";
22
22
  var API_BASE = "https://developer.zhihu.com";
23
- var http = createProviderHttpClient({ baseUrl: `${API_BASE}/`, service: SERVICE });
24
23
  var CODE_STATUS = {
25
24
  10001: 400,
26
25
  20001: 401,
@@ -34,25 +33,26 @@ function errorMessage(payload) {
34
33
  const nested = asJsonObject(record.error);
35
34
  return trimmedText(record.Message) ?? trimmedText(record.msg) ?? trimmedText(record.message) ?? trimmedText(nested?.message);
36
35
  }
36
+ var http = createAuthedClient({
37
+ baseUrl: `${API_BASE}/`,
38
+ service: SERVICE,
39
+ auth: { kind: "bearer" },
40
+ // 上游对 GET 也发 content-type。无 body 时它没有意义,但照搬以免改变打给上游的请求形状。
41
+ headers: { "content-type": "application/json" },
42
+ mapError: ({ bodyKind, data, status }) => bodyKind === "invalid-json" ? upstreamError(502, "\u77E5\u4E4E\u8FD4\u56DE\u4E86\u975E\u6CD5 JSON") : upstreamError(status, errorMessage(data) ?? `\u77E5\u4E4E\u8BF7\u6C42\u5931\u8D25(HTTP ${status})`),
43
+ mapTransportError: ({ message }) => upstreamError(
44
+ 502,
45
+ message === void 0 ? "\u77E5\u4E4E\u8BF7\u6C42\u5931\u8D25" : `\u77E5\u4E4E\u8BF7\u6C42\u5931\u8D25: ${message}`
46
+ )
47
+ });
37
48
  async function request(ctx, input) {
38
- const apiKey = requireApiKey(ctx, SERVICE);
39
- const response = await http.request({
49
+ const response = await http.request(ctx, {
40
50
  method: input.method ?? "GET",
41
51
  path: input.path,
42
52
  query: Object.entries(input.query ?? {}).map(([key, value]) => [key, value === void 0 ? void 0 : String(value)]),
43
- headers: {
44
- "authorization": `Bearer ${apiKey}`,
45
- // 上游对 GET 也发这个头。无 body 时它没有意义,但照搬以免改变打给上游的请求形状。
46
- "content-type": "application/json",
47
- "x-request-timestamp": String(Math.floor(Date.now() / 1e3))
48
- },
53
+ headers: { "x-request-timestamp": String(Math.floor(Date.now() / 1e3)) },
49
54
  ...input.body === void 0 ? {} : { json: input.body },
50
- invalidJsonMessage: "\u77E5\u4E4E\u8FD4\u56DE\u4E86\u975E\u6CD5 JSON",
51
- mapError: ({ bodyKind, data, status }) => bodyKind === "invalid-json" ? upstreamError(502, "\u77E5\u4E4E\u8FD4\u56DE\u4E86\u975E\u6CD5 JSON") : upstreamError(status, errorMessage(data) ?? `\u77E5\u4E4E\u8BF7\u6C42\u5931\u8D25(HTTP ${status})`),
52
- mapTransportError: ({ message }) => upstreamError(
53
- 502,
54
- message === void 0 ? "\u77E5\u4E4E\u8BF7\u6C42\u5931\u8D25" : `\u77E5\u4E4E\u8BF7\u6C42\u5931\u8D25: ${message}`
55
- )
55
+ invalidJsonMessage: "\u77E5\u4E4E\u8FD4\u56DE\u4E86\u975E\u6CD5 JSON"
56
56
  });
57
57
  const payload = response.bodyKind === "empty" ? {} : response.data;
58
58
  const code = asJsonObject(payload)?.Code;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tool-bridge/server",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
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.26.0"
43
+ "@tool-bridge/dashboard": "0.27.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/better-sqlite3": "^7.6.13",
@@ -49,9 +49,9 @@
49
49
  "tsup": "^8.5.1",
50
50
  "tsx": "^4.23.0",
51
51
  "vitest": "^4.1.10",
52
- "@tool-bridge/plugins": "0.1.0",
53
- "@tool-bridge/app": "0.19.0",
54
- "@tool-bridge/core": "0.1.0"
52
+ "@tool-bridge/app": "0.20.0",
53
+ "@tool-bridge/core": "0.1.0",
54
+ "@tool-bridge/plugins": "0.1.0"
55
55
  },
56
56
  "repository": {
57
57
  "type": "git",