@yuriai/web 0.3.8-beta.14 → 0.3.8-beta.16

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 (216) hide show
  1. package/dist/assets/{AgentAvatar-BSBHv-65.js → AgentAvatar-DrZGU5TL.js} +1 -1
  2. package/dist/assets/{AgentSelector-DaT_IvwI.js → AgentSelector-D6x-93xO.js} +1 -1
  3. package/dist/assets/ArchivedSessionsDialog-C-Q7IKD0.js +1 -0
  4. package/dist/assets/AssistantConversationSurface-C9S2c33z.css +1 -0
  5. package/dist/assets/AssistantConversationSurface-DNOnoTTE.js +3 -0
  6. package/dist/assets/{AssistantSessionCard-D4cDykNE.js → AssistantSessionCard-B2nmiy2w.js} +2 -2
  7. package/dist/assets/{AssistantUnreadBadge-kuD0NRB3.js → AssistantUnreadBadge-CAgjtCiJ.js} +1 -1
  8. package/dist/assets/{AssistantView-C-UaXYpz.js → AssistantView-yJTsJbIU.js} +1 -1
  9. package/dist/assets/{AssistantWorkingAvatar-VQGkgNuo.js → AssistantWorkingAvatar-C5PFB26I.js} +1 -1
  10. package/dist/assets/{AssistantsSettingsPage-D01452ix.js → AssistantsSettingsPage-Cw2GK4ku.js} +1 -1
  11. package/dist/assets/{BinaryFileFallback-Darn77R4.js → BinaryFileFallback-BGku68Il.js} +1 -1
  12. package/dist/assets/{BtwPanel-CgSxuUbP.js → BtwPanel-CM97m0W-.js} +1 -1
  13. package/dist/assets/{BusyDots-CTw2sYb1.js → BusyDots-BfwpONQS.js} +1 -1
  14. package/dist/assets/ChatContainer-uZMwglI2.js +65 -0
  15. package/dist/assets/{ChatView-BfrJ1ZTv.js → ChatView-CMjNZnr2.js} +1 -1
  16. package/dist/assets/{DiagramView-BcD_t3y-.js → DiagramView-B8KyrEfz.js} +1 -1
  17. package/dist/assets/{DiffView-DyYip1lP.js → DiffView-DpmXkaMB.js} +1 -1
  18. package/dist/assets/{DiffViewToggle-Da3vQFP9.js → DiffViewToggle-C2OUNYuF.js} +1 -1
  19. package/dist/assets/{ErrorBoundary-D6SF_urL.js → ErrorBoundary-DPRw2Hb8.js} +1 -1
  20. package/dist/assets/{FadeInOnReveal-DJrSq3fM.js → FadeInOnReveal-CbsnPxv2.js} +1 -1
  21. package/dist/assets/{GuiPluginMount-BD0R2vTk.js → GuiPluginMount-a0GlByhj.js} +1 -1
  22. package/dist/assets/{GuiPluginPage-DGysjIM8.js → GuiPluginPage-CWIqxrTF.js} +1 -1
  23. package/dist/assets/{GuiPluginSurface-CIbn8VvC.js → GuiPluginSurface-CEJE7Jej.js} +1 -1
  24. package/dist/assets/{GuiPluginTitlebarItems-BYCWC7Ia.js → GuiPluginTitlebarItems-DzUKXkjc.js} +1 -1
  25. package/dist/assets/{GuiPluginWindow-cCmvyMMm.js → GuiPluginWindow-D-YAzycZ.js} +1 -1
  26. package/dist/assets/{Icon-DrsaL1yC.js → Icon-BUHzyKnj.js} +1 -1
  27. package/dist/assets/{ImageLoadingPlaceholder-Br3hw4E6.js → ImageLoadingPlaceholder-C-g4U5hR.js} +1 -1
  28. package/dist/assets/{LoadingImage-BBQSz8J1.js → LoadingImage-B0wwLqli.js} +1 -1
  29. package/dist/assets/{MarkdownRenderer-CGgHX4n3.js → MarkdownRenderer-Cr-3HunB.js} +2 -2
  30. package/dist/assets/{MarkdownRendererImpl-CiuncbTc.js → MarkdownRendererImpl-DnWMM_aX.js} +1 -1
  31. package/dist/assets/{MarkstreamRendererImpl-DT9tgQ6L.js → MarkstreamRendererImpl-DpY69J2T.js} +1 -1
  32. package/dist/assets/{MobileAssistantSettingsPage-DIilwadN.js → MobileAssistantSettingsPage-BDvEr-7Z.js} +1 -1
  33. package/dist/assets/{MobileAssistantTab-CTyT31et.js → MobileAssistantTab-Cko8n9EA.js} +1 -1
  34. package/dist/assets/{MobileBtwPage-Buz1Kf7W.js → MobileBtwPage-DvXj1534.js} +1 -1
  35. package/dist/assets/{MobileChangesSurface-DsnPRa6f.js → MobileChangesSurface-Bs91NGZz.js} +1 -1
  36. package/dist/assets/{MobileChatScreen-DRNBeviQ.js → MobileChatScreen-BCwCAJoA.js} +1 -1
  37. package/dist/assets/{MobileDetailNavigation-_0qkfML1.js → MobileDetailNavigation-Bgns21JD.js} +1 -1
  38. package/dist/assets/{MobileFilesSurface-CKHljNp8.js → MobileFilesSurface-CKnb4sMb.js} +2 -2
  39. package/dist/assets/{MobileHtmlNetworkBoundary-BMTmOSuT.js → MobileHtmlNetworkBoundary-uqjb6Mla.js} +2 -2
  40. package/dist/assets/{MobileOverlayPanel-cwgcgCxI.js → MobileOverlayPanel-DiSPQ_Ds.js} +1 -1
  41. package/dist/assets/{MobileResizableSheet-DKpNzqfc.js → MobileResizableSheet-CTVXT44f.js} +1 -1
  42. package/dist/assets/{MobileSettingsTab-BQnzgATX.js → MobileSettingsTab-BX9NpdML.js} +1 -1
  43. package/dist/assets/{MobileShareBridge-1O5JUriq.js → MobileShareBridge-XOWIghHm.js} +1 -1
  44. package/dist/assets/{MobileSurface-nz7712mA.js → MobileSurface-CSgwDfWV.js} +1 -1
  45. package/dist/assets/{MobileTabPageHeader-B0_vB3Tg.js → MobileTabPageHeader-BhCUjFE_.js} +1 -1
  46. package/dist/assets/{ModelLogo-CwKqpjSR.js → ModelLogo-NNl7OHLT.js} +1 -1
  47. package/dist/assets/{ModelSelector-C0LV5Vo7.js → ModelSelector-DQdCn2b7.js} +1 -1
  48. package/dist/assets/{MultiRunWindow-C0muk8Ec.js → MultiRunWindow-D4LkgbX5.js} +1 -1
  49. package/dist/assets/{OnboardingScreen-T4NAO5Nc.js → OnboardingScreen-DvRHPlCp.js} +1 -1
  50. package/dist/assets/{OverlayScrollbar-CZ86VwiO.js → OverlayScrollbar-DhCgiS2Z.js} +1 -1
  51. package/dist/assets/{PierreDiffViewer-0MHiuNI_.js → PierreDiffViewer-D41Qra1m.js} +1 -1
  52. package/dist/assets/ProjectSettingsPanel-BCB8uMLe.js +2 -0
  53. package/dist/assets/{ProviderLogo-BRhDuhtX.js → ProviderLogo-oCOoqwHl.js} +1 -1
  54. package/dist/assets/{RemoteAssistantSessionCard-BAbf5uBX.js → RemoteAssistantSessionCard-xNxKMyYj.js} +1 -1
  55. package/dist/assets/{RemoteDesktopPanel-vKqD4HzW.js → RemoteDesktopPanel-epeXSiEK.js} +1 -1
  56. package/dist/assets/ScheduledTasksDialog-CjD_d4Mg.js +3 -0
  57. package/dist/assets/{ScrollableOverlay-CFjKY4OJ.js → ScrollableOverlay-BqOsMuIW.js} +1 -1
  58. package/dist/assets/{SettingsGroup-5yNRBDTj.js → SettingsGroup-DOaDdTNM.js} +1 -1
  59. package/dist/assets/{SettingsView-4rxkTHGv.js → SettingsView-BXBFTsek.js} +12 -12
  60. package/dist/assets/{SettingsWindow-D5JUctj6.js → SettingsWindow-CRSH_XPR.js} +1 -1
  61. package/dist/assets/{SetupTourDialog-Bp8wlcPT.js → SetupTourDialog-DaYKYPQf.js} +1 -1
  62. package/dist/assets/{SyncActions-DiGfo7cp.js → SyncActions-C1oPXB4Y.js} +1 -1
  63. package/dist/assets/TerminalView-DlWCt09v.js +9 -0
  64. package/dist/assets/{TextSelectionMenu-DcQCHZnp.js → TextSelectionMenu-Dt5sL7-Z.js} +1 -1
  65. package/dist/assets/{ToolOutputDialog-D_Kl-Bc5.js → ToolOutputDialog-C0nc9IV3.js} +5 -5
  66. package/dist/assets/{YuriLogo-CcVNX93s.js → YuriLogo-JAwGFlRv.js} +1 -1
  67. package/dist/assets/{assistantMessagePreview-a6gzdseQ.js → assistantMessagePreview-DWC6UVyn.js} +1 -1
  68. package/dist/assets/{assistantQueries-6GJP0jCO.js → assistantQueries-Bgxhg5pZ.js} +1 -1
  69. package/dist/assets/{auto-read-context-Dov0luVf.js → auto-read-context-Bk1mCpDV.js} +1 -1
  70. package/dist/assets/{capgoAdapter-CVPNGTnk.js → capgoAdapter-BoD0Rn9k.js} +1 -1
  71. package/dist/assets/{card-DjqjGN8X.js → card-CnJNUKRc.js} +1 -1
  72. package/dist/assets/{chatUpwardIntent-uWd0ddoK.js → chatUpwardIntent-VIpGQNvT.js} +1 -1
  73. package/dist/assets/{checkbox-BIU2MT0K.js → checkbox-Bk8-0KZQ.js} +1 -1
  74. package/dist/assets/{collapsible-B2X0QDoQ.js → collapsible-C5tnXbXB.js} +1 -1
  75. package/dist/assets/{connection-hint-Ca1b_CjA.js → connection-hint-C48bNniv.js} +1 -1
  76. package/dist/assets/{context-menu-C-FLHb_6.js → context-menu-CFyL4DQd.js} +1 -1
  77. package/dist/assets/{diagram-CJeSxjCC.js → diagram-CiQzMXnl.js} +1 -1
  78. package/dist/assets/{dialog-DnZWrDDM.js → dialog-C1xZ7qi4.js} +1 -1
  79. package/dist/assets/{dropdown-menu-CZWYeFpO.js → dropdown-menu-9VcdFkMY.js} +1 -1
  80. package/dist/assets/es-BEjOp002.js +15 -0
  81. package/dist/assets/{fileMentionAutocompleteState-B9411b4o.js → fileMentionAutocompleteState-CEwRZk1h.js} +1 -1
  82. package/dist/assets/{fileMentionTouchSelection-Bwr_ZfU3.js → fileMentionTouchSelection-CzP2ohnN.js} +1 -1
  83. package/dist/assets/{fileReferenceActions-KSYTdo_6.js → fileReferenceActions-BpqKMP6J.js} +1 -1
  84. package/dist/assets/{fr-BoFSg4oh.js → fr-DpO_m9TK.js} +2 -2
  85. package/dist/assets/{gitApi-CT9_Fyh4.js → gitApi-DjtVUPlT.js} +1 -1
  86. package/dist/assets/{gitApiHttp-Cx9rEFyN.js → gitApiHttp-CStyHJBc.js} +2 -2
  87. package/dist/assets/{i18n-BZ_vx76q.js → i18n-CJn52oz0.js} +1 -1
  88. package/dist/assets/{icons-B6gke_oc.js → icons-Dy_xbx4O.js} +1 -1
  89. package/dist/assets/{input-DSY3Mg4G.js → input-DXdhngzo.js} +1 -1
  90. package/dist/assets/{insertionBoundaries-C1ACCndo.js → insertionBoundaries-BRqBLgMY.js} +1 -1
  91. package/dist/assets/{ja-DmxgfcWg.js → ja-0nVMWVFA.js} +2 -2
  92. package/dist/assets/{kbd-U9NdVaVr.js → kbd-C_ERslx0.js} +1 -1
  93. package/dist/assets/{ko-DH3El5QZ.js → ko-B17Bm_ms.js} +2 -2
  94. package/dist/assets/main--h-KJbB4.js +169 -0
  95. package/dist/assets/main-DIHvURq9.js +2 -0
  96. package/dist/assets/{markdownHeightCache-BhpqKZQB.js → markdownHeightCache-DwMwTsag.js} +1 -1
  97. package/dist/assets/{mcpQueries-BInByFPg.js → mcpQueries-B5a60zt5.js} +1 -1
  98. package/dist/assets/miniChat-ByVMduTe.js +2 -0
  99. package/dist/assets/mobile-B_lhvL6h.js +2 -0
  100. package/dist/assets/{mobileBackNavigation-CUoYXnE0.js → mobileBackNavigation-Br4xDLTP.js} +1 -1
  101. package/dist/assets/{mobileConnections-DDPYhrR6.js → mobileConnections-CHYr70nO.js} +2 -2
  102. package/dist/assets/{multirun-h_L8IaS5.js → multirun-DHceRpGb.js} +1 -1
  103. package/dist/assets/{native-config-DJLqkXGY.js → native-config-CUl4EJwt.js} +1 -1
  104. package/dist/assets/{nativeComposerCover-Cnky140u.js → nativeComposerCover-sATsn8i9.js} +1 -1
  105. package/dist/assets/{navigation-b6ZJiTeF.js → navigation-ihRiR3Ol.js} +1 -1
  106. package/dist/assets/{openRemoteProjectSession-C85euMiR.js → openRemoteProjectSession-4G0Mp1ns.js} +1 -1
  107. package/dist/assets/{openSessionFromDeepLink-CDs-skAS.js → openSessionFromDeepLink-B3BzCo20.js} +2 -2
  108. package/dist/assets/{pl-CD38psJG.js → pl-CDqj2zfd.js} +2 -2
  109. package/dist/assets/{pluginPresentation-upXqjrId.js → pluginPresentation-Cw-C09Hc.js} +1 -1
  110. package/dist/assets/{pt-BR-DBB59YTx.js → pt-BR-BXJe1xYL.js} +2 -2
  111. package/dist/assets/{pwa-BSv0q2V7.js → pwa-Djnoay3N.js} +1 -1
  112. package/dist/assets/{queue-abort-optimistic-CkmS8yTs.js → queue-abort-optimistic-CpPpvdxn.js} +1 -1
  113. package/dist/assets/{quota-BFl8FaMm.js → quota-W4rU9QuH.js} +1 -1
  114. package/dist/assets/{reference-history-BfwrDjks.js → reference-history-qVIiJFY6.js} +1 -1
  115. package/dist/assets/remoteProjectQueries-CopzDHZe.js +1 -0
  116. package/dist/assets/{remoteSessionReference-DRv5U8a9.js → remoteSessionReference-9anx54fV.js} +1 -1
  117. package/dist/assets/{renderElectronMiniChatApp-YbsPMg7E.js → renderElectronMiniChatApp-EDpvGixT.js} +2 -2
  118. package/dist/assets/{renderMobileApp-QD_41cfk.js → renderMobileApp-CRTFdfsV.js} +5 -5
  119. package/dist/assets/{runtimeConfig-BT-o1J3r.js → runtimeConfig-D1vp1jXa.js} +1 -1
  120. package/dist/assets/runtimeEndpointReset-D3PK9OY3.js +4 -0
  121. package/dist/assets/{scheduledTaskNavigation-SCU3wxYg.js → scheduledTaskNavigation-BfgxRBkZ.js} +1 -1
  122. package/dist/assets/{select-DNrc5_kl.js → select-ByWzzgfq.js} +1 -1
  123. package/dist/assets/{sessionLookup-DNi6Sfyx.js → sessionLookup-BCD7xQ0s.js} +1 -1
  124. package/dist/assets/shortcuts-BIwHgZl-.js +1 -0
  125. package/dist/assets/{sortable-tabs-strip-DqPiLPN2.js → sortable-tabs-strip-BTww8YS1.js} +1 -1
  126. package/dist/assets/spacedFileMention-DfI79AYT.js +1 -0
  127. package/dist/assets/{speechSettingsQueries-CVATB1QU.js → speechSettingsQueries-BaFoYcSY.js} +1 -1
  128. package/dist/assets/{store-1zpYqZEm.js → store-BUNov-dS.js} +4 -4
  129. package/dist/assets/{switch-COh9mZOL.js → switch-nBnRBAW3.js} +1 -1
  130. package/dist/assets/{terminalApi-Cs8T3taw.js → terminalApi-Cg9eNRXp.js} +1 -1
  131. package/dist/assets/{textarea-DnOdSgZM.js → textarea-DbKqSgXl.js} +1 -1
  132. package/dist/assets/{timeFormat-ZGJSZlGk.js → timeFormat-jyRFc3TA.js} +1 -1
  133. package/dist/assets/{tooltip-wFf92wqJ.js → tooltip-KqYXHoiE.js} +1 -1
  134. package/dist/assets/{truncated-path-CNuLLJYq.js → truncated-path-BVONNNs1.js} +1 -1
  135. package/dist/assets/{types-C4KUivVG.js → types-CuAxZ5HG.js} +1 -1
  136. package/dist/assets/ui-gH75_gWj.js +13 -0
  137. package/dist/assets/{uk-Cvg8_R2n.js → uk-B5z71t0I.js} +2 -2
  138. package/dist/assets/useAppFontEffects-TjnIqwlI.js +7 -0
  139. package/dist/assets/{useAssistantUIStore-jd_I1qR9.js → useAssistantUIStore-D_7_VmeY.js} +1 -1
  140. package/dist/assets/{useDesktopWindowControlsLayout-DJTBs9Ai.js → useDesktopWindowControlsLayout-pEDvGCAI.js} +1 -1
  141. package/dist/assets/{useDictation-Dw4cPz-9.js → useDictation-CtI9i0nb.js} +1 -1
  142. package/dist/assets/{useEffectiveDirectory-DleT4CpD.js → useEffectiveDirectory-DO47kx8J.js} +1 -1
  143. package/dist/assets/{useFontPreferences-D8ajsrAw.js → useFontPreferences-C_U0TdQZ.js} +1 -1
  144. package/dist/assets/{useGitStore-DTlP-L0a.js → useGitStore-DdWKLUCb.js} +1 -1
  145. package/dist/assets/{useInlineCommentDraftStore-Wde2bT5p.js → useInlineCommentDraftStore-BhYBTBtT.js} +1 -1
  146. package/dist/assets/useMcpConfigStore-DeBLHEln.js +1 -0
  147. package/dist/assets/{useMobileSwipeActions-k7KGPpqM.js → useMobileSwipeActions-Ksa_CkbQ.js} +1 -1
  148. package/dist/assets/{useMobileTranscriptSyncHint-BLI4fy8Q.js → useMobileTranscriptSyncHint-i3zhVIUh.js} +1 -1
  149. package/dist/assets/{useModelLists-DUsn2kaq.js → useModelLists-7_E2T5ev.js} +1 -1
  150. package/dist/assets/{useOpenCodeReadiness-Bxz72dNZ.js → useOpenCodeReadiness-JFbJk0Mg.js} +1 -1
  151. package/dist/assets/{usePluginsStore-DzweL9M8.js → usePluginsStore-DP3gcI-s.js} +1 -1
  152. package/dist/assets/{useProjectGitActions-BPlLnhmx.js → useProjectGitActions-C25uO6_j.js} +1 -1
  153. package/dist/assets/{useProjectGitStore-EZRP6D6M.js → useProjectGitStore-BYfY7A74.js} +1 -1
  154. package/dist/assets/{useProjectRuntimeAPIs-Cbt-c1SP.js → useProjectRuntimeAPIs-DGVmHgCx.js} +1 -1
  155. package/dist/assets/{useQuotaStore-cFgc-IG2.js → useQuotaStore-CYSImtuE.js} +1 -1
  156. package/dist/assets/{useSessionBtwStore-DjwWijyt.js → useSessionBtwStore-kbteXiWK.js} +1 -1
  157. package/dist/assets/{useStreamingTextThrottle-B8aWuwgs.js → useStreamingTextThrottle-Cv2XQjeg.js} +1 -1
  158. package/dist/assets/{useTerminalStore-BEY9gQzc.js → useTerminalStore-BRbNqUvc.js} +1 -1
  159. package/dist/assets/useUIStore-1DE4XJOx.js +1 -0
  160. package/dist/assets/{worktreeManager-BbQ4inHD.js → worktreeManager-DDEk6-Rl.js} +1 -1
  161. package/dist/assets/{worktreeSourceBranchPreference-7Id37MxY.js → worktreeSourceBranchPreference-DLhyD194.js} +1 -1
  162. package/dist/assets/{zh-CN-B6Gc3wZh.js → zh-CN-D4vLeHqe.js} +2 -2
  163. package/dist/assets/zh-TW-DPqnNQKu.js +15 -0
  164. package/dist/index.html +8 -8
  165. package/dist/mini-chat.html +8 -8
  166. package/dist/mobile.html +1 -1
  167. package/package.json +1 -1
  168. package/server/index.js +1 -0
  169. package/server/lib/assistants/DOCUMENTATION.md +10 -2
  170. package/server/lib/assistants/builtin-skills.js +4 -4
  171. package/server/lib/assistants/builtin-skills.test.js +7 -4
  172. package/server/lib/assistants/harness.js +2 -1
  173. package/server/lib/assistants/remote-execution.test.js +60 -1
  174. package/server/lib/assistants/service.js +1 -0
  175. package/server/lib/assistants/yuri-tools.js +42 -6
  176. package/server/lib/gui-customization/DOCUMENTATION.md +13 -6
  177. package/server/lib/gui-customization/projects-client.mjs +5 -3
  178. package/server/lib/gui-customization/projects.js +16 -4
  179. package/server/lib/gui-customization/projects.test.js +38 -2
  180. package/server/lib/gui-customization/session-skill.js +3 -3
  181. package/server/lib/gui-customization/session-skill.test.js +9 -7
  182. package/server/lib/gui-customization/skill/SKILL.md +22 -13
  183. package/server/lib/gui-customization/skill/references/projects.md +16 -2
  184. package/server/lib/opencode/feature-routes-runtime.js +6 -2
  185. package/server/lib/opencode/session-directory-runtime.js +5 -1
  186. package/server/lib/opencode/session-directory-runtime.test.js +39 -0
  187. package/server/lib/projects/DOCUMENTATION.md +4 -3
  188. package/server/lib/projects/registry.js +12 -1
  189. package/server/lib/remote-hosts/DOCUMENTATION.md +5 -1
  190. package/server/lib/remote-hosts/gateway.js +21 -0
  191. package/server/lib/remote-hosts/routes.js +44 -0
  192. package/server/lib/remote-hosts/routes.test.js +48 -0
  193. package/server/lib/scheduled-tasks/session-skill.test.js +9 -3
  194. package/server/lib/session-index/DOCUMENTATION.md +6 -2
  195. package/server/lib/session-index/sync-runtime.js +117 -89
  196. package/dist/assets/ArchivedSessionsDialog-C3Yn2T92.js +0 -1
  197. package/dist/assets/AssistantConversationSurface-B59k-lXE.css +0 -1
  198. package/dist/assets/AssistantConversationSurface-BnoGpvaw.js +0 -3
  199. package/dist/assets/ChatContainer-DQ2aAjYQ.js +0 -65
  200. package/dist/assets/ScheduledTasksDialog-BMoHLXYW.js +0 -3
  201. package/dist/assets/TerminalView-BwradFZm.js +0 -9
  202. package/dist/assets/es-Dl_f-VoR.js +0 -15
  203. package/dist/assets/main-Bd77IVQE.js +0 -2
  204. package/dist/assets/main-HeMyVqAF.js +0 -169
  205. package/dist/assets/miniChat-Brvg2KsE.js +0 -2
  206. package/dist/assets/mobile-BOuoV895.js +0 -2
  207. package/dist/assets/remoteProjectQueries-DFbTE2e2.js +0 -1
  208. package/dist/assets/runtimeEndpointReset-CltKCEAq.js +0 -4
  209. package/dist/assets/sessionOwnership-B4NyrdiS.js +0 -2
  210. package/dist/assets/shortcuts-B0XmqH9X.js +0 -1
  211. package/dist/assets/spacedFileMention-Ds4GtgiF.js +0 -1
  212. package/dist/assets/ui-BPOP32rM.js +0 -13
  213. package/dist/assets/useAppFontEffects-BxzLAPb0.js +0 -7
  214. package/dist/assets/useMcpConfigStore-CQCdt0vJ.js +0 -1
  215. package/dist/assets/useUIStore-CxX_u4P7.js +0 -1
  216. package/dist/assets/zh-TW-C2bT0lOZ.js +0 -15
