skybridge 0.0.0-dev.7eec2ca → 0.0.0-dev.8042823

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 (312) hide show
  1. package/bin/run.js +5 -0
  2. package/dist/cli/header.d.ts +4 -0
  3. package/dist/cli/header.js +6 -0
  4. package/dist/cli/header.js.map +1 -0
  5. package/dist/cli/run-command.d.ts +2 -0
  6. package/dist/cli/run-command.js +43 -0
  7. package/dist/cli/run-command.js.map +1 -0
  8. package/dist/cli/telemetry.d.ts +7 -0
  9. package/dist/cli/telemetry.js +123 -0
  10. package/dist/cli/telemetry.js.map +1 -0
  11. package/dist/cli/use-execute-steps.d.ts +10 -0
  12. package/dist/cli/use-execute-steps.js +31 -0
  13. package/dist/cli/use-execute-steps.js.map +1 -0
  14. package/dist/commands/build.d.ts +9 -0
  15. package/dist/commands/build.js +44 -0
  16. package/dist/commands/build.js.map +1 -0
  17. package/dist/commands/dev.d.ts +9 -0
  18. package/dist/commands/dev.js +32 -0
  19. package/dist/commands/dev.js.map +1 -0
  20. package/dist/commands/start.d.ts +7 -0
  21. package/dist/commands/start.js +33 -0
  22. package/dist/commands/start.js.map +1 -0
  23. package/dist/commands/telemetry/disable.d.ts +5 -0
  24. package/dist/commands/telemetry/disable.js +14 -0
  25. package/dist/commands/telemetry/disable.js.map +1 -0
  26. package/dist/commands/telemetry/enable.d.ts +5 -0
  27. package/dist/commands/telemetry/enable.js +14 -0
  28. package/dist/commands/telemetry/enable.js.map +1 -0
  29. package/dist/commands/telemetry/status.d.ts +5 -0
  30. package/dist/commands/telemetry/status.js +14 -0
  31. package/dist/commands/telemetry/status.js.map +1 -0
  32. package/dist/{src/server → server}/index.d.ts +1 -2
  33. package/dist/{src/server → server}/index.js +0 -1
  34. package/dist/server/index.js.map +1 -0
  35. package/dist/server/inferUtilityTypes.js.map +1 -0
  36. package/dist/{src/server → server}/server.d.ts +27 -1
  37. package/dist/server/server.js +139 -0
  38. package/dist/server/server.js.map +1 -0
  39. package/dist/{src/server → server}/templateHelper.d.ts +3 -2
  40. package/dist/server/templateHelper.js.map +1 -0
  41. package/dist/server/templates/development.hbs +66 -0
  42. package/dist/{src/server → server}/templates/production.hbs +1 -1
  43. package/dist/{src/server → server}/widgetsDevServer.d.ts +2 -2
  44. package/dist/{src/server → server}/widgetsDevServer.js +11 -3
  45. package/dist/server/widgetsDevServer.js.map +1 -0
  46. package/dist/test/utils.js.map +1 -0
  47. package/dist/test/widget.test.js +255 -0
  48. package/dist/test/widget.test.js.map +1 -0
  49. package/dist/web/bridges/apps-sdk/adaptor.d.ts +22 -0
  50. package/dist/web/bridges/apps-sdk/adaptor.js +64 -0
  51. package/dist/web/bridges/apps-sdk/adaptor.js.map +1 -0
  52. package/dist/web/bridges/apps-sdk/bridge.d.ts +10 -0
  53. package/dist/web/bridges/apps-sdk/bridge.js +46 -0
  54. package/dist/web/bridges/apps-sdk/bridge.js.map +1 -0
  55. package/dist/web/bridges/apps-sdk/index.d.ts +5 -0
  56. package/dist/web/bridges/apps-sdk/index.js +5 -0
  57. package/dist/web/bridges/apps-sdk/index.js.map +1 -0
  58. package/dist/{src/web → web/bridges/apps-sdk}/types.d.ts +27 -49
  59. package/dist/{src/web → web/bridges/apps-sdk}/types.js +0 -1
  60. package/dist/web/bridges/apps-sdk/types.js.map +1 -0
  61. package/dist/web/bridges/apps-sdk/use-apps-sdk-context.d.ts +2 -0
  62. package/dist/web/bridges/apps-sdk/use-apps-sdk-context.js +7 -0
  63. package/dist/web/bridges/apps-sdk/use-apps-sdk-context.js.map +1 -0
  64. package/dist/web/bridges/get-adaptor.d.ts +2 -0
  65. package/dist/web/bridges/get-adaptor.js +8 -0
  66. package/dist/web/bridges/get-adaptor.js.map +1 -0
  67. package/dist/web/bridges/index.d.ts +5 -0
  68. package/dist/web/bridges/index.js +6 -0
  69. package/dist/web/bridges/index.js.map +1 -0
  70. package/dist/web/bridges/mcp-app/adaptor.d.ts +36 -0
  71. package/dist/web/bridges/mcp-app/adaptor.js +185 -0
  72. package/dist/web/bridges/mcp-app/adaptor.js.map +1 -0
  73. package/dist/web/bridges/mcp-app/bridge.d.ts +43 -0
  74. package/dist/web/bridges/mcp-app/bridge.js +255 -0
  75. package/dist/web/bridges/mcp-app/bridge.js.map +1 -0
  76. package/dist/web/bridges/mcp-app/index.d.ts +4 -0
  77. package/dist/web/bridges/mcp-app/index.js +4 -0
  78. package/dist/web/bridges/mcp-app/index.js.map +1 -0
  79. package/dist/web/bridges/mcp-app/types.d.ts +8 -0
  80. package/dist/web/bridges/mcp-app/types.js +2 -0
  81. package/dist/web/bridges/mcp-app/types.js.map +1 -0
  82. package/dist/web/bridges/mcp-app/use-mcp-app-context.d.ts +5 -0
  83. package/dist/web/bridges/mcp-app/use-mcp-app-context.js +7 -0
  84. package/dist/web/bridges/mcp-app/use-mcp-app-context.js.map +1 -0
  85. package/dist/web/bridges/mcp-app/use-mcp-app-context.test.js +66 -0
  86. package/dist/web/bridges/mcp-app/use-mcp-app-context.test.js.map +1 -0
  87. package/dist/web/bridges/types.d.ts +98 -0
  88. package/dist/web/bridges/types.js +2 -0
  89. package/dist/web/bridges/types.js.map +1 -0
  90. package/dist/web/bridges/use-host-context.d.ts +2 -0
  91. package/dist/web/bridges/use-host-context.js +8 -0
  92. package/dist/web/bridges/use-host-context.js.map +1 -0
  93. package/dist/web/components/modal-provider.d.ts +4 -0
  94. package/dist/web/components/modal-provider.js +47 -0
  95. package/dist/web/components/modal-provider.js.map +1 -0
  96. package/dist/{src/web → web}/create-store.js +6 -7
  97. package/dist/web/create-store.js.map +1 -0
  98. package/dist/web/create-store.test.js +126 -0
  99. package/dist/web/create-store.test.js.map +1 -0
  100. package/dist/{src/web → web}/data-llm.js +9 -5
  101. package/dist/web/data-llm.js.map +1 -0
  102. package/dist/web/data-llm.test.js +139 -0
  103. package/dist/web/data-llm.test.js.map +1 -0
  104. package/dist/{src/web → web}/generate-helpers.d.ts +3 -2
  105. package/dist/{src/web → web}/generate-helpers.js +1 -1
  106. package/dist/web/generate-helpers.js.map +1 -0
  107. package/dist/{src/web → web}/generate-helpers.test-d.js +4 -1
  108. package/dist/web/generate-helpers.test-d.js.map +1 -0
  109. package/dist/web/generate-helpers.test.js.map +1 -0
  110. package/dist/{src/web → web}/helpers/state.js +13 -8
  111. package/dist/web/helpers/state.js.map +1 -0
  112. package/dist/web/helpers/state.test.js.map +1 -0
  113. package/dist/{src/web → web}/hooks/index.d.ts +3 -4
  114. package/dist/{src/web → web}/hooks/index.js +3 -4
  115. package/dist/web/hooks/index.js.map +1 -0
  116. package/dist/web/hooks/test/utils.d.ts +16 -0
  117. package/dist/web/hooks/test/utils.js +60 -0
  118. package/dist/web/hooks/test/utils.js.map +1 -0
  119. package/dist/{src/web → web}/hooks/use-call-tool.d.ts +2 -1
  120. package/dist/{src/web → web}/hooks/use-call-tool.js +12 -4
  121. package/dist/web/hooks/use-call-tool.js.map +1 -0
  122. package/dist/web/hooks/use-call-tool.test-d.js.map +1 -0
  123. package/dist/{src/web → web}/hooks/use-call-tool.test.js +26 -1
  124. package/dist/web/hooks/use-call-tool.test.js.map +1 -0
  125. package/dist/{src/web → web}/hooks/use-display-mode.d.ts +1 -1
  126. package/dist/web/hooks/use-display-mode.js +9 -0
  127. package/dist/web/hooks/use-display-mode.js.map +1 -0
  128. package/dist/{src/web → web}/hooks/use-display-mode.test.js +1 -0
  129. package/dist/web/hooks/use-display-mode.test.js.map +1 -0
  130. package/dist/web/hooks/use-files.d.ts +6 -0
  131. package/dist/web/hooks/use-files.js +9 -0
  132. package/dist/web/hooks/use-files.js.map +1 -0
  133. package/dist/{src/web → web}/hooks/use-files.test.js +5 -4
  134. package/dist/web/hooks/use-files.test.js.map +1 -0
  135. package/dist/web/hooks/use-layout.d.ts +22 -0
  136. package/dist/web/hooks/use-layout.js +23 -0
  137. package/dist/web/hooks/use-layout.js.map +1 -0
  138. package/dist/web/hooks/use-layout.test.js +96 -0
  139. package/dist/web/hooks/use-layout.test.js.map +1 -0
  140. package/dist/web/hooks/use-open-external.js +8 -0
  141. package/dist/web/hooks/use-open-external.js.map +1 -0
  142. package/dist/web/hooks/use-open-external.test.js +50 -0
  143. package/dist/web/hooks/use-open-external.test.js.map +1 -0
  144. package/dist/web/hooks/use-request-modal.d.ts +9 -0
  145. package/dist/web/hooks/use-request-modal.js +16 -0
  146. package/dist/web/hooks/use-request-modal.js.map +1 -0
  147. package/dist/web/hooks/use-request-modal.test.js +57 -0
  148. package/dist/web/hooks/use-request-modal.test.js.map +1 -0
  149. package/dist/web/hooks/use-send-follow-up-message.js +8 -0
  150. package/dist/web/hooks/use-send-follow-up-message.js.map +1 -0
  151. package/dist/web/hooks/use-set-open-in-app-url.d.ts +1 -0
  152. package/dist/web/hooks/use-set-open-in-app-url.js +8 -0
  153. package/dist/web/hooks/use-set-open-in-app-url.js.map +1 -0
  154. package/dist/web/hooks/use-set-open-in-app-url.test.js +49 -0
  155. package/dist/web/hooks/use-set-open-in-app-url.test.js.map +1 -0
  156. package/dist/{src/web → web}/hooks/use-tool-info.d.ts +12 -1
  157. package/dist/web/hooks/use-tool-info.js +26 -0
  158. package/dist/web/hooks/use-tool-info.js.map +1 -0
  159. package/dist/{src/web → web}/hooks/use-tool-info.test-d.js +40 -4
  160. package/dist/web/hooks/use-tool-info.test-d.js.map +1 -0
  161. package/dist/web/hooks/use-tool-info.test.js +130 -0
  162. package/dist/web/hooks/use-tool-info.test.js.map +1 -0
  163. package/dist/web/hooks/use-user.d.ts +18 -0
  164. package/dist/web/hooks/use-user.js +19 -0
  165. package/dist/web/hooks/use-user.js.map +1 -0
  166. package/dist/web/hooks/use-user.test.js +94 -0
  167. package/dist/web/hooks/use-user.test.js.map +1 -0
  168. package/dist/{src/web → web}/hooks/use-widget-state.js +10 -10
  169. package/dist/web/hooks/use-widget-state.js.map +1 -0
  170. package/dist/{src/web → web}/hooks/use-widget-state.test.js +1 -0
  171. package/dist/web/hooks/use-widget-state.test.js.map +1 -0
  172. package/dist/{src/web → web}/index.d.ts +1 -0
  173. package/dist/{src/web → web}/index.js +1 -0
  174. package/dist/web/index.js.map +1 -0
  175. package/dist/{src/web → web}/mount-widget.js +9 -1
  176. package/dist/web/mount-widget.js.map +1 -0
  177. package/dist/web/plugin/data-llm.test.js.map +1 -0
  178. package/dist/web/plugin/plugin.js.map +1 -0
  179. package/dist/{src/web → web}/plugin/transform-data-llm.js +6 -3
  180. package/dist/web/plugin/transform-data-llm.js.map +1 -0
  181. package/dist/web/plugin/transform-data-llm.test.d.ts +1 -0
  182. package/dist/web/plugin/transform-data-llm.test.js.map +1 -0
  183. package/dist/web/proxy.js.map +1 -0
  184. package/dist/web/types.d.ts +16 -0
  185. package/dist/web/types.js +2 -0
  186. package/dist/web/types.js.map +1 -0
  187. package/package.json +59 -37
  188. package/README.md +0 -125
  189. package/dist/src/server/devtoolsStaticServer.d.ts +0 -15
  190. package/dist/src/server/devtoolsStaticServer.js +0 -38
  191. package/dist/src/server/devtoolsStaticServer.js.map +0 -1
  192. package/dist/src/server/index.js.map +0 -1
  193. package/dist/src/server/inferUtilityTypes.js.map +0 -1
  194. package/dist/src/server/server.js +0 -82
  195. package/dist/src/server/server.js.map +0 -1
  196. package/dist/src/server/templateHelper.js.map +0 -1
  197. package/dist/src/server/templates/development.hbs +0 -13
  198. package/dist/src/server/widgetsDevServer.js.map +0 -1
  199. package/dist/src/test/utils.js.map +0 -1
  200. package/dist/src/test/widget.test.js +0 -134
  201. package/dist/src/test/widget.test.js.map +0 -1
  202. package/dist/src/web/create-store.js.map +0 -1
  203. package/dist/src/web/create-store.test.js +0 -70
  204. package/dist/src/web/create-store.test.js.map +0 -1
  205. package/dist/src/web/data-llm.js.map +0 -1
  206. package/dist/src/web/data-llm.test.js +0 -76
  207. package/dist/src/web/data-llm.test.js.map +0 -1
  208. package/dist/src/web/generate-helpers.js.map +0 -1
  209. package/dist/src/web/generate-helpers.test-d.js.map +0 -1
  210. package/dist/src/web/generate-helpers.test.js.map +0 -1
  211. package/dist/src/web/helpers/state.js.map +0 -1
  212. package/dist/src/web/helpers/state.test.js.map +0 -1
  213. package/dist/src/web/hooks/index.js.map +0 -1
  214. package/dist/src/web/hooks/use-call-tool.js.map +0 -1
  215. package/dist/src/web/hooks/use-call-tool.test-d.js.map +0 -1
  216. package/dist/src/web/hooks/use-call-tool.test.js.map +0 -1
  217. package/dist/src/web/hooks/use-display-mode.js +0 -7
  218. package/dist/src/web/hooks/use-display-mode.js.map +0 -1
  219. package/dist/src/web/hooks/use-display-mode.test.js.map +0 -1
  220. package/dist/src/web/hooks/use-files.d.ts +0 -10
  221. package/dist/src/web/hooks/use-files.js +0 -7
  222. package/dist/src/web/hooks/use-files.js.map +0 -1
  223. package/dist/src/web/hooks/use-files.test.js.map +0 -1
  224. package/dist/src/web/hooks/use-locale.d.ts +0 -1
  225. package/dist/src/web/hooks/use-locale.js +0 -5
  226. package/dist/src/web/hooks/use-locale.js.map +0 -1
  227. package/dist/src/web/hooks/use-locale.test.js +0 -21
  228. package/dist/src/web/hooks/use-locale.test.js.map +0 -1
  229. package/dist/src/web/hooks/use-open-external.js +0 -6
  230. package/dist/src/web/hooks/use-open-external.js.map +0 -1
  231. package/dist/src/web/hooks/use-open-external.test.js +0 -24
  232. package/dist/src/web/hooks/use-open-external.test.js.map +0 -1
  233. package/dist/src/web/hooks/use-openai-global.d.ts +0 -2
  234. package/dist/src/web/hooks/use-openai-global.js +0 -25
  235. package/dist/src/web/hooks/use-openai-global.js.map +0 -1
  236. package/dist/src/web/hooks/use-request-modal.d.ts +0 -6
  237. package/dist/src/web/hooks/use-request-modal.js +0 -9
  238. package/dist/src/web/hooks/use-request-modal.js.map +0 -1
  239. package/dist/src/web/hooks/use-request-modal.test.js +0 -24
  240. package/dist/src/web/hooks/use-request-modal.test.js.map +0 -1
  241. package/dist/src/web/hooks/use-send-follow-up-message.js +0 -11
  242. package/dist/src/web/hooks/use-send-follow-up-message.js.map +0 -1
  243. package/dist/src/web/hooks/use-theme.d.ts +0 -1
  244. package/dist/src/web/hooks/use-theme.js +0 -5
  245. package/dist/src/web/hooks/use-theme.js.map +0 -1
  246. package/dist/src/web/hooks/use-theme.test.js +0 -26
  247. package/dist/src/web/hooks/use-theme.test.js.map +0 -1
  248. package/dist/src/web/hooks/use-tool-info.js +0 -20
  249. package/dist/src/web/hooks/use-tool-info.js.map +0 -1
  250. package/dist/src/web/hooks/use-tool-info.test-d.js.map +0 -1
  251. package/dist/src/web/hooks/use-tool-info.test.js +0 -59
  252. package/dist/src/web/hooks/use-tool-info.test.js.map +0 -1
  253. package/dist/src/web/hooks/use-user-agent.d.ts +0 -1
  254. package/dist/src/web/hooks/use-user-agent.js +0 -5
  255. package/dist/src/web/hooks/use-user-agent.js.map +0 -1
  256. package/dist/src/web/hooks/use-user-agent.test.js +0 -31
  257. package/dist/src/web/hooks/use-user-agent.test.js.map +0 -1
  258. package/dist/src/web/hooks/use-widget-state.js.map +0 -1
  259. package/dist/src/web/hooks/use-widget-state.test.js.map +0 -1
  260. package/dist/src/web/index.js.map +0 -1
  261. package/dist/src/web/mount-widget.js.map +0 -1
  262. package/dist/src/web/plugin/data-llm.test.js.map +0 -1
  263. package/dist/src/web/plugin/plugin.js.map +0 -1
  264. package/dist/src/web/plugin/transform-data-llm.js.map +0 -1
  265. package/dist/src/web/plugin/transform-data-llm.test.js.map +0 -1
  266. package/dist/src/web/proxy.js.map +0 -1
  267. package/dist/src/web/types.js.map +0 -1
  268. package/dist/vitest.config.d.ts +0 -2
  269. package/dist/vitest.config.js +0 -8
  270. package/dist/vitest.config.js.map +0 -1
  271. /package/dist/{src/server → server}/inferUtilityTypes.d.ts +0 -0
  272. /package/dist/{src/server → server}/inferUtilityTypes.js +0 -0
  273. /package/dist/{src/server → server}/templateHelper.js +0 -0
  274. /package/dist/{src/test → test}/utils.d.ts +0 -0
  275. /package/dist/{src/test → test}/utils.js +0 -0
  276. /package/dist/{src/test → test}/widget.test.d.ts +0 -0
  277. /package/dist/{src/web/create-store.test.d.ts → web/bridges/mcp-app/use-mcp-app-context.test.d.ts} +0 -0
  278. /package/dist/{src/web → web}/create-store.d.ts +0 -0
  279. /package/dist/{src/web/data-llm.test.d.ts → web/create-store.test.d.ts} +0 -0
  280. /package/dist/{src/web → web}/data-llm.d.ts +0 -0
  281. /package/dist/{src/web/plugin → web}/data-llm.test.d.ts +0 -0
  282. /package/dist/{src/web → web}/generate-helpers.test-d.d.ts +0 -0
  283. /package/dist/{src/web → web}/generate-helpers.test.d.ts +0 -0
  284. /package/dist/{src/web → web}/generate-helpers.test.js +0 -0
  285. /package/dist/{src/web → web}/helpers/state.d.ts +0 -0
  286. /package/dist/{src/web → web}/helpers/state.test.d.ts +0 -0
  287. /package/dist/{src/web → web}/helpers/state.test.js +0 -0
  288. /package/dist/{src/web → web}/hooks/use-call-tool.test-d.d.ts +0 -0
  289. /package/dist/{src/web → web}/hooks/use-call-tool.test-d.js +0 -0
  290. /package/dist/{src/web → web}/hooks/use-call-tool.test.d.ts +0 -0
  291. /package/dist/{src/web → web}/hooks/use-display-mode.test.d.ts +0 -0
  292. /package/dist/{src/web → web}/hooks/use-files.test.d.ts +0 -0
  293. /package/dist/{src/web/hooks/use-locale.test.d.ts → web/hooks/use-layout.test.d.ts} +0 -0
  294. /package/dist/{src/web → web}/hooks/use-open-external.d.ts +0 -0
  295. /package/dist/{src/web → web}/hooks/use-open-external.test.d.ts +0 -0
  296. /package/dist/{src/web → web}/hooks/use-request-modal.test.d.ts +0 -0
  297. /package/dist/{src/web → web}/hooks/use-send-follow-up-message.d.ts +0 -0
  298. /package/dist/{src/web/hooks/use-theme.test.d.ts → web/hooks/use-set-open-in-app-url.test.d.ts} +0 -0
  299. /package/dist/{src/web → web}/hooks/use-tool-info.test-d.d.ts +0 -0
  300. /package/dist/{src/web → web}/hooks/use-tool-info.test.d.ts +0 -0
  301. /package/dist/{src/web/hooks/use-user-agent.test.d.ts → web/hooks/use-user.test.d.ts} +0 -0
  302. /package/dist/{src/web → web}/hooks/use-widget-state.d.ts +0 -0
  303. /package/dist/{src/web → web}/hooks/use-widget-state.test.d.ts +0 -0
  304. /package/dist/{src/web → web}/mount-widget.d.ts +0 -0
  305. /package/dist/{src/web/plugin/transform-data-llm.test.d.ts → web/plugin/data-llm.test.d.ts} +0 -0
  306. /package/dist/{src/web → web}/plugin/data-llm.test.js +0 -0
  307. /package/dist/{src/web → web}/plugin/plugin.d.ts +0 -0
  308. /package/dist/{src/web → web}/plugin/plugin.js +0 -0
  309. /package/dist/{src/web → web}/plugin/transform-data-llm.d.ts +0 -0
  310. /package/dist/{src/web → web}/plugin/transform-data-llm.test.js +0 -0
  311. /package/dist/{src/web → web}/proxy.d.ts +0 -0
  312. /package/dist/{src/web → web}/proxy.js +0 -0
