@yuriai/web 0.2.20 → 0.2.24-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/dist/assets/{AgentAvatar-MK9jNcwx.js → AgentAvatar-pXIw9gfD.js} +1 -1
- package/dist/assets/AssistantView-DouQsDKE.js +3 -0
- package/dist/assets/{DiagramView-ys2UVvx1.js → DiagramView-BSVbw3vz.js} +1 -1
- package/dist/assets/{FadeInOnReveal-B1g8C4P7.js → FadeInOnReveal-DAByozhu.js} +1 -1
- package/dist/assets/{GuiPluginSurface-C1KQZUmj.js → GuiPluginSurface--3BqaVDR.js} +1 -1
- package/dist/assets/{GuiPluginWindow-D4TIvZDn.js → GuiPluginWindow-Ccm-tyo2.js} +1 -1
- package/dist/assets/Icon-_iMMNG9-.js +1 -0
- package/dist/assets/{ImageLoadingPlaceholder-DM2ifWd8.js → ImageLoadingPlaceholder-BPEqdGkV.js} +1 -1
- package/dist/assets/{LoadingImage-BoaGSpZ_.js → LoadingImage-COJSLMyx.js} +1 -1
- package/dist/assets/MarkdownRenderer-B4jI8cPi.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-DL069I2q.js → MarkdownRendererImpl-xzqXth65.js} +1 -1
- package/dist/assets/{MarkstreamRendererImpl-CwR_p-oQ.js → MarkstreamRendererImpl-BMIQwLHf.js} +1 -1
- package/dist/assets/{MobileDetailNavigation-C7Z7mVZV.js → MobileDetailNavigation-DKbf2A_6.js} +1 -1
- package/dist/assets/{MobileResizableSheet-ChrM2_er.js → MobileResizableSheet-Cp3AyvCP.js} +1 -1
- package/dist/assets/{MobileShareBridge-DtXwoQtk.js → MobileShareBridge-CCBq7lLo.js} +1 -1
- package/dist/assets/{MobileTabPageHeader-BT7U61qi.js → MobileTabPageHeader-D7QXtACw.js} +1 -1
- package/dist/assets/{MultiRunWindow-CFWkmiwx.js → MultiRunWindow-B8_rpG1G.js} +1 -1
- package/dist/assets/{OnboardingScreen-Bb3wmiKY.js → OnboardingScreen-BwQKn_88.js} +1 -1
- package/dist/assets/{OverlayScrollbar-DD6avzvO.js → OverlayScrollbar-U7GvtZ-e.js} +1 -1
- package/dist/assets/SettingsView-6Qavf-Sp.js +29 -0
- package/dist/assets/{SettingsWindow-jF7nPmJG.js → SettingsWindow-CXupqJmO.js} +1 -1
- package/dist/assets/{TerminalView-Cms4rfIE.js → TerminalView-CtiSAJDq.js} +1 -1
- package/dist/assets/{ToolOutputDialog-CBSb39qy.js → ToolOutputDialog-Bqe9nheH.js} +4 -4
- package/dist/assets/{YuriLogo-CeZsIqiE.js → YuriLogo-BFsNnpdF.js} +1 -1
- package/dist/assets/{appThemeRegistry-Bps27som.js → appThemeRegistry-DJceS-hu.js} +1 -1
- package/dist/assets/{button--mt1oJ-H.js → button-K_jXf_uP.js} +1 -1
- package/dist/assets/{capgoAdapter-ZBPKiKyL.js → capgoAdapter-Dg4nNQh2.js} +1 -1
- package/dist/assets/{collapsible-Dh2xZynB.js → collapsible-DqW91GHI.js} +1 -1
- package/dist/assets/desktop-5DP3-Bao.js +1 -0
- package/dist/assets/{desktopHosts-B4HMNmrx.js → desktopHosts-CrVcscUO.js} +1 -1
- package/dist/assets/{desktopRelayRestore-CRl62mqn.js → desktopRelayRestore-DJFLfsuw.js} +1 -1
- package/dist/assets/{device-Coc5tapU.js → device-BKQ_0FdZ.js} +1 -1
- package/dist/assets/{diagram-CrQbE7QP.js → diagram-Pn5Vu970.js} +1 -1
- package/dist/assets/{dialog-BG9W4FO9.js → dialog-DivrqsAq.js} +1 -1
- package/dist/assets/{dropdown-menu.styles-BOP49Dw2.js → dropdown-menu.styles-zVps2mhA.js} +1 -1
- package/dist/assets/{es-CuWYQYZ1.js → es-Clj7CS2r.js} +4 -4
- package/dist/assets/{fileMentionTouchSelection-m4Xsn0cx.js → fileMentionTouchSelection-BZJxEXqc.js} +1 -1
- package/dist/assets/{fileReferenceActions-BnPPqYXw.js → fileReferenceActions-DkLLKj6A.js} +1 -1
- package/dist/assets/{fr-yebDRPGw.js → fr-dmrFQLCO.js} +3 -3
- package/dist/assets/{gitApi-C1pkEDXu.js → gitApi-DwJ926Wm.js} +1 -1
- package/dist/assets/{gitApiHttp-CoNokuDM.js → gitApiHttp-Bnr4_wxy.js} +2 -2
- package/dist/assets/{host-BqNFap4A.js → host-DgJqhX6n.js} +1 -1
- package/dist/assets/{input-BMUm4I0i.js → input-BcXfvvm_.js} +1 -1
- package/dist/assets/insertionBoundaries-CW0uddv6.js +1 -0
- package/dist/assets/{ja-f1wDEfxS.js → ja-Co0dxiN_.js} +3 -3
- package/dist/assets/{ko-n8CMb8k9.js → ko-BltElAGq.js} +3 -3
- package/dist/assets/{main-djohnOii.js → main-By5dfId1.js} +2 -2
- package/dist/assets/main-DfGYCP4r.js +169 -0
- package/dist/assets/{markdownHeightCache-BWrnxGTO.js → markdownHeightCache-BaLmCxOF.js} +1 -1
- package/dist/assets/{mcpQueries-BfSiXImW.js → mcpQueries-Dj92UHx8.js} +1 -1
- package/dist/assets/{miniChat-DXN8mcdi.js → miniChat-sd1i9oFo.js} +2 -2
- package/dist/assets/mobile-D7tGc16i.js +2 -0
- package/dist/assets/{mobileBackNavigation-EIV61ZvG.js → mobileBackNavigation-DLoxo_5a.js} +1 -1
- package/dist/assets/{multirun-Dfuqt2Sd.js → multirun-aJrcR-3s.js} +1 -1
- package/dist/assets/{native-config-Cswl9jqU.js → native-config-rI_f4c03.js} +1 -1
- package/dist/assets/{persistence-CNEHspb4.js → persistence-BPb2hZ3c.js} +2 -2
- package/dist/assets/{pl-BpveZ1bR.js → pl-qd6Wnl7H.js} +4 -4
- package/dist/assets/{platform-Q45KPuGv.js → platform-wGCQUVxr.js} +1 -1
- package/dist/assets/{projectMeta-CuVxfoYb.js → projectMeta-DFRAlLUB.js} +1 -1
- package/dist/assets/{pt-BR-bq37AHb6.js → pt-BR-CsOFfQXS.js} +4 -4
- package/dist/assets/{readiness-DDF6yf-o.js → readiness-B5Cd9iIF.js} +1 -1
- package/dist/assets/{renderElectronMiniChatApp-Cfs2xjgL.js → renderElectronMiniChatApp-BVZT6wbt.js} +2 -2
- package/dist/assets/renderMobileApp-DW85f4t0.js +28 -0
- package/dist/assets/{runtimeConfig-DTkP4z43.js → runtimeConfig-kFdO-lRx.js} +1 -1
- package/dist/assets/runtimeEndpointReset-Cn9N7LPW.js +149 -0
- package/dist/assets/{scheduledTaskNavigation-7slq1geN.js → scheduledTaskNavigation-Bk2y-IY1.js} +1 -1
- package/dist/assets/{sessionChangeSummary-BYv_KUyn.js → sessionChangeSummary-BIbSjhps.js} +1 -1
- package/dist/assets/{sessionLookup-Cx0pE6yS.js → sessionLookup-5rU7IMVC.js} +1 -1
- package/dist/assets/{sortable-tabs-strip-D_efLXen.js → sortable-tabs-strip-DR_NRIKS.js} +1 -1
- package/dist/assets/{speechSettingsQueries-BxHtdoOT.js → speechSettingsQueries-BywoZDLQ.js} +3 -3
- package/dist/assets/src-BxW5eh2m.css +2 -0
- package/dist/assets/{store-CKBj6kYd.js → store-7wItZZ7_.js} +3 -3
- package/dist/assets/{terminalApi-DFhCeMya.js → terminalApi-Cjd7Jry6.js} +1 -1
- package/dist/assets/{textarea-CNvFHvhC.js → textarea-BnV-WjE-.js} +1 -1
- package/dist/assets/toolHelpers-iEHVHQ9p.js +2 -0
- package/dist/assets/{tooltip-C-gdI2Am.js → tooltip-8gf-KZqb.js} +1 -1
- package/dist/assets/types-C7xcxIWY.js +2 -0
- package/dist/assets/{uk-Ds3imyqV.js → uk-BNrdZFvK.js} +4 -4
- package/dist/assets/{useAppFontEffects-Ucq0gPN8.js → useAppFontEffects-fNQVBUds.js} +53 -53
- package/dist/assets/{useDesktopWindowControlsLayout-BEscodj1.js → useDesktopWindowControlsLayout-HSNk-2BM.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-BWRQNoDF.js → useEffectiveDirectory-BAXWl1Le.js} +1 -1
- package/dist/assets/{useFontPreferences-DmeLn0t9.js → useFontPreferences-CGThMzt0.js} +1 -1
- package/dist/assets/{useMobileNavigationStore-DzkVc9H_.js → useMobileNavigationStore-NybUtx0x.js} +16 -16
- package/dist/assets/useWorkerHighlightedLines-BJ1sv_hM.js +7 -0
- package/dist/assets/{zh-CN-BNJ3ElZ9.js → zh-CN-DMvJXS23.js} +4 -4
- package/dist/assets/{zh-TW-C0jQloeH.js → zh-TW-D0wsKLs1.js} +4 -4
- package/dist/index.html +13 -13
- package/dist/mini-chat.html +13 -13
- package/dist/mobile.html +13 -13
- package/package.json +1 -1
- package/server/index.d.ts +9 -0
- package/server/index.js +10 -0
- package/server/lib/assistants/DOCUMENTATION.md +15 -0
- package/server/lib/assistants/harness.js +1 -4
- package/server/lib/assistants/harness.test.js +38 -0
- package/server/lib/assistants/summary.test.js +32 -0
- package/server/lib/realtime-proxy.js +2 -1
- package/server/lib/relay/tunnel-host.js +1 -0
- package/server/lib/remote-desktop/DOCUMENTATION.md +97 -0
- package/server/lib/remote-desktop/protocol.js +27 -0
- package/server/lib/remote-desktop/protocol.test.js +21 -0
- package/server/lib/remote-desktop/runtime.js +114 -0
- package/server/lib/remote-desktop/runtime.test.js +155 -0
- package/server/lib/ui-auth/DOCUMENTATION.md +2 -0
- package/server/lib/ui-auth/ui-auth.js +2 -1
- package/dist/assets/AssistantView-CVf9ta92.js +0 -3
- package/dist/assets/Icon-C93bLV0e.js +0 -1
- package/dist/assets/MarkdownRenderer-B8LWUc6A.js +0 -2
- package/dist/assets/SettingsView-B4xkRLZ3.js +0 -29
- package/dist/assets/desktop-CiqEZVr5.js +0 -1
- package/dist/assets/insertionBoundaries-WLpirs0A.js +0 -1
- package/dist/assets/main-CNmq04w8.js +0 -169
- package/dist/assets/mobile--08sYbKy.js +0 -2
- package/dist/assets/renderMobileApp-B66uW5zc.js +0 -28
- package/dist/assets/runtimeEndpointReset-BMAP5ZCY.js +0 -149
- package/dist/assets/src-DHHaXffU.css +0 -2
- package/dist/assets/toolHelpers-DL452NVK.js +0 -2
- package/dist/assets/types-BHKyslK4.js +0 -2
- package/dist/assets/useWorkerHighlightedLines-Dz6lLZ-1.js +0 -7
package/dist/index.html
CHANGED
|
@@ -560,15 +560,15 @@
|
|
|
560
560
|
opacity: 0.72;
|
|
561
561
|
}
|
|
562
562
|
</style>
|
|
563
|
-
<script type="module" crossorigin src="/assets/main-
|
|
563
|
+
<script type="module" crossorigin src="/assets/main-By5dfId1.js"></script>
|
|
564
564
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
565
565
|
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-BaBM02zI.js">
|
|
566
566
|
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-DhMY9eiB.js">
|
|
567
567
|
<link rel="modulepreload" crossorigin href="/assets/runtime-fetch-DfALP7-b.js">
|
|
568
568
|
<link rel="modulepreload" crossorigin href="/assets/runtimeAPIRegistry-C2VogTny.js">
|
|
569
|
-
<link rel="modulepreload" crossorigin href="/assets/desktop-
|
|
570
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-
|
|
571
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-
|
|
569
|
+
<link rel="modulepreload" crossorigin href="/assets/desktop-5DP3-Bao.js">
|
|
570
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-CrVcscUO.js">
|
|
571
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-DJFLfsuw.js">
|
|
572
572
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-CdzJ6My_.js">
|
|
573
573
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-o69pgTEK.js">
|
|
574
574
|
<link rel="modulepreload" crossorigin href="/assets/vendor-effect-DV9F8PTZ.js">
|
|
@@ -581,22 +581,22 @@
|
|
|
581
581
|
<link rel="modulepreload" crossorigin href="/assets/queryRuntime-DWgXfxGx.js">
|
|
582
582
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
583
583
|
<link rel="modulepreload" crossorigin href="/assets/pathNormalization-ewtPqJWn.js">
|
|
584
|
-
<link rel="modulepreload" crossorigin href="/assets/persistence-
|
|
584
|
+
<link rel="modulepreload" crossorigin href="/assets/persistence-BPb2hZ3c.js">
|
|
585
585
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-CdqCAt40.js">
|
|
586
586
|
<link rel="modulepreload" crossorigin href="/assets/fileQueries-Bd-OEFmO.js">
|
|
587
587
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-store-BVRgEtI-.js">
|
|
588
588
|
<link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
|
|
589
589
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
590
590
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-DtsKbFf3.js">
|
|
591
|
-
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-
|
|
592
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
591
|
+
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-Bnr4_wxy.js">
|
|
592
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-Cjd7Jry6.js">
|
|
593
593
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-xvItwYMc.js">
|
|
594
|
-
<link rel="modulepreload" crossorigin href="/assets/platform-
|
|
595
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
596
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
597
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
598
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
599
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
594
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-wGCQUVxr.js">
|
|
595
|
+
<link rel="modulepreload" crossorigin href="/assets/types-C7xcxIWY.js">
|
|
596
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-Dg4nNQh2.js">
|
|
597
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-rI_f4c03.js">
|
|
598
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-kFdO-lRx.js">
|
|
599
|
+
<link rel="stylesheet" crossorigin href="/assets/src-BxW5eh2m.css">
|
|
600
600
|
</head>
|
|
601
601
|
<body class="h-full bg-background text-foreground">
|
|
602
602
|
<!-- Keep the startup layer outside #root. React replaces every child of
|
package/dist/mini-chat.html
CHANGED
|
@@ -77,15 +77,15 @@
|
|
|
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-sd1i9oFo.js"></script>
|
|
81
81
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
82
82
|
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-BaBM02zI.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-DhMY9eiB.js">
|
|
84
84
|
<link rel="modulepreload" crossorigin href="/assets/runtime-fetch-DfALP7-b.js">
|
|
85
85
|
<link rel="modulepreload" crossorigin href="/assets/runtimeAPIRegistry-C2VogTny.js">
|
|
86
|
-
<link rel="modulepreload" crossorigin href="/assets/desktop-
|
|
87
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-
|
|
88
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-
|
|
86
|
+
<link rel="modulepreload" crossorigin href="/assets/desktop-5DP3-Bao.js">
|
|
87
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-CrVcscUO.js">
|
|
88
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-DJFLfsuw.js">
|
|
89
89
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-CdzJ6My_.js">
|
|
90
90
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-o69pgTEK.js">
|
|
91
91
|
<link rel="modulepreload" crossorigin href="/assets/vendor-effect-DV9F8PTZ.js">
|
|
@@ -98,22 +98,22 @@
|
|
|
98
98
|
<link rel="modulepreload" crossorigin href="/assets/queryRuntime-DWgXfxGx.js">
|
|
99
99
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
100
100
|
<link rel="modulepreload" crossorigin href="/assets/pathNormalization-ewtPqJWn.js">
|
|
101
|
-
<link rel="modulepreload" crossorigin href="/assets/persistence-
|
|
101
|
+
<link rel="modulepreload" crossorigin href="/assets/persistence-BPb2hZ3c.js">
|
|
102
102
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-CdqCAt40.js">
|
|
103
103
|
<link rel="modulepreload" crossorigin href="/assets/fileQueries-Bd-OEFmO.js">
|
|
104
104
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-store-BVRgEtI-.js">
|
|
105
105
|
<link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
|
|
106
106
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
107
107
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-DtsKbFf3.js">
|
|
108
|
-
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-
|
|
109
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
108
|
+
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-Bnr4_wxy.js">
|
|
109
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-Cjd7Jry6.js">
|
|
110
110
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-xvItwYMc.js">
|
|
111
|
-
<link rel="modulepreload" crossorigin href="/assets/platform-
|
|
112
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
113
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
114
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
115
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
116
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
111
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-wGCQUVxr.js">
|
|
112
|
+
<link rel="modulepreload" crossorigin href="/assets/types-C7xcxIWY.js">
|
|
113
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-Dg4nNQh2.js">
|
|
114
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-rI_f4c03.js">
|
|
115
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-kFdO-lRx.js">
|
|
116
|
+
<link rel="stylesheet" crossorigin href="/assets/src-BxW5eh2m.css">
|
|
117
117
|
</head>
|
|
118
118
|
<body class="h-full bg-background text-foreground">
|
|
119
119
|
<div id="root" class="h-full">
|
package/dist/mobile.html
CHANGED
|
@@ -64,15 +64,15 @@
|
|
|
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-D7tGc16i.js"></script>
|
|
68
68
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
69
69
|
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-BaBM02zI.js">
|
|
70
70
|
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-DhMY9eiB.js">
|
|
71
71
|
<link rel="modulepreload" crossorigin href="/assets/runtime-fetch-DfALP7-b.js">
|
|
72
72
|
<link rel="modulepreload" crossorigin href="/assets/runtimeAPIRegistry-C2VogTny.js">
|
|
73
|
-
<link rel="modulepreload" crossorigin href="/assets/desktop-
|
|
74
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-
|
|
75
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-
|
|
73
|
+
<link rel="modulepreload" crossorigin href="/assets/desktop-5DP3-Bao.js">
|
|
74
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-CrVcscUO.js">
|
|
75
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-DJFLfsuw.js">
|
|
76
76
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-CdzJ6My_.js">
|
|
77
77
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-o69pgTEK.js">
|
|
78
78
|
<link rel="modulepreload" crossorigin href="/assets/vendor-effect-DV9F8PTZ.js">
|
|
@@ -85,22 +85,22 @@
|
|
|
85
85
|
<link rel="modulepreload" crossorigin href="/assets/queryRuntime-DWgXfxGx.js">
|
|
86
86
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
87
87
|
<link rel="modulepreload" crossorigin href="/assets/pathNormalization-ewtPqJWn.js">
|
|
88
|
-
<link rel="modulepreload" crossorigin href="/assets/persistence-
|
|
88
|
+
<link rel="modulepreload" crossorigin href="/assets/persistence-BPb2hZ3c.js">
|
|
89
89
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-CdqCAt40.js">
|
|
90
90
|
<link rel="modulepreload" crossorigin href="/assets/fileQueries-Bd-OEFmO.js">
|
|
91
91
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-store-BVRgEtI-.js">
|
|
92
92
|
<link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
|
|
93
93
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
94
94
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-DtsKbFf3.js">
|
|
95
|
-
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-
|
|
96
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
95
|
+
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-Bnr4_wxy.js">
|
|
96
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-Cjd7Jry6.js">
|
|
97
97
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-xvItwYMc.js">
|
|
98
|
-
<link rel="modulepreload" crossorigin href="/assets/platform-
|
|
99
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
100
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
101
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
103
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
98
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-wGCQUVxr.js">
|
|
99
|
+
<link rel="modulepreload" crossorigin href="/assets/types-C7xcxIWY.js">
|
|
100
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-Dg4nNQh2.js">
|
|
101
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-rI_f4c03.js">
|
|
102
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-kFdO-lRx.js">
|
|
103
|
+
<link rel="stylesheet" crossorigin href="/assets/src-BxW5eh2m.css">
|
|
104
104
|
</head>
|
|
105
105
|
<body class="h-full bg-background text-foreground">
|
|
106
106
|
<div id="root" class="h-full">
|
package/package.json
CHANGED
package/server/index.d.ts
CHANGED
|
@@ -31,6 +31,15 @@ export interface StartWebUiServerOptions {
|
|
|
31
31
|
messageQueueAttachmentRoot?: string | null;
|
|
32
32
|
hostUpdateStateFile?: string;
|
|
33
33
|
getHostUpdateVersion?: () => string;
|
|
34
|
+
remoteDesktopAdapter?: {
|
|
35
|
+
supported: boolean;
|
|
36
|
+
readonly enabled: boolean;
|
|
37
|
+
start: (options: { send: (message: unknown) => boolean; onEnded: () => void; signal: AbortSignal; client: { id: string; label: string } | null }) => Promise<{
|
|
38
|
+
handle: (message: unknown) => void | Promise<void>;
|
|
39
|
+
close: () => void;
|
|
40
|
+
}>;
|
|
41
|
+
stop?: () => void;
|
|
42
|
+
};
|
|
34
43
|
hostUpdateAdapter?: {
|
|
35
44
|
host: 'cli' | 'electron';
|
|
36
45
|
supported: boolean;
|
package/server/index.js
CHANGED
|
@@ -122,6 +122,7 @@ import { createProjectConfigRuntime } from './lib/projects/project-config.js';
|
|
|
122
122
|
import { createRemoteClientAuthRuntime } from './lib/client-auth/remote-clients.js';
|
|
123
123
|
import { createHostUpdateRuntime } from './lib/host-update/runtime.js';
|
|
124
124
|
import { createCliUpdateAdapter } from './lib/host-update/cli.js';
|
|
125
|
+
import { attachRemoteDesktop } from './lib/remote-desktop/runtime.js';
|
|
125
126
|
import { getOrCreateInstallId } from './lib/package-manager.js';
|
|
126
127
|
import { applyRuntimeCorsHeaders } from './lib/request-cors.js';
|
|
127
128
|
import { createClientPairingRuntime } from './lib/client-auth/pairing.js';
|
|
@@ -1920,6 +1921,14 @@ async function main(options = {}) {
|
|
|
1920
1921
|
}, 0);
|
|
1921
1922
|
}
|
|
1922
1923
|
uiAuthController = bootstrapResult.uiAuthController;
|
|
1924
|
+
const remoteDesktopRuntime = attachRemoteDesktop({
|
|
1925
|
+
app, server, adapter: options.remoteDesktopAdapter, uiAuthController, isRequestOriginAllowed,
|
|
1926
|
+
isClientActive: async (id) => {
|
|
1927
|
+
const clients = await remoteClientAuthRuntime.listClients();
|
|
1928
|
+
return clients.some((client) => client.id === id && !client.revokedAt
|
|
1929
|
+
&& (!client.expiresAt || Date.parse(client.expiresAt) > Date.now()));
|
|
1930
|
+
},
|
|
1931
|
+
});
|
|
1923
1932
|
realtimeProxyRuntime = attachRealtimeProxy({
|
|
1924
1933
|
app,
|
|
1925
1934
|
server,
|
|
@@ -2228,6 +2237,7 @@ async function main(options = {}) {
|
|
|
2228
2237
|
console.warn('[message-queue] Failed to close durable database during shutdown');
|
|
2229
2238
|
}
|
|
2230
2239
|
realtimeProxyRuntime.stop();
|
|
2240
|
+
remoteDesktopRuntime.stop();
|
|
2231
2241
|
liveActivityRefreshRuntime.dispose();
|
|
2232
2242
|
notificationTriggerRuntime.dispose();
|
|
2233
2243
|
if (relayReconcileTimer) clearInterval(relayReconcileTimer);
|
|
@@ -48,6 +48,21 @@ show temporary error feedback until a newer message arrives; reconnect/restart d
|
|
|
48
48
|
not recover errors. Errors do not become list previews, unread counts, or LLM memory.
|
|
49
49
|
Worker-card execution status remains part of the card's authoritative state.
|
|
50
50
|
|
|
51
|
+
## Contact attachment chronology
|
|
52
|
+
|
|
53
|
+
Historical files stay on their original user message in model context. The
|
|
54
|
+
completion adapter's pending-file fallback contains only the current turn's
|
|
55
|
+
`userParts`, never files collected from history. A text-only confirmation must
|
|
56
|
+
not resubmit older images or documents as new attachments; a new upload must not
|
|
57
|
+
be mixed with historical files. This also holds across tool follow-up completions.
|
|
58
|
+
The Host owns this behavior for web, Electron, hosted mobile and Capacitor clients;
|
|
59
|
+
no transcript migration or attachment deletion is needed.
|
|
60
|
+
|
|
61
|
+
When a turn falls out of the bounded history window, its file parts fall out with
|
|
62
|
+
it. Rolling summaries receive text only, not original attachment bytes; relevant
|
|
63
|
+
facts already described in conversation may survive as summary text. Stored
|
|
64
|
+
attachments remain available in the transcript UI.
|
|
65
|
+
|
|
51
66
|
## Avatar identity
|
|
52
67
|
|
|
53
68
|
`avatarSeed` is an optional nonempty string (maximum 256 characters) on create
|
|
@@ -544,10 +544,7 @@ export async function runContactTurn({
|
|
|
544
544
|
// streamFn receives the model; completions needs providerID/modelID.
|
|
545
545
|
model.name = `${providerID}/${modelID}`;
|
|
546
546
|
|
|
547
|
-
const pendingFileParts =
|
|
548
|
-
...(Array.isArray(history) ? history.flatMap((message) => completionFileParts(message.parts)) : []),
|
|
549
|
-
...completionFileParts(userParts),
|
|
550
|
-
];
|
|
547
|
+
const pendingFileParts = completionFileParts(userParts);
|
|
551
548
|
const prior = Array.isArray(history)
|
|
552
549
|
? history.map((message) => (
|
|
553
550
|
message.role === 'assistant'
|
|
@@ -363,6 +363,44 @@ describe('createContactStreamFn', () => {
|
|
|
363
363
|
})
|
|
364
364
|
})
|
|
365
365
|
|
|
366
|
+
it.each([
|
|
367
|
+
{ name: 'text-only confirmation', currentParts: [] },
|
|
368
|
+
{ name: 'new image', currentParts: [{ type: 'file', mime: 'image/png', url: 'data:image/png;base64,bmV3', filename: 'current.png' }] },
|
|
369
|
+
{ name: 'new text file', currentParts: [{ type: 'file', mime: 'text/plain', url: 'data:text/plain;base64,bmV3', filename: 'current.txt' }] },
|
|
370
|
+
])('keeps historical attachments on their original message for a $name through tool follow-ups', async ({ currentParts }) => {
|
|
371
|
+
const historicalParts = [
|
|
372
|
+
{ type: 'file', mime: 'image/png', url: 'data:image/png;base64,b2xk', filename: 'earlier.png' },
|
|
373
|
+
{ type: 'file', mime: 'text/plain', url: 'data:text/plain;base64,b2xk', filename: 'earlier.txt' },
|
|
374
|
+
]
|
|
375
|
+
const requests = []
|
|
376
|
+
const execute = vi.fn(async () => ({ content: [{ type: 'text', text: 'Checked.' }] }))
|
|
377
|
+
await runContactTurn({
|
|
378
|
+
assistant: { providerID: 'p', modelID: 'm' },
|
|
379
|
+
history: [
|
|
380
|
+
{ role: 'user', content: 'Read these earlier attachments.', parts: historicalParts },
|
|
381
|
+
{ role: 'assistant', content: 'Read them.' },
|
|
382
|
+
{ role: 'user', content: 'Change the scheduled task model.' },
|
|
383
|
+
{ role: 'assistant', content: 'Should the remaining task use that model too?' },
|
|
384
|
+
],
|
|
385
|
+
userText: 'Yes.',
|
|
386
|
+
userParts: [{ type: 'text', text: 'Yes.' }, ...currentParts],
|
|
387
|
+
tools: [{ name: 'probe', description: 'Check.', parameters: { type: 'object', properties: {} }, execute }],
|
|
388
|
+
createChatCompletion: async ({ body }) => {
|
|
389
|
+
requests.push(body.messages)
|
|
390
|
+
return requests.length === 1 ? toolCall('probe', {}) : { text: 'Done.' }
|
|
391
|
+
},
|
|
392
|
+
})
|
|
393
|
+
expect(execute).toHaveBeenCalledTimes(1)
|
|
394
|
+
expect(requests).toHaveLength(2)
|
|
395
|
+
for (const messages of requests) {
|
|
396
|
+
expect(messages.find((message) => message.content === 'Read these earlier attachments.').parts).toEqual(historicalParts)
|
|
397
|
+
expect(messages.findLast((message) => message.role === 'user')).toEqual({
|
|
398
|
+
role: 'user', content: 'Yes.', ...(currentParts.length > 0 ? { parts: currentParts } : {}),
|
|
399
|
+
})
|
|
400
|
+
expect(messages.some((message) => message.role === 'assistant' && message.content === 'Should the remaining task use that model too?')).toBe(true)
|
|
401
|
+
}
|
|
402
|
+
})
|
|
403
|
+
|
|
366
404
|
it('keeps thinking off and never installs bash/edit/read/write when sending attachments', async () => {
|
|
367
405
|
const prompt = vi.fn(async function prompt() {
|
|
368
406
|
this.state.messages = [{
|
|
@@ -66,6 +66,38 @@ describe('ensureContactSummary', () => {
|
|
|
66
66
|
db.close();
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
+
it('drops original attachments with compressed turns while retaining text context and the stored upload', async () => {
|
|
70
|
+
const db = openDb();
|
|
71
|
+
try {
|
|
72
|
+
const image = { type: 'file', mime: 'image/png', url: 'data:image/png;base64,b2xk', filename: 'earlier.png' };
|
|
73
|
+
const messageID = crypto.randomUUID();
|
|
74
|
+
insertContactMessage(db, {
|
|
75
|
+
messageID, assistantID: 'a', role: 'user', turnID: crypto.randomUUID(), bubbleIndex: 0, createdAt: Date.now(),
|
|
76
|
+
ordinal: nextContactOrdinal(db, 'a'), status: 'complete',
|
|
77
|
+
parts: [{ type: 'text', text: 'Explain the earlier screenshot.' }, image],
|
|
78
|
+
});
|
|
79
|
+
add(db, 'a', 'assistant', 'The earlier screenshot shows a rejected appeal.');
|
|
80
|
+
fill(db, 'a', 40);
|
|
81
|
+
|
|
82
|
+
const complete = vi.fn(async () => 'Earlier discussion concerned a rejected appeal.');
|
|
83
|
+
expect(await ensureContactSummary(db, 'a', { complete })).toBe(true);
|
|
84
|
+
const input = complete.mock.calls[0][0];
|
|
85
|
+
expect(input.user).toContain('The earlier screenshot shows a rejected appeal.');
|
|
86
|
+
expect(JSON.stringify(input)).not.toContain(image.url);
|
|
87
|
+
expect(JSON.stringify(input)).not.toContain(image.filename);
|
|
88
|
+
|
|
89
|
+
const history = contactHistoryForLlm(db, 'a');
|
|
90
|
+
expect(history[0].content).toContain('Earlier discussion concerned a rejected appeal.');
|
|
91
|
+
expect(history.every((message) => !message.parts?.length)).toBe(true);
|
|
92
|
+
expect(JSON.stringify(history)).not.toContain(image.url);
|
|
93
|
+
expect(JSON.stringify(history)).not.toContain('Explain the earlier screenshot.');
|
|
94
|
+
const stored = db.prepare('SELECT part_json FROM assistant_contact_part WHERE message_id=? ORDER BY ordinal').all(messageID);
|
|
95
|
+
expect(stored.map((row) => JSON.parse(row.part_json))).toEqual(expect.arrayContaining([expect.objectContaining(image)]));
|
|
96
|
+
} finally {
|
|
97
|
+
db.close();
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
69
101
|
it('keeps the previous state when the model fails', async () => {
|
|
70
102
|
const db = openDb();
|
|
71
103
|
fill(db, 'a', 40);
|
|
@@ -14,7 +14,8 @@ const isAllowedSsePath = (pathname) => {
|
|
|
14
14
|
const isAllowedWebSocketPath = (pathname) => {
|
|
15
15
|
return pathname === '/api/event/ws'
|
|
16
16
|
|| pathname === '/api/global/event/ws'
|
|
17
|
-
|| pathname === '/api/terminal/ws'
|
|
17
|
+
|| pathname === '/api/terminal/ws'
|
|
18
|
+
|| pathname === '/api/remote-desktop/ws';
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
const normalizeBaseUrl = (value) => {
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Remote desktop
|
|
2
|
+
|
|
3
|
+
## Ownership and supported runtimes
|
|
4
|
+
|
|
5
|
+
- `runtime.js` owns the authenticated `/api/remote-desktop/ws` session and `/api/remote-desktop` capability response. The routes are installed before the OpenCode proxy/SPA fallback.
|
|
6
|
+
- Electron injects a process-local adapter from `packages/electron/remote-desktop.mjs`. Only that Electron Host's physical primary display is captured, irrespective of which OpenCode/runtime the desktop window currently shows.
|
|
7
|
+
- The first native input adapter is macOS (Quartz events, Screen Recording and Accessibility consent). CLI/headless, Windows and Linux Hosts return `supported: false`, and WS upgrade returns 501. VS Code explicitly returns 501 rather than proxying these routes to OpenCode.
|
|
8
|
+
- Hosted mobile and Capacitor iOS/Android use the same receiving browser UI. No native WebRTC plugin, new dependency, separate desktop server, or OpenCode changes are required.
|
|
9
|
+
|
|
10
|
+
## Authorization and lifetime
|
|
11
|
+
|
|
12
|
+
Remote desktop is opt-in. The native-only approval store also owns an `enabled` Boolean that defaults false when missing or malformed; pre-existing device approvals do not imply the feature is enabled. `/api/remote-desktop` exposes `{ supported, enabled }`, and WS upgrades are rejected with 403 while disabled, before starting native consent or capture. The native adapter checks the preference independently. Only local main-frame desktop IPC can inspect setup permissions, change the switch, or request a fixed macOS permission pane. There is no HTTP endpoint to enable it remotely.
|
|
13
|
+
|
|
14
|
+
The local desktop Settings → Remote instances → Remote desktop group checks Screen Recording, Accessibility for the app and the actual helper executable, and helper installation. The helper's check-only mode posts no input events. Enabling requires all checks to pass and a successful atomic preference write. Closing the switch immediately ends active and pending native sessions. Failed disable persistence leaves the current app run blocked rather than restoring remote access; a restart may still load the old persisted preference, so the failure is visible and must be retried. The existing serialized native store retains the enable preference; legacy device approval IDs are preserved but ignored. UI permission reads use Query, mutations refresh only their native setup/capability keys, stale runtime completions are rejected, and read failures preserve the last snapshot with explicit error feedback. Non-desktop and remote-runtime Settings cannot change local macOS grants. Unsupported desktop platforms show an unsupported state.
|
|
15
|
+
|
|
16
|
+
The WebSocket must authenticate a paired client or a real password-protected owner session. Password-less/forged owner cookies, loopback source, and raw bearer credentials in query parameters do not qualify. Browser sockets use the existing scoped `yuri_url_token`; the Host checks origin even when password auth is disabled. Both tunnel and URL-token allowlists include exactly `/api/remote-desktop/ws`. Desktop realtime proxying also permits this exact path. No Relay wire-frame types or crypto format change.
|
|
17
|
+
|
|
18
|
+
Once enabled locally and system permissions are granted, authenticated paired devices and password-authenticated owner sessions start directly without a per-connection confirmation, approval checkbox, or visible sharing-control window. Startup rechecks Screen Recording and app/helper Accessibility without requesting new permissions; revoked/missing grants fail closed and must be restored from local Settings. The only capture BrowserWindow is hidden and remains isolated. No Stop/Forget preload methods or IPC listeners remain. Close the remote view, disable the local setting, or revoke device pairing to stop control. Remote client revocation remains authoritative; no authentication or origin gate is bypassed. macOS-owned permission prompts and recording indicators are not hidden.
|
|
19
|
+
|
|
20
|
+
There is one active or pending capture per Host. Stopping the Host, disabling the feature, closing the remote view/socket, backgrounding the phone, removing/changing a display, or a native failure stops the session. Client pings are every 5 seconds; 20 seconds without a ping ends the Host session. Active client revocation is checked every 5 seconds, failing closed on store failure. Maximum session length is one hour. Initial client startup has a 60-second deadline, capability requests a 10-second deadline, and native capture readiness has a 15-second deadline.
|
|
21
|
+
|
|
22
|
+
Runtime generation/transport identity are captured when opening the view. No input or delayed auth result can connect to a different Host. Failure is not an empty success. Reconnection is explicit. Closing a pending session aborts startup; a later permission check or source-discovery completion is immediately disposed. EOF on the helper's pipe releases a held mouse button.
|
|
23
|
+
|
|
24
|
+
## Media and control
|
|
25
|
+
|
|
26
|
+
The isolated file-origin capture window uses Electron's `desktopCapturer` screen identity and Chromium's desktop `getUserMedia`, constrained to 2560×1440 and 30 fps so zoom can request more detail. Normal encoder output remains bounded by the ordinary adaptive tiers below. Chromium owns negotiated video codec and hardware acceleration; H.264 is not forced. A WebRTC offer/answer and trickle ICE pass over the authenticated WS. Media uses WebRTC DTLS-SRTP. Over Relay, the fingerprint-bearing signaling and control are also protected by the existing E2EE tunnel; media does not use Yuri's tunnel encryption format.
|
|
27
|
+
|
|
28
|
+
The capture renderer's `remote-desktop-quality.mjs` adds encoder ceilings alongside Chromium's own congestion control, with `degradationPreference: balanced`. Initial output is the 720p tier, not full quality. For a 1920×1080 capture, the tiers are:
|
|
29
|
+
|
|
30
|
+
| Output ceiling | FPS ceiling | Bitrate ceiling | 1080p reference divisor |
|
|
31
|
+
| --- | --- | --- | --- |
|
|
32
|
+
| 640×360 | 8 | 350 kbps | 3 |
|
|
33
|
+
| 960×540 | 12 | 750 kbps | 2 |
|
|
34
|
+
| 1280×720 (initial) | 20 | 1.5 Mbps | 1.5 |
|
|
35
|
+
| 1920×1080 | 30 | 3 Mbps | 1 |
|
|
36
|
+
|
|
37
|
+
Normal dimensions are bounded independently of source size while preserving its aspect ratio, with no upscaling of smaller captures. The reference divisor is multiplied by `max(sourceWidth / 1920, sourceHeight / 1080)` and clamped to at least 1: for a 2560×1440 source, the initial divisor is 2 and output is still 1280×720, not 960p. These are ceilings, not guaranteed throughput or bandwidth reservations. Every 2 seconds while connected, the renderer reads current video outbound stats and their linked remote RTP/selected ICE pair, ignoring unrelated streams/pairs. Two consecutive pressured samples step down one tier: bandwidth/CPU limitation, fresh loss ≥5%, selected-path capacity below 75% of the current ceiling, RTT >450ms, or RTT above 250ms and 150ms above its session minimum. Eight consecutive healthy samples step up one tier, requiring no limitation, loss <2% when present, RTT <250ms when present and estimated capacity ≥110% of the next tier when available. Without capacity estimates, fresh loss and RTT feedback are required for recovery. Missing, repeated and idle samples reset the streaks rather than proving spare bandwidth; stalled sends with explicit bandwidth/CPU limitation still count as pressure. Low bytes-per-second alone is never treated as congestion. Unsupported/failed stats or parameter calls retain the last working settings and retry without forcing JPEG fallback. Updates preserve encoding identity and sender transaction parameters; sampling never overlaps and stops on fallback/unload. No user-facing quality toggle is introduced.
|
|
38
|
+
|
|
39
|
+
### Zoom detail priority and mixed versions
|
|
40
|
+
|
|
41
|
+
Pinch or Drag double-tap zoom enters detail priority above 1.05× and leaves at or below 1.01× (hysteresis avoids near-Fit chatter). The panel sends only state transitions, not a message per movement/frame, and retains no extra React/server cache state. The session connection negotiates this through `ready.zoomQuality: true` before sending `{ type: 'view', zoomed: boolean }`; startup retains only the latest desired state. Runtime switching/close forbids late messages. Old/non-advertising Hosts receive no new message and keep existing local zoom. New Hosts with old clients default to ordinary adaptive quality.
|
|
42
|
+
|
|
43
|
+
The backend explicitly passes `zoomQuality: true` when starting a supporting adapter; the native adapter defaults this flag false and passes it into capture startup. Only a full supporting backend/native/capture path advertises support. This also covers a newer installer running an older OTA backend. The server ignores valid `view` controls if its native adapter did not advertise support; the parser accepts only a Boolean and projects away client-supplied bitrate/resolution values. Electron forwards the view control to capture, never to the Quartz input helper. Authentication/origin, session lifetime, rate/size limits and Relay framing remain unchanged.
|
|
44
|
+
|
|
45
|
+
While zoomed, all four WebRTC tiers use `scaleResolutionDownBy: 1` (up to the captured 1440p source) and `degradationPreference: maintain-resolution`. They keep the same adaptive bitrate ceilings but reduce FPS ceilings to 2 / 5 / 10 / 15 respectively, prioritizing text detail over motion instead of blindly raising bandwidth. Fit immediately restores the ordinary resolution/FPS of the current tier, not a new high-quality default. Chromium still owns actual congestion handling; this is a resolution preference, not a guarantee that a severely constrained network can deliver a sharp frame immediately. Parameter writes are serialized, latest zoom state wins over an in-flight update, and failed tuning is retried by the stats loop without disconnecting working video.
|
|
46
|
+
|
|
47
|
+
`YURI_REMOTE_DESKTOP_ICE_SERVERS` optionally supplies an RTCIceServer JSON array (maximum 8 entries). It is configured on the Desktop Host, not the Relay, and passed to both peers for that session. No external STUN service is contacted by default. Deployment-managed TURN credentials are visible to the paired receiving client as necessary for WebRTC and are never persisted or logged by this feature. Prefer short-lived credentials. A TURN credential minting service is not included.
|
|
48
|
+
|
|
49
|
+
If WebRTC fails, is unavailable, or produces no decoded video within 7 seconds of the answer, the client requests JPEG fallback through the existing runtime WS. This works over Relay without TURN. Fallback is at most 1440×900, JPEG quality 0.65, maximum 512 KiB per frame, and at most approximately 12 frames/second. Only one frame is outstanding: the receiver ACKs after image decode, and capture skips work until ACK. Thus effective frame rate also depends on RTT/encode/decode time; this is not a 30-fps WAN guarantee. WS buffering is capped at 512 KiB. The video fallback shares the connection with other Relay traffic.
|
|
50
|
+
|
|
51
|
+
Before sending JPEG, the capture page compares its complete encoded bytes with the previous sent frame, retaining at most one 512 KiB JPEG in memory for that session. Identical frames send nothing; any encoded change (including a small text edit) sends normally. This is exact comparison, not a low-resolution image/hash heuristic. Static-frame suppression saves network/Relay bytes, but the polling draw/encode work still occurs: it is not a capture-CPU optimization. A failed main-process `send()` returns a local-only `ack` with `dropped: true`, clearing duplicate history so an unchanged frame is retried instead of leaving the receiver stale. The wire ACK format, one-outstanding-frame bound and maximum frame size are unchanged. Teardown clears retained bytes and ignores late encoding completion. ACK-based JPEG quality/interval adaptation is not part of this change.
|
|
52
|
+
|
|
53
|
+
Zoomed JPEG raises its cap to 2560×1440 and quality to 0.8, with at most 4 capture cycles/second rather than the normal approximately 12 fps. Oversized frames retry at 0.5 then 0.25 JPEG quality while preserving resolution, and frames still over 512 KiB are skipped. Zoom/Fit invalidates duplicate history for a detail refresh, but never bypasses an outstanding decode ACK. An encode completed for an obsolete zoom state is discarded rather than sent stale. Fit restores 1440×900 / 0.65. These are bounded zoom profiles, not ACK-based adaptive JPEG quality.
|
|
54
|
+
|
|
55
|
+
The UI calls JPEG fallback “Compatibility stream”, not “Encrypted tunnel”: direct `ws://` transport is not E2EE. Use HTTPS/WSS for direct network connections and TLS for public Relay ingress. JPEG carried through Relay benefits from the existing endpoint-to-endpoint encrypted tunnel; a plain direct LAN connection does not acquire that property merely by using this feature.
|
|
56
|
+
|
|
57
|
+
Control always stays on the authenticated WS, including when video is P2P. `protocol.js` bounds and projects pointer coordinates, scroll deltas, text (1024 UTF-16 code units), key names, SDP (64 KiB), and ICE candidate fields. There is no arbitrary shell/keycode/file/clipboard API. WS messages are capped at 96 KiB; input is serialized with at most 32 queued commands and 150 messages/second. The native helper checks permission and active display again, and accepts only its own bounded JSON command vocabulary.
|
|
58
|
+
|
|
59
|
+
## Mobile interaction and performance
|
|
60
|
+
|
|
61
|
+
The Projects homepage plus menu ends with a Remote desktop icon/action after instance choices. The chat header overflow menu exposes the same action. `MobileApp` owns one open state and one shared entry handler; the homepage receives it through `MobilePhoneShell` and its Projects container. `RemoteDesktopPanel` now renders an opaque, viewport-filling standalone page in a body portal, not a sheet/dialog. It registers `remote-desktop-page` as its own root route with `useMobileBackRoute`, reusing the shared hosted-browser history and native Back coordinator. Back returns to the unchanged source tab/chat; it does not pop the retained chat route. The underlying shell is inert, the native dock is covered and the native composer uses the existing reference-counted cover. Root route gestures remain enabled for this page while underlying header navigation is blocked. Closing/unmounting releases the connection and native cover.
|
|
62
|
+
|
|
63
|
+
The page uses the current runtime, not a separately selected machine. It defaults to Drag mode: one finger pans the local canvas and never sends mouse/scroll input, including long presses. Cursor mode sends tap/double-tap clicks, held-mouse drags and long-press right-clicks. Switching modes cancels pending input/releases a held mouse without losing zoom/pan. Two fingers zoom (0.5–5× while held) and pan locally in either mode without sending mouse input. Releasing the last finger below 1× restores the fit transform; 1× means the fitted screen, not one remote pixel per CSS pixel. Switching from a remote drag to pinching releases the mouse; lifting one finger after pinching never generates a click. Letterboxing is excluded from coordinate mapping.
|
|
64
|
+
|
|
65
|
+
The page, rotated main, canvas region and pointer viewport use `overflow-clip`, not `overflow-hidden`: mobile-pointer CSS rewrites the latter to `overflow-y: auto`, which turns zoomed/rotated content into native scrollports with visible scrollbars. Canvas movement belongs exclusively to gesture transforms; only the bounded keyboard footer retains native scrolling. The production-CSS Chromium regression checks zoom, manual rotation and keyboard layouts with Android root markers, including zero programmatic scroll offset on every canvas ancestor.
|
|
66
|
+
|
|
67
|
+
Drag follows image-preview semantics: two short taps within 300ms and 24 CSS pixels zoom to 2.5× around the tapped point (clamped to visible bounds); another double tap while zoomed restores Fit. Cursor double taps remain native clicks and never zoom locally. At 1×, Drag movement follows the finger but snaps back to the original fit position when released; the same applies below 1×. Zoomed panning remains in place. Fit and double-tap transitions use a short transform-only settlement, disabled for reduced motion; pointer/pinch movement is immediate. Cancelling/resetting clears double-tap candidates so a new mode or pinch cannot inherit a stray tap.
|
|
68
|
+
|
|
69
|
+
Pointer moves retain only the latest client coordinates per pointer. Each animation-frame flush reads viewport bounds once, converts both fingers using that same geometry, updates both pointer positions before calculating the pinch, and writes at most one transform. Pointer-move handlers perform no layout reads. Zoom transforms update the DOM directly, and frames do not enter a shared store or React state. Repeated transport state notifications are deduplicated. A memo boundary isolates the open page from unrelated homepage streaming renders. Resize, close, cancellation and transport changes clear pending gestures. Text entry and common navigation keys are available in the full-width keyboard footer.
|
|
70
|
+
|
|
71
|
+
Like image preview, the remote viewport also cancels cancelable native `touchmove` events using an explicitly non-passive listener. Android Chromium can otherwise begin native panning from stale compositor touch-action regions on transformed layers and cancel the pointer stream, even with `touch-none`. Pointer events remain the sole owner of local zoom and remote input; the touch listener performs no geometry reads, state updates or duplicate gesture processing. It is scoped to the viewport (not the keyboard/controls/document) and removed on unmount. Like image preview, the page tracks its own active pointer IDs instead of requiring `hasPointerCapture`, prevents default on tracked pointer moves, and does not treat `lostpointercapture` as a gesture cancel; only `pointercancel` cancels. Viewport and remote-size resets are skipped while a pointer is active, and viewport changes below 1 CSS pixel never reset zoom. Regression checks cover native-pan prevention, unaffected controls, listener cleanup, capture-less pinch continuation and resize during a pinch; physical Android WebView acceptance remains required.
|
|
72
|
+
|
|
73
|
+
Mobile controls use gamepad-style translucent icon buttons at the lower corners instead of a toolbar/menu: Drag and Cursor on the left, keyboard on the right. There is no scroll or Fit button. Floating Back and orientation controls sit at the top corners without a title bar. All five circular controls use shared `Button mobileGlass` + `mobileIcon`, consuming the existing liquid-glass fill, highlight, shadow, blur and saturation tokens without feature-local opacity or ring overrides. Selected modes and the open keyboard use the existing `yuri-mobile-inverse-action` tint while retaining the shared glass material. Text entry/navigation keys open in a full-width, in-flow footer below the canvas region; the canvas uses the remaining height rather than sitting behind the input. Navigation keys use shared sprite icons with accessible labels and tooltips, not text glyphs. The footer wraps key buttons on narrow widths and maps its padding to the page-local safe area. Controls are outside the remote pointer surface so their touches never become native desktop input. Hiding the keyboard does not reconnect or change modes. Transport names are not displayed.
|
|
74
|
+
|
|
75
|
+
`lib/remote-desktop/orientation.ts` and `useDesktopOrientation.ts` own page-local, manual-only orientation. The initial direction is captured once from the opening viewport; after that, only the orientation button changes the selected portrait/landscape direction and CSS rotation angle. ResizeObserver updates available dimensions only: neither a width/height swap nor keyboard open/close may choose, reverse or clear the angle. There is no device-orientation listener or sensor permission request, including on entry. Physical tilt cannot override the user's selection. This never changes native supported-orientation lists, calls a global orientation lock, or rotates the document/other routes. Locked-portrait native shells use a 90° transform on this page only, with swapped logical dimensions, inverse touch coordinates and remapped safe-area edges. Resize resets gesture geometry, not the network connection. The shared keyboard-inset surface keeps inputs accessible; opening it does not reinterpret IME height changes as physical rotation. Exiting removes resize/key listeners and page-local direction state. Native shell/global portrait restrictions are unchanged.
|
|
76
|
+
|
|
77
|
+
## Validation and remaining platform gates
|
|
78
|
+
|
|
79
|
+
Regression checks cover manual switching, ignored sensor events, no sensor permission requests/listeners, orientation cleanup on close, and a 120-event pinch burst plus 60 consecutive frames (one bounds read and transform write per flush, no React query work or native input). These deterministic operation-count checks do not establish physical iPhone frame times.
|
|
80
|
+
|
|
81
|
+
Focused tests cover message validation, real auth/origin gates, revocation, single ownership, delayed startup/abort, real Relay WS dispatch/fragmentation, runtime switching, decoded-frame ACK, coordinate mapping, pinch cancellation, and 50 unrelated homepage renders. The Electron evidence fixture runs the production capture page/preload with a synthetic canvas, a real Chromium WebRTC receiver and JPEG fallback; it does not capture or control the user's desktop. A separate local visual fixture was checked in Chromium at 390×844 and 844×390 using the production panel and synthetic screen data. That checks panel layout, not physical-phone rendering or real desktop capture.
|
|
82
|
+
|
|
83
|
+
Adaptive-media regression tests cover tier bounds/hysteresis, active-pair selection, stale/missing/idle feedback, rejected tuning, non-overlapping stats and fallback/unload cleanup. A 1000-frame duplicate burst sends only the first frame; one-byte changes remain observable. The real Electron evidence fixture stages the capture assets from the installer file list, loads their file-origin ES modules under CSP, sends a synthetic 1440p canvas through native WebRTC and applies controlled poor/healthy stats to verify real encoder downshift/recovery. It then freezes the canvas to verify zero repeated JPEG sends, changes a small patch and tests dropped-frame retry plus ACK gating. This is a controlled local feedback/encoding check, not evidence of weak-WAN latency, actual network estimation, release signing or physical-phone decode behavior.
|
|
84
|
+
|
|
85
|
+
Zoom checks additionally cover negotiated/missing support, old backend/native combinations, strict Boolean projection, direct/Relay view routing, no Quartz injection, zoomed bitrate preservation, serialized tuning, stale encodes and restoration to the current normal tier. Source-size tests keep the initial tier at 720p for 1440p, 1080p and 720p inputs. UI tests exercise double-tap/Fit and repeated pinch frames with only one detail transition, and confirm encoder-size changes do not reset local zoom. The real Electron receiver observes 2560×1440 WebRTC after zoom (at the initial 1.5 Mbps ceiling and 10 fps cap), returns to ordinary encoding on Fit, and decodes zoomed JPEG at 2560×1440 then normal JPEG at 1440×810. This synthetic-source run does not establish physical-phone zoom-to-sharp latency on a real weak network.
|
|
86
|
+
|
|
87
|
+
The standalone-page update was previously checked at both viewport sizes with a synthetic remote screen. Actual Chromium CDP touch dispatch verified inverse cursor coordinates, Drag double-tap zoom/restore and 1× pan snap-back. Real browser history Back unmounted the page and retained the source draft. Orientation is now manual-only; focused tests cover ignored sensor events, both inverse coordinate mappings, native back routing and no reconnection on direction/mode changes. Native dock/composer behavior and keyboard/safe areas on physical hardware remain device acceptance checks.
|
|
88
|
+
|
|
89
|
+
Development-only native acceptance additionally exercised the production adapter and input helper against the real macOS desktop: JPEG frames decoded at 1440×810, and a fixed 26-character test string reached an isolated test textarea through Quartz input. The focused test window reported native/window/DOM keyboard focus. An earlier run received frames but not the text; that run did not measure focus and its cause is unresolved. This is not yet a repeatability guarantee. No real screen images or user-entered text were retained. The permission probe returned granted Screen Recording and Accessibility when Electron was started through macOS Launch Services; starting the same executable as a shell child reported denied/untrusted. Permission checks must be made under the actual launch context rather than inferred from the app's path or a Settings toggle.
|
|
90
|
+
|
|
91
|
+
Additional local checks confirmed new capture can start while the Mac remains locked (108 non-black JPEG frames), and the user reported the one-shot dummy password input test succeeded; no login was submitted. Transitioning an existing capture into lock still ended the session, and a later transition trace timed out awaiting local consent. These are distinct outcomes: locked capture/input is not evidence that lock/unlock transitions or correct-password unlocking are reliable.
|
|
92
|
+
|
|
93
|
+
The native setup adapter was also exercised via Launch Services with real app/helper permissions: it reported default-off, all required permissions granted, then enabled and disabled correctly using a test-only in-memory preference store. The production Settings group was visually checked at 900px and 350px widths using simulated native status; that does not prove release-signed IPC/permission onboarding. Focused tests cover disabled authenticated upgrades, native default-off, enable checks and failed writes, pending startup cancellation, active-session stop, local-only IPC classification, setup UI guidance and failed refresh preservation.
|
|
94
|
+
|
|
95
|
+
After removing per-connection confirmation and the sharing window, a Launch Services probe enabled a test-only in-memory preference, started the production adapter directly, and decoded three real desktop JPEG frames at 1440×810 without saving images or sending input. The single capture window stayed invisible and not always-on-top, and shutdown left no windows. Synthetic tests additionally verify no confirmation dialog, no approval writes, no Stop/Forget IPC, permission-revocation failure, and cancellation during permission checking/source discovery. This does not verify release-signed behavior or physical-phone use.
|
|
96
|
+
|
|
97
|
+
These tests do **not** prove macOS TCC permission inheritance for a release-signed helper, successful password-based unlocking, reliable lock/unlock transitions, iPhone WKWebView playback/gestures, WAN codec negotiation, throughput, battery or latency. Before shipping, verify those on a signed preview installer and a physical phone, including permission denial/regrant, display changes, disconnect while dragging, direct connection, Relay-only fallback and optional TURN. Native main/preload/helper changes require a new desktop installer; UI OTA alone cannot provide them.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const KEYS = new Set(['Enter', 'Backspace', 'Tab', 'Escape', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Delete', 'Home', 'End', 'PageUp', 'PageDown']);
|
|
2
|
+
const unit = (n) => typeof n === 'number' && Number.isFinite(n) && n >= 0 && n <= 1;
|
|
3
|
+
|
|
4
|
+
export function parseDesktopMessage(value) {
|
|
5
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) throw new Error('invalid_message');
|
|
6
|
+
const { type } = value;
|
|
7
|
+
if (type === 'ack' || type === 'fallback' || type === 'ping' || type === 'release') return { type };
|
|
8
|
+
if (type === 'view' && typeof value.zoomed === 'boolean') return { type, zoomed: value.zoomed };
|
|
9
|
+
if (type === 'answer' && typeof value.sdp === 'string' && value.sdp.length <= 65536) return { type, sdp: value.sdp };
|
|
10
|
+
if (type === 'ice' && (value.candidate === null || (typeof value.candidate === 'object'
|
|
11
|
+
&& typeof value.candidate.candidate === 'string' && value.candidate.candidate.length <= 2048))) {
|
|
12
|
+
return { type, candidate: value.candidate === null ? null : {
|
|
13
|
+
candidate: value.candidate.candidate,
|
|
14
|
+
sdpMid: typeof value.candidate.sdpMid === 'string' ? value.candidate.sdpMid.slice(0, 128) : null,
|
|
15
|
+
sdpMLineIndex: Number.isInteger(value.candidate.sdpMLineIndex) ? value.candidate.sdpMLineIndex : null,
|
|
16
|
+
} };
|
|
17
|
+
}
|
|
18
|
+
if (type === 'pointer' && ['move', 'down', 'up', 'click', 'right'].includes(value.action) && unit(value.x) && unit(value.y)) {
|
|
19
|
+
return { type, action: value.action, x: value.x, y: value.y };
|
|
20
|
+
}
|
|
21
|
+
if (type === 'scroll' && Number.isFinite(value.dx) && Number.isFinite(value.dy)) {
|
|
22
|
+
return { type, dx: Math.max(-1000, Math.min(1000, value.dx)), dy: Math.max(-1000, Math.min(1000, value.dy)) };
|
|
23
|
+
}
|
|
24
|
+
if (type === 'text' && typeof value.text === 'string' && value.text.length > 0 && value.text.length <= 1024) return { type, text: value.text };
|
|
25
|
+
if (type === 'key' && KEYS.has(value.key)) return { type, key: value.key };
|
|
26
|
+
throw new Error('invalid_message');
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { expect, it } from 'vitest';
|
|
2
|
+
import { parseDesktopMessage } from './protocol.js';
|
|
3
|
+
|
|
4
|
+
it.each([null, [], {}, { type: 'exec', command: 'something' }, { type: 'text', text: 'x'.repeat(1025) },
|
|
5
|
+
{ type: 'key', key: 'arbitrary' }, { type: 'pointer', action: 'down', x: NaN, y: 0 },
|
|
6
|
+
{ type: 'pointer', action: 'click', x: 2, y: 0 }, { type: 'scroll', dx: Infinity, dy: 0 },
|
|
7
|
+
{ type: 'answer', sdp: 'x'.repeat(65537) }, { type: 'ice', candidate: { candidate: 'x'.repeat(2049) } },
|
|
8
|
+
{ type: 'view' }, { type: 'view', zoomed: 'true' }, { type: 'view', zoomed: 1 },
|
|
9
|
+
])('rejects invalid or oversized messages %#', value => {
|
|
10
|
+
expect(() => parseDesktopMessage(value)).toThrow('invalid_message');
|
|
11
|
+
});
|
|
12
|
+
it('projects only permitted fields and bounds scroll and input', () => {
|
|
13
|
+
expect(parseDesktopMessage({ type: 'pointer', action: 'down', x: 0.2, y: 0.7, command: 'ignored' })).toEqual({ type: 'pointer', action: 'down', x: 0.2, y: 0.7 });
|
|
14
|
+
expect(parseDesktopMessage({ type: 'scroll', dx: -2000, dy: 5000 })).toEqual({ type: 'scroll', dx: -1000, dy: 1000 });
|
|
15
|
+
expect(parseDesktopMessage({ type: 'text', text: '中文🙂' })).toEqual({ type: 'text', text: '中文🙂' });
|
|
16
|
+
expect(parseDesktopMessage({ type: 'view', zoomed: true, maxBitrate: Infinity, command: 'ignored' })).toEqual({ type: 'view', zoomed: true });
|
|
17
|
+
expect(parseDesktopMessage({ type: 'view', zoomed: false })).toEqual({ type: 'view', zoomed: false });
|
|
18
|
+
expect(parseDesktopMessage({ type: 'ice', candidate: { candidate: 'candidate:test', sdpMid: '0', sdpMLineIndex: 0, unexpected: 'ignored' } })).toEqual({
|
|
19
|
+
type: 'ice', candidate: { candidate: 'candidate:test', sdpMid: '0', sdpMLineIndex: 0 },
|
|
20
|
+
});
|
|
21
|
+
});
|