@@ -24,14 +24,17 @@ describe('built-in customization instructions', () => {
24
24
  const file = JSON.parse(entry.value.match(/read (".*?") first/)[1]);
25
25
  expect(await fs.readFile(file, 'utf8')).toContain('name: yuri-customization');
26
26
  for (const name of ['projects', 'appearance', 'ui-surfaces', 'plugin-styles', 'gui-api', 'workflow', 'global-pages', 'work-status', 'icons', 'file-previews', 'preview-exports', 'remote-connections', 'deep-links']) expect((await fs.readFile(path.join(path.dirname(file), 'references', `${name}.md`), 'utf8')).length).toBeGreaterThan(500);
27
- expect(entry.value).toContain('adding a directory as a project in Yuri');
28
- expect(entry.value).toContain('task/session archive or restore (归档/恢复)');
27
+ expect(entry.value).toContain('project management, task and session lifecycle');
29
28
  expect(await fs.readFile(file, 'utf8')).toContain('(references/projects.md)');
30
29
  expect(entry.value).toContain('yuri:// deep links');
31
- expect(entry.value).toContain('project/session resource ownership');
30
+ expect(entry.value).toContain('resource identity');
32
31
  expect(await fs.readFile(file, 'utf8')).toContain('(references/deep-links.md)');
33
32
  const projects = await fs.readFile(path.join(path.dirname(file), 'references', 'projects.md'), 'utf8');
34
33
  expect(await fs.readFile(file, 'utf8')).toContain('(references/projects.md#resource-identity-and-scope)');
34
+ const source = await fs.readFile(file, 'utf8');
35
+ expect(source.trimEnd().endsWith('https://github.com/yee94/yuri')).toBe(true);
36
+ expect(source).toContain('required authorization');
37
+ expect(entry.value).not.toContain('https://github.com/yee94/yuri');
35
38
  expect(projects).toContain('## Resource identity and scope');
36
39
  expect(projects).toContain('target:{hubId,hostId,instanceId}');
37
40
  expect(projects).toContain('discovering an identity does not enable another protocol or grant access');
@@ -48,7 +51,6 @@ describe('built-in customization instructions', () => {
48
51
  await expect(fs.stat(path.join(path.dirname(file), 'projects.mjs'))).rejects.toMatchObject({ code: 'ENOENT' });
49
52
  expect(entry.value).not.toContain('Bound local desktop helper');
50
53
  expect(entry.value).toContain('No bound SSH/Relay command is provided');
51
- expect(entry.value).toContain('There is no credential/filesystem fallback');
52
54
  await expect(fs.stat(path.join(path.dirname(file), 'remote-connections.mjs'))).rejects.toMatchObject({ code: 'ENOENT' });
53
55
  expect(await fs.readFile(file, 'utf8')).toContain('(references/icons.md)');
54
56
  expect(await fs.readFile(path.join(path.dirname(file), 'references', 'global-pages.md'), 'utf8')).toContain('(icons.md)');
@@ -73,13 +75,13 @@ describe('built-in customization instructions', () => {
73
75
  const projectFile = JSON.parse(projectEntry.match(/read (".*?") first/)[1]);
74
76
  expect(projectFile).not.toBe(boundFile);
75
77
  expect(projectEntry).toContain('Bound project helper:');
76
- expect(projectEntry).toContain('local/remote project registration');
77
- expect(projectEntry).toContain('task/session archive and restore');
78
+ expect(projectEntry).toContain('remote hosts and sessions');
79
+ expect(projectEntry).not.toContain('settle-session');
80
+ expect(projects).toContain('commands.remove');
78
81
  expect(projects).toContain('任务归档');
79
82
  expect(projects).toContain('会话归档');
80
83
  expect(projects).toContain('lifecycleSupported:true');
81
84
  expect(await fs.readFile(path.join(path.dirname(projectFile), 'projects.mjs'), 'utf8')).toContain("'settle-session', 'unsettle-session', 'archive-session', 'unarchive-session'");
82
- expect(projectEntry).toContain('discovering authorized remote machines');
83
85
  expect(await fs.readFile(path.join(path.dirname(projectFile), 'references', 'projects.md'), 'utf8')).toContain('commands.add-remote');
84
86
  expect(await fs.readFile(path.join(path.dirname(projectFile), 'projects.mjs'), 'utf8')).toContain("'remote-hosts', 'add-remote'");
85
87
  expect(projectEntry).toContain('No bound SSH/Relay command is provided');
@@ -1,19 +1,17 @@
1
1
  ---
2
2
  name: yuri-customization
3
- description: Register local or remote Yuri projects, archive conversations (task-view 归档 or session archive), discover authorized remote machines and read/create/continue remote sessions, resolve project/session ownership and build yuri:// deep links, configure SSH connections, configuration sync and Relay pairing, or customize its GUI through plugins for appearance, pages, widgets, previews, panels and settings.
3
+ description: Yuri project registration and removal, task and session lifecycle, remote hosts and sessions, resource identity and deep links, connection and configuration management, and GUI customization.
4
4
  ---
5
5
 
6
6
  # Yuri customization
7
7
 
8
- For adding an existing directory to Yuri's project list, follow [projects](references/projects.md) using this session's bound project API helper. Registration is separate from creating files, cloning or opening a conversation.
8
+ Load only the matching reference. Bound helpers expose the operations available
9
+ to the current caller through `describe`; the references do not grant access.
9
10
 
10
- For archiving conversations ("归档", moving tasks to the archived shelf, or session-level archive), use the same bound project helper and [archiving conversations](references/projects.md#archiving-conversations-task-archive-vs-session-archive). The task-view 「归档」 is `settle-session`; do not call UI-authenticated routes or edit Host databases.
11
-
12
- For adding a remote project on an authorized machine or working with its sessions, use the same bound project helper and the [remote project workflow](references/projects.md#connected-remote-projects-and-sessions). This grants no SSH setup or new connection permission.
13
-
14
- For locating project/session resources, establish [resource identity and scope](references/projects.md#resource-identity-and-scope) through the available discovery tools. For navigation links, then follow [deep links](references/deep-links.md). Resource discovery, navigation support and authorization are separate capabilities.
15
-
16
- For SSH setup, configuration sync or Relay pairing, first check this session's pointer for its exact bound local desktop helper command. Without that command, report unavailable and stop this branch: a script file or another capability's binding does not enable it. With the command, follow [remote connections](references/remote-connections.md). For UI changes, use the plugin workflow below. Its GUI contracts describe Yuri's supported subset of the experimental OpenCode GUI SDK 2.2.0, not every capability in the newest upstream Desktop.
11
+ - [Projects](references/projects.md): project registration and removal, task and session lifecycle, remote hosts and sessions.
12
+ - [Resource identity and scope](references/projects.md#resource-identity-and-scope) and [deep links](references/deep-links.md).
13
+ - [Remote connections](references/remote-connections.md): SSH, configuration sync and Relay pairing.
14
+ - GUI customization: plugin capabilities and workflow below.
17
15
 
18
16
  ## Workflow
19
17
 
@@ -36,10 +34,6 @@ For SSH setup, configuration sync or Relay pairing, first check this session's p
36
34
 
37
35
  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.
38
36
 
39
- ## Source fallback
40
-
41
- 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.
42
-
43
37
  ## Boundaries
44
38
 
45
39
  - `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.
@@ -48,3 +42,18 @@ If the references and target UI leave the relevant selector, style owner or exte
48
42
  - macOS customization means the running Dock icon only. Keep signed `.app` resources, Finder/Launchpad icons, bundle identifiers and update origins unchanged.
49
43
  - 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.
50
44
  - Pre-JavaScript startup screens retain Yuri's built-in branding. Plugins load after the usable shell; never delay startup to apply a skin.
45
+
46
+ ## Open-source reference
47
+
48
+ When the matching reference does not cover an operation and Yuri may expose an
49
+ API for it, research the repository before concluding it is unavailable. Use
50
+ the tag matching the installed Yuri version when known (`main` for development
51
+ builds). Verify the interface, supported runtime and required authorization in
52
+ the owning docs, implementation or tests. Use the verified API to help the user
53
+ when it is accessible to the current caller and the requested action is
54
+ authorized. Source visibility does not grant access to internal routes or replace
55
+ a required bound helper. If no supported interface can be verified, report that
56
+ limit. GUI source can clarify extension behavior; customization still belongs in
57
+ the plugin.
58
+
59
+ https://github.com/yee94/yuri
@@ -1,6 +1,6 @@
1
1
  # Projects
2
2
 
3
- Register an existing directory through the **bound project API helper** in this
3
+ Manage project registrations through the **bound project API helper** in this
4
4
  session's Yuri customization pointer. This is a Host capability, not a GUI plugin
5
5
  or a desktop deep link. Registration does not create files, clone a repository,
6
6
  open a conversation or switch an existing active project.
@@ -9,7 +9,7 @@ open a conversation or switch an existing active project.
9
9
 
10
10
  Resolve ownership before operating on a project/session or composing a navigation link:
11
11
 
12
- 1. Discover this caller's capabilities through the bound helper's `describe`, or the contact's granted project tools. Use the returned operations and their scope; a missing binding or unsupported capability is an explicit limit.
12
+ 1. Discover this caller's capabilities through the bound helper's `describe`, or the contact's granted project tools. For registration, prefer the granted project tool when available. Use the returned operations and their scope; a missing binding or unsupported capability is an explicit limit.
13
13
  2. For bound-Host resources, use exact IDs and raw directories from this session's context or the relevant `list` / `task-sessions` result. The bound Host is the helper's execution target, not necessarily the computer displaying Yuri. Index results have the completeness limits described below.
14
14
  3. For remote resources, discover the project or machine through `remote-projects` / `remote-hosts`, then query its sessions with `sessions` or `read-session`. Keep the returned `target:{hubId,hostId,instanceId}` with each resource's raw directory and session ID:
15
15
 
@@ -57,6 +57,20 @@ empty-success result. Missing paths, files and inaccessible directories fail
57
57
  without implicit filesystem creation. A `terminal:true` helper error stops this
58
58
  workflow until a new supported session's bound describe succeeds.
59
59
 
60
+ ## Local project removal
61
+
62
+ 1. Run the bound `describe` command. Continue only if it returns `commands.remove`.
63
+ 2. Run `commands.list` and match the user's requested scope to exact project IDs
64
+ on the bound Host. Resolve ambiguous names before writing. Remote projects
65
+ are not in this list and are not supported by this operation.
66
+ 3. Run `commands.remove` once per selected ID with JSON on stdin:
67
+ `{"projectId":"…"}` (replace the placeholder with the exact listed ID).
68
+ This unregisters the project from Yuri without deleting its directory,
69
+ files, sessions or tasks. It does not navigate an open client.
70
+ 4. Count only `{"projectId":"…","removed":true}` as a confirmed removal. Report
71
+ failures separately; after an interrupted response, re-list the same Host
72
+ to check whether the ID is still registered before retrying.
73
+
60
74
  ## Interface and scope
61
75
 
62
76
  The helper calls `POST /api/yuri/session-skills/projects` with
@@ -316,12 +316,12 @@ export const createFeatureRoutesRuntime = (dependencies) => {
316
316
  });
317
317
 
318
318
  const assistantAllowedRoots = [];
319
- const refreshAssistantAllowedRoots = async () => {
320
- const settings = await readSettingsFromDiskMigrated();
319
+ const updateAssistantAllowedRoots = (settings) => {
321
320
  assistantAllowedRoots.splice(0, assistantAllowedRoots.length, ...sanitizeProjects(settings?.projects ?? [])
322
321
  .map((project) => project.path)
323
322
  .filter((value) => typeof value === 'string'));
324
323
  };
324
+ const refreshAssistantAllowedRoots = async () => updateAssistantAllowedRoots(await readSettingsFromDiskMigrated());
325
325
  await refreshAssistantAllowedRoots();
326
326
  const projectRegistry = createProjectRegistry({ persistSettings, validateDirectoryPath });
327
327
  registerProjectsSkill(app, {
@@ -329,6 +329,10 @@ export const createFeatureRoutesRuntime = (dependencies) => {
329
329
  express, getIsSharedOpenCodeService, getOpenCodeAuthHeaders, hasAssistant,
330
330
  createClient: () => makeOpenCodeV2Client({ baseUrl: buildOpenCodeUrl('/', ''), authHeaders: getOpenCodeAuthHeaders(), getRuntimeContract }),
331
331
  registerProject: (input) => projectRegistry.register(input), readSettingsFromDiskStrict, sanitizeProjects,
332
+ removeProject: async (input) => {
333
+ const { settings } = await projectRegistry.remove(input);
334
+ updateAssistantAllowedRoots(settings);
335
+ },
332
336
  sessionLifecycle: createProjectSessionLifecycle({
333
337
  sessionIndexService, sessionArchiveService, sessionMetadataStore, publishSessionIndexChange,
334
338
  }),
@@ -134,5 +134,9 @@ export const createSessionDirectoryRuntime = ({
134
134
  };
135
135
  return (input, init) => fetchSessionList(input, init, readPage);
136
136
  };
137
- return { isLocal, resolveDirectory, isDirectoryMissing, projectSession, projectEvent, fetchSessionList, createFetchBatch };
137
+ const fetchExactSessionList = async (input, init) => {
138
+ const directory = new URL(input).searchParams.get('directory');
139
+ return directory && localPath(directory) ? fetchFn(input, init) : null;
140
+ };
141
+ return { isLocal, resolveDirectory, isDirectoryMissing, projectSession, projectEvent, fetchSessionList, createFetchBatch, fetchExactSessionList };
138
142
  };
@@ -102,6 +102,45 @@ describe('physical session directory identity', () => {
102
102
  expect(rootReads).toBe(6);
103
103
  } finally { sync.stop(); service.close(); }
104
104
  });
105
+
106
+ it('indexes the registered directory when unrelated global sessions exhaust the alias scan window', async () => {
107
+ const { real, alias, other } = fixture();
108
+ const indexed = createSessionIndexService({ dbPath: ':memory:', resolveDirectory: (directory) => directory === alias ? real : directory });
109
+ indexed.upsert(session('cached-alias', alias, 1));
110
+ indexed.upsert(session('now-archived', real, 2));
111
+ let globalReads = 0;
112
+ let exactReads = 0;
113
+ const directories = createSessionDirectoryRuntime({ fetchFn: async (input) => {
114
+ const url = new URL(input);
115
+ if (url.searchParams.has('parentID')) return json({ data: [], cursor: {} });
116
+ if (!url.searchParams.has('directory')) {
117
+ return json({ data: [session(`unrelated-${globalReads}`, other, 10)], cursor: { next: `global-${++globalReads}` } });
118
+ }
119
+ expect(url.searchParams.get('directory')).toBe(real);
120
+ exactReads++;
121
+ if (!url.searchParams.has('cursor')) return json({ data: [session('latest', real, 20)], cursor: { next: 'exact-2' } });
122
+ expect(url.searchParams.get('cursor')).toBe('exact-2');
123
+ const archived = session('now-archived', real, 15);
124
+ archived.time.archived = 16;
125
+ return json({ data: [archived, session('previous', real, 10)], cursor: {} });
126
+ } });
127
+ const sync = createSessionIndexSyncRuntime({
128
+ sessionIndexService: indexed,
129
+ buildOpenCodeUrl: (route) => `http://localhost/api${route}`, getOpenCodeAuthHeaders: () => ({}),
130
+ fetchFn: directories.fetchSessionList, createFetchBatch: directories.createFetchBatch,
131
+ fetchExactDirectory: directories.fetchExactSessionList,
132
+ resolveDirectory: directories.resolveDirectory,
133
+ });
134
+ try {
135
+ sync.enqueue([real]);
136
+ await vi.waitFor(() => expect(sync.snapshot().sync.active).toBe(false));
137
+ const entry = indexed.snapshot().directories.find((row) => row.directory === real);
138
+ expect(entry?.sessions.map(({ id }) => id)).toEqual(['latest', 'previous', 'cached-alias']);
139
+ expect(entry).toMatchObject({ hasMore: true, lastFullSyncedAt: 0 });
140
+ expect(globalReads).toBe(5);
141
+ expect(exactReads).toBe(2);
142
+ } finally { sync.stop(); indexed.close(); }
143
+ });
105
144
  it('backfills only 30 days once per runtime, resumes failed pages, and never boots locations', async () => {
106
145
  const { real } = fixture();
107
146
  const dbPath = path.join(real, 'index.sqlite');
@@ -12,8 +12,9 @@ before registration. Paths are validated and canonicalized before deduplication.
12
12
  Concurrent registrations apply against the latest settings under the existing
13
13
  Host/Electron exclusive write lock, preserving unrelated settings and projects
14
14
  (including temporarily unavailable directories). Existing IDs, ordering, custom
15
- labels and metadata survive repeat registration. It does not add project label-edit
16
- or removal APIs, and never deletes files, sessions or task storage.
15
+ labels and metadata survive repeat registration. Removal matches one local project
16
+ ID under the same lock and leaves files, sessions and task storage intact. The
17
+ settings writer selects a remaining active project if needed.
17
18
 
18
19
  Trusted registry operations use the settings owner's functional update form.
19
20
  It performs a strict read inside the same persistence lock and follows the normal
@@ -23,7 +24,7 @@ missing directories: callers validate the affected resource. Corrupt reads and
23
24
  failed writes are errors, not empty state or successful registration. No new
24
25
  database, settings file or client sync protocol is added. The session skill's
25
26
  `POST /api/yuri/session-skills/projects` bridge adds authenticated `describe`,
26
- `list` and `add` operations without exposing the full settings API; its admission
27
+ `list`, `add` and local `remove` operations without exposing the full settings API; its admission
27
28
  and result contract live in `../gui-customization/DOCUMENTATION.md`.
28
29
 
29
30
  `registry.test.js` covers canonical alias deduplication, concurrent append/settings
@@ -32,5 +32,16 @@ export const createProjectRegistry = ({ persistSettings, validateDirectoryPath }
32
32
  return { project: saved, created, settings };
33
33
  };
34
34
 
35
- return { register };
35
+ const remove = async ({ projectId }) => {
36
+ const id = string(projectId, 'projectId');
37
+ const settings = await persistSettings((current) => {
38
+ if (!Array.isArray(current.projects)) throw new Error('Invalid project settings');
39
+ const projects = current.projects.filter((entry) => entry.id !== id);
40
+ if (projects.length === current.projects.length) fail('not_found', 'Project is not registered on this Host.');
41
+ return { projects };
42
+ });
43
+ return { settings };
44
+ };
45
+
46
+ return { register, remove };
36
47
  };
@@ -134,7 +134,11 @@ short reads in `finally` and retain background watch demand until settlement.
134
134
  - `PATCH /api/hosts/:hostId/projects/:projectId`: remote metadata write-through;
135
135
  cache updates only on successful authority response.
136
136
  - `DELETE` on that path removes only the reference.
137
- - `GET /api/hosts/:hostId/summaries`: immediate SQLite snapshot, stale marker,
137
+ - `GET`/`PUT /api/hosts/:hostId/model-favorites`: the target machine's own
138
+ `favoriteModels`, read and written through `/api/config/settings` with only that
139
+ field rebuilt on the Hub (64 entries, variants kept, invalid writes rejected with
140
+ 400). Hosts without a registered project return 404. This is the single settings
141
+ field exposed through the Hub; raw settings stay outside the proxy.- `GET /api/hosts/:hostId/summaries`: immediate SQLite snapshot, stale marker,
138
142
  connection receipts and unread/folder/order snapshots. Offline live status is
139
143
  `metadata.yuri.sessionStatus = {type:'unknown',lastKnown}`.
140
144
  Opening a replacement status stream does not make persisted activity live:
@@ -16,6 +16,8 @@ const fingerprint = (host) => crypto.createHash('sha256').update(JSON.stringify(
16
16
  const directoryKey = (value) => value.replace(/\\/g, '/').replace(/\/+$/, '') || '/';
17
17
  const TOPOLOGY_PROBE_DIRECTORY_MS = 60_000;
18
18
  const TOPOLOGY_PROBE_CONNECTION_MS = 15_000;
19
+ const RESYNC_DELAY_MS = 3_000;
20
+ const RESYNC_MAX_ATTEMPTS = 8;
19
21
  const statusEvent = (payload) => /^(session\.(created|updated|deleted|renamed|moved|status|idle|error|execution\.(started|succeeded|failed|interrupted)|retry|model\.selected|inbox\.(enqueued|delivered))|yuri:session-(index-changed|status|activity|metadata|folders-changed|order-changed|unread-changed)|yuri:project.*|yuri:worktree-topology-changed|yuri:notification)$/.test((payload?.type || '').replace(/\.\d+$/, ''));
20
22
  export const projectRemoteStatusEvent = (payload) => {
21
23
  if (!statusEvent(payload)) return null;
@@ -149,6 +151,7 @@ export function createRemoteHostGateway({ store, indexDbPath, adapter, broadcast
149
151
  };
150
152
  const closeConnection = (connection) => {
151
153
  connection.controller.abort();
154
+ clearTimeout(connection.resyncTimer);
152
155
  connection.reader?.stop();
153
156
  connection.transport?.close();
154
157
  for (const [id, lease] of leases) if (lease.hostId === connection.host.id) {
@@ -377,6 +380,23 @@ export function createRemoteHostGateway({ store, indexDbPath, adapter, broadcast
377
380
  store.saveReceipt(connection.host.id, { lastSyncedAt: Date.now(), lastError: undefined });
378
381
  connection.snapshotReady = !snapshot.sync?.active || snapshot.directories.length > 0;
379
382
  emit(connection.host.id, { type: 'yuri:session-index-changed', properties: { cause: 'change' } });
383
+ // The remote scan is asynchronous and its completion event can be missed: a project directory that is still
384
+ // syncing or was never synced must be re-read, otherwise its sessions stay hidden behind an empty summary.
385
+ const syncing = snapshot.sync?.active === true;
386
+ const unsynced = references.some((project) => {
387
+ const entry = snapshot.directories.find((row) => directoryKey(row.directory) === directoryKey(project.path));
388
+ return !entry || entry.lastSyncedAt === 0;
389
+ });
390
+ if (!syncing && !unsynced) connection.resyncAttempts = 0;
391
+ else if ((connection.resyncAttempts = (connection.resyncAttempts || 0) + 1) <= RESYNC_MAX_ATTEMPTS) {
392
+ if (!syncing) connection.topologyDirty = true;
393
+ clearTimeout(connection.resyncTimer);
394
+ connection.resyncTimer = setTimeout(() => {
395
+ connection.resyncTimer = null;
396
+ if (current(connection)) enqueueRefresh(connection);
397
+ }, RESYNC_DELAY_MS);
398
+ connection.resyncTimer.unref?.();
399
+ }
380
400
  } catch (error) {
381
401
  if (!controller.signal.aborted) setState(connection, 'degraded', error);
382
402
  } finally {
@@ -436,6 +456,7 @@ export function createRemoteHostGateway({ store, indexDbPath, adapter, broadcast
436
456
  onConnect: () => {
437
457
  if (!current(connection)) return;
438
458
  connection.failures = 0;
459
+ connection.resyncAttempts = 0;
439
460
  connection.topologyDirty = true;
440
461
  connection.snapshotReady = false;
441
462
  store.saveReceipt(id, { lastConnectedAt: Date.now(), lastError: undefined });
@@ -10,6 +10,8 @@ import { projectRemoteConfiguration } from './configuration.js';
10
10
  import { RUNTIME_CONTRACT_MIN_VERIFIED } from '../opencode/runtime-contract.js';
11
11
  import { parseFilePreviewPath, replaceFilePreviewUrlAuthToken } from '../preview/file-preview-path.js';
12
12
 
13
+ const MODEL_FAVORITE_LIMIT = 64;
14
+ const MODEL_REF_FIELD_MAX = 256;
13
15
  const websocketPath = (path) => path === '/api/terminal/ws' || path === '/api/gui-network/ws' || path.startsWith('/api/preview/proxy/');
14
16
  const safeRoute = (route, method) => {
15
17
  if (!route.startsWith('/api/') || /[\\\r\n]/.test(route)) return false;
@@ -224,6 +226,48 @@ export function registerRemoteHostRoutes(app, { gateway, getAuth, server, isRequ
224
226
  app.get('/api/hosts/:hostId/summaries', (req, res) => {
225
227
  try { res.json(gateway.summaries(req.params.hostId)); } catch (error) { report(res, error); }
226
228
  });
229
+ // Favorite models belong to the target machine's own settings. Raw settings stay outside the
230
+ // client proxy, so only this one field is read and written through, with the body rebuilt here.
231
+ const readFavoriteModels = (value, strict) => {
232
+ if (!Array.isArray(value)) { if (strict) throw remoteFailure('validation_error', 400); return []; }
233
+ if (strict && value.length > MODEL_FAVORITE_LIMIT) throw remoteFailure('validation_error', 400);
234
+ const seen = new Set();
235
+ const refs = [];
236
+ for (const item of value) {
237
+ const field = (name) => (typeof item?.[name] === 'string' ? item[name].trim() : '');
238
+ const providerID = field('providerID');
239
+ const modelID = field('modelID');
240
+ const variant = field('variant');
241
+ const valid = providerID && modelID && providerID.length <= MODEL_REF_FIELD_MAX && modelID.length <= MODEL_REF_FIELD_MAX
242
+ && variant.length <= MODEL_REF_FIELD_MAX;
243
+ if (!valid) { if (strict) throw remoteFailure('validation_error', 400); continue; }
244
+ const key = `${providerID}\0${modelID}`;
245
+ if (seen.has(key)) continue;
246
+ seen.add(key);
247
+ refs.push(variant ? { providerID, modelID, variant } : { providerID, modelID });
248
+ if (refs.length >= MODEL_FAVORITE_LIMIT) break;
249
+ }
250
+ return refs;
251
+ };
252
+ const favoriteModelsHost = (hostId) => {
253
+ if (!store.projects(hostId).length) throw remoteFailure('project_not_found', 404);
254
+ return hostId;
255
+ };
256
+ app.get('/api/hosts/:hostId/model-favorites', async (req, res) => {
257
+ try {
258
+ const settings = await gateway.json(favoriteModelsHost(req.params.hostId), '/api/config/settings', { signal: req.remoteHostSignal });
259
+ res.json({ favoriteModels: readFavoriteModels(settings?.favoriteModels, false) });
260
+ } catch (error) { report(res, error); }
261
+ });
262
+ app.put('/api/hosts/:hostId/model-favorites', parseMutation, async (req, res) => {
263
+ try {
264
+ const hostId = favoriteModelsHost(req.params.hostId);
265
+ const favoriteModels = readFavoriteModels(req.body?.favoriteModels, true);
266
+ const settings = await gateway.json(hostId, '/api/config/settings', { method: 'PUT', signal: req.remoteHostSignal,
267
+ headers: { 'content-type': 'application/json' }, body: JSON.stringify({ favoriteModels }) });
268
+ res.json({ favoriteModels: readFavoriteModels(settings?.favoriteModels, false) });
269
+ } catch (error) { report(res, error); }
270
+ });
227
271
  for (const method of ['post', 'delete']) {
228
272
  app[method]('/api/hosts/:hostId/api/yuri/session-index/session/:id/pin', (req, res) => {
229
273
  try {
@@ -247,6 +247,35 @@ async function assertBrowserTcp(hub, route, remote) {
247
247
  }
248
248
 
249
249
  describe('Remote Host production HTTP contract', () => {
250
+ it('reads and writes only favoriteModels of the target machine settings', async () => {
251
+ const { hub, remote } = await aggregate();
252
+ let remoteSettings = { favoriteModels: [{ providerID: 'p', modelID: 'a', variant: 'high' }], defaultModel: 'keep/me' };
253
+ const writes = [];
254
+ remote.app.get('/api/config/settings', (_req, res) => res.json(remoteSettings));
255
+ remote.app.put('/api/config/settings', express.json(), (req, res) => {
256
+ writes.push(req.body);
257
+ remoteSettings = { ...remoteSettings, ...req.body };
258
+ res.json(remoteSettings);
259
+ });
260
+ const route = '/api/hosts/remote-1/model-favorites';
261
+ expect((await hub.call(route)).status).toBe(404);
262
+ await hub.call('/api/hosts/remote-1/projects', 'POST', { path: '/same/path' });
263
+ expect(await (await hub.call(route)).json()).toEqual({ favoriteModels: [{ providerID: 'p', modelID: 'a', variant: 'high' }] });
264
+
265
+ const saved = await hub.call(route, 'PUT', { favoriteModels: [
266
+ { providerID: 'q', modelID: 'b' }, { providerID: 'q', modelID: 'b', variant: 'low' }, { providerID: ' p ', modelID: 'a', variant: 'max', extra: 1 },
267
+ ], defaultModel: 'evil/model' });
268
+ expect(await saved.json()).toEqual({ favoriteModels: [{ providerID: 'q', modelID: 'b' }, { providerID: 'p', modelID: 'a', variant: 'max' }] });
269
+ expect(writes).toEqual([{ favoriteModels: [{ providerID: 'q', modelID: 'b' }, { providerID: 'p', modelID: 'a', variant: 'max' }] }]);
270
+ expect(remoteSettings.defaultModel).toBe('keep/me');
271
+
272
+ expect((await hub.call(route, 'PUT', { favoriteModels: 'nope' })).status).toBe(400);
273
+ expect((await hub.call(route, 'PUT', { favoriteModels: [{ providerID: 'q' }] })).status).toBe(400);
274
+ expect((await hub.call(route, 'PUT', { favoriteModels: Array.from({ length: 65 }, (_, i) => ({ providerID: 'p', modelID: `m${i}` })) })).status).toBe(400);
275
+ expect(writes).toHaveLength(1);
276
+ expect((await hub.call('/api/hosts/unknown/model-favorites', 'PUT', { favoriteModels: [] })).status).toBe(404);
277
+ });
278
+
250
279
  it('pins and unpins remote sessions in the Hub DB without remote mutations or refresh resurrection', async () => {
251
280
  const { hub, remote } = await aggregate();
252
281
  const remotePin = vi.fn((_req, res) => res.status(204).end());
@@ -755,6 +784,25 @@ describe('Remote Host production HTTP contract', () => {
755
784
  await wait(() => expect(remote.statusStreams).toBe(0));
756
785
  } finally { release(); abort.abort(); await stream.body.cancel().catch(() => {}); remote.server.off('request', holdCatalog); }
757
786
  });
787
+ it('writes all remote project appearance settings to the target before updating its Hub reference', async () => {
788
+ const { hub, remote } = await aggregate();
789
+ const local = await (await hub.call('/api/projects', 'POST', { path: '/same/path', label: 'Local project' })).json();
790
+ const { project } = await (await hub.call('/api/hosts/remote-1/projects', 'POST', { path: '/same/path' })).json();
791
+ const appearance = { label: 'Remote project', icon: 'rocket', color: 'keyword', iconBackground: '#123456' };
792
+ const route = `/api/hosts/remote-1/projects/${project.id}`;
793
+ const saved = await hub.call(route, 'PATCH', appearance);
794
+ expect(saved.status).toBe(200);
795
+ expect((await saved.json()).project).toMatchObject({ id: project.id, ...appearance });
796
+ expect((await (await remote.call('/api/projects')).json()).projects).toContainEqual(expect.objectContaining({
797
+ id: project.remoteProjectId, ...appearance,
798
+ }));
799
+ expect(hub.projects.find((entry) => entry.id === local.project.id)).toEqual(local.project);
800
+
801
+ const cleared = { icon: null, color: null, iconBackground: null };
802
+ expect((await hub.call(route, 'PATCH', cleared)).status).toBe(200);
803
+ expect(remote.projects.find((entry) => entry.id === project.remoteProjectId)).toMatchObject({ ...appearance, ...cleared });
804
+ });
805
+
758
806
  it('does not restore a Hub reference deleted while a metadata PATCH is completing remotely', async () => {
759
807
  const { hub, remote } = await aggregate();
760
808
  const { project } = await (await hub.call('/api/hosts/remote-1/projects', 'POST', { path: '/same/path' })).json();
@@ -16,7 +16,7 @@ import { registerRemoteConnectionsSkill, REMOTE_CONNECTIONS_SKILL_PATH } from '.
16
16
  import { registerProjectsSkill, PROJECTS_SKILL_PATH } from '../gui-customization/projects.js';
17
17
 
18
18
  describe('built-in session skill with authenticated Host', () => {
19
- let root, server, origin, ui, sessions, entries, store, password, auth, registrationFile, sdk, sync, failInstructions, failCleanup, connections, registerProject, remoteGateway;
19
+ let root, server, origin, ui, sessions, entries, store, password, auth, registrationFile, sdk, sync, failInstructions, failCleanup, connections, registerProject, removeProject, remoteGateway;
20
20
  const upstreamOrigin = 'http://127.0.0.1:4096';
21
21
  beforeEach(async () => {
22
22
  root = await fs.mkdtemp(path.join(os.tmpdir(), 'session-skill-'));
@@ -68,9 +68,10 @@ describe('built-in session skill with authenticated Host', () => {
68
68
  };
69
69
  const router = express.Router();
70
70
  registerProject = vi.fn(async (input) => ({ project: { id: 'registered', ...input }, created: true, settings: { password } }));
71
+ removeProject = vi.fn(async () => ({ settings: { password } }));
71
72
  remoteGateway = { supported: false, acquireTask: vi.fn(), registerProject: vi.fn(), list: vi.fn() };
72
73
  registerProjectsSkill(app, { express, getIsSharedOpenCodeService: () => true, getOpenCodeAuthHeaders: () => auth, createClient: () => sdk,
73
- registerProject, readSettingsFromDiskStrict: common.readSettingsFromDiskMigrated, sanitizeProjects: common.sanitizeProjects, remoteHostGateway: remoteGateway });
74
+ registerProject, removeProject, readSettingsFromDiskStrict: common.readSettingsFromDiskMigrated, sanitizeProjects: common.sanitizeProjects, remoteHostGateway: remoteGateway });
74
75
  connections = { list: vi.fn(async () => ({ instances: [] })), setup: vi.fn(async () => ({ id: 'ssh_one', running: true })),
75
76
  pair: vi.fn(async () => ({ url: 'yuri://connect?v=2&p=fixture', expiresAt: '2099-01-01' })) };
76
77
  registerRemoteConnectionsSkill(app, { express, adapter: connections, getIsSharedOpenCodeService: () => true, getOpenCodeAuthHeaders: () => auth, createClient: () => sdk });
@@ -203,7 +204,7 @@ describe('built-in session skill with authenticated Host', () => {
203
204
  const described = await run(command);
204
205
  expect(described.code).toBe(0);
205
206
  expect(described.value.supported).toBe(true);
206
- expect(Object.keys(described.value.commands)).toEqual(['list', 'add']);
207
+ expect(Object.keys(described.value.commands)).toEqual(['list', 'add', 'remove']);
207
208
  const { commands: cmd } = described.value;
208
209
  expect((await run(cmd.list)).value.projects).toHaveLength(2);
209
210
  const input = { path: path.join(root, 'project-b'), label: 'Existing project' };
@@ -211,12 +212,17 @@ describe('built-in session skill with authenticated Host', () => {
211
212
  expect(added.value).toEqual({ project: { id: 'registered', ...input }, created: true });
212
213
  expect(registerProject).toHaveBeenCalledExactlyOnceWith(input);
213
214
  expect(added.stdout + pointer).not.toContain(password);
215
+ const removed = await run(cmd.remove, { projectId: added.value.project.id });
216
+ expect(removed.value).toEqual({ projectId: 'registered', removed: true });
217
+ expect(removeProject).toHaveBeenCalledExactlyOnceWith({ projectId: 'registered' });
214
218
  for (const headers of [{}, { Authorization: 'Bearer test-browser-client' }, { ...auth, Origin: origin }, { Authorization: 'Basic wrong' }]) {
215
219
  const response = await fetch(`${origin}${PROJECTS_SKILL_PATH}`, { method: 'POST', headers: { 'content-type': 'application/json', ...headers }, body: JSON.stringify({ sessionID: session.id, operation: 'add', input }) });
216
220
  expect(response.status).toBe(403);
217
221
  }
218
222
  sessions.get(session.id).metadata.yuri.scheduledTaskSkill.hostOrigin = 'http://127.0.0.1:1';
219
223
  expect((await run(cmd.add, input)).value).toMatchObject({ status: 403, terminal: true });
224
+ expect((await run(cmd.remove, { projectId: 'registered' })).value).toMatchObject({ status: 403, terminal: true });
225
+ expect(removeProject).toHaveBeenCalledTimes(1);
220
226
  expect(registerProject).toHaveBeenCalledTimes(1);
221
227
  await fs.writeFile(registrationFile, JSON.stringify({ url: 'http://127.0.0.1:1', password }));
222
228
  const stale = await run(cmd.add, input);
@@ -41,8 +41,12 @@ Explicit directory lists fetch session pages without initializing an upstream
41
41
  Location and retain only records whose physical directory matches the request.
42
42
  This discovers old aliases outside the index without admitting sibling worktrees.
43
43
  Opaque next/previous cursors stay upstream-owned; filtered short/empty pages with
44
- a continuation are partial, not exhausted. The existing five-page sync budget and
45
- `hasMore` partial-result contract still apply. Explicit remote upstreams retain
44
+ a continuation are partial, not exhausted. When a five-page physical scan cannot
45
+ fill the recent head, one bounded exact-directory read recovers canonical history
46
+ without scanning unrelated projects again. Its rows merge with known aliases;
47
+ coverage remains partial (`hasMore`) and does not advance the full-sync clock.
48
+ An error or insufficient coverage with no visible candidates cannot clear the
49
+ previous index. Explicit remote upstreams retain
46
50
  their directory query behavior; extension-only VS Code has no Host identity layer.
47
51
 
48
52
  Within one explicit-directory sync batch, the local physical-directory adapter