@yuriai/web 0.3.6-beta.7 → 0.3.6

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 (277) hide show
  1. package/README.md +19 -3
  2. package/bin/install-portable.sh +102 -0
  3. package/bin/install-portable.test.js +112 -0
  4. package/bin/lib/DOCUMENTATION.md +2 -0
  5. package/bin/lib/cli-startup.js +7 -2
  6. package/bin/lib/cli-startup.portable.test.js +30 -0
  7. package/bin/lib/commands-serve.js +4 -1
  8. package/bin/lib/commands-update.js +3 -0
  9. package/bin/lib/commands-update.test.js +18 -0
  10. package/dist/assets/{AgentAvatar-BAQBlzA3.js → AgentAvatar-BOvjZ-DI.js} +1 -1
  11. package/dist/assets/{AgentSelector-J9hP4-Bk.js → AgentSelector-Dl_zIOMk.js} +1 -1
  12. package/dist/assets/ArchivedSessionsDialog-Cr9Ji-RY.js +1 -0
  13. package/dist/assets/{AssistantConversationSurface-_A2W4Tnz.js → AssistantConversationSurface-CLdjNFeJ.js} +3 -3
  14. package/dist/assets/{AssistantSessionCard-DwFD8GED.js → AssistantSessionCard-BufyrOfo.js} +2 -2
  15. package/dist/assets/{AssistantUnreadBadge-CE-vFrqq.js → AssistantUnreadBadge-Dn9HAEDr.js} +1 -1
  16. package/dist/assets/{AssistantView-CwbzFAMd.js → AssistantView-Cg0wPomu.js} +1 -1
  17. package/dist/assets/{AssistantWorkingAvatar-BsEtliRi.js → AssistantWorkingAvatar-1KNjr2A2.js} +1 -1
  18. package/dist/assets/{AssistantsSettingsPage-D9VPa4dh.js → AssistantsSettingsPage-DeYfZAYH.js} +1 -1
  19. package/dist/assets/BinaryFileFallback-DfD02fS_.js +1 -0
  20. package/dist/assets/{BtwPanel-BKb8rDF4.js → BtwPanel-B_2w8P0X.js} +2 -2
  21. package/dist/assets/BusyDots-CAv4ygIO.js +4 -0
  22. package/dist/assets/{ChatContainer-ZnwOYIsK.js → ChatContainer-Dgv075jT.js} +23 -23
  23. package/dist/assets/ChatView-Cr71C0ZB.js +3 -0
  24. package/dist/assets/{DiagramView-DlPmGnFF.js → DiagramView-CTnpBsWU.js} +1 -1
  25. package/dist/assets/{DiffView-C4OcFwR2.js → DiffView-j_yWF1Mz.js} +2 -2
  26. package/dist/assets/{DiffViewToggle-DP9SqcOq.js → DiffViewToggle-CYusbmY5.js} +1 -1
  27. package/dist/assets/{ErrorBoundary-4W-EnYOU.js → ErrorBoundary-yr_JeVdx.js} +1 -1
  28. package/dist/assets/{FadeInOnReveal-nGKSFTqz.js → FadeInOnReveal-C56koblQ.js} +1 -1
  29. package/dist/assets/{GuiPluginMount-c2DXwGOK.js → GuiPluginMount-CBJiLdzR.js} +1 -1
  30. package/dist/assets/{GuiPluginPage-DqdVVRyY.js → GuiPluginPage-DJa8gFLk.js} +1 -1
  31. package/dist/assets/{GuiPluginSurface-CHSyQ4aq.js → GuiPluginSurface-Cc7q80jp.js} +1 -1
  32. package/dist/assets/{GuiPluginTitlebarItems-CBKus1Mw.js → GuiPluginTitlebarItems-rbK3leaL.js} +1 -1
  33. package/dist/assets/{GuiPluginWindow-AKqPYEmj.js → GuiPluginWindow-Cpg2HYWe.js} +1 -1
  34. package/dist/assets/{Icon-DlTEfBVi.js → Icon-C1rjS64C.js} +1 -1
  35. package/dist/assets/{ImageLoadingPlaceholder-ashKHrbc.js → ImageLoadingPlaceholder-2hMqBtYh.js} +1 -1
  36. package/dist/assets/{LoadingImage-3JaK3zim.js → LoadingImage-Bs-621ZL.js} +1 -1
  37. package/dist/assets/MarkdownRenderer-BZl_T1ng.js +2 -0
  38. package/dist/assets/{MarkdownRendererImpl-B1l_DAn4.js → MarkdownRendererImpl-DiCCNjDr.js} +3 -3
  39. package/dist/assets/{MarkstreamRendererImpl-D6ZF2eue.js → MarkstreamRendererImpl-Bzz3OZlX.js} +2 -2
  40. package/dist/assets/{MobileAssistantSettingsPage-Dm4f6DKQ.js → MobileAssistantSettingsPage-pBhJR2t6.js} +1 -1
  41. package/dist/assets/{MobileAssistantTab-CmMbLmB9.js → MobileAssistantTab-Ceo442NF.js} +1 -1
  42. package/dist/assets/{MobileBtwPage-CNj2pFrK.js → MobileBtwPage-DPPmDMA6.js} +1 -1
  43. package/dist/assets/{MobileChangesSurface-CLD7Fujk.js → MobileChangesSurface-DfDoSkTS.js} +1 -1
  44. package/dist/assets/{MobileChatScreen-a7vpuIM7.js → MobileChatScreen-DHTbrnAr.js} +1 -1
  45. package/dist/assets/{MobileDetailNavigation-BPj5iEVr.js → MobileDetailNavigation-e1u1y59T.js} +1 -1
  46. package/dist/assets/{MobileFilesSurface-Ct7W0756.js → MobileFilesSurface-CJoqR3By.js} +2 -2
  47. package/dist/assets/{MobileHtmlNetworkBoundary-BcAbBib9.js → MobileHtmlNetworkBoundary-GBhYVYvu.js} +2 -2
  48. package/dist/assets/{MobileOverlayPanel-Dn4b7Mdh.js → MobileOverlayPanel-DzKTKeZX.js} +1 -1
  49. package/dist/assets/{MobileResizableSheet-BMSiXFxQ.js → MobileResizableSheet-CkA7qhco.js} +1 -1
  50. package/dist/assets/{MobileSettingsTab-b_XK7f7k.js → MobileSettingsTab-Bv0HsXFH.js} +1 -1
  51. package/dist/assets/{MobileShareBridge-BCHk5fz-.js → MobileShareBridge-B-co2UPE.js} +1 -1
  52. package/dist/assets/{MobileSurface-CXbG9hIC.js → MobileSurface-D63k27t5.js} +1 -1
  53. package/dist/assets/{MobileTabPageHeader-CipRIWUc.js → MobileTabPageHeader-FmtbGhwq.js} +1 -1
  54. package/dist/assets/{ModelLogo-Bbgp7ClJ.js → ModelLogo-CMnp5fyy.js} +1 -1
  55. package/dist/assets/{ModelSelector-BkrO8Ru2.js → ModelSelector-BF4wYwaz.js} +1 -1
  56. package/dist/assets/{MultiRunWindow-rDqLANIK.js → MultiRunWindow-D0OU63re.js} +1 -1
  57. package/dist/assets/{OnboardingScreen-DOcb9Wbw.js → OnboardingScreen-CDHtDQ0k.js} +1 -1
  58. package/dist/assets/{OverlayScrollbar-qJOPKg_1.js → OverlayScrollbar-m1EAqRES.js} +1 -1
  59. package/dist/assets/{PierreDiffViewer-DkAFZ6Oy.js → PierreDiffViewer-CZk1tZ3K.js} +1 -1
  60. package/dist/assets/{ProviderLogo-xLMKk9bq.js → ProviderLogo-BqQTME35.js} +1 -1
  61. package/dist/assets/{RemoteAssistantSessionCard-iPGtzThJ.js → RemoteAssistantSessionCard-CrbCVhqD.js} +1 -1
  62. package/dist/assets/{RemoteDesktopPanel-Da5Cb1yO.js → RemoteDesktopPanel-BzLmzmjb.js} +1 -1
  63. package/dist/assets/ScheduledTasksDialog-DmtcDZHc.js +3 -0
  64. package/dist/assets/{ScrollableOverlay-X1R_GNYm.js → ScrollableOverlay-CEglrXfm.js} +1 -1
  65. package/dist/assets/{SettingsGroup-DYxliYJo.js → SettingsGroup-Bm-l3IIs.js} +1 -1
  66. package/dist/assets/{SettingsView-Dfvs9-aB.js → SettingsView-CYEjDYWC.js} +15 -15
  67. package/dist/assets/{SettingsWindow-CCACaIcI.js → SettingsWindow-CvJsxUyu.js} +1 -1
  68. package/dist/assets/{SetupTourDialog-CTzVvWuI.js → SetupTourDialog-DWaVtkY0.js} +1 -1
  69. package/dist/assets/{SyncActions-BKhytR-H.js → SyncActions-C0gph0P8.js} +1 -1
  70. package/dist/assets/TerminalView-Cm8Ts51w.js +9 -0
  71. package/dist/assets/{TextSelectionMenu-C--W3Vxw.js → TextSelectionMenu-Dcv_PdES.js} +2 -2
  72. package/dist/assets/{ToolOutputDialog-4QosyyR-.js → ToolOutputDialog-QJpQjmqK.js} +2 -2
  73. package/dist/assets/{YuriLogo-YAE_6MsI.js → YuriLogo-BbS_Wj4g.js} +1 -1
  74. package/dist/assets/{YuriWordmark-BFHeVOwW.js → YuriWordmark-CqkcfAJl.js} +1 -1
  75. package/dist/assets/{assistant-attachment-cache-B8Bvp93X.js → assistant-attachment-cache-CIij0OGm.js} +1 -1
  76. package/dist/assets/{assistantMessagePreview-Dnt4nt3K.js → assistantMessagePreview-wmP-d_oa.js} +1 -1
  77. package/dist/assets/{assistantQueries-CV8A3Du5.js → assistantQueries-Dpxq78yP.js} +1 -1
  78. package/dist/assets/{auto-read-context-DWZsSvww.js → auto-read-context-aRn5yhDb.js} +1 -1
  79. package/dist/assets/{capgoAdapter-Dlf0ZlyX.js → capgoAdapter-BSnmtwX8.js} +1 -1
  80. package/dist/assets/{card-5xUgzwRy.js → card-aoveY4I3.js} +1 -1
  81. package/dist/assets/{chatUpwardIntent-ExbNZtoR.js → chatUpwardIntent-WxxmOppY.js} +1 -1
  82. package/dist/assets/{checkbox-BFuJ7w49.js → checkbox-CljLXON1.js} +1 -1
  83. package/dist/assets/{client-Brr-ja1l.js → client-CmtAKi5B.js} +1 -1
  84. package/dist/assets/{collapsible-DVLlg0W-.js → collapsible-DkeWKEAb.js} +1 -1
  85. package/dist/assets/{connection-hint-BARMaHbM.js → connection-hint-DsKyICgn.js} +1 -1
  86. package/dist/assets/{context-menu-CUqRZr1z.js → context-menu-XuMa5TsA.js} +1 -1
  87. package/dist/assets/{desktopHosts-BBCo4tyU.js → desktopHosts-COI-czjF.js} +1 -1
  88. package/dist/assets/{desktopRelayRestore-Cm2ITP98.js → desktopRelayRestore-BEPNc7qb.js} +1 -1
  89. package/dist/assets/device-TCHW5U2y.js +2 -0
  90. package/dist/assets/{diagram-BazwKH8x.js → diagram-DFv7Lh0h.js} +1 -1
  91. package/dist/assets/dialog-B6B8FIrL.css +1 -0
  92. package/dist/assets/{dialog-C_SxVFAo.js → dialog-Cx20I73q.js} +1 -1
  93. package/dist/assets/{dropdown-menu-CtAMJkEu.js → dropdown-menu-XdfySbu2.js} +1 -1
  94. package/dist/assets/es-CLAEdHpc.js +15 -0
  95. package/dist/assets/{fileMentionTouchSelection-DTWPCfYk.js → fileMentionTouchSelection-pXNTKHAc.js} +1 -1
  96. package/dist/assets/{fileReferenceActions-ez7SW3IW.js → fileReferenceActions-wN7mWY3w.js} +1 -1
  97. package/dist/assets/fr-BOB0gfdQ.js +13 -0
  98. package/dist/assets/{gitApi-SW-vcLxI.js → gitApi-LXGRaDt8.js} +1 -1
  99. package/dist/assets/{gitApiHttp-fl5lB9Lu.js → gitApiHttp-ZjM4HkSo.js} +2 -2
  100. package/dist/assets/{githubAuthQueries-2oyz-OKR.js → githubAuthQueries-3AJp5LD5.js} +1 -1
  101. package/dist/assets/{historyImportQueries-CTTVEQfk.js → historyImportQueries-B_mfphxe.js} +1 -1
  102. package/dist/assets/host-fTclNJST.js +1 -0
  103. package/dist/assets/{i18n-CzwXzoAE.js → i18n-iu4pzqPi.js} +1 -1
  104. package/dist/assets/{icons-B9kwDPqG.js → icons-BWijARKS.js} +1 -1
  105. package/dist/assets/{imageSource-5oLkHxn4.js → imageSource-qzgDdfT4.js} +1 -1
  106. package/dist/assets/{input-JTEWOZSR.js → input-BMYgp87Q.js} +1 -1
  107. package/dist/assets/{input-store-olhHHDxh.js → input-store-CzG_3qFv.js} +1 -1
  108. package/dist/assets/insertionBoundaries-bmxIeFzH.js +1 -0
  109. package/dist/assets/ja-CfM9jZ6u.js +15 -0
  110. package/dist/assets/{kbd-2UM_iptD.js → kbd-6RW-BxuR.js} +1 -1
  111. package/dist/assets/ko-DZOSVPHB.js +15 -0
  112. package/dist/assets/main-B-Wdp6An.js +169 -0
  113. package/dist/assets/main-BLBAaohb.js +2 -0
  114. package/dist/assets/{markdownHeightCache-CYOg5vHN.js → markdownHeightCache-ojT5txMS.js} +1 -1
  115. package/dist/assets/{mcpQueries-BBdJw27k.js → mcpQueries-BRuytwhB.js} +1 -1
  116. package/dist/assets/miniChat-BsrHy2rU.js +2 -0
  117. package/dist/assets/mobile-B8SHiXyq.js +2 -0
  118. package/dist/assets/{mobileBackNavigation-BMKb1AFe.js → mobileBackNavigation-CVrR_jtn.js} +1 -1
  119. package/dist/assets/{mobileConnections-B3sO6LHd.js → mobileConnections-iSUwFNqu.js} +2 -2
  120. package/dist/assets/{multirun-CIo87Y8M.js → multirun-Y3K5yS-8.js} +1 -1
  121. package/dist/assets/{native-config-B9rt7FGl.js → native-config-tvqKHwCC.js} +1 -1
  122. package/dist/assets/{nativeComposerCover-692JM3W7.js → nativeComposerCover-5rYz1E3W.js} +1 -1
  123. package/dist/assets/{navigation-DZmwc567.js → navigation-DFmCAq2g.js} +2 -2
  124. package/dist/assets/openRemoteProjectSession-CeSahDtQ.js +1 -0
  125. package/dist/assets/openSessionFromDeepLink-DsZnNy4W.js +2 -0
  126. package/dist/assets/pl-CaT81Sz8.js +15 -0
  127. package/dist/assets/platform-B2ylz14u.js +1 -0
  128. package/dist/assets/{pluginPresentation-mP_3zj0n.js → pluginPresentation-rls1AMJN.js} +2 -2
  129. package/dist/assets/{project-preview-D6gRDnY0.js → project-preview-yQerlKs2.js} +1 -1
  130. package/dist/assets/{projectActions-BhKknl2F.js → projectActions-B11KAI3f.js} +1 -1
  131. package/dist/assets/{prompt-attachment-upload-DmbZaK4Q.js → prompt-attachment-upload-BzYqZdzd.js} +1 -1
  132. package/dist/assets/pt-BR-9p1IKCEF.js +15 -0
  133. package/dist/assets/pwa-BrLPfcLk.js +2 -0
  134. package/dist/assets/{queue-abort-optimistic-DEP8n-eH.js → queue-abort-optimistic-CXKdQu_T.js} +1 -1
  135. package/dist/assets/{quota-noApkDjp.js → quota-BhdKv_Wc.js} +1 -1
  136. package/dist/assets/{reference-history-YQuuHaEQ.js → reference-history-Bzn-aPYg.js} +1 -1
  137. package/dist/assets/{remote-input-store-BuAuKvuo.js → remote-input-store-DPw_n0MZ.js} +1 -1
  138. package/dist/assets/{remoteProjectQueries-DtoxpM86.js → remoteProjectQueries-BQzoY_Y9.js} +1 -1
  139. package/dist/assets/{remoteSessionReference-Dh6CWWHy.js → remoteSessionReference-DORvqUYQ.js} +1 -1
  140. package/dist/assets/{renderElectronMiniChatApp-BXmpVc6d.js → renderElectronMiniChatApp-DXKgwBat.js} +2 -2
  141. package/dist/assets/renderMobileApp-CKN6rWxR.js +17 -0
  142. package/dist/assets/{runtime-file-download-CljroGkE.js → runtime-file-download-CaeLqIEY.js} +1 -1
  143. package/dist/assets/{runtime-file-resource-BlS-Ew1z.js → runtime-file-resource-BGZ4tGr5.js} +1 -1
  144. package/dist/assets/{runtimeConfig-CuW_HzK3.js → runtimeConfig-BqUZF6Wt.js} +1 -1
  145. package/dist/assets/runtimeEndpointReset-Bu02gAs3.js +4 -0
  146. package/dist/assets/{scheduledTaskNavigation-B1lpSDXk.js → scheduledTaskNavigation-r3g3DfXq.js} +1 -1
  147. package/dist/assets/{select-CDQXclVD.js → select-BPIsJWhM.js} +1 -1
  148. package/dist/assets/{sessionLookup-CQ0NWnCZ.js → sessionLookup-DZhrkKRI.js} +1 -1
  149. package/dist/assets/sessionOwnership-LoUNVeuJ.js +2 -0
  150. package/dist/assets/{shortcuts-DstiGEO9.js → shortcuts-DMupfl7l.js} +1 -1
  151. package/dist/assets/{sortable-tabs-strip-DyQNBvm3.js → sortable-tabs-strip-1bKw81VO.js} +1 -1
  152. package/dist/assets/{speechSettingsQueries-BkOKGdjP.js → speechSettingsQueries-C3JgzCqy.js} +1 -1
  153. package/dist/assets/src-BacdFOCS.css +2 -0
  154. package/dist/assets/{store-BRt8bo0A.js → store-BgsgBTwJ.js} +5 -5
  155. package/dist/assets/{switch-zJbRtv_r.js → switch-B4-v9kvg.js} +1 -1
  156. package/dist/assets/{terminalApi-FD8v3NAb.js → terminalApi-wdwb9MVG.js} +1 -1
  157. package/dist/assets/{textarea-DTZqFbDz.js → textarea-DExmj0ZR.js} +1 -1
  158. package/dist/assets/{timeFormat-Cfigwcpm.js → timeFormat-BlSO2-ws.js} +1 -1
  159. package/dist/assets/{tooltip-dWH5QFxu.js → tooltip-Di-WRJUZ.js} +1 -1
  160. package/dist/assets/{truncated-path-CXZAFwlh.js → truncated-path-nKzykV5p.js} +1 -1
  161. package/dist/assets/types-4xeqxklF.js +2 -0
  162. package/dist/assets/ui-BCYkB585.js +13 -0
  163. package/dist/assets/uk-BUSl_Y_1.js +15 -0
  164. package/dist/assets/useAppFontEffects-BCJPQstm.js +7 -0
  165. package/dist/assets/{useAssistantUIStore-90j09IZB.js → useAssistantUIStore-BUWPTwNV.js} +1 -1
  166. package/dist/assets/{useDesktopWindowControlsLayout-DGB6_pWm.js → useDesktopWindowControlsLayout-BtpyMlOS.js} +1 -1
  167. package/dist/assets/{useDictation-hf70zk6P.js → useDictation-4HBMkISY.js} +1 -1
  168. package/dist/assets/{useEffectiveDirectory-CcSfY1lN.js → useEffectiveDirectory-BYswRwIv.js} +1 -1
  169. package/dist/assets/useFontPreferences-C4dQT72k.js +1 -0
  170. package/dist/assets/{useGitStore-IAG82rgx.js → useGitStore-DqBPgmf-.js} +1 -1
  171. package/dist/assets/{useInlineCommentDraftStore-DAq3lz0A.js → useInlineCommentDraftStore-CGJ6dM8d.js} +1 -1
  172. package/dist/assets/useMcpConfigStore-DEcxFuzW.js +1 -0
  173. package/dist/assets/{useMobileSwipeActions-5-ZcwhfI.js → useMobileSwipeActions-DqlR4X-T.js} +1 -1
  174. package/dist/assets/useMobileTranscriptSyncHint-BDKcqtq_.js +10 -0
  175. package/dist/assets/{useModelLists-D8s2D-yz.js → useModelLists-DsFTBlMr.js} +1 -1
  176. package/dist/assets/{useOpenCodeReadiness-BIyAApPB.js → useOpenCodeReadiness-CHybAoBh.js} +1 -1
  177. package/dist/assets/usePluginsStore-BIBHPK4A.js +1 -0
  178. package/dist/assets/{useProjectGitActions-DPqScNnn.js → useProjectGitActions-DeFcqi_O.js} +1 -1
  179. package/dist/assets/{useProjectGitStore-BOiooCle.js → useProjectGitStore-JGZk-NCk.js} +1 -1
  180. package/dist/assets/{useProjectRuntimeAPIs-DQaT_Ok_.js → useProjectRuntimeAPIs-BMBBtJB-.js} +1 -1
  181. package/dist/assets/{useQuotaStore-C3FDA_wk.js → useQuotaStore-C3qJTiD7.js} +1 -1
  182. package/dist/assets/{useSessionBtwStore-eNT3w9Un.js → useSessionBtwStore-D7P-pknd.js} +1 -1
  183. package/dist/assets/{useStreamingTextThrottle-D8r8Ox9l.js → useStreamingTextThrottle-CjWAE0oQ.js} +1 -1
  184. package/dist/assets/useTerminalStore-C_QzSEgP.js +1 -0
  185. package/dist/assets/{useUIStore-BkYqSmAD.js → useUIStore-68ZPpgYA.js} +1 -1
  186. package/dist/assets/worktreeManager-pRvX5dQT.js +1 -0
  187. package/dist/assets/{worktreeSourceBranchPreference-B9rTzT2t.js → worktreeSourceBranchPreference-B7d3RYcc.js} +1 -1
  188. package/dist/assets/zh-CN-BGKgQtWd.js +15 -0
  189. package/dist/assets/zh-TW-jM5lIKfe.js +15 -0
  190. package/dist/index.html +16 -16
  191. package/dist/mini-chat.html +16 -16
  192. package/dist/mobile.html +2 -2
  193. package/package.json +2 -1
  194. package/server/index.js +22 -10
  195. package/server/lib/assistants/DOCUMENTATION.md +11 -6
  196. package/server/lib/assistants/builtin-skills.js +19 -3
  197. package/server/lib/assistants/builtin-skills.test.js +17 -0
  198. package/server/lib/assistants/contact-tools.js +47 -3
  199. package/server/lib/assistants/contact-tools.test.js +59 -0
  200. package/server/lib/assistants/harness.js +5 -2
  201. package/server/lib/assistants/harness.test.js +1 -1
  202. package/server/lib/assistants/routes.js +1 -0
  203. package/server/lib/assistants/service.js +7 -2
  204. package/server/lib/assistants/yuri-tools.js +1 -1
  205. package/server/lib/assistants/yuri-tools.test.js +1 -1
  206. package/server/lib/gui-customization/DOCUMENTATION.md +32 -7
  207. package/server/lib/gui-customization/projects-client.mjs +1 -1
  208. package/server/lib/gui-customization/projects.js +6 -6
  209. package/server/lib/gui-customization/projects.test.js +13 -2
  210. package/server/lib/gui-customization/remote-connections-client.mjs +1 -1
  211. package/server/lib/gui-customization/remote-connections.js +7 -6
  212. package/server/lib/gui-customization/remote-connections.test.js +17 -0
  213. package/server/lib/gui-customization/session-skill.js +16 -4
  214. package/server/lib/gui-customization/session-skill.test.js +16 -0
  215. package/server/lib/gui-customization/skill/SKILL.md +2 -2
  216. package/server/lib/gui-customization/skill/references/deep-links.md +15 -11
  217. package/server/lib/gui-customization/skill/references/gui-api.md +50 -1
  218. package/server/lib/gui-customization/skill/references/projects.md +19 -0
  219. package/server/lib/gui-customization/skill/references/remote-connections.md +3 -0
  220. package/server/lib/gui-customization/skill-caller.js +18 -0
  221. package/server/lib/host-update/DOCUMENTATION.md +5 -0
  222. package/server/lib/host-update/cli.js +5 -2
  223. package/server/lib/host-update/cli.test.js +15 -2
  224. package/server/lib/opencode/DOCUMENTATION.md +2 -1
  225. package/server/lib/opencode/custom-provider.test.js +41 -0
  226. package/server/lib/opencode/feature-routes-runtime.js +20 -3
  227. package/server/lib/opencode/settings-helpers.js +5 -0
  228. package/server/lib/opencode/settings-helpers.test.js +10 -0
  229. package/server/lib/package-manager.js +14 -0
  230. package/server/lib/package-manager.test.js +7 -0
  231. package/server/lib/portable-installation.js +34 -0
  232. package/server/lib/portable-installation.test.js +38 -0
  233. package/server/lib/session-index/DOCUMENTATION.md +8 -0
  234. package/server/lib/session-index/adopt-unindexed-session.js +46 -0
  235. package/server/lib/session-index/adopt-unindexed-session.test.js +77 -0
  236. package/server/lib/session-index/event-ingest.js +14 -1
  237. package/server/lib/session-index/event-ingest.test.js +18 -0
  238. package/dist/assets/ArchivedSessionsDialog-8KudFtdU.js +0 -1
  239. package/dist/assets/BinaryFileFallback-DhRqRBKp.js +0 -1
  240. package/dist/assets/BusyDots-BRm9osT-.js +0 -4
  241. package/dist/assets/ChatView-CZyfJPJI.js +0 -3
  242. package/dist/assets/MarkdownRenderer-MCdcFkrB.js +0 -2
  243. package/dist/assets/ScheduledTasksDialog-CBVwmP3I.js +0 -3
  244. package/dist/assets/TerminalView-BE88iCut.js +0 -8
  245. package/dist/assets/device-DaBjLp2g.js +0 -2
  246. package/dist/assets/dialog-D9CkSNCA.css +0 -1
  247. package/dist/assets/es-BuXtFKUW.js +0 -15
  248. package/dist/assets/fr-BaZeffY9.js +0 -13
  249. package/dist/assets/host-DkOpLMtd.js +0 -1
  250. package/dist/assets/insertionBoundaries-CmHoHHu4.js +0 -1
  251. package/dist/assets/ja-CGVx5A8U.js +0 -15
  252. package/dist/assets/ko-C663nzbf.js +0 -15
  253. package/dist/assets/main-2WZS1sUa.js +0 -2
  254. package/dist/assets/main-BoaXbSk_.js +0 -169
  255. package/dist/assets/miniChat-sY4pEF3a.js +0 -2
  256. package/dist/assets/mobile-oVfsL7ax.js +0 -2
  257. package/dist/assets/openRemoteProjectSession-CU45azVB.js +0 -1
  258. package/dist/assets/openSessionFromDeepLink-BoGMvzx0.js +0 -2
  259. package/dist/assets/pl-CeBOMwg9.js +0 -15
  260. package/dist/assets/platform-B_vXw3WJ.js +0 -1
  261. package/dist/assets/pt-BR-r8268Pk6.js +0 -15
  262. package/dist/assets/pwa-Cni1iHtS.js +0 -2
  263. package/dist/assets/renderMobileApp-B7v2goOK.js +0 -17
  264. package/dist/assets/runtimeEndpointReset-rGqYbpcd.js +0 -4
  265. package/dist/assets/sessionOwnership-DHLgtM_g.js +0 -2
  266. package/dist/assets/src-DYCPWwUH.css +0 -2
  267. package/dist/assets/types-CXWh93pl.js +0 -2
  268. package/dist/assets/ui-DiWlcrZU.js +0 -13
  269. package/dist/assets/uk-CeQ1XJ99.js +0 -15
  270. package/dist/assets/useAppFontEffects-DvftNvNI.js +0 -7
  271. package/dist/assets/useFontPreferences-BPtsS6hr.js +0 -1
  272. package/dist/assets/useMcpConfigStore-C6bGnrzx.js +0 -1
  273. package/dist/assets/useMobileTranscriptSyncHint-DwKbHgxp.js +0 -10
  274. package/dist/assets/usePluginsStore-DF6jfADo.js +0 -1
  275. package/dist/assets/worktreeManager-Dm96jF0K.js +0 -1
  276. package/dist/assets/zh-CN-Bv854olO.js +0 -15
  277. package/dist/assets/zh-TW-gx8cO-Cx.js +0 -15
