@yuriai/web 0.2.27 → 0.2.29-beta.11

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 (293) hide show
  1. package/README.md +3 -1
  2. package/dist/assets/AgentAvatar-CR6dX_XT.js +1 -0
  3. package/dist/assets/AssistantContactStatus-B0bsfDtC.js +3 -0
  4. package/dist/assets/{AssistantUnreadBadge-BssH-RvV.js → AssistantUnreadBadge-D2z3wH6e.js} +1 -1
  5. package/dist/assets/{AssistantView-CxQv-9Ms.js → AssistantView-1I_CxjRT.js} +1 -1
  6. package/dist/assets/{DiagramView-DPpG0fwx.js → DiagramView-CDnuxs05.js} +1 -1
  7. package/dist/assets/{FadeInOnReveal-S6UbimjB.js → FadeInOnReveal-CuOJu25b.js} +1 -1
  8. package/dist/assets/{GuiPluginSurface-BOf0JA1T.js → GuiPluginSurface-Fz1jDjmD.js} +1 -1
  9. package/dist/assets/{GuiPluginWindow-OrYkfQ4m.js → GuiPluginWindow-CIVNyw4s.js} +1 -1
  10. package/dist/assets/Icon-BQczEnxm.js +1 -0
  11. package/dist/assets/{ImageLoadingPlaceholder-CBFJC_KD.js → ImageLoadingPlaceholder-KksxJaKp.js} +1 -1
  12. package/dist/assets/LoadingImage-Ch5MyA20.js +1 -0
  13. package/dist/assets/MarkdownRenderer-2h3s-QAX.js +2 -0
  14. package/dist/assets/{MarkdownRendererImpl-Cv6UnGG7.js → MarkdownRendererImpl-D-6DekL9.js} +3 -3
  15. package/dist/assets/MarkstreamRendererImpl-HnrHSasB.js +3 -0
  16. package/dist/assets/{MobileDetailNavigation-CK4KbkeS.js → MobileDetailNavigation-D-Jwj-Fz.js} +1 -1
  17. package/dist/assets/{MobileResizableSheet-Deidw1br.js → MobileResizableSheet-Bk3z4g6T.js} +1 -1
  18. package/dist/assets/{MobileShareBridge-CO_OWEfq.js → MobileShareBridge-BjNcovRh.js} +2 -2
  19. package/dist/assets/MobileTabPageHeader-o3h0Die1.js +2 -0
  20. package/dist/assets/MultiRunWindow-BHY_fvEe.js +1 -0
  21. package/dist/assets/{OnboardingScreen-C8ld4wO7.js → OnboardingScreen-CgQGvlEs.js} +1 -1
  22. package/dist/assets/{OverlayScrollbar-B3auC2WH.js → OverlayScrollbar-C9Ac564a.js} +1 -1
  23. package/dist/assets/SettingsView-BlOWs55G.js +29 -0
  24. package/dist/assets/SettingsWindow-EosRcZmc.js +1 -0
  25. package/dist/assets/SetupTourDialog-CUzqT2sw.css +1 -0
  26. package/dist/assets/SetupTourDialog-_DdUf4Np.js +1 -0
  27. package/dist/assets/{TerminalView-CwRB6Yyr.js → TerminalView-BrTVmvyd.js} +3 -3
  28. package/dist/assets/ToolOutputDialog-DVVOJVDJ.js +10 -0
  29. package/dist/assets/VoiceSettings-C0HSdVvS.css +1 -0
  30. package/dist/assets/VoiceSettings-UNCCasqF.js +2 -0
  31. package/dist/assets/YuriLogo-CpccdHvS.js +1 -0
  32. package/dist/assets/YuriWordmark-hZ6K7Smk.js +1 -0
  33. package/dist/assets/{appThemeRegistry-B6woJIX5.js → appThemeRegistry-B8qob2l9.js} +1 -1
  34. package/dist/assets/appearance--vFosLNi.js +1 -0
  35. package/dist/assets/{assistant-attachment-cache-B_qRvy-k.js → assistant-attachment-cache-oatc8F4t.js} +1 -1
  36. package/dist/assets/{button-BXxwtxsG.js → button-Cjciq1yh.js} +1 -1
  37. package/dist/assets/{capgoAdapter-C5HFS-rx.js → capgoAdapter-YgVOiKZO.js} +1 -1
  38. package/dist/assets/collapsible-BzCn4-sd.js +1 -0
  39. package/dist/assets/context-menu-BIjCIXOg.js +1 -0
  40. package/dist/assets/desktopRelayRestore-C7pjf6fE.js +1 -0
  41. package/dist/assets/{device-BcRP6Tjd.js → device-DN1GigI_.js} +1 -1
  42. package/dist/assets/{diagram-DyY8dxjZ.js → diagram--zTR0vWJ.js} +1 -1
  43. package/dist/assets/dialog-rVkj8VgE.js +1 -0
  44. package/dist/assets/dropdown-menu.styles-BDla58Rm.js +1 -0
  45. package/dist/assets/es-B8dNq0Lv.js +15 -0
  46. package/dist/assets/{fileMentionTouchSelection-C4dvP8GY.js → fileMentionTouchSelection-CmdNi_d0.js} +2 -2
  47. package/dist/assets/{fileQueries-BeXkd3o6.js → fileQueries-C2Rs6TPz.js} +1 -1
  48. package/dist/assets/{fileReferenceActions-CrIAce3K.js → fileReferenceActions-CvDFcgBH.js} +1 -1
  49. package/dist/assets/{fr-CEgiRlfa.js → fr-DbzWoYOD.js} +4 -4
  50. package/dist/assets/{gitApi-D2G9ny2O.js → gitApi-CEtJm-Si.js} +3 -3
  51. package/dist/assets/{gitApiHttp-B7vYwgBh.js → gitApiHttp-Ddik7PM_.js} +4 -4
  52. package/dist/assets/host-D776RHTx.js +1 -0
  53. package/dist/assets/image-loading-DKQOYtti.js +1 -0
  54. package/dist/assets/input-GVRUiwuQ.js +1 -0
  55. package/dist/assets/insertionBoundaries-DQcca8Jd.js +1 -0
  56. package/dist/assets/{ja-CX-_p9jZ.js → ja-BGk5BIrz.js} +4 -4
  57. package/dist/assets/{ko-D5xlLYJM.js → ko-Broo5A8H.js} +4 -4
  58. package/dist/assets/magpie-BuRvkGVQ.svg +1 -0
  59. package/dist/assets/main-BY3PGnZf.js +169 -0
  60. package/dist/assets/main-CMMAJcu3.js +2 -0
  61. package/dist/assets/{markdownHeightCache-D2VWb_4E.js → markdownHeightCache-C7UOJdkN.js} +1 -1
  62. package/dist/assets/{markdownTheme-hpURsgju.js → markdownTheme-CHNl6tUv.js} +1 -1
  63. package/dist/assets/{mcpQueries-DQ3KthDF.js → mcpQueries-Cb3fyXbV.js} +1 -1
  64. package/dist/assets/miniChat-Dez8HIZj.js +2 -0
  65. package/dist/assets/mobile-CE0hClMx.js +2 -0
  66. package/dist/assets/{mobileBackNavigation-BJqt3oHk.js → mobileBackNavigation-HtKkSk0m.js} +1 -1
  67. package/dist/assets/multirun-CIbNS1L_.js +3 -0
  68. package/dist/assets/native-DsqzO52u.js +1 -0
  69. package/dist/assets/{native-config-BIY0Cr-l.js → native-config-D-sxhX53.js} +1 -1
  70. package/dist/assets/persistence-D-rnhgr4.js +3 -0
  71. package/dist/assets/{pl-BjH81A_q.js → pl-not4wEra.js} +4 -4
  72. package/dist/assets/projectMeta-DMn_yra8.js +1 -0
  73. package/dist/assets/pt-BR-3OzFQDGv.js +15 -0
  74. package/dist/assets/pwa-CnptYkbA.js +2 -0
  75. package/dist/assets/{queryRuntime-CTcigFdj.js → queryRuntime-2dx7jbt9.js} +1 -1
  76. package/dist/assets/{queue-abort-optimistic-CS5jTJq-.js → queue-abort-optimistic-CShE2znR.js} +1 -1
  77. package/dist/assets/{react-DRe85o5s.js → react-Bwr5-XPi.js} +1 -1
  78. package/dist/assets/readiness-gqLkYnM4.js +1 -0
  79. package/dist/assets/renderElectronMiniChatApp-CY9Z1Vhr.js +2 -0
  80. package/dist/assets/renderMobileApp-BCwgH2Gn.js +28 -0
  81. package/dist/assets/{runtime-file-download-Cf1WxfeW.js → runtime-file-download-D6bwc3Kj.js} +1 -1
  82. package/dist/assets/{runtime-file-resource-UJjHUF2C.js → runtime-file-resource-BP4P52ry.js} +1 -1
  83. package/dist/assets/{runtimeConfig-BX8JirIc.js → runtimeConfig-BjAB7T92.js} +1 -1
  84. package/dist/assets/runtimeEndpointReset-b_8lxjHW.js +149 -0
  85. package/dist/assets/scheduledTaskNavigation-Bp5rGr3m.js +1 -0
  86. package/dist/assets/select-DeP9bukP.js +1 -0
  87. package/dist/assets/sessionLookup-CvwAHpsq.js +1 -0
  88. package/dist/assets/sortable-tabs-strip-BloEQRck.js +1 -0
  89. package/dist/assets/speechSettingsQueries-B-JHilmU.js +3 -0
  90. package/dist/assets/src-EZMbcCtg.css +2 -0
  91. package/dist/assets/{store-CkIHVrmT.js → store-CKIMMlXR.js} +5 -4
  92. package/dist/assets/{terminalApi-rl9mZAlB.js → terminalApi-ChZhb60_.js} +1 -1
  93. package/dist/assets/{textarea-7eTptEtD.js → textarea-B4mWtnN5.js} +1 -1
  94. package/dist/assets/theme-validation-BGYdrOu7.js +1 -0
  95. package/dist/assets/themes-BgDJcxRc.js +1 -0
  96. package/dist/assets/tooltip-BuZ86ipm.js +1 -0
  97. package/dist/assets/{touch-gestures-K2_ZOkKW.js → touch-gestures-CErgaXZ7.js} +1 -1
  98. package/dist/assets/tour-Db44qwfs.js +1 -0
  99. package/dist/assets/types-B5Nt6TGt.js +2 -0
  100. package/dist/assets/uk-DyZ2SwUJ.js +15 -0
  101. package/dist/assets/{useAppFontEffects-Ck2PdQRx.js → useAppFontEffects-CN6GxBsA.js} +54 -54
  102. package/dist/assets/{useAssistantUIStore-CfaQV3ID.js → useAssistantUIStore-BI_dAUjx.js} +1 -1
  103. package/dist/assets/useDesktopWindowControlsLayout-DtGw4mOb.js +1 -0
  104. package/dist/assets/{dropdown-menu.styles-DGaALKP0.js → useDictation-CwX05CAo.js} +1 -1
  105. package/dist/assets/{useEffectiveDirectory-CNCQfN_x.js → useEffectiveDirectory-BcjGq1gO.js} +1 -1
  106. package/dist/assets/{useFontPreferences-DeqW9nRx.js → useFontPreferences-EsJ4FlIp.js} +1 -1
  107. package/dist/assets/useMobileNavigationStore-CIldW1SJ.js +17 -0
  108. package/dist/assets/usePluginsStore-CBQx059k.js +1 -0
  109. package/dist/assets/{useThemeSystem-CGF5jnIh.js → useThemeSystem-CNzUUkFn.js} +1 -1
  110. package/dist/assets/useUIStore-CoWJ3ROq.js +1 -0
  111. package/dist/assets/{useWorkerHighlightedLines-CN_RGaSw.js → useWorkerHighlightedLines-jLLdysNE.js} +1 -1
  112. package/dist/assets/vendor-base-ui-CzHs0bHY.js +1 -0
  113. package/dist/assets/{vendor-cmdk-C3oBVL9X.js → vendor-cmdk-C_tivUtr.js} +1 -1
  114. package/dist/assets/vendor-codemirror-autocomplete-C0FrlFqZ.js +12 -0
  115. package/dist/assets/vendor-codemirror-commands-5saeUOVY.js +1 -0
  116. package/dist/assets/vendor-codemirror-lang-angular-Cm7vBE3E.js +23 -0
  117. package/dist/assets/vendor-codemirror-lang-cpp-BjixvwC2.js +1 -0
  118. package/dist/assets/vendor-codemirror-lang-go-DFb2d_8t.js +11 -0
  119. package/dist/assets/vendor-codemirror-lang-java-CHitPigf.js +1 -0
  120. package/dist/assets/vendor-codemirror-lang-jinja-B8yrwpok.js +1 -0
  121. package/dist/assets/{vendor-codemirror-lang-json-mLulNbwB.js → vendor-codemirror-lang-json-DowyFczU.js} +1 -1
  122. package/dist/assets/{vendor-codemirror-lang-less-CNvptX3P.js → vendor-codemirror-lang-less-B1_0-sTl.js} +1 -1
  123. package/dist/assets/vendor-codemirror-lang-liquid-FIsA7YFN.js +1 -0
  124. package/dist/assets/vendor-codemirror-lang-markdown-npWBZIoE.js +6 -0
  125. package/dist/assets/vendor-codemirror-lang-php-wyEc0fdz.js +1 -0
  126. package/dist/assets/vendor-codemirror-lang-python-OPRdU26g.js +9 -0
  127. package/dist/assets/{vendor-codemirror-lang-rust-CtafR0gt.js → vendor-codemirror-lang-rust-DgovszuH.js} +1 -1
  128. package/dist/assets/vendor-codemirror-lang-sass-BdU-i07o.js +1 -0
  129. package/dist/assets/{vendor-codemirror-lang-sql-C6q09UUZ.js → vendor-codemirror-lang-sql-DUutq98l.js} +2 -2
  130. package/dist/assets/{vendor-codemirror-lang-vue-DIB78UsR.js → vendor-codemirror-lang-vue-CuRNbe8H.js} +1 -1
  131. package/dist/assets/{vendor-codemirror-lang-wast-C_JVdOCF.js → vendor-codemirror-lang-wast-CGFAOCoB.js} +1 -1
  132. package/dist/assets/vendor-codemirror-lang-xml-CMKBqGXF.js +1 -0
  133. package/dist/assets/{vendor-codemirror-lang-yaml-BO0hIfQM.js → vendor-codemirror-lang-yaml-CH9a1QiY.js} +1 -1
  134. package/dist/assets/{vendor-codemirror-language-data-Ctd4WxgW.js → vendor-codemirror-language-data-B3pLWvv-.js} +2 -2
  135. package/dist/assets/vendor-codemirror-search-hZY-L2l8.js +2 -0
  136. package/dist/assets/{vendor-dnd-kit-accessibility-DxpFzZhi.js → vendor-dnd-kit-accessibility-BOtnpZt5.js} +1 -1
  137. package/dist/assets/{vendor-dnd-kit-core-B3g3zWQd.js → vendor-dnd-kit-core-DK4OoOTr.js} +1 -1
  138. package/dist/assets/{vendor-dnd-kit-sortable-BKewx0Py.js → vendor-dnd-kit-sortable-Cv69eQm1.js} +1 -1
  139. package/dist/assets/{vendor-framer-motion-C1twy-GF.js → vendor-framer-motion-DDMKlXiP.js} +1 -1
  140. package/dist/assets/vendor-lodash-es-BS45jPoZ.js +1 -0
  141. package/dist/assets/{vendor-markstream-react-BlbOg72y.js → vendor-markstream-react-DfLaSG3W.js} +3 -3
  142. package/dist/assets/vendor-motion-C9oiAdx-.js +1 -0
  143. package/dist/assets/{vendor-pierre-diffs-Bj9Nqn6w.js → vendor-pierre-diffs-BFiZ3IhI.js} +2 -2
  144. package/dist/assets/{vendor-react-D5d-V1vN.js → vendor-react-DlzBev0S.js} +1 -1
  145. package/dist/assets/{vendor-react-drawio-C-iPmmED.js → vendor-react-drawio-Dyg1-39Q.js} +1 -1
  146. package/dist/assets/vendor-reactuses-core-DWo5Wn6R.js +1 -0
  147. package/dist/assets/{vendor-replit-codemirror-vim-DCdAdxvE.js → vendor-replit-codemirror-vim-BmQmU1lR.js} +6 -6
  148. package/dist/assets/{vendor-sonner-r2EJnfoo.js → vendor-sonner-BEHGipm5.js} +1 -1
  149. package/dist/assets/{vendor-stream-diffs-BnLmeqg2.js → vendor-stream-diffs-wcQxoPZk.js} +2 -2
  150. package/dist/assets/vendor-tanstack-query-core-Y_YoRHtC.js +1 -0
  151. package/dist/assets/vendor-tanstack-react-query-B-Wpqq5J.js +1 -0
  152. package/dist/assets/{vendor-tanstack-react-virtual-BeZn51tF.js → vendor-tanstack-react-virtual-DSFNK3qc.js} +1 -1
  153. package/dist/assets/{vendor-zustand-B43HCgwC.js → vendor-zustand-vDaAPGfl.js} +1 -1
  154. package/dist/assets/zh-CN-aNIWxYun.js +15 -0
  155. package/dist/assets/zh-TW-B1IdCz5g.js +15 -0
  156. package/dist/index.html +20 -20
  157. package/dist/mini-chat.html +20 -20
  158. package/dist/mobile.html +20 -20
  159. package/package.json +5 -3
  160. package/server/lib/assistants/DOCUMENTATION.md +8 -1
  161. package/server/lib/assistants/channel-output.integration.test.js +15 -1
  162. package/server/lib/assistants/contact-tools.js +1 -1
  163. package/server/lib/assistants/harness.js +4 -3
  164. package/server/lib/assistants/harness.test.js +16 -0
  165. package/server/lib/client-auth/pairing.js +4 -1
  166. package/server/lib/client-auth/pairing.test.js +41 -0
  167. package/server/lib/client-auth/remote-clients.js +6 -2
  168. package/server/lib/client-auth/remote-clients.test.js +42 -0
  169. package/server/lib/config-sync/DOCUMENTATION.md +1 -0
  170. package/server/lib/config-sync/config-sync.test.js +22 -0
  171. package/server/lib/config-sync/constants.js +0 -3
  172. package/server/lib/gui-customization/DOCUMENTATION.md +56 -0
  173. package/server/lib/gui-customization/session-skill.js +58 -0
  174. package/server/lib/gui-customization/session-skill.test.js +53 -0
  175. package/server/lib/gui-customization/skill/SKILL.md +38 -0
  176. package/server/lib/gui-customization/skill/references/appearance.md +79 -0
  177. package/server/lib/gui-customization/skill/references/file-previews.md +113 -0
  178. package/server/lib/gui-customization/skill/references/global-pages.md +81 -0
  179. package/server/lib/gui-customization/skill/references/gui-api.md +37 -0
  180. package/server/lib/gui-customization/skill/references/preview-exports.md +74 -0
  181. package/server/lib/gui-customization/skill/references/ui-surfaces.md +228 -0
  182. package/server/lib/gui-customization/skill/references/workflow.md +80 -0
  183. package/server/lib/llm/DOCUMENTATION.md +14 -1
  184. package/server/lib/llm/bridge-plugin.bundle.js +13 -1136
  185. package/server/lib/llm/bridge-plugin.js +4 -4
  186. package/server/lib/llm/bridge-plugin.test.js +31 -4
  187. package/server/lib/opencode/DOCUMENTATION.md +82 -1
  188. package/server/lib/opencode/config-entity-routes.js +2 -4
  189. package/server/lib/opencode/config-entity-routes.test.js +16 -13
  190. package/server/lib/opencode/core-routes.js +5 -2
  191. package/server/lib/opencode/core-routes.test.js +14 -4
  192. package/server/lib/opencode/custom-provider-models.d.ts +2 -0
  193. package/server/lib/opencode/custom-provider-models.js +71 -0
  194. package/server/lib/opencode/custom-provider-models.test.js +90 -0
  195. package/server/lib/opencode/custom-provider.d.ts +2 -0
  196. package/server/lib/opencode/custom-provider.js +107 -0
  197. package/server/lib/opencode/custom-provider.test.js +211 -0
  198. package/server/lib/opencode/feature-routes-runtime.js +5 -0
  199. package/server/lib/opencode/npm-registry.js +9 -2
  200. package/server/lib/opencode/npm-registry.test.js +22 -1
  201. package/server/lib/opencode/plugin-routes.js +1 -0
  202. package/server/lib/opencode/provider-catalog.js +14 -0
  203. package/server/lib/opencode/provider-catalog.test.js +15 -0
  204. package/server/lib/opencode/provider-configuration.test.js +64 -0
  205. package/server/lib/opencode/provider-model-config.d.ts +1 -0
  206. package/server/lib/opencode/provider-model-config.js +39 -0
  207. package/server/lib/opencode/provider-model-config.test.js +69 -0
  208. package/server/lib/opencode/provider-sources.d.ts +10 -0
  209. package/server/lib/opencode/provider-sources.js +52 -0
  210. package/server/lib/opencode/provider-sources.test.js +73 -0
  211. package/server/lib/opencode/providers.d.ts +5 -0
  212. package/server/lib/opencode/providers.js +28 -0
  213. package/server/lib/opencode/routes.js +50 -1
  214. package/server/lib/opencode/settings-helpers.js +0 -3
  215. package/server/lib/opencode/settings-helpers.test.js +8 -0
  216. package/server/lib/opencode/static-routes-runtime.js +5 -3
  217. package/server/lib/opencode/static-routes-runtime.test.js +23 -10
  218. package/server/lib/remote-desktop/DOCUMENTATION.md +10 -2
  219. package/server/lib/remote-desktop/runtime.js +3 -2
  220. package/server/lib/remote-desktop/runtime.test.js +20 -0
  221. package/server/lib/scheduled-tasks/session-skill.js +3 -0
  222. package/server/lib/scheduled-tasks/session-skill.test.js +4 -2
  223. package/server/lib/ui-auth/DOCUMENTATION.md +2 -0
  224. package/shared/custom-provider-protocol.d.ts +4 -0
  225. package/shared/custom-provider-protocol.js +32 -0
  226. package/dist/assets/AgentAvatar-DNm_jMna.js +0 -1
  227. package/dist/assets/AssistantContactStatus-BPRpgMFh.js +0 -3
  228. package/dist/assets/Icon-BE4mEwzV.js +0 -1
  229. package/dist/assets/LoadingImage-NLq7_P-i.js +0 -1
  230. package/dist/assets/MarkdownRenderer-BaMotAOQ.js +0 -2
  231. package/dist/assets/MarkstreamRendererImpl-Rb9O6wkW.js +0 -3
  232. package/dist/assets/MobileTabPageHeader-DbC8L6A4.js +0 -2
  233. package/dist/assets/MultiRunWindow-DtVW9NTV.js +0 -1
  234. package/dist/assets/SettingsView-BRIvklfP.css +0 -1
  235. package/dist/assets/SettingsView-Cm7woZWl.js +0 -29
  236. package/dist/assets/SettingsWindow-CdL4PFxW.js +0 -1
  237. package/dist/assets/ToolOutputDialog-B4BfmoVH.js +0 -10
  238. package/dist/assets/YuriLogo-BOx0s0Ue.js +0 -1
  239. package/dist/assets/collapsible-BEm0787p.js +0 -1
  240. package/dist/assets/context-menu-DUwvVUDY.js +0 -1
  241. package/dist/assets/desktopRelayRestore-D1UX7HW2.js +0 -1
  242. package/dist/assets/dialog-CLca6ojn.js +0 -1
  243. package/dist/assets/es-CrsHvgue.js +0 -15
  244. package/dist/assets/host-CnVx34Dh.js +0 -1
  245. package/dist/assets/image-loading-D5UhMj7Z.js +0 -1
  246. package/dist/assets/input-D59Q2pm8.js +0 -1
  247. package/dist/assets/insertionBoundaries-CedfTSM5.js +0 -1
  248. package/dist/assets/main-CxpUooVS.js +0 -2
  249. package/dist/assets/main-Dpm4KxWX.js +0 -169
  250. package/dist/assets/miniChat-CTdj8Ug9.js +0 -2
  251. package/dist/assets/mobile-ChbA3Q8j.js +0 -2
  252. package/dist/assets/multirun-BILeETbd.js +0 -3
  253. package/dist/assets/native-BYMhr-xH.js +0 -1
  254. package/dist/assets/persistence-CWuLIq1J.js +0 -3
  255. package/dist/assets/projectMeta-B9_Uh8YH.js +0 -1
  256. package/dist/assets/pt-BR-Dp5oK2x3.js +0 -15
  257. package/dist/assets/readiness-BNIgH81X.js +0 -1
  258. package/dist/assets/renderElectronMiniChatApp-asOqV7FB.js +0 -2
  259. package/dist/assets/renderMobileApp-DAfque7-.js +0 -28
  260. package/dist/assets/runtimeEndpointReset-CFQgUiUr.js +0 -149
  261. package/dist/assets/scheduledTaskNavigation-EomDNVu2.js +0 -1
  262. package/dist/assets/sessionLookup-BxAaxPOw.js +0 -1
  263. package/dist/assets/sortable-tabs-strip-DpbW5MqX.js +0 -1
  264. package/dist/assets/speechSettingsQueries-CC0fusUo.js +0 -4
  265. package/dist/assets/src-BMKjN2ip.css +0 -2
  266. package/dist/assets/tooltip-BPwoSTzO.js +0 -1
  267. package/dist/assets/types-CUtSV1V8.js +0 -2
  268. package/dist/assets/uk-BEfkaLtM.js +0 -15
  269. package/dist/assets/useDesktopWindowControlsLayout-DxxOUZj1.js +0 -1
  270. package/dist/assets/useMobileNavigationStore-BmVr5a5c.js +0 -17
  271. package/dist/assets/useUIStore-C6CE42oh.js +0 -1
  272. package/dist/assets/vendor-base-ui-BQjbsJ43.js +0 -1
  273. package/dist/assets/vendor-codemirror-autocomplete-7c2L_4dM.js +0 -12
  274. package/dist/assets/vendor-codemirror-commands-B8KrBQ9B.js +0 -1
  275. package/dist/assets/vendor-codemirror-lang-angular-DXOgWEVj.js +0 -23
  276. package/dist/assets/vendor-codemirror-lang-cpp-Dh8C3xqP.js +0 -1
  277. package/dist/assets/vendor-codemirror-lang-go-BXAJ1_dh.js +0 -11
  278. package/dist/assets/vendor-codemirror-lang-java-DAyCHRhk.js +0 -1
  279. package/dist/assets/vendor-codemirror-lang-jinja-0TICrMfO.js +0 -1
  280. package/dist/assets/vendor-codemirror-lang-liquid-8g5seytq.js +0 -1
  281. package/dist/assets/vendor-codemirror-lang-markdown-CV1IO6Qs.js +0 -6
  282. package/dist/assets/vendor-codemirror-lang-php-xP7rf28_.js +0 -1
  283. package/dist/assets/vendor-codemirror-lang-python-YM2WVLHF.js +0 -9
  284. package/dist/assets/vendor-codemirror-lang-sass-B4iav_Ps.js +0 -1
  285. package/dist/assets/vendor-codemirror-lang-xml-DIuzY_d4.js +0 -1
  286. package/dist/assets/vendor-codemirror-search-DiPwvA-6.js +0 -2
  287. package/dist/assets/vendor-lodash-es-DfLbG5Af.js +0 -1
  288. package/dist/assets/vendor-motion-BmLx2V78.js +0 -1
  289. package/dist/assets/vendor-reactuses-core-BcebBLwF.js +0 -1
  290. package/dist/assets/vendor-tanstack-query-core-BWz0ose6.js +0 -1
  291. package/dist/assets/vendor-tanstack-react-query-C4SG3JZB.js +0 -1
  292. package/dist/assets/zh-CN-DipfA56P.js +0 -15
  293. package/dist/assets/zh-TW-B7pXMVjt.js +0 -15
