skybridge 0.0.0-dev.66b8f6b → 0.0.0-dev.6b57ab9

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 (149) hide show
  1. package/README.md +321 -1
  2. package/dist/src/server/index.d.ts +4 -0
  3. package/dist/{server/index.d.ts → src/server/index.js} +1 -1
  4. package/dist/src/server/index.js.map +1 -0
  5. package/dist/src/server/inferUtilityTypes.d.ts +46 -0
  6. package/dist/src/server/inferUtilityTypes.js +2 -0
  7. package/dist/src/server/inferUtilityTypes.js.map +1 -0
  8. package/dist/src/server/server.d.ts +37 -0
  9. package/dist/src/server/server.js +62 -0
  10. package/dist/src/server/server.js.map +1 -0
  11. package/dist/src/server/templateHelper.d.ts +15 -0
  12. package/dist/src/server/templateHelper.js +29 -0
  13. package/dist/src/server/templateHelper.js.map +1 -0
  14. package/dist/src/server/templates/development.hbs +12 -0
  15. package/dist/src/server/templates/production.hbs +6 -0
  16. package/dist/{server → src/server}/widgetsDevServer.d.ts +5 -2
  17. package/dist/{server → src/server}/widgetsDevServer.js +5 -2
  18. package/dist/src/server/widgetsDevServer.js.map +1 -0
  19. package/dist/src/test/utils.d.ts +69 -0
  20. package/dist/src/test/utils.js +136 -0
  21. package/dist/src/test/utils.js.map +1 -0
  22. package/dist/src/test/widget.test.d.ts +1 -0
  23. package/dist/src/test/widget.test.js +90 -0
  24. package/dist/src/test/widget.test.js.map +1 -0
  25. package/dist/src/web/hooks/index.d.ts +14 -0
  26. package/dist/src/web/hooks/index.js +15 -0
  27. package/dist/src/web/hooks/index.js.map +1 -0
  28. package/dist/src/web/hooks/use-call-tool.d.ts +62 -0
  29. package/dist/src/web/hooks/use-call-tool.js +68 -0
  30. package/dist/src/web/hooks/use-call-tool.js.map +1 -0
  31. package/dist/src/web/hooks/use-call-tool.test.d.ts +1 -0
  32. package/dist/src/web/hooks/use-call-tool.test.js +163 -0
  33. package/dist/src/web/hooks/use-call-tool.test.js.map +1 -0
  34. package/dist/src/web/hooks/use-display-mode.d.ts +4 -0
  35. package/dist/src/web/hooks/use-display-mode.js +7 -0
  36. package/dist/src/web/hooks/use-display-mode.js.map +1 -0
  37. package/dist/src/web/hooks/use-display-mode.test.d.ts +1 -0
  38. package/dist/src/web/hooks/use-display-mode.test.js +40 -0
  39. package/dist/src/web/hooks/use-display-mode.test.js.map +1 -0
  40. package/dist/src/web/hooks/use-files.d.ts +10 -0
  41. package/dist/src/web/hooks/use-files.js +7 -0
  42. package/dist/src/web/hooks/use-files.js.map +1 -0
  43. package/dist/src/web/hooks/use-files.test.d.ts +1 -0
  44. package/dist/src/web/hooks/use-files.test.js +29 -0
  45. package/dist/src/web/hooks/use-files.test.js.map +1 -0
  46. package/dist/src/web/hooks/use-locale.d.ts +1 -0
  47. package/dist/src/web/hooks/use-locale.js +5 -0
  48. package/dist/src/web/hooks/use-locale.js.map +1 -0
  49. package/dist/src/web/hooks/use-locale.test.d.ts +1 -0
  50. package/dist/src/web/hooks/use-locale.test.js +21 -0
  51. package/dist/src/web/hooks/use-locale.test.js.map +1 -0
  52. package/dist/src/web/hooks/use-open-external.d.ts +1 -0
  53. package/dist/src/web/hooks/use-open-external.js +6 -0
  54. package/dist/src/web/hooks/use-open-external.js.map +1 -0
  55. package/dist/src/web/hooks/use-open-external.test.d.ts +1 -0
  56. package/dist/src/web/hooks/use-open-external.test.js +24 -0
  57. package/dist/src/web/hooks/use-open-external.test.js.map +1 -0
  58. package/dist/{web → src/web/hooks}/use-openai-global.d.ts +1 -1
  59. package/dist/{web → src/web/hooks}/use-openai-global.js +4 -2
  60. package/dist/src/web/hooks/use-openai-global.js.map +1 -0
  61. package/dist/src/web/hooks/use-request-modal.d.ts +6 -0
  62. package/dist/src/web/hooks/use-request-modal.js +9 -0
  63. package/dist/src/web/hooks/use-request-modal.js.map +1 -0
  64. package/dist/src/web/hooks/use-request-modal.test.d.ts +1 -0
  65. package/dist/src/web/hooks/use-request-modal.test.js +24 -0
  66. package/dist/src/web/hooks/use-request-modal.test.js.map +1 -0
  67. package/dist/src/web/hooks/use-send-follow-up-message.d.ts +1 -0
  68. package/dist/src/web/hooks/use-send-follow-up-message.js +11 -0
  69. package/dist/src/web/hooks/use-send-follow-up-message.js.map +1 -0
  70. package/dist/src/web/hooks/use-theme.d.ts +1 -0
  71. package/dist/src/web/hooks/use-theme.js +5 -0
  72. package/dist/src/web/hooks/use-theme.js.map +1 -0
  73. package/dist/src/web/hooks/use-theme.test.d.ts +1 -0
  74. package/dist/src/web/hooks/use-theme.test.js +26 -0
  75. package/dist/src/web/hooks/use-theme.test.js.map +1 -0
  76. package/dist/src/web/hooks/use-tool-info.d.ts +25 -0
  77. package/dist/src/web/hooks/use-tool-info.js +22 -0
  78. package/dist/src/web/hooks/use-tool-info.js.map +1 -0
  79. package/dist/src/web/hooks/use-tool-info.test-d.d.ts +1 -0
  80. package/dist/src/web/hooks/use-tool-info.test-d.js +74 -0
  81. package/dist/src/web/hooks/use-tool-info.test-d.js.map +1 -0
  82. package/dist/src/web/hooks/use-tool-info.test.d.ts +1 -0
  83. package/dist/src/web/hooks/use-tool-info.test.js +59 -0
  84. package/dist/src/web/hooks/use-tool-info.test.js.map +1 -0
  85. package/dist/src/web/hooks/use-tool-output.d.ts +4 -0
  86. package/dist/src/web/hooks/use-tool-output.js +9 -0
  87. package/dist/src/web/hooks/use-tool-output.js.map +1 -0
  88. package/dist/src/web/hooks/use-tool-response-metadata.d.ts +4 -0
  89. package/dist/src/web/hooks/use-tool-response-metadata.js +8 -0
  90. package/dist/src/web/hooks/use-tool-response-metadata.js.map +1 -0
  91. package/dist/src/web/hooks/use-user-agent.d.ts +1 -0
  92. package/dist/src/web/hooks/use-user-agent.js +5 -0
  93. package/dist/src/web/hooks/use-user-agent.js.map +1 -0
  94. package/dist/src/web/hooks/use-user-agent.test.d.ts +1 -0
  95. package/dist/src/web/hooks/use-user-agent.test.js +31 -0
  96. package/dist/src/web/hooks/use-user-agent.test.js.map +1 -0
  97. package/dist/src/web/hooks/use-widget-state.d.ts +4 -0
  98. package/dist/src/web/hooks/use-widget-state.js +30 -0
  99. package/dist/src/web/hooks/use-widget-state.js.map +1 -0
  100. package/dist/src/web/hooks/use-widget-state.test.d.ts +1 -0
  101. package/dist/src/web/hooks/use-widget-state.test.js +60 -0
  102. package/dist/src/web/hooks/use-widget-state.test.js.map +1 -0
  103. package/dist/src/web/index.d.ts +5 -0
  104. package/dist/src/web/index.js +6 -0
  105. package/dist/src/web/index.js.map +1 -0
  106. package/dist/src/web/mount-widget.js +19 -0
  107. package/dist/src/web/mount-widget.js.map +1 -0
  108. package/dist/src/web/plugin.d.ts +2 -0
  109. package/dist/src/web/plugin.js +28 -0
  110. package/dist/src/web/plugin.js.map +1 -0
  111. package/dist/src/web/proxy.d.ts +1 -0
  112. package/dist/src/web/proxy.js +48 -0
  113. package/dist/src/web/proxy.js.map +1 -0
  114. package/dist/src/web/typed-hooks.d.ts +107 -0
  115. package/dist/src/web/typed-hooks.js +111 -0
  116. package/dist/src/web/typed-hooks.js.map +1 -0
  117. package/dist/src/web/typed-hooks.test-d.d.ts +1 -0
  118. package/dist/src/web/typed-hooks.test-d.js +87 -0
  119. package/dist/src/web/typed-hooks.test-d.js.map +1 -0
  120. package/dist/src/web/typed-hooks.test.d.ts +1 -0
  121. package/dist/src/web/typed-hooks.test.js +17 -0
  122. package/dist/src/web/typed-hooks.test.js.map +1 -0
  123. package/dist/{web → src/web}/types.d.ts +39 -15
  124. package/dist/src/web/types.js.map +1 -0
  125. package/dist/vitest.config.d.ts +2 -0
  126. package/dist/vitest.config.js +8 -0
  127. package/dist/vitest.config.js.map +1 -0
  128. package/package.json +26 -12
  129. package/dist/server/index.js +0 -4
  130. package/dist/server/index.js.map +0 -1
  131. package/dist/server/middleware.d.ts +0 -3
  132. package/dist/server/middleware.js +0 -47
  133. package/dist/server/middleware.js.map +0 -1
  134. package/dist/server/server.d.ts +0 -12
  135. package/dist/server/server.js +0 -70
  136. package/dist/server/server.js.map +0 -1
  137. package/dist/server/widgetsDevServer.js.map +0 -1
  138. package/dist/web/index.d.ts +0 -4
  139. package/dist/web/index.js +0 -5
  140. package/dist/web/index.js.map +0 -1
  141. package/dist/web/mount-widget.js +0 -10
  142. package/dist/web/mount-widget.js.map +0 -1
  143. package/dist/web/types.js.map +0 -1
  144. package/dist/web/use-openai-global.js.map +0 -1
  145. package/dist/web/use-tool-output.d.ts +0 -3
  146. package/dist/web/use-tool-output.js +0 -5
  147. package/dist/web/use-tool-output.js.map +0 -1
  148. /package/dist/{web → src/web}/mount-widget.d.ts +0 -0
  149. /package/dist/{web → src/web}/types.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typed-hooks.test-d.js","sourceRoot":"","sources":["../../../src/web/typed-hooks.test-d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAC;AAGlC,IAAI,CAAC,qEAAqE,EAAE,GAAG,EAAE;IAG/E,YAAY,EAAS,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;IACtD,YAAY,EAAS,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;IACzD,YAAY,EAAS,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACxD,YAAY,EAAS,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,0EAA0E,EAAE,GAAG,EAAE;IAGpF,YAAY,EAAS,CAAC,aAAa,EAEhC,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,2DAA2D,EAAE,GAAG,EAAE;IAGrE,YAAY,EAAe,CAAC,aAAa,EAIrC,CAAC;IAIL,YAAY,EAAgB,CAAC,aA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a,CAAC,KAAK,CAAC,CAAC,QAAQ,EAA0B,CAAC;AACvE,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,yDAAyD,EAAE,GAAG,EAAE;IACnE,MAAM,EAAE,WAAW,EAAE,GAAG,gBAAgB,EAAc,CAAC;IACvD,MAAM,QAAQ,GAAG,WAAW,EAAmB,CAAC;IAGhD,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAClC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAkB,CAAC;IAC3D,CAAC;IAED,MAAM,WAAW,GAAG,WAAW,EAAsB,CAAC;IAEtD,IAAI,WAAW,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACrC,YAAY,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAyB,CAAC;IACrE,CAAC;IAED,MAAM,aAAa,GAAG,WAAW,EAAqB,CAAC;IAEvD,IAAI,aAAa,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACvC,YAAY,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,QAAQ,EAA2B,CAAC;IACzE,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { createTypedHooks } from "./typed-hooks.js";
