@yuriai/web 0.3.6-beta.7 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -3
- package/bin/install-portable.sh +102 -0
- package/bin/install-portable.test.js +112 -0
- package/bin/lib/DOCUMENTATION.md +2 -0
- package/bin/lib/cli-startup.js +7 -2
- package/bin/lib/cli-startup.portable.test.js +30 -0
- package/bin/lib/commands-serve.js +4 -1
- package/bin/lib/commands-update.js +3 -0
- package/bin/lib/commands-update.test.js +18 -0
- package/dist/assets/{AgentAvatar-BAQBlzA3.js → AgentAvatar-BOvjZ-DI.js} +1 -1
- package/dist/assets/{AgentSelector-J9hP4-Bk.js → AgentSelector-Dl_zIOMk.js} +1 -1
- package/dist/assets/ArchivedSessionsDialog-Cr9Ji-RY.js +1 -0
- package/dist/assets/{AssistantConversationSurface-_A2W4Tnz.js → AssistantConversationSurface-CLdjNFeJ.js} +3 -3
- package/dist/assets/{AssistantSessionCard-DwFD8GED.js → AssistantSessionCard-BufyrOfo.js} +2 -2
- package/dist/assets/{AssistantUnreadBadge-CE-vFrqq.js → AssistantUnreadBadge-Dn9HAEDr.js} +1 -1
- package/dist/assets/{AssistantView-CwbzFAMd.js → AssistantView-Cg0wPomu.js} +1 -1
- package/dist/assets/{AssistantWorkingAvatar-BsEtliRi.js → AssistantWorkingAvatar-1KNjr2A2.js} +1 -1
- package/dist/assets/{AssistantsSettingsPage-D9VPa4dh.js → AssistantsSettingsPage-DeYfZAYH.js} +1 -1
- package/dist/assets/BinaryFileFallback-DfD02fS_.js +1 -0
- package/dist/assets/{BtwPanel-BKb8rDF4.js → BtwPanel-B_2w8P0X.js} +2 -2
- package/dist/assets/BusyDots-CAv4ygIO.js +4 -0
- package/dist/assets/{ChatContainer-ZnwOYIsK.js → ChatContainer-Dgv075jT.js} +23 -23
- package/dist/assets/ChatView-Cr71C0ZB.js +3 -0
- package/dist/assets/{DiagramView-DlPmGnFF.js → DiagramView-CTnpBsWU.js} +1 -1
- package/dist/assets/{DiffView-C4OcFwR2.js → DiffView-j_yWF1Mz.js} +2 -2
- package/dist/assets/{DiffViewToggle-DP9SqcOq.js → DiffViewToggle-CYusbmY5.js} +1 -1
- package/dist/assets/{ErrorBoundary-4W-EnYOU.js → ErrorBoundary-yr_JeVdx.js} +1 -1
- package/dist/assets/{FadeInOnReveal-nGKSFTqz.js → FadeInOnReveal-C56koblQ.js} +1 -1
- package/dist/assets/{GuiPluginMount-c2DXwGOK.js → GuiPluginMount-CBJiLdzR.js} +1 -1
- package/dist/assets/{GuiPluginPage-DqdVVRyY.js → GuiPluginPage-DJa8gFLk.js} +1 -1
- package/dist/assets/{GuiPluginSurface-CHSyQ4aq.js → GuiPluginSurface-Cc7q80jp.js} +1 -1
- package/dist/assets/{GuiPluginTitlebarItems-CBKus1Mw.js → GuiPluginTitlebarItems-rbK3leaL.js} +1 -1
- package/dist/assets/{GuiPluginWindow-AKqPYEmj.js → GuiPluginWindow-Cpg2HYWe.js} +1 -1
- package/dist/assets/{Icon-DlTEfBVi.js → Icon-C1rjS64C.js} +1 -1
- package/dist/assets/{ImageLoadingPlaceholder-ashKHrbc.js → ImageLoadingPlaceholder-2hMqBtYh.js} +1 -1
- package/dist/assets/{LoadingImage-3JaK3zim.js → LoadingImage-Bs-621ZL.js} +1 -1
- package/dist/assets/MarkdownRenderer-BZl_T1ng.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-B1l_DAn4.js → MarkdownRendererImpl-DiCCNjDr.js} +3 -3
- package/dist/assets/{MarkstreamRendererImpl-D6ZF2eue.js → MarkstreamRendererImpl-Bzz3OZlX.js} +2 -2
- package/dist/assets/{MobileAssistantSettingsPage-Dm4f6DKQ.js → MobileAssistantSettingsPage-pBhJR2t6.js} +1 -1
- package/dist/assets/{MobileAssistantTab-CmMbLmB9.js → MobileAssistantTab-Ceo442NF.js} +1 -1
- package/dist/assets/{MobileBtwPage-CNj2pFrK.js → MobileBtwPage-DPPmDMA6.js} +1 -1
- package/dist/assets/{MobileChangesSurface-CLD7Fujk.js → MobileChangesSurface-DfDoSkTS.js} +1 -1
- package/dist/assets/{MobileChatScreen-a7vpuIM7.js → MobileChatScreen-DHTbrnAr.js} +1 -1
- package/dist/assets/{MobileDetailNavigation-BPj5iEVr.js → MobileDetailNavigation-e1u1y59T.js} +1 -1
- package/dist/assets/{MobileFilesSurface-Ct7W0756.js → MobileFilesSurface-CJoqR3By.js} +2 -2
- package/dist/assets/{MobileHtmlNetworkBoundary-BcAbBib9.js → MobileHtmlNetworkBoundary-GBhYVYvu.js} +2 -2
- package/dist/assets/{MobileOverlayPanel-Dn4b7Mdh.js → MobileOverlayPanel-DzKTKeZX.js} +1 -1
- package/dist/assets/{MobileResizableSheet-BMSiXFxQ.js → MobileResizableSheet-CkA7qhco.js} +1 -1
- package/dist/assets/{MobileSettingsTab-b_XK7f7k.js → MobileSettingsTab-Bv0HsXFH.js} +1 -1
- package/dist/assets/{MobileShareBridge-BCHk5fz-.js → MobileShareBridge-B-co2UPE.js} +1 -1
- package/dist/assets/{MobileSurface-CXbG9hIC.js → MobileSurface-D63k27t5.js} +1 -1
- package/dist/assets/{MobileTabPageHeader-CipRIWUc.js → MobileTabPageHeader-FmtbGhwq.js} +1 -1
- package/dist/assets/{ModelLogo-Bbgp7ClJ.js → ModelLogo-CMnp5fyy.js} +1 -1
- package/dist/assets/{ModelSelector-BkrO8Ru2.js → ModelSelector-BF4wYwaz.js} +1 -1
- package/dist/assets/{MultiRunWindow-rDqLANIK.js → MultiRunWindow-D0OU63re.js} +1 -1
- package/dist/assets/{OnboardingScreen-DOcb9Wbw.js → OnboardingScreen-CDHtDQ0k.js} +1 -1
- package/dist/assets/{OverlayScrollbar-qJOPKg_1.js → OverlayScrollbar-m1EAqRES.js} +1 -1
- package/dist/assets/{PierreDiffViewer-DkAFZ6Oy.js → PierreDiffViewer-CZk1tZ3K.js} +1 -1
- package/dist/assets/{ProviderLogo-xLMKk9bq.js → ProviderLogo-BqQTME35.js} +1 -1
- package/dist/assets/{RemoteAssistantSessionCard-iPGtzThJ.js → RemoteAssistantSessionCard-CrbCVhqD.js} +1 -1
- package/dist/assets/{RemoteDesktopPanel-Da5Cb1yO.js → RemoteDesktopPanel-BzLmzmjb.js} +1 -1
- package/dist/assets/ScheduledTasksDialog-DmtcDZHc.js +3 -0
- package/dist/assets/{ScrollableOverlay-X1R_GNYm.js → ScrollableOverlay-CEglrXfm.js} +1 -1
- package/dist/assets/{SettingsGroup-DYxliYJo.js → SettingsGroup-Bm-l3IIs.js} +1 -1
- package/dist/assets/{SettingsView-Dfvs9-aB.js → SettingsView-CYEjDYWC.js} +15 -15
- package/dist/assets/{SettingsWindow-CCACaIcI.js → SettingsWindow-CvJsxUyu.js} +1 -1
- package/dist/assets/{SetupTourDialog-CTzVvWuI.js → SetupTourDialog-DWaVtkY0.js} +1 -1
- package/dist/assets/{SyncActions-BKhytR-H.js → SyncActions-C0gph0P8.js} +1 -1
- package/dist/assets/TerminalView-Cm8Ts51w.js +9 -0
- package/dist/assets/{TextSelectionMenu-C--W3Vxw.js → TextSelectionMenu-Dcv_PdES.js} +2 -2
- package/dist/assets/{ToolOutputDialog-4QosyyR-.js → ToolOutputDialog-QJpQjmqK.js} +2 -2
- package/dist/assets/{YuriLogo-YAE_6MsI.js → YuriLogo-BbS_Wj4g.js} +1 -1
- package/dist/assets/{YuriWordmark-BFHeVOwW.js → YuriWordmark-CqkcfAJl.js} +1 -1
- package/dist/assets/{assistant-attachment-cache-B8Bvp93X.js → assistant-attachment-cache-CIij0OGm.js} +1 -1
- package/dist/assets/{assistantMessagePreview-Dnt4nt3K.js → assistantMessagePreview-wmP-d_oa.js} +1 -1
- package/dist/assets/{assistantQueries-CV8A3Du5.js → assistantQueries-Dpxq78yP.js} +1 -1
- package/dist/assets/{auto-read-context-DWZsSvww.js → auto-read-context-aRn5yhDb.js} +1 -1
- package/dist/assets/{capgoAdapter-Dlf0ZlyX.js → capgoAdapter-BSnmtwX8.js} +1 -1
- package/dist/assets/{card-5xUgzwRy.js → card-aoveY4I3.js} +1 -1
- package/dist/assets/{chatUpwardIntent-ExbNZtoR.js → chatUpwardIntent-WxxmOppY.js} +1 -1
- package/dist/assets/{checkbox-BFuJ7w49.js → checkbox-CljLXON1.js} +1 -1
- package/dist/assets/{client-Brr-ja1l.js → client-CmtAKi5B.js} +1 -1
- package/dist/assets/{collapsible-DVLlg0W-.js → collapsible-DkeWKEAb.js} +1 -1
- package/dist/assets/{connection-hint-BARMaHbM.js → connection-hint-DsKyICgn.js} +1 -1
- package/dist/assets/{context-menu-CUqRZr1z.js → context-menu-XuMa5TsA.js} +1 -1
- package/dist/assets/{desktopHosts-BBCo4tyU.js → desktopHosts-COI-czjF.js} +1 -1
- package/dist/assets/{desktopRelayRestore-Cm2ITP98.js → desktopRelayRestore-BEPNc7qb.js} +1 -1
- package/dist/assets/device-TCHW5U2y.js +2 -0
- package/dist/assets/{diagram-BazwKH8x.js → diagram-DFv7Lh0h.js} +1 -1
- package/dist/assets/dialog-B6B8FIrL.css +1 -0
- package/dist/assets/{dialog-C_SxVFAo.js → dialog-Cx20I73q.js} +1 -1
- package/dist/assets/{dropdown-menu-CtAMJkEu.js → dropdown-menu-XdfySbu2.js} +1 -1
- package/dist/assets/es-CLAEdHpc.js +15 -0
- package/dist/assets/{fileMentionTouchSelection-DTWPCfYk.js → fileMentionTouchSelection-pXNTKHAc.js} +1 -1
- package/dist/assets/{fileReferenceActions-ez7SW3IW.js → fileReferenceActions-wN7mWY3w.js} +1 -1
- package/dist/assets/fr-BOB0gfdQ.js +13 -0
- package/dist/assets/{gitApi-SW-vcLxI.js → gitApi-LXGRaDt8.js} +1 -1
- package/dist/assets/{gitApiHttp-fl5lB9Lu.js → gitApiHttp-ZjM4HkSo.js} +2 -2
- package/dist/assets/{githubAuthQueries-2oyz-OKR.js → githubAuthQueries-3AJp5LD5.js} +1 -1
- package/dist/assets/{historyImportQueries-CTTVEQfk.js → historyImportQueries-B_mfphxe.js} +1 -1
- package/dist/assets/host-fTclNJST.js +1 -0
- package/dist/assets/{i18n-CzwXzoAE.js → i18n-iu4pzqPi.js} +1 -1
- package/dist/assets/{icons-B9kwDPqG.js → icons-BWijARKS.js} +1 -1
- package/dist/assets/{imageSource-5oLkHxn4.js → imageSource-qzgDdfT4.js} +1 -1
- package/dist/assets/{input-JTEWOZSR.js → input-BMYgp87Q.js} +1 -1
- package/dist/assets/{input-store-olhHHDxh.js → input-store-CzG_3qFv.js} +1 -1
- package/dist/assets/insertionBoundaries-bmxIeFzH.js +1 -0
- package/dist/assets/ja-CfM9jZ6u.js +15 -0
- package/dist/assets/{kbd-2UM_iptD.js → kbd-6RW-BxuR.js} +1 -1
- package/dist/assets/ko-DZOSVPHB.js +15 -0
- package/dist/assets/main-B-Wdp6An.js +169 -0
- package/dist/assets/main-BLBAaohb.js +2 -0
- package/dist/assets/{markdownHeightCache-CYOg5vHN.js → markdownHeightCache-ojT5txMS.js} +1 -1
- package/dist/assets/{mcpQueries-BBdJw27k.js → mcpQueries-BRuytwhB.js} +1 -1
- package/dist/assets/miniChat-BsrHy2rU.js +2 -0
- package/dist/assets/mobile-B8SHiXyq.js +2 -0
- package/dist/assets/{mobileBackNavigation-BMKb1AFe.js → mobileBackNavigation-CVrR_jtn.js} +1 -1
- package/dist/assets/{mobileConnections-B3sO6LHd.js → mobileConnections-iSUwFNqu.js} +2 -2
- package/dist/assets/{multirun-CIo87Y8M.js → multirun-Y3K5yS-8.js} +1 -1
- package/dist/assets/{native-config-B9rt7FGl.js → native-config-tvqKHwCC.js} +1 -1
- package/dist/assets/{nativeComposerCover-692JM3W7.js → nativeComposerCover-5rYz1E3W.js} +1 -1
- package/dist/assets/{navigation-DZmwc567.js → navigation-DFmCAq2g.js} +2 -2
- package/dist/assets/openRemoteProjectSession-CeSahDtQ.js +1 -0
- package/dist/assets/openSessionFromDeepLink-DsZnNy4W.js +2 -0
- package/dist/assets/pl-CaT81Sz8.js +15 -0
- package/dist/assets/platform-B2ylz14u.js +1 -0
- package/dist/assets/{pluginPresentation-mP_3zj0n.js → pluginPresentation-rls1AMJN.js} +2 -2
- package/dist/assets/{project-preview-D6gRDnY0.js → project-preview-yQerlKs2.js} +1 -1
- package/dist/assets/{projectActions-BhKknl2F.js → projectActions-B11KAI3f.js} +1 -1
- package/dist/assets/{prompt-attachment-upload-DmbZaK4Q.js → prompt-attachment-upload-BzYqZdzd.js} +1 -1
- package/dist/assets/pt-BR-9p1IKCEF.js +15 -0
- package/dist/assets/pwa-BrLPfcLk.js +2 -0
- package/dist/assets/{queue-abort-optimistic-DEP8n-eH.js → queue-abort-optimistic-CXKdQu_T.js} +1 -1
- package/dist/assets/{quota-noApkDjp.js → quota-BhdKv_Wc.js} +1 -1
- package/dist/assets/{reference-history-YQuuHaEQ.js → reference-history-Bzn-aPYg.js} +1 -1
- package/dist/assets/{remote-input-store-BuAuKvuo.js → remote-input-store-DPw_n0MZ.js} +1 -1
- package/dist/assets/{remoteProjectQueries-DtoxpM86.js → remoteProjectQueries-BQzoY_Y9.js} +1 -1
- package/dist/assets/{remoteSessionReference-Dh6CWWHy.js → remoteSessionReference-DORvqUYQ.js} +1 -1
- package/dist/assets/{renderElectronMiniChatApp-BXmpVc6d.js → renderElectronMiniChatApp-DXKgwBat.js} +2 -2
- package/dist/assets/renderMobileApp-CKN6rWxR.js +17 -0
- package/dist/assets/{runtime-file-download-CljroGkE.js → runtime-file-download-CaeLqIEY.js} +1 -1
- package/dist/assets/{runtime-file-resource-BlS-Ew1z.js → runtime-file-resource-BGZ4tGr5.js} +1 -1
- package/dist/assets/{runtimeConfig-CuW_HzK3.js → runtimeConfig-BqUZF6Wt.js} +1 -1
- package/dist/assets/runtimeEndpointReset-Bu02gAs3.js +4 -0
- package/dist/assets/{scheduledTaskNavigation-B1lpSDXk.js → scheduledTaskNavigation-r3g3DfXq.js} +1 -1
- package/dist/assets/{select-CDQXclVD.js → select-BPIsJWhM.js} +1 -1
- package/dist/assets/{sessionLookup-CQ0NWnCZ.js → sessionLookup-DZhrkKRI.js} +1 -1
- package/dist/assets/sessionOwnership-LoUNVeuJ.js +2 -0
- package/dist/assets/{shortcuts-DstiGEO9.js → shortcuts-DMupfl7l.js} +1 -1
- package/dist/assets/{sortable-tabs-strip-DyQNBvm3.js → sortable-tabs-strip-1bKw81VO.js} +1 -1
- package/dist/assets/{speechSettingsQueries-BkOKGdjP.js → speechSettingsQueries-C3JgzCqy.js} +1 -1
- package/dist/assets/src-BacdFOCS.css +2 -0
- package/dist/assets/{store-BRt8bo0A.js → store-BgsgBTwJ.js} +5 -5
- package/dist/assets/{switch-zJbRtv_r.js → switch-B4-v9kvg.js} +1 -1
- package/dist/assets/{terminalApi-FD8v3NAb.js → terminalApi-wdwb9MVG.js} +1 -1
- package/dist/assets/{textarea-DTZqFbDz.js → textarea-DExmj0ZR.js} +1 -1
- package/dist/assets/{timeFormat-Cfigwcpm.js → timeFormat-BlSO2-ws.js} +1 -1
- package/dist/assets/{tooltip-dWH5QFxu.js → tooltip-Di-WRJUZ.js} +1 -1
- package/dist/assets/{truncated-path-CXZAFwlh.js → truncated-path-nKzykV5p.js} +1 -1
- package/dist/assets/types-4xeqxklF.js +2 -0
- package/dist/assets/ui-BCYkB585.js +13 -0
- package/dist/assets/uk-BUSl_Y_1.js +15 -0
- package/dist/assets/useAppFontEffects-BCJPQstm.js +7 -0
- package/dist/assets/{useAssistantUIStore-90j09IZB.js → useAssistantUIStore-BUWPTwNV.js} +1 -1
- package/dist/assets/{useDesktopWindowControlsLayout-DGB6_pWm.js → useDesktopWindowControlsLayout-BtpyMlOS.js} +1 -1
- package/dist/assets/{useDictation-hf70zk6P.js → useDictation-4HBMkISY.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-CcSfY1lN.js → useEffectiveDirectory-BYswRwIv.js} +1 -1
- package/dist/assets/useFontPreferences-C4dQT72k.js +1 -0
- package/dist/assets/{useGitStore-IAG82rgx.js → useGitStore-DqBPgmf-.js} +1 -1
- package/dist/assets/{useInlineCommentDraftStore-DAq3lz0A.js → useInlineCommentDraftStore-CGJ6dM8d.js} +1 -1
- package/dist/assets/useMcpConfigStore-DEcxFuzW.js +1 -0
- package/dist/assets/{useMobileSwipeActions-5-ZcwhfI.js → useMobileSwipeActions-DqlR4X-T.js} +1 -1
- package/dist/assets/useMobileTranscriptSyncHint-BDKcqtq_.js +10 -0
- package/dist/assets/{useModelLists-D8s2D-yz.js → useModelLists-DsFTBlMr.js} +1 -1
- package/dist/assets/{useOpenCodeReadiness-BIyAApPB.js → useOpenCodeReadiness-CHybAoBh.js} +1 -1
- package/dist/assets/usePluginsStore-BIBHPK4A.js +1 -0
- package/dist/assets/{useProjectGitActions-DPqScNnn.js → useProjectGitActions-DeFcqi_O.js} +1 -1
- package/dist/assets/{useProjectGitStore-BOiooCle.js → useProjectGitStore-JGZk-NCk.js} +1 -1
- package/dist/assets/{useProjectRuntimeAPIs-DQaT_Ok_.js → useProjectRuntimeAPIs-BMBBtJB-.js} +1 -1
- package/dist/assets/{useQuotaStore-C3FDA_wk.js → useQuotaStore-C3qJTiD7.js} +1 -1
- package/dist/assets/{useSessionBtwStore-eNT3w9Un.js → useSessionBtwStore-D7P-pknd.js} +1 -1
- package/dist/assets/{useStreamingTextThrottle-D8r8Ox9l.js → useStreamingTextThrottle-CjWAE0oQ.js} +1 -1
- package/dist/assets/useTerminalStore-C_QzSEgP.js +1 -0
- package/dist/assets/{useUIStore-BkYqSmAD.js → useUIStore-68ZPpgYA.js} +1 -1
- package/dist/assets/worktreeManager-pRvX5dQT.js +1 -0
- package/dist/assets/{worktreeSourceBranchPreference-B9rTzT2t.js → worktreeSourceBranchPreference-B7d3RYcc.js} +1 -1
- package/dist/assets/zh-CN-BGKgQtWd.js +15 -0
- package/dist/assets/zh-TW-jM5lIKfe.js +15 -0
- package/dist/index.html +16 -16
- package/dist/mini-chat.html +16 -16
- package/dist/mobile.html +2 -2
- package/package.json +2 -1
- package/server/index.js +22 -10
- package/server/lib/assistants/DOCUMENTATION.md +11 -6
- package/server/lib/assistants/builtin-skills.js +19 -3
- package/server/lib/assistants/builtin-skills.test.js +17 -0
- package/server/lib/assistants/contact-tools.js +47 -3
- package/server/lib/assistants/contact-tools.test.js +59 -0
- package/server/lib/assistants/harness.js +5 -2
- package/server/lib/assistants/harness.test.js +1 -1
- package/server/lib/assistants/routes.js +1 -0
- package/server/lib/assistants/service.js +7 -2
- package/server/lib/assistants/yuri-tools.js +1 -1
- package/server/lib/assistants/yuri-tools.test.js +1 -1
- package/server/lib/gui-customization/DOCUMENTATION.md +32 -7
- package/server/lib/gui-customization/projects-client.mjs +1 -1
- package/server/lib/gui-customization/projects.js +6 -6
- package/server/lib/gui-customization/projects.test.js +13 -2
- package/server/lib/gui-customization/remote-connections-client.mjs +1 -1
- package/server/lib/gui-customization/remote-connections.js +7 -6
- package/server/lib/gui-customization/remote-connections.test.js +17 -0
- package/server/lib/gui-customization/session-skill.js +16 -4
- package/server/lib/gui-customization/session-skill.test.js +16 -0
- package/server/lib/gui-customization/skill/SKILL.md +2 -2
- package/server/lib/gui-customization/skill/references/deep-links.md +15 -11
- package/server/lib/gui-customization/skill/references/gui-api.md +50 -1
- package/server/lib/gui-customization/skill/references/projects.md +19 -0
- package/server/lib/gui-customization/skill/references/remote-connections.md +3 -0
- package/server/lib/gui-customization/skill-caller.js +18 -0
- package/server/lib/host-update/DOCUMENTATION.md +5 -0
- package/server/lib/host-update/cli.js +5 -2
- package/server/lib/host-update/cli.test.js +15 -2
- package/server/lib/opencode/DOCUMENTATION.md +2 -1
- package/server/lib/opencode/custom-provider.test.js +41 -0
- package/server/lib/opencode/feature-routes-runtime.js +20 -3
- package/server/lib/opencode/settings-helpers.js +5 -0
- package/server/lib/opencode/settings-helpers.test.js +10 -0
- package/server/lib/package-manager.js +14 -0
- package/server/lib/package-manager.test.js +7 -0
- package/server/lib/portable-installation.js +34 -0
- package/server/lib/portable-installation.test.js +38 -0
- package/server/lib/session-index/DOCUMENTATION.md +8 -0
- package/server/lib/session-index/adopt-unindexed-session.js +46 -0
- package/server/lib/session-index/adopt-unindexed-session.test.js +77 -0
- package/server/lib/session-index/event-ingest.js +14 -1
- package/server/lib/session-index/event-ingest.test.js +18 -0
- package/dist/assets/ArchivedSessionsDialog-8KudFtdU.js +0 -1
- package/dist/assets/BinaryFileFallback-DhRqRBKp.js +0 -1
- package/dist/assets/BusyDots-BRm9osT-.js +0 -4
- package/dist/assets/ChatView-CZyfJPJI.js +0 -3
- package/dist/assets/MarkdownRenderer-MCdcFkrB.js +0 -2
- package/dist/assets/ScheduledTasksDialog-CBVwmP3I.js +0 -3
- package/dist/assets/TerminalView-BE88iCut.js +0 -8
- package/dist/assets/device-DaBjLp2g.js +0 -2
- package/dist/assets/dialog-D9CkSNCA.css +0 -1
- package/dist/assets/es-BuXtFKUW.js +0 -15
- package/dist/assets/fr-BaZeffY9.js +0 -13
- package/dist/assets/host-DkOpLMtd.js +0 -1
- package/dist/assets/insertionBoundaries-CmHoHHu4.js +0 -1
- package/dist/assets/ja-CGVx5A8U.js +0 -15
- package/dist/assets/ko-C663nzbf.js +0 -15
- package/dist/assets/main-2WZS1sUa.js +0 -2
- package/dist/assets/main-BoaXbSk_.js +0 -169
- package/dist/assets/miniChat-sY4pEF3a.js +0 -2
- package/dist/assets/mobile-oVfsL7ax.js +0 -2
- package/dist/assets/openRemoteProjectSession-CU45azVB.js +0 -1
- package/dist/assets/openSessionFromDeepLink-BoGMvzx0.js +0 -2
- package/dist/assets/pl-CeBOMwg9.js +0 -15
- package/dist/assets/platform-B_vXw3WJ.js +0 -1
- package/dist/assets/pt-BR-r8268Pk6.js +0 -15
- package/dist/assets/pwa-Cni1iHtS.js +0 -2
- package/dist/assets/renderMobileApp-B7v2goOK.js +0 -17
- package/dist/assets/runtimeEndpointReset-rGqYbpcd.js +0 -4
- package/dist/assets/sessionOwnership-DHLgtM_g.js +0 -2
- package/dist/assets/src-DYCPWwUH.css +0 -2
- package/dist/assets/types-CXWh93pl.js +0 -2
- package/dist/assets/ui-DiWlcrZU.js +0 -13
- package/dist/assets/uk-CeQ1XJ99.js +0 -15
- package/dist/assets/useAppFontEffects-DvftNvNI.js +0 -7
- package/dist/assets/useFontPreferences-BPtsS6hr.js +0 -1
- package/dist/assets/useMcpConfigStore-C6bGnrzx.js +0 -1
- package/dist/assets/useMobileTranscriptSyncHint-DwKbHgxp.js +0 -10
- package/dist/assets/usePluginsStore-DF6jfADo.js +0 -1
- package/dist/assets/worktreeManager-Dm96jF0K.js +0 -1
- package/dist/assets/zh-CN-Bv854olO.js +0 -15
- package/dist/assets/zh-TW-gx8cO-Cx.js +0 -15
package/README.md
CHANGED
|
@@ -107,9 +107,25 @@ Hosts connected to different OpenCode databases must not share assistant watches
|
|
|
107
107
|
curl -fsSL https://raw.githubusercontent.com/yee94/yuri/main/scripts/install.sh | bash
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
On Linux x64/arm64 with glibc 2.36+, this installs a self-contained release:
|
|
111
|
+
private Node 24, precompiled native modules, browser assets and native OpenCode.
|
|
112
|
+
No system Node, npm, Python or compiler is needed. The installer requires bash,
|
|
113
|
+
curl or wget, tar and a SHA-256 utility; it does not edit shell profiles or system
|
|
114
|
+
Node. Alpine/musl is not supported by this distribution.
|
|
115
|
+
|
|
116
|
+
For a specific release (including beta), download its Linux CLI archive and
|
|
117
|
+
checksum from GitHub Releases, or run the installer with `--version <version>`.
|
|
118
|
+
Extracted archives run through `./yuri`; installer-managed releases use
|
|
119
|
+
`~/.local/bin/yuri` and retain old versions under `~/.local/share/yuri/versions`.
|
|
120
|
+
|
|
121
|
+
Alternatively install the npm distribution manually:
|
|
122
|
+
`bun add -g @yuriai/web` (or npm, pnpm, yarn).
|
|
123
|
+
That distribution still requires Node.js 22+ and a compatible OpenCode v2 CLI
|
|
124
|
+
(PATH or `OPENCODE_BINARY`; missing OpenCode is downloaded automatically).
|
|
125
|
+
The self-contained distribution refuses npm-based `yuri update` and HTTP Host
|
|
126
|
+
self-update; stop the Host and use its bundled `install.sh --version <version>`,
|
|
127
|
+
or let an updated desktop align an SSH-managed Host on reconnect.
|
|
128
|
+
See `scripts/portable/DOCUMENTATION.md` for build and verification boundaries.
|
|
113
129
|
|
|
114
130
|
## Usage
|
|
115
131
|
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
version=""
|
|
5
|
+
install_dir="${YURI_INSTALL_DIR:-$HOME/.local/share/yuri}"
|
|
6
|
+
bin_dir="${YURI_BIN_DIR:-$HOME/.local/bin}"
|
|
7
|
+
link_bin=true
|
|
8
|
+
release_base="${YURI_RELEASE_BASE_URL:-https://github.com/yee94/yuri/releases}"
|
|
9
|
+
release_api="${YURI_RELEASE_API_URL:-https://api.github.com/repos/yee94/yuri/releases}"
|
|
10
|
+
|
|
11
|
+
fail() { echo "Yuri: $*" >&2; exit 1; }
|
|
12
|
+
while [ "$#" -gt 0 ]; do
|
|
13
|
+
case "$1" in
|
|
14
|
+
--version|--install-dir|--bin-dir)
|
|
15
|
+
[ "$#" -ge 2 ] || fail "$1 requires a value"
|
|
16
|
+
case "$1" in --version) version="$2" ;; --install-dir) install_dir="$2" ;; --bin-dir) bin_dir="$2" ;; esac
|
|
17
|
+
shift 2 ;;
|
|
18
|
+
--no-link) link_bin=false; shift ;;
|
|
19
|
+
--help) echo "Usage: install.sh [--version X.Y.Z[-beta.N]] [--install-dir DIR] [--bin-dir DIR] [--no-link]"; exit 0 ;;
|
|
20
|
+
*) fail "Unknown option: $1" ;;
|
|
21
|
+
esac
|
|
22
|
+
done
|
|
23
|
+
[ "$(uname -s)" = Linux ] || fail "Portable installation currently supports Linux only"
|
|
24
|
+
case "$(uname -m)" in x86_64) arch=x64 ;; aarch64|arm64) arch=arm64 ;; *) fail "Unsupported Linux architecture" ;; esac
|
|
25
|
+
if [ -f /etc/alpine-release ] || { command -v ldd >/dev/null && ldd --version 2>&1 | grep -qi musl; }; then
|
|
26
|
+
fail "Portable packages require glibc Linux; musl/Alpine is not supported"
|
|
27
|
+
fi
|
|
28
|
+
libc="$(getconf GNU_LIBC_VERSION 2>/dev/null || true)"
|
|
29
|
+
if [[ "$libc" =~ ^glibc[[:space:]]([0-9]+)\.([0-9]+)$ ]]; then
|
|
30
|
+
[ "${BASH_REMATCH[1]}" -gt 2 ] || { [ "${BASH_REMATCH[1]}" -eq 2 ] && [ "${BASH_REMATCH[2]}" -ge 36 ]; } \
|
|
31
|
+
|| fail "Portable packages require glibc 2.36+"
|
|
32
|
+
fi
|
|
33
|
+
case "$install_dir" in /*) ;; *) fail "--install-dir must be an absolute path" ;; esac
|
|
34
|
+
case "$bin_dir" in /*) ;; *) fail "--bin-dir must be an absolute path" ;; esac
|
|
35
|
+
case "$release_base" in https://*) ;; *) fail "Release downloads require HTTPS" ;; esac
|
|
36
|
+
case "$release_api" in https://*) ;; *) fail "Release discovery requires HTTPS" ;; esac
|
|
37
|
+
command -v tar >/dev/null || fail "tar is required to extract the package"
|
|
38
|
+
if command -v curl >/dev/null; then
|
|
39
|
+
download() { curl -fsSL --proto '=https' --proto-redir '=https' --retry 2 --connect-timeout 15 --max-time 600 "$1" -o "$2"; }
|
|
40
|
+
elif command -v wget >/dev/null; then
|
|
41
|
+
download() { wget -q --https-only --timeout=600 "$1" -O "$2"; }
|
|
42
|
+
else fail "curl or wget is required to download the package"
|
|
43
|
+
fi
|
|
44
|
+
if command -v sha256sum >/dev/null; then
|
|
45
|
+
checksum() { sha256sum "$1" | cut -d ' ' -f 1; }
|
|
46
|
+
elif command -v shasum >/dev/null; then
|
|
47
|
+
checksum() { shasum -a 256 "$1" | cut -d ' ' -f 1; }
|
|
48
|
+
else fail "sha256sum or shasum is required to verify the download"
|
|
49
|
+
fi
|
|
50
|
+
mkdir -p "$install_dir"
|
|
51
|
+
lock="$install_dir/.install-lock"
|
|
52
|
+
mkdir "$lock" 2>/dev/null || fail "Another installation is active, or .install-lock needs operator recovery"
|
|
53
|
+
temporary=""
|
|
54
|
+
cleanup() {
|
|
55
|
+
[ -z "$temporary" ] || rm -rf -- "$temporary"
|
|
56
|
+
rmdir "$lock"
|
|
57
|
+
}
|
|
58
|
+
trap cleanup EXIT
|
|
59
|
+
trap 'exit 130' INT
|
|
60
|
+
trap 'exit 143' TERM
|
|
61
|
+
temporary="$(mktemp -d "$install_dir/.install.XXXXXX")"
|
|
62
|
+
if [ -z "$version" ]; then
|
|
63
|
+
download "$release_api/latest" "$temporary/latest.json"
|
|
64
|
+
version="$(sed -n 's/.*"tag_name":[[:space:]]*"v\([^"]*\)".*/\1/p' "$temporary/latest.json")"
|
|
65
|
+
[[ "$version" != *-* ]] || fail "Stable discovery returned a prerelease"
|
|
66
|
+
fi
|
|
67
|
+
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z]+(\.[0-9A-Za-z]+)*)?$ ]] || fail "Invalid release version"
|
|
68
|
+
name="yuri-$version-linux-$arch.tar.gz"
|
|
69
|
+
target="$install_dir/versions/$version-linux-$arch"
|
|
70
|
+
if $link_bin && { [ -e "$bin_dir/yuri" ] || [ -L "$bin_dir/yuri" ]; }; then
|
|
71
|
+
[ -L "$bin_dir/yuri" ] && [ "$(readlink "$bin_dir/yuri")" = "$install_dir/current/yuri" ] \
|
|
72
|
+
|| fail "$bin_dir/yuri already belongs to another installation; choose --bin-dir or use --no-link"
|
|
73
|
+
fi
|
|
74
|
+
if [ ! -e "$target" ]; then
|
|
75
|
+
download "$release_base/download/v$version/$name" "$temporary/$name"
|
|
76
|
+
download "$release_base/download/v$version/$name.sha256" "$temporary/checksum"
|
|
77
|
+
expected="$(cut -d ' ' -f 1 < "$temporary/checksum")"
|
|
78
|
+
[[ "$expected" =~ ^[0-9a-f]{64}$ ]] || fail "Invalid release checksum"
|
|
79
|
+
[ "$(checksum "$temporary/$name")" = "$expected" ] || fail "Release checksum mismatch"
|
|
80
|
+
tar -xzf "$temporary/$name" -C "$temporary"
|
|
81
|
+
LD_LIBRARY_PATH="$temporary/yuri/runtime/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \
|
|
82
|
+
"$temporary/yuri/runtime/node" "$temporary/yuri/verify.mjs" "$version"
|
|
83
|
+
mkdir -p "$install_dir/versions"
|
|
84
|
+
mv "$temporary/yuri" "$target"
|
|
85
|
+
else
|
|
86
|
+
LD_LIBRARY_PATH="$target/runtime/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \
|
|
87
|
+
"$target/runtime/node" "$target/verify.mjs" "$version"
|
|
88
|
+
fi
|
|
89
|
+
if $link_bin; then
|
|
90
|
+
mkdir -p "$bin_dir"
|
|
91
|
+
ln -s "$install_dir/current/yuri" "$temporary/yuri-link"
|
|
92
|
+
mv -Tf "$temporary/yuri-link" "$bin_dir/yuri"
|
|
93
|
+
fi
|
|
94
|
+
# The previous release remains intact. Only this symlink switches after verification.
|
|
95
|
+
ln -s "versions/$version-linux-$arch" "$temporary/current"
|
|
96
|
+
mv -Tf "$temporary/current" "$install_dir/current"
|
|
97
|
+
if $link_bin; then
|
|
98
|
+
echo "Installed Yuri $version: $bin_dir/yuri"
|
|
99
|
+
case ":${PATH:-}:" in *":$bin_dir:"*) ;; *) echo "Add $bin_dir to PATH to run yuri from any directory." ;; esac
|
|
100
|
+
else
|
|
101
|
+
echo "Installed Yuri $version: $install_dir/current/yuri"
|
|
102
|
+
fi
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import os from 'node:os';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { createHash } from 'node:crypto';
|
|
5
|
+
import { spawnSync } from 'node:child_process';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import { afterEach, expect, it } from 'vitest';
|
|
8
|
+
|
|
9
|
+
const installer = path.join(path.dirname(fileURLToPath(import.meta.url)), 'install-portable.sh');
|
|
10
|
+
const directories = [];
|
|
11
|
+
afterEach(() => {
|
|
12
|
+
for (const root of directories.splice(0)) fs.rmSync(root, { recursive: true, force: true });
|
|
13
|
+
});
|
|
14
|
+
function executable(file, contents) {
|
|
15
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
16
|
+
fs.writeFileSync(file, contents, { mode: 0o755 });
|
|
17
|
+
}
|
|
18
|
+
function fixture() {
|
|
19
|
+
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'yuri-portable-install-'));
|
|
20
|
+
directories.push(root);
|
|
21
|
+
const bin = path.join(root, 'tools'), install = path.join(root, 'installation');
|
|
22
|
+
fs.mkdirSync(bin);
|
|
23
|
+
executable(path.join(bin, 'uname'), '#!/bin/sh\ncase "$1" in -s) echo Linux ;; -m) echo x86_64 ;; esac\n');
|
|
24
|
+
executable(path.join(bin, 'ldd'), '#!/bin/sh\necho "glibc 2.36"\n');
|
|
25
|
+
executable(path.join(bin, 'curl'), `#!/bin/sh
|
|
26
|
+
url=""; out=""
|
|
27
|
+
while [ "$#" -gt 0 ]; do
|
|
28
|
+
case "$1" in -o) out="$2"; shift 2 ;; https://*) url="$1"; shift ;; *) shift ;; esac
|
|
29
|
+
done
|
|
30
|
+
case "$url" in
|
|
31
|
+
*/latest) printf '{"tag_name": "v1.2.3"}\\n' > "$out" ;;
|
|
32
|
+
*.sha256) cp "$FIXTURE/checksum" "$out" ;;
|
|
33
|
+
*) cp "$FIXTURE/artifact.tar.gz" "$out" ;;
|
|
34
|
+
esac
|
|
35
|
+
`);
|
|
36
|
+
executable(path.join(bin, 'sha256sum'), `#!${process.execPath}
|
|
37
|
+
const fs = require('fs'), crypto = require('crypto');
|
|
38
|
+
console.log(crypto.createHash('sha256').update(fs.readFileSync(process.argv[2])).digest('hex') + ' ' + process.argv[2]);
|
|
39
|
+
`);
|
|
40
|
+
// Model GNU rename-over-symlink on macOS too; all other moves use the host utility.
|
|
41
|
+
executable(path.join(bin, 'mv'), `#!${process.execPath}
|
|
42
|
+
const fs = require('fs'), cp = require('child_process');
|
|
43
|
+
const args = process.argv.slice(2);
|
|
44
|
+
if (args[0] === '-Tf') { fs.renameSync(args[1], args[2]); }
|
|
45
|
+
else { const result = cp.spawnSync('/bin/mv', args, { stdio: 'inherit' }); process.exit(result.status); }
|
|
46
|
+
`);
|
|
47
|
+
for (const tool of ['node', 'npm', 'python3', 'gcc', 'g++']) {
|
|
48
|
+
executable(path.join(bin, tool), '#!/bin/sh\necho "Unexpected target tool" >&2\nexit 99\n');
|
|
49
|
+
}
|
|
50
|
+
const unpacked = path.join(root, 'source/yuri');
|
|
51
|
+
executable(path.join(unpacked, 'runtime/node'), '#!/bin/sh\nexit "${VERIFY_FAIL:-0}"\n');
|
|
52
|
+
fs.writeFileSync(path.join(unpacked, 'verify.mjs'), 'fixture');
|
|
53
|
+
executable(path.join(unpacked, 'yuri'), '#!/bin/sh\necho fixture\n');
|
|
54
|
+
const archive = spawnSync('tar', ['-czf', path.join(root, 'artifact.tar.gz'), '-C', path.join(root, 'source'), 'yuri']);
|
|
55
|
+
expect(archive.status).toBe(0);
|
|
56
|
+
const digest = createHash('sha256').update(fs.readFileSync(path.join(root, 'artifact.tar.gz'))).digest('hex');
|
|
57
|
+
fs.writeFileSync(path.join(root, 'checksum'), `${digest} fixture.tar.gz\n`);
|
|
58
|
+
const run = (args = [], extra = {}) => spawnSync('/bin/bash', [
|
|
59
|
+
installer, '--install-dir', install, '--bin-dir', path.join(root, 'user-bin'), ...args,
|
|
60
|
+
], {
|
|
61
|
+
encoding: 'utf8', env: { ...process.env, HOME: root, PATH: `${bin}:/usr/bin:/bin`, FIXTURE: root, ...extra },
|
|
62
|
+
});
|
|
63
|
+
return { root, install, run };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
it('installs and repeats safely without system Node/npm/Python/compiler', () => {
|
|
67
|
+
const { root, install, run } = fixture();
|
|
68
|
+
const result = run(['--version', '1.2.3']);
|
|
69
|
+
expect(result.status, result.stderr).toBe(0);
|
|
70
|
+
expect(fs.readlinkSync(path.join(install, 'current'))).toBe('versions/1.2.3-linux-x64');
|
|
71
|
+
expect(fs.readlinkSync(path.join(root, 'user-bin/yuri'))).toBe(path.join(install, 'current/yuri'));
|
|
72
|
+
expect(run(['--version', '1.2.3']).status).toBe(0);
|
|
73
|
+
expect(fs.existsSync(path.join(root, '.profile'))).toBe(false);
|
|
74
|
+
expect(fs.existsSync(path.join(install, '.install-lock'))).toBe(false);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('discovers stable without a JSON parser and accepts exact prereleases only when requested', () => {
|
|
78
|
+
const { install, run } = fixture();
|
|
79
|
+
expect(run().status).toBe(0);
|
|
80
|
+
expect(run(['--version', '1.2.4-beta.1', '--no-link']).status).toBe(0);
|
|
81
|
+
expect(fs.readlinkSync(path.join(install, 'current'))).toBe('versions/1.2.4-beta.1-linux-x64');
|
|
82
|
+
expect(fs.existsSync(path.join(install, 'versions/1.2.3-linux-x64'))).toBe(true);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it('checksum and native preflight failures leave the previous installation selected', () => {
|
|
86
|
+
const { root, install, run } = fixture();
|
|
87
|
+
expect(run(['--version', '1.2.3']).status).toBe(0);
|
|
88
|
+
expect(run(['--version', '1.2.4'], { VERIFY_FAIL: '7' }).status).not.toBe(0);
|
|
89
|
+
expect(fs.readlinkSync(path.join(install, 'current'))).toBe('versions/1.2.3-linux-x64');
|
|
90
|
+
fs.writeFileSync(path.join(root, 'checksum'), `${'0'.repeat(64)} fixture\n`);
|
|
91
|
+
const result = run(['--version', '1.2.4']);
|
|
92
|
+
expect(result.status).not.toBe(0);
|
|
93
|
+
expect(result.stderr).toContain('checksum mismatch');
|
|
94
|
+
expect(fs.readlinkSync(path.join(install, 'current'))).toBe('versions/1.2.3-linux-x64');
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('does not overwrite another installation or race an active installer', () => {
|
|
98
|
+
const { root, install, run } = fixture();
|
|
99
|
+
executable(path.join(root, 'user-bin/yuri'), '#!/bin/sh\necho existing\n');
|
|
100
|
+
expect(run(['--version', '1.2.3']).stderr).toContain('another installation');
|
|
101
|
+
expect(fs.readFileSync(path.join(root, 'user-bin/yuri'), 'utf8')).toContain('existing');
|
|
102
|
+
fs.mkdirSync(path.join(install, '.install-lock'));
|
|
103
|
+
expect(run(['--version', '1.2.3', '--no-link']).stderr).toContain('Another installation');
|
|
104
|
+
expect(fs.existsSync(path.join(install, 'current'))).toBe(false);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it('rejects traversal-like versions and unsupported libc explicitly', () => {
|
|
108
|
+
const { root, run } = fixture();
|
|
109
|
+
expect(run(['--version', '../not-a-version']).stderr).toContain('Invalid release version');
|
|
110
|
+
executable(path.join(root, 'tools/ldd'), '#!/bin/sh\necho musl\n');
|
|
111
|
+
expect(run(['--version', '1.2.3']).stderr).toContain('musl/Alpine is not supported');
|
|
112
|
+
});
|
package/bin/lib/DOCUMENTATION.md
CHANGED
|
@@ -21,6 +21,7 @@ Command modules implement user-facing commands and preserve output contracts acr
|
|
|
21
21
|
- Implements `yuri serve`.
|
|
22
22
|
- Owns OpenCode CLI checks, port resolution, log rotation, PID/instance registry writes, foreground/background server launch, startup summaries, and foreground shutdown behavior.
|
|
23
23
|
- The Host process always inherits the CLI's Node executable. Do not select Bun based on PATH availability: the Web API owns `better-sqlite3` and requires the prepared Node ABI.
|
|
24
|
+
- The self-contained launcher passes `--title=yuri`; propagate that explicit title to its daemon so lifecycle identity checks continue to work after relocation to a directory not named Yuri.
|
|
24
25
|
- Sets `YURI_RUNTIME=web` for ordinary CLI serve (foreground and daemon) so a leftover desktop env cannot host or probe the private relay. Preserves `YURI_RUNTIME=ssh-remote` when SSH manager already set it.
|
|
25
26
|
- `--relay-host [url]` is valid only when `YURI_RUNTIME=ssh-remote`. It enables the private relay host before startup: writes `settings.privateRelay.enabled=true` (and optional pinned `relayUrl`), and when a URL is provided also sets `YURI_RELAY_URL`. Ordinary `web` serve rejects the flag.
|
|
26
27
|
|
|
@@ -50,6 +51,7 @@ Command modules implement user-facing commands and preserve output contracts acr
|
|
|
50
51
|
- `commands-update.js`
|
|
51
52
|
- Implements `yuri update`.
|
|
52
53
|
- Loads the package-manager helper, performs update flow, and coordinates restart behavior after updates.
|
|
54
|
+
- Self-contained Linux releases are not npm-owned: reject `yuri update` before any daemon shutdown or package-manager probing and point to the bundled release installer. SSH-managed portable Hosts align through desktop reconnect.
|
|
53
55
|
- HTTP/Relay-initiated exact-version updates instead use the detached Host helper in `server/lib/host-update/`; see its documentation for admission, state recovery and supported launch modes. Never invoke this command inside the serving process to update itself.
|
|
54
56
|
|
|
55
57
|
## Shared Helper Modules
|
package/bin/lib/cli-startup.js
CHANGED
|
@@ -8,6 +8,7 @@ import { getDataDir } from './cli-paths.js';
|
|
|
8
8
|
import { hasUiPasswordConfigured } from './cli-network.js';
|
|
9
9
|
import { resolveExplicitBinary, searchPathFor } from './cli-executables.js';
|
|
10
10
|
import { isAcceptableOpenCode2HealthVersion, isOpenCode1xVersion } from '../../server/lib/opencode/opencode2-pin.js';
|
|
11
|
+
import { readPortableInstallation } from '../../server/lib/portable-installation.js';
|
|
11
12
|
|
|
12
13
|
const STARTUP_SERVICE_ID = 'dev.yuri.web';
|
|
13
14
|
|
|
@@ -325,7 +326,11 @@ ${envXml} <key>ProcessType</key>
|
|
|
325
326
|
}
|
|
326
327
|
|
|
327
328
|
function buildSystemdUserService(options = {}) {
|
|
328
|
-
const
|
|
329
|
+
const portable = readPortableInstallation();
|
|
330
|
+
const launchArgs = buildStartupArgs(options);
|
|
331
|
+
if (portable) launchArgs.shift();
|
|
332
|
+
const args = launchArgs.map((arg) => `"${systemdEscapeArg(arg)}"`).join(' ');
|
|
333
|
+
const executable = portable?.launcher || process.execPath;
|
|
329
334
|
const envFilePath = getStartupEnvFilePath();
|
|
330
335
|
return `[Unit]
|
|
331
336
|
Description=Yuri web server
|
|
@@ -334,7 +339,7 @@ After=network-online.target
|
|
|
334
339
|
[Service]
|
|
335
340
|
Type=simple
|
|
336
341
|
EnvironmentFile=-${systemdEscapeArg(envFilePath)}
|
|
337
|
-
ExecStart="${systemdEscapeArg(
|
|
342
|
+
ExecStart="${systemdEscapeArg(executable)}" ${args}
|
|
338
343
|
WorkingDirectory=${systemdUnitPath(os.homedir())}
|
|
339
344
|
Restart=always
|
|
340
345
|
RestartSec=5
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import os from 'node:os';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { expect, it, vi } from 'vitest';
|
|
5
|
+
import { enableStartupService } from './cli-startup.js';
|
|
6
|
+
|
|
7
|
+
vi.mock('child_process', () => ({ spawnSync: vi.fn(() => ({ status: 0, stdout: 'active\n' })) }));
|
|
8
|
+
vi.mock('../../server/lib/portable-installation.js', () => ({
|
|
9
|
+
readPortableInstallation: () => ({ root: '/install/versions/1.2.3', launcher: '/install/current/yuri' }),
|
|
10
|
+
}));
|
|
11
|
+
|
|
12
|
+
it('systemd uses the stable portable launcher so libraries and private Node survive minimal environments and updates', () => {
|
|
13
|
+
const home = fs.mkdtempSync(path.join(os.tmpdir(), 'yuri-portable-startup-'));
|
|
14
|
+
const platform = Object.getOwnPropertyDescriptor(process, 'platform');
|
|
15
|
+
const spy = vi.spyOn(os, 'homedir').mockReturnValue(home);
|
|
16
|
+
vi.stubEnv('YURI_DATA_DIR', path.join(home, 'data'));
|
|
17
|
+
Object.defineProperty(process, 'platform', { value: 'linux' });
|
|
18
|
+
try {
|
|
19
|
+
enableStartupService({ envSnapshot: false, port: 4321 });
|
|
20
|
+
const unit = fs.readFileSync(path.join(home, '.config/systemd/user/yuri.service'), 'utf8');
|
|
21
|
+
expect(unit).toContain('ExecStart="/install/current/yuri" "serve" "--foreground" "--port" "4321"');
|
|
22
|
+
expect(unit).not.toContain('/versions/');
|
|
23
|
+
expect(unit).not.toContain('bin/cli.js');
|
|
24
|
+
} finally {
|
|
25
|
+
Object.defineProperty(process, 'platform', platform);
|
|
26
|
+
spy.mockRestore();
|
|
27
|
+
vi.unstubAllEnvs();
|
|
28
|
+
fs.rmSync(home, { recursive: true, force: true });
|
|
29
|
+
}
|
|
30
|
+
});
|
|
@@ -324,7 +324,10 @@ async function serveCommand(options) {
|
|
|
324
324
|
await new Promise(() => {});
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
const serverArgs = [
|
|
327
|
+
const serverArgs = [
|
|
328
|
+
...(process.execArgv.includes('--title=yuri') ? ['--title=yuri'] : []),
|
|
329
|
+
serverPath, '--port', String(targetPort),
|
|
330
|
+
];
|
|
328
331
|
serverArgs.push('--host', effectiveHost);
|
|
329
332
|
if (options.apiOnly === true) {
|
|
330
333
|
serverArgs.push('--api-only');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { requestServerShutdown } from './cli-http.js';
|
|
2
2
|
import { discoverRunningInstances } from './cli-lifecycle.js';
|
|
3
|
+
import { readPortableInstallation, portableUpdateError } from '../../server/lib/portable-installation.js';
|
|
3
4
|
import {
|
|
4
5
|
readInstanceOptions,
|
|
5
6
|
removePidFile,
|
|
@@ -18,6 +19,8 @@ import {
|
|
|
18
19
|
|
|
19
20
|
function createUpdateCommand({ importFromFilePath, packageManagerPath, serveCommand }) {
|
|
20
21
|
return async function updateCommand(options = {}) {
|
|
22
|
+
const portable = readPortableInstallation();
|
|
23
|
+
if (portable) throw portableUpdateError(portable.root);
|
|
21
24
|
const showOutput = shouldRenderHumanOutput(options);
|
|
22
25
|
const updateSpin = createSpinner(options);
|
|
23
26
|
|
|
@@ -5,6 +5,12 @@ import { describe, expect, it, vi } from 'vitest';
|
|
|
5
5
|
|
|
6
6
|
import { createUpdateCommand } from './commands-update.js';
|
|
7
7
|
|
|
8
|
+
const portableFixture = vi.hoisted(() => ({ installation: null }));
|
|
9
|
+
vi.mock('../../server/lib/portable-installation.js', async (original) => ({
|
|
10
|
+
...await original(),
|
|
11
|
+
readPortableInstallation: () => portableFixture.installation,
|
|
12
|
+
}));
|
|
13
|
+
|
|
8
14
|
async function withTempYuriDataDir(fn) {
|
|
9
15
|
const previous = process.env.YURI_DATA_DIR;
|
|
10
16
|
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'yuri-update-test-'));
|
|
@@ -22,6 +28,18 @@ async function withTempYuriDataDir(fn) {
|
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
describe('update command', () => {
|
|
31
|
+
it('rejects a portable update before discovering or stopping daemons or loading a package manager', async () => {
|
|
32
|
+
const importFromFilePath = vi.fn();
|
|
33
|
+
const serveCommand = vi.fn();
|
|
34
|
+
portableFixture.installation = { root: '/portable/yuri' };
|
|
35
|
+
try {
|
|
36
|
+
const update = createUpdateCommand({ importFromFilePath, serveCommand });
|
|
37
|
+
await expect(update({ json: true })).rejects.toThrow('self-contained Yuri installation');
|
|
38
|
+
expect(importFromFilePath).not.toHaveBeenCalled();
|
|
39
|
+
expect(serveCommand).not.toHaveBeenCalled();
|
|
40
|
+
} finally { portableFixture.installation = null; }
|
|
41
|
+
});
|
|
42
|
+
|
|
25
43
|
it('uses the package-manager helpers on the update-available path', async () => {
|
|
26
44
|
await withTempYuriDataDir(async () => {
|
|
27
45
|
const originalWrite = process.stdout.write;
|