@@ -11,6 +11,8 @@ A helper result with `terminal:true` ends the workflow immediately. HTTP 401/403
11
11
  3. Start each target independently, then poll `list` until every requested instance has `running:false`. Setup saves/reuses the instance, installs or aligns the managed Yuri/OpenCode runtime, establishes SSH forwarding and pushes configuration. A repeated active setup shares the same target operation. A failed target does not cancel the others.
12
12
  4. Report each target separately: `phase:ready` confirms SSH/service readiness, `sync:complete` confirms transfer, and `magpie:ready` confirms gateway health. Warnings and failed/missing checks mean partial completion, not success. Authentication/host-key interaction uses the existing native prompt where available; otherwise the user must prepare their SSH key/agent or saved settings. Keep the other targets progressing.
13
13
 
14
+ New managed Linux connections download the desktop's matching self-contained release (x64/arm64, glibc 2.36+). It includes private Node, precompiled native modules and OpenCode; the target needs bash, curl or wget, tar and a SHA-256 utility, not Node/npm/Python or build tools. Setup verifies the package before activation and keeps system Node and shell profiles unchanged. Existing saved npm/bun choices and macOS targets retain their package-manager path. Unsupported systems and failed downloads/preflight remain explicit failures, not a request to install a compiler.
15
+
14
16
  If the user also requested a project on that machine, continue with [remote project registration](projects.md#connected-remote-projects-and-sessions) through the separately bound project helper. Rediscover the authenticated target with `remote-hosts` after setup; an SSH readiness receipt alone does not register a project or supply its Hub/Host/instance identity.
15
17
 
16
18
  The local Host is the configuration source, regardless of other windows' selected runtimes. If Magpie is **installed**, setup selects its native configuration/authorization transfer when available, provisions the remote headless CLI and verifies its server gateway. An installed but unconfigured source reports `magpie_source_not_configured`; it does not silently switch to a different credential source. Without Magpie, setup uses OpenCode's credential API. Local-path/file plugins are filtered from SSH configuration copies; registry plugins remain.
@@ -24,6 +26,7 @@ For managed SSH connections, report these checks separately. Use the bound helpe
24
26
  - **Reconnect:** retry the saved instance ID after disconnecting, and again after restarting the desktop. Each attempt must finish with `running:false` and `phase:ready`; open that remote workspace and verify an authenticated operation against its OpenCode service. A prior ready receipt or a standalone web server's health response does not establish this result.
25
27
  - **Runtime readiness:** the executable selected by managed SSH startup must load its server dependencies, load native modules in the selected runtime, and reach authenticated service readiness. A CLI version response or successful package installation alone is insufficient. Record the actual runtime/package versions when available; otherwise mark that evidence unavailable.
26
28
  - **Update:** when a different target version is available, reconnect through the normal managed entry. Verify that version alignment completes, the running remote Host reports the target version, and its workspace remains usable. Disconnect and reconnect once more to confirm the updated installation is selected again. Record the before/target/running versions; without a version transition, report update acceptance as unverified.
29
+ - **Portable update:** managed reconnect owns release alignment through the stable launcher. Old release files remain available; download/checksum/preflight failure does not activate the candidate. Portable `yuri update` and HTTP self-update report unsupported; use normal managed reconnect rather than an npm workaround.
27
30
  - **Installation ownership:** the executable used on subsequent connections must resolve to the installation that the managed updater replaces. A manually deployed checkout, wrapper or redirected executable requires evidence that an update replaces the selected installation and the next connection uses it; successful startup alone does not prove updateability.
28
31
 
29
32
  Report connection, runtime and update evidence independently from configuration-sync and gateway receipts. If an update or startup fails, report its failed stage and retain the saved instance for retry; success requires a subsequent normal managed connection to reach readiness. These are acceptance criteria, not authorization to rewrite runtime files, executable links or credentials outside the supported setup flow.
@@ -0,0 +1,18 @@
1
+ const validID = (value) => typeof value === 'string' && value.length > 0 && value.length <= 256;
2
+
3
+ /** A bridge caller is exactly one admitted Session or one live Assistant contact. */
4
+ export const parseSkillCaller = (body) => {
5
+ const { sessionID, assistantID } = body ?? {};
6
+ if (validID(sessionID) && assistantID === undefined) return { kind: 'session', id: sessionID };
7
+ if (validID(assistantID) && sessionID === undefined) return { kind: 'assistant', id: assistantID };
8
+ return null;
9
+ };
10
+
11
+ const hostOriginOf = (req) => `http://${req.socket.localAddress === '::1' ? '[::1]' : '127.0.0.1'}:${req.socket.localPort}`;
12
+
13
+ /** Loopback and service credential are checked by the route; this binds the caller to this Host. */
14
+ export const isBoundSkillCaller = async (req, caller, { createClient, hasAssistant }) => {
15
+ if (caller.kind === 'assistant') return Boolean(await hasAssistant?.(caller.id));
16
+ const session = await createClient().session.get({ sessionID: caller.id });
17
+ return session.metadata?.yuri?.scheduledTaskSkill?.hostOrigin === hostOriginOf(req);
18
+ };
@@ -75,6 +75,11 @@ unsupported or fail preflight without stopping the Host. Use their installation
75
75
  or service manager instead. Other data scopes sharing one global installation
76
76
  must be administratively drained; the installation lock prevents competing
77
77
  remote helpers but does not coordinate arbitrary external package managers.
78
+ A self-contained Linux release reports
79
+ `portable_installation_requires_release` without probing a package manager.
80
+ Stop it and use its bundled release installer, or reconnect through an updated
81
+ desktop for SSH version alignment. Neither HTTP updates nor `yuri update` may
82
+ fall back to installing a global npm copy.
78
83
  A helper killed before its `finally` cleanup leaves an installation lock in the
79
84
  user cache; an operator must verify no helper remains before removing that lock.
80
85
  Workers deliberately do not race to reap presumed stale locks.
@@ -1,6 +1,7 @@
1
1
  import { fork } from 'node:child_process';
2
2
  import { fileURLToPath } from 'node:url';
3
3
  import { existsSync } from 'node:fs';
4
+ import path from 'node:path';
4
5
  import { discoverCliRelease } from './releases.js';
5
6
 
6
7
  const workerFile = fileURLToPath(new URL('./cli-worker.js', import.meta.url));
@@ -22,13 +23,14 @@ function startWorker(message, detached = false) {
22
23
  }
23
24
 
24
25
  export function createCliUpdateAdapter({ packageRoot, dataDir, getPort, shutdown, currentVersion, env = process.env }) {
25
- const unsupported = process.platform === 'win32' || !packageRoot.replaceAll('\\', '/').includes('/node_modules/')
26
+ const portable = existsSync(path.join(packageRoot, '..', 'portable.json'));
27
+ const unsupported = portable || process.platform === 'win32' || !packageRoot.replaceAll('\\', '/').includes('/node_modules/')
26
28
  || existsSync('/.dockerenv') || env.CONTAINER || env.container || env.INVOCATION_ID || env.PM2_HOME;
27
29
  const configuration = () => ({ packageRoot, dataDir, port: getPort(), pid: process.pid });
28
30
  let checkedAt = 0;
29
31
  const adapter = {
30
32
  host: 'cli', external: true, supported: !unsupported,
31
- reason: unsupported ? 'managed_or_development_installation' : null,
33
+ reason: portable ? 'portable_installation_requires_release' : unsupported ? 'managed_or_development_installation' : null,
32
34
  inspect: (channel) => discoverCliRelease(channel, currentVersion),
33
35
  async refreshSupport() {
34
36
  if (unsupported || Date.now() - checkedAt < 60_000) return;
@@ -37,6 +39,7 @@ export function createCliUpdateAdapter({ packageRoot, dataDir, getPort, shutdown
37
39
  checkedAt = Date.now();
38
40
  },
39
41
  async assertReady() {
42
+ if (unsupported) throw new Error('This installation must be updated through its installer or service manager');
40
43
  const { child, ready } = startWorker({ mode: 'probe', ...configuration() });
41
44
  try { await ready; } finally { if (child.connected) child.disconnect(); child.unref(); }
42
45
  },
@@ -2,13 +2,14 @@ import { EventEmitter } from 'node:events';
2
2
  import { beforeEach, expect, it, vi } from 'vitest';
3
3
  import { createCliUpdateAdapter } from './cli.js';
4
4
 
5
- const fixture = vi.hoisted(() => ({ fork: vi.fn(), inspect: vi.fn(), reject: false, children: [] }));
5
+ const fixture = vi.hoisted(() => ({ fork: vi.fn(), inspect: vi.fn(), reject: false, children: [], portable: false }));
6
6
  vi.mock('node:child_process', () => ({ fork: (...args) => fixture.fork(...args) }));
7
- vi.mock('node:fs', () => ({ existsSync: () => false }));
7
+ vi.mock('node:fs', () => ({ existsSync: (file) => fixture.portable && file.endsWith('/portable.json') }));
8
8
  vi.mock('./releases.js', () => ({ discoverCliRelease: (...args) => fixture.inspect(...args) }));
9
9
 
10
10
  beforeEach(() => {
11
11
  fixture.reject = false; fixture.children = []; fixture.inspect.mockReset(); fixture.fork.mockReset();
12
+ fixture.portable = false;
12
13
  fixture.fork.mockImplementation(() => {
13
14
  const child = Object.assign(new EventEmitter(), {
14
15
  connected: true, unref: vi.fn(), kill: vi.fn(), disconnect: vi.fn(), send: vi.fn(),
@@ -57,3 +58,15 @@ it('advertises development and externally supervised installations as unsupporte
57
58
  expect(host.supported).toBe(false);
58
59
  expect(fixture.fork).not.toHaveBeenCalled();
59
60
  });
61
+
62
+ it('advertises portable installs as unsupported without package-manager probes or shutdown', async () => {
63
+ fixture.portable = true;
64
+ const shutdown = vi.fn();
65
+ const host = adapter(shutdown);
66
+ expect(host.supported).toBe(false);
67
+ expect(host.reason).toBe('portable_installation_requires_release');
68
+ await host.refreshSupport();
69
+ await expect(host.assertReady()).rejects.toThrow('installer');
70
+ expect(fixture.fork).not.toHaveBeenCalled();
71
+ expect(shutdown).not.toHaveBeenCalled();
72
+ });
@@ -81,7 +81,7 @@ encoding, not removed V1 endpoints.
81
81
  - `packages/web/server/lib/opencode/v1-migration-gate.js`: pure V1→v2 migration admission gate (`GET /api/experimental/migration/v1` → whether transcript may be fetched).
82
82
  - `packages/web/server/lib/opencode/managed-capabilities-runtime.js`: managed-child scheduled-task resources, config injection, rotating bridge identity, and bridge authorization.
83
83
  - `packages/web/server/lib/opencode/env-runtime.js`: OpenCode CLI/binary resolution and shell environment runtime.
84
- - `packages/web/server/lib/opencode/ensure-cli.js`: detect local `opencode` version and install the latest stable official V2 into the Yuri data dir when no usable CLI exists. Registry lookup failures remain errors; verified cached installations can be reused offline. Never uses a packaged/bundled binary.
84
+ - `packages/web/server/lib/opencode/ensure-cli.js`: detect local `opencode` version and install the latest stable official V2 into the Yuri data dir when no usable CLI exists. Registry lookup failures remain errors; verified cached installations can be reused offline. The self-contained Linux launcher's PATH supplies its native OpenCode as an ordinary discovered CLI; explicit settings/environment selection still wins.
85
85
  - `packages/web/server/lib/opencode/upgrade-screen.js`: startup gate for the running OpenCode below `2.0.20`. Client/schema dependencies accept compatible 2.x updates; fresh installations and required upgrades resolve latest stable 2.x at installation time. The compatible execution floor is independently `2.0.20` (credential API). An unreadable running version is unavailable even when the local CLI is compatible. `POST /api/opencode/install-required` upgrades the selected shared global CLI in place; other supported local installations use the owned-cache installer. Global upgrades do not persist a binary override, so subsequent launches still follow shell discovery. Success requires the running service to meet both the floor and selected target. External services are not replaced; compatible newer shared services are not automatically downgraded. Failure restores binary selection and reports `upgraded: false`, without claiming process or package-manager rollback.
86
86
  - `packages/web/server/lib/opencode/env-config.js`: OpenCode-related environment variable parsing and validation (host/port/hostname).
87
87
  - `packages/web/server/lib/opencode/hmr-state-runtime.js`: HMR-persistent runtime state initialization, auth-state bootstrap, and HMR sync helpers.
@@ -117,6 +117,7 @@ encoding, not removed V1 endpoints.
117
117
  - Missing theme preferences use `carbonfox-light` / `cursor-dark`, matching the shared UI defaults. Existing per-variant IDs and legacy explicitly selected theme IDs remain authoritative; changing the default does not rewrite a user's saved theme.
118
118
  - Project registry order and `projectSortOrder` are shared Host authority. After a successful changed write, `onProjectOrderChanged` emits `yuri:project-order-changed` on the existing Yuri SSE channel. Clients GET settings on initial mount, tip, and reconnect. Unchanged and failed writes emit no tip; older settings without a sort mode use `manual`.
119
119
  - `packages/web/server/lib/opencode/settings-helpers.js`: Settings payload sanitization/format helpers runtime for response shaping and persisted merge prep.
120
+ - GUI command shortcut overrides use `gui-plugin:` + a JSON tuple of plugin/local command IDs. Keys up to 1024 characters retain their complete identity; oversized plugin keys are omitted rather than truncated into another command's mapping. Existing built-in keys and explicit `__unassigned__` values retain their settings contract.
120
121
  - `packages/web/server/lib/opencode/settings-normalization-runtime.js`: path/settings normalization and sanitization helpers runtime used by settings/routes/config wiring.
121
122
  - `packages/web/server/lib/opencode/theme-runtime.js`: custom theme JSON validation and theme directory loading runtime for settings utility routes.
122
123
  - `packages/web/server/lib/opencode/proxy.js`: OpenCode API/SSE forwarding and readiness-gate route registration.
@@ -96,6 +96,47 @@ describe('custom provider native V2 persistence', () => {
96
96
  expect(JSON.stringify(response.body)).not.toContain('fixture-key');
97
97
  });
98
98
 
99
+ it.each([
100
+ '@opencode/ai/providers/openai-compatible',
101
+ '@opencode/ai/providers/openai-compatible/responses',
102
+ ])('discovers and saves all 12 models from a standard OpenAI list through the HTTP routes (%s)', async (pkg) => {
103
+ const ids = [
104
+ 'gpt-6.1-terra', 'codex-auto-review', 'deepseek-flash', 'gpt-5.6-luna',
105
+ 'gpt-6-astra', 'gpt-reserve', 'deepseek-v4-pro', 'gpt-5.6-sol',
106
+ 'gpt-5.6-terra', 'gpt-6-luna', 'gpt-6-sol', 'gpt-6.1-sol',
107
+ ];
108
+ const payload = {
109
+ data: ids.map((id) => ({ created: 1794458926, id, object: 'model', owned_by: 'openai' })),
110
+ object: 'list',
111
+ };
112
+ const fetch = vi.spyOn(globalThis, 'fetch').mockResolvedValue(new Response(JSON.stringify(payload)));
113
+ configureOpenCodeCredentials(() => client);
114
+ const app = express(); registerCommonRequestMiddleware(app, { express });
115
+ registerOpenCodeRoutes(app, {});
116
+ const discovery = await request(app).post('/api/config/providers/custom/models').send({
117
+ package: pkg, baseURL: 'https://api.example.com/v1', apiKey: 'fixture-key',
118
+ }).expect(200);
119
+ expect(discovery.body).toEqual({ models: ids.map((id) => ({ id, name: id })) });
120
+ expect(fetch).toHaveBeenCalledTimes(1);
121
+ expect(fetch.mock.calls[0][0].toString()).toBe('https://api.example.com/v1/models');
122
+ expect(fetch.mock.calls[0][1].headers.Authorization).toBe('Bearer fixture-key');
123
+ expect(fs.existsSync(file)).toBe(false);
124
+ const config = {
125
+ name: 'Gateway', package: pkg, settings: { baseURL: 'https://api.example.com/v1' },
126
+ models: Object.fromEntries(discovery.body.models.map((model) => [model.id, {
127
+ name: model.name, capabilities: { tools: true, input: ['text'], output: ['text'] },
128
+ }])),
129
+ };
130
+ const saved = await request(app).post('/api/config/providers/custom').send({
131
+ config, apiKey: 'fixture-key',
132
+ }).expect(200);
133
+ const provider = readConfigFile(file).providers[saved.body.providerId];
134
+ expect(provider).toEqual(config);
135
+ expect(Object.keys(provider.models)).toEqual(ids);
136
+ expect(() => Schema.decodeUnknownSync(ConfigProvider.Info)(provider)).not.toThrow();
137
+ expect(fs.readFileSync(file, 'utf8')).not.toContain('fixture-key');
138
+ });
139
+
99
140
  it('does not write for an invalid requested directory', async () => {
100
141
  configureOpenCodeCredentials(() => client);
101
142
  const app = express(); registerCommonRequestMiddleware(app, { express });
@@ -23,7 +23,8 @@ import { registerProjectIconRoutes } from './project-icon-routes.js';
23
23
  import { registerScheduledTaskRoutes } from '../scheduled-tasks/routes.js';
24
24
  import { registerScheduledTaskToolRoute } from '../scheduled-tasks/managed-tool-route.js';
25
25
  import { registerScheduledTaskSessionSkill } from '../scheduled-tasks/session-skill.js';
26
- import { registerCustomizationSessionSkill } from '../gui-customization/session-skill.js';
26
+ import { registerCustomizationSessionSkill, createCustomizationSkillInstaller } from '../gui-customization/session-skill.js';
27
+ import { readSharedServiceRegistration, resolveSharedServiceRegistrationPath } from './shared-service.js';
27
28
  import { registerConversationRoutes } from '../conversations/routes.js';
28
29
  import { registerHistoryImportRoutes } from '../history-import/routes.js';
29
30
  import { registerSessionTurnPageRoutes } from '../session-turn-pages/routes.js';
@@ -135,6 +136,7 @@ export const createFeatureRoutesRuntime = (dependencies) => {
135
136
  getIsExternalOpenCode = () => false,
136
137
  getIsSharedOpenCodeService = () => false,
137
138
  remoteConnectionsAdapter = null,
139
+ getHostPort = () => null,
138
140
  forceResolvedOpenCodeBinary = null,
139
141
  upgradeOpenCodeCli = null,
140
142
  restartOpenCode = null,
@@ -264,8 +266,22 @@ export const createFeatureRoutesRuntime = (dependencies) => {
264
266
  scheduledTaskRouter,
265
267
  remoteConnectionsAdapter,
266
268
  });
269
+ const hasAssistant = (assistantID) => assistantRoutesRuntime?.service?.hasAssistant(assistantID) ?? false;
270
+ // Contacts run on this Host, so they get the same staged helpers as admitted Sessions, bound to their own ID.
271
+ const customizationSkill = createCustomizationSkillInstaller({ yuriDataDir });
272
+ const resolveAssistantCustomizationSkill = async (assistantID) => {
273
+ const port = getHostPort();
274
+ if (!getIsSharedOpenCodeService() || !port) return null;
275
+ const registrationFile = resolveSharedServiceRegistrationPath();
276
+ const upstreamOrigin = new URL(buildOpenCodeUrl('/', '')).origin;
277
+ const registration = await readSharedServiceRegistration({ file: registrationFile });
278
+ if (!registration?.password || registration.origin !== upstreamOrigin
279
+ || getOpenCodeAuthHeaders().Authorization !== `Basic ${Buffer.from(`opencode:${registration.password}`).toString('base64')}`) return null;
280
+ const binding = { hostOrigin: `http://127.0.0.1:${port}`, upstreamOrigin, registrationFile };
281
+ return customizationSkill.resolve({ assistantID }, { projectBinding: binding, ...(remoteConnectionsAdapter ? { remoteBinding: binding } : {}) });
282
+ };
267
283
  registerRemoteConnectionsSkill(app, {
268
- express, adapter: remoteConnectionsAdapter, getIsSharedOpenCodeService, getOpenCodeAuthHeaders,
284
+ express, adapter: remoteConnectionsAdapter, getIsSharedOpenCodeService, getOpenCodeAuthHeaders, hasAssistant,
269
285
  createClient: () => makeOpenCodeV2Client({ baseUrl: buildOpenCodeUrl('/', ''), authHeaders: getOpenCodeAuthHeaders(), getRuntimeContract }),
270
286
  });
271
287
  registerCustomizationSessionSkill(app, {
@@ -310,7 +326,7 @@ export const createFeatureRoutesRuntime = (dependencies) => {
310
326
  const projectRegistry = createProjectRegistry({ persistSettings, validateDirectoryPath });
311
327
  registerProjectsSkill(app, {
312
328
  remoteHostGateway: routeDependencies.remoteHostGateway,
313
- express, getIsSharedOpenCodeService, getOpenCodeAuthHeaders,
329
+ express, getIsSharedOpenCodeService, getOpenCodeAuthHeaders, hasAssistant,
314
330
  createClient: () => makeOpenCodeV2Client({ baseUrl: buildOpenCodeUrl('/', ''), authHeaders: getOpenCodeAuthHeaders(), getRuntimeContract }),
315
331
  registerProject: (input) => projectRegistry.register(input), readSettingsFromDiskStrict, sanitizeProjects,
316
332
  sessionLifecycle: createProjectSessionLifecycle({
@@ -354,6 +370,7 @@ export const createFeatureRoutesRuntime = (dependencies) => {
354
370
  getServerId,
355
371
  getAllowedRoots: () => assistantAllowedRoots,
356
372
  registerProject: registerAssistantProject,
373
+ resolveCustomizationSkill: resolveAssistantCustomizationSkill,
357
374
  listProjects: async () => {
358
375
  const settings = await readSettingsFromDiskMigrated();
359
376
  return sanitizeProjects(settings?.projects ?? [])
@@ -76,6 +76,7 @@ export const createSettingsHelpers = (dependencies) => {
76
76
  const SUMMARY_PROMPT_MAX_LENGTH = 16000;
77
77
  const VERSION_STRING_MAX_LENGTH = 128;
78
78
  const SHORTCUT_OVERRIDE_KEY_MAX_LENGTH = 128;
79
+ const PLUGIN_SHORTCUT_OVERRIDE_KEY_MAX_LENGTH = 1024;
79
80
  const SHORTCUT_OVERRIDE_VALUE_MAX_LENGTH = 128;
80
81
  const PWA_ORIENTATION_VALUES = new Set(['system', 'portrait', 'landscape']);
81
82
  const MOBILE_KEYBOARD_MODE_VALUES = new Set(['native', 'resize-content']);
@@ -92,6 +93,10 @@ export const createSettingsHelpers = (dependencies) => {
92
93
  const key = typeof rawKey === 'string' ? rawKey.trim() : '';
93
94
  const combo = typeof rawValue === 'string' ? rawValue.trim() : '';
94
95
  if (!key || !combo) continue;
96
+ if (key.startsWith('gui-plugin:')) {
97
+ if (key.length <= PLUGIN_SHORTCUT_OVERRIDE_KEY_MAX_LENGTH) result[key] = combo.slice(0, SHORTCUT_OVERRIDE_VALUE_MAX_LENGTH);
98
+ continue;
99
+ }
95
100
  result[key.slice(0, SHORTCUT_OVERRIDE_KEY_MAX_LENGTH)] = combo.slice(0, SHORTCUT_OVERRIDE_VALUE_MAX_LENGTH);
96
101
  }
97
102
  return result;
@@ -279,6 +279,16 @@ describe('settings helpers', () => {
279
279
  shortcutOverrides: {},
280
280
  });
281
281
  });
282
+ it('round-trips qualified GUI command identities without truncating colliding prefixes', () => {
283
+ const helpers = createTestHelpers();
284
+ const prefix = `gui-plugin:${JSON.stringify(['package-name'.repeat(15), 'first'])}`;
285
+ const second = `gui-plugin:${JSON.stringify(['package-name'.repeat(15), 'second'])}`;
286
+ const shortcutOverrides = { [prefix]: 'mod+m', [second]: '__unassigned__', open_settings: 'mod+comma' };
287
+ expect(helpers.sanitizeSettingsUpdate({ shortcutOverrides })).toEqual({ shortcutOverrides });
288
+ expect(helpers.sanitizeSettingsUpdate({
289
+ shortcutOverrides: { [`gui-plugin:${'a'.repeat(1024)}`]: 'mod+m', ...shortcutOverrides },
290
+ })).toEqual({ shortcutOverrides });
291
+ });
282
292
 
283
293
  it('accepts OpenCode update notification preference as a persisted shared setting', () => {
284
294
  const helpers = createTestHelpers();
@@ -4,6 +4,7 @@ import fs from 'fs';
4
4
  import os from 'os';
5
5
  import path from 'path';
6
6
  import { fileURLToPath } from 'url';
7
+ import { readPortableInstallation, portableUpdateError } from './portable-installation.js';
7
8
 
8
9
  const __filename = fileURLToPath(import.meta.url);
9
10
  const __dirname = path.dirname(__filename);
@@ -401,6 +402,17 @@ export function detectPackageManagerDetails() {
401
402
  };
402
403
  }
403
404
 
405
+ const portable = readPortableInstallation();
406
+ if (portable) {
407
+ return {
408
+ packageManager: 'portable',
409
+ reason: 'self-contained-bundle',
410
+ packagePath: getCurrentPackagePath(),
411
+ packageManagerCommand: null,
412
+ globalNodeModulesRoot: null,
413
+ };
414
+ }
415
+
404
416
  if (cachedDetectedPm) {
405
417
  return {
406
418
  packageManager: cachedDetectedPm,
@@ -660,6 +672,8 @@ function isPackageInstalledWith(pm) {
660
672
  * Get the update command for the detected package manager
661
673
  */
662
674
  export function getUpdateCommand(pm = detectPackageManager()) {
675
+ const portable = readPortableInstallation();
676
+ if (portable || pm === 'portable') throw portableUpdateError(portable?.root || path.resolve(__dirname, '../../..'));
663
677
  const pmCommand = quoteCommand(resolvePackageManagerCommand(pm));
664
678
  switch (pm) {
665
679
  case 'pnpm':
@@ -1,4 +1,5 @@
1
1
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
2
+ import { spawnSync } from 'node:child_process';
2
3
 
3
4
  // Mock child_process to prevent real spawnSync calls that would hang in tests
4
5
  vi.mock('node:child_process', () => ({
@@ -395,6 +396,12 @@ describe('getCurrentVersion', () => {
395
396
  });
396
397
 
397
398
  describe('CLI update exports', () => {
399
+ it('never falls back to a shell package manager for portable installations', () => {
400
+ const before = spawnSync.mock.calls.length;
401
+ expect(() => executeUpdate('portable', { silent: true })).toThrow('self-contained Yuri installation');
402
+ expect(spawnSync.mock.calls.length).toBe(before);
403
+ });
404
+
398
405
  it('exports package-manager helpers used by the update command', () => {
399
406
  expect(typeof detectPackageManager).toBe('function');
400
407
  expect(typeof executeUpdate).toBe('function');
@@ -0,0 +1,34 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+
5
+ export function readPortableInstallation(packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..')) {
6
+ const root = path.dirname(packageRoot);
7
+ const marker = path.join(root, 'portable.json');
8
+ if (!fs.existsSync(marker)) return null;
9
+ const manifest = JSON.parse(fs.readFileSync(marker, 'utf8'));
10
+ const pkg = JSON.parse(fs.readFileSync(path.join(packageRoot, 'package.json'), 'utf8'));
11
+ if (path.basename(packageRoot) !== 'lib' || manifest.format !== 1 || pkg.name !== '@yuriai/web'
12
+ || manifest.version !== pkg.version || manifest.platform !== process.platform || manifest.arch !== process.arch) {
13
+ throw new Error('Invalid Yuri portable installation; reinstall the matching Linux release');
14
+ }
15
+ let launcher = path.join(root, 'yuri');
16
+ if (path.basename(path.dirname(root)) === 'versions') {
17
+ const current = path.join(root, '../..', 'current');
18
+ if (fs.existsSync(current) && fs.realpathSync(current) === fs.realpathSync(root)) {
19
+ launcher = path.join(current, 'yuri');
20
+ }
21
+ }
22
+ return { root, manifest, launcher };
23
+ }
24
+
25
+ export function portableUpdateError(root) {
26
+ const quote = (value) => `'${value.replace(/'/g, "'\\''")}'`;
27
+ const target = path.basename(path.dirname(root)) === 'versions'
28
+ ? ` --install-dir ${quote(path.resolve(root, '../..'))} --no-link` : '';
29
+ return new Error(
30
+ `This is a self-contained Yuri installation, not an npm package. ` +
31
+ `Stop its running servers, then run: bash ${quote(path.join(root, 'install.sh'))} --version <version>${target}. ` +
32
+ 'SSH-managed installations are updated when reconnecting from Yuri Desktop.'
33
+ );
34
+ }
@@ -0,0 +1,38 @@
1
+ import fs from 'node:fs';
2
+ import os from 'node:os';
3
+ import path from 'node:path';
4
+ import { afterEach, expect, it } from 'vitest';
5
+ import { readPortableInstallation } from './portable-installation.js';
6
+
7
+ const directories = [];
8
+ afterEach(() => { for (const root of directories.splice(0)) fs.rmSync(root, { recursive: true, force: true }); });
9
+
10
+ it('recognizes only a valid sibling manifest and never infers ownership from environment', () => {
11
+ const root = fs.mkdtempSync(path.join(os.tmpdir(), 'yuri-portable-owner-'));
12
+ directories.push(root);
13
+ const lib = path.join(root, 'lib');
14
+ fs.mkdirSync(lib);
15
+ fs.writeFileSync(path.join(lib, 'package.json'), JSON.stringify({ name: '@yuriai/web', version: '1.2.3' }));
16
+ expect(readPortableInstallation(lib)).toBeNull();
17
+ fs.writeFileSync(path.join(root, 'portable.json'), JSON.stringify({
18
+ format: 1, version: '1.2.3', platform: process.platform, arch: process.arch,
19
+ }));
20
+ expect(readPortableInstallation(lib)).toMatchObject({ root, manifest: { version: '1.2.3' } });
21
+ fs.writeFileSync(path.join(root, 'portable.json'), '{"format":1,"version":"9.9.9"}');
22
+ expect(() => readPortableInstallation(lib)).toThrow('Invalid Yuri portable installation');
23
+ });
24
+
25
+ it('uses the installer current symlink for startup without guessing a stable entry for manual archives', () => {
26
+ const install = fs.mkdtempSync(path.join(os.tmpdir(), 'yuri-portable-stable-'));
27
+ directories.push(install);
28
+ const root = path.join(install, 'versions/1.2.3-linux-x64');
29
+ const lib = path.join(root, 'lib');
30
+ fs.mkdirSync(lib, { recursive: true });
31
+ fs.writeFileSync(path.join(lib, 'package.json'), JSON.stringify({ name: '@yuriai/web', version: '1.2.3' }));
32
+ fs.writeFileSync(path.join(root, 'portable.json'), JSON.stringify({
33
+ format: 1, version: '1.2.3', platform: process.platform, arch: process.arch,
34
+ }));
35
+ expect(readPortableInstallation(lib).launcher).toBe(path.join(root, 'yuri'));
36
+ fs.symlinkSync('versions/1.2.3-linux-x64', path.join(install, 'current'));
37
+ expect(readPortableInstallation(lib).launcher).toBe(path.join(install, 'current/yuri'));
38
+ });
@@ -168,6 +168,14 @@ completion events advance the separate `activity_updated_at` ordering field,
168
168
  while session status transitions update `status` and `status_changed_at`.
169
169
  Renderer event handling never performs these index writes and assistant
170
170
  streaming events never change session ordering.
171
+ A user message for a session the index does not hold (an old session outside the
172
+ newest-20 window, or one resumed from history) is handed to
173
+ `adopt-unindexed-session.js`: it reads the session upstream, applies the Host
174
+ projection, lifts its clock to the message time so the retention bound accepts it,
175
+ writes the row and publishes a change. Concurrent messages share one read, a failed
176
+ read is retried by the next message, and a row written live meanwhile wins. Without
177
+ this the task view (which only lists indexed idle sessions) and recency ordering
178
+ would drop such a session as soon as its run ends.
171
179
  Native creation projects the event's session identity, location, parent, metadata
172
180
  and creation clock before the Host metadata overlay. User inbox enqueue advances
173
181
  activity; native execution/retry events update status, and successful completion
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Brings a session back into the index when the user writes to it while the
3
+ * index does not hold it (an old session outside the newest-20 window, or one
4
+ * resumed from history). `touchActivity` only updates existing rows, so without
5
+ * this the session never regains task-view membership or recency ordering.
6
+ *
7
+ * @param {object} deps
8
+ * @param {object} deps.service session-index service
9
+ * @param {(input: { sessionID: string, directory: string | null }) => Promise<object | null>} deps.fetchSession
10
+ * @param {(session: object) => object | null | undefined} deps.projectSession
11
+ * Host authority projection; `null` means Host metadata is unavailable.
12
+ * @param {() => void} deps.onChanged
13
+ * @param {(message: string, error?: unknown) => void} [deps.warn]
14
+ */
15
+ export const createUnindexedSessionAdopter = ({
16
+ service,
17
+ fetchSession,
18
+ projectSession,
19
+ onChanged,
20
+ warn = console.warn,
21
+ }) => {
22
+ const inFlight = new Set();
23
+
24
+ return (sessionID, directory, activityAt) => {
25
+ if (inFlight.has(sessionID)) return;
26
+ inFlight.add(sessionID);
27
+ void (async () => {
28
+ try {
29
+ const upstream = await fetchSession({ sessionID, directory: directory || null });
30
+ if (!upstream || service.findBySessionId(sessionID)) return;
31
+ const projected = projectSession(upstream);
32
+ if (projected == null) return;
33
+ // The user message is newer than a possibly stale upstream clock; without
34
+ // this the newest-20 retention bound would refuse the row.
35
+ const time = { ...projected.time, updated: Math.max(Number(projected.time?.updated) || 0, activityAt) };
36
+ const upserted = service.upsertAndReportChange({ ...projected, time }, Date.now());
37
+ const touched = service.touchActivity(sessionID, activityAt);
38
+ if (upserted || touched) onChanged();
39
+ } catch (error) {
40
+ warn('[session-index] adopting an unindexed session failed:', error?.message ?? error);
41
+ } finally {
42
+ inFlight.delete(sessionID);
43
+ }
44
+ })();
45
+ };
46
+ };
@@ -0,0 +1,77 @@
1
+ import { describe, expect, it, vi } from 'vitest';
2
+ import { createUnindexedSessionAdopter } from './adopt-unindexed-session.js';
3
+
4
+ const flush = () => new Promise((resolve) => setTimeout(resolve, 0));
5
+
6
+ const setup = (overrides = {}) => {
7
+ const service = {
8
+ findBySessionId: vi.fn(() => null),
9
+ upsertAndReportChange: vi.fn(() => true),
10
+ touchActivity: vi.fn(() => true),
11
+ };
12
+ const deps = {
13
+ service,
14
+ fetchSession: vi.fn(async () => ({ id: 'ses_old', directory: '/repo', time: { created: 1, updated: 2 } })),
15
+ projectSession: vi.fn((session) => ({ ...session, projected: true })),
16
+ onChanged: vi.fn(),
17
+ warn: vi.fn(),
18
+ ...overrides,
19
+ };
20
+ return { service, deps, adopt: createUnindexedSessionAdopter(deps) };
21
+ };
22
+
23
+ describe('createUnindexedSessionAdopter', () => {
24
+ it('writes the projected upstream session and advances activity to the user message', async () => {
25
+ const { service, deps, adopt } = setup();
26
+ adopt('ses_old', '/repo', 900);
27
+ await flush();
28
+ expect(deps.fetchSession).toHaveBeenCalledWith({ sessionID: 'ses_old', directory: '/repo' });
29
+ expect(service.upsertAndReportChange).toHaveBeenCalledWith(
30
+ expect.objectContaining({ id: 'ses_old', projected: true, time: { created: 1, updated: 900 } }),
31
+ expect.any(Number),
32
+ );
33
+ expect(service.touchActivity).toHaveBeenCalledWith('ses_old', 900);
34
+ expect(deps.onChanged).toHaveBeenCalledTimes(1);
35
+ });
36
+
37
+ it('coalesces a burst of messages into one upstream read', async () => {
38
+ const { deps, adopt } = setup();
39
+ adopt('ses_old', '', 1);
40
+ adopt('ses_old', '', 2);
41
+ await flush();
42
+ expect(deps.fetchSession).toHaveBeenCalledTimes(1);
43
+ expect(deps.fetchSession).toHaveBeenCalledWith({ sessionID: 'ses_old', directory: null });
44
+ });
45
+
46
+ it('writes nothing when Host metadata is unavailable or the session is missing upstream', async () => {
47
+ const unavailable = setup({ projectSession: vi.fn(() => null) });
48
+ unavailable.adopt('ses_old', '/repo', 1);
49
+ const missing = setup({ fetchSession: vi.fn(async () => null) });
50
+ missing.adopt('ses_old', '/repo', 1);
51
+ await flush();
52
+ expect(unavailable.service.upsertAndReportChange).not.toHaveBeenCalled();
53
+ expect(missing.service.upsertAndReportChange).not.toHaveBeenCalled();
54
+ expect(unavailable.deps.onChanged).not.toHaveBeenCalled();
55
+ });
56
+
57
+ it('keeps a live-written row instead of overwriting it with the upstream read', async () => {
58
+ const { service, adopt } = setup();
59
+ service.findBySessionId.mockReturnValue({ id: 'ses_old' });
60
+ adopt('ses_old', '/repo', 1);
61
+ await flush();
62
+ expect(service.upsertAndReportChange).not.toHaveBeenCalled();
63
+ });
64
+
65
+ it('reports a failed fetch and allows a later message to retry', async () => {
66
+ const fetchSession = vi.fn()
67
+ .mockRejectedValueOnce(new Error('offline'))
68
+ .mockResolvedValueOnce({ id: 'ses_old', directory: '/repo', time: {} });
69
+ const { service, deps, adopt } = setup({ fetchSession });
70
+ adopt('ses_old', '/repo', 1);
71
+ await flush();
72
+ expect(deps.warn).toHaveBeenCalledTimes(1);
73
+ adopt('ses_old', '/repo', 2);
74
+ await flush();
75
+ expect(service.upsertAndReportChange).toHaveBeenCalledTimes(1);
76
+ });
77
+ });
@@ -26,6 +26,9 @@ const withDirectory = (session, directory) => {
26
26
  * @param {(sessionID: string) => void | Promise<void>} [options.onSessionDeleted]
27
27
  * @param {() => boolean} [options.isHostReady]
28
28
  * When false, session lifecycle upserts are skipped until metadata is ready.
29
+ * @param {(sessionID: string, directory: string, activityAt: number) => void} [options.onUnindexedUserActivity]
30
+ * Called when a user message targets a session the index does not hold (an old
31
+ * session outside the newest-20 window); the owner adopts it asynchronously.
29
32
  */
30
33
  export const applySessionIndexEvent = (service, event, observedAt = Date.now(), options = {}) => {
31
34
  if (!service || !event || typeof event !== 'object') return false;
@@ -35,6 +38,9 @@ export const applySessionIndexEvent = (service, event, observedAt = Date.now(),
35
38
  const projectSession = typeof options.projectSession === 'function' ? options.projectSession : null;
36
39
  const onSessionDeleted = typeof options.onSessionDeleted === 'function' ? options.onSessionDeleted : null;
37
40
  const isHostReady = typeof options.isHostReady === 'function' ? options.isHostReady : null;
41
+ const onUnindexedUserActivity = typeof options.onUnindexedUserActivity === 'function'
42
+ ? options.onUnindexedUserActivity
43
+ : null;
38
44
 
39
45
  const baseType = normalizeSessionEventType(payload.type);
40
46
 
@@ -127,14 +133,21 @@ export const applySessionIndexEvent = (service, event, observedAt = Date.now(),
127
133
  const activityAt = typeof info.time?.created === 'number' ? info.time.created : observedAt;
128
134
  const activityChanged = service.touchActivity(info.sessionID, activityAt);
129
135
  const settleCleared = service.clearSettleOverride?.(info.sessionID) ?? false;
136
+ if (!activityChanged && onUnindexedUserActivity && !service.findBySessionId?.(info.sessionID)) {
137
+ onUnindexedUserActivity(info.sessionID, directory, activityAt);
138
+ }
130
139
  return activityChanged || settleCleared;
131
140
  }
132
141
 
133
142
  if (baseType === 'session.inbox.enqueued') {
134
143
  const data = payload.data ?? properties;
135
144
  if (data.item?.type !== 'user' || typeof data.sessionID !== 'string') return false;
136
- const activityChanged = service.touchActivity(data.sessionID, data.item.time?.created ?? payload.created ?? observedAt);
145
+ const activityAt = data.item.time?.created ?? payload.created ?? observedAt;
146
+ const activityChanged = service.touchActivity(data.sessionID, activityAt);
137
147
  const settleCleared = service.clearSettleOverride?.(data.sessionID) ?? false;
148
+ if (!activityChanged && onUnindexedUserActivity && !service.findBySessionId?.(data.sessionID)) {
149
+ onUnindexedUserActivity(data.sessionID, directory, activityAt);
150
+ }
138
151
  return activityChanged || settleCleared;
139
152
  }
140
153
 
@@ -61,6 +61,24 @@ describe('session index event ingest', () => {
61
61
  expect(applySessionIndexEvent(service, { payload: { type: 'session.idle', properties: { sessionID: 'ses_a' } } }, 30)).toBe(false);
62
62
  expect(service.clearSettleOverride).not.toHaveBeenCalled();
63
63
  });
64
+ it('hands user input for a session the index does not hold to the adopter, once per event', () => {
65
+ const adopt = vi.fn();
66
+ const service = { touchActivity: vi.fn(() => false), findBySessionId: vi.fn(() => null), clearSettleOverride: vi.fn(() => false) };
67
+ const user = { directory: '/repo', payload: { type: 'message.updated', properties: { info: { role: 'user', sessionID: 'ses_old', time: { created: 5 } } } } };
68
+ applySessionIndexEvent(service, user, 30, { onUnindexedUserActivity: adopt });
69
+ expect(adopt).toHaveBeenCalledWith('ses_old', '/repo', 5);
70
+ adopt.mockClear();
71
+ applySessionIndexEvent(service, { directory: '/repo', payload: { type: 'session.inbox.enqueued', data: { sessionID: 'ses_old', item: { type: 'user', time: { created: 7 } } } } }, 30, { onUnindexedUserActivity: adopt });
72
+ expect(adopt).toHaveBeenCalledWith('ses_old', '/repo', 7);
73
+ });
74
+ it('does not adopt a session the index already holds, or assistant messages', () => {
75
+ const adopt = vi.fn();
76
+ const service = { touchActivity: vi.fn(() => false), findBySessionId: vi.fn(() => ({ id: 'ses_held' })), clearSettleOverride: vi.fn(() => false) };
77
+ const user = { payload: { type: 'message.updated', properties: { info: { role: 'user', sessionID: 'ses_held', time: { created: 5 } } } } };
78
+ applySessionIndexEvent(service, user, 30, { onUnindexedUserActivity: adopt });
79
+ applySessionIndexEvent({ ...service, findBySessionId: () => null }, { payload: { type: 'message.updated', properties: { info: { role: 'assistant', sessionID: 'ses_old' } } } }, 30, { onUnindexedUserActivity: adopt });
80
+ expect(adopt).not.toHaveBeenCalled();
81
+ });
64
82
  it('takes moved ownership from native data rather than the old event envelope directory', () => {
65
83
  const service = { move: vi.fn(() => true) };
66
84
  expect(applySessionIndexEvent(service, { directory: '/old', payload: {