@yuriai/web 0.3.7 → 0.3.8-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/assets/{AgentAvatar-4HfTeQK1.js → AgentAvatar-DPnZENEt.js} +1 -1
- package/dist/assets/{AgentSelector-Db0C7nfY.js → AgentSelector-B46Op3oG.js} +1 -1
- package/dist/assets/ArchivedSessionsDialog-hPG_ZF_w.js +1 -0
- package/dist/assets/{AssistantConversationSurface-Cg0Z0laN.js → AssistantConversationSurface-CG41t5TZ.js} +3 -3
- package/dist/assets/{AssistantSessionCard-CRaYbAwR.js → AssistantSessionCard-DwR2e2Op.js} +2 -2
- package/dist/assets/{AssistantUnreadBadge-B0XaBtKU.js → AssistantUnreadBadge-DEwJnQbL.js} +1 -1
- package/dist/assets/AssistantView-BB_CRg4L.js +1 -0
- package/dist/assets/{AssistantWorkingAvatar-QmEGmd3p.js → AssistantWorkingAvatar-B-ciPk2V.js} +1 -1
- package/dist/assets/{AssistantsSettingsPage-SynpDBbu.js → AssistantsSettingsPage-CgsSV4mH.js} +1 -1
- package/dist/assets/{BinaryFileFallback-CLr78pii.js → BinaryFileFallback-BZCfJNKH.js} +1 -1
- package/dist/assets/{BtwPanel-eNUn2HxV.js → BtwPanel-DGXcgxQV.js} +2 -2
- package/dist/assets/{BusyDots-CGTf_jqS.js → BusyDots-kwYd9Qsa.js} +2 -2
- package/dist/assets/ChatContainer-BTmCJ0r9.js +65 -0
- package/dist/assets/{ChatView-DJnxvyiB.js → ChatView-5s43Y5II.js} +3 -3
- package/dist/assets/{DiagramView-BQ_5mLmc.js → DiagramView-D4CKBzKi.js} +1 -1
- package/dist/assets/{DiffView-KE3aMklA.js → DiffView-B20uCbQX.js} +2 -2
- package/dist/assets/{DiffViewToggle-B-fDu13M.js → DiffViewToggle-DBQpSRIo.js} +1 -1
- package/dist/assets/{ErrorBoundary-BMkurwx0.js → ErrorBoundary-DKq1dmQm.js} +1 -1
- package/dist/assets/{FadeInOnReveal-BNxn8bBO.js → FadeInOnReveal-v5HRJxQe.js} +1 -1
- package/dist/assets/{GuiPluginMount-CcxWjZGn.js → GuiPluginMount-HFg1spLR.js} +1 -1
- package/dist/assets/{GuiPluginPage-B6DZGRf5.js → GuiPluginPage-BldXLT7J.js} +1 -1
- package/dist/assets/{GuiPluginSurface-CZ-rTgd0.js → GuiPluginSurface-SMONtsaS.js} +1 -1
- package/dist/assets/{GuiPluginTitlebarItems-ByapzQyJ.js → GuiPluginTitlebarItems-DJjbMDL7.js} +1 -1
- package/dist/assets/{GuiPluginWindow-DtZqX_qS.js → GuiPluginWindow-9eobm2HP.js} +1 -1
- package/dist/assets/{Icon-CUOVBCQn.js → Icon-DRYS22Bv.js} +1 -1
- package/dist/assets/{ImageLoadingPlaceholder-ON75MLXx.js → ImageLoadingPlaceholder-DVvOvego.js} +1 -1
- package/dist/assets/{LoadingImage-CE1QZoPZ.js → LoadingImage-Dod2774c.js} +1 -1
- package/dist/assets/MarkdownRenderer-QZiD7To8.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-SH7kLqNr.js → MarkdownRendererImpl-16EYvj2e.js} +1 -1
- package/dist/assets/{MarkstreamRendererImpl-kWCEeJ84.js → MarkstreamRendererImpl-BF2CJ1Br.js} +1 -1
- package/dist/assets/{MobileAssistantSettingsPage-DkSgJLH5.js → MobileAssistantSettingsPage-DLB8ArSr.js} +1 -1
- package/dist/assets/{MobileAssistantTab-DlreBfpD.js → MobileAssistantTab-B7EWKsL-.js} +1 -1
- package/dist/assets/{MobileBtwPage-DUOHjbOb.js → MobileBtwPage-B2E9Mrjn.js} +1 -1
- package/dist/assets/{MobileChangesSurface-s-IkQzDj.js → MobileChangesSurface-gg1BLxbj.js} +1 -1
- package/dist/assets/{MobileChatScreen-RJicegCg.js → MobileChatScreen-dSGMP_cS.js} +1 -1
- package/dist/assets/{MobileDetailNavigation-B0Xb37E5.js → MobileDetailNavigation-HFdB1csw.js} +1 -1
- package/dist/assets/{MobileFilesSurface-CR7C7ern.js → MobileFilesSurface-CMbKHoLM.js} +2 -2
- package/dist/assets/{MobileHtmlNetworkBoundary-CG4kdWvo.js → MobileHtmlNetworkBoundary-sRFhJXff.js} +2 -2
- package/dist/assets/{MobileOverlayPanel-DLDL_a6S.js → MobileOverlayPanel-u_wq6uYl.js} +1 -1
- package/dist/assets/{MobileResizableSheet-BTsMGacb.js → MobileResizableSheet-D7mX3hic.js} +1 -1
- package/dist/assets/{MobileSettingsTab-DIqufnwp.js → MobileSettingsTab-CpqHKgQr.js} +1 -1
- package/dist/assets/{MobileShareBridge-BgAD2FqK.js → MobileShareBridge-DinsyF38.js} +2 -2
- package/dist/assets/{MobileSurface-D_9tJDu_.js → MobileSurface-D25CgpkA.js} +1 -1
- package/dist/assets/{MobileTabPageHeader-CPEY1sVL.js → MobileTabPageHeader-DZueoczl.js} +1 -1
- package/dist/assets/{ModelLogo-CoEkCK6k.js → ModelLogo-6rKdl3Oo.js} +1 -1
- package/dist/assets/{ModelSelector-CdSx-1l3.js → ModelSelector-_rBHp6p6.js} +1 -1
- package/dist/assets/{MultiRunWindow-08NX-bpU.js → MultiRunWindow-CpPHLNh6.js} +1 -1
- package/dist/assets/{OnboardingScreen-DW4PQZ48.js → OnboardingScreen-BecSplt9.js} +1 -1
- package/dist/assets/{OverlayScrollbar-D4U670-p.js → OverlayScrollbar-n7s4ry-S.js} +1 -1
- package/dist/assets/{PierreDiffViewer-CU2O_Gqy.js → PierreDiffViewer-DzM2fd3I.js} +1 -1
- package/dist/assets/ProviderLogo-DsIQuH14.js +1 -0
- package/dist/assets/{RemoteAssistantSessionCard-44WC5u9f.js → RemoteAssistantSessionCard-D9eJUpK-.js} +1 -1
- package/dist/assets/{RemoteDesktopPanel-BfdjP2Ug.js → RemoteDesktopPanel-BMaQHTOl.js} +1 -1
- package/dist/assets/{ScheduledTasksDialog-p2z6x4k7.js → ScheduledTasksDialog-BSxPw-np.js} +1 -1
- package/dist/assets/{ScrollableOverlay-B5Mx_IrY.js → ScrollableOverlay-D1BVukId.js} +1 -1
- package/dist/assets/{SettingsGroup-Bd0hGXKp.js → SettingsGroup-CKOh9w7t.js} +1 -1
- package/dist/assets/SettingsView-nMaFvRQ8.js +29 -0
- package/dist/assets/{SettingsWindow-DO2ySMZ8.js → SettingsWindow-DFw624ap.js} +1 -1
- package/dist/assets/{SetupTourDialog-Bm0scCiD.js → SetupTourDialog-BT8DhFGd.js} +1 -1
- package/dist/assets/{SyncActions-ktq_QbjA.js → SyncActions-bV7M8nD9.js} +1 -1
- package/dist/assets/{TerminalView-tXyVGRwg.js → TerminalView-DFQ5LQFM.js} +2 -2
- package/dist/assets/{TextSelectionMenu-CCsFVQha.js → TextSelectionMenu-DjIKcOvS.js} +1 -1
- package/dist/assets/{ToolOutputDialog-BX3Vi-k5.js → ToolOutputDialog-DManupRM.js} +1 -1
- package/dist/assets/{YuriLogo-1yVZFnVN.js → YuriLogo-CrpZasNm.js} +1 -1
- package/dist/assets/YuriWordmark-CqWOXOaU.js +1 -0
- package/dist/assets/{assistantMessagePreview-Bh2bPUPh.js → assistantMessagePreview-CL7aPQNb.js} +1 -1
- package/dist/assets/{assistantQueries-9sjQcHoO.js → assistantQueries-CSf1LSid.js} +1 -1
- package/dist/assets/{auto-read-context-JBvQYPyM.js → auto-read-context-D3F0UdYo.js} +1 -1
- package/dist/assets/{capgoAdapter-llXcw7v2.js → capgoAdapter-BQmoIY_V.js} +1 -1
- package/dist/assets/{card-YOYJB2Bf.js → card-DbO12aT2.js} +1 -1
- package/dist/assets/{chatUpwardIntent-Z6bMNkax.js → chatUpwardIntent-Bes8fOez.js} +1 -1
- package/dist/assets/{checkbox-ByuwPnuS.js → checkbox-BcPtk77d.js} +1 -1
- package/dist/assets/client-A12QacVZ.js +7 -0
- package/dist/assets/{collapsible-ByaFR6Oc.js → collapsible-BGE4f0JY.js} +1 -1
- package/dist/assets/connection-hint-DPOCdR6S.js +2 -0
- package/dist/assets/{context-menu-DKL8DaT6.js → context-menu-JFytjJX_.js} +1 -1
- package/dist/assets/desktopRelayRestore-DtGRUKC-.js +1 -0
- package/dist/assets/{diagram-DkVURCJZ.js → diagram-AxsHXJ5W.js} +1 -1
- package/dist/assets/{dialog-CQbyU8pU.js → dialog-CunzOg5u.js} +1 -1
- package/dist/assets/{dropdown-menu-W3Ii298F.js → dropdown-menu-BKaUC_RK.js} +1 -1
- package/dist/assets/es-D_Gfd9Fr.js +15 -0
- package/dist/assets/{fileMentionTouchSelection-CwTAmgan.js → fileMentionTouchSelection-Doo_ED67.js} +1 -1
- package/dist/assets/fr-DrnzV0-7.js +13 -0
- package/dist/assets/{gitApi-droqYZ9A.js → gitApi-CR5Ik-QG.js} +4 -4
- package/dist/assets/gitApiHttp-BLNjaxGv.js +3 -0
- package/dist/assets/{i18n-Sh2Qk9nD.js → i18n-Do5ekTxf.js} +1 -1
- package/dist/assets/{icons-CLvvQeAy.js → icons-DtK1ZGy1.js} +1 -1
- package/dist/assets/{input-DSdEvspA.js → input-Wb8eI0Ik.js} +1 -1
- package/dist/assets/{insertionBoundaries-Bf3EMWj8.js → insertionBoundaries-BPedMREl.js} +1 -1
- package/dist/assets/ja-DF-CGXwT.js +15 -0
- package/dist/assets/{kbd-hp3-RDSe.js → kbd-D07oDFdN.js} +1 -1
- package/dist/assets/ko-o89xwzdK.js +15 -0
- package/dist/assets/main-10EuKAcH.js +2 -0
- package/dist/assets/main-BbCr0xc0.js +169 -0
- package/dist/assets/main-C5ruSn_v.css +1 -0
- package/dist/assets/{markdownHeightCache-qX2f-vgi.js → markdownHeightCache-D08JEMYV.js} +1 -1
- package/dist/assets/{mcpQueries-DKxn0-Iq.js → mcpQueries-CT_XajCf.js} +1 -1
- package/dist/assets/miniChat-Oriel0PR.js +2 -0
- package/dist/assets/mobile-BXcWitYY.js +2 -0
- package/dist/assets/{mobileBackNavigation-Ce-CFzRu.js → mobileBackNavigation-CC9_oTr0.js} +1 -1
- package/dist/assets/{mobileConnections-BWToBinV.js → mobileConnections-BQXSBf4C.js} +2 -2
- package/dist/assets/{multirun-ByBZh9To.js → multirun-snw4oD5m.js} +1 -1
- package/dist/assets/{native-config-BDAV-Sn-.js → native-config-DBOpCdps.js} +1 -1
- package/dist/assets/{nativeComposerCover-DcWXqfZa.js → nativeComposerCover-CzrbG_Nf.js} +1 -1
- package/dist/assets/{navigation-DiqbYNCD.js → navigation-CkjjVHYQ.js} +1 -1
- package/dist/assets/{openRemoteProjectSession-DPb8H79n.js → openRemoteProjectSession-cchV6HLE.js} +1 -1
- package/dist/assets/{openSessionFromDeepLink-gJWOkm8w.js → openSessionFromDeepLink-Cm-ztlpD.js} +2 -2
- package/dist/assets/pl-Bu4HgXY8.js +15 -0
- package/dist/assets/{pluginPresentation-C8XRIFn5.js → pluginPresentation-CZayU9PL.js} +1 -1
- package/dist/assets/pt-BR-CPj1I-qb.js +15 -0
- package/dist/assets/pwa-Dp5Xs-u1.js +2 -0
- package/dist/assets/queue-abort-optimistic-Do-1nBis.js +1 -0
- package/dist/assets/{quota-jMPnmJTS.js → quota-DbpKrGcG.js} +1 -1
- package/dist/assets/{reference-history-BAPLZtrN.js → reference-history-DYFlcEu-.js} +1 -1
- package/dist/assets/remoteProjectQueries-Dq2vrCZs.js +1 -0
- package/dist/assets/{remoteSessionReference-B-5Nd45t.js → remoteSessionReference-2OJnH6aS.js} +1 -1
- package/dist/assets/{renderElectronMiniChatApp-DudyNNIU.js → renderElectronMiniChatApp-C1my_IMR.js} +2 -2
- package/dist/assets/{renderMobileApp-GIRJpszx.js → renderMobileApp-B5z9RNM8.js} +5 -5
- package/dist/assets/{runtimeConfig-CUiokUFx.js → runtimeConfig-rcHH0B0Q.js} +1 -1
- package/dist/assets/runtimeEndpointReset-D3BlEzsh.js +4 -0
- package/dist/assets/{select--wmAuAOB.js → select-BiGMjrlP.js} +1 -1
- package/dist/assets/{sessionLookup-on217pcK.js → sessionLookup-BpYYVMt5.js} +1 -1
- package/dist/assets/{sessionOwnership-BoiTRI2O.js → sessionOwnership--zFZQ_Pv.js} +1 -1
- package/dist/assets/shortcuts-DryfJT69.js +1 -0
- package/dist/assets/{sortable-tabs-strip-DvvltU2l.js → sortable-tabs-strip-4riKQQLu.js} +1 -1
- package/dist/assets/{speechSettingsQueries-Cqj3BM7O.js → speechSettingsQueries-BIyDqqzx.js} +1 -1
- package/dist/assets/src-7dXqzKwf.css +2 -0
- package/dist/assets/store-CR0ht2xS.js +17 -0
- package/dist/assets/{switch-ClpM-4qX.js → switch-B3-h0Mhz.js} +1 -1
- package/dist/assets/{terminalApi-wdwb9MVG.js → terminalApi-DpnhkNX3.js} +1 -1
- package/dist/assets/{textarea-Cpcy0ejH.js → textarea-C-_iWeiY.js} +1 -1
- package/dist/assets/{timeFormat-BaiPCZgf.js → timeFormat-hKdieKsY.js} +1 -1
- package/dist/assets/{tooltip-B9I9lmf0.js → tooltip-DDpHN7zw.js} +1 -1
- package/dist/assets/{truncated-path-BPcF8ywI.js → truncated-path-BNX6u2x_.js} +1 -1
- package/dist/assets/types-ClkyiHj-.js +2 -0
- package/dist/assets/ui-C8B5mZoA.js +13 -0
- package/dist/assets/uk-DT8-H_V5.js +15 -0
- package/dist/assets/useAppFontEffects-CU_bIPu5.js +7 -0
- package/dist/assets/{useDesktopWindowControlsLayout-BA4DI_W1.js → useDesktopWindowControlsLayout-zSKzBJ6Z.js} +1 -1
- package/dist/assets/{useDictation-83-qDgkn.js → useDictation-hDNKhzOz.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-DQMEyl5O.js → useEffectiveDirectory-DPQ_Lpkt.js} +1 -1
- package/dist/assets/{useGitStore-Dvd_1jyD.js → useGitStore-DAkV9L3y.js} +1 -1
- package/dist/assets/{useInlineCommentDraftStore-DWSuMEHF.js → useInlineCommentDraftStore-CK4BJaHk.js} +1 -1
- package/dist/assets/{useMcpConfigStore-7NoTGiyv.js → useMcpConfigStore-CawLA6lj.js} +1 -1
- package/dist/assets/{useMobileSwipeActions-7iuGbwWj.js → useMobileSwipeActions-BZJ68v8x.js} +1 -1
- package/dist/assets/{useMobileTranscriptSyncHint-B3NigAUx.js → useMobileTranscriptSyncHint-EfO9MDPX.js} +2 -2
- package/dist/assets/{useModelLists-C5fB7vLV.js → useModelLists-B8HN6eBH.js} +1 -1
- package/dist/assets/{useOpenCodeReadiness-B4IGjODK.js → useOpenCodeReadiness-C9PvijnZ.js} +1 -1
- package/dist/assets/usePluginsStore-BfjcgvtM.js +1 -0
- package/dist/assets/{useProjectGitActions-CiL6W09h.js → useProjectGitActions-yvPEth2A.js} +1 -1
- package/dist/assets/{useProjectGitStore-Bv65Bj_P.js → useProjectGitStore-D_q2csGs.js} +1 -1
- package/dist/assets/{useProjectRuntimeAPIs-CYT-3dZd.js → useProjectRuntimeAPIs-V33EYekW.js} +1 -1
- package/dist/assets/{useQuotaStore-CHxR2ZkD.js → useQuotaStore-CrOyolUQ.js} +1 -1
- package/dist/assets/{useSessionBtwStore-H4R5jYT2.js → useSessionBtwStore-DBhEqs0r.js} +2 -2
- package/dist/assets/{useStreamingTextThrottle-D9STYrQw.js → useStreamingTextThrottle-DfPMoxv4.js} +1 -1
- package/dist/assets/{useTerminalStore-C_QzSEgP.js → useTerminalStore-ax8bDQrp.js} +1 -1
- package/dist/assets/{worktreeManager-33ddwAq1.js → worktreeManager-CAjuvwiZ.js} +1 -1
- package/dist/assets/{worktreeSourceBranchPreference-Cp5jF1M9.js → worktreeSourceBranchPreference-Dumu-CMk.js} +1 -1
- package/dist/assets/zh-CN-C8IpuSKz.js +15 -0
- package/dist/assets/zh-TW-Iy2Vs5Bb.js +15 -0
- package/dist/index.html +12 -13
- package/dist/mini-chat.html +12 -13
- package/dist/mobile.html +2 -2
- package/package.json +1 -1
- package/server/lib/host-update/DOCUMENTATION.md +28 -16
- package/server/lib/host-update/cli-worker.js +71 -24
- package/server/lib/host-update/cli.js +9 -6
- package/server/lib/host-update/cli.test.js +28 -5
- package/server/lib/host-update/releases.js +33 -2
- package/server/lib/host-update/runtime.test.js +16 -1
- package/dist/assets/ArchivedSessionsDialog-Cja7TIg6.js +0 -1
- package/dist/assets/AssistantView-D7Ec_wbs.js +0 -1
- package/dist/assets/ChatContainer-DUJRc6kx.js +0 -65
- package/dist/assets/MarkdownRenderer-DL1l4dgn.js +0 -2
- package/dist/assets/ProviderLogo-C9ON1xS-.js +0 -1
- package/dist/assets/SettingsView-BbEPSEy3.js +0 -29
- package/dist/assets/YuriWordmark-CqkcfAJl.js +0 -1
- package/dist/assets/client-CmtAKi5B.js +0 -7
- package/dist/assets/connection-hint-DugoAaao.js +0 -2
- package/dist/assets/desktopHosts-COI-czjF.js +0 -1
- package/dist/assets/desktopRelayRestore-BEPNc7qb.js +0 -1
- package/dist/assets/es-C1spVk4O.js +0 -15
- package/dist/assets/fr-yyP7Hlty.js +0 -13
- package/dist/assets/gitApiHttp-ZjM4HkSo.js +0 -3
- package/dist/assets/ja-ChftrfCh.js +0 -15
- package/dist/assets/ko-BrLgX_6B.js +0 -15
- package/dist/assets/main-ClNDsxXD.js +0 -2
- package/dist/assets/main-D71N_bhn.js +0 -169
- package/dist/assets/main-qSeeJRW1.css +0 -1
- package/dist/assets/miniChat-DuWGMHPI.js +0 -2
- package/dist/assets/mobile-CjbFG_ps.js +0 -2
- package/dist/assets/pl-DlKDQDhl.js +0 -15
- package/dist/assets/pt-BR-BldJPFQ5.js +0 -15
- package/dist/assets/pwa-CLwERclR.js +0 -2
- package/dist/assets/queue-abort-optimistic-BET9wo1a.js +0 -1
- package/dist/assets/remoteProjectQueries-BQzoY_Y9.js +0 -1
- package/dist/assets/runtimeEndpointReset-DXfdUC1r.js +0 -4
- package/dist/assets/shortcuts-D3O9f1E5.js +0 -1
- package/dist/assets/src-B7qham90.css +0 -2
- package/dist/assets/store-BGuutgkJ.js +0 -17
- package/dist/assets/types-DjBXLnbS.js +0 -2
- package/dist/assets/ui-BqoDhEiW.js +0 -13
- package/dist/assets/uk-Cw2L_unr.js +0 -15
- package/dist/assets/useAppFontEffects-CaZbgo4R.js +0 -7
- package/dist/assets/usePluginsStore-D2P-bQeH.js +0 -1
- package/dist/assets/zh-CN-BQXjCmNe.js +0 -15
- package/dist/assets/zh-TW-Y0lErpEY.js +0 -15
package/dist/index.html
CHANGED
|
@@ -571,7 +571,7 @@
|
|
|
571
571
|
opacity: 0.72;
|
|
572
572
|
}
|
|
573
573
|
</style>
|
|
574
|
-
<script type="module" crossorigin src="/assets/main-
|
|
574
|
+
<script type="module" crossorigin src="/assets/main-10EuKAcH.js"></script>
|
|
575
575
|
<link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-P2Xu9kJm.js">
|
|
576
576
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
577
577
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
@@ -583,15 +583,13 @@
|
|
|
583
583
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
584
584
|
<link rel="modulepreload" crossorigin href="/assets/pathNormalization-ewtPqJWn.js">
|
|
585
585
|
<link rel="modulepreload" crossorigin href="/assets/platform-B2ylz14u.js">
|
|
586
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-COI-czjF.js">
|
|
587
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-BEPNc7qb.js">
|
|
588
586
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-wXsskyKm.js">
|
|
589
587
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-CTekDqaS.js">
|
|
588
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-effect-X1Hqc7ba.js">
|
|
589
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-BM2r1f0o.js">
|
|
590
590
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-migration-Bhz6UOBJ.js">
|
|
591
591
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-bootstrap-D4BW3w-M.js">
|
|
592
592
|
<link rel="modulepreload" crossorigin href="/assets/safeStorage-DTOhKN0V.js">
|
|
593
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-effect-X1Hqc7ba.js">
|
|
594
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-BM2r1f0o.js">
|
|
595
593
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BkccXcWz.js">
|
|
596
594
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BSjXNgF_.js">
|
|
597
595
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-DIb_ItL-.js">
|
|
@@ -603,20 +601,21 @@
|
|
|
603
601
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-store-BVRgEtI-.js">
|
|
604
602
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-BGZ4tGr5.js">
|
|
605
603
|
<link rel="modulepreload" crossorigin href="/assets/prompt-attachment-upload-BzYqZdzd.js">
|
|
606
|
-
<link rel="modulepreload" crossorigin href="/assets/client-
|
|
604
|
+
<link rel="modulepreload" crossorigin href="/assets/client-A12QacVZ.js">
|
|
605
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-DtGRUKC-.js">
|
|
607
606
|
<link rel="modulepreload" crossorigin href="/assets/useMobileHtmlPreviewStore-BYunNOBo.js">
|
|
608
607
|
<link rel="modulepreload" crossorigin href="/assets/useUIStore-68ZPpgYA.js">
|
|
609
608
|
<link rel="modulepreload" crossorigin href="/assets/uuid-D-SDZijH.js">
|
|
610
|
-
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-
|
|
611
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
609
|
+
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-BLNjaxGv.js">
|
|
610
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-DpnhkNX3.js">
|
|
612
611
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-CaeLqIEY.js">
|
|
613
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
614
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
615
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
612
|
+
<link rel="modulepreload" crossorigin href="/assets/types-ClkyiHj-.js">
|
|
613
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-BQmoIY_V.js">
|
|
614
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-DBOpCdps.js">
|
|
616
615
|
<link rel="modulepreload" crossorigin href="/assets/runtime-ead7P81A.js">
|
|
617
616
|
<link rel="modulepreload" crossorigin href="/assets/bootstrap-eLlfzqAI.js">
|
|
618
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
619
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
617
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-rcHH0B0Q.js">
|
|
618
|
+
<link rel="stylesheet" crossorigin href="/assets/src-7dXqzKwf.css">
|
|
620
619
|
</head>
|
|
621
620
|
<body class="h-full bg-background text-foreground">
|
|
622
621
|
<!-- Keep the startup layer outside #root. React replaces every child of
|
package/dist/mini-chat.html
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
.dark #initial-loading img { filter: invert(1); }
|
|
78
78
|
</style>
|
|
79
79
|
|
|
80
|
-
<script type="module" crossorigin src="/assets/miniChat-
|
|
80
|
+
<script type="module" crossorigin src="/assets/miniChat-Oriel0PR.js"></script>
|
|
81
81
|
<link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-P2Xu9kJm.js">
|
|
82
82
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
@@ -89,15 +89,13 @@
|
|
|
89
89
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
90
90
|
<link rel="modulepreload" crossorigin href="/assets/pathNormalization-ewtPqJWn.js">
|
|
91
91
|
<link rel="modulepreload" crossorigin href="/assets/platform-B2ylz14u.js">
|
|
92
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-COI-czjF.js">
|
|
93
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-BEPNc7qb.js">
|
|
94
92
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-wXsskyKm.js">
|
|
95
93
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-CTekDqaS.js">
|
|
94
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-effect-X1Hqc7ba.js">
|
|
95
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-BM2r1f0o.js">
|
|
96
96
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-migration-Bhz6UOBJ.js">
|
|
97
97
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-bootstrap-D4BW3w-M.js">
|
|
98
98
|
<link rel="modulepreload" crossorigin href="/assets/safeStorage-DTOhKN0V.js">
|
|
99
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-effect-X1Hqc7ba.js">
|
|
100
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-BM2r1f0o.js">
|
|
101
99
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BkccXcWz.js">
|
|
102
100
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BSjXNgF_.js">
|
|
103
101
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-DIb_ItL-.js">
|
|
@@ -109,20 +107,21 @@
|
|
|
109
107
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-store-BVRgEtI-.js">
|
|
110
108
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-BGZ4tGr5.js">
|
|
111
109
|
<link rel="modulepreload" crossorigin href="/assets/prompt-attachment-upload-BzYqZdzd.js">
|
|
112
|
-
<link rel="modulepreload" crossorigin href="/assets/client-
|
|
110
|
+
<link rel="modulepreload" crossorigin href="/assets/client-A12QacVZ.js">
|
|
111
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-DtGRUKC-.js">
|
|
113
112
|
<link rel="modulepreload" crossorigin href="/assets/useMobileHtmlPreviewStore-BYunNOBo.js">
|
|
114
113
|
<link rel="modulepreload" crossorigin href="/assets/useUIStore-68ZPpgYA.js">
|
|
115
114
|
<link rel="modulepreload" crossorigin href="/assets/uuid-D-SDZijH.js">
|
|
116
|
-
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-
|
|
117
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
115
|
+
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-BLNjaxGv.js">
|
|
116
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-DpnhkNX3.js">
|
|
118
117
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-CaeLqIEY.js">
|
|
119
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
120
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
121
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
118
|
+
<link rel="modulepreload" crossorigin href="/assets/types-ClkyiHj-.js">
|
|
119
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-BQmoIY_V.js">
|
|
120
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-DBOpCdps.js">
|
|
122
121
|
<link rel="modulepreload" crossorigin href="/assets/runtime-ead7P81A.js">
|
|
123
122
|
<link rel="modulepreload" crossorigin href="/assets/bootstrap-eLlfzqAI.js">
|
|
124
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
125
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
123
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-rcHH0B0Q.js">
|
|
124
|
+
<link rel="stylesheet" crossorigin href="/assets/src-7dXqzKwf.css">
|
|
126
125
|
</head>
|
|
127
126
|
<body class="h-full bg-background text-foreground">
|
|
128
127
|
<div id="root" class="h-full">
|
package/dist/mobile.html
CHANGED
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
</script>
|
|
65
65
|
|
|
66
66
|
<style>.dark #mobile-startup-logo img { filter: invert(1); }</style>
|
|
67
|
-
<script type="module" crossorigin src="/assets/mobile-
|
|
67
|
+
<script type="module" crossorigin src="/assets/mobile-BXcWitYY.js"></script>
|
|
68
68
|
<link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-P2Xu9kJm.js">
|
|
69
69
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
70
70
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
71
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
71
|
+
<link rel="stylesheet" crossorigin href="/assets/src-7dXqzKwf.css">
|
|
72
72
|
</head>
|
|
73
73
|
<body class="h-full bg-background text-foreground">
|
|
74
74
|
<div id="root" class="h-full">
|
package/package.json
CHANGED
|
@@ -46,15 +46,19 @@ appearing successful. Package installation failure is not package rollback.
|
|
|
46
46
|
session, refuses URL-auth tokens, unauthenticated loopback and cross-site cookie
|
|
47
47
|
requests. All paired device kinds can update their Host. This is the same
|
|
48
48
|
authorization over direct HTTP and Relay; Relay grants no privilege.
|
|
49
|
-
- `releases.js` selects installable exact
|
|
50
|
-
tags with beta sequence ordering.
|
|
51
|
-
|
|
49
|
+
- `releases.js` selects installable exact versions from the npm `latest` / `beta`
|
|
50
|
+
tags with beta sequence ordering. A self-contained host additionally binds the
|
|
51
|
+
plan to that version's `yuri-<version>-linux-<arch>.tar.gz.sha256` release
|
|
52
|
+
asset; a missing asset is a discovery failure, not an npm fallback. GitHub tag
|
|
53
|
+
release notes are optional; a failed registry lookup is not optional.
|
|
52
54
|
- `cli.js` launches a hidden detached Node helper and awaits its preflight before
|
|
53
55
|
gracefully stopping the Host. Synchronous package-manager ownership probes run
|
|
54
56
|
in that helper, never on an Electron/server main thread.
|
|
55
|
-
- `cli-worker.js` verifies the
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
- `cli-worker.js` verifies the installation (npm global or installer-managed
|
|
58
|
+
self-contained release) and registered daemon, locks the
|
|
59
|
+
stable installation entry, revalidates registry integrity or the archive
|
|
60
|
+
checksum, waits for the old
|
|
61
|
+
process to exit, installs the exact version, restarts through the stable CLI
|
|
58
62
|
entry and verifies `/health` version/identity. Runtime, bind host, port,
|
|
59
63
|
API-only mode and password environment are preserved. Passwords never enter
|
|
60
64
|
task state or helper argv. Install failure attempts to restart the surviving
|
|
@@ -68,18 +72,26 @@ appearing successful. Package installation failure is not package rollback.
|
|
|
68
72
|
|
|
69
73
|
## Deliberate limitations
|
|
70
74
|
|
|
71
|
-
Automatic CLI installation
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
Automatic CLI installation requires one registered, writable POSIX daemon on
|
|
76
|
+
either distribution. An npm global installation is updated by its owning package
|
|
77
|
+
manager. A self-contained Linux release is updated only when it was placed by
|
|
78
|
+
`install-portable.sh` (`<install-dir>/versions/<release>` with a `current`
|
|
79
|
+
symlink): the helper revalidates the archive's published SHA-256 against the
|
|
80
|
+
plan, runs the bundled `install.sh --no-link` (checksum, preflight, atomic
|
|
81
|
+
`current` switch, old release retained), then restarts through
|
|
82
|
+
`current/yuri` and verifies `/health`. A failed download/checksum/preflight
|
|
83
|
+
leaves `current` untouched. It never falls back to an npm copy. Manually
|
|
84
|
+
extracted archives report `portable_installation_requires_release`.
|
|
85
|
+
Containers are not excluded: the same daemon/writable/single-instance checks
|
|
86
|
+
decide, and an installation on a persistent volume survives. Development
|
|
87
|
+
checkouts, Windows CLI installations, systemd/PM2-managed launches,
|
|
88
|
+
foreground launches and concurrent registered CLI daemons report unsupported
|
|
89
|
+
or fail preflight without stopping the Host. Use their installation or service
|
|
90
|
+
manager instead. Other data scopes sharing one global installation
|
|
76
91
|
must be administratively drained; the installation lock prevents competing
|
|
77
92
|
remote helpers but does not coordinate arbitrary external package managers.
|
|
78
|
-
|
|
79
|
-
|
|
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.
|
|
93
|
+
`yuri update` on a self-contained release still refuses and points to the
|
|
94
|
+
bundled installer; only the Host-owned update flow above switches releases.
|
|
83
95
|
A helper killed before its `finally` cleanup leaves an installation lock in the
|
|
84
96
|
user cache; an operator must verify no helper remains before removing that lock.
|
|
85
97
|
Workers deliberately do not race to reap presumed stale locks.
|
|
@@ -6,7 +6,8 @@ import { spawn } from 'node:child_process';
|
|
|
6
6
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
7
7
|
import { detectPackageManagerDetails } from '../package-manager.js';
|
|
8
8
|
import { writeUpdateState } from './runtime.js';
|
|
9
|
-
import { releaseParts } from './releases.js';
|
|
9
|
+
import { fetchPortableChecksum, releaseParts } from './releases.js';
|
|
10
|
+
import { readPortableInstallation } from '../portable-installation.js';
|
|
10
11
|
|
|
11
12
|
function run(command, args, options = {}) {
|
|
12
13
|
return new Promise((resolve, reject) => {
|
|
@@ -19,13 +20,7 @@ function run(command, args, options = {}) {
|
|
|
19
20
|
const alive = (pid) => { try { process.kill(pid, 0); return true; } catch (error) { return error.code !== 'ESRCH'; } };
|
|
20
21
|
const send = (message) => new Promise((resolve, reject) => process.send(message, (error) => error ? reject(error) : resolve()));
|
|
21
22
|
|
|
22
|
-
function
|
|
23
|
-
if (!Number.isInteger(config.port) || !Number.isInteger(config.pid) || !releaseParts(config.release?.version ?? '0.0.0')) throw new Error('Invalid update configuration');
|
|
24
|
-
const details = detectPackageManagerDetails();
|
|
25
|
-
if (!['install-path-owner', 'global-root-owner', 'cached'].includes(details.reason)
|
|
26
|
-
|| fs.realpathSync(details.packagePath) !== fs.realpathSync(config.packageRoot)) throw new Error('Package manager does not own this installation');
|
|
27
|
-
const installationPath = details.globalNodeModulesRoot && path.join(details.globalNodeModulesRoot, '@yuriai', 'web');
|
|
28
|
-
if (!installationPath || fs.realpathSync(installationPath) !== fs.realpathSync(config.packageRoot)) throw new Error('Cannot resolve the stable global package entry');
|
|
23
|
+
function registeredDaemon(config) {
|
|
29
24
|
const runDir = path.join(config.dataDir, 'run');
|
|
30
25
|
const instance = JSON.parse(fs.readFileSync(path.join(runDir, `yuri-${config.port}.json`), 'utf8'));
|
|
31
26
|
const pid = Number(fs.readFileSync(path.join(runDir, `yuri-${config.port}.pid`), 'utf8'));
|
|
@@ -35,8 +30,64 @@ function prepare(config) {
|
|
|
35
30
|
const otherPid = Number(fs.readFileSync(path.join(runDir, file), 'utf8'));
|
|
36
31
|
if (Number.isInteger(otherPid) && otherPid > 0 && alive(otherPid)) throw new Error('Stop other CLI instances before updating this installation');
|
|
37
32
|
}
|
|
33
|
+
return instance;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function prepareNpm(config) {
|
|
37
|
+
const details = detectPackageManagerDetails();
|
|
38
|
+
if (!['install-path-owner', 'global-root-owner', 'cached'].includes(details.reason)
|
|
39
|
+
|| fs.realpathSync(details.packagePath) !== fs.realpathSync(config.packageRoot)) throw new Error('Package manager does not own this installation');
|
|
40
|
+
const installationPath = details.globalNodeModulesRoot && path.join(details.globalNodeModulesRoot, '@yuriai', 'web');
|
|
41
|
+
if (!installationPath || fs.realpathSync(installationPath) !== fs.realpathSync(config.packageRoot)) throw new Error('Cannot resolve the stable global package entry');
|
|
42
|
+
const instance = registeredDaemon(config);
|
|
38
43
|
fs.accessSync(config.packageRoot, fs.constants.W_OK);
|
|
39
|
-
return { details, instance, installationPath };
|
|
44
|
+
return { kind: 'npm', details, instance, installationPath };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// An installer-managed layout is <install-dir>/versions/<release>/lib with a
|
|
48
|
+
// <install-dir>/current symlink; manual extractions have no stable entry.
|
|
49
|
+
function preparePortable(config) {
|
|
50
|
+
const portable = readPortableInstallation(config.packageRoot);
|
|
51
|
+
if (!portable) throw new Error('Not a self-contained installation');
|
|
52
|
+
const installationPath = path.resolve(portable.root, '../..');
|
|
53
|
+
if (path.basename(path.dirname(portable.root)) !== 'versions'
|
|
54
|
+
|| fs.realpathSync(path.join(installationPath, 'current')) !== fs.realpathSync(portable.root)) throw new Error('Self-contained installation is not the active installer-managed release');
|
|
55
|
+
const instance = registeredDaemon(config);
|
|
56
|
+
fs.accessSync(installationPath, fs.constants.W_OK);
|
|
57
|
+
return { kind: 'portable', instance, installationPath, root: portable.root, launcher: path.join(installationPath, 'current', 'yuri') };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function prepare(config) {
|
|
61
|
+
if (!Number.isInteger(config.port) || !Number.isInteger(config.pid) || !releaseParts(config.release?.version ?? '0.0.0')) throw new Error('Invalid update configuration');
|
|
62
|
+
return config.installation === 'portable' ? preparePortable(config) : prepareNpm(config);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function assertReleaseIntegrity(config, prepared) {
|
|
66
|
+
if (prepared.kind === 'portable') {
|
|
67
|
+
if (await fetchPortableChecksum(config.release.version) !== config.release.integrity) throw new Error('Package integrity changed');
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const metadataResponse = await fetch(`https://registry.npmjs.org/@yuriai/web/${config.release.version}`, { signal: AbortSignal.timeout(10000) });
|
|
71
|
+
if (!metadataResponse.ok || (await metadataResponse.json()).dist?.integrity !== config.release.integrity) throw new Error('Package integrity changed');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
async function installRelease(config, prepared) {
|
|
75
|
+
const timeout = 10 * 60_000;
|
|
76
|
+
if (prepared.kind === 'portable') {
|
|
77
|
+
// The bundled installer verifies the checksum and preflight, then atomically
|
|
78
|
+
// switches `current`; a failed install leaves the running release intact.
|
|
79
|
+
await run('bash', [path.join(prepared.root, 'install.sh'), '--version', config.release.version, '--install-dir', prepared.installationPath, '--no-link'], { timeout });
|
|
80
|
+
const installed = JSON.parse(fs.readFileSync(path.join(prepared.installationPath, 'current', 'portable.json'), 'utf8'));
|
|
81
|
+
if (installed.version !== config.release.version) throw new Error('Installed version mismatch');
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const { details, installationPath } = prepared;
|
|
85
|
+
const target = `@yuriai/web@${config.release.version}`;
|
|
86
|
+
const args = details.packageManager === 'yarn' ? ['global', 'add', target]
|
|
87
|
+
: details.packageManager === 'npm' ? ['install', '-g', target, '--force'] : ['add', '-g', target];
|
|
88
|
+
await run(details.packageManagerCommand, args, { timeout });
|
|
89
|
+
const installed = JSON.parse(fs.readFileSync(path.join(installationPath, 'package.json'), 'utf8'));
|
|
90
|
+
if (installed.version !== config.release.version) throw new Error('Installed version mismatch');
|
|
40
91
|
}
|
|
41
92
|
|
|
42
93
|
function acquireLock(packageRoot) {
|
|
@@ -68,11 +119,11 @@ process.on('message', (message) => {
|
|
|
68
119
|
let accepted = false;
|
|
69
120
|
try {
|
|
70
121
|
const config = message;
|
|
71
|
-
const
|
|
122
|
+
const prepared = prepare(config);
|
|
123
|
+
const { instance, installationPath } = prepared;
|
|
72
124
|
if (config.mode === 'probe') { await send({ ready: true }); return; }
|
|
73
125
|
releaseLock = acquireLock(installationPath);
|
|
74
|
-
|
|
75
|
-
if (!metadataResponse.ok || (await metadataResponse.json()).dist?.integrity !== config.release.integrity) throw new Error('Package integrity changed');
|
|
126
|
+
await assertReleaseIntegrity(config, prepared);
|
|
76
127
|
const state = config.state;
|
|
77
128
|
const report = async (patch) => {
|
|
78
129
|
const persisted = JSON.parse(fs.readFileSync(config.stateFile, 'utf8'));
|
|
@@ -89,21 +140,17 @@ process.on('message', (message) => {
|
|
|
89
140
|
await delay(100);
|
|
90
141
|
}
|
|
91
142
|
await report({ status: 'installing' });
|
|
92
|
-
const target = `@yuriai/web@${config.release.version}`;
|
|
93
|
-
const args = details.packageManager === 'yarn' ? ['global', 'add', target]
|
|
94
|
-
: details.packageManager === 'npm' ? ['install', '-g', target, '--force'] : ['add', '-g', target];
|
|
95
143
|
let installFailed = false;
|
|
96
|
-
try {
|
|
97
|
-
await run(details.packageManagerCommand, args, { timeout: 10 * 60_000 });
|
|
98
|
-
const installed = JSON.parse(fs.readFileSync(path.join(installationPath, 'package.json'), 'utf8'));
|
|
99
|
-
if (installed.version !== config.release.version) throw new Error('Installed version mismatch');
|
|
100
|
-
} catch { installFailed = true; }
|
|
144
|
+
try { await installRelease(config, prepared); } catch { installFailed = true; }
|
|
101
145
|
await report({ status: installFailed ? 'failed' : 'restarting', error: installFailed ? 'cli_install_failed' : null });
|
|
102
146
|
// Password stays in the inherited environment, never argv or task state.
|
|
103
|
-
const
|
|
104
|
-
if (instance.host)
|
|
105
|
-
if (instance.apiOnly)
|
|
106
|
-
|
|
147
|
+
const serveArgs = ['serve', '--port', String(config.port), '--json'];
|
|
148
|
+
if (instance.host) serveArgs.push('--host', instance.host);
|
|
149
|
+
if (instance.apiOnly) serveArgs.push('--api-only');
|
|
150
|
+
const [restartCommand, restartArgs] = prepared.kind === 'portable'
|
|
151
|
+
? [prepared.launcher, serveArgs]
|
|
152
|
+
: [process.execPath, [path.join(installationPath, 'bin', 'cli.js'), ...serveArgs]];
|
|
153
|
+
await run(restartCommand, restartArgs, { env: { ...process.env, ...(instance.uiPassword ? { YURI_UI_PASSWORD: instance.uiPassword } : {}) }, timeout: 60000 });
|
|
107
154
|
if (!installFailed) {
|
|
108
155
|
const host = instance.host && !['0.0.0.0', '::'].includes(instance.host) ? instance.host : '127.0.0.1';
|
|
109
156
|
const response = await fetch(`http://${host.includes(':') ? `[${host}]` : host}:${config.port}/health`, { signal: AbortSignal.timeout(10000) });
|
|
@@ -2,7 +2,7 @@ import { fork } from 'node:child_process';
|
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import { existsSync } from 'node:fs';
|
|
4
4
|
import path from 'node:path';
|
|
5
|
-
import { discoverCliRelease } from './releases.js';
|
|
5
|
+
import { discoverCliRelease, discoverPortableRelease } from './releases.js';
|
|
6
6
|
|
|
7
7
|
const workerFile = fileURLToPath(new URL('./cli-worker.js', import.meta.url));
|
|
8
8
|
|
|
@@ -24,14 +24,17 @@ function startWorker(message, detached = false) {
|
|
|
24
24
|
|
|
25
25
|
export function createCliUpdateAdapter({ packageRoot, dataDir, getPort, shutdown, currentVersion, env = process.env }) {
|
|
26
26
|
const portable = existsSync(path.join(packageRoot, '..', 'portable.json'));
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
27
|
+
// Only the installer's versions/<release> layout has a stable `current` entry to switch.
|
|
28
|
+
const portableManaged = portable && path.basename(path.resolve(packageRoot, '../..')) === 'versions' && process.platform === 'linux';
|
|
29
|
+
const serviceManaged = env.INVOCATION_ID || env.PM2_HOME;
|
|
30
|
+
const unsupported = portable ? !portableManaged || serviceManaged
|
|
31
|
+
: process.platform === 'win32' || !packageRoot.replaceAll('\\', '/').includes('/node_modules/') || serviceManaged;
|
|
32
|
+
const configuration = () => ({ packageRoot, dataDir, port: getPort(), pid: process.pid, installation: portable ? 'portable' : 'npm' });
|
|
30
33
|
let checkedAt = 0;
|
|
31
34
|
const adapter = {
|
|
32
35
|
host: 'cli', external: true, supported: !unsupported,
|
|
33
|
-
reason: portable ? 'portable_installation_requires_release' : unsupported ? 'managed_or_development_installation' : null,
|
|
34
|
-
inspect: (channel) => discoverCliRelease(channel, currentVersion),
|
|
36
|
+
reason: portable && !portableManaged ? 'portable_installation_requires_release' : unsupported ? 'managed_or_development_installation' : null,
|
|
37
|
+
inspect: (channel) => portable ? discoverPortableRelease(channel, currentVersion) : discoverCliRelease(channel, currentVersion),
|
|
35
38
|
async refreshSupport() {
|
|
36
39
|
if (unsupported || Date.now() - checkedAt < 60_000) return;
|
|
37
40
|
try { await adapter.assertReady(); adapter.supported = true; adapter.reason = null; }
|
|
@@ -2,13 +2,16 @@ 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: [], portable: false }));
|
|
5
|
+
const fixture = vi.hoisted(() => ({ fork: vi.fn(), inspect: vi.fn(), portableInspect: vi.fn(), reject: false, children: [], portable: false }));
|
|
6
6
|
vi.mock('node:child_process', () => ({ fork: (...args) => fixture.fork(...args) }));
|
|
7
7
|
vi.mock('node:fs', () => ({ existsSync: (file) => fixture.portable && file.endsWith('/portable.json') }));
|
|
8
|
-
vi.mock('./releases.js', () => ({
|
|
8
|
+
vi.mock('./releases.js', () => ({
|
|
9
|
+
discoverCliRelease: (...args) => fixture.inspect(...args),
|
|
10
|
+
discoverPortableRelease: (...args) => fixture.portableInspect(...args),
|
|
11
|
+
}));
|
|
9
12
|
|
|
10
13
|
beforeEach(() => {
|
|
11
|
-
fixture.reject = false; fixture.children = []; fixture.inspect.mockReset(); fixture.fork.mockReset();
|
|
14
|
+
fixture.reject = false; fixture.children = []; fixture.inspect.mockReset(); fixture.portableInspect.mockReset(); fixture.fork.mockReset();
|
|
12
15
|
fixture.portable = false;
|
|
13
16
|
fixture.fork.mockImplementation(() => {
|
|
14
17
|
const child = Object.assign(new EventEmitter(), {
|
|
@@ -59,10 +62,10 @@ it('advertises development and externally supervised installations as unsupporte
|
|
|
59
62
|
expect(fixture.fork).not.toHaveBeenCalled();
|
|
60
63
|
});
|
|
61
64
|
|
|
62
|
-
it('advertises
|
|
65
|
+
it('advertises manual or service-managed self-contained installs as unsupported without probes or shutdown', async () => {
|
|
63
66
|
fixture.portable = true;
|
|
64
67
|
const shutdown = vi.fn();
|
|
65
|
-
const host =
|
|
68
|
+
const host = createCliUpdateAdapter({ packageRoot: '/extracted/yuri/lib', dataDir: '/data', getPort: () => 3000, currentVersion: '2.0.0', shutdown, env: {} });
|
|
66
69
|
expect(host.supported).toBe(false);
|
|
67
70
|
expect(host.reason).toBe('portable_installation_requires_release');
|
|
68
71
|
await host.refreshSupport();
|
|
@@ -70,3 +73,23 @@ it('advertises portable installs as unsupported without package-manager probes o
|
|
|
70
73
|
expect(fixture.fork).not.toHaveBeenCalled();
|
|
71
74
|
expect(shutdown).not.toHaveBeenCalled();
|
|
72
75
|
});
|
|
76
|
+
|
|
77
|
+
it('updates installer-managed self-contained releases through the release archive, not npm', async () => {
|
|
78
|
+
fixture.portable = true;
|
|
79
|
+
const host = createCliUpdateAdapter({ packageRoot: '/share/yuri/versions/2.0.0-linux-x64/lib', dataDir: '/data', getPort: () => 3000, currentVersion: '2.0.0', shutdown: vi.fn(), env: {} });
|
|
80
|
+
expect(host.supported).toBe(process.platform === 'linux');
|
|
81
|
+
await host.inspect('stable');
|
|
82
|
+
expect(fixture.portableInspect).toHaveBeenCalledWith('stable', '2.0.0');
|
|
83
|
+
expect(fixture.inspect).not.toHaveBeenCalled();
|
|
84
|
+
if (process.platform !== 'linux') return;
|
|
85
|
+
await host.assertReady();
|
|
86
|
+
expect(fixture.children[0].send).toHaveBeenCalledWith(expect.objectContaining({ mode: 'probe', installation: 'portable' }));
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it('does not treat a container as unsupported, but still honors service managers', () => {
|
|
90
|
+
const container = createCliUpdateAdapter({ packageRoot: '/installation/node_modules/@yuriai/web', dataDir: '/data', env: { container: 'docker', CONTAINER: '1' } });
|
|
91
|
+
expect(container.supported).toBe(process.platform !== 'win32');
|
|
92
|
+
const managed = createCliUpdateAdapter({ packageRoot: '/installation/node_modules/@yuriai/web', dataDir: '/data', env: { INVOCATION_ID: 'unit' } });
|
|
93
|
+
expect(managed.supported).toBe(false);
|
|
94
|
+
expect(managed.reason).toBe('managed_or_development_installation');
|
|
95
|
+
});
|
|
@@ -15,7 +15,21 @@ export function compareVersions(a, b) {
|
|
|
15
15
|
return 0;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const releaseBase = () => process.env.YURI_RELEASE_BASE_URL || 'https://github.com/yee94/yuri/releases';
|
|
19
|
+
|
|
20
|
+
/** Self-contained Linux archives are published beside the npm package under the same tag. */
|
|
21
|
+
export async function fetchPortableChecksum(version, arch = process.arch, fetchImpl = fetch) {
|
|
22
|
+
const base = releaseBase();
|
|
23
|
+
if (!base.startsWith('https://')) throw new Error('Release downloads require HTTPS');
|
|
24
|
+
const name = `yuri-${version}-linux-${arch}.tar.gz`;
|
|
25
|
+
const response = await fetchImpl(`${base}/download/v${version}/${name}.sha256`, { signal: AbortSignal.timeout(10000) });
|
|
26
|
+
if (!response.ok) throw new Error('Unable to read the self-contained release checksum');
|
|
27
|
+
const digest = (await response.text()).trim().split(/\s+/)[0];
|
|
28
|
+
if (!/^[0-9a-f]{64}$/.test(digest)) throw new Error('Invalid release checksum');
|
|
29
|
+
return digest;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async function selectRegistryRelease(channel, currentVersion, fetchImpl) {
|
|
19
33
|
const response = await fetchImpl('https://registry.npmjs.org/@yuriai/web', {
|
|
20
34
|
headers: { Accept: 'application/json' }, signal: AbortSignal.timeout(10000),
|
|
21
35
|
});
|
|
@@ -30,6 +44,23 @@ export async function discoverCliRelease(channel, currentVersion, fetchImpl = fe
|
|
|
30
44
|
if (!version || metadata?.version !== version || !metadata.dist?.integrity) throw new Error('No installable release in this channel');
|
|
31
45
|
const rollback = channel === 'stable' && currentVersion.includes('-') && compareVersions(version, currentVersion) < 0;
|
|
32
46
|
if (!rollback && compareVersions(version, currentVersion) <= 0) return null;
|
|
47
|
+
return { version, metadata, rollback };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export async function discoverPortableRelease(channel, currentVersion, fetchImpl = fetch, arch = process.arch) {
|
|
51
|
+
const selected = await selectRegistryRelease(channel, currentVersion, fetchImpl);
|
|
52
|
+
if (!selected) return null;
|
|
53
|
+
const integrity = await fetchPortableChecksum(selected.version, arch, fetchImpl);
|
|
54
|
+
return releaseWithNotes(selected.version, selected.rollback, integrity, fetchImpl);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export async function discoverCliRelease(channel, currentVersion, fetchImpl = fetch) {
|
|
58
|
+
const selected = await selectRegistryRelease(channel, currentVersion, fetchImpl);
|
|
59
|
+
if (!selected) return null;
|
|
60
|
+
return releaseWithNotes(selected.version, selected.rollback, selected.metadata.dist.integrity, fetchImpl);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function releaseWithNotes(version, rollback, integrity, fetchImpl) {
|
|
33
64
|
let releaseNotes = null;
|
|
34
65
|
try {
|
|
35
66
|
const notes = await fetchImpl(`https://api.github.com/repos/yee94/yuri/releases/tags/v${version}`, {
|
|
@@ -40,5 +71,5 @@ export async function discoverCliRelease(channel, currentVersion, fetchImpl = fe
|
|
|
40
71
|
releaseNotes = typeof body === 'string' ? body : null;
|
|
41
72
|
}
|
|
42
73
|
} catch { /* Release notes are optional; registry failure is not. */ }
|
|
43
|
-
return { version, kind: 'cli-package', releaseNotes, rollback, integrity
|
|
74
|
+
return { version, kind: 'cli-package', releaseNotes, rollback, integrity, restartRequired: true };
|
|
44
75
|
}
|
|
@@ -3,7 +3,7 @@ import { mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
|
3
3
|
import { tmpdir } from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { createHostUpdateRuntime, writeUpdateState } from './runtime.js';
|
|
6
|
-
import { discoverCliRelease, compareVersions } from './releases.js';
|
|
6
|
+
import { discoverCliRelease, discoverPortableRelease, compareVersions } from './releases.js';
|
|
7
7
|
|
|
8
8
|
let directory;
|
|
9
9
|
let stateFile;
|
|
@@ -139,3 +139,18 @@ it('compares beta sequence numbers and never selects beta in the stable channel'
|
|
|
139
139
|
expect(await discoverCliRelease('beta', '2.0.0', fetch)).toMatchObject({ version: '2.1.1-beta.10' });
|
|
140
140
|
await expect(discoverCliRelease('stable', '2.0.0', async () => new Response('', { status: 503 }))).rejects.toThrow('registry');
|
|
141
141
|
});
|
|
142
|
+
|
|
143
|
+
it('binds a self-contained release to its archive checksum and fails when the archive is not published', async () => {
|
|
144
|
+
const digest = 'a'.repeat(64);
|
|
145
|
+
const fetch = vi.fn(async (url) => {
|
|
146
|
+
const text = String(url);
|
|
147
|
+
if (text.includes('registry')) return Response.json({
|
|
148
|
+
'dist-tags': { latest: '2.1.0' }, versions: { '2.1.0': { version: '2.1.0', dist: { integrity: 'sha512-npm' } } },
|
|
149
|
+
});
|
|
150
|
+
if (text.endsWith('yuri-2.1.0-linux-x64.tar.gz.sha256')) return new Response(`${digest} yuri-2.1.0-linux-x64.tar.gz\n`);
|
|
151
|
+
return Response.json({ body: 'Notes' });
|
|
152
|
+
});
|
|
153
|
+
expect(await discoverPortableRelease('stable', '2.0.0', fetch, 'x64')).toMatchObject({ version: '2.1.0', integrity: digest, releaseNotes: 'Notes' });
|
|
154
|
+
expect(await discoverPortableRelease('stable', '2.1.0', fetch, 'x64')).toBeNull();
|
|
155
|
+
await expect(discoverPortableRelease('stable', '2.0.0', fetch, 'arm64')).rejects.toThrow('checksum');
|
|
156
|
+
});
|