skybridge 0.0.0-dev.65b9fd6 → 0.0.0-dev.65db836

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 (87) hide show
  1. package/LICENSE +21 -0
  2. package/dist/src/server/index.d.ts +0 -1
  3. package/dist/src/server/index.js +0 -1
  4. package/dist/src/server/index.js.map +1 -1
  5. package/dist/src/server/server.js +8 -2
  6. package/dist/src/server/server.js.map +1 -1
  7. package/dist/src/server/templates/development.hbs +55 -2
  8. package/dist/src/server/templates/production.hbs +1 -1
  9. package/dist/src/server/widgetsDevServer.js +11 -3
  10. package/dist/src/server/widgetsDevServer.js.map +1 -1
  11. package/dist/src/test/widget.test.js +35 -8
  12. package/dist/src/test/widget.test.js.map +1 -1
  13. package/dist/src/web/bridges/adaptors/apps-sdk-adaptor.d.ts +13 -0
  14. package/dist/src/web/bridges/adaptors/apps-sdk-adaptor.js +33 -0
  15. package/dist/src/web/bridges/adaptors/apps-sdk-adaptor.js.map +1 -0
  16. package/dist/src/web/bridges/adaptors/mcp-app-adaptor.d.ts +16 -0
  17. package/dist/src/web/bridges/adaptors/mcp-app-adaptor.js +115 -0
  18. package/dist/src/web/bridges/adaptors/mcp-app-adaptor.js.map +1 -0
  19. package/dist/src/web/bridges/apps-sdk-bridge.d.ts +4 -2
  20. package/dist/src/web/bridges/apps-sdk-bridge.js +19 -14
  21. package/dist/src/web/bridges/apps-sdk-bridge.js.map +1 -1
  22. package/dist/src/web/bridges/hooks/use-adaptor.d.ts +2 -0
  23. package/dist/src/web/bridges/hooks/use-adaptor.js +8 -0
  24. package/dist/src/web/bridges/hooks/use-adaptor.js.map +1 -0
  25. package/dist/src/web/bridges/hooks/use-bridge.d.ts +2 -3
  26. package/dist/src/web/bridges/hooks/use-bridge.js +5 -24
  27. package/dist/src/web/bridges/hooks/use-bridge.js.map +1 -1
  28. package/dist/src/web/bridges/hooks/use-mcp-app-bridge.d.ts +3 -2
  29. package/dist/src/web/bridges/hooks/use-mcp-app-bridge.js +1 -1
  30. package/dist/src/web/bridges/hooks/use-mcp-app-bridge.js.map +1 -1
  31. package/dist/src/web/bridges/hooks/use-mcp-app-bridge.test.js +9 -26
  32. package/dist/src/web/bridges/hooks/use-mcp-app-bridge.test.js.map +1 -1
  33. package/dist/src/web/bridges/index.d.ts +1 -0
  34. package/dist/src/web/bridges/index.js +1 -0
  35. package/dist/src/web/bridges/index.js.map +1 -1
  36. package/dist/src/web/bridges/mcp-app-bridge.d.ts +19 -7
  37. package/dist/src/web/bridges/mcp-app-bridge.js +58 -26
  38. package/dist/src/web/bridges/mcp-app-bridge.js.map +1 -1
  39. package/dist/src/web/bridges/types.d.ts +57 -0
  40. package/dist/src/web/bridges/types.js +2 -0
  41. package/dist/src/web/bridges/types.js.map +1 -0
  42. package/dist/src/web/data-llm.js +4 -2
  43. package/dist/src/web/data-llm.js.map +1 -1
  44. package/dist/src/web/generate-helpers.test-d.js +4 -1
  45. package/dist/src/web/generate-helpers.test-d.js.map +1 -1
  46. package/dist/src/web/hooks/test/utils.d.ts +10 -0
  47. package/dist/src/web/hooks/test/utils.js +40 -0
  48. package/dist/src/web/hooks/test/utils.js.map +1 -0
  49. package/dist/src/web/hooks/use-call-tool.d.ts +1 -1
  50. package/dist/src/web/hooks/use-call-tool.js +12 -4
  51. package/dist/src/web/hooks/use-call-tool.js.map +1 -1
  52. package/dist/src/web/hooks/use-call-tool.test-d.js +1 -1
  53. package/dist/src/web/hooks/use-call-tool.test-d.js.map +1 -1
  54. package/dist/src/web/hooks/use-call-tool.test.js +28 -3
  55. package/dist/src/web/hooks/use-call-tool.test.js.map +1 -1
  56. package/dist/src/web/hooks/use-display-mode.d.ts +1 -1
  57. package/dist/src/web/hooks/use-display-mode.js +6 -3
  58. package/dist/src/web/hooks/use-display-mode.js.map +1 -1
  59. package/dist/src/web/hooks/use-layout.js +3 -3
  60. package/dist/src/web/hooks/use-layout.js.map +1 -1
  61. package/dist/src/web/hooks/use-layout.test.js +87 -38
  62. package/dist/src/web/hooks/use-layout.test.js.map +1 -1
  63. package/dist/src/web/hooks/use-open-external.js +5 -3
  64. package/dist/src/web/hooks/use-open-external.js.map +1 -1
  65. package/dist/src/web/hooks/use-open-external.test.js +41 -15
  66. package/dist/src/web/hooks/use-open-external.test.js.map +1 -1
  67. package/dist/src/web/hooks/use-send-follow-up-message.js +3 -6
  68. package/dist/src/web/hooks/use-send-follow-up-message.js.map +1 -1
  69. package/dist/src/web/hooks/use-tool-info.d.ts +12 -1
  70. package/dist/src/web/hooks/use-tool-info.js +15 -9
  71. package/dist/src/web/hooks/use-tool-info.js.map +1 -1
  72. package/dist/src/web/hooks/use-tool-info.test-d.js +40 -4
  73. package/dist/src/web/hooks/use-tool-info.test-d.js.map +1 -1
  74. package/dist/src/web/hooks/use-tool-info.test.js +117 -47
  75. package/dist/src/web/hooks/use-tool-info.test.js.map +1 -1
  76. package/dist/src/web/hooks/use-user.js +2 -2
  77. package/dist/src/web/hooks/use-user.js.map +1 -1
  78. package/dist/src/web/hooks/use-user.test.js +83 -34
  79. package/dist/src/web/hooks/use-user.test.js.map +1 -1
  80. package/dist/src/web/plugin/transform-data-llm.js +6 -3
  81. package/dist/src/web/plugin/transform-data-llm.js.map +1 -1
  82. package/dist/src/web/types.d.ts +3 -5
  83. package/dist/src/web/types.js.map +1 -1
  84. package/package.json +24 -26
  85. package/dist/src/server/devtoolsStaticServer.d.ts +0 -15
  86. package/dist/src/server/devtoolsStaticServer.js +0 -38
  87. package/dist/src/server/devtoolsStaticServer.js.map +0 -1