3
+ import { createMinimalTestServer } from "../test/utils.js";
4
+ const server = createMinimalTestServer();
5
+ describe("createTypedHooks", () => {
6
+ it("should return an object with useCallTool hook", () => {
7
+ const hooks = createTypedHooks();
8
+ expect(hooks).toHaveProperty("useCallTool");
9
+ expect(typeof hooks.useCallTool).toBe("function");
10
+ });
11
+ it("should return an object with useToolInfo hook", () => {
12
+ const hooks = createTypedHooks();
13
+ expect(hooks).toHaveProperty("useToolInfo");
14
+ expect(typeof hooks.useToolInfo).toBe("function");
15
+ });
16
+ });
17
+ //# sourceMappingURL=typed-hooks.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typed-hooks.test.js","sourceRoot":"","sources":["../../../src/web/typed-hooks.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;AAGzC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,KAAK,GAAG,gBAAgB,EAAc,CAAC;QAC7C,MAAM,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QAC5C,MAAM,CAAC,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,KAAK,GAAG,gBAAgB,EAAc,CAAC;QAC7C,MAAM,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QAC5C,MAAM,CAAC,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,14 +1,8 @@
1
- type UnknownObject = Record<string, unknown>;
2
- export type WidgetState = UnknownObject;
3
- export type SetWidgetState = (state: WidgetState) => Promise<void>;
4
- export type SendFollowUpMessage = (args: {
5
- prompt: string;
6
- }) => Promise<void>;
7
- export type RequestDisplayMode = (args: {
8
- mode: DisplayMode;
9
- }) => Promise<{
10
- mode: DisplayMode;
11
- }>;
1
+ export type UnknownObject = Record<string, unknown>;
2
+ type WidgetState = UnknownObject;
3
+ type FileMetadata = {
4
+ fileId: string;
5
+ };
12
6
  export declare const TOOL_RESPONSE_EVENT_TYPE = "openai:tool_response";
