skybridge 0.0.0-dev.b33fb3f → 0.0.0-dev.b570187
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/README.md +413 -1
- package/dist/src/emulator/dist/assets/index-BZr5jCa4.js +9 -0
- package/dist/src/emulator/dist/assets/index-DmQYZ06G.css +1 -0
- package/dist/src/emulator/dist/index.html +14 -0
- package/dist/src/emulator/dist/vite.svg +1 -0
- package/dist/src/emulator/eslint.config.d.ts +2 -0
- package/dist/src/emulator/eslint.config.js +23 -0
- package/dist/src/emulator/eslint.config.js.map +1 -0
- package/dist/src/emulator/postcss.config.d.ts +7 -0
- package/dist/src/emulator/postcss.config.js +7 -0
- package/dist/src/emulator/postcss.config.js.map +1 -0
- package/dist/src/emulator/src/App.d.ts +2 -0
- package/dist/src/emulator/src/App.js +100 -0
- package/dist/src/emulator/src/App.js.map +1 -0
- package/dist/src/emulator/src/components/Inspector.d.ts +8 -0
- package/dist/src/emulator/src/components/Inspector.js +14 -0
- package/dist/src/emulator/src/components/Inspector.js.map +1 -0
- package/dist/src/emulator/src/components/Logs.d.ts +10 -0
- package/dist/src/emulator/src/components/Logs.js +5 -0
- package/dist/src/emulator/src/components/Logs.js.map +1 -0
- package/dist/src/emulator/src/components/ToolList.d.ts +7 -0
- package/dist/src/emulator/src/components/ToolList.js +8 -0
- package/dist/src/emulator/src/components/ToolList.js.map +1 -0
- package/dist/src/emulator/src/components/Widget.d.ts +9 -0
- package/dist/src/emulator/src/components/Widget.js +10 -0
- package/dist/src/emulator/src/components/Widget.js.map +1 -0
- package/dist/src/emulator/src/lib/utils.d.ts +2 -0
- package/dist/src/emulator/src/lib/utils.js +6 -0
- package/dist/src/emulator/src/lib/utils.js.map +1 -0
- package/dist/src/emulator/src/main.d.ts +1 -0
- package/dist/src/emulator/src/main.js +7 -0
- package/dist/src/emulator/src/main.js.map +1 -0
- package/dist/src/emulator/src/types.d.ts +20 -0
- package/dist/src/emulator/src/types.js +2 -0
- package/dist/src/emulator/src/types.js.map +1 -0
- package/dist/src/emulator/tailwind.config.d.ts +50 -0
- package/dist/src/emulator/tailwind.config.js +51 -0
- package/dist/src/emulator/tailwind.config.js.map +1 -0
- package/dist/src/emulator/vite.config.d.ts +2 -0
- package/dist/src/emulator/vite.config.js +7 -0
- package/dist/src/emulator/vite.config.js.map +1 -0
- package/dist/src/server/emulatorStaticServer.d.ts +14 -0
- package/dist/src/server/emulatorStaticServer.js +41 -0
- package/dist/src/server/emulatorStaticServer.js.map +1 -0
- package/dist/src/server/index.d.ts +3 -1
- package/dist/src/server/index.js +1 -1
- package/dist/src/server/index.js.map +1 -1
- package/dist/src/server/inferUtilityTypes.d.ts +54 -0
- package/dist/src/server/inferUtilityTypes.js +2 -0
- package/dist/src/server/inferUtilityTypes.js.map +1 -0
- package/dist/src/server/server.d.ts +45 -9
- package/dist/src/server/server.js +27 -11
- package/dist/src/server/server.js.map +1 -1
- package/dist/src/server/templateHelper.d.ts +9 -8
- package/dist/src/server/templateHelper.js +0 -8
- package/dist/src/server/templateHelper.js.map +1 -1
- package/dist/src/server/templates/development.hbs +8 -0
- package/dist/src/server/templates/production.hbs +3 -2
- package/dist/src/server/widgetsDevServer.d.ts +5 -2
- package/dist/src/server/widgetsDevServer.js +6 -3
- package/dist/src/server/widgetsDevServer.js.map +1 -1
- package/dist/src/test/utils.d.ts +61 -0
- package/dist/src/test/utils.js +122 -1
- package/dist/src/test/utils.js.map +1 -1
- package/dist/src/test/widget.test.js +24 -6
- package/dist/src/test/widget.test.js.map +1 -1
- package/dist/src/web/create-store.d.ts +3 -0
- package/dist/src/web/create-store.js +25 -0
- package/dist/src/web/create-store.js.map +1 -0
- package/dist/src/web/create-store.test.js +70 -0
- package/dist/src/web/create-store.test.js.map +1 -0
- package/dist/src/web/data-llm.d.ts +14 -0
- package/dist/src/web/data-llm.js +68 -0
- package/dist/src/web/data-llm.js.map +1 -0
- package/dist/src/web/data-llm.test.d.ts +1 -0
- package/dist/src/web/data-llm.test.js +76 -0
- package/dist/src/web/data-llm.test.js.map +1 -0
- package/dist/src/web/generate-helpers.d.ts +113 -0
- package/dist/src/web/generate-helpers.js +109 -0
- package/dist/src/web/generate-helpers.js.map +1 -0
- package/dist/src/web/generate-helpers.test-d.d.ts +1 -0
- package/dist/src/web/generate-helpers.test-d.js +153 -0
- package/dist/src/web/generate-helpers.test-d.js.map +1 -0
- package/dist/src/web/generate-helpers.test.d.ts +1 -0
- package/dist/src/web/generate-helpers.test.js +17 -0
- package/dist/src/web/generate-helpers.test.js.map +1 -0
- package/dist/src/web/helpers/state.d.ts +7 -0
- package/dist/src/web/helpers/state.js +40 -0
- package/dist/src/web/helpers/state.js.map +1 -0
- package/dist/src/web/helpers/state.test.d.ts +1 -0
- package/dist/src/web/helpers/state.test.js +53 -0
- package/dist/src/web/helpers/state.test.js.map +1 -0
- package/dist/src/web/hooks/index.d.ts +12 -0
- package/dist/src/web/hooks/index.js +13 -0
- package/dist/src/web/hooks/index.js.map +1 -0
- package/dist/src/web/hooks/use-call-tool.d.ts +100 -0
- package/dist/src/web/hooks/use-call-tool.js +60 -0
- package/dist/src/web/hooks/use-call-tool.js.map +1 -0
- package/dist/src/web/hooks/use-call-tool.test-d.d.ts +1 -0
- package/dist/src/web/hooks/use-call-tool.test-d.js +104 -0
- package/dist/src/web/hooks/use-call-tool.test-d.js.map +1 -0
- package/dist/src/web/hooks/use-call-tool.test.d.ts +1 -0
- package/dist/src/web/hooks/use-call-tool.test.js +171 -0
- package/dist/src/web/hooks/use-call-tool.test.js.map +1 -0
- package/dist/src/web/hooks/use-display-mode.d.ts +4 -0
- package/dist/src/web/hooks/use-display-mode.js +7 -0
- package/dist/src/web/hooks/use-display-mode.js.map +1 -0
- package/dist/src/web/hooks/use-display-mode.test.d.ts +1 -0
- package/dist/src/web/hooks/use-display-mode.test.js +40 -0
- package/dist/src/web/hooks/use-display-mode.test.js.map +1 -0
- package/dist/src/web/hooks/use-files.d.ts +10 -0
- package/dist/src/web/hooks/use-files.js +7 -0
- package/dist/src/web/hooks/use-files.js.map +1 -0
- package/dist/src/web/hooks/use-files.test.d.ts +1 -0
- package/dist/src/web/hooks/use-files.test.js +29 -0
- package/dist/src/web/hooks/use-files.test.js.map +1 -0
- package/dist/src/web/hooks/use-locale.d.ts +1 -0
- package/dist/src/web/hooks/use-locale.js +5 -0
- package/dist/src/web/hooks/use-locale.js.map +1 -0
- package/dist/src/web/hooks/use-locale.test.d.ts +1 -0
- package/dist/src/web/hooks/use-locale.test.js +21 -0
- package/dist/src/web/hooks/use-locale.test.js.map +1 -0
- package/dist/src/web/hooks/use-open-external.d.ts +1 -0
- package/dist/src/web/hooks/use-open-external.js +6 -0
- package/dist/src/web/hooks/use-open-external.js.map +1 -0
- package/dist/src/web/hooks/use-open-external.test.d.ts +1 -0
- package/dist/src/web/hooks/use-open-external.test.js +24 -0
- package/dist/src/web/hooks/use-open-external.test.js.map +1 -0
- package/dist/src/web/{use-openai-global.d.ts → hooks/use-openai-global.d.ts} +1 -1
- package/dist/src/web/{use-openai-global.js → hooks/use-openai-global.js} +4 -2
- package/dist/src/web/hooks/use-openai-global.js.map +1 -0
- package/dist/src/web/hooks/use-request-modal.d.ts +6 -0
- package/dist/src/web/hooks/use-request-modal.js +9 -0
- package/dist/src/web/hooks/use-request-modal.js.map +1 -0
- package/dist/src/web/hooks/use-request-modal.test.d.ts +1 -0
- package/dist/src/web/hooks/use-request-modal.test.js +24 -0
- package/dist/src/web/hooks/use-request-modal.test.js.map +1 -0
- package/dist/src/web/hooks/use-send-follow-up-message.d.ts +1 -0
- package/dist/src/web/hooks/use-send-follow-up-message.js +11 -0
- package/dist/src/web/hooks/use-send-follow-up-message.js.map +1 -0
- package/dist/src/web/hooks/use-theme.d.ts +1 -0
- package/dist/src/web/hooks/use-theme.js +5 -0
- package/dist/src/web/hooks/use-theme.js.map +1 -0
- package/dist/src/web/hooks/use-theme.test.d.ts +1 -0
- package/dist/src/web/hooks/use-theme.test.js +26 -0
- package/dist/src/web/hooks/use-theme.test.js.map +1 -0
- package/dist/src/web/hooks/use-tool-info.d.ts +25 -0
- package/dist/src/web/hooks/use-tool-info.js +22 -0
- package/dist/src/web/hooks/use-tool-info.js.map +1 -0
- package/dist/src/web/hooks/use-tool-info.test-d.d.ts +1 -0
- package/dist/src/web/hooks/use-tool-info.test-d.js +74 -0
- package/dist/src/web/hooks/use-tool-info.test-d.js.map +1 -0
- package/dist/src/web/hooks/use-tool-info.test.d.ts +1 -0
- package/dist/src/web/hooks/use-tool-info.test.js +59 -0
- package/dist/src/web/hooks/use-tool-info.test.js.map +1 -0
- package/dist/src/web/hooks/use-user-agent.d.ts +1 -0
- package/dist/src/web/hooks/use-user-agent.js +5 -0
- package/dist/src/web/hooks/use-user-agent.js.map +1 -0
- package/dist/src/web/hooks/use-user-agent.test.d.ts +1 -0
- package/dist/src/web/hooks/use-user-agent.test.js +31 -0
- package/dist/src/web/hooks/use-user-agent.test.js.map +1 -0
- package/dist/src/web/hooks/use-widget-state.d.ts +4 -0
- package/dist/src/web/hooks/use-widget-state.js +32 -0
- package/dist/src/web/hooks/use-widget-state.js.map +1 -0
- package/dist/src/web/hooks/use-widget-state.test.d.ts +1 -0
- package/dist/src/web/hooks/use-widget-state.test.js +60 -0
- package/dist/src/web/hooks/use-widget-state.test.js.map +1 -0
- package/dist/src/web/index.d.ts +5 -2
- package/dist/src/web/index.js +5 -2
- package/dist/src/web/index.js.map +1 -1
- package/dist/src/web/mount-widget.js +12 -3
- package/dist/src/web/mount-widget.js.map +1 -1
- package/dist/src/web/plugin/data-llm.test.d.ts +1 -0
- package/dist/src/web/plugin/data-llm.test.js +81 -0
- package/dist/src/web/plugin/data-llm.test.js.map +1 -0
- package/dist/src/web/plugin/plugin.d.ts +2 -0
- package/dist/src/web/plugin/plugin.js +33 -0
- package/dist/src/web/plugin/plugin.js.map +1 -0
- package/dist/src/web/plugin/transform-data-llm.d.ts +12 -0
- package/dist/src/web/plugin/transform-data-llm.js +93 -0
- package/dist/src/web/plugin/transform-data-llm.js.map +1 -0
- package/dist/src/web/plugin/transform-data-llm.test.d.ts +1 -0
- package/dist/src/web/plugin/transform-data-llm.test.js +81 -0
- package/dist/src/web/plugin/transform-data-llm.test.js.map +1 -0
- package/dist/src/web/proxy.d.ts +1 -0
- package/dist/src/web/proxy.js +48 -0
- package/dist/src/web/proxy.js.map +1 -0
- package/dist/src/web/types.d.ts +53 -15
- package/dist/src/web/types.js +1 -0
- package/dist/src/web/types.js.map +1 -1
- package/dist/vitest.config.js +0 -1
- package/dist/vitest.config.js.map +1 -1
- package/package.json +17 -7
- package/dist/src/server/middleware.d.ts +0 -3
- package/dist/src/server/middleware.js +0 -47
- package/dist/src/server/middleware.js.map +0 -1
- package/dist/src/server/templates/vite-client.hbs +0 -7
- package/dist/src/test/setup.js +0 -9
- package/dist/src/test/setup.js.map +0 -1
- package/dist/src/web/use-openai-global.js.map +0 -1
- package/dist/src/web/use-tool-output.d.ts +0 -3
- package/dist/src/web/use-tool-output.js +0 -5
- package/dist/src/web/use-tool-output.js.map +0 -1
- /package/dist/src/{test/setup.d.ts → web/create-store.test.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%}*{border-color:hsl(var(--border))}html,body{height:100%;width:100%}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}#root{height:100%;width:100%}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.mt-2{margin-top:.5rem}.flex{display:flex}.h-12{height:3rem}.h-24{height:6rem}.h-48{height:12rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-0{min-height:0px}.w-24{width:6rem}.w-64{width:16rem}.w-80{width:20rem}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0px}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.resize-none{resize:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-border{border-color:hsl(var(--border))}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.bg-background{background-color:hsl(var(--background))}.bg-card{background-color:hsl(var(--card))}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-primary{background-color:hsl(var(--primary))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.object-contain{-o-object-fit:contain;object-fit:contain}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.text-left{text-align:left}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-wide{letter-spacing:.025em}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.dark\:bg-yellow-950\/20:is(.dark *){background-color:#42200633}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Skybridge MCP Emulator</title>
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BZr5jCa4.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DmQYZ06G.css">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import globals from 'globals';
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
5
|
+
import tseslint from 'typescript-eslint';
|
|
6
|
+
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
7
|
+
export default defineConfig([
|
|
8
|
+
globalIgnores(['dist']),
|
|
9
|
+
{
|
|
10
|
+
files: ['**/*.{ts,tsx}'],
|
|
11
|
+
extends: [
|
|
12
|
+
js.configs.recommended,
|
|
13
|
+
tseslint.configs.recommended,
|
|
14
|
+
reactHooks.configs.flat.recommended,
|
|
15
|
+
reactRefresh.configs.vite,
|
|
16
|
+
],
|
|
17
|
+
languageOptions: {
|
|
18
|
+
ecmaVersion: 2020,
|
|
19
|
+
globals: globals.browser,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
]);
|
|
23
|
+
//# sourceMappingURL=eslint.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eslint.config.js","sourceRoot":"","sources":["../../../src/emulator/eslint.config.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,UAAU,MAAM,2BAA2B,CAAA;AAClD,OAAO,YAAY,MAAM,6BAA6B,CAAA;AACtD,OAAO,QAAQ,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAE3D,eAAe,YAAY,CAAC;IAC1B,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;IACvB;QACE,KAAK,EAAE,CAAC,eAAe,CAAC;QACxB,OAAO,EAAE;YACP,EAAE,CAAC,OAAO,CAAC,WAAW;YACtB,QAAQ,CAAC,OAAO,CAAC,WAAW;YAC5B,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW;YACnC,YAAY,CAAC,OAAO,CAAC,IAAI;SAC1B;QACD,eAAe,EAAE;YACf,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,OAAO,CAAC,OAAO;SACzB;KACF;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postcss.config.js","sourceRoot":"","sources":["../../../src/emulator/postcss.config.js"],"names":[],"mappings":"AAAA,eAAe;IACb,OAAO,EAAE;QACP,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,EAAE;KACjB;CACF,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import SuperJSON from "superjson";
|
|
4
|
+
import { ToolList } from "./components/ToolList.js";
|
|
5
|
+
import { Inspector } from "./components/Inspector.js";
|
|
6
|
+
import { Logs } from "./components/Logs.js";
|
|
7
|
+
import { Widget } from "./components/Widget.js";
|
|
8
|
+
function App() {
|
|
9
|
+
const [metadata, setMetadata] = useState();
|
|
10
|
+
const [selectedTool, setSelectedTool] = useState(null);
|
|
11
|
+
const [input, setInput] = useState("");
|
|
12
|
+
const [output, setOutput] = useState("");
|
|
13
|
+
const [executionTime, setExecutionTime] = useState(null);
|
|
14
|
+
const [isCalling, setIsCalling] = useState(false);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
fetch("/_emulator/metadata")
|
|
17
|
+
.then((res) => {
|
|
18
|
+
if (!res.ok) {
|
|
19
|
+
throw new Error(`HTTP error! status: ${res.status}`);
|
|
20
|
+
}
|
|
21
|
+
return res
|
|
22
|
+
.json()
|
|
23
|
+
.then((data) => SuperJSON.deserialize(data));
|
|
24
|
+
})
|
|
25
|
+
.then((data) => {
|
|
26
|
+
setMetadata(data);
|
|
27
|
+
// Set first tool as selected if available
|
|
28
|
+
const tools = Object.keys(data.registeredTools || {});
|
|
29
|
+
if (tools.length > 0 && !selectedTool) {
|
|
30
|
+
setSelectedTool(tools[0]);
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
.catch((err) => {
|
|
34
|
+
console.error("Failed to fetch metadata:", err);
|
|
35
|
+
setMetadata(undefined);
|
|
36
|
+
});
|
|
37
|
+
}, [selectedTool]);
|
|
38
|
+
const tools = metadata ? Object.keys(metadata.registeredTools || {}) : [];
|
|
39
|
+
const selectedToolData = selectedTool && metadata?.registeredTools[selectedTool];
|
|
40
|
+
const handleCall = async () => {
|
|
41
|
+
if (!selectedTool)
|
|
42
|
+
return;
|
|
43
|
+
setIsCalling(true);
|
|
44
|
+
const startTime = Date.now();
|
|
45
|
+
try {
|
|
46
|
+
// Simulate API call
|
|
47
|
+
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
48
|
+
// Mock output based on input
|
|
49
|
+
const inputObj = input ? JSON.parse(input) : {};
|
|
50
|
+
const mockOutput = {
|
|
51
|
+
...inputObj,
|
|
52
|
+
...(inputObj.name === "pikachu" && { type: "electric" }),
|
|
53
|
+
};
|
|
54
|
+
setOutput(JSON.stringify(mockOutput, null, 2));
|
|
55
|
+
setExecutionTime(Date.now() - startTime);
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
console.error("Failed to call tool:", err);
|
|
59
|
+
setOutput(JSON.stringify({ error: "Invalid input" }, null, 2));
|
|
60
|
+
setExecutionTime(Date.now() - startTime);
|
|
61
|
+
}
|
|
62
|
+
finally {
|
|
63
|
+
setIsCalling(false);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
// Mock widget data for demonstration
|
|
67
|
+
const widgetData = input.includes("pikachu")
|
|
68
|
+
? {
|
|
69
|
+
name: "Pikachu",
|
|
70
|
+
type: "electric",
|
|
71
|
+
image: "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/25.png",
|
|
72
|
+
}
|
|
73
|
+
: undefined;
|
|
74
|
+
// Mock logs
|
|
75
|
+
const logs = [
|
|
76
|
+
{
|
|
77
|
+
timestamp: "01:02",
|
|
78
|
+
message: "requestModal called",
|
|
79
|
+
type: "request",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
timestamp: "01:05",
|
|
83
|
+
message: "sendFollowUpMessage called",
|
|
84
|
+
type: "response",
|
|
85
|
+
},
|
|
86
|
+
{ timestamp: "", message: "- Display current pokemon evolution" },
|
|
87
|
+
];
|
|
88
|
+
// Mock state and inspect data
|
|
89
|
+
const localState = widgetData ? { count: 4 } : {};
|
|
90
|
+
const globalInspect = {
|
|
91
|
+
height: 100,
|
|
92
|
+
theme: "dark",
|
|
93
|
+
locale: "en",
|
|
94
|
+
};
|
|
95
|
+
return (_jsxs("div", { className: "h-screen w-screen flex overflow-hidden bg-background", children: [_jsx("div", { className: "w-64 flex-shrink-0", children: _jsx(ToolList, { tools: tools, selectedTool: selectedTool, onSelectTool: setSelectedTool }) }), _jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [_jsx("div", { className: "h-12 flex-shrink-0 border-b border-border bg-muted/30 px-4 flex items-center", children: _jsx("h1", { className: "text-sm font-semibold", children: selectedToolData
|
|
96
|
+
? `${selectedTool} - ${selectedToolData.description || "Tool"}`
|
|
97
|
+
: "No tool selected" }) }), _jsxs("div", { className: "h-48 flex-shrink-0 border-b border-border p-4 flex gap-4", children: [_jsxs("div", { className: "flex-1 bg-card border border-border rounded-lg p-4 flex flex-col", children: [_jsx("label", { className: "text-xs font-semibold text-muted-foreground mb-2 uppercase", children: "Input" }), _jsx("textarea", { value: input, onChange: (e) => setInput(e.target.value), placeholder: '{ "name": "pikachu" }', className: "flex-1 font-mono text-sm bg-background border border-input rounded p-2 resize-none focus:outline-none focus:ring-2 focus:ring-ring" })] }), _jsx("div", { className: "flex items-center", children: _jsx("button", { onClick: handleCall, disabled: !selectedTool || isCalling, className: "h-full px-6 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium", children: "Call Button" }) }), _jsxs("div", { className: "flex-1 bg-card border border-border rounded-lg p-4 flex flex-col", children: [_jsx("label", { className: "text-xs font-semibold text-muted-foreground mb-2 uppercase", children: "Output" }), _jsx("div", { className: "flex-1 bg-background border border-input rounded p-2 overflow-auto", children: _jsx("pre", { className: "text-xs font-mono text-foreground whitespace-pre-wrap", children: output || "No output yet" }) }), executionTime !== null && (_jsxs("div", { className: "mt-2 text-xs text-muted-foreground", children: ["Executed in ", (executionTime / 1000).toFixed(1), "s"] }))] })] }), _jsxs("div", { className: "flex-1 flex gap-4 p-4 overflow-hidden", children: [_jsx("div", { className: "flex-1 min-w-0", children: _jsx(Widget, { data: widgetData }) }), _jsxs("div", { className: "w-80 flex-shrink-0 flex flex-col gap-4", children: [_jsx("div", { className: "flex-1 min-h-0", children: _jsx(Inspector, { title: "Local Inspector", state: localState, inspect: localState }) }), _jsx("div", { className: "h-48 flex-shrink-0", children: _jsx(Logs, { logs: logs }) })] }), _jsx("div", { className: "w-80 flex-shrink-0", children: _jsx(Inspector, { title: "Global Inspector", state: globalInspect, inspect: globalInspect }) })] })] })] }));
|
|
98
|
+
}
|
|
99
|
+
export default App;
|
|
100
|
+
//# sourceMappingURL=App.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../../../../src/emulator/src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,SAAS,GAAG;IACV,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GA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,oBAAoB,YACjC,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,GAChB,IACF,EAGN,cAAK,SAAS,EAAC,oBAAoB,YACjC,KAAC,SAAS,IACR,KAAK,EAAC,kBAAkB,EACxB,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,aAAa,GACtB,GACE,IACF,IACF,IACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface InspectorProps {
|
|
2
|
+
title: string;
|
|
3
|
+
state?: Record<string, unknown>;
|
|
4
|
+
inspect?: Record<string, unknown>;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function Inspector({ title, state, inspect, className, }: InspectorProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
export function Inspector({ title, state, inspect, className, }) {
|
|
5
|
+
const [activeTab, setActiveTab] = useState("state");
|
|
6
|
+
return (_jsxs("div", { className: cn("bg-card border border-border rounded-lg overflow-hidden", className), children: [_jsx("div", { className: "px-4 py-2 border-b border-border bg-muted/50", children: _jsx("h3", { className: "text-sm font-semibold", children: title }) }), _jsxs("div", { className: "flex border-b border-border", children: [_jsx("button", { onClick: () => setActiveTab("state"), className: cn("px-4 py-2 text-sm font-medium transition-colors", activeTab === "state"
|
|
7
|
+
? "bg-background text-foreground border-b-2 border-primary"
|
|
8
|
+
: "text-muted-foreground hover:text-foreground"), children: "state" }), _jsx("button", { onClick: () => setActiveTab("inspect"), className: cn("px-4 py-2 text-sm font-medium transition-colors", activeTab === "inspect"
|
|
9
|
+
? "bg-background text-foreground border-b-2 border-primary"
|
|
10
|
+
: "text-muted-foreground hover:text-foreground"), children: "inspect" })] }), _jsx("div", { className: "p-4 bg-background", children: _jsx("pre", { className: "text-xs font-mono text-foreground whitespace-pre-wrap", children: activeTab === "state"
|
|
11
|
+
? JSON.stringify(state || {}, null, 2)
|
|
12
|
+
: JSON.stringify(inspect || {}, null, 2) }) })] }));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=Inspector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Inspector.js","sourceRoot":"","sources":["../../../../../src/emulator/src/components/Inspector.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AASrC,MAAM,UAAU,SAAS,CAAC,EACxB,KAAK,EACL,KAAK,EACL,OAAO,EACP,SAAS,GACM;IACf,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAsB,OAAO,CAAC,CAAC;IAEzE,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CACX,yDAAyD,EACzD,SAAS,CACV,aAED,cAAK,SAAS,EAAC,8CAA8C,YAC3D,aAAI,SAAS,EAAC,uBAAuB,YAAE,KAAK,GAAM,GAC9C,EACN,eAAK,SAAS,EAAC,6BAA6B,aAC1C,iBACE,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,EACpC,SAAS,EAAE,EAAE,CACX,iDAAiD,EACjD,SAAS,KAAK,OAAO;4BACnB,CAAC,CAAC,yDAAyD;4BAC3D,CAAC,CAAC,6CAA6C,CAClD,sBAGM,EACT,iBACE,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,EACtC,SAAS,EAAE,EAAE,CACX,iDAAiD,EACjD,SAAS,KAAK,SAAS;4BACrB,CAAC,CAAC,yDAAyD;4BAC3D,CAAC,CAAC,6CAA6C,CAClD,wBAGM,IACL,EACN,cAAK,SAAS,EAAC,mBAAmB,YAChC,cAAK,SAAS,EAAC,uDAAuD,YACnE,SAAS,KAAK,OAAO;wBACpB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;wBACtC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,GACtC,GACF,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function Logs({ logs }) {
|
|
3
|
+
return (_jsxs("div", { className: "h-full bg-card border border-border rounded-lg overflow-hidden flex flex-col", children: [_jsx("div", { className: "px-4 py-2 border-b border-border bg-muted/50", children: _jsx("h3", { className: "text-sm font-semibold", children: "Logs" }) }), _jsxs("div", { className: "flex-1 overflow-y-auto p-4 space-y-2", children: [logs.map((log, index) => (_jsxs("div", { className: "text-xs font-mono text-muted-foreground", children: [_jsx("span", { className: "text-foreground", children: log.timestamp }), log.type === "request" && _jsx("span", { className: "ml-2", children: " > " }), log.type === "response" && _jsx("span", { className: "ml-2", children: " v " }), _jsx("span", { className: "ml-2", children: log.message })] }, index))), logs.length === 0 && (_jsx("div", { className: "text-xs text-muted-foreground", children: "No logs yet" }))] })] }));
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=Logs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logs.js","sourceRoot":"","sources":["../../../../../src/emulator/src/components/Logs.tsx"],"names":[],"mappings":";AAUA,MAAM,UAAU,IAAI,CAAC,EAAE,IAAI,EAAa;IACtC,OAAO,CACL,eAAK,SAAS,EAAC,8EAA8E,aAC3F,cAAK,SAAS,EAAC,8CAA8C,YAC3D,aAAI,SAAS,EAAC,uBAAuB,qBAAU,GAC3C,EACN,eAAK,SAAS,EAAC,sCAAsC,aAClD,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CACxB,eAAiB,SAAS,EAAC,yCAAyC,aAClE,eAAM,SAAS,EAAC,iBAAiB,YAAE,GAAG,CAAC,SAAS,GAAQ,EACvD,GAAG,CAAC,IAAI,KAAK,SAAS,IAAI,eAAM,SAAS,EAAC,MAAM,YAAE,KAAK,GAAQ,EAC/D,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,eAAM,SAAS,EAAC,MAAM,YAAE,KAAK,GAAQ,EACjE,eAAM,SAAS,EAAC,MAAM,YAAE,GAAG,CAAC,OAAO,GAAQ,KAJnC,KAAK,CAKT,CACP,CAAC,EACD,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CACpB,cAAK,SAAS,EAAC,+BAA+B,4BAAkB,CACjE,IACG,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
export function ToolList({ tools, selectedTool, onSelectTool }) {
|
|
4
|
+
return (_jsx("div", { className: "h-full bg-muted/50 border-r border-border overflow-y-auto", children: _jsxs("div", { className: "p-4", children: [_jsx("h2", { className: "text-sm font-semibold text-muted-foreground uppercase tracking-wide mb-4", children: "Tool list" }), _jsx("div", { className: "space-y-1", children: tools.map((tool) => (_jsx("button", { onClick: () => onSelectTool(tool), className: cn("w-full text-left px-3 py-2 rounded-md text-sm transition-colors", selectedTool === tool
|
|
5
|
+
? "bg-primary text-primary-foreground"
|
|
6
|
+
: "hover:bg-muted text-foreground"), children: tool }, tool))) })] }) }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=ToolList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolList.js","sourceRoot":"","sources":["../../../../../src/emulator/src/components/ToolList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAQrC,MAAM,UAAU,QAAQ,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAiB;IAC3E,OAAO,CACL,cAAK,SAAS,EAAC,2DAA2D,YACxE,eAAK,SAAS,EAAC,KAAK,aAClB,aAAI,SAAS,EAAC,0EAA0E,0BAEnF,EACL,cAAK,SAAS,EAAC,WAAW,YACvB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,iBAEE,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EACjC,SAAS,EAAE,EAAE,CACX,iEAAiE,EACjE,YAAY,KAAK,IAAI;4BACnB,CAAC,CAAC,oCAAoC;4BACtC,CAAC,CAAC,gCAAgC,CACrC,YAEA,IAAI,IATA,IAAI,CAUF,CACV,CAAC,GACE,IACF,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
export function Widget({ data }) {
|
|
4
|
+
const [count, setCount] = useState(4);
|
|
5
|
+
if (!data) {
|
|
6
|
+
return (_jsx("div", { className: "h-full bg-yellow-50 dark:bg-yellow-950/20 border border-border rounded-lg flex items-center justify-center", children: _jsx("p", { className: "text-muted-foreground", children: "No widget data" }) }));
|
|
7
|
+
}
|
|
8
|
+
return (_jsx("div", { className: "h-full bg-yellow-50 dark:bg-yellow-950/20 border border-border rounded-lg p-6", children: _jsxs("div", { className: "flex items-start gap-4", children: [data.image && (_jsx("img", { src: data.image, alt: data.name || "Widget", className: "w-24 h-24 object-contain" })), _jsxs("div", { className: "flex-1", children: [_jsxs("h3", { className: "text-xl font-semibold mb-1", children: [data.name || "Unknown", data.type && (_jsxs("span", { className: "text-muted-foreground ml-2", children: ["- ", data.type] }))] }), _jsxs("p", { className: "text-sm text-muted-foreground mb-4", children: ["counter: ", count] }), _jsx("button", { onClick: () => setCount(count + 1), className: "px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors", children: "increment" })] })] }) }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=Widget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Widget.js","sourceRoot":"","sources":["../../../../../src/emulator/src/components/Widget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUjC,MAAM,UAAU,MAAM,CAAC,EAAE,IAAI,EAAe;IAC1C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEtC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,CACL,cAAK,SAAS,EAAC,4GAA4G,YACzH,YAAG,SAAS,EAAC,uBAAuB,+BAAmB,GACnD,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAC,+EAA+E,YAC5F,eAAK,SAAS,EAAC,wBAAwB,aACpC,IAAI,CAAC,KAAK,IAAI,CACb,cACE,GAAG,EAAE,IAAI,CAAC,KAAK,EACf,GAAG,EAAE,IAAI,CAAC,IAAI,IAAI,QAAQ,EAC1B,SAAS,EAAC,0BAA0B,GACpC,CACH,EACD,eAAK,SAAS,EAAC,QAAQ,aACrB,cAAI,SAAS,EAAC,4BAA4B,aACvC,IAAI,CAAC,IAAI,IAAI,SAAS,EACtB,IAAI,CAAC,IAAI,IAAI,CACZ,gBAAM,SAAS,EAAC,4BAA4B,mBAAI,IAAI,CAAC,IAAI,IAAQ,CAClE,IACE,EACL,aAAG,SAAS,EAAC,oCAAoC,0BAAW,KAAK,IAAK,EACtE,iBACE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,EAClC,SAAS,EAAC,+FAA+F,0BAGlG,IACL,IACF,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/emulator/src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.css";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { StrictMode } from "react";
|
|
3
|
+
import { createRoot } from "react-dom/client";
|
|
4
|
+
import "./index.css";
|
|
5
|
+
import App from "./App.js";
|
|
6
|
+
createRoot(document.getElementById("root")).render(_jsx(StrictMode, { children: _jsx(App, {}) }));
|
|
7
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../../src/emulator/src/main.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,aAAa,CAAC;AACrB,OAAO,GAAG,MAAM,UAAU,CAAC;AAE3B,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAE,CAAC,CAAC,MAAM,CACjD,KAAC,UAAU,cACT,KAAC,GAAG,KAAG,GACI,CACd,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RegisteredResource, RegisteredResourceTemplate, RegisteredTool, RegisteredPrompt } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
type _registeredResources = {
|
|
3
|
+
[uri: string]: RegisteredResource;
|
|
4
|
+
};
|
|
5
|
+
type _registeredResourceTemplates = {
|
|
6
|
+
[name: string]: RegisteredResourceTemplate;
|
|
7
|
+
};
|
|
8
|
+
type _registeredTools = {
|
|
9
|
+
[name: string]: RegisteredTool;
|
|
10
|
+
};
|
|
11
|
+
type _registeredPrompts = {
|
|
12
|
+
[name: string]: RegisteredPrompt;
|
|
13
|
+
};
|
|
14
|
+
export type EmulatorMetadata = {
|
|
15
|
+
registeredResources: _registeredResources;
|
|
16
|
+
registeredResourceTemplates: _registeredResourceTemplates;
|
|
17
|
+
registeredTools: _registeredTools;
|
|
18
|
+
registeredPrompts: _registeredPrompts;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/emulator/src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
darkMode: ["class"];
|
|
3
|
+
content: string[];
|
|
4
|
+
theme: {
|
|
5
|
+
extend: {
|
|
6
|
+
colors: {
|
|
7
|
+
background: string;
|
|
8
|
+
foreground: string;
|
|
9
|
+
card: {
|
|
10
|
+
DEFAULT: string;
|
|
11
|
+
foreground: string;
|
|
12
|
+
};
|
|
13
|
+
popover: {
|
|
14
|
+
DEFAULT: string;
|
|
15
|
+
foreground: string;
|
|
16
|
+
};
|
|
17
|
+
primary: {
|
|
18
|
+
DEFAULT: string;
|
|
19
|
+
foreground: string;
|
|
20
|
+
};
|
|
21
|
+
secondary: {
|
|
22
|
+
DEFAULT: string;
|
|
23
|
+
foreground: string;
|
|
24
|
+
};
|
|
25
|
+
muted: {
|
|
26
|
+
DEFAULT: string;
|
|
27
|
+
foreground: string;
|
|
28
|
+
};
|
|
29
|
+
accent: {
|
|
30
|
+
DEFAULT: string;
|
|
31
|
+
foreground: string;
|
|
32
|
+
};
|
|
33
|
+
destructive: {
|
|
34
|
+
DEFAULT: string;
|
|
35
|
+
foreground: string;
|
|
36
|
+
};
|
|
37
|
+
border: string;
|
|
38
|
+
input: string;
|
|
39
|
+
ring: string;
|
|
40
|
+
};
|
|
41
|
+
borderRadius: {
|
|
42
|
+
lg: string;
|
|
43
|
+
md: string;
|
|
44
|
+
sm: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
plugins: never[];
|
|
49
|
+
};
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
darkMode: ["class"],
|
|
4
|
+
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
|
|
5
|
+
theme: {
|
|
6
|
+
extend: {
|
|
7
|
+
colors: {
|
|
8
|
+
background: "hsl(var(--background))",
|
|
9
|
+
foreground: "hsl(var(--foreground))",
|
|
10
|
+
card: {
|
|
11
|
+
DEFAULT: "hsl(var(--card))",
|
|
12
|
+
foreground: "hsl(var(--card-foreground))",
|
|
13
|
+
},
|
|
14
|
+
popover: {
|
|
15
|
+
DEFAULT: "hsl(var(--popover))",
|
|
16
|
+
foreground: "hsl(var(--popover-foreground))",
|
|
17
|
+
},
|
|
18
|
+
primary: {
|
|
19
|
+
DEFAULT: "hsl(var(--primary))",
|
|
20
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
21
|
+
},
|
|
22
|
+
secondary: {
|
|
23
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
24
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
25
|
+
},
|
|
26
|
+
muted: {
|
|
27
|
+
DEFAULT: "hsl(var(--muted))",
|
|
28
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
29
|
+
},
|
|
30
|
+
accent: {
|
|
31
|
+
DEFAULT: "hsl(var(--accent))",
|
|
32
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
33
|
+
},
|
|
34
|
+
destructive: {
|
|
35
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
36
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
37
|
+
},
|
|
38
|
+
border: "hsl(var(--border))",
|
|
39
|
+
input: "hsl(var(--input))",
|
|
40
|
+
ring: "hsl(var(--ring))",
|
|
41
|
+
},
|
|
42
|
+
borderRadius: {
|
|
43
|
+
lg: "var(--radius)",
|
|
44
|
+
md: "calc(var(--radius) - 2px)",
|
|
45
|
+
sm: "calc(var(--radius) - 4px)",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
plugins: [],
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=tailwind.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tailwind.config.js","sourceRoot":"","sources":["../../../src/emulator/tailwind.config.js"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,eAAe;IACb,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,OAAO,EAAE,CAAC,cAAc,EAAE,4BAA4B,CAAC;IACvD,KAAK,EAAE;QACL,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,UAAU,EAAE,wBAAwB;gBACpC,UAAU,EAAE,wBAAwB;gBACpC,IAAI,EAAE;oBACJ,OAAO,EAAE,kBAAkB;oBAC3B,UAAU,EAAE,6BAA6B;iBAC1C;gBACD,OAAO,EAAE;oBACP,OAAO,EAAE,qBAAqB;oBAC9B,UAAU,EAAE,gCAAgC;iBAC7C;gBACD,OAAO,EAAE;oBACP,OAAO,EAAE,qBAAqB;oBAC9B,UAAU,EAAE,gCAAgC;iBAC7C;gBACD,SAAS,EAAE;oBACT,OAAO,EAAE,uBAAuB;oBAChC,UAAU,EAAE,kCAAkC;iBAC/C;gBACD,KAAK,EAAE;oBACL,OAAO,EAAE,mBAAmB;oBAC5B,UAAU,EAAE,8BAA8B;iBAC3C;gBACD,MAAM,EAAE;oBACN,OAAO,EAAE,oBAAoB;oBAC7B,UAAU,EAAE,+BAA+B;iBAC5C;gBACD,WAAW,EAAE;oBACX,OAAO,EAAE,yBAAyB;oBAClC,UAAU,EAAE,oCAAoC;iBACjD;gBACD,MAAM,EAAE,oBAAoB;gBAC5B,KAAK,EAAE,mBAAmB;gBAC1B,IAAI,EAAE,kBAAkB;aACzB;YACD,YAAY,EAAE;gBACZ,EAAE,EAAE,eAAe;gBACnB,EAAE,EAAE,2BAA2B;gBAC/B,EAAE,EAAE,2BAA2B;aAChC;SACF;KACF;IACD,OAAO,EAAE,EAAE;CACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.config.js","sourceRoot":"","sources":["../../../src/emulator/vite.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,MAAM,sBAAsB,CAAC;AAEzC,2BAA2B;AAC3B,eAAe,YAAY,CAAC;IAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC;CACnB,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type RequestHandler } from "express";
|
|
2
|
+
import type { McpServer } from "./server.js";
|
|
3
|
+
/**
|
|
4
|
+
* Serve the built emulator React app
|
|
5
|
+
* This router serves static files from the emulator's dist directory.
|
|
6
|
+
* It should be installed at the application root, like so:
|
|
7
|
+
*
|
|
8
|
+
* const app = express();
|
|
9
|
+
*
|
|
10
|
+
* if (env.NODE_ENV === "production") {
|
|
11
|
+
* app.use(await emulatorStaticServer(server));
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export declare const emulatorStaticServer: (server: McpServer) => Promise<RequestHandler>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import cors from "cors";
|
|
2
|
+
import express, {} from "express";
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import SuperJSON from "superjson";
|
|
7
|
+
/**
|
|
8
|
+
* Serve the built emulator React app
|
|
9
|
+
* This router serves static files from the emulator's dist directory.
|
|
10
|
+
* It should be installed at the application root, like so:
|
|
11
|
+
*
|
|
12
|
+
* const app = express();
|
|
13
|
+
*
|
|
14
|
+
* if (env.NODE_ENV === "production") {
|
|
15
|
+
* app.use(await emulatorStaticServer(server));
|
|
16
|
+
* }
|
|
17
|
+
*/
|
|
18
|
+
export const emulatorStaticServer = async (server) => {
|
|
19
|
+
const router = express.Router();
|
|
20
|
+
const currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
21
|
+
const distPath = path.join(currentDir, "..", "emulator", "dist");
|
|
22
|
+
router.use(cors());
|
|
23
|
+
router.get("/_emulator/metadata", async (_req, res) => {
|
|
24
|
+
const metadata = SuperJSON.serialize(server);
|
|
25
|
+
res.json(metadata);
|
|
26
|
+
});
|
|
27
|
+
router.use(express.static(distPath));
|
|
28
|
+
router.get("/{*splat}", (_req, res, next) => {
|
|
29
|
+
const indexHtmlPath = path.join(distPath, "index.html");
|
|
30
|
+
try {
|
|
31
|
+
const indexHtml = readFileSync(indexHtmlPath, "utf-8");
|
|
32
|
+
res.setHeader("Content-Type", "text/html");
|
|
33
|
+
res.send(indexHtml);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
next(error);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return router;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=emulatorStaticServer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emulatorStaticServer.js","sourceRoot":"","sources":["../../../src/server/emulatorStaticServer.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAO,EAAE,EAAuB,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,SAAS,MAAM,WAAW,CA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CAAC,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { McpServer } from "./server.js";
|
|
2
2
|
export { widgetsDevServer } from "./widgetsDevServer.js";
|
|
3
|
-
export {
|
|
3
|
+
export { emulatorStaticServer } from "./emulatorStaticServer.js";
|
|
4
|
+
export type { ToolDef, McpServerTypes } from "./server.js";
|
|
5
|
+
export type { InferTools, AnyToolRegistry, ToolNames, ToolInput, ToolOutput, } from "./inferUtilityTypes.js";
|
package/dist/src/server/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
|