@@ -1,15 +0,0 @@
1
- import { type RequestHandler } from "express";
2
- /**
3
- * Serve the built devtools React app
4
- * This router serves static files from the devtools's dist directory.
5
- * It should be installed at the application root, like so:
6
- *
7
- * const app = express();
8
- *
9
- * if (env.NODE_ENV !== "production") {
10
- * app.use(await devtoolsStaticServer(server));
11
- * app.use(await widgetsDevServer());
12
- * ^^^^^^^^ Make sure to install the devtoolsStaticServer before the widgetsDevServer
13
- * }
14
- */
15
- export declare const devtoolsStaticServer: () => Promise<RequestHandler>;
@@ -1,38 +0,0 @@
1
- import { readFileSync } from "node:fs";
2
- import path from "node:path";
3
- import { fileURLToPath } from "node:url";
4
- import cors from "cors";
5
- import express, {} from "express";
6
- /**
7
- * Serve the built devtools React app
8
- * This router serves static files from the devtools's dist directory.
9
- * It should be installed at the application root, like so:
10
- *
11
- * const app = express();
12
- *
13
- * if (env.NODE_ENV !== "production") {
14
- * app.use(await devtoolsStaticServer(server));
15
- * app.use(await widgetsDevServer());
16
- * ^^^^^^^^ Make sure to install the devtoolsStaticServer before the widgetsDevServer
17
- * }
18
- */
19
- export const devtoolsStaticServer = async () => {
20
- const router = express.Router();
21
- const currentDir = path.dirname(fileURLToPath(import.meta.url));
22
- const devtoolsPath = path.join(currentDir, "..", "devtools");
23
- router.use(cors());
24
- router.use(express.static(devtoolsPath));
25
- router.get("/", (_req, res, next) => {
26
- const indexHtmlPath = path.join(devtoolsPath, "index.html");
27
- try {
28
- const indexHtml = readFileSync(indexHtmlPath, "utf-8");
29
- res.setHeader("Content-Type", "text/html");
30
- res.send(indexHtml);
31
- }
32
- catch (error) {
33
- next(error);
34
- }
35
- });
36
- return router;
37
- };
38
- //# sourceMappingURL=devtoolsStaticServer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"devtoolsStaticServer.js","sourceRoot":"","sources":["../../../src/server/devtoolsStaticServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAO,EAAE,EAAuB,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,IAA6B,EAAE;IACtE,MAAM,MAAM,GAAG,OAAO,CAAC,MAA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