@@ -3,8 +3,6 @@ export const OPENCODE_CONFIG_SYNC_ALLOWLIST = {
3
3
  // Mutually exclusive groups: first existing local file wins; other members are deleted on remote.
4
4
  fileGroups: [
5
5
  ['config.json', 'opencode.json', 'opencode.jsonc'],
6
- ['oh-my-opencode-slim.json', 'oh-my-opencode-slim.jsonc'],
7
- ['oh-my-openagent.json', 'oh-my-openagent.jsonc'],
8
6
  ],
9
7
  singleFiles: ['AGENTS.md', 'cursor-models.json'],
10
8
  directories: [
@@ -14,7 +12,6 @@ export const OPENCODE_CONFIG_SYNC_ALLOWLIST = {
14
12
  { path: 'snippet' },
15
13
  { path: 'snippets' },
16
14
  { path: 'plugins', excludeNames: ['node_modules'] },
17
- { path: '.oh-my-opencode-slim' },
18
15
  ],
19
16
  };
20
17
 
@@ -0,0 +1,56 @@
1
+ # Built-in Yuri customization skill
2
+
3
+ `session-skill.js` stages the shipped `skill/SKILL.md` and its references in
4
+ an application-owned, content-fingerprinted `session-skills` directory. Only a
5
+ short discovery pointer enters `session.instructions.entry` under
6
+ `yuri.customization`. Agents load the skill and matching references on demand;
7
+ no global OpenCode config, installed user skills, project files or old sessions
8
+ are modified.
9
+
10
+ References are organized by capability: window APIs, appearance, UI surfaces, global pages,
11
+ file parsing/previews, preview actions/exports, and package workflow. Host contracts
12
+ and verification criteria are separate from illustrative templates and case
13
+ studies. Runmark and Eficy remain integration references; their service protocols,
14
+ renderers and compatibility choices are not requirements for unrelated plugins.
15
+
16
+ `references/ui-surfaces.md` is the shipped structural/style map for plugin authors
17
+ without a source checkout. It covers shell, sidebar, header, transcript, composer,
18
+ preview, Settings, overlays, tokens/cascade and native transparency boundaries.
19
+ The entry and appearance reference route existing-block CSS work there first.
20
+ DOM hooks are version-sensitive implementation guidance, not new public APIs.
21
+ When these owners change, update their map and recipes alongside the owning docs.
22
+
23
+ The authoring workflow defaults to directly written `gui-experimental.cjs` with
24
+ host-provided modules and inline assets. Local edits use the existing revision
25
+ watcher; compilation is only an optional path for typed/JSX or bundled sources.
26
+
27
+ ## Admission ownership
28
+
29
+ - Shared-service sessions: the existing scheduled-task admission route installs
30
+ this instruction after its authenticated scheduled-task preflight. Both must
31
+ finish before returning the session. Existing rollback semantics apply.
32
+ - Managed local OpenCode: `registerCustomizationSessionSkill` owns session create
33
+ and this instruction only, before the generic proxy. A failed installation
34
+ removes a newly allocated session; an explicitly supplied/adopted session is
35
+ retained. If removal fails, the response includes the retained session ID.
36
+ - External OpenCode and VS Code's independent extension-host session creation:
37
+ no local-file pointer is injected, because the agent is not proven to share
38
+ this Host's filesystem. GUI plugin contracts themselves remain available on
39
+ their supported clients. Existing sessions do not gain the pointer retroactively.
40
+
41
+ The feature adds no HTTP resource endpoint, credential or native privilege.
42
+ Package publishing includes the entire web `server` directory, so the Markdown
43
+ resources ship with the backend and resolve relative to this module in packaged
44
+ Electron as well as web installs. Fingerprinted resources remain readable by old
45
+ sessions across backend upgrades.
46
+
47
+ ## Validation
48
+
49
+ `session-skill.test.js` exercises staging, complete resource availability, short
50
+ per-session pointers, managed admission/rollback/adopted sessions and external
51
+ ownership. Shared-service admission is covered by
52
+ `../scheduled-tasks/session-skill.test.js`. The UI test
53
+ `packages/ui/src/lib/gui-plugins/skill-examples.test.ts` transpiles the shipped
54
+ global-page and custom-file templates and runs them through the real GUI host,
55
+ plugin context, navigation, file read, mount and cleanup. These are contract
56
+ fixtures, not live Runmark/Eficy backend tests.
@@ -0,0 +1,58 @@
1
+ import { readFile, mkdir, writeFile, rename, rm } from 'node:fs/promises';
2
+ import { createHash, randomUUID } from 'node:crypto';
3
+ import path from 'node:path';
4
+
5
+ const files = ['SKILL.md', 'references/appearance.md', 'references/ui-surfaces.md', 'references/gui-api.md', 'references/workflow.md', 'references/global-pages.md', 'references/file-previews.md', 'references/preview-exports.md'];
6
+
7
+ /** Stage immutable, shipped instructions; never edit the user's global skills/config. */
8
+ export function createCustomizationSkillInstaller({ yuriDataDir }) {
9
+ let resources;
10
+ const prepare = () => {
11
+ resources ??= (async () => {
12
+ const contents = await Promise.all(files.map((name) => readFile(new URL(`./skill/${name}`, import.meta.url), 'utf8')));
13
+ const hash = createHash('sha256').update(contents.join('\0')).digest('hex').slice(0, 16);
14
+ const directory = path.join(yuriDataDir, 'session-skills', `yuri-customization-${hash}`);
15
+ await mkdir(path.join(directory, 'references'), { recursive: true, mode: 0o700 });
16
+ await Promise.all(files.map(async (name, index) => {
17
+ const target = path.join(directory, name);
18
+ const temporary = `${target}.${randomUUID()}.tmp`;
19
+ try { await writeFile(temporary, contents[index], { mode: 0o600 }); await rename(temporary, target); }
20
+ finally { await rm(temporary, { force: true }); }
21
+ }));
22
+ return path.join(directory, 'SKILL.md');
23
+ })().catch((error) => { resources = undefined; throw error; });
24
+ return resources;
25
+ };
26
+ return async (client, sessionID) => {
27
+ const file = await prepare();
28
+ await client.session.instructions.entry.put({ sessionID, key: 'yuri.customization',
29
+ value: `Yuri customization: for appearance (themes, CSS/layout, Logo, macOS Dock), global pages/tabs, custom file parsing/previews, preview exports, or GUI panels/commands/settings, read ${JSON.stringify(file)} before choosing a plugin API. Its UI structure/style reference maps built-in blocks, selectors, tokens and transparency layers; capability references cover contracts and runtime limits. Use its workflow for building, installation and rollback. Install or apply changes only when requested.`,
30
+ });
31
+ };
32
+ }
33
+
34
+ /** Managed local servers share the resource filesystem; external servers do not. */
35
+ export function registerCustomizationSessionSkill(app, { express, yuriDataDir, getIsSharedOpenCodeService, getIsExternalOpenCode, waitForOpenCodeReady, createClient }) {
36
+ const install = createCustomizationSkillInstaller({ yuriDataDir });
37
+ app.post('/api/session', express.json({ limit: '1mb' }), async (req, res, next) => {
38
+ if (getIsSharedOpenCodeService() || getIsExternalOpenCode()) return next();
39
+ const body = req.body ?? {};
40
+ if (!body || typeof body !== 'object' || Array.isArray(body)) return res.status(400).json({ error: 'Session input must be an object' });
41
+ let client, created;
42
+ try {
43
+ await waitForOpenCodeReady();
44
+ client = createClient();
45
+ created = await client.session.create(body);
46
+ if (!created?.id) throw new Error('Session creation was not confirmed');
47
+ await install(client, created.id);
48
+ return res.json({ data: created });
49
+ } catch {
50
+ let retainedSessionID = created?.id;
51
+ if (created?.id && !body.id) {
52
+ try { await client.session.remove({ sessionID: created.id }); retainedSessionID = undefined; }
53
+ catch { /* Preserve the ID when rollback cannot be confirmed. */ }
54
+ }
55
+ return res.status(503).json({ code: 'session_skill_initialization_failed', error: 'New session capability initialization failed', ...(retainedSessionID ? { sessionID: retainedSessionID } : {}) });
56
+ }
57
+ });
58
+ }
@@ -0,0 +1,53 @@
1
+ import { afterEach, describe, expect, it, vi } from 'vitest';
2
+ import fs from 'node:fs/promises';
3
+ import os from 'node:os';
4
+ import path from 'node:path';
5
+ import express from 'express';
6
+ import { createCustomizationSkillInstaller, registerCustomizationSessionSkill } from './session-skill.js';
7
+
8
+ const cleanup = [];
9
+ afterEach(async () => { for (const dispose of cleanup.splice(0)) await dispose(); });
10
+ async function directory() {
11
+ const root = await fs.mkdtemp(path.join(os.tmpdir(), 'yuri-customization-'));
12
+ cleanup.push(() => fs.rm(root, { recursive: true, force: true }));
13
+ return root;
14
+ }
15
+ describe('built-in customization instructions', () => {
16
+ it('stages a complete skill and references and installs only a short session-scoped pointer', async () => {
17
+ const root = await directory();
18
+ const put = vi.fn(); const client = { session: { instructions: { entry: { put } } } };
19
+ const install = createCustomizationSkillInstaller({ yuriDataDir: root });
20
+ await install(client, 'ses_one'); await install(client, 'ses_two');
21
+ const entry = put.mock.calls[0][0];
22
+ expect(entry).toMatchObject({ sessionID: 'ses_one', key: 'yuri.customization' });
23
+ expect(entry.value.length).toBeLessThan(1500);
24
+ const file = JSON.parse(entry.value.match(/read (".*?") before/)[1]);
25
+ expect(await fs.readFile(file, 'utf8')).toContain('name: yuri-customization');
26
+ for (const name of ['appearance', 'ui-surfaces', 'gui-api', 'workflow', 'global-pages', 'file-previews', 'preview-exports']) expect((await fs.readFile(path.join(path.dirname(file), 'references', `${name}.md`), 'utf8')).length).toBeGreaterThan(500);
27
+ expect(await fs.readFile(path.join(path.dirname(file), 'references', 'appearance.md'), 'utf8')).toContain('yuri.branding');
28
+ expect(put.mock.calls[1][0].value).toBe(entry.value);
29
+ });
30
+ it('initializes managed sessions, rolls back failures, preserves adopted sessions and skips external/shared ownership', async () => {
31
+ const root = await directory();
32
+ let external = false, shared = false, failed = false;
33
+ const client = { session: {
34
+ create: vi.fn(async (body) => ({ ...body, id: body.id ?? 'ses_new' })), remove: vi.fn(),
35
+ instructions: { entry: { put: vi.fn(async () => { if (failed) throw new Error('unavailable'); }) } },
36
+ } };
37
+ const app = express();
38
+ registerCustomizationSessionSkill(app, { express, yuriDataDir: root, getIsExternalOpenCode: () => external, getIsSharedOpenCodeService: () => shared, waitForOpenCodeReady: async () => {}, createClient: () => client });
39
+ app.post('/api/session', (_, res) => res.status(202).json({ delegated: true }));
40
+ const server = await new Promise((resolve) => { const s = app.listen(0, '127.0.0.1', () => resolve(s)); });
41
+ cleanup.unshift(() => new Promise((resolve) => server.close(resolve)));
42
+ const request = (body = {}) => fetch(`http://127.0.0.1:${server.address().port}/api/session`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body) });
43
+ expect((await (await request({ title: 'Keep' })).json()).data.title).toBe('Keep');
44
+ expect(client.session.instructions.entry.put).toHaveBeenCalledWith(expect.objectContaining({ sessionID: 'ses_new', key: 'yuri.customization' }));
45
+ failed = true; expect((await request()).status).toBe(503);
46
+ expect(client.session.remove).toHaveBeenCalledExactlyOnceWith({ sessionID: 'ses_new' });
47
+ expect((await (await request({ id: 'ses_existing' })).json()).sessionID).toBe('ses_existing');
48
+ expect(client.session.remove).toHaveBeenCalledTimes(1);
49
+ external = true; expect((await request()).status).toBe(202);
50
+ external = false; shared = true; expect((await request()).status).toBe(202);
51
+ expect(client.session.create).toHaveBeenCalledTimes(3);
52
+ });
53
+ });
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: yuri-customization
3
+ description: Customize Yuri through GUI plugins for appearance, global pages, custom file previews, export actions, panels, commands, and settings.
4
+ ---
5
+
6
+ # Yuri customization
7
+
8
+ Use a standard OpenCode GUI plugin to change the running Yuri UI without modifying Yuri's source or installation. This skill describes Yuri's supported subset of the experimental OpenCode GUI SDK 2.2.0, not every capability in the newest upstream Desktop.
9
+
10
+ ## Workflow
11
+
12
+ 1. Identify the requested change and target client: Web, Electron, VS Code, hosted mobile, or Capacitor. Separate visual changes from backend behavior. Inspect the user's existing plugin/config before changing it. An explanation request does not authorize installation.
13
+ 2. Choose the extension point by the requested capability and read its reference:
14
+ - Existing UI blocks, backgrounds/transparency, selectors, spacing and built-in style tokens: [UI structure and styles](references/ui-surfaces.md). Start here for CSS changes before inspecting application bundles.
15
+ - Themes, CSS, logos, Dock icons: [appearance](references/appearance.md).
16
+ - Global main-content tabs and titlebar entries: [global pages](references/global-pages.md).
17
+ - Custom file suffixes, parsers, inline/mobile previews and file icons: [file previews](references/file-previews.md).
18
+ - Preview toolbar placement, PDF/PNG/HTML export and iframe snapshot boundaries: [preview actions and exports](references/preview-exports.md).
19
+ - Panels, commands, settings, files, RPC, lifecycle, runtime support: [GUI API](references/gui-api.md).
20
+ - Every implementation: [direct-CJS package, installation, updates and rollback](references/workflow.md); compilation is an optional branch.
21
+ 3. Default to `package.json` plus a directly authored `gui-experimental.cjs`, using host-provided modules and inline CSS/assets. This needs no dependency install or compilation. Implement only the requested capabilities; use the optional build branch when TS/TSX or dependency bundling is actually needed.
22
+ 4. Syntax-check the exported CJS file and install within the requested scope, preserving unrelated global OpenCode configuration. A local CJS edit reloads through the existing watcher; project-only configuration does not provide window GUI inventory.
23
+ 5. Verify each requested capability in the target client, including its failure and cleanup behavior; use the matching reference's verification criteria. Finish with the plugin directory, changed settings, verified behavior, known limits, and how to undo it.
24
+
25
+ References distinguish host contracts from illustrative templates and case studies. Choose rendering, authentication and file formats for the current requirement; case-study protocols and dependencies belong to those integrations.
26
+
27
+ ## Source fallback
28
+
29
+ If the references and target UI leave the relevant selector, style owner or extension behavior unclear, inspect the implementation at https://github.com/yee94/yuri. Prefer the tag matching the installed Yuri version; use `main` for development builds. Start from the source-owner paths in [UI structure and styles](references/ui-surfaces.md) or the matching capability reference, and read the owning component/style/host module to resolve the specific uncertainty. Repository source is a lookup fallback; customization still goes in the plugin.
30
+
31
+ ## Boundaries
32
+
33
+ - `Style` can affect the whole document. A GUI plugin is trusted JavaScript, not a sandbox. Prefer tokens and narrow, stable selectors; arbitrary CSS can hide controls or trigger network requests.
34
+ - Yuri themes and branding are host-consumed custom registries, declared with official `Registry.define`; they are not official OpenCode built-ins. Other hosts may ignore them.
35
+ - Enabled plugins apply their appearance contributions automatically; [appearance](references/appearance.md) defines priority and fallback. Saved base theme preferences remain separate.
36
+ - macOS customization means the running Dock icon only. Keep signed `.app` resources, Finder/Launchpad icons, bundle identifiers and update origins unchanged.
37
+ - Native `main` runs only for trusted local Electron connections. Remote/Relay, Web, VS Code and mobile cannot execute local Node/Electron code. Use supported window APIs there; never bypass the native gate.
38
+ - Pre-JavaScript startup screens retain Yuri's built-in branding. Plugins load after the usable shell; never delay startup to apply a skin.
@@ -0,0 +1,79 @@
1
+ # Appearance contracts
2
+
3
+ Use `Plugin`, `Registry`, and `Style` from `@opencode/plugin/gui`. Start with the [direct-CJS package](workflow.md); the TypeScript below documents shapes, not a compilation requirement.
4
+
5
+ ## Activation and priority
6
+
7
+ Enabled plugins apply themes, CSS, Logo and supported Dock icons automatically. There is no separate plugin-appearance selector. For each resource kind (and each theme variant), the last matching contribution wins: later plugins in the service's global inventory take priority, then later contributions within that plugin. Priority follows inventory order, not asynchronous bundle arrival or plugin names.
8
+
9
+ Disabling, failure or withdrawal reveals the preceding active contribution, then the user's base theme or Yuri's default branding. Existing light/dark mode and saved base theme choices remain unchanged. Expose only the intended active resources; if a plugin needs its own variants, choose which to register through its own configuration.
10
+
11
+ ## Theme contributions: `yuri.theme`
12
+
13
+ Each contribution is:
14
+
15
+ ```ts
16
+ type ThemeContribution = {
17
+ id: string
18
+ title: string
19
+ variant: 'light' | 'dark'
20
+ colors?: Record<string, unknown>
21
+ config?: {
22
+ fonts?: { sans?: string; mono?: string; heading?: string }
23
+ spacing?: { xs?: string; sm?: string; md?: string; lg?: string; xl?: string }
24
+ transitions?: { fast?: string; normal?: string; slow?: string }
25
+ }
26
+ }
27
+ ```
28
+
29
+ `colors` is a deep partial Yuri theme, merged onto the built-in default for the variant. Common families: `primary` (base/foreground/hover/active), `surface` (background/foreground/muted/mutedForeground/elevated/elevatedForeground/overlay/subtle), `interactive` (border/hover/active/selection/selectionForeground/focusRing), `status`, `syntax`, `chat`, `markdown`, `tools`. Preserve the schema's nested string/color structure. Required resulting tokens are validated. Neutral base-text brightness floors still apply; syntax, secondary and accent colors remain theme-owned.
30
+
31
+ ```ts
32
+ const Theme = Registry.define<ThemeContribution>('yuri.theme')
33
+ ctx.add(Theme, {
34
+ id: 'ink-dark', title: 'Ink Dark', variant: 'dark',
35
+ colors: {
36
+ primary: { base: '#8dafff' },
37
+ surface: { background: '#151820', muted: '#202532' },
38
+ },
39
+ })
40
+ ```
41
+
42
+ The host owns a collision-free theme ID `gui:` + `JSON.stringify([pluginId, id])`; authors supply only the local `id`. Themes override the current matching light/dark variant while enabled and are not added as Settings choices. Up to 16 themes per plugin, 128 per window, 64 KiB per theme. VS Code continues to follow its editor theme; embedded views follow their parent theme.
43
+
44
+ ## CSS: official `Style`
45
+
46
+ ```js
47
+ const { Style } = require('@opencode/plugin/gui')
48
+ ctx.add(Style, `[data-yuri-logo] { border-radius: 12%; }`)
49
+ ```
50
+
51
+ CSS is active immediately while the plugin is enabled. Declarative resource priority does not reorder style elements; normal cascade rules still apply. For existing blocks, read [UI structure and styles](ui-surfaces.md): it maps material owners, selectors, theme aliases, specificity, scoped recipes and native transparency boundaries. It also explains why changing a semantic variable alone may leave its generated alias unchanged.
52
+
53
+ ## Branding: `yuri.branding`
54
+
55
+ ```ts
56
+ type Branding = {
57
+ id: string
58
+ title: string
59
+ logo?: { svg: string; lightSvg?: string }
60
+ dockIcon?: { png: string; lightPng?: string }
61
+ }
62
+ const Branding = Registry.define<Branding>('yuri.branding')
63
+ ctx.add(Branding, {
64
+ id: 'studio', title: 'Studio',
65
+ logo: { svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9" fill="#8dafff"/></svg>' },
66
+ })
67
+ ```
68
+
69
+ At least one of `logo` / `dockIcon` is required. `svg` / `png` are the dark/default resource; the `light*` resource is optional. Logo and Dock are resolved independently, so a Logo-only plugin does not suppress another plugin's Dock icon. Branding does not rename the app or replace its wordmark text.
70
+
71
+ - Logos: inline complete SVG text with SVG namespace; maximum 16 KiB UTF-8 each. Static geometry, groups, gradients, defs, clipPath, mask and local `#id` references are allowed. Scripts, event handlers, embedded HTML, stylesheets, inline style, external references, DTD and processing instructions are rejected. Resources render as images, never injected SVG markup.
72
+ - Dock: inline `data:image/png;base64,...`, at most 2 MiB of URL text, valid PNG, dimensions 1–1024 per side. Encode the chosen image once and embed the data URL in the CJS file. No filesystem path or remote image URL. Requires trusted local macOS Electron; no plugin `main` needed. Preview builds or older shells may reject the capability. Other runtimes still support the logo.
73
+ - Maximum 8 branding entries/plugin, 64/window; combined serialized appearance contributions 8 MiB/plugin, 16 MiB/window. IDs/titles are nonempty strings up to 128 characters; IDs are unique within each registry/plugin.
74
+ - Unregister, disable, reload, failure and runtime switch withdraw resources. If several local windows apply a Dock icon, the newest active window update wins; closing/releasing it restores the previous window's icon or Yuri default. System appearance changes cannot overwrite an active plugin icon.
75
+ - Invalid appearance contributions or a failed Dock application fail the owning plugin and clean its contributions; unrelated plugins remain active. Diagnostics appear in plugin settings. These contracts do not grant a JS sandbox.
76
+
77
+ ## Verification
78
+
79
+ For each supplied appearance resource, verify automatic activation, light/dark behavior, disable restoring the fallback, re-enable restoring the resource, and hot rebuild removing obsolete resources. Confirm saved base theme preferences remain intact and multiple providers follow inventory priority. CSS overrides must retain their intended precedence after theme switches. Check Logo changes in the running UI; startup branding remains built-in. Dock verification requires a real trusted local macOS Electron window, including lease release and multiple-window ownership when applicable.
@@ -0,0 +1,113 @@
1
+ # Custom file formats and previews
2
+
3
+ A file parser/viewer uses official `LinkHandler` + `Panel` + `PanelTab.file`, optionally `yuri.file-icon`. Yuri matches the tab's normalized complete file path to its existing file preview and mounts your Solid view there, including the mobile file sheet. The plugin owns format parsing and rendering; a custom format can use ordinary DOM/Solid without an iframe or compiler. Upstream `FileViewer` is unsupported in Yuri.
4
+
5
+ ## Complete JSON-format viewer
6
+
7
+ This typed entry recognizes `.report.json`, parses JSON into formatted text, retains its DOM on background updates, and localizes errors. For the default direct-CJS package in [workflow](workflow.md), use `require`/`module.exports` and omit type annotations; the example uses no JSX. The optional build branch supports retaining TypeScript. A visual report renderer replaces the parsing/rendering part.
8
+
9
+ ```ts
10
+ import { bindPlugin, createKeyed, LinkHandler, Panel, Plugin, usePlugin, type PanelProps, type PanelTab } from '@opencode/plugin/gui'
11
+ import { createComponent, onCleanup } from 'solid-js'
12
+
13
+ const suffix = '.report.json'
14
+ function matches(href: string): boolean {
15
+ if (!href || /[\u0000\r\n]/.test(href) || /^[#?]/.test(href)) return false
16
+ if (/^[a-z][a-z\d+.-]*:/i.test(href) && !/^file:/i.test(href) && !/^[a-z]:[\\/]/i.test(href)) return false
17
+ return href.split(/[?#]/, 1)[0].toLowerCase().endsWith(suffix)
18
+ }
19
+ function linkPath(link: { href: string; base?: string }): string {
20
+ const href = link.href.split(/[?#]/, 1)[0]
21
+ return link.base && !/^(?:[a-z]+:|[\\/])/i.test(href) ? `${link.base}/${href}` : href
22
+ }
23
+ function Preview(props: PanelProps): HTMLElement {
24
+ const ctx = usePlugin()
25
+ const root = document.createElement('section')
26
+ const status = document.createElement('p')
27
+ status.setAttribute('role', 'status')
28
+ const content = document.createElement('pre')
29
+ content.style.cssText = 'white-space:pre-wrap;overflow-wrap:anywhere'
30
+ root.append(status, content)
31
+ createKeyed(() => JSON.stringify([props.session.key, props.screen.file.root, props.tab.file]), () => {
32
+ const file = props.screen.file
33
+ const path = props.tab.file
34
+ if (!path) return
35
+ let active = true
36
+ status.textContent = ctx.t('loading')
37
+ content.textContent = ''
38
+ void file.sync(path).catch(() => { if (active) status.textContent = ctx.t('failed') })
39
+ onCleanup(() => { active = false; file.unwatch(path) })
40
+ createKeyed(() => file.get(path), (state) => {
41
+ if (state.error || state.notFound) { status.textContent = ctx.t('failed'); return }
42
+ if (!state.loaded || !state.content) return
43
+ try {
44
+ const report: unknown = JSON.parse(state.content.content)
45
+ content.textContent = JSON.stringify(report, null, 2)
46
+ status.textContent = ''
47
+ } catch { status.textContent = ctx.t('invalid') }
48
+ })
49
+ })
50
+ return root
51
+ }
52
+ export default Plugin.define({
53
+ i18n: {
54
+ en: { loading: 'Loading report…', failed: 'Could not read report', invalid: 'Invalid report JSON' },
55
+ 'zh-CN': { loading: '正在加载报告…', failed: '无法读取报告', invalid: '报告 JSON 格式无效' },
56
+ },
57
+ setup(ctx) {
58
+ const tabs = new Map<string, PanelTab>()
59
+ const View = bindPlugin((props: PanelProps) => createComponent(Preview, props))
60
+ ctx.add(LinkHandler, {
61
+ priority: 10,
62
+ match: (link) => matches(link.href),
63
+ exists: (link) => {
64
+ const file = ctx.screen.current()?.file
65
+ return file ? file.exists(file.resolve(linkPath(link))) : false
66
+ },
67
+ open: (link) => {
68
+ const screen = ctx.screen.current()
69
+ const session = link.session ?? ctx.sessions.current()
70
+ if (screen && session) ctx.layout.open(`${ctx.id}:${screen.file.resolve(linkPath(link))}`, session, { background: link.background })
71
+ },
72
+ })
73
+ ctx.add(Panel, {
74
+ id: 'report', region: 'side', mobile: { title: 'Reports', order: 46, kind: 'menu' },
75
+ list: (input) => {
76
+ const wanted = input.open.filter(matches)
77
+ for (const path of tabs.keys()) if (!wanted.includes(path)) tabs.delete(path)
78
+ return wanted.map((path) => {
79
+ let tab = tabs.get(path)
80
+ if (!tab) { tab = { id: path, title: path.split(/[\\/]/).at(-1) ?? path, file: path, closable: 'compact' }; tabs.set(path, tab) }
81
+ return tab
82
+ })
83
+ },
84
+ render: (props) => createComponent(View, props),
85
+ })
86
+ },
87
+ })
88
+ ```
89
+
90
+ `Panel.list` returns stable tab objects; `file` is the full canonical workspace-relative or absolute path, not its basename. Read `props.session`, `props.tab`, and `props.screen.file` through live getters. The owner changes on directory/file identity, not on each token or ordinary parent render. `file.sync(path)` reads and acquires a watch; `file.get(path)` is reactive; `file.unwatch(path)` releases it. There is no public `file.watch` method. Source reads are bounded at 128 KiB UTF-8, 64 model entries; a held lease observes changes at a 2-second foreground stat interval, not push-real-time.
91
+
92
+ Register `yuri.file-icon` as `{ id, extensions: ['report'], svg, lightSvg? }` for a dedicated extension. Matching uses the final extension only: `.report.json` is still `json`, so registering `json` changes **all** JSON file icons. Prefer a distinct suffix such as `.report` when you want a dedicated icon. Directories are never overridden. SVG safety rules are shared with branding; limits are 64 entries/plugin, 512/window, 1–64 extensions/entry, 8 MiB total raw SVG.
93
+
94
+ ## Optional: executable formats
95
+
96
+ When a format executes source rather than displaying data:
97
+
98
+ - Treat source as untrusted content. Decide the iframe sandbox, allowed dependencies and network policy deliberately; a same-document plugin is not a security sandbox.
99
+ - Keep the outer preview DOM/iframe stable for background changes. Send revisioned updates; don't reset the reading position or recreate the frame on every file poll.
100
+ - Validate message source, expected origin (or the explicitly designed opaque-origin protocol), frame ID and source revision. Ignore messages from old attempts/closed panels.
101
+ - `iframe.onload`, runtime initialization and content commit are different milestones. Show local loading until the current source actually commits; retain prior interactive content during a background update. A file/read/compile error is not authoritative empty success.
102
+ - Close/retry/source-mode transitions remove listeners, cancel stale work and dispose the frame. Two mounted instances of one tab must not share mutable DOM, screenshot targets or controllers.
103
+ - If preview actions or exports are requested, use [preview actions and exports](preview-exports.md). The host owns placement; the plugin owns rendering and capture for each mounted instance.
104
+
105
+ ### Case study: Eficy
106
+
107
+ Source: npm `@eficy/opencode2-plugin`, https://github.com/yee94/opencode-eficy. See `src/gui.tsx`, `src/file-links.ts`, `src/frame.ts`, and `packages/opencode2-plugin/README.md`.
108
+
109
+ Eficy routes `.eficy` into a Panel and supplies an iframe runtime to compile/render TSX. Its separate server entry registers an agent skill and validation tool. This illustrates an executable format with server-side authoring support; neither the TSX runtime nor the server entry is required for a data-only viewer. Consult the integration's current source for its frame protocol and dependencies.
110
+
111
+ ## Verification
112
+
113
+ Verify local-path matching, unrelated-link handling, valid/invalid/missing input, background updates preserving the view, and cleanup on close or disable. Exercise two mounted instances and the target mobile layout when applicable. Executable formats also need stale-result and execution-boundary checks.
@@ -0,0 +1,81 @@
1
+ # Global pages and tabs
2
+
3
+ Yuri provides a global **main-content placement**, not a new renderer. `yuri.page` registers Solid content; `yuri.pages` opens the caller's page. The same host mounting, plugin context, options and cleanup are used by pages, file panels and settings. A page can render ordinary Solid/DOM or embed an existing web app in an iframe. It does not need a session or plugin `main`.
4
+
5
+ ## Complete window entry
6
+
7
+ This typed example shows the page contract. For the default direct-CJS package in [workflow](workflow.md), replace imports/exports with `require`/`module.exports` and omit type annotations; it uses no JSX. Retain TypeScript through the optional build branch only when needed.
8
+
9
+ ```ts
10
+ import { Command, Contract, Plugin, Registry, TitlebarItem, usePlugin, type IconName, type TitlebarItem as TitlebarContribution } from '@opencode/plugin/gui'
11
+ import { createComponent, type JSX } from 'solid-js'
12
+
13
+ const Page = Registry.define<{
14
+ id: string; title: string; icon?: IconName; render(): JSX.Element
15
+ }>('yuri.page')
16
+ const Pages = Contract.define<{
17
+ open(id: string): boolean; current(): string | undefined
18
+ }, 'yuri.pages'>('yuri.pages')
19
+
20
+ function Dashboard(): HTMLElement {
21
+ const ctx = usePlugin()
22
+ const root = document.createElement('section')
23
+ root.className = 'studio-dashboard'
24
+ root.textContent = typeof ctx.options.message === 'string' ? ctx.options.message : ctx.t('welcome')
25
+ return root
26
+ }
27
+
28
+ export default Plugin.define({
29
+ i18n: {
30
+ en: { open: 'Open Studio', welcome: 'Studio dashboard', unavailable: 'Studio is unavailable in this layout' },
31
+ 'zh-CN': { open: '打开 Studio', welcome: 'Studio 看板', unavailable: '当前布局不支持 Studio' },
32
+ },
33
+ setup(ctx) {
34
+ const pages = ctx.use(Pages)
35
+ ctx.add(Page, { id: 'dashboard', title: 'Studio', icon: 'window-analytics', render: () => createComponent(Dashboard, {}) })
36
+ const open = () => {
37
+ const live = pages()
38
+ if (!ctx.layout.narrow() && live.status === 'active' && live.value.open('dashboard')) return
39
+ ctx.toast.show({ title: ctx.t('unavailable'), variant: 'error' })
40
+ }
41
+ ctx.add(TitlebarItem, (): TitlebarContribution | undefined => {
42
+ if (ctx.layout.narrow()) return
43
+ const live = pages()
44
+ return {
45
+ id: 'dashboard', label: 'Studio', title: ctx.t('open'), icon: 'window-analytics',
46
+ pressed: live.status === 'active' && live.value.current() === 'dashboard', run: open,
47
+ }
48
+ })
49
+ ctx.add(Command, () => ({ id: 'dashboard', title: ctx.t('open'), enabled: !ctx.layout.narrow(), run: open }))
50
+ },
51
+ })
52
+ ```
53
+
54
+ The host key is `JSON.stringify([pluginId, pageId])`; pass only your **local** page ID to `pages.open`. The API cannot open another plugin's page or override a host contract. It returns false if navigation is unavailable. Access `ctx.use(Pages)()` live when clicking; it can be inactive while a provider is unavailable.
55
+
56
+ Global pages and their entry points are for desktop/Web desktop layouts and VS Code. On mobile the pages contract is inactive and the page is not mounted; hide the titlebar item and disable its command when `ctx.layout.narrow()`. Use a file Panel for mobile file previews instead. Registration itself does not navigate.
57
+
58
+ ## Optional: embed an existing application
59
+
60
+ Use ordinary Solid/DOM for plugin-owned content; an iframe is an option for an existing web application, not a page requirement. For an embedded application:
61
+
62
+ - Verify browser reachability, CSP, mixed-content and framing policy before choosing this design.
63
+ - Use the service's supported authentication flow. A message-based handshake requires a receiver on both sides; validate message source and origin and send credentials only to the exact recipient origin. Keep credentials out of URLs and persisted page snapshots.
64
+ - Keep embedded navigation within the page's intended scope. Custom history controls and navigation messages are needed only if the requested interaction calls for them.
65
+ - Own frames and listeners within the mounted component; release them with `onCleanup`. Preserve the mounted view across unrelated session/render updates.
66
+
67
+ ### Case study: Runmark
68
+
69
+ Source: npm `@runmarks/opencode-plugin`, repository package `packages/plugin-opencode`; see `src/gui.ts`, `src/gui-pages.ts`, `src/gui-frame.ts`, `src/gui-navigation.ts`, and its README.
70
+
71
+ Runmark embeds its existing Dashboard. `DashboardFrame` reads `endpoint` / `apiKey` from `usePlugin().options`; a source/origin-checked `runmark.embed.ready` / `runmark.embed.auth` handshake supplies in-memory `X-API-Key` authentication. Its embedded fetches omit cookies and reject redirects. Its navigation UI uses bounded in-memory history and `runmark.embed.location` / `runmark.embed.navigate` messages.
72
+
73
+ Those message names, header and navigation rules form Runmark's service protocol, not the `yuri.page` contract. Consult the integration's current source when adapting it.
74
+
75
+ ## Entry icon versus content branding
76
+
77
+ The top-level plugin `package.json` `icon` supplies Yuri's plugin-entry artwork when available (validated image/data resource; monochrome SVG can follow `currentColor` through the host mask). `TitlebarItem.icon` is a name from the official icon catalog. Neither replaces the application's Logo; use `yuri.branding` for that. Keep existing official product artwork instead of inventing a substitute.
78
+
79
+ ## Verification
80
+
81
+ Verify opening/current-page state, access to the plugin's options, inactive-layout behavior, and cleanup on close, disable or replacement. For an embedded service, also verify its authentication and navigation boundaries and confirm unrelated session updates retain the view.
@@ -0,0 +1,37 @@
1
+ # Yuri GUI host reference
2
+
3
+ The supported contract is OpenCode GUI SDK **2.2.0**. Consult current official docs at https://opencode.ai/v2/docs/build/plugins/gui for SDK syntax, then respect Yuri's narrower implementation below. Never assume an upstream feature is implemented here.
4
+
5
+ ## Window APIs
6
+
7
+ - `Command`: command palette and plugin management execution; hidden commands can be called by `ctx.commands.run`. No GUI shortcut registration or slash autocomplete yet.
8
+ - `TitlebarItem`: global action/status, independent of a session; reactive label/title/icon/busy/pressed.
9
+ - `Panel`: Solid `list/render`, reactive session/tab getters; file panels mount in existing file previews. An independent panel uses a dialog/mobile sheet, not upstream's full draggable workspace layout.
10
+ - `LinkHandler`: match, exists and open file/custom links. Use `ctx.links.open({ href, base, session })` for navigation. Preserve workspace-relative identity; never resolve against a different session's directory.
11
+ - `SettingsPage`: independent plugin settings pages; host `page/section` injection is unsupported.
12
+ - `MenuItem`: `session.panel` only.
13
+ - `Style`: document CSS, automatic cleanup.
14
+ - `Registry` / `Contract`: contribution lists and live APIs. Own provided token IDs under your plugin ID; `yuri.*` is host-reserved for providers. Declare tokens once in a contract module. Use `bindPlugin` for Solid components shared with another plugin.
15
+ - `Store.global` / `Store.session`, translation dictionaries, `ctx.options`; no `from` migration or live cross-window store sync yet. Do not publish options/credentials in URLs, DOM or storage snapshots.
16
+ - `ctx.sessions.current()`, current screen files and implemented layout operations; missing members explicitly reject.
17
+ - `ctx.toast.show`: pure-text title/description, default/success/error/loading, duration/persistent, returned dismiss; no icon/actions.
18
+ - `ctx.system.save`: client-owned UTF-8 file save (32 MiB bound); platform cancellation returns false. `ctx.system.copy` / `openExternal` are available.
19
+ - Server plugin RPC through the current authenticated `ctx.client`; GUI cannot install remote server tools by itself.
20
+
21
+ Unsupported registries include upstream `Server`, `ComposerPill`, `Slot`, `FileViewer`, native menu/embeds. Unsupported APIs reject rather than succeeding silently.
22
+
23
+ ## Yuri supplemental registries and contracts
24
+
25
+ - `yuri.theme`, `yuri.branding`: see [appearance](appearance.md).
26
+ - `yuri.file-icon`: `{ id, extensions: string[], svg, lightSvg? }`; static SVG resources for file extensions, not app/Dock icons.
27
+ - `yuri.page` / `yuri.pages`: global main-content Solid pages, desktop layouts/VS Code only. Exact types, entry points and optional web-app embedding: [global pages](global-pages.md).
28
+ - Custom suffix parsing, normalized file identities, `PanelTab.file` and mobile sheets: [file previews](file-previews.md).
29
+ - `yuri.exportPDF`, `yuri.exportLongImage`, `yuri.previewActions`: separate host contracts for client-owned export/preview actions. Exact types, registration lifetime, capture protocol and runtime matrix: [preview actions and exports](preview-exports.md).
30
+
31
+ ## Lifecycle and platforms
32
+
33
+ `setup` is synchronous and runs under a Solid owner. Register contributions there; timers/listeners require `onCleanup`, long work must observe `ctx.signal`. Never use module-global mutable state. Async setup is invalid. Keep heavy work out of startup and streaming renders. Read reactive `props.session` / `props.tab` inside reactive calculations, rather than destructuring once.
34
+
35
+ `main` is optional, app-scoped, and only available on trusted local Electron with an active native lease. It may import Electron and Node built-ins. Window evaluation sees inert placeholders for those imports, not native access. IPC uses official `Ipc.define` schemas; remote/Relay/Web/VS Code/mobile remain window-only. Native storage, serverEndpoints, cli, embeds and menus are unsupported in Yuri's main host.
36
+
37
+ Consume `ctx.use(token)` as a live accessor: `pending`, `inactive`, or `active`. Check status before using its value. A disabled provider must not break the consumer. Prefer declarative contributions over DOM replacement, private React stores, or direct native APIs.
@@ -0,0 +1,74 @@
1
+ # Preview actions and device exports
2
+
3
+ These are **Yuri** host contracts declared through official `Contract.define`. They do not require a plugin `main`, do not grant filesystem access, and remain separate from OpenCode's experimental IPC.
4
+
5
+ ## Exact structural contracts
6
+
7
+ ```ts
8
+ import { Contract } from '@opencode/plugin/gui'
9
+
10
+ export type Snapshot = { html: string; width: number; height: number }
11
+ export type Progress = { stage: 'preparing' | 'capturing' | 'rendering' | 'encoding' | 'saving'; completed?: number; total?: number }
12
+ type Options = { signal?: AbortSignal; onProgress?: (value: Progress) => void }
13
+ type Limits = { maxHTMLBytes: number; maxWidth: number; maxHeight: number; maxPixels: number }
14
+ type Result = { status: 'saved' | 'cancelled' }
15
+ export type Surface = {
16
+ readonly element: HTMLElement
17
+ readonly signal: AbortSignal
18
+ snapshot(options?: Options): Promise<Snapshot>
19
+ }
20
+ export interface PreviewActionsAPI {
21
+ readonly version: 1
22
+ register(input: {
23
+ element: HTMLElement
24
+ capture(options: Options): Promise<Snapshot>
25
+ render(surface: Surface): HTMLElement
26
+ }): () => void
27
+ }
28
+ export interface PDFAPI {
29
+ version: 1; limits: Limits
30
+ exportPDF(input: { snapshot: Snapshot; filename: string; pageSize?: 'a4' | 'letter' }, options?: Options): Promise<Result>
31
+ }
32
+ export interface LongImageAPI {
33
+ version: 1; limits: Limits
34
+ exportLongImage(input: { snapshot: Snapshot; filename: string }, options?: Options): Promise<Result>
35
+ }
36
+ export const PreviewActions = Contract.define<PreviewActionsAPI, 'yuri.previewActions'>('yuri.previewActions')
37
+ export const ExportPDF = Contract.define<PDFAPI, 'yuri.exportPDF'>('yuri.exportPDF')
38
+ export const ExportLongImage = Contract.define<LongImageAPI, 'yuri.exportLongImage'>('yuri.exportLongImage')
39
+ ```
40
+
41
+ The `capturing` stage belongs to preview capture; device export reports preparing/rendering/encoding/saving. Keep the two export capabilities separate: a device may expose one without the other.
42
+
43
+ ## Registration and action flow
44
+
45
+ Inside the owning Panel's Solid render/component, follow `ctx.use(PreviewActions)` with `createKeyed`. While active and `version === 1`, call `register({ element, capture, render })` and register its returned disposer with `onCleanup`. Registering in `setup`, from an async callback without the owning context, or against another panel's element is invalid.
46
+
47
+ `render(surface)` creates the plugin-owned toolbar DOM; Yuri places it beside source controls on desktop and in the mobile preview title row. At click time:
48
+
49
+ 1. Read the corresponding export live accessor; hide PDF/PNG actions unless its status is active and version is 1. Keep HTML save independent.
50
+ 2. Combine `surface.signal` and the action's cancellation signal. Call `surface.snapshot({ signal, onProgress })`; it invokes this instance's latest `capture` and excludes the toolbar.
51
+ 3. Build static, self-contained HTML with inline styles and data images. Serialize current input values, filters and expanded state; remove executable scripts/external dependencies. Use actual nonzero width/height, not stale initial dimensions. For iframe content, implement a source/frame/revision-checked snapshot message protocol; the host cannot read arbitrary cross-origin DOM for you.
52
+ 4. Check the returned HTML UTF-8 bytes, width, height and width×height against the export capability's `limits`. Re-read the live accessor after capture and require the same provider generation before calling it.
53
+ 5. Call `exportPDF({ snapshot, filename, pageSize: 'a4' }, options)` or `exportLongImage({ snapshot, filename }, options)`. Treat saved/cancelled distinctly; surface failure to the user without retrying an already completed save. `EXPORT_UNSUPPORTED` withdraws that action; other failures remain retryable.
54
+
55
+ Unmount, source-mode switch, retry, disable, replacement and runtime switch dispose the toolbar and abort capture/export. Do not cache the document HTML during toolbar registration. A page/file snapshot belongs to the mounted instance, not to the global active tab.
56
+
57
+ ## Runtime matrix
58
+
59
+ | Capability | Electron | iOS / Android Capacitor | Web / hosted mobile / VS Code |
60
+ | --- | --- | --- | --- |
61
+ | Preview action placement | Yes | Yes | Yes |
62
+ | PDF / long image | Probe each capability | Probe each capability | Inactive unless the runtime explicitly provides it |
63
+ | Connection to local, remote or Relay Host | Current device capabilities, independent of Host location | Same | Same |
64
+ | `ctx.system.save({ name, content })` | Browser download path | Native file picker for UTF-8 content | Browser download |
65
+
66
+ Unlike native plugin `main`, current-device exports can be available in remote/Relay sessions. Never use the Host's filesystem or shell to imitate saving on the user's device. HTML export preserves rerunnable source only when deliberately implemented by the plugin; it is a different artifact from the static native-export snapshot.
67
+
68
+ ## Case study: Eficy
69
+
70
+ See `src/gui.tsx`, `src/preview-actions.ts`, `src/export-contract.ts`, `src/export-types.ts` and `src/export-toolbar.ts` of https://github.com/yee94/opencode-eficy. Eficy implements iframe capture and an inline toolbar fallback for older hosts without `yuri.previewActions`. That fallback is an integration choice: add compatibility behavior only for hosts the plugin intends to support.
71
+
72
+ ## Verification
73
+
74
+ For each requested export format, verify current-state capture, saved/cancelled/failed outcomes, limits, capability withdrawal, and cancellation when its view closes. Test multiple mounted previews to confirm each action captures its own content. Native save verification requires the target device; a browser-only test proves only the capture/toolbar contract.