13
7
  export declare class ToolResponseEvent extends CustomEvent<{
14
8
  tool: {
@@ -26,7 +20,7 @@ declare global {
26
20
  [SET_GLOBALS_EVENT_TYPE]: SetGlobalsEvent;
27
21
  }
28
22
  }
29
- export type OpenAiGlobals<ToolInput extends UnknownObject = UnknownObject, ToolOutput extends UnknownObject = UnknownObject, ToolResponseMetadata extends UnknownObject = UnknownObject, WidgetState extends UnknownObject = UnknownObject> = {
23
+ export type OpenAiGlobals<ToolInput extends UnknownObject = {}, ToolOutput extends UnknownObject = UnknownObject, ToolResponseMetadata extends UnknownObject = UnknownObject, WidgetState extends UnknownObject = UnknownObject> = {
30
24
  theme: Theme;
31
25
  userAgent: UserAgent;
32
26
  locale: string;
@@ -34,22 +28,32 @@ export type OpenAiGlobals<ToolInput extends UnknownObject = UnknownObject, ToolO
34
28
  displayMode: DisplayMode;
35
29
  safeArea: SafeArea;
36
30
  toolInput: ToolInput;
37
- toolOutput: ToolOutput | null;
31
+ toolOutput: ToolOutput | {
32
+ text: string;
33
+ } | null;
38
34
  toolResponseMetadata: ToolResponseMetadata | null;
39
35
  widgetState: WidgetState | null;
40
36
  };
37
+ export type CallToolArgs = Record<string, unknown> | null;
41
38
  export type CallToolResponse = {
39
+ content: {
40
+ type: "text";
41
+ text: string;
42
+ }[];
43
+ structuredContent: Record<string, unknown>;
44
+ isError: boolean;
42
45
  result: string;
46
+ meta: Record<string, unknown>;
43
47
  };
44
48
  type API<WidgetState extends UnknownObject> = {
45
49
  /** Calls a tool on your MCP. Returns the full response. */
46
- callTool: (name: string, args: Record<string, unknown>) => Promise<CallToolResponse>;
50
+ callTool: <ToolArgs extends CallToolArgs = null, ToolResponse extends CallToolResponse = CallToolResponse>(name: string, args: ToolArgs) => Promise<ToolResponse>;
47
51
  /** Triggers a followup turn in the ChatGPT conversation */
48
52
  sendFollowUpMessage: (args: {
49
53
  prompt: string;
50
54
  }) => Promise<void>;
51
55
  /** Opens an external link, redirects web page or mobile app */
52
- openExternal(payload: {
56
+ openExternal(args: {
53
57
  href: string;
54
58
  }): void;
55
59
  /** For transitioning an app from inline to fullscreen or pip */
@@ -62,7 +66,27 @@ type API<WidgetState extends UnknownObject> = {
62
66
  */
63
67
  mode: DisplayMode;
64
68
  }>;
69
+ /**
70
+ * Sets the widget state.
71
+ * This state is persisted across widget renders.
72
+ */
65
73
  setWidgetState: (state: WidgetState) => Promise<void>;
74
+ /**
75
+ * Opens a modal portaled outside of the widget iFrame.
76
+ * This ensures the modal is correctly displayed and not limited to the widget's area.
77
+ */
78
+ requestModal: (args: {
79
+ title: string;
80
+ }) => Promise<void>;
81
+ /** Uploads a new file to the host */
82
+ uploadFile: (file: File) => Promise<FileMetadata>;
83
+ /**
84
+ * Downloads a file from the host that was previously uploaded.
85
+ * Only files uploaded by the same connector instance can be downloaded.
86
+ */
87
+ downloadFile: (file: FileMetadata) => Promise<{
88
+ downloadUrl: string;
89
+ }>;
66
90
  };
67
91
  export declare const SET_GLOBALS_EVENT_TYPE = "openai:set_globals";
68
92
  export declare class SetGlobalsEvent extends CustomEvent<{
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/web/types.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAC/D,MAAM,OAAO,iBAAkB,SAAQ,WAErC;IACkB,IAAI,GAAG,wBAAwB,CAAC;CACnD;AA8FD,sDAAsD;AACtD,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAC3D,MAAM,OAAO,eAAgB,SAAQ,WAEnC;IACkB,IAAI,GAAG,sBAAsB,CAAC;CACjD"}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from "vitest/config";
2
+ export default defineConfig({
3
+ test: {
4
+ environment: "jsdom",
5
+ globals: true,
6
+ },
7
+ });
8
+ //# sourceMappingURL=vitest.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAe,YAAY,CAAC;IAC1B,IAAI,EAAE;QACJ,WAAW,EAAE,OAAO;QACpB,OAAO,EAAE,IAAI;KACd;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skybridge",
3
- "version": "0.0.0-dev.66b8f6b",
3
+ "version": "0.0.0-dev.6b57ab9",
4
4
  "description": "Skybridge is a framework for building ChatGPT apps",
5
5
  "type": "module",
6
6
  "files": [
@@ -8,16 +8,23 @@
8
8
  ],
9
9
  "exports": {
10
10
  "./server": {
11
- "types": "./dist/server/index.d.ts",
12
- "default": "./dist/server/index.js"
11
+ "types": "./dist/src/server/index.d.ts",
12
+ "default": "./dist/src/server/index.js"
13
13
  },
14
14
  "./web": {
15
- "types": "./dist/web/index.d.ts",
16
- "default": "./dist/web/index.js"
15
+ "types": "./dist/src/web/index.d.ts",
16
+ "default": "./dist/src/web/index.js"
17
17
  }
18
18
  },
19
19
  "scripts": {
20
- "build": "tsc"
20
+ "build": "tsc && pnpm run build:templates",
21
+ "build:templates": "cp -r src/server/templates dist/src/server/",
22
+ "test": "pnpm run test:unit && pnpm run test:type",
23
+ "test:unit": "vitest run --silent",
24
+ "test:type": "tsc --noEmit",
25
+ "docs:dev": "pnpm --filter @skybridge/docs start",
26
+ "docs:build": "pnpm --filter @skybridge/docs build",
27
+ "docs:serve": "pnpm --filter @skybridge/docs serve"
21
28
  },
22
29
  "keywords": [
23
30
  "chatgpt",
@@ -28,24 +35,31 @@
28
35
  "author": "Frédéric Barthelet",
29
36
  "license": "ISC",
30
37
  "peerDependencies": {
31
- "react": ">=19.0.0",
32
- "react-dom": ">=19.0.0"
38
+ "react": ">=18.0.0",
39
+ "react-dom": ">=18.0.0"
33
40
  },
34
41
  "dependencies": {
35
42
  "@modelcontextprotocol/sdk": "^1.20.0",
36
- "zod": "^3.25.51",
37
43
  "cors": "^2.8.5",
38
44
  "express": "^5.1.0",
39
- "vite": "^7.1.11"
45
+ "handlebars": "^4.7.8",
46
+ "vite": "^7.1.11",
47
+ "zod": "^3.25.51"
40
48
  },
41
49
  "devDependencies": {
50
+ "@testing-library/dom": "^10.4.1",
51
+ "@testing-library/react": "^16.3.0",
42
52
  "@total-typescript/tsconfig": "^1.0.4",
43
53
  "@types/cors": "^2.8.19",
44
54
  "@types/express": "^5.0.3",
55
+ "@types/jsdom": "^21.1.6",
45
56
  "@types/node": "^22.15.30",
46
- "@types/react-dom": "^19.2.2",
47
57
  "@types/react": "^19.2.2",
48
- "typescript": "^5.9.3"
58
+ "@types/react-dom": "^19.2.2",
59
+ "@vitest/ui": "^2.1.8",
60
+ "jsdom": "^25.0.1",
61
+ "typescript": "^5.9.3",
62
+ "vitest": "^2.1.8"
49
63
  },
50
64
  "packageManager": "pnpm@10.17.1"
51
65
  }
@@ -1,4 +0,0 @@
1
- export { McpServer } from "./server.js";
2
- export { widgetsDevServer } from "./widgetsDevServer.js";
3
- export { mcp } from "./middleware.js";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { type Request, type Response, type NextFunction } from "express";
2
- import type { McpServer } from "./server.js";
3
- export declare const mcp: (server: McpServer) => (req: Request, res: Response, next: NextFunction) => Promise<void>;
@@ -1,47 +0,0 @@
1
- import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
2
- import {} from "express";
3
- export const mcp = (server) => async (req, res, next) => {
4
- // Only handle requests to the /mcp path
5
- if (req.path !== "/mcp") {
6
- return next();
7
- }
8
- if (req.method === "POST") {
9
- try {
10
- const transport = new StreamableHTTPServerTransport({
11
- sessionIdGenerator: undefined,
12
- });
13
- res.on("close", () => {
14
- transport.close();
15
- });
16
- await server.connect(transport);
17
- await transport.handleRequest(req, res, req.body);
18
- }
19
- catch (error) {
20
- console.error("Error handling MCP request:", error);
21
- if (!res.headersSent) {
22
- res.status(500).json({
23
- jsonrpc: "2.0",
24
- error: {
25
- code: -32603,
26
- message: "Internal server error",
27
- },
28
- id: null,
29
- });
30
- }
31
- }
32
- }
33
- else if (req.method === "GET" || req.method === "DELETE") {
34
- res.writeHead(405).end(JSON.stringify({
35
- jsonrpc: "2.0",
36
- error: {
37
- code: -32000,
38
- message: "Method not allowed.",
39
- },
40
- id: null,
41
- }));
42
- }
43
- else {
44
- next();
45
- }
46
- };
47
- //# sourceMappingURL=middleware.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../src/server/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAkD,MAAM,SAAS,CAAC;AAIzE,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,MAAiB,EAAE,EAAE,CAAC,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;IAClG,wCAAwC;IACxC,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QACxB,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;IAED,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;QAC1B,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,IAAI,6BAA6B,CAAC;gBAClD,kBAAkB,EAAE,SAAS;aAC9B,CAAC,CAAC;YAEH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;gBACnB,SAAS,CAAC,KAAK,EAAE,CAAC;YACpB,CAAC,CAAC,CAAC;YAEH,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAEhC,MAAM,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;YACpD,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;gBACrB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;oBACnB,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE;wBACL,IAAI,EAAE,CAAC,KAAK;wBACZ,OAAO,EAAE,uBAAuB;qBACjC;oBACD,EAAE,EAAE,IAAI;iBACT,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;SAAM,IAAI,GAAG,CAAC,MAAM,KAAK,KAAK,IAAI,GAAG,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC3D,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,CACpB,IAAI,CAAC,SAAS,CAAC;YACb,OAAO,EAAE,KAAK;YACd,KAAK,EAAE;gBACL,IAAI,EAAE,CAAC,KAAK;gBACZ,OAAO,EAAE,qBAAqB;aAC/B;YACD,EAAE,EAAE,IAAI;SACT,CAAC,CACH,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,IAAI,EAAE,CAAC;IACT,CAAC;AACH,CAAC,CAAC"}
@@ -1,12 +0,0 @@
1
- import { McpServer as McpServerBase, type ToolCallback } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import type { Resource } from "@modelcontextprotocol/sdk/types.js";
3
- import type { ZodRawShape } from "zod";
4
- type McpServerOriginalResourceConfig = Omit<Resource, "uri" | "name" | "mimeType">;
5
- type McpServerOriginalToolConfig = Omit<Parameters<McpServer["registerTool"]>[1], "inputSchema" | "outputSchema">;
6
- export declare class McpServer extends McpServerBase {
7
- widget<InputArgs extends ZodRawShape, OutputArgs extends ZodRawShape>(name: string, resourceConfig: McpServerOriginalResourceConfig, toolConfig: McpServerOriginalToolConfig & {
8
- inputSchema?: InputArgs;
9
- outputSchema?: OutputArgs;
10
- }, toolCallback: ToolCallback<InputArgs>): void;
11
- }
12
- export {};
@@ -1,70 +0,0 @@
1
- import { McpServer as McpServerBase } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- export class McpServer extends McpServerBase {
3
- widget(name, resourceConfig, toolConfig, toolCallback) {
4
- const uri = `ui://widgets/${name}.html`;
5
- const resourceMetadata = { ...(resourceConfig._meta ?? {}) };
6
- if (toolConfig.description !== undefined) {
7
- resourceMetadata["openai/widgetDescription"] = toolConfig.description;
8
- }
9
- this.resource(name, uri, {
10
- ...resourceConfig,
11
- _meta: resourceMetadata,
12
- }, async (_uri, extra) => {
13
- const serverUrl = process.env.NODE_ENV === "production"
14
- ? `https://${extra?.requestInfo?.headers?.host}`
15
- : `http://localhost:3000`;
16
- const injectViteClient = (html) => `
17
- <script type="module">import { injectIntoGlobalHook } from "${serverUrl}/@react-refresh";
18
- injectIntoGlobalHook(window);
19
- window.$RefreshReg$ = () => {};
20
- window.$RefreshSig$ = () => (type) => type;
21
- window.__vite_plugin_react_preamble_installed__ = true;
22
- </script>
23
-
24
- <script type="module" src="${serverUrl}/@vite/client"></script>
25
- ` + html;
26
- const buildHtml = () => {
27
- if (process.env.NODE_ENV === "production") {
28
- try {
29
- return `
30
- <div id="root"></div>
31
- <script type="module">
32
- import('${serverUrl}/assets/${name}.js');
33
- </script>
34
- <link rel="stylesheet" crossorigin href="${serverUrl}/assets/style.css">
35
- `;
36
- }
37
- catch (error) {
38
- console.error("Failed to load production assets:", error);
39
- return "";
40
- }
41
- }
42
- return `
43
- <div id="root"></div>
44
- <script type="module">
45
- import('${serverUrl}/src/widgets/${name}.tsx');
46
- </script>
47
- `;
48
- };
49
- const html = buildHtml();
50
- return {
51
- contents: [
52
- {
53
- uri,
54
- mimeType: "text/html+skybridge",
55
- text: process.env.NODE_ENV === "production" ? html : injectViteClient(html),
56
- },
57
- ],
58
- };
59
- });
60
- const toolMeta = {
61
- ...toolConfig._meta,
62
- "openai/outputTemplate": uri,
63
- };
64
- this.registerTool(name, {
65
- ...toolConfig,
66
- _meta: toolMeta,
67
- }, toolCallback);
68
- }
69
- }
70
- //# sourceMappingURL=server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAqB,MAAM,yCAAyC,CAAC;AAwBxG,MAAM,OAAO,SAAU,SAAQ,aAAa;IAC1C,MAAM,CACJ,IAAY,EACZ,cAA+C,EAC/C,UAGC,EACD,YAAqC;QAErC,MAAM,GAAG,GAAG,gBAAgB,IAAI,OAAO,CAAC;QACxC,MAAM,gBAAgB,GAAiB,EAAE,GAAG,CAAC,cAAc,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC;QAC3E,IAAI,UAAU,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACzC,gBAAgB,CAAC,0BAA0B,CAAC,GAAG,UAAU,CAAC,WAAW,CAAC;QACxE,CAAC;QAED,IAAI,CAAC,QAAQ,CACX,IAAI,EACJ,GAAG,EACH;YACE,GAAG,cAAc;YACjB,KAAK,EAAE,gBAAgB;SACxB,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;YACpB,MAAM,SAAS,GACb,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;gBACnC,CAAC,CAAC,WAAW,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE;gBAChD,CAAC,CAAC,uBAAuB,CAAC;YAE9B,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,EAAE,CACxC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"./use-tool-output.js";
3
- export * from "./types.js";
4
- export { mountWidget } from "./mount-widget.js";
package/dist/web/index.js DELETED
@@ -1,5 +0,0 @@
1
- export { useOpenAiGlobal } from "./use-openai-global.js";
2
- export { useToolOutput } from "./use-tool-output.js";
3
- export * from "./types.js";
4
- export { mountWidget } from "./mount-widget.js";
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,10 +0,0 @@
1
- import { createElement, StrictMode } from "react";
2
- import { createRoot } from "react-dom/client";
3
- export const mountWidget = (component) => {
4
- const root = document.getElementById("root");
5
- if (!root) {
6
- throw new Error("Root element not found");
7
- }
8
- createRoot(root).render(createElement(StrictMode, null, component));
9
- };
10
- //# sourceMappingURL=mount-widget.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mount-widget.js","sourceRoot":"","sources":["../../src/web/mount-widget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,SAA0B,EAAE,EAAE;IACxD,MAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC5C,CAAC;IACD,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;AACtE,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/web/types.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAC/D,MAAM,OAAO,iBAAkB,SAAQ,WAErC;IACkB,IAAI,GAAG,wBAAwB,CAAC;CACnD;AA+DD,sDAAsD;AACtD,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAC3D,MAAM,OAAO,eAAgB,SAAQ,WAEnC;IACkB,IAAI,GAAG,sBAAsB,CAAC;CACjD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-openai-global.js","sourceRoot":"","sources":["../../src/web/use-openai-global.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAsB,MAAM,YAAY,CAAC;AAEzF,MAAM,UAAU,eAAe,CAAgC,GAAM;IACnE,OAAO,oBAAoB,CACzB,CAAC,QAAQ,EAAE,EAAE;QACX,MAAM,eAAe,GAAG,CAAC,KAAsB,EAAE,EAAE;YACjD,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACxC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,OAAO;YACT,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;YACvD,QAAQ,EAAE,CAAC;QACb,CAAC,CAAC;QAEF,MAAM,CAAC,gBAAgB,CAAC,sBAAsB,EAAE,eAAe,EAAE;YAC/D,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,mBAAmB,CAAC,sBAAsB,EAAE,eAAe,CAAC,CAAC;QACtE,CAAC,CAAC;IACJ,CAAC,EACD,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAC3B,CAAC;AACJ,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare function useToolOutput(): {
2
- [x: string]: unknown;
3
- } | null | undefined;
@@ -1,5 +0,0 @@
1
- import { useOpenAiGlobal } from "./use-openai-global.js";
2
- export function useToolOutput() {
3
- return useOpenAiGlobal("toolOutput");
4
- }
5
- //# sourceMappingURL=use-tool-output.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-tool-output.js","sourceRoot":"","sources":["../../src/web/use-tool-output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,UAAU,aAAa;IAC3B,OAAO,eAAe,CAAC,YAAY,CAAC,CAAC;AACvC,CAAC"}
File without changes
File without changes