@yuriai/web 0.3.2-beta.1 → 0.3.2-beta.12
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-B4_d0rQt.js → AgentAvatar-BJffjMB2.js} +1 -1
- package/dist/assets/AssistantConversationSurface--yxDjnQu.js +3 -0
- package/dist/assets/AssistantSessionCard-DdPqL_g8.js +2 -0
- package/dist/assets/{AssistantUnreadBadge-DzxFnL8M.js → AssistantUnreadBadge-DM_fwozo.js} +1 -1
- package/dist/assets/{AssistantView-TODFoL2I.js → AssistantView-dUWmrucP.js} +1 -1
- package/dist/assets/{DiagramView-x3sdXc97.js → DiagramView-CpoBNbaR.js} +1 -1
- package/dist/assets/{FadeInOnReveal-C5qpH3TY.js → FadeInOnReveal-CJqre5kV.js} +1 -1
- package/dist/assets/{GuiPluginPage-D5ajS2AA.js → GuiPluginPage-CM-Sop6a.js} +1 -1
- package/dist/assets/{GuiPluginSurface-bwXAUscV.js → GuiPluginSurface-CAN_zgP3.js} +1 -1
- package/dist/assets/{GuiPluginWindow-SsWHnc4g.js → GuiPluginWindow-unA50cUu.js} +1 -1
- package/dist/assets/{Icon-DBOSvb4U.js → Icon-DSX7wjSw.js} +1 -1
- package/dist/assets/{ImageLoadingPlaceholder-CrJp1f5y.js → ImageLoadingPlaceholder-PLO0B9my.js} +1 -1
- package/dist/assets/{LoadingImage-zXRrm9H9.js → LoadingImage-BAUw--5b.js} +1 -1
- package/dist/assets/MarkdownRenderer-C-hlqlA0.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-BeJCqK7P.js → MarkdownRendererImpl-CA9zIauD.js} +2 -2
- package/dist/assets/{MarkstreamRendererImpl-DOYwdhQ_.js → MarkstreamRendererImpl-CwsjUaGC.js} +2 -2
- package/dist/assets/{MobileDetailNavigation-DVbLG15P.js → MobileDetailNavigation-FfSrd8rW.js} +1 -1
- package/dist/assets/{MobileResizableSheet-WTfrQdK8.js → MobileResizableSheet-_VhodKQ3.js} +1 -1
- package/dist/assets/{MobileShareBridge-CgVEGvAL.js → MobileShareBridge-DtCqMWXT.js} +1 -1
- package/dist/assets/MobileSurface-34aws7qB.js +2 -0
- package/dist/assets/{MultiRunWindow-CMBcfCOh.js → MultiRunWindow-DCCjgHNE.js} +1 -1
- package/dist/assets/{OnboardingScreen-DLMYQLFn.js → OnboardingScreen-D7YC-sBK.js} +1 -1
- package/dist/assets/{OverlayScrollbar-CwmXL6W2.js → OverlayScrollbar-Ce9Mr4_V.js} +1 -1
- package/dist/assets/{RemoteAssistantSessionCard-vCSOg3_8.js → RemoteAssistantSessionCard-Csb19vol.js} +1 -1
- package/dist/assets/{SettingsView-DeS2ph7b.js → SettingsView-BF-DV5jC.js} +13 -13
- package/dist/assets/{SettingsWindow-CBh8oudq.js → SettingsWindow-BGec9rhJ.js} +1 -1
- package/dist/assets/{SetupTourDialog-C6SfskP3.js → SetupTourDialog-Du963bwh.js} +1 -1
- package/dist/assets/{TerminalView-CJDYSJWP.js → TerminalView-BLmis6W4.js} +1 -1
- package/dist/assets/ToolOutputDialog-D5vUeeCg.js +16 -0
- package/dist/assets/{VoiceSettings-C-W8KWvQ.js → VoiceSettings-Cz4DTeu1.js} +2 -2
- package/dist/assets/{YuriLogo-VXtP1vhh.js → YuriLogo-BKdnDJwl.js} +1 -1
- package/dist/assets/{YuriWordmark-B7lmpLRB.js → YuriWordmark-jFHGvbDP.js} +1 -1
- package/dist/assets/{assistant-attachment-cache-D-LmCflm.js → assistant-attachment-cache-BYvIyn1x.js} +1 -1
- package/dist/assets/{capgoAdapter-vPx0i-Ad.js → capgoAdapter-vcXrgtcl.js} +1 -1
- package/dist/assets/{checkbox-QxG9Mpbu.js → checkbox-lnltTd4O.js} +1 -1
- package/dist/assets/{client-1Fk5IbQR.js → client-BsLh14yh.js} +1 -1
- package/dist/assets/{collapsible-BvteRbPh.js → collapsible-B3_mc5eD.js} +1 -1
- package/dist/assets/context-menu-CeBwB9rZ.js +1 -0
- package/dist/assets/{desktopHosts-135cuRCE.js → desktopHosts-BsTrBVja.js} +1 -1
- package/dist/assets/{desktopRelayRestore-1aUztDPU.js → desktopRelayRestore-BxbRKak_.js} +1 -1
- package/dist/assets/{device-QL8KNSLM.js → device-BlmHHWT1.js} +1 -1
- package/dist/assets/{diagram-D6B_k7M5.js → diagram-DUBp-_Yd.js} +1 -1
- package/dist/assets/dialog-DYOEW9DC.css +1 -0
- package/dist/assets/dialog-f0jnPiqM.js +1 -0
- package/dist/assets/{fileMentionTouchSelection-DiKjZQEm.js → fileMentionTouchSelection-D5yvbxbi.js} +1 -1
- package/dist/assets/{fileReferenceActions-cYqdsXFz.js → fileReferenceActions-DLTUzjwi.js} +1 -1
- package/dist/assets/{gitApi-CtJXK0WM.js → gitApi-BMcLfk7G.js} +1 -1
- package/dist/assets/{gitApiHttp-B0FJaIhU.js → gitApiHttp-Dk5fNrOy.js} +1 -1
- package/dist/assets/{gui-BMN3-WPc.js → gui-KxRdG4j0.js} +1 -1
- package/dist/assets/{historyImportQueries-D_9RlrLp.js → historyImportQueries-DiGQ8duS.js} +1 -1
- package/dist/assets/{host-Bx9gj-ju.js → host-BBp7NPZz.js} +1 -1
- package/dist/assets/{i18n-qHllte6P.js → i18n-BvjeIWrT.js} +1 -1
- package/dist/assets/{image-loading-DBqnxgDH.js → image-loading-Dlh4FIPJ.js} +1 -1
- package/dist/assets/{input-C16jIASm.js → input-CTFR9La6.js} +1 -1
- package/dist/assets/{input-store-CsY-uaSj.js → input-store-wWToFdzi.js} +1 -1
- package/dist/assets/{insertionBoundaries-62IwW9Ka.js → insertionBoundaries-CVbCae7y.js} +1 -1
- package/dist/assets/main-BJ6CmPDc.js +169 -0
- package/dist/assets/main-CUu7EunU.js +2 -0
- package/dist/assets/{markdownHeightCache-CDcoG7oI.js → markdownHeightCache-BXL8JbYG.js} +1 -1
- package/dist/assets/{markdownTheme-DFDWa8Gh.js → markdownTheme-C2LJ3cJo.js} +1 -1
- package/dist/assets/{mcpQueries-CQjcxaDQ.js → mcpQueries-CvgW0Bl6.js} +1 -1
- package/dist/assets/miniChat-J9pxSQyx.js +2 -0
- package/dist/assets/mobile-DYjeIixi.js +2 -0
- package/dist/assets/{mobileBackNavigation-BPncsZvR.js → mobileBackNavigation-hjJm8naw.js} +1 -1
- package/dist/assets/mobileConnections-BEr-iBDA.js +2 -0
- package/dist/assets/{multirun-B5DvrZRF.js → multirun-CntRJAjm.js} +1 -1
- package/dist/assets/{native-config-1ijMxxRj.js → native-config-DdAtv91r.js} +1 -1
- package/dist/assets/{navigation-guYHqUd5.js → navigation-XRMYLkiK.js} +2 -2
- package/dist/assets/openRemoteProjectSession-C9_o5Yvr.js +1 -0
- package/dist/assets/{platform-wF65ZFgV.js → platform-CiUKDeXd.js} +1 -1
- package/dist/assets/{project-preview-2H-TmJkd.js → project-preview-BjTq299L.js} +1 -1
- package/dist/assets/{projectActions-50e_f9dI.js → projectActions-BPmI9_mW.js} +1 -1
- package/dist/assets/projectMeta-DyXicvG2.js +1 -0
- package/dist/assets/{prompt-attachment-upload-9fjmgafL.js → prompt-attachment-upload-Bem87nmm.js} +1 -1
- package/dist/assets/pwa-B8e09BUU.js +2 -0
- package/dist/assets/qoder-zGvP_RLr.svg +5 -0
- package/dist/assets/{queue-abort-optimistic-BuYzwR0N.js → queue-abort-optimistic-Buq-SBlq.js} +1 -1
- package/dist/assets/{react-DEouUmkV.js → react-DAdu4yTi.js} +1 -1
- package/dist/assets/readiness-Bxbkh3nB.js +2 -0
- package/dist/assets/{reference-history-Dyzfrmw-.js → reference-history-DtWYTywa.js} +1 -1
- package/dist/assets/{remote-input-store-84i8uDyM.js → remote-input-store-BvlOGMu_.js} +1 -1
- package/dist/assets/{remoteProjectQueries-Dfms-cCx.js → remoteProjectQueries-B-IcENvi.js} +1 -1
- package/dist/assets/{remoteSessionReference-CqNXv4Qg.js → remoteSessionReference-BEtE3Q92.js} +1 -1
- package/dist/assets/{renderElectronMiniChatApp-S8GzGGR7.js → renderElectronMiniChatApp-Dp6stG7q.js} +2 -2
- package/dist/assets/renderMobileApp-YITzRrOh.js +29 -0
- package/dist/assets/{runtime-auth-mjIpsk3N.js → runtime-auth-DA-qfGHk.js} +1 -1
- package/dist/assets/{runtime-fetch-DKZOpfzo.js → runtime-fetch-V-iMWR8t.js} +1 -1
- package/dist/assets/{runtime-file-download-D11Nnedg.js → runtime-file-download-DxL4XbME.js} +1 -1
- package/dist/assets/{runtime-file-resource-CuLP3xp7.js → runtime-file-resource-CKQQEwNv.js} +1 -1
- package/dist/assets/{runtime-switch-BMjl5Y5W.js → runtime-switch-DEPKHgdL.js} +1 -1
- package/dist/assets/{runtimeConfig-oElsA8Cz.js → runtimeConfig-Ccbs_U5j.js} +1 -1
- package/dist/assets/{runtimeEndpointReset-BUGfn7y0.css → runtimeEndpointReset-BIrMtGn5.css} +1 -1
- package/dist/assets/{runtimeEndpointReset-DT9dHdmQ.js → runtimeEndpointReset-CcoaDynZ.js} +9 -9
- package/dist/assets/{scheduledTaskNavigation-y5g8D2ee.js → scheduledTaskNavigation-CdBHn9ti.js} +1 -1
- package/dist/assets/{select-DpKqX1V6.js → select-CWX5Iu4G.js} +1 -1
- package/dist/assets/{sessionLookup-BHJgGHf0.js → sessionLookup-Cc1qteBf.js} +1 -1
- package/dist/assets/{sortable-tabs-strip-a2sshnFf.js → sortable-tabs-strip-Dr7EhUHW.js} +1 -1
- package/dist/assets/{speechSettingsQueries-DKesZuQ3.js → speechSettingsQueries-C9SqPtzI.js} +1 -1
- package/dist/assets/src-BNTtvddA.css +2 -0
- package/dist/assets/{store-BOD3jjMl.js → store-Dj5cSf8B.js} +1 -1
- package/dist/assets/{terminalApi-Cq0vjFe1.js → terminalApi-Bk77qMTK.js} +1 -1
- package/dist/assets/{textarea-DPrUh2E_.js → textarea-C9CubBIs.js} +1 -1
- package/dist/assets/{tooltip-JO7-ziD9.js → tooltip-Bk9lQalb.js} +1 -1
- package/dist/assets/types-Dhselvhe.js +2 -0
- package/dist/assets/{useAppFontEffects-DhmTAaeq.js → useAppFontEffects-C7rRTGhP.js} +62 -61
- package/dist/assets/{useAssistantUIStore-jOKVcBK8.js → useAssistantUIStore-CI42fWZh.js} +1 -1
- package/dist/assets/{useDesktopWindowControlsLayout-C3Bhl4tF.js → useDesktopWindowControlsLayout-PzEwONdf.js} +1 -1
- package/dist/assets/{useDictation-De8WB_Z7.js → useDictation-CLxZQYs_.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-DsQiUzq0.js → useEffectiveDirectory-D0EiFP2j.js} +1 -1
- package/dist/assets/{useFontPreferences-CO-L-Gd7.js → useFontPreferences-DthR4yan.js} +1 -1
- package/dist/assets/{useMobileHtmlPreviewStore-EOAzZiAy.js → useMobileHtmlPreviewStore-DzzgY1eS.js} +1 -1
- package/dist/assets/useMobileNavigationStore-CWShXc31.js +13 -0
- package/dist/assets/{usePluginsStore-nTVPoJCl.js → usePluginsStore-CEq5xgbZ.js} +1 -1
- package/dist/assets/{useProjectRuntimeAPIs-CHhK626l.js → useProjectRuntimeAPIs-BDy_DoSn.js} +1 -1
- package/dist/assets/{useStreamingTextThrottle-CNJGj-_8.js → useStreamingTextThrottle-BZuJKyrE.js} +1 -1
- package/dist/assets/{useThemeSystem-C57Z9mV2.js → useThemeSystem-D2YBbLma.js} +1 -1
- package/dist/assets/{useUIStore-Cfmg-aDQ.js → useUIStore-DjizmHAt.js} +1 -1
- package/dist/assets/{vendor-base-ui-z2M4boRm.js → vendor-base-ui-fom6orB6.js} +1 -1
- package/dist/assets/{vendor-cmdk-BgHvMv5l.js → vendor-cmdk-BKc6RGpL.js} +1 -1
- package/dist/assets/{vendor-dnd-kit-accessibility-gVi9ga0x.js → vendor-dnd-kit-accessibility-Cf9EEJvm.js} +1 -1
- package/dist/assets/{vendor-dnd-kit-core-Dd5yS2-T.js → vendor-dnd-kit-core-DRyd7I0I.js} +1 -1
- package/dist/assets/{vendor-dnd-kit-sortable-CV-SGi8y.js → vendor-dnd-kit-sortable-C8S8cyRO.js} +1 -1
- package/dist/assets/{vendor-framer-motion-CF9BQLta.js → vendor-framer-motion-DiGWHm7K.js} +1 -1
- package/dist/assets/{vendor-markstream-react-TwEpkgfP.js → vendor-markstream-react-Cwc-VXWM.js} +3 -3
- package/dist/assets/vendor-motion-DtmZZeEm.js +1 -0
- package/dist/assets/{vendor-pierre-diffs-tqo4Z3TC.js → vendor-pierre-diffs-HJfPTtu2.js} +1 -1
- package/dist/assets/{vendor-react-P8wFrkcT.js → vendor-react-D5BntRmA.js} +1 -1
- package/dist/assets/{vendor-react-drawio-CQW1YP2l.js → vendor-react-drawio-DXADKcSU.js} +1 -1
- package/dist/assets/{vendor-reactuses-core-Dyjw5sZR.js → vendor-reactuses-core-B8s-Rcd-.js} +1 -1
- package/dist/assets/{vendor-sonner-B5HgJenP.js → vendor-sonner-Y-KPX915.js} +1 -1
- package/dist/assets/{vendor-stream-diffs-DCMtZcS3.js → vendor-stream-diffs-BMT21f-n.js} +2 -2
- package/dist/assets/{vendor-tanstack-react-query-B-KblYBV.js → vendor-tanstack-react-query-ChSd65dm.js} +1 -1
- package/dist/assets/{vendor-tanstack-react-virtual-BkuqzrEV.js → vendor-tanstack-react-virtual-WY42p6U6.js} +1 -1
- package/dist/assets/{vendor-zustand-Cwko4FG1.js → vendor-zustand-CNn3HHhT.js} +1 -1
- package/dist/index.html +25 -25
- package/dist/mini-chat.html +25 -25
- package/dist/mobile.html +2 -2
- package/package.json +1 -1
- package/server/lib/gui-network/DOCUMENTATION.md +9 -1
- package/server/lib/notifications/DOCUMENTATION.md +11 -1
- package/server/lib/notifications/session-unread-store.js +20 -6
- package/server/lib/notifications/session-unread.test.js +80 -0
- package/server/lib/realtime-proxy.js +4 -2
- package/server/lib/realtime-proxy.test.js +5 -4
- package/server/lib/relay/tunnel-host.js +15 -5
- package/server/lib/relay/tunnel-host.test.js +24 -0
- package/server/lib/remote-hosts/DOCUMENTATION.md +8 -2
- package/server/lib/remote-hosts/routes.js +1 -1
- package/server/lib/remote-hosts/routes.test.js +75 -7
- package/server/lib/remote-hosts/transport.js +1 -1
- package/server/lib/scheduled-tasks/DOCUMENTATION.md +14 -5
- package/server/lib/scheduled-tasks/runtime.js +29 -25
- package/server/lib/scheduled-tasks/runtime.test.js +88 -1
- package/server/lib/ui-auth/ui-auth.js +1 -1
- package/server/lib/ui-auth/ui-auth.test.js +3 -0
- package/dist/assets/AssistantConversationSurface-BlrOfc3x.js +0 -3
- package/dist/assets/AssistantSessionCard-B7cmrLAe.js +0 -2
- package/dist/assets/MarkdownRenderer-eeOXke_U.js +0 -2
- package/dist/assets/MobileSurface-BL4nGTY5.js +0 -2
- package/dist/assets/ToolOutputDialog-DF8dWVTm.js +0 -16
- package/dist/assets/context-menu-BYPUMFAX.js +0 -1
- package/dist/assets/dialog-BfjbsTOP.js +0 -1
- package/dist/assets/dialog-CTYD3Sbr.css +0 -1
- package/dist/assets/main-CAyhodbD.js +0 -169
- package/dist/assets/main-DZedJhQx.js +0 -2
- package/dist/assets/miniChat-DFXcicxI.js +0 -2
- package/dist/assets/mobile-CKNvVIUj.js +0 -2
- package/dist/assets/mobileConnections-BBNhczt8.js +0 -2
- package/dist/assets/openRemoteProjectSession-Dvg3pCz-.js +0 -1
- package/dist/assets/projectMeta-BOcz1XpN.js +0 -1
- package/dist/assets/pwa-D4vcI8VD.js +0 -2
- package/dist/assets/readiness-CzHlOvNr.js +0 -2
- package/dist/assets/renderMobileApp-Bbs497wM.js +0 -29
- package/dist/assets/src-INJJ62RE.css +0 -2
- package/dist/assets/types-CxdhW05G.js +0 -2
- package/dist/assets/useMobileNavigationStore-2N3dS8vX.js +0 -13
- package/dist/assets/vendor-motion-Dv27UnOI.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{st as t}from"./vendor-base-ui-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{st as t}from"./vendor-base-ui-fom6orB6.js";var n=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},r=(e=>e?n(e):n),i=e(t(),1),a=e=>e;function o(e,t=a){let n=i.useSyncExternalStore(e.subscribe,i.useCallback(()=>t(e.getState()),[e,t]),i.useCallback(()=>t(e.getInitialState()),[e,t]));return i.useDebugValue(n),n}var s=e=>{let t=r(e),n=e=>o(t,e);return Object.assign(n,t),n},c=(e=>e?s(e):s),l=e=>!!e.dispatchFromDevtools&&typeof e.dispatch==`function`,u=new Map,d=e=>{let t=u.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([e,t])=>[e,t.getState()])):{}},f=(e,t,n)=>{if(e===void 0)return{type:`untracked`,connection:t.connect(n)};let r=u.get(n.name);if(r)return{type:`tracked`,store:e,...r};let i={connection:t.connect(n),stores:{}};return u.set(n.name,i),{type:`tracked`,store:e,...i}},p=(e,t)=>{if(t===void 0)return;let n=u.get(e);n&&(delete n.stores[t],Object.keys(n.stores).length===0&&u.delete(e))},m=e=>{if(!e)return;let t=e.split(`
|
|
2
2
|
`),n=t.findIndex(e=>e.includes(`api.setState`));if(n<0)return;let r=t[n+1]?.trim()||``;return/.+ (.+) .+/.exec(r)?.[1]},h=(e,t={})=>(n,r,i)=>{let{enabled:a,anonymousActionType:o,store:s,...c}=t,u;try{u=(a??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return e(n,r,i);let{connection:h,..._}=f(s,u,c),v=!0;i.setState=((e,t,a)=>{let l=n(e,t);if(!v)return l;let u=a===void 0?{type:o||m(Error().stack)||`anonymous`}:typeof a==`string`?{type:a}:a;return s===void 0?(h?.send(u,r()),l):(h?.send({...u,type:`${s}/${u.type}`},{...d(c.name),[s]:i.getState()}),l)}),i.devtools={cleanup:()=>{h&&typeof h.unsubscribe==`function`&&h.unsubscribe(),p(c.name,s)}};let y=(...e)=>{let t=v;v=!1,n(...e),v=t},b=e(i.setState,r,i);if(_.type===`untracked`?h?.init(b):(_.stores[_.store]=i,h?.init(Object.fromEntries(Object.entries(_.stores).map(([e,t])=>[e,e===_.store?b:t.getState()])))),l(i)){let e=i.dispatch;i.dispatch=(...t)=>{e(...t)}}return h.subscribe(e=>{switch(e.type){case`ACTION`:if(typeof e.payload!=`string`){console.error(`[zustand devtools middleware] Unsupported action format`);return}return g(e.payload,e=>{if(e.type===`__setState`){if(s===void 0){y(e.state);return}Object.keys(e.state).length!==1&&console.error(`
|
|
3
3
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
4
4
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
package/dist/index.html
CHANGED
|
@@ -571,50 +571,50 @@
|
|
|
571
571
|
opacity: 0.72;
|
|
572
572
|
}
|
|
573
573
|
</style>
|
|
574
|
-
<script type="module" crossorigin src="/assets/main-
|
|
574
|
+
<script type="module" crossorigin src="/assets/main-CUu7EunU.js"></script>
|
|
575
575
|
<link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-P2Xu9kJm.js">
|
|
576
576
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
577
577
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
578
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-
|
|
579
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-
|
|
578
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-DA-qfGHk.js">
|
|
579
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-DEPKHgdL.js">
|
|
580
580
|
<link rel="modulepreload" crossorigin href="/assets/reasoning-projection-client-BEhVknv9.js">
|
|
581
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-fetch-
|
|
581
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-fetch-V-iMWR8t.js">
|
|
582
582
|
<link rel="modulepreload" crossorigin href="/assets/runtimeAPIRegistry-C2VogTny.js">
|
|
583
583
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
584
|
-
<link rel="modulepreload" crossorigin href="/assets/platform-
|
|
585
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-
|
|
586
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-
|
|
587
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-
|
|
588
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-
|
|
584
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-CiUKDeXd.js">
|
|
585
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-BsTrBVja.js">
|
|
586
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-BxbRKak_.js">
|
|
587
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-fom6orB6.js">
|
|
588
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-CNn3HHhT.js">
|
|
589
589
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-migration-Bhz6UOBJ.js">
|
|
590
590
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-bootstrap-D4BW3w-M.js">
|
|
591
591
|
<link rel="modulepreload" crossorigin href="/assets/safeStorage-DTOhKN0V.js">
|
|
592
592
|
<link rel="modulepreload" crossorigin href="/assets/vendor-effect-X1Hqc7ba.js">
|
|
593
593
|
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-BM2r1f0o.js">
|
|
594
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-react-
|
|
594
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-react-D5BntRmA.js">
|
|
595
595
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BSjXNgF_.js">
|
|
596
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-
|
|
596
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-ChSd65dm.js">
|
|
597
597
|
<link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
|
|
598
598
|
<link rel="modulepreload" crossorigin href="/assets/vendor-lodash-es-BS45jPoZ.js">
|
|
599
599
|
<link rel="modulepreload" crossorigin href="/assets/vendor-js-cookie-hSOiFTtX.js">
|
|
600
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-reactuses-core-
|
|
600
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-reactuses-core-B8s-Rcd-.js">
|
|
601
601
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-store-BVRgEtI-.js">
|
|
602
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-
|
|
603
|
-
<link rel="modulepreload" crossorigin href="/assets/prompt-attachment-upload-
|
|
604
|
-
<link rel="modulepreload" crossorigin href="/assets/client-
|
|
605
|
-
<link rel="modulepreload" crossorigin href="/assets/useMobileHtmlPreviewStore-
|
|
606
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
602
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-CKQQEwNv.js">
|
|
603
|
+
<link rel="modulepreload" crossorigin href="/assets/prompt-attachment-upload-Bem87nmm.js">
|
|
604
|
+
<link rel="modulepreload" crossorigin href="/assets/client-BsLh14yh.js">
|
|
605
|
+
<link rel="modulepreload" crossorigin href="/assets/useMobileHtmlPreviewStore-DzzgY1eS.js">
|
|
606
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-DjizmHAt.js">
|
|
607
607
|
<link rel="modulepreload" crossorigin href="/assets/uuid-D-SDZijH.js">
|
|
608
|
-
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-
|
|
609
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
610
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-
|
|
611
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
612
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
613
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
608
|
+
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-Dk5fNrOy.js">
|
|
609
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-Bk77qMTK.js">
|
|
610
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-DxL4XbME.js">
|
|
611
|
+
<link rel="modulepreload" crossorigin href="/assets/types-Dhselvhe.js">
|
|
612
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-vcXrgtcl.js">
|
|
613
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-DdAtv91r.js">
|
|
614
614
|
<link rel="modulepreload" crossorigin href="/assets/runtime-ead7P81A.js">
|
|
615
615
|
<link rel="modulepreload" crossorigin href="/assets/bootstrap-eLlfzqAI.js">
|
|
616
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
617
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
616
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-Ccbs_U5j.js">
|
|
617
|
+
<link rel="stylesheet" crossorigin href="/assets/src-BNTtvddA.css">
|
|
618
618
|
</head>
|
|
619
619
|
<body class="h-full bg-background text-foreground">
|
|
620
620
|
<!-- Keep the startup layer outside #root. React replaces every child of
|
package/dist/mini-chat.html
CHANGED
|
@@ -77,50 +77,50 @@
|
|
|
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-J9pxSQyx.js"></script>
|
|
81
81
|
<link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-P2Xu9kJm.js">
|
|
82
82
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
84
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-
|
|
85
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-
|
|
84
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-DA-qfGHk.js">
|
|
85
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-DEPKHgdL.js">
|
|
86
86
|
<link rel="modulepreload" crossorigin href="/assets/reasoning-projection-client-BEhVknv9.js">
|
|
87
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-fetch-
|
|
87
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-fetch-V-iMWR8t.js">
|
|
88
88
|
<link rel="modulepreload" crossorigin href="/assets/runtimeAPIRegistry-C2VogTny.js">
|
|
89
89
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
90
|
-
<link rel="modulepreload" crossorigin href="/assets/platform-
|
|
91
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-
|
|
92
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-
|
|
93
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-
|
|
94
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-
|
|
90
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-CiUKDeXd.js">
|
|
91
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-BsTrBVja.js">
|
|
92
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-BxbRKak_.js">
|
|
93
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-fom6orB6.js">
|
|
94
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-CNn3HHhT.js">
|
|
95
95
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-migration-Bhz6UOBJ.js">
|
|
96
96
|
<link rel="modulepreload" crossorigin href="/assets/brand-storage-bootstrap-D4BW3w-M.js">
|
|
97
97
|
<link rel="modulepreload" crossorigin href="/assets/safeStorage-DTOhKN0V.js">
|
|
98
98
|
<link rel="modulepreload" crossorigin href="/assets/vendor-effect-X1Hqc7ba.js">
|
|
99
99
|
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-BM2r1f0o.js">
|
|
100
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-react-
|
|
100
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-react-D5BntRmA.js">
|
|
101
101
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BSjXNgF_.js">
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-
|
|
102
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-react-query-ChSd65dm.js">
|
|
103
103
|
<link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
|
|
104
104
|
<link rel="modulepreload" crossorigin href="/assets/vendor-lodash-es-BS45jPoZ.js">
|
|
105
105
|
<link rel="modulepreload" crossorigin href="/assets/vendor-js-cookie-hSOiFTtX.js">
|
|
106
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-reactuses-core-
|
|
106
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-reactuses-core-B8s-Rcd-.js">
|
|
107
107
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-store-BVRgEtI-.js">
|
|
108
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-
|
|
109
|
-
<link rel="modulepreload" crossorigin href="/assets/prompt-attachment-upload-
|
|
110
|
-
<link rel="modulepreload" crossorigin href="/assets/client-
|
|
111
|
-
<link rel="modulepreload" crossorigin href="/assets/useMobileHtmlPreviewStore-
|
|
112
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
108
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-CKQQEwNv.js">
|
|
109
|
+
<link rel="modulepreload" crossorigin href="/assets/prompt-attachment-upload-Bem87nmm.js">
|
|
110
|
+
<link rel="modulepreload" crossorigin href="/assets/client-BsLh14yh.js">
|
|
111
|
+
<link rel="modulepreload" crossorigin href="/assets/useMobileHtmlPreviewStore-DzzgY1eS.js">
|
|
112
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-DjizmHAt.js">
|
|
113
113
|
<link rel="modulepreload" crossorigin href="/assets/uuid-D-SDZijH.js">
|
|
114
|
-
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-
|
|
115
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
116
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-
|
|
117
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
118
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
119
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
114
|
+
<link rel="modulepreload" crossorigin href="/assets/gitApiHttp-Dk5fNrOy.js">
|
|
115
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-Bk77qMTK.js">
|
|
116
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-DxL4XbME.js">
|
|
117
|
+
<link rel="modulepreload" crossorigin href="/assets/types-Dhselvhe.js">
|
|
118
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-vcXrgtcl.js">
|
|
119
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-DdAtv91r.js">
|
|
120
120
|
<link rel="modulepreload" crossorigin href="/assets/runtime-ead7P81A.js">
|
|
121
121
|
<link rel="modulepreload" crossorigin href="/assets/bootstrap-eLlfzqAI.js">
|
|
122
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
123
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
122
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-Ccbs_U5j.js">
|
|
123
|
+
<link rel="stylesheet" crossorigin href="/assets/src-BNTtvddA.css">
|
|
124
124
|
</head>
|
|
125
125
|
<body class="h-full bg-background text-foreground">
|
|
126
126
|
<div id="root" class="h-full">
|
package/dist/mobile.html
CHANGED
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
</script>
|
|
65
65
|
|
|
66
66
|
<style>.dark #mobile-startup-logo img { filter: invert(1); }</style>
|
|
67
|
-
<script type="module" crossorigin src="/assets/mobile-
|
|
67
|
+
<script type="module" crossorigin src="/assets/mobile-DYjeIixi.js"></script>
|
|
68
68
|
<link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-P2Xu9kJm.js">
|
|
69
69
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
70
70
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
71
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
71
|
+
<link rel="stylesheet" crossorigin href="/assets/src-BNTtvddA.css">
|
|
72
72
|
</head>
|
|
73
73
|
<body class="h-full bg-background text-foreground">
|
|
74
74
|
<div id="root" class="h-full">
|
package/package.json
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# HTML/GUI network egress
|
|
2
|
+
|
|
3
|
+
Electron Browser also consumes this protocol through an isolated SOCKS5 session.
|
|
4
|
+
Remote Project sessions use the authenticated Hub
|
|
5
|
+
`/api/hosts/:hostId/api/gui-network/ws` upgrade, which forwards to this endpoint
|
|
6
|
+
on the selected execution Host. Client-local Electron sessions and ordinary Web
|
|
7
|
+
Browser views connect directly and do not acquire a GUI TCP channel.
|
|
8
|
+
The shared UI channel owner is `ui/src/lib/gui-network/channel.ts`; platform
|
|
9
|
+
adapters retain their own native SOCKS/stream-credit ownership.
|
|
2
10
|
|
|
3
11
|
`runtime.js` owns `/api/gui-network/ws`: an authenticated, origin-checked TCP
|
|
4
12
|
multiplexer reached through the existing private Relay dispatcher. Target bytes
|
|
@@ -42,6 +42,16 @@ client notification store had no durable data to migrate).
|
|
|
42
42
|
- Successful commits publish `yuri:session-unread-changed` revision tips through
|
|
43
43
|
`/api/yuri/events`. Clients lead with GET and recover on stream-ready/reconnect.
|
|
44
44
|
|
|
45
|
+
Multiple Host processes sharing the same data directory (such as desktop and HMR)
|
|
46
|
+
also share the database but not SSE clients. Each file-backed store checks the
|
|
47
|
+
single global revision row once per second and publishes only newer revisions to
|
|
48
|
+
its own clients, including commits from another process. This is independent of
|
|
49
|
+
session count and never reads transcripts or scans session rows on a tick. Local
|
|
50
|
+
commits still publish immediately; duplicate tips are suppressed. Failed checks
|
|
51
|
+
retain the published revision and retry on the next tick. In-memory stores have
|
|
52
|
+
no timer; closing a file-backed store clears its timer. Snapshot revision and rows
|
|
53
|
+
are read in one transaction so concurrent external commits cannot mix versions.
|
|
54
|
+
|
|
45
55
|
All authenticated clients of one Host share this state (not per-device or
|
|
46
56
|
per-client-token). Web, Electron, hosted mobile and Capacitor use the same
|
|
47
57
|
authenticated runtime HTTP/SSE transport, including Relay. Standalone VS Code
|
|
@@ -68,7 +78,7 @@ Android notification-only subscriptions send the App locale in `Accept-Language`
|
|
|
68
78
|
existing contact notification path, while an explicit silent review sends
|
|
69
79
|
nothing. Unowned tasks retain `notifyOnScheduledTasks` and the manual-run gate.
|
|
70
80
|
Result handoff/recovery belongs to `scheduled-tasks`, not this notification module.
|
|
71
|
-
- `family-completion-gate.js` (with a TypeScript declaration): dependency-free, runtime-local completion barrier shared by Host fanout and the VS Code webview. The Host supplies authoritative HTTP reads; VS Code supplies official SDK reads.
|
|
81
|
+
- `family-completion-gate.js` (with a TypeScript declaration): dependency-free, runtime-local completion barrier shared by Host fanout and the VS Code webview. The Host supplies authoritative HTTP reads; VS Code supplies official SDK reads. Scheduled-task settlement/recovery also reuses its bounded `readSessionFamilyActivity` ancestry reader, with run-scoped SDK cancellation; scheduling remains owned by `scheduled-tasks`.
|
|
72
82
|
- `packages/web/server/lib/notifications/live-activity-refresh-runtime.js`: periodic Live Activity snapshot refresh (default 30s, `YURI_LIVE_ACTIVITY_REFRESH_INTERVAL_MS` overrides, `0` disables). Each tick snapshots the authoritative session states once, recomputes every persisted Live Activity token's snapshot, and pushes updates only for real changes — busy→retry transitions, newly visible top-level sessions, idle completions the event path missed, and stale-row recovery. Entries whose recomputed snapshot is unchanged never send (APNs budgets Live Activity updates per hour). Rows for sessions without authoritative server state are preserved as-is; server-side-only sub-states (`permission`/`input`/`tool`) keep their last value while the session stays busy. When no row is working anymore the refresh sends `end` and clears accepted tokens.
|
|
73
83
|
- `packages/web/server/lib/notifications/template-runtime.js`: notification template variables and session text/title enrichment runtime. Zen-model helpers are retained as compatibility stubs only.
|
|
74
84
|
- `packages/web/server/lib/notifications/message.js`: helper implementation module.
|
|
@@ -22,15 +22,29 @@ export function createSessionUnreadStore({ dbPath, onChanged = () => {} }) {
|
|
|
22
22
|
);
|
|
23
23
|
`);
|
|
24
24
|
const find = db.prepare('SELECT * FROM session_unread WHERE id = ?');
|
|
25
|
-
const
|
|
25
|
+
const readRevision = db.prepare('SELECT revision FROM unread_meta WHERE id = 1');
|
|
26
|
+
const revision = () => readRevision.get().revision;
|
|
27
|
+
let publishedRevision = revision();
|
|
28
|
+
const publish = () => {
|
|
29
|
+
const next = revision();
|
|
30
|
+
if (next <= publishedRevision) return;
|
|
31
|
+
onChanged(next);
|
|
32
|
+
publishedRevision = next;
|
|
33
|
+
};
|
|
34
|
+
// Desktop and development Hosts can share this file, but not their SSE clients.
|
|
35
|
+
const peerTimer = dbPath === ':memory:' ? null : setInterval(() => {
|
|
36
|
+
try { publish(); }
|
|
37
|
+
catch { console.warn('[session-unread] shared revision check failed; retrying'); }
|
|
38
|
+
}, 1000);
|
|
39
|
+
peerTimer?.unref();
|
|
26
40
|
const publicRow = (row) => ({
|
|
27
41
|
directory: row.directory, unreadCount: row.unreadCount, hasError: Boolean(row.hasError),
|
|
28
42
|
manual: Boolean(row.manual), revision: row.revision,
|
|
29
43
|
});
|
|
30
|
-
const snapshot = () => ({
|
|
44
|
+
const snapshot = db.transaction(() => ({
|
|
31
45
|
revision: revision(),
|
|
32
46
|
sessions: Object.fromEntries(db.prepare('SELECT * FROM session_unread').all().map(row => [row.id, publicRow(row)])),
|
|
33
|
-
});
|
|
47
|
+
}));
|
|
34
48
|
const writeRow = db.prepare(`INSERT OR REPLACE INTO session_unread
|
|
35
49
|
(id, directory, unreadCount, hasError, manual, revision, terminal, eventAt, sequence)
|
|
36
50
|
VALUES (@id, @directory, @unreadCount, @hasError, @manual, @revision, @terminal, @eventAt, @sequence)`);
|
|
@@ -46,7 +60,7 @@ export function createSessionUnreadStore({ dbPath, onChanged = () => {} }) {
|
|
|
46
60
|
writeRow.run(next.row);
|
|
47
61
|
return next.publish;
|
|
48
62
|
})();
|
|
49
|
-
if (changed)
|
|
63
|
+
if (changed) publish();
|
|
50
64
|
};
|
|
51
65
|
return {
|
|
52
66
|
snapshot,
|
|
@@ -86,8 +100,8 @@ export function createSessionUnreadStore({ dbPath, onChanged = () => {} }) {
|
|
|
86
100
|
db.prepare('UPDATE unread_meta SET revision = revision + 1 WHERE id = 1').run();
|
|
87
101
|
return true;
|
|
88
102
|
})();
|
|
89
|
-
if (changed)
|
|
103
|
+
if (changed) publish();
|
|
90
104
|
},
|
|
91
|
-
close: () => db.close(),
|
|
105
|
+
close: () => { clearInterval(peerTimer); db.close(); },
|
|
92
106
|
};
|
|
93
107
|
}
|
|
@@ -3,6 +3,7 @@ import fs from 'node:fs';
|
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { createRequire } from 'node:module';
|
|
6
|
+
import { execFileSync } from 'node:child_process';
|
|
6
7
|
import express from 'express';
|
|
7
8
|
import request from 'supertest';
|
|
8
9
|
import { createSessionUnreadStore } from './session-unread-store.js';
|
|
@@ -184,6 +185,85 @@ describe('shared session unread', () => {
|
|
|
184
185
|
expect(second.snapshot()).toEqual(expected);
|
|
185
186
|
});
|
|
186
187
|
|
|
188
|
+
it('notifies both Host clients when another connection marks shared state read or unread', async () => {
|
|
189
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'yuri-unread-peers-'));
|
|
190
|
+
cleanup.push(() => fs.rmSync(dir, { recursive: true, force: true }));
|
|
191
|
+
const dbPath = path.join(dir, 'state.sqlite');
|
|
192
|
+
let desktopView;
|
|
193
|
+
let webView;
|
|
194
|
+
const desktopChanged = vi.fn(() => { desktopView = desktop.snapshot(); });
|
|
195
|
+
const webChanged = vi.fn(() => { webView = web.snapshot(); });
|
|
196
|
+
const desktop = createSessionUnreadStore({ dbPath, onChanged: desktopChanged });
|
|
197
|
+
cleanup.push(() => desktop.close());
|
|
198
|
+
const web = createSessionUnreadStore({ dbPath, onChanged: webChanged });
|
|
199
|
+
cleanup.push(() => web.close());
|
|
200
|
+
desktopView = desktop.snapshot();
|
|
201
|
+
webView = web.snapshot();
|
|
202
|
+
|
|
203
|
+
web.mark({ id: 'one', directory: '/project', unread: true });
|
|
204
|
+
await vi.waitFor(() => expect(desktopView).toEqual(webView), { timeout: 2500 });
|
|
205
|
+
expect(desktopView.sessions.one.unreadCount).toBe(1);
|
|
206
|
+
desktop.mark({ id: 'one', unread: false, expectedRevision: desktopView.sessions.one.revision });
|
|
207
|
+
await vi.waitFor(() => expect(webView).toEqual(desktopView), { timeout: 2500 });
|
|
208
|
+
expect(webView.sessions.one.unreadCount).toBe(0);
|
|
209
|
+
expect(desktopChanged).toHaveBeenCalledTimes(2);
|
|
210
|
+
expect(webChanged).toHaveBeenCalledTimes(2);
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
it('suppresses repeated and non-public peer changes and clears revision timers on close', () => {
|
|
214
|
+
vi.useFakeTimers();
|
|
215
|
+
const baseline = vi.getTimerCount();
|
|
216
|
+
const memory = createSessionUnreadStore({ dbPath: ':memory:' });
|
|
217
|
+
expect(vi.getTimerCount()).toBe(baseline);
|
|
218
|
+
memory.close();
|
|
219
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'yuri-unread-peer-timers-'));
|
|
220
|
+
cleanup.push(() => fs.rmSync(dir, { recursive: true, force: true }));
|
|
221
|
+
const dbPath = path.join(dir, 'state.sqlite');
|
|
222
|
+
const desktopChanged = vi.fn();
|
|
223
|
+
const webChanged = vi.fn();
|
|
224
|
+
const desktop = createSessionUnreadStore({ dbPath, onChanged: desktopChanged });
|
|
225
|
+
const web = createSessionUnreadStore({ dbPath, onChanged: webChanged });
|
|
226
|
+
try {
|
|
227
|
+
expect(vi.getTimerCount()).toBe(baseline + 2);
|
|
228
|
+
web.mark({ id: 'one', unread: true });
|
|
229
|
+
vi.advanceTimersByTime(50_000);
|
|
230
|
+
expect(desktopChanged).toHaveBeenCalledExactlyOnceWith(1);
|
|
231
|
+
expect(webChanged).toHaveBeenCalledExactlyOnceWith(1);
|
|
232
|
+
for (let i = 0; i < 50; i++) {
|
|
233
|
+
web.observe({ id: 'one', kind: 'running', sequence: i + 1 });
|
|
234
|
+
vi.advanceTimersByTime(1000);
|
|
235
|
+
}
|
|
236
|
+
expect(desktopChanged).toHaveBeenCalledTimes(1);
|
|
237
|
+
expect(webChanged).toHaveBeenCalledTimes(1);
|
|
238
|
+
desktop.remove('one');
|
|
239
|
+
vi.advanceTimersByTime(1000);
|
|
240
|
+
expect(webChanged).toHaveBeenLastCalledWith(2);
|
|
241
|
+
expect(web.snapshot()).toEqual({ revision: 2, sessions: {} });
|
|
242
|
+
} finally {
|
|
243
|
+
desktop.close(); web.close();
|
|
244
|
+
expect(vi.getTimerCount()).toBe(baseline);
|
|
245
|
+
vi.useRealTimers();
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
it('detects a separate process commit without a local lifecycle event or client refresh', async () => {
|
|
250
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'yuri-unread-process-'));
|
|
251
|
+
cleanup.push(() => fs.rmSync(dir, { recursive: true, force: true }));
|
|
252
|
+
const dbPath = path.join(dir, 'state.sqlite');
|
|
253
|
+
const changed = vi.fn();
|
|
254
|
+
const store = createSessionUnreadStore({ dbPath, onChanged: changed });
|
|
255
|
+
cleanup.push(() => store.close());
|
|
256
|
+
const moduleUrl = new URL('./session-unread-store.js', import.meta.url).href;
|
|
257
|
+
execFileSync(process.execPath, ['--input-type=module', '-e', `
|
|
258
|
+
import { createSessionUnreadStore } from ${JSON.stringify(moduleUrl)};
|
|
259
|
+
const store = createSessionUnreadStore({ dbPath: ${JSON.stringify(dbPath)} });
|
|
260
|
+
store.mark({ id: 'one', directory: '/project', unread: true });
|
|
261
|
+
store.close();
|
|
262
|
+
`], { timeout: 5000 });
|
|
263
|
+
await vi.waitFor(() => expect(changed).toHaveBeenCalledExactlyOnceWith(1), { timeout: 2500 });
|
|
264
|
+
expect(store.snapshot().sessions.one.unreadCount).toBe(1);
|
|
265
|
+
});
|
|
266
|
+
|
|
187
267
|
it('isolates failures, subagents and system sessions; new execution clears only its error', async () => {
|
|
188
268
|
const { store, event, loadSession } = fixture();
|
|
189
269
|
loadSession.mockImplementation(async id => ({ id, directory: '/project',
|
|
@@ -14,7 +14,9 @@ const isAllowedSsePath = (pathname) => {
|
|
|
14
14
|
const isAllowedWebSocketPath = (pathname) => {
|
|
15
15
|
return pathname === '/api/event/ws'
|
|
16
16
|
|| pathname === '/api/global/event/ws'
|
|
17
|
-
|
|
17
|
+
|| pathname === '/api/terminal/ws'
|
|
18
|
+
|| pathname === '/api/gui-network/ws'
|
|
19
|
+
|| /^\/api\/hosts\/[^/]+\/api\/gui-network\/ws$/.test(pathname)
|
|
18
20
|
|| pathname === '/api/remote-desktop/ws';
|
|
19
21
|
};
|
|
20
22
|
|
|
@@ -201,7 +203,7 @@ export const attachRealtimeProxy = ({ app, server, getDesktopRuntimeConfig, getU
|
|
|
201
203
|
}
|
|
202
204
|
|
|
203
205
|
const upstream = new WebSocket(resolved.target.toString(), {
|
|
204
|
-
headers: resolved.requestHeaders,
|
|
206
|
+
headers: { ...resolved.requestHeaders, Origin: resolved.target.origin.replace(/^ws/, 'http') },
|
|
205
207
|
});
|
|
206
208
|
const pending = [];
|
|
207
209
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { afterEach, describe, expect, it } from '
|
|
1
|
+
import { afterEach, describe, expect, it } from 'vitest';
|
|
2
2
|
import express from 'express';
|
|
3
3
|
import http from 'node:http';
|
|
4
4
|
import { WebSocket, WebSocketServer } from 'ws';
|
|
@@ -190,7 +190,7 @@ describe('realtime proxy', () => {
|
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
192
|
|
|
193
|
-
it('
|
|
193
|
+
it.each(['/api/global/event/ws', '/api/gui-network/ws', '/api/hosts/remote-a/api/gui-network/ws'])('proxies %s with runtime headers and target Origin', async pathname => {
|
|
194
194
|
let upstreamRequest = null;
|
|
195
195
|
const upstreamServer = http.createServer();
|
|
196
196
|
const upstreamWs = new WebSocketServer({ server: upstreamServer });
|
|
@@ -204,7 +204,7 @@ describe('realtime proxy', () => {
|
|
|
204
204
|
const { origin, runtime } = await startProxyServer({ apiBaseUrl: upstreamOrigin });
|
|
205
205
|
|
|
206
206
|
try {
|
|
207
|
-
const target = `${upstreamOrigin.replace(/^http:/, 'ws:')}
|
|
207
|
+
const target = `${upstreamOrigin.replace(/^http:/, 'ws:')}${pathname}?lastEventId=evt-1`;
|
|
208
208
|
const client = new WebSocket(buildRealtimeProxyWsUrl(origin, target), {
|
|
209
209
|
headers: { Origin: 'yuri-ui://app' },
|
|
210
210
|
});
|
|
@@ -219,8 +219,9 @@ describe('realtime proxy', () => {
|
|
|
219
219
|
});
|
|
220
220
|
|
|
221
221
|
expect(message).toBe('echo:ping');
|
|
222
|
-
expect(upstreamRequest?.url).toBe(
|
|
222
|
+
expect(upstreamRequest?.url).toBe(`${pathname}?lastEventId=evt-1`);
|
|
223
223
|
expect(upstreamRequest?.headers['x-proxy-auth']).toBe('secret');
|
|
224
|
+
expect(upstreamRequest?.headers.origin).toBe(upstreamOrigin);
|
|
224
225
|
client.close();
|
|
225
226
|
upstreamWs.close();
|
|
226
227
|
} finally {
|
|
@@ -28,6 +28,8 @@ const isAllowedHttpPath = (pathname) =>
|
|
|
28
28
|
|| pathname === '/auth'
|
|
29
29
|
|| pathname.startsWith('/auth/');
|
|
30
30
|
|
|
31
|
+
const PREVIEW_TARGETS_PATH = /^\/api\/preview\/targets(?:\/[^/]+)?\/?$/;
|
|
32
|
+
|
|
31
33
|
const ALLOWED_WS_PATHS = new Set([
|
|
32
34
|
'/api/global/event/ws',
|
|
33
35
|
'/api/event/ws',
|
|
@@ -49,7 +51,7 @@ const PREVIEW_PROXY_WS_PATH_PREFIX = '/api/preview/proxy/';
|
|
|
49
51
|
*/
|
|
50
52
|
export const isTunnelWsPathAllowed = (path) => {
|
|
51
53
|
if (typeof path !== 'string' || !path) return false;
|
|
52
|
-
if (/^\/api\/hosts\/[^/]+\/api\/(?:terminal\/ws(?:\?|$)|preview\/proxy\/)/.test(path)) return true;
|
|
54
|
+
if (/^\/api\/hosts\/[^/]+\/api\/(?:(?:terminal|gui-network)\/ws(?:\?|$)|preview\/proxy\/)/.test(path)) return true;
|
|
53
55
|
// Path only (no query) — tunnel open payload already splits query.
|
|
54
56
|
if (ALLOWED_WS_PATHS.has(path)) return true;
|
|
55
57
|
try {
|
|
@@ -191,7 +193,7 @@ export const createTunnelHost = ({
|
|
|
191
193
|
// HTTP
|
|
192
194
|
// -------------------------------------------------------------------------
|
|
193
195
|
|
|
194
|
-
const buildRequestHeaders = (rawHeaders) => {
|
|
196
|
+
const buildRequestHeaders = (rawHeaders, path = '') => {
|
|
195
197
|
const headers = {};
|
|
196
198
|
for (const [name, value] of Object.entries(rawHeaders)) {
|
|
197
199
|
if (typeof name !== 'string' || typeof value !== 'string') continue;
|
|
@@ -201,6 +203,13 @@ export const createTunnelHost = ({
|
|
|
201
203
|
headers[lower] = value;
|
|
202
204
|
}
|
|
203
205
|
headers['x-yuri-relay-connection'] = connectionId;
|
|
206
|
+
// Tunneled renderer fetches cannot set Origin (forbidden header), but the
|
|
207
|
+
// preview target routes require an allowed Origin. Present the loopback
|
|
208
|
+
// origin we dial, as the WS path does; scoped to these routes only so other
|
|
209
|
+
// same-origin checks keep treating tunneled requests as origin-less.
|
|
210
|
+
if (!headers.origin && PREVIEW_TARGETS_PATH.test(path)) {
|
|
211
|
+
headers.origin = `http://127.0.0.1:${getLocalPort()}`;
|
|
212
|
+
}
|
|
204
213
|
return headers;
|
|
205
214
|
};
|
|
206
215
|
|
|
@@ -245,7 +254,7 @@ export const createTunnelHost = ({
|
|
|
245
254
|
try {
|
|
246
255
|
response = await fetch(url, {
|
|
247
256
|
method,
|
|
248
|
-
headers: buildRequestHeaders(request.headers),
|
|
257
|
+
headers: buildRequestHeaders(request.headers, request.path),
|
|
249
258
|
body: requestBody,
|
|
250
259
|
duplex: hasBody ? 'half' : undefined,
|
|
251
260
|
signal: stream.abort.signal,
|
|
@@ -404,7 +413,8 @@ export const createTunnelHost = ({
|
|
|
404
413
|
for (const frame of encodeFragmentedMessage(frameType, streamId, bytes)) {
|
|
405
414
|
await waitForBackpressure(null);
|
|
406
415
|
if (streams.get(streamId) !== stream || closed) return;
|
|
407
|
-
await send(frame, open.path === '/api/remote-desktop/ws' || open.path === '/api/gui-network/ws'
|
|
416
|
+
await send(frame, open.path === '/api/remote-desktop/ws' || open.path === '/api/gui-network/ws'
|
|
417
|
+
|| /^\/api\/hosts\/[^/]+\/api\/gui-network\/ws$/.test(open.path));
|
|
408
418
|
}
|
|
409
419
|
});
|
|
410
420
|
});
|
|
@@ -480,7 +490,7 @@ export const createTunnelHost = ({
|
|
|
480
490
|
url: `${request.path}${request.query ? `?${request.query}` : ''}`,
|
|
481
491
|
headers: websocket
|
|
482
492
|
? { upgrade: 'websocket', 'x-yuri-relay-connection': connectionId }
|
|
483
|
-
: buildRequestHeaders(request.headers),
|
|
493
|
+
: buildRequestHeaders(request.headers, request.path),
|
|
484
494
|
}) === true;
|
|
485
495
|
} catch {
|
|
486
496
|
authorized = false;
|
|
@@ -43,6 +43,30 @@ describe('relay admission before loopback access', () => {
|
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
+
describe('tunneled HTTP Origin for preview target routes', () => {
|
|
47
|
+
const origins = async (method, path, headers = {}) => {
|
|
48
|
+
const fetchMock = vi.spyOn(globalThis, 'fetch').mockResolvedValue(new Response('{}'));
|
|
49
|
+
const frames = [];
|
|
50
|
+
const host = createTunnelHost({ authorizeRequest: async () => true, connectionId: 'origin-test', getLocalPort: () => 4321,
|
|
51
|
+
sendFrame: (frame) => { frames.push(decodeTunnelFrame(frame)); }, getBufferedAmount: () => 0 });
|
|
52
|
+
try {
|
|
53
|
+
await host.handleFrame(encodeTunnelFrame(TunnelFrameType.HttpRequest, 1, encodeJsonPayload({ method, path, query: '', headers })));
|
|
54
|
+
await waitFor(() => frames.some((frame) => frame.frameType === TunnelFrameType.StreamEnd));
|
|
55
|
+
return fetchMock.mock.calls[0][1].headers.origin;
|
|
56
|
+
} finally { host.close(); fetchMock.mockRestore(); }
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
it('presents the dialed loopback origin for preview target registration', async () => {
|
|
60
|
+
expect(await origins('POST', '/api/preview/targets')).toBe('http://127.0.0.1:4321');
|
|
61
|
+
expect(await origins('DELETE', '/api/preview/targets/abc123')).toBe('http://127.0.0.1:4321');
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('leaves other routes origin-less and keeps an explicit origin', async () => {
|
|
65
|
+
expect(await origins('POST', '/api/system/dev-shutdown')).toBeUndefined();
|
|
66
|
+
expect(await origins('POST', '/api/preview/targets', { origin: 'yuri-ui://app' })).toBe('yuri-ui://app');
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
46
70
|
/** Minimal EventEmitter-shaped fake used only by createTunnelHost tests. */
|
|
47
71
|
class FakeWebSocket {
|
|
48
72
|
static OPEN = 1;
|
|
@@ -185,7 +185,8 @@ short reads in `finally` and retain background watch demand until settlement.
|
|
|
185
185
|
`x-yuri-mime` and `x-yuri-filename` along with their original body bytes; size
|
|
186
186
|
and digest validation still execute on the Remote. These allowlisted metadata
|
|
187
187
|
headers never replace Remote authentication or forward Hub credentials.
|
|
188
|
-
- `/api/hosts/:hostId/api/terminal/ws
|
|
188
|
+
- `/api/hosts/:hostId/api/terminal/ws`, `/api/hosts/:hostId/api/gui-network/ws`
|
|
189
|
+
and `/api/hosts/:hostId/api/preview/proxy/*`
|
|
189
190
|
mount real upgrades, mirrored in Relay and URL-token allowlists. Host removal
|
|
190
191
|
closes direct sockets and Relay substreams, including pending handshakes.
|
|
191
192
|
Client revocation tracks the raw upgrade socket before waiting for the upstream;
|
|
@@ -198,7 +199,12 @@ short reads in `finally` and retain background watch demand until settlement.
|
|
|
198
199
|
authorization check and client upgrade. Overflow fails the upgrade and closes
|
|
199
200
|
the upstream; revocation, socket closure and failure discard the queue.
|
|
200
201
|
Direct and E2EE Relay use the same admission path. No greeting is synthesized
|
|
201
|
-
|
|
202
|
+
and no terminal handshake timeout is extended to conceal missing frames.
|
|
203
|
+
GUI TCP routes reuse the same credential, Origin and revocation gates for
|
|
204
|
+
Browser sessions belonging to a Remote Project. Direct server-to-server
|
|
205
|
+
upgrades set Origin to the admitted target's origin, never the Hub page's
|
|
206
|
+
origin. Hub URL tokens are stripped; the Remote transport supplies its own
|
|
207
|
+
saved credential. This does not open generic GUI-network HTTP forwarding.
|
|
202
208
|
|
|
203
209
|
The target-side local authority is `GET/POST /api/projects` and `PATCH
|
|
204
210
|
/api/projects/:id`. It only returns local projects. Authenticated
|
|
@@ -10,7 +10,7 @@ import { projectRemoteConfiguration } from './configuration.js';
|
|
|
10
10
|
import { RUNTIME_CONTRACT_MIN_VERIFIED } from '../opencode/runtime-contract.js';
|
|
11
11
|
import { parseFilePreviewPath, replaceFilePreviewUrlAuthToken } from '../preview/file-preview-path.js';
|
|
12
12
|
|
|
13
|
-
const websocketPath = (path) => path === '/api/terminal/ws' || path.startsWith('/api/preview/proxy/');
|
|
13
|
+
const websocketPath = (path) => path === '/api/terminal/ws' || path === '/api/gui-network/ws' || path.startsWith('/api/preview/proxy/');
|
|
14
14
|
const safeRoute = (route, method) => {
|
|
15
15
|
if (!route.startsWith('/api/') || /[\\\r\n]/.test(route)) return false;
|
|
16
16
|
const pathname = new URL(route, 'http://remote.invalid').pathname;
|