package/bin/run.js ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execute } from "@oclif/core";
4
+
5
+ await execute({ dir: import.meta.url });
@@ -0,0 +1,4 @@
1
+ export declare const Header: ({ version, children, }: {
2
+ version: string;
3
+ children?: React.ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ export const Header = ({ version, children, }) => {
4
+ return (_jsxs(Box, { marginBottom: 1, children: [_jsxs(Text, { color: "cyan", bold: true, children: ["\u26F0", " ", "Welcome to Skybridge"] }), _jsxs(Text, { color: "cyan", children: [" v", version] }), children] }));
5
+ };
6
+ //# sourceMappingURL=header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/cli/header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,OAAO,EACP,QAAQ,GAIT,EAAE,EAAE;IACH,OAAO,CACL,MAAC,GAAG,IAAC,YAAY,EAAE,CAAC,aAClB,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,6BACnB,IAAI,4BACD,EACP,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,mBAAI,OAAO,IAAQ,EACpC,QAAQ,IACL,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type SpawnOptions } from "node:child_process";
2
+ export declare function runCommand(command: string, options?: SpawnOptions): Promise<void>;
@@ -0,0 +1,43 @@
1
+ import { spawn } from "node:child_process";
2
+ export function runCommand(command, options = {
3
+ stdio: ["ignore", "inherit", "inherit"],
4
+ }) {
5
+ return new Promise((resolve, reject) => {
6
+ const stdoutChunks = [];
7
+ const stderrChunks = [];
8
+ const proc = spawn(command, {
9
+ ...options,
10
+ shell: true,
11
+ });
12
+ if (proc.stdout) {
13
+ proc.stdout.on("data", (chunk) => {
14
+ stdoutChunks.push(chunk);
15
+ });
16
+ }
17
+ if (proc.stderr) {
18
+ proc.stderr.on("data", (chunk) => {
19
+ stderrChunks.push(chunk);
20
+ });
21
+ }
22
+ proc.on("close", (code) => {
23
+ if (code === 0) {
24
+ resolve();
25
+ }
26
+ else {
27
+ const stdoutOutput = Buffer.concat(stdoutChunks).toString();
28
+ const stderrOutput = Buffer.concat(stderrChunks).toString();
29
+ const allOutput = [stdoutOutput, stderrOutput]
30
+ .filter((output) => output.trim())
31
+ .join("\n");
32
+ const errorMessage = allOutput
33
+ ? `Command failed with exit code ${code}\n${allOutput}`
34
+ : `Command failed with exit code ${code}`;
35
+ reject(new Error(errorMessage));
36
+ }
37
+ });
38
+ proc.on("error", (error) => {
39
+ reject(error);
40
+ });
41
+ });
42
+ }
43
+ //# sourceMappingURL=run-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-command.js","sourceRoot":"","sources":["../../src/cli/run-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE9D,MAAM,UAAU,UAAU,CACxB,OAAe,EACf,UAAw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gBACd,MAAM,YAAY,GAAG,SAAS;oBAC5B,CAAC,CAAC,iCAAiC,IAAI,KAAK,SAAS,EAAE;oBACvD,CAAC,CAAC,iCAAiC,IAAI,EAAE,CAAC;gBAC5C,MAAM,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;YAClC,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACzB,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Hook } from "@oclif/core";
2
+ export declare function isEnabled(): boolean;
3
+ export declare function isDebugMode(): boolean;
4
+ export declare function setEnabled(enabled: boolean): void;
5
+ export declare function getMachineId(): string;
6
+ declare const hook: Hook<"finally">;
7
+ export default hook;
@@ -0,0 +1,123 @@
1
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
+ import { homedir } from "node:os";
3
+ import { join } from "node:path";
4
+ import ci from "ci-info";
5
+ import { PostHog } from "posthog-node";
6
+ const POSTHOG_API_KEY = "phc_rQdkCYr0DO4NcZBQXZnUwsHAbau9zuNwKIpil9FQP6v";
7
+ const POSTHOG_HOST = "https://us.i.posthog.com";
8
+ const ENV_TELEMETRY_DISABLED = "SKYBRIDGE_TELEMETRY_DISABLED";
9
+ const ENV_TELEMETRY_DEBUG = "SKYBRIDGE_TELEMETRY_DEBUG";
10
+ const ENV_DO_NOT_TRACK = "DO_NOT_TRACK";
11
+ const GLOBAL_CONFIG_DIR = join(homedir(), ".skybridge");
12
+ const GLOBAL_CONFIG_FILE = join(GLOBAL_CONFIG_DIR, "config.json");
13
+ let posthogClient = null;
14
+ function getPostHogClient() {
15
+ if (!posthogClient) {
16
+ posthogClient = new PostHog(POSTHOG_API_KEY, {
17
+ host: POSTHOG_HOST,
18
+ flushAt: 1,
19
+ flushInterval: 0,
20
+ });
21
+ }
22
+ return posthogClient;
23
+ }
24
+ function readJsonFile(filePath) {
25
+ try {
26
+ if (existsSync(filePath)) {
27
+ const content = readFileSync(filePath, "utf-8");
28
+ return JSON.parse(content);
29
+ }
30
+ }
31
+ catch {
32
+ // Ignore errors reading config
33
+ }
34
+ return null;
35
+ }
36
+ function writeJsonFile(filePath, data) {
37
+ try {
38
+ const dir = join(filePath, "..");
39
+ if (!existsSync(dir)) {
40
+ mkdirSync(dir, { recursive: true });
41
+ }
42
+ writeFileSync(filePath, JSON.stringify(data, null, 2), "utf-8");
43
+ }
44
+ catch {
45
+ // Ignore errors writing config
46
+ }
47
+ }
48
+ function getGlobalConfig() {
49
+ const existing = readJsonFile(GLOBAL_CONFIG_FILE);
50
+ if (existing?.machineId && existing?.telemetry !== undefined) {
51
+ return existing;
52
+ }
53
+ const config = {
54
+ machineId: existing?.machineId || crypto.randomUUID(),
55
+ telemetry: {
56
+ enabled: existing?.telemetry?.enabled ?? true,
57
+ },
58
+ };
59
+ writeJsonFile(GLOBAL_CONFIG_FILE, config);
60
+ return config;
61
+ }
62
+ export function isEnabled() {
63
+ if (process.env[ENV_TELEMETRY_DISABLED] === "1" ||
64
+ process.env[ENV_TELEMETRY_DISABLED]?.toLowerCase() === "true") {
65
+ return false;
66
+ }
67
+ if (process.env[ENV_DO_NOT_TRACK] === "1" ||
68
+ process.env[ENV_DO_NOT_TRACK]?.toLowerCase() === "true") {
69
+ return false;
70
+ }
71
+ if (ci.isCI) {
72
+ return true;
73
+ }
74
+ const config = getGlobalConfig();
75
+ return config.telemetry.enabled;
76
+ }
77
+ export function isDebugMode() {
78
+ return (process.env[ENV_TELEMETRY_DEBUG] === "1" ||
79
+ process.env[ENV_TELEMETRY_DEBUG]?.toLowerCase() === "true");
80
+ }
81
+ export function setEnabled(enabled) {
82
+ const config = getGlobalConfig();
83
+ config.telemetry.enabled = enabled;
84
+ writeJsonFile(GLOBAL_CONFIG_FILE, config);
85
+ }
86
+ export function getMachineId() {
87
+ if (ci.isCI) {
88
+ return ci.name ?? "unknown-ci";
89
+ }
90
+ return getGlobalConfig().machineId;
91
+ }
92
+ const hook = async ({ id: command, config: { version }, error, }) => {
93
+ if (!isEnabled()) {
94
+ return;
95
+ }
96
+ const event = {
97
+ version,
98
+ machineId: getMachineId(),
99
+ sessionId: crypto.randomUUID(),
100
+ isCI: ci.isCI,
101
+ nodeVersion: process.version,
102
+ platform: process.platform,
103
+ outcome: error ? "failure" : "success",
104
+ error: error?.message,
105
+ };
106
+ if (isDebugMode()) {
107
+ console.error("[Telemetry Debug] Would send event:", JSON.stringify(event, null, 2));
108
+ return;
109
+ }
110
+ try {
111
+ const client = getPostHogClient();
112
+ client.capture({
113
+ distinctId: event.machineId,
114
+ event: command,
115
+ properties: event,
116
+ });
117
+ }
118
+ catch {
119
+ // Silently ignore telemetry errors - never block CLI operation
120
+ }
121
+ };
122
+ export default hook;
123
+ //# sourceMappingURL=telemetry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/cli/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,eAAe,GAAG,iDAAiD,CAAC;AAC1E,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAEhD,MAAM,sBAAsB,GAAG,8BAA8B,CAAC;AAC9D,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AACxD,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAExC,MAAM,iBAAiB,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,CAAC;A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I,CAAC"}
@@ -0,0 +1,10 @@
1
+ export interface CommandStep {
2
+ label: string;
3
+ command: string;
4
+ }
5
+ export declare const useExecuteSteps: (steps: CommandStep[]) => {
6
+ currentStep: number;
7
+ status: "error" | "success" | "running";
8
+ error: string | null;
9
+ execute: () => Promise<void>;
10
+ };
@@ -0,0 +1,31 @@
1
+ import { useCallback, useState } from "react";
2
+ import { runCommand } from "./run-command.js";
3
+ export const useExecuteSteps = (steps) => {
4
+ const [currentStep, setCurrentStep] = useState(0);
5
+ const [status, setStatus] = useState("running");
6
+ const [error, setError] = useState(null);
7
+ const execute = useCallback(async () => {
8
+ try {
9
+ for (let i = 0; i < steps.length; i++) {
10
+ const step = steps[i];
11
+ if (step) {
12
+ setCurrentStep(i);
13
+ await runCommand(step.command);
14
+ }
15
+ }
16
+ setStatus("success");
17
+ setImmediate(() => {
18
+ process.exit(0);
19
+ });
20
+ }
21
+ catch (err) {
22
+ setStatus("error");
23
+ setError(err instanceof Error ? err.message : String(err));
24
+ setImmediate(() => {
25
+ process.exit(1);
26
+ });
27
+ }
28
+ }, [steps]);
29
+ return { currentStep, status, error, execute };
30
+ };
31
+ //# sourceMappingURL=use-execute-steps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-execute-steps.js","sourceRoot":"","sources":["../../src/cli/use-execute-steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAO9C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAoB,EAAE,EAAE;IACtD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;IAC1D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAClC,SAAS,CACV,CAAC;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAExD,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACrC,IAAI,CAAC;YACH,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gBACtB,IAAI,IAAI,EAAE,CAAC;oBACT,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACjC,CAAC;YACH,CAAC;YACD,SAAS,CAAC,SAAS,CAAC,CAAC;YACrB,YAAY,CAAC,GAAG,EAAE;gBAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,SAAS,CAAC,OAAO,CAAC,CAAC;YACnB,QAAQ,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;YAC3D,YAAY,CAAC,GAAG,EAAE;gBAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AACjD,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Command } from "@oclif/core";
2
+ import { type CommandStep } from "../cli/use-execute-steps.js";
3
+ export declare const commandSteps: CommandStep[];
4
+ export default class Build extends Command {
5
+ static description: string;
6
+ static examples: string[];
7
+ static flags: {};
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Command } from "@oclif/core";
3
+ import { Box, render, Text } from "ink";
4
+ import { useEffect } from "react";
5
+ import { Header } from "../cli/header.js";
6
+ import { useExecuteSteps } from "../cli/use-execute-steps.js";
7
+ export const commandSteps = [
8
+ {
9
+ label: "Building widgets",
10
+ command: "vite build -c web/vite.config.ts",
11
+ },
12
+ {
13
+ label: "Compiling server",
14
+ command: "shx rm -rf dist && tsc -p tsconfig.server.json",
15
+ },
16
+ {
17
+ label: "Copying static assets",
18
+ command: "shx cp -r web/dist dist/assets",
19
+ },
20
+ ];
21
+ export default class Build extends Command {
22
+ static description = "Build the widgets and MCP server";
23
+ static examples = ["skybridge build"];
24
+ static flags = {};
25
+ async run() {
26
+ const App = () => {
27
+ const { currentStep, status, error, execute } = useExecuteSteps(commandSteps);
28
+ useEffect(() => {
29
+ execute();
30
+ }, [execute]);
31
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Header, { version: this.config.version, children: _jsx(Text, { color: "green", children: " \u2192 building for production\u2026" }) }), commandSteps.map((step, index) => {
32
+ const isCurrent = index === currentStep && status === "running";
33
+ const isCompleted = index < currentStep || status === "success";
34
+ const isError = status === "error" && index === currentStep;
35
+ return (_jsx(Box, { marginBottom: 0, children: _jsxs(Text, { color: isError ? "red" : isCompleted ? "green" : "grey", children: [isError ? "✗" : isCompleted ? "✓" : isCurrent ? "⟳" : "○", " ", step.label] }) }, step.label));
36
+ }), status === "success" && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "green", bold: true, children: "\u2713 Build completed successfully!" }) })), status === "error" && error && (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: "red", bold: true, children: "\u2717 Build failed" }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: error.split("\n").map((line) => (_jsx(Text, { color: "red", children: line }, line))) })] }))] }));
37
+ };
38
+ render(_jsx(App, {}), {
39
+ exitOnCtrlC: true,
40
+ patchConsole: false,
41
+ });
42
+ }
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AAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC/B,KAAC,IAAI,IAAY,KAAK,EAAC,KAAK,YACzB,IAAI,IADI,IAAI,CAER,CACR,CAAC,GACE,IACF,CACP,IACG,CACP,CAAC;QACJ,CAAC,CAAC;QAEF,MAAM,CAAC,KAAC,GAAG,KAAG,EAAE;YACd,WAAW,EAAE,IAAI;YACjB,YAAY,EAAE,KAAK;SACpB,CAAC,CAAC;IACL,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class Dev extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ "use-forwarded-host": import("@oclif/core/interfaces").BooleanFlag<boolean>;
7
+ };
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Command, Flags } from "@oclif/core";
3
+ import { Box, render, Text } from "ink";
4
+ import { Header } from "../cli/header.js";
5
+ import { runCommand } from "../cli/run-command.js";
6
+ export default class Dev extends Command {
7
+ static description = "Start development server";
8
+ static examples = ["skybridge"];
9
+ static flags = {
10
+ "use-forwarded-host": Flags.boolean({
11
+ description: "Uses the forwarded host header to construct widget URLs instead of localhost, useful when accessing the dev server through a tunnel (e.g., ngrok)",
12
+ }),
13
+ };
14
+ async run() {
15
+ const { flags } = await this.parse(Dev);
16
+ const env = {
17
+ ...process.env,
18
+ ...(flags["use-forwarded-host"]
19
+ ? { SKYBRIDGE_USE_FORWARDED_HOST: "true" }
20
+ : {}),
21
+ };
22
+ runCommand("nodemon --quiet", {
23
+ stdio: ["ignore", "ignore", "inherit"],
24
+ env,
25
+ });
26
+ const App = () => {
27
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, marginLeft: 1, children: [_jsx(Header, { version: this.config.version }), _jsxs(Box, { children: [_jsxs(Text, { color: "green", children: ["\u2192", " "] }), _jsxs(Text, { color: "white", bold: true, children: ["Open DevTools to test your app locally:", " "] }), _jsx(Text, { color: "green", children: "http://localhost:3000/" })] }), _jsxs(Box, { marginBottom: 1, children: [_jsxs(Text, { color: "#20a832", children: ["\u2192", " "] }), _jsxs(Text, { children: ["MCP server running at:", " "] }), _jsx(Text, { color: "white", bold: true, children: "http://localhost:3000/mcp" })] }), _jsx(Text, { color: "white", underline: true, children: "To test on ChatGPT:" }), _jsxs(Box, { children: [_jsxs(Text, { color: "#20a832", children: ["\u2192", " "] }), _jsx(Text, { color: "grey", children: "Make your local server accessible with " }), _jsx(Text, { color: "white", bold: true, children: "ngrok http 3000" })] }), _jsx(Box, { marginBottom: 1, children: _jsxs(Text, { children: [_jsxs(Text, { color: "#20a832", children: ["\u2192", " "] }), _jsx(Text, { color: "grey", children: "Connect to ChatGPT with URL " }), _jsx(Text, { color: "white", bold: true, children: "https://xxxxxx.ngrok-free.app/mcp" })] }) }), _jsx(Box, { children: _jsxs(Text, { children: [_jsxs(Text, { color: "#20a832", children: ["\u2192", " "] }), _jsx(Text, { children: "Documentation: " }), _jsx(Text, { color: "white", bold: true, children: "https://docs.skybridge.tech/" })] }) }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsxs(Text, { color: "#20a832", children: ["\u2192", " "] }), _jsx(Text, { children: "If you like Skybridge, please " }), _jsxs(Text, { color: "white", bold: true, children: ["give it a star", " "] }), _jsx(Text, { children: "on GitHub: " }), _jsx(Text, { color: "white", underline: true, children: "https://github.com/alpic-ai/skybridge" }), _jsx(Text, { color: "grey", children: " \uD83D\uDE4F" })] }) })] }));
28
+ };
29
+ render(_jsx(App, {}), { exitOnCtrlC: true, patchConsole: false });
30
+ }
31
+ }
32
+ //# sourceMappingURL=dev.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/commands/dev.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,EA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tB,EACP,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,8BAAW,IACxB,GACH,IACF,CACP,CAAC;QACJ,CAAC,CAAC;QAEF,MAAM,CAAC,KAAC,GAAG,KAAG,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;IAC9D,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class Start extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {};
6
+ run(): Promise<void>;
7
+ }
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { existsSync } from "node:fs";
3
+ import { resolve } from "node:path";
4
+ import { Command } from "@oclif/core";
5
+ import { Box, render, Text } from "ink";
6
+ import { Header } from "../cli/header.js";
7
+ import { runCommand } from "../cli/run-command.js";
8
+ export default class Start extends Command {
9
+ static description = "Start production server";
10
+ static examples = ["skybridge start"];
11
+ static flags = {};
12
+ async run() {
13
+ console.clear();
14
+ const distPath = resolve(process.cwd(), "dist/index.js");
15
+ if (!existsSync(distPath)) {
16
+ console.error("❌ Error: dist/index.js not found");
17
+ console.error("");
18
+ console.error("Please build your project first:");
19
+ console.error(" skybridge build");
20
+ console.error("");
21
+ process.exit(1);
22
+ }
23
+ runCommand("node dist/index.js", {
24
+ stdio: ["ignore", "ignore", "inherit"],
25
+ env: { ...process.env, NODE_ENV: "production" },
26
+ });
27
+ const App = () => {
28
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, marginLeft: 1, children: [_jsx(Header, { version: this.config.version }), _jsxs(Box, { children: [_jsx(Text, { children: "Server running at: " }), _jsx(Text, { color: "green", bold: true, children: "http://localhost:3000/mcp" })] })] }));
29
+ };
30
+ render(_jsx(App, {}), { exitOnCtrlC: true, patchConsole: false });
31
+ }
32
+ }
33
+ //# sourceMappingURL=start.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.js","sourceRoot":"","s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E;SAChD,CAAC,CAAC;QAEH,MAAM,GAAG,GAAG,GAAG,EAAE;YACf,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,aACnD,KAAC,MAAM,IAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,GAAI,EACxC,MAAC,GAAG,eACF,KAAC,IAAI,sCAA2B,EAChC,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,EAAC,IAAI,gDAEjB,IACH,IACF,CACP,CAAC;QACJ,CAAC,CAAC;QAEF,MAAM,CAAC,KAAC,GAAG,KAAG,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;IAC9D,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class TelemetryDisable extends Command {
3
+ static description: string;
4
+ run(): Promise<void>;
5
+ }
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Command } from "@oclif/core";
3
+ import { Box, render, Text } from "ink";
4
+ import { setEnabled } from "../../cli/telemetry.js";
5
+ export default class TelemetryDisable extends Command {
6
+ static description = "Disable Skybridge telemetry on this machine";
7
+ async run() {
8
+ await this.parse(TelemetryDisable);
9
+ setEnabled(false);
10
+ const App = () => (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: "yellow", children: "\u2713" }), _jsx(Text, { children: " Telemetry has been " }), _jsx(Text, { color: "yellow", bold: true, children: "disabled" })] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "Config saved to ~/.skybridge/config.json" }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "Skybridge never collects Personally Identifiable Information (PII). If you'd like to help us improve Skybridge by allowing anonymous CLI usage data, please reenable telemetry with: skybridge telemetry enable" }) })] }));
11
+ render(_jsx(App, {}));
12
+ }
13
+ }
14
+ //# sourceMappingURL=disable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disable.js","sourceRoot":"","sources":["../../../src/commands/telemetry/disable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,OAAO;IACnD,MAAM,CAAU,WAAW,GAAG,6CAA6C,CAAC;IAErE,KAAK,CAAC,GAAG;QACd,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACnC,UAAU,CAAC,KAAK,CAAC,CAAC;QAElB,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,CAChB,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,aACpC,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,uBAAS,EAC7B,KAAC,IAAI,uCAA4B,EACjC,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,+BAElB,IACH,EACN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,yDAAgD,GAC9D,EACN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,gOAKX,GACH,IACF,CACP,CAAC;QAEF,MAAM,CAAC,KAAC,GAAG,KAAG,CAAC,CAAC;IAClB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class TelemetryEnable extends Command {
3
+ static description: string;
4
+ run(): Promise<void>;
5
+ }
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Command } from "@oclif/core";
3
+ import { Box, render, Text } from "ink";
4
+ import { setEnabled } from "../../cli/telemetry.js";
5
+ export default class TelemetryEnable extends Command {
6
+ static description = "Enable Skybridge telemetry on this machine";
7
+ async run() {
8
+ await this.parse(TelemetryEnable);
9
+ setEnabled(true);
10
+ const App = () => (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: "green", children: "\u2713" }), _jsx(Text, { children: " Telemetry has been " }), _jsx(Text, { color: "green", bold: true, children: "enabled" })] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "Config saved to ~/.skybridge/config.json" }) })] }));
11
+ render(_jsx(App, {}));
12
+ }
13
+ }
14
+ //# sourceMappingURL=enable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enable.js","sourceRoot":"","sources":["../../../src/commands/telemetry/enable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IAClD,MAAM,CAAU,WAAW,GAAG,4CAA4C,CAAC;IAEpE,KAAK,CAAC,GAAG;QACd,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAClC,UAAU,CAAC,IAAI,CAAC,CAAC;QAEjB,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,CAChB,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,aACpC,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,uBAAS,EAC5B,KAAC,IAAI,uCAA4B,EACjC,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,EAAC,IAAI,8BAEjB,IACH,EACN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,yDAAgD,GAC9D,IACF,CACP,CAAC;QAEF,MAAM,CAAC,KAAC,GAAG,KAAG,CAAC,CAAC;IAClB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class TelemetryStatus extends Command {
3
+ static description: string;
4
+ run(): Promise<void>;
5
+ }
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Command } from "@oclif/core";
3
+ import { Box, render, Text } from "ink";
4
+ import { getMachineId, isEnabled } from "../../cli/telemetry.js";
5
+ export default class TelemetryStatus extends Command {
6
+ static description = "Get Skybridge current telemetry settings for this machine";
7
+ async run() {
8
+ await this.parse(TelemetryStatus);
9
+ const enabled = isEnabled();
10
+ const App = () => (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Text, { bold: true, underline: true, children: "Skybridge Telemetry" }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { children: "Status: " }), enabled ? (_jsx(Text, { color: "green", bold: true, children: "Enabled" })) : (_jsx(Text, { color: "yellow", bold: true, children: "Disabled" }))] }), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: "gray", children: "Machine ID: " }), _jsx(Text, { children: getMachineId() })] })] }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: "gray", children: "To opt out, run: skybridge telemetry disable" }), _jsx(Text, { color: "gray", children: "Or set: SKYBRIDGE_TELEMETRY_DISABLED=1" }), _jsx(Text, { color: "gray", children: "Debug mode: SKYBRIDGE_TELEMETRY_DEBUG=1" })] })] }));
11
+ render(_jsx(App, {}));
12
+ }
13
+ }
14
+ //# sourceMappingURL=status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/commands/telemetry/status.tsx"],"names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AC7D,IACF,CACP,CAAC;QAEF,MAAM,CAAC,KAAC,GAAG,KAAG,CAAC,CAAC;IAClB,CAAC"}
@@ -1,5 +1,4 @@
1
- export { devtoolsStaticServer } from "./devtoolsStaticServer.js";
2
1
  export type { AnyToolRegistry, InferTools, ToolInput, ToolNames, ToolOutput, ToolResponseMetadata, } from "./inferUtilityTypes.js";
3
- export type { McpServerTypes, ToolDef } from "./server.js";
2
+ export type { McpServerTypes, ToolDef, WidgetHostType } from "./server.js";
4
3
  export { McpServer } from "./server.js";
5
4
  export { widgetsDevServer } from "./widgetsDevServer.js";
@@ -1,4 +1,3 @@
1
- export { devtoolsStaticServer } from "./devtoolsStaticServer.js";
2
1
  export { McpServer } from "./server.js";
3
2
  export { widgetsDevServer } from "./widgetsDevServer.js";
4
3
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inferUtilityTypes.js","sourceRoot":"","sources":["../../src/server/inferUtilityTypes.ts"],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import type { McpUiResourceMeta } from "@modelcontextprotocol/ext-apps";
1
2
  import { McpServer as McpServerBase, type RegisteredTool } from "@modelcontextprotocol/sdk/server/mcp.js";
2
3
  import type { AnySchema, SchemaOutput, ZodRawShapeCompat } from "@modelcontextprotocol/sdk/server/zod-compat.js";
3
4
  import type { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
@@ -7,7 +8,32 @@ export type ToolDef<TInput = unknown, TOutput = unknown, TResponseMetadata = unk
7
8
  output: TOutput;
8
9
  responseMetadata: TResponseMetadata;
9
10
  };
10
- type McpServerOriginalResourceConfig = Omit<Resource, "uri" | "name" | "mimeType">;
11
+ /**
12
+ * Extended MCP Apps CSP with upcoming fields from ext-apps PR #158
13
+ * and Skybridge-specific fields for OpenAI compatibility
14
+ * @see https://github.com/modelcontextprotocol/ext-apps/pull/158
15
+ */
16
+ type ExtendedMcpUiResourceCsp = McpUiResourceMeta["csp"] & {
17
+ /**
18
+ * Origins that can receive openExternal redirects without safe-link modal (OpenAI-specific)
19
+ * @see https://developers.openai.com/apps-sdk/reference#component-resource-_meta-fields
20
+ */
21
+ redirectDomains?: string[];
22
+ };
23
+ /** Extended MCP Apps resource metadata with upcoming CSP fields */
24
+ type ExtendedMcpUiResourceMeta = Omit<McpUiResourceMeta, "csp"> & {
25
+ csp?: ExtendedMcpUiResourceCsp;
26
+ };
27
+ /** User-provided resource configuration with optional CSP override */
28
+ export type WidgetResourceMeta = {
29
+ ui?: ExtendedMcpUiResourceMeta;
30
+ } & Resource["_meta"];
31
+ export type WidgetHostType = "apps-sdk" | "mcp-app";
32
+ type McpServerOriginalResourceConfig = Omit<Resource, "uri" | "name" | "mimeType" | "_meta"> & {
33
+ _meta?: WidgetResourceMeta;
34
+ /** Restrict host types to a specific subset */
35
+ hosts?: WidgetHostType[];
36
+ };
11
37
  type McpServerOriginalToolConfig = Omit<Parameters<typeof McpServerBase.prototype.registerTool<ZodRawShapeCompat, ZodRawShapeCompat>>[1], "inputSchema" | "outputSchema">;
12
38
  type Simplify<T> = {
13
39
  [K in keyof T